query_id
stringlengths
32
32
query
stringlengths
7
5.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
87ff8c9c69201b183725f8bcbc53306b
TODO: Implement setOptions() method.
[ { "docid": "389b07ede9b93d9e2385cb86e1662bac", "score": "0.0", "text": "public function setOptions(LockedImmutableHashSet $options): ProcessorInterface\n {\n }", "title": "" } ]
[ { "docid": "2e6a512556d3dee5f7eb92437c8c8b61", "score": "0.8812014", "text": "abstract public function setOptions();", "title": "" }, { "docid": "c21e041d850163eb989bd832d8ca6d5b", "score": "0.8782137", "text": "abstract protected function setOptions();", "title": "" }, { "docid": "bb57ad009f0ac14fc9e3dd789dd43684", "score": "0.823655", "text": "public function setOptions()\n {\n // TODO: Implement setOptions() method.\n }", "title": "" }, { "docid": "6543ba8498e44582b6dc632b43d045ea", "score": "0.81858194", "text": "protected abstract function setOptions(): array;", "title": "" }, { "docid": "ae1f425e09e05cd7774a3aeeda9b4933", "score": "0.7814399", "text": "public function setOptions($options);", "title": "" }, { "docid": "ae1f425e09e05cd7774a3aeeda9b4933", "score": "0.7814399", "text": "public function setOptions($options);", "title": "" }, { "docid": "ae1f425e09e05cd7774a3aeeda9b4933", "score": "0.7814399", "text": "public function setOptions($options);", "title": "" }, { "docid": "ae1f425e09e05cd7774a3aeeda9b4933", "score": "0.7814399", "text": "public function setOptions($options);", "title": "" }, { "docid": "788794b52b9c10d536fa0dd17eb45a0b", "score": "0.7647969", "text": "abstract protected function setDefaultOptions();", "title": "" }, { "docid": "7dab5b7ad849354d7c4e63c0103db2d4", "score": "0.76302534", "text": "abstract protected function _initOptions();", "title": "" }, { "docid": "d571ab4a16ff560d5229c7283e0fe24d", "score": "0.76109827", "text": "public function options();", "title": "" }, { "docid": "d571ab4a16ff560d5229c7283e0fe24d", "score": "0.76109827", "text": "public function options();", "title": "" }, { "docid": "d571ab4a16ff560d5229c7283e0fe24d", "score": "0.76109827", "text": "public function options();", "title": "" }, { "docid": "d571ab4a16ff560d5229c7283e0fe24d", "score": "0.76109827", "text": "public function options();", "title": "" }, { "docid": "29bb89cf342cab9b6818ba1f698b61d6", "score": "0.75653803", "text": "abstract protected function modifyOptions();", "title": "" }, { "docid": "8953aec5d7becdab77853e1e95f54503", "score": "0.73880434", "text": "protected function addOptions()\n {\n //hook in inheriting class\n }", "title": "" }, { "docid": "f2518a9023b2d43162b5bbc43f10a50a", "score": "0.7332792", "text": "public function initOptions() {\n parent::initOptions();\n }", "title": "" }, { "docid": "f2518a9023b2d43162b5bbc43f10a50a", "score": "0.7332792", "text": "public function initOptions() {\n parent::initOptions();\n }", "title": "" }, { "docid": "caeed88855701d410bd5ded7c2e1330b", "score": "0.729264", "text": "public function setOptions (array $options);", "title": "" }, { "docid": "6b098f69205a93895bb44e6e75f82ba7", "score": "0.7290895", "text": "public function __construct($options = array());", "title": "" }, { "docid": "232f74cec6cc0faa880a20c7fe6ad629", "score": "0.7282176", "text": "public function setOptions(Options $options);", "title": "" }, { "docid": "6a20fa2af1e0cff4336346ba3ccf1a20", "score": "0.728042", "text": "public function setOptions(array $options);", "title": "" }, { "docid": "6a20fa2af1e0cff4336346ba3ccf1a20", "score": "0.728042", "text": "public function setOptions(array $options);", "title": "" }, { "docid": "6a20fa2af1e0cff4336346ba3ccf1a20", "score": "0.728042", "text": "public function setOptions(array $options);", "title": "" }, { "docid": "6a20fa2af1e0cff4336346ba3ccf1a20", "score": "0.728042", "text": "public function setOptions(array $options);", "title": "" }, { "docid": "6a20fa2af1e0cff4336346ba3ccf1a20", "score": "0.728042", "text": "public function setOptions(array $options);", "title": "" }, { "docid": "6a20fa2af1e0cff4336346ba3ccf1a20", "score": "0.728042", "text": "public function setOptions(array $options);", "title": "" }, { "docid": "6a20fa2af1e0cff4336346ba3ccf1a20", "score": "0.728042", "text": "public function setOptions(array $options);", "title": "" }, { "docid": "6a20fa2af1e0cff4336346ba3ccf1a20", "score": "0.728042", "text": "public function setOptions(array $options);", "title": "" }, { "docid": "6a20fa2af1e0cff4336346ba3ccf1a20", "score": "0.728042", "text": "public function setOptions(array $options);", "title": "" }, { "docid": "6a20fa2af1e0cff4336346ba3ccf1a20", "score": "0.728042", "text": "public function setOptions(array $options);", "title": "" }, { "docid": "6a20fa2af1e0cff4336346ba3ccf1a20", "score": "0.728042", "text": "public function setOptions(array $options);", "title": "" }, { "docid": "18346bdf98598a2a9a2729bfbef08df4", "score": "0.72803175", "text": "function __construct($options = []);", "title": "" }, { "docid": "ed6f7789c0b1c5aa6f8f7c731cf7791f", "score": "0.7219588", "text": "public function setOptions($options)\n {\n $this->options = $options + $this->options;\n }", "title": "" }, { "docid": "abc1c178d7fb25b703d5d1d16d7c148f", "score": "0.72169745", "text": "abstract protected function getOptions();", "title": "" }, { "docid": "abc1c178d7fb25b703d5d1d16d7c148f", "score": "0.72169745", "text": "abstract protected function getOptions();", "title": "" }, { "docid": "5d6896c9d82d302cd45cb563fa5dd879", "score": "0.7212333", "text": "public function setOptions (array $options = null ) {}", "title": "" }, { "docid": "fa2c392a3f8428e1ed71a3fe30f979a9", "score": "0.72118044", "text": "public function setOptions(array $options = []);", "title": "" }, { "docid": "fa2c392a3f8428e1ed71a3fe30f979a9", "score": "0.72118044", "text": "public function setOptions(array $options = []);", "title": "" }, { "docid": "3bf861a32cb77115961836c9661a99db", "score": "0.71647185", "text": "public function testSetOptions()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "85211b15dfa232f963b1cc5fcd8da7b3", "score": "0.7145263", "text": "public function options(array $options)\n {\n }", "title": "" }, { "docid": "ffd1bbfd2ca88adc712a3389fe98ecf7", "score": "0.7137973", "text": "public function setOptions(array $options): void;", "title": "" }, { "docid": "bfdcf207a17fe6aa9cf413d2f01e5445", "score": "0.7106692", "text": "protected function set_options() {\n\t\t$field_obj = FrmFieldFactory::get_field_object( $this->db_row );\n\t\t$this->options = $field_obj->get_options( array() );\n\t}", "title": "" }, { "docid": "7d381ae9f247784e4f572b0d3d88d1bb", "score": "0.70975286", "text": "function Options() {\n\t\t\t$this->Initialize();\n\t\t}", "title": "" }, { "docid": "4f4f45a90ef7a73b4e42218c7034ce14", "score": "0.7093485", "text": "public function setOptions($options) {\r\n if (!is_array($options)) {\r\n $this->options = (array)$options;\r\n } else {\r\n $this->options = $options; \r\n }\r\n }", "title": "" }, { "docid": "ea1a6af3d4f5aeb9fd91f65802b287d5", "score": "0.7088614", "text": "public function __construct(){\n\t\t\t$this->setOptions();\n\t\t}", "title": "" }, { "docid": "63969f7bf37d8ac8f498b22f13fe1789", "score": "0.70696926", "text": "public function setOptions($options)\n {\n $this->_options = $options;\n }", "title": "" }, { "docid": "b93dc30f75356eb5dfd2eb2fc08b4a45", "score": "0.70657444", "text": "public function set_options(Array $options) {\n // does nothing\n\t}", "title": "" }, { "docid": "b93dc30f75356eb5dfd2eb2fc08b4a45", "score": "0.70657444", "text": "public function set_options(Array $options) {\n // does nothing\n\t}", "title": "" }, { "docid": "b93dc30f75356eb5dfd2eb2fc08b4a45", "score": "0.70657444", "text": "public function set_options(Array $options) {\n // does nothing\n\t}", "title": "" }, { "docid": "34e4d5afa44b0aef7abcbed366015a14", "score": "0.70507044", "text": "public function __construct($options = []) { }", "title": "" }, { "docid": "a6698e03d2faadc058762ac3bbb0f81e", "score": "0.7043587", "text": "public function setOptions($options)\n {\n $this->options = $options;\n }", "title": "" }, { "docid": "a6698e03d2faadc058762ac3bbb0f81e", "score": "0.7043587", "text": "public function setOptions($options)\n {\n $this->options = $options;\n }", "title": "" }, { "docid": "a6698e03d2faadc058762ac3bbb0f81e", "score": "0.7043587", "text": "public function setOptions($options)\n {\n $this->options = $options;\n }", "title": "" }, { "docid": "a6698e03d2faadc058762ac3bbb0f81e", "score": "0.7043587", "text": "public function setOptions($options)\n {\n $this->options = $options;\n }", "title": "" }, { "docid": "a6698e03d2faadc058762ac3bbb0f81e", "score": "0.7043587", "text": "public function setOptions($options)\n {\n $this->options = $options;\n }", "title": "" }, { "docid": "a6698e03d2faadc058762ac3bbb0f81e", "score": "0.7043587", "text": "public function setOptions($options)\n {\n $this->options = $options;\n }", "title": "" }, { "docid": "0f00f56abbf5ce66abcfc056dd0adbf9", "score": "0.7040465", "text": "public function __construct(array $options = []);", "title": "" }, { "docid": "c79c4ce847460cc1bd6736932e2b2482", "score": "0.7027805", "text": "abstract public function getOptions();", "title": "" }, { "docid": "5fde3d277f84f869e04f488dacd3466a", "score": "0.7021744", "text": "protected function setOptions()\n {\n return array();\n }", "title": "" }, { "docid": "b8e28006c257c0f170b93d9e1c902738", "score": "0.70139515", "text": "public function __construct($options = null) {}", "title": "" }, { "docid": "ca2b74745c05acf50771a021158a89f3", "score": "0.7009185", "text": "public function setOption($options = array()){\n\t\tcurl_setopt_array($this->_chanel, $options)\t;\n\t}", "title": "" }, { "docid": "734513e5462f10b9a16bdec9f79ae80b", "score": "0.7001733", "text": "public function options(array $options);", "title": "" }, { "docid": "5fc89511543a00aee52776c646adb150", "score": "0.7000555", "text": "public function set_options( $options ) {\n\t\t$this->options = $options;\n\t}", "title": "" }, { "docid": "dd80c05bc1649f1c16df0051095110a9", "score": "0.6976585", "text": "public function getOptions () {}", "title": "" }, { "docid": "8453d800d0733f02e9d0712b3720d312", "score": "0.69589114", "text": "public function __construct($options=null);", "title": "" }, { "docid": "e9b1019a8dc3abd50afd71f6f05f88dd", "score": "0.6950507", "text": "public function __construct($options)\n\t{\n\t\t$this->options = $options;\n\t}", "title": "" }, { "docid": "ecca662f228bc485932cdd817e272c83", "score": "0.6942359", "text": "public function __construct()\n {\n $this->initOptions();\n }", "title": "" }, { "docid": "1c267e51c1fd1d77623fa32f36f636d5", "score": "0.69263923", "text": "private function set_options() {\r\n\t\t\t\t//iterate through our options\r\n\t\t\t\tforeach($this->options as $name => $val) {\r\n\t\t\t\t\t//if this is our options array\r\n\t\t\t\t\tif($name == $this->fix_name('options')) {\r\n\t\t\t\t\t\t//iterate through each value\r\n\t\t\t\t\t\tforeach($val as $key => $value) {\r\n\t\t\t\t\t\t\t//check it against the current settings\r\n\t\t\t\t\t\t\tif($this->settings[$key] != $value) {\r\n\t\t\t\t\t\t\t\t//if the setting was different, store the current setting, not our default\r\n\t\t\t\t\t\t\t\t$val[$key] = $this->settings[$key];\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//json encode our options array into a string\r\n\t\t\t\t\t\t$val = json_encode($val);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//run the option through our update method\r\n\t\t\t\t\t$this->update_option($name, $val);\r\n\t\t\t\t}\r\n\t\t\t}", "title": "" }, { "docid": "7d940032a3bf70c3859d64c944e224b9", "score": "0.6923892", "text": "public function setOptions($options)\n {\n $this->options = json_encode($options);\n }", "title": "" }, { "docid": "288228d9ba416f91b0f526baec4112a3", "score": "0.6921734", "text": "public function setOptions($options = [])\n {\n $this->options = [\n 'script_url' => Yii::$app->request->absoluteUrl,\n 'upload_dir' => Yii::getAlias('@public/uploads/'),\n 'upload_url' => Media::getUploadUrl(),\n 'user_dirs' => true,\n 'year_month_dirs' => true,\n 'mkdir_mode' => 0755,\n 'param_name' => 'files',\n 'access_control_allow_origin' => '*',\n 'access_control_allow_credentials' => false,\n 'correct_exif_rotation' => true,\n 'pagination_route' => '/media/get-json',\n 'access_control_allow_methods' => [\n 'OPTIONS',\n 'HEAD',\n 'GET',\n 'POST',\n 'PUT',\n 'PATCH',\n 'DELETE',\n ],\n 'access_control_allow_headers' => [\n 'Content-Type',\n 'Content-Range',\n 'Content-Disposition',\n ],\n 'versions' => [\n 'large' => [\n 'max_width' => 1024,\n 'max_height' => 1024,\n ],\n 'medium' => [\n 'max_width' => 300,\n 'max_height' => 300,\n ],\n 'thumbnail' => [\n 'max_width' => 150,\n 'max_height' => 150,\n 'crop' => 1,\n ],\n ],\n 'files_per_page' => 100,\n 'print_response' => true,\n ];\n\n if ($options) {\n $this->options = ArrayHelper::merge($this->options, $options);\n }\n }", "title": "" }, { "docid": "1a7fa71948eb1c763ecc5916d4371acb", "score": "0.6900089", "text": "public function __construct($options = array()) {\n\t\t\t$this->setOptions($options);\n\t\t}", "title": "" }, { "docid": "04bcf0df4bc9fab2d0ac7e5a733baba5", "score": "0.6899744", "text": "public function __construct($options = array())\r\n\t{\r\n\t\t$this->options = $options;\r\n\t}", "title": "" }, { "docid": "06461e559086cec12d9f6d6652d9d63e", "score": "0.68969506", "text": "public function __construct($options = array())\n {\n \tparent::__construct($options);\n }", "title": "" }, { "docid": "066fe7e528a64d3c1d2101301f60f7e7", "score": "0.6896754", "text": "public function __construct($options = null){\n $this->options = $options;\n }", "title": "" }, { "docid": "e2db5c78b44ca3b477779a3e67e095d7", "score": "0.68962735", "text": "public function set_edit_options() {\n\n\t}", "title": "" }, { "docid": "9868626a5686d28cfee3ad0ffe9fb991", "score": "0.68913597", "text": "public function initOptions()\n {\n $this->options['name'] = $this->name;\n }", "title": "" }, { "docid": "36b1f21637d38f62c16779c1accdbe0e", "score": "0.6890194", "text": "public function init($options=array());", "title": "" }, { "docid": "5b1343470fd294037d02df704036b3f1", "score": "0.68872964", "text": "private function _set_option()\r\n {\r\n // $this->set(compact('filter_academics'));\r\n }", "title": "" }, { "docid": "697be9b53fc057bc538c98ad2f8d2ad9", "score": "0.68495166", "text": "protected function defineOptions() {\n return parent::defineOptions();\n }", "title": "" }, { "docid": "3cf255d4aa319f0e92b61f59d27073fb", "score": "0.682052", "text": "public function __construct($options = []) {\n\t\tparent::__construct($options);\n\t}", "title": "" }, { "docid": "41bc895198896af0e2363e434dc1784a", "score": "0.6804321", "text": "public function setOptions(array $options) {\n\t\t$this->options = $options;\n\t}", "title": "" }, { "docid": "c0835f873673e1978adb15b092c87449", "score": "0.68003774", "text": "public function getOptions()\n {\n }", "title": "" }, { "docid": "d9899805c2d341e5ab43fcc55dd48de9", "score": "0.67836446", "text": "function setOptions($options)\n {\n $this->options = array_merge($this->options, $options);\n }", "title": "" }, { "docid": "d9899805c2d341e5ab43fcc55dd48de9", "score": "0.67836446", "text": "function setOptions($options)\n {\n $this->options = array_merge($this->options, $options);\n }", "title": "" }, { "docid": "c545a181d376a238770d0abf228b97f3", "score": "0.67834777", "text": "public function setOptions(array $options)\n\t{\n\t\t$this->_options = $options;\n\t}", "title": "" }, { "docid": "9cec1a6f0b81e9d79bb6b68a35601ab4", "score": "0.67826027", "text": "final public function __construct()\n {\n $this->registerOptions();\n }", "title": "" }, { "docid": "b26cfb8c2647317f002a6d3b648dc1b0", "score": "0.67699504", "text": "public function setOptions(Array $options){\r\n\t\t$this->options = $options;\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "fe7819ff6339cf58d4e96c1741a8cecf", "score": "0.6759072", "text": "function setOptions($options)\n {\n if (is_array($options) === false) {\n trigger_error('options must be an array', E_USER_ERROR);\n }\n \n $this->options = $options;\n }", "title": "" }, { "docid": "9183dbdadf24962718fd96a9a5730361", "score": "0.6756335", "text": "public function setOptions($options)\n {\n parent::setOptions($options);\n return $this;\n }", "title": "" }, { "docid": "caf54bd9dd74facff2250faffaaa3a48", "score": "0.6733657", "text": "public function __construct(array $options)\n {\n }", "title": "" }, { "docid": "84ab78d00181b860b84b49c47d952583", "score": "0.67187524", "text": "public function __construct(array $options) {\r\n $this->setOptions($options);\r\n }", "title": "" }, { "docid": "923023b55849042ab5939e169f8c0faa", "score": "0.6713081", "text": "abstract public function __construct($options = null);", "title": "" }, { "docid": "c01994d30b666740c321f95a4b0a5688", "score": "0.66749275", "text": "public function setOpts($options){\r\n $this->opts = array_merge($this->opts, $options);\r\n }", "title": "" }, { "docid": "40d0a9d4ed94716e52de249950e7f388", "score": "0.6668234", "text": "public function options($options = array()){\n\t\t$this->options = $options;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "0a879cbd79630c157c93a2aa8cf68265", "score": "0.66598666", "text": "public function __construct(array $options = array())\n {\n $this->_options = $options + $this->_options;\n }", "title": "" }, { "docid": "f78a074db49936afe38da577dedbaff0", "score": "0.6632255", "text": "public function setProperties($options)\n\t{\n\t\t$this->options = $options;\n\t}", "title": "" }, { "docid": "98b637a421a825e055f8dbe79cafd65a", "score": "0.662632", "text": "public function __invoke(array $options = []);", "title": "" }, { "docid": "c2fcedaa4575dfabd15229653d1ec3e3", "score": "0.66052186", "text": "public function setOptions(array $options)\n {\n $this->options = $options;\n }", "title": "" }, { "docid": "c2fcedaa4575dfabd15229653d1ec3e3", "score": "0.66052186", "text": "public function setOptions(array $options)\n {\n $this->options = $options;\n }", "title": "" }, { "docid": "4be748b656d8a447a41df3c8fa8d427c", "score": "0.66050506", "text": "function setOptions(array $options=[]){\n $this->platform->setOptions($options);\n }", "title": "" } ]
ae099563758dd8e0263b9f7edf298f9f
/ Insert related call numbers
[ { "docid": "94afef31b8b7f6daf63ee4c6378c5711", "score": "0.6736301", "text": "private function insertCallNumbers($db, $identificationid, array $callnumbers)\n {\n \tforeach ($callnumbers as $callnumber)\n \t{\n \t\t$callnumberarray = array(\n \t\t\t\tCombinedRecordsDAO::CALL_NUMBER => trim($callnumber),\n \t\t\t\tself::IDENTIFICATION_ID => $identificationid\n \t\t);\n \t\tLogger::log($callnumberarray, Zend_Log::DEBUG);\n\t \t$db->insert('CallNumbers', $callnumberarray);\n \t}\n }", "title": "" } ]
[ { "docid": "b40f86e9587e5b0951956ac368fcd59c", "score": "0.5932774", "text": "function addToCallHistory($userExtension, $callfrom, $callto, $status, $adb, $useCallerInfo, $pbxuuid) {\n\t$result = $adb->pquery('select userid from vtiger_asteriskextensions where asterisk_extension=?', array($userExtension));\n\t$userID = $adb->query_result($result, 0, 'userid');\n\tif (empty($userID)) {\n\t\t// call to extension not configured in application > return NULL\n\t\treturn 0;\n\t}\n\t$crmID = $adb->getUniqueID('vtiger_crmentity');\n\t$timeOfCall = date('Y-m-d H:i:s');\n\n\t$adb->pquery(\n\t\t'insert into vtiger_crmentity values (?,?,?,?,?,?,?,?,?,?,?,?,?,?)',\n\t\tarray($crmID, $userID, $userID, 0, 'PBXManager', '', $timeOfCall, $timeOfCall, null, null, 0, 1, 0, $pbxuuid)\n\t);\n\t$adb->pquery('insert into vtiger_crmobject values (?,?,0,?,?,?)', array($crmID, $pbxuuid, 'PBXManager', $userID, $timeOfCall));\n\t$unknownCaller = GlobalVariable::getVariable('PBX_Unknown_CallerID', 'Unknown', 'PBXManager');\n\tif (empty($callfrom)) {\n\t\t$callfrom = $unknownCaller;\n\t}\n\tif (empty($callto)) {\n\t\t$callto = $unknownCaller;\n\t}\n\n\t$sql = 'select userid from vtiger_asteriskextensions where asterisk_extension=?';\n\tif ($status == 'outgoing') {\n\t\t//call is from user to record\n\t\t$result = $adb->pquery($sql, array($callfrom));\n\t\tif ($adb->num_rows($result)>0) {\n\t\t\t$userid = $adb->query_result($result, 0, 'userid');\n\t\t\t$callerName = getUserFullName($userid);\n\t\t}\n\n\t\t$receiver = $useCallerInfo;\n\t\tif (empty($receiver)) {\n\t\t\t$receiver = $unknownCaller;\n\t\t} else {\n\t\t\t$receiver = \"<a href='index.php?module=\".$receiver['module'].\"&action=DetailView&record=\".$receiver['id'].\"'>\".$receiver['name'].'</a>';\n\t\t}\n\t} else {\n\t\t//call is from record to user\n\t\t$result = $adb->pquery($sql, array($callto));\n\t\tif ($adb->num_rows($result)>0) {\n\t\t\t$userid = $adb->query_result($result, 0, 'userid');\n\t\t\t$receiver = getUserFullName($userid);\n\t\t}\n\t\t$callerName = $useCallerInfo;\n\t\tif (empty($callerName)) {\n\t\t\t$callerName = $unknownCaller.' '.$callfrom;\n\t\t} else {\n\t\t\t$callerName = \"<a href='index.php?module=\".$callerName['module'].'&action=DetailView&record='.$callerName['id'].\"'>\".decode_html($callerName['name']).'</a>';\n\t\t}\n\t}\n\n\t$sql = 'insert into vtiger_pbxmanager (pbxmanagerid,callfrom,callto,timeofcall,status,pbxuuid) values (?,?,?,?,?,?)';\n\t$params = array($crmID, $callerName, $receiver, $timeOfCall, $status, $pbxuuid);\n\t$adb->pquery($sql, $params);\n\tcbEventHandler::do_action('corebos.pbxmanager.aftersave', $params);\n\treturn $crmID;\n}", "title": "" }, { "docid": "6434b9ec115dab9caba155062f5e7825", "score": "0.5368218", "text": "public static function add($call_id) {\n self::$call_id_list[] = $call_id;\n }", "title": "" }, { "docid": "e26c4f10f58b2a9bddef7ad96654c181", "score": "0.5303168", "text": "function addNumber($n) {\r\n $this->validateNumber($n);\r\n $this->value[] = $n;\r\n $this->components++;\r\n }", "title": "" }, { "docid": "3ada52d25397ce77d8c9fda54b68b5b1", "score": "0.5258837", "text": "public function run()\n {\n DB::table('tracking_nums')->insert(\n\t [\n\t \t[\n\t \t\t'track_num' => '797600544620',\n\t \t\t'invoice_id' => '1',\n\t\t 'created_at' => date(\"Y-m-d H:i:s\")\n\t \t],\n\t \t[\n\t \t\t'track_num' => '406155620654',\n\t \t\t'invoice_id' => '2',\n\t\t 'created_at' => date(\"Y-m-d H:i:s\")\n\t \t],\n\t \t[\n\t \t\t'track_num' => '406153782781',\n\t \t\t'invoice_id' => '2',\n\t\t 'created_at' => date(\"Y-m-d H:i:s\")\n\t \t],\n\t \t[\n\t \t\t'track_num' => '406153782818',\n\t \t\t'invoice_id' => '3',\n\t\t 'created_at' => date(\"Y-m-d H:i:s\")\n\t \t],\n\t ]\n\t );\n }", "title": "" }, { "docid": "fa6f7aed0abb8d713941a421211e20cd", "score": "0.5158518", "text": "function createCall($songIDs) {\n\tglobal $client, $to, $from;\n\t$client->account->calls->create(\n \t\t$from, // From this number\n \t\t$to, // Call this number\n\n \t\t// Read TwiML at this URL when a call connects\n \t\t'http://pygmy.nfshost.com/pygmy.php?songIDs=' . $songIDs\n\t);\n}", "title": "" }, { "docid": "2c07d2ad98f902c250f2948172993376", "score": "0.51128995", "text": "function insertPCIds()\n\t{\n\t\t$this->builddom();\n\t\t$mydom = $this->dom;\n\t\t\n\t\t$pcids = $this->getAllPCIds();\n\n\t\t// add missing ones\n\t\t$sep = $path = \"\";\n\t\tforeach ($this->id_elements as $el)\n\t\t{\n\t\t\t$path.= $sep.\"//\".$el.\"[not(@PCID)]\";\n\t\t\t$sep = \" | \";\n\t\t\t$path.= $sep.\"//\".$el.\"[@PCID='']\";\n\t\t\t$sep = \" | \";\n\t\t}\n\t\t$xpc = xpath_new_context($mydom);\n\t\t$res = & xpath_eval($xpc, $path);\n\n\t\tfor ($i = 0; $i < count ($res->nodeset); $i++)\n\t\t{\n\t\t\t$node = $res->nodeset[$i];\n\t\t\t$id = ilUtil::randomHash(10, $pcids);\n\t\t\t$pcids[] = $id;\n//echo \"setting-\".$id.\"-\";\n\t\t\t$res->nodeset[$i]->set_attribute(\"PCID\", $id);\n\t\t}\n\t}", "title": "" }, { "docid": "435e0baa4e867e5c5d23c47d7c473b9f", "score": "0.50957733", "text": "function addNumber($sheet,$row, $col, $num, $refrow = null, $refcol = null, $refsheet = null){\n\t\tif (($row < 0) || ($col < 0) || ($sheet < 0)) return -1;\n\t\tif ($refsheet === null) $refsheet = $sheet;\n\t\tif ($refrow === null) $refrow = $row;\n\t\tif ($refcol === null) $refcol = $col;\n\t\t$val['sheet']=$sheet;\n\t\t$val['row']=$row;\n\t\t$val['col']=$col;\n\t\t$val['num']=$num;\n\t\t$val['refrow']=$refrow;\n\t\t$val['refcol']=$refcol;\n\t\t$val['refsheet']=$refsheet;\n\t\t$this->revise_dat['add_num'][]=$val;\n\t}", "title": "" }, { "docid": "f02e2db65f92c22b900006b28eb62e3d", "score": "0.50944424", "text": "public function addNos();", "title": "" }, { "docid": "4df3e0443109fbe215cbddd578086240", "score": "0.50363845", "text": "public function callNumber() {\n return $this->data->call_number;\n }", "title": "" }, { "docid": "86e95082fc97400c254295719ca63871", "score": "0.50151104", "text": "public function run()\n\t{\n\t\t\\DB::table('verified_phone_numbers')->delete();\n \n\t\t\\DB::table('verified_phone_numbers')->insert(array (\n\t\t\t0 => \n\t\t\tarray (\n\t\t\t\t'id' => '1',\n\t\t\t\t'user_id' => '1',\n\t\t\t\t'country_prefix' => '49',\n\t\t\t\t'country' => 'DE',\n\t\t\t\t'phone_number' => '1718392168',\n\t\t\t\t'verified' => '1',\n\t\t\t\t'verify_token' => 'hlLtas',\n\t\t\t\t'verified_at' => '2015-04-10 13:28:36',\n\t\t\t\t'expires_at' => '0000-00-00 00:00:00',\n\t\t\t\t'deleted_at' => NULL,\n\t\t\t\t'created_at' => '2015-04-10 13:16:08',\n\t\t\t\t'updated_at' => '2015-04-10 13:16:08',\n\t\t\t),\n\t\t\t1 => \n\t\t\tarray (\n\t\t\t\t'id' => '2',\n\t\t\t\t'user_id' => '2',\n\t\t\t\t'country_prefix' => '49',\n\t\t\t\t'country' => 'DE',\n\t\t\t\t'phone_number' => '1772498468',\n\t\t\t\t'verified' => '1',\n\t\t\t\t'verify_token' => 'hlLtcQ',\n\t\t\t\t'verified_at' => '2015-04-10 13:28:36',\n\t\t\t\t'expires_at' => '2015-04-10 14:28:22',\n\t\t\t\t'deleted_at' => NULL,\n\t\t\t\t'created_at' => '2015-04-10 13:22:18',\n\t\t\t\t'updated_at' => '2015-04-10 13:28:36',\n\t\t\t),\n\t\t\t2 =>\n\t\t\t\tarray (\n\t\t\t\t\t'id' => '3',\n\t\t\t\t\t'user_id' => '3',\n\t\t\t\t\t'country_prefix' => '49',\n\t\t\t\t\t'country' => 'DE',\n\t\t\t\t\t'phone_number' => '15256195619',\n\t\t\t\t\t'verified' => '1',\n\t\t\t\t\t'verify_token' => 'gPtUQY',\n\t\t\t\t\t'verified_at' => '2015-04-10 13:28:14',\n\t\t\t\t\t'expires_at' => '2015-04-10 14:28:00',\n\t\t\t\t\t'deleted_at' => NULL,\n\t\t\t\t\t'created_at' => '2015-04-10 13:23:11',\n\t\t\t\t\t'updated_at' => '2015-04-10 13:28:14',\n\t\t\t\t),\n\t\t\t3 =>\n\t\t\t\tarray (\n\t\t\t\t\t'id' => '4',\n\t\t\t\t\t'user_id' => '4',\n\t\t\t\t\t'country_prefix' => '49',\n\t\t\t\t\t'country' => 'DE',\n\t\t\t\t\t'phone_number' => '15786118235',\n\t\t\t\t\t'verified' => '1',\n\t\t\t\t\t'verify_token' => 'gPtUQY',\n\t\t\t\t\t'verified_at' => '2015-04-10 13:28:14',\n\t\t\t\t\t'expires_at' => '2015-04-10 14:28:00',\n\t\t\t\t\t'deleted_at' => NULL,\n\t\t\t\t\t'created_at' => '2015-04-10 13:23:11',\n\t\t\t\t\t'updated_at' => '2015-04-10 13:28:14',\n\t\t\t\t),\n\t\t));\n\t}", "title": "" }, { "docid": "4cac2965ddcaa0353d48ec48f70ddf23", "score": "0.49727106", "text": "public function addNumbersToModel($contacts)\n {\n foreach($contacts as $contact){\n $allNumbers = $contact->numbers;\n $contactNumbers = [];\n foreach($allNumbers as $number){\n $contactNumbers[] = $number->number;\n }\n $contact->phoneNumbers = implode(', ', $contactNumbers);\n }\n return $contacts;\n }", "title": "" }, { "docid": "895dbbe1478206f1ecc9d0630fd429a9", "score": "0.49292618", "text": "function actionNumbers()\n { \n include('model/MPredictiveDial.php');\n include('model/MSkill.php');\n include('lib/Pagination.php');\n $skill = new MSkill();\n $skills = $skill->getSkillsNamesArray('P');\n\n $skill_id = $this->getRequest()->getRequest('sid');\n $skill_name = !empty($skills[$skill_id]) ? $skills[$skill_id] : \"\";\n\n $number_1 = trim($this->getRequest()->getPost('number_1'));\n\n if (strlen($skill_id) != 2 || !array_key_exists($skill_id,$skills)\n || !ctype_upper($skill_id)) {\n exit();\n }\n\n $predictive_dial_model = new MPredictiveDial();\n\n $pagination = new Pagination();\n $pagination->base_link = $this->getTemplate()->url(\"task=\" . $this->getRequest()->getControllerName() . \"&act=numbers&sid={$skill_id}&sname={$skill_name}\");\n\n\n\n $pagination->num_records = $predictive_dial_model->numDialNumbers($skill_id,$number_1);\n $data['numbers'] = $pagination->num_records > 0 ?\n $predictive_dial_model->getDialNumbers($skill_id,$number_1,$pagination->getOffset(), $pagination->rows_per_page) : null;\n $pagination->num_current_records = is_array($data['numbers']) ? count($data['numbers']) : 0;\n $data['pagination'] = $pagination;\n\n $data['request'] = $this->getRequest();\n $data['skills'] = $skills;\n $data['dial_status_options'] = MPredictiveDial::get_dial_status_options();\n $data['pageTitle'] = 'Predictive Dial Number(s) :: '.$skill_name;\n $data['side_menu_index'] = 'predictive-dial';\n $data['smi_selection'] = 'skills_';\n $this->getTemplate()->display('predictive_dial_numbers', $data);\n }", "title": "" }, { "docid": "e5f507951dc41d53dcfce2de45f2e3d8", "score": "0.49274638", "text": "private function updatePlaysTableWithCallSID() {\n // if the callID number is different then reset the callID and\n // set the startTimeCurrentPlay to the current time\n $dbEngine = new dbEngine();\n $callID = $dbEngine->getCallIDFromTelNumber($this->_from);\n if ($callID != $this->_callSID) {\n $dbEngine->updatePlaysTableWithCurrentPlay($this->_from, $this->_callSID);\n }\n echo \"<!-- From:\". $this->_from .\" callSID:\". $this->_callSID .\" -->\\n\";\n }", "title": "" }, { "docid": "1d93a838301aa315b108ff1882437bcf", "score": "0.49252832", "text": "public function updateAvailableNumbers(){\n\t\t$this->availableNumbers=array_merge($this->availableNumbers,array_keys($this->simpl_fors));//TODO\n\t}", "title": "" }, { "docid": "dfd4ed481514fa45e08e39a45013c3cf", "score": "0.49221164", "text": "function InsertNumber( $value )\r\n {\r\n if ( $this->ccol == $this->totalcol ) {\r\n $this->ccol = 0;\r\n $this->crow++;\r\n }\r\n $this->WriteNumber_pos( $this->crow, $this->ccol, $value );\r\n $this->ccol++;\r\n return;\r\n }", "title": "" }, { "docid": "ce4d14bf53e7f0d44e4ec2d3a8007856", "score": "0.48712057", "text": "public function phoneNumbers($phoneNumbers) {\n $this->phoneNumbers = $phoneNumbers;\n }", "title": "" }, { "docid": "24ceb977aba3c3087475eafbcf557042", "score": "0.48245627", "text": "function add_billinfo($params)\n {\n $this->db->insert('billinfo',$params);\n return $this->db->insert_id();\n }", "title": "" }, { "docid": "8ad9496fa5854728fc37a78528d22201", "score": "0.481845", "text": "public function generateNumeration() {\n $_this_id = \"\" . $this->id;\n $number = date(\"y\") . \"_\";\n \n if(strlen($_this_id)<5) {\n\n for ($x = 0; $x <= (5-strlen($_this_id)); $x++) {\n $number .= \"0\";\n }\n $number .= $this->id;\n }\n $this->number = $number;\n $this->save();\n }", "title": "" }, { "docid": "5189ebd4b7a2278c69b8359599eb30ad", "score": "0.48016232", "text": "public function run()\n {\n // find all the new call number sequences that need their archival_identifier field populated\n // fill it in with the corresponding archival identifier from the associated collection\n DB::table('new_call_number_sequences as sequence')\n ->whereNull('sequence.archival_identifier')\n ->join('collections as collection', 'sequence.collection_id', '=', 'collection.id')\n ->update([\n 'sequence.archival_identifier' => DB::raw('`collection`.`archival_identifier`'),\n ]);\n }", "title": "" }, { "docid": "b5755c688a390204971267ccc0ee4f96", "score": "0.47922167", "text": "private function _AddDigits()\n\t{\n\t\t$this->str .= '| Adding Digits 402';\n\t}", "title": "" }, { "docid": "2eef2ee1e43c3b982f8c5ad95f5f2ff4", "score": "0.47870252", "text": "public function save( $call )\n\t{\t\n\t\t$date = date( 'Y-m-d H:i:s' );\n\t\t\n\t\tif ( $call->getId() > 0 )\n\t\t{\n\t\t\t$type = 'update';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$type = 'insert';\n\t\t}\n\t\t\n\t\tif ( is_null( $call->getDateCreated() ))\n\t\t{\n\t\t\t$call->setDateCreated( $date );\n\t\t}\n\t\t\n\t\tif ( $call->hasMessages() )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$db = $this->getDatabaseConnection();\n\t\t\n\t\tif ( $type == 'insert' )\n\t\t{\n\t\t $sql = \"INSERT INTO ib_calls ( ext_cust_id, vendor_id, username, \";\n\t\t $sql .= \"rep_id, cust_phone, source_phone, date_created, date_ended \";\n\t\t $sql .= \" ) VALUES ( \";\n\t\t $sql .= \":ext_cust_id, \";\n\t\t $sql .= \":vendor_id, \";\n\t\t $sql .= \":username, \";\n\t\t $sql .= \":rep_id, \";\n\t\t $sql .= \":cust_phone, \";\n\t\t $sql .= \":source_phone, \";\n\t\t $sql .= \":date_created, \";\n\t\t $sql .= \":date_ended \";\n\t\t $sql .= \")\";\n\t\t}\n\t\telse \n\t\t{\n\t\t $sql = \"UPDATE ib_calls \";\n\t\t $sql .= \"SET \";\n\t\t $sql .= \"ext_cust_id=:ext_cust_id, \";\n\t\t $sql .= \"vendor_id=:vendor_id, \";\n\t\t $sql .= \"username=:username, \";\n\t\t $sql .= \"rep_id=:rep_id, \";\n\t\t $sql .= \"cust_phone=:cust_phone, \";\n\t\t $sql .= \"source_phone=:source_phone, \";\n\t\t $sql .= \"date_created=:date_created, \";\n\t\t $sql .= \"date_ended=:date_ended \";\n\t\t $sql .= \"WHERE id = :id \";\t\t\n\t\t}\n\n\t $sth = $db->prepare( $sql );\n\n\t\t$sth->bindParam(':ext_cust_id', $call->getExtCustId(), PDO::PARAM_STR, 32 );\n\t\t$sth->bindParam(':vendor_id', $call->getVendorId(), PDO::PARAM_INT);\n\t\t$sth->bindParam(':username', $call->getUsername(), PDO::PARAM_STR, 40 );\n\t\t$sth->bindParam(':rep_id', $call->getRepId(), PDO::PARAM_INT );\n\t\t$sth->bindParam(':cust_phone', $call->getCustPhone(), PDO::PARAM_STR, 10 );\n\t\t$sth->bindParam(':source_phone', $call->getSourcePhone(), PDO::PARAM_STR, 10 );\n\t\t$sth->bindParam(':date_created', $call->getDateCreated(), PDO::PARAM_STR );\n\t\t$sth->bindParam(':date_ended', $call->getDateEnded(), PDO::PARAM_STR );\n\n\t\tif ( $type == 'update' )\n\t\t{\n\t\t\t$sth->bindParam(':id', $call->getId(), PDO::PARAM_INT );\n\t\t}\n\t\t\n\t\t$result = $sth->execute();\n// print_r( $db->errorInfo() );\n// print_r( $sth->errorInfo() );\n\n\t\tif ( $result == 1 )\n\t\t{\n\t\t\tif ( $type == 'insert' )\n\t\t\t{\n\t\t\t\t$call->setId( $db->lastInsertId() );\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "8ee19ca09c1276f491312fd360cffdcf", "score": "0.47837988", "text": "public function insert($workingHistory);", "title": "" }, { "docid": "834857265c2b858fa257ea4adb5d55c7", "score": "0.47703677", "text": "public static function add($tb, $number,$db_handle) {\n\t\t$SQL = \"INSERT INTO \" . $tb . \" (ID) VALUES (\" . ($number + 1) . \")\";\n\t\tmysqli_query($db_handle,$SQL);\n\t}", "title": "" }, { "docid": "9cf6a3e4aeb5441e464b9a576843ea8e", "score": "0.4757346", "text": "public function getNumbers()\n {\n return $this->hasMany(Number::className(), ['contact_id' => 'id']);\n }", "title": "" }, { "docid": "36a5b08ef10a5e95ff2ada3c77ab7f80", "score": "0.47513196", "text": "function add_phone($phoneObj)\r\n {\r\n \r\n $this->phone = $phoneObj;\r\n \r\n }", "title": "" }, { "docid": "7be2cc79c4728d1b9f3574b64684af8e", "score": "0.47354418", "text": "private function hangupCalls($incomingCallHangup){\n $sipdomicilio = Sipdomicilioscid::where('unique_id', '=', $incomingCallHangup->unique_id)->first();\n Sipdomicilioscid::find($sipdomicilio->id)->update(array('estado_id' => 203)); // Actualizamos Registro\n\n Asteriskcid::destroy($incomingCallHangup->id); // Borramos Registro\n return array('hangup'=>true,\n 'idTab'=> $sipdomicilio->id,\n 'msg' => 'LLAMADA COLGADA');\n }", "title": "" }, { "docid": "4f637d53f9e3ce01b294d5fa1052ba90", "score": "0.47163916", "text": "function streetNumberManipulation ()\n {\n $strtNrId = $this->strNrXists();\n // The order is not the default one.\n if (! $this->checkDefaultOrder()) {\n // Add the streetnumber if it doesn't exist.\n if ($strtNrId == 0) {\n $this->insertStreetnumber($this->getOrderByName('zip') + 1);\n echo '<p>' .\n JText::_('COM_PRO6PP_SCRIPT_ADDED_STREET_FIELD') .\n '</p>';\n }\n // Notify the user for the actions he has to take.\n echo '<p>' .\n JText::_('COM_PRO6PP_SCRIPT_NOTIFY_USER_ACTIONS') . '</p>';\n echo '<p>' .\n JText::_('COM_PRO6PP_SCRIPT_USER_ACTIONS_SUGGESTION') .\n '</p>';\n // Installation finishes here because the ordering of the form\n // fields in the DB is not the default.\n echo '<p>' .\n JText::_('COM_PRO6PP_SCRIPT_SUCCESS') . '</p>';\n return - 1;\n }\n return $strtNrId;\n }", "title": "" }, { "docid": "4756a3c1622c1a28f30a8a54c27657db", "score": "0.47001743", "text": "function createNewNumbers() {\n $possibleLotteryNumbers = array(1,2,3,4,5,6,7,8,9,0);\n shuffle($possibleLotteryNumbers);\n // take only first 7 elements:\n $newLotteryNumbers = $possibleLotteryNumbers[0];\n for ($i = 1; $i < 7; $i++) {\n $newLotteryNumbers .= \"-\".$possibleLotteryNumbers[$i];\n }\n // save these to the database #########\n}", "title": "" }, { "docid": "f2f7ffc26dffc1eb05b5a3d3d989aff2", "score": "0.46984422", "text": "private function generate_ids()\n {\n }", "title": "" }, { "docid": "fc336b7963db4070d633ef4451f26bff", "score": "0.46957916", "text": "function product_number_order ( $listid, $listnum, $type = \"-\" )\n{\n global $db_config, $db, $module_data;\n $arrayid = explode( \"|\", $listid);\n $arraynum = explode( \"|\", $listnum );\n $i = 0;\n foreach ( $arrayid as $id )\n {\n \tif ($id > 0)\n \t{\n \tif ( empty( $arraynum[$i] ) ) $arraynum[$i] = 0;\n \t$query = \"UPDATE `\" . $db_config['prefix'] . \"_\" . $module_data . \"_rows` SET \n `product_number` = `product_number` \".$type.\" \". intval( $arraynum[$i] ) . \" WHERE `id` =\" . $id . \"\";\n $db->sql_query( $query );\n \t}\n $i++;\n }\n}", "title": "" }, { "docid": "90ed1885f33101b0f84581895b7f0d26", "score": "0.4692874", "text": "private static function auto_insert($_caller)\n\t{\n\t\t$insert_log_items = [];\n\n\t\t// deleted account record of log\n\t\t$insert_log_items['delete_account'] =\n\t\t[\n\t\t\t'logitem_type' => 'users',\n\t\t\t'logitem_caller' => 'delete_account',\n\t\t\t'logitem_title' => 'delete user account',\n\t\t\t'logitem_priority' => 'high'\n\t\t];\n\n\t\t// the account verification sms code\n\t\t$insert_log_items['account_verification_sms'] =\n\t\t[\n\t\t\t'logitem_type' => 'users',\n\t\t\t'logitem_caller' => 'account_verification_sms',\n\t\t\t'logitem_title' => 'verification account by sms',\n\t\t\t'logitem_priority' => 'low'\n\t\t];\n\n\t\tif(isset($insert_log_items[$_caller]))\n\t\t{\n\t\t\t$result = self::insert($insert_log_items[$_caller]);\n\t\t\tif($result)\n\t\t\t{\n\t\t\t\treturn (int) \\lib\\db::insert_id(\\lib\\db::$link);\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "102f61ee788d316a3b50e3bb1fdabcf8", "score": "0.46772346", "text": "public function record_visit($data){\n $this->db->insert('visited_lists', $data);\n return $this->db->insert_id();\n }", "title": "" }, { "docid": "22523542ae2c2c0841b13186ee202be5", "score": "0.46640816", "text": "public function newInvoiceNum(){\n //get last record\n $lastid = Sale::latest()->first();\n $lastInvoiceNum[1]=0;///for first time insert\n if($lastid){\n $lastInvoiceNum = explode('S', $lastid->inv_no); \n } \n //increase 1 with last invoice number\n $increment= $lastInvoiceNum[1]+1; \n \n return date('Ymd').\"S\".$increment;\n }", "title": "" }, { "docid": "83b3c7c598f0d7946117d46400b1cfa1", "score": "0.4662893", "text": "private function registerTelephone() {\n\t\ttry {\n\t\t\tif(!empty($this->contactRow['PhoneCountry1']) && !empty($this->contactRow['PhoneArea1']) && !empty($this->contactRow['PhoneNumber1'])) civicrm_api3('Phone','Create', array('contact_id' => $this->contactIdentifier, 'phone' => \"+\".$this->contactRow['PhoneCountry1'].$this->contactRow['PhoneArea1'].$this->contactRow['PhoneNumber1'], 'location_type_id' => 1, 'is_primary' => 1, 'phone_type_id' => 1));\n\t\t\tif(!empty($this->contactRow['PhoneCountry2']) && !empty($this->contactRow['PhoneArea2']) && !empty($this->contactRow['PhoneNumber2'])) civicrm_api3('Phone','Create', array('contact_id' => $this->contactIdentifier, 'phone' => \"+\".$this->contactRow['PhoneCountry2'].$this->contactRow['PhoneArea2'].$this->contactRow['PhoneNumber2'], 'location_type_id' => 1, 'phone_type_id' => 1));\n\t\t\tif(!empty($this->contactRow['MobileCountry1']) && !empty($this->contactRow['MobileArea1']) && !empty($this->contactRow['MobileNumber1'])) civicrm_api3('Phone','Create', array('contact_id' => $this->contactIdentifier, 'phone' => \"+\".$this->contactRow['MobileCountry1'].$this->contactRow['MobileArea1'].$this->contactRow['MobileNumber1'], 'location_type_id' => 1, 'phone_type_id' => 2));\n\t\t\tif(!empty($this->contactRow['MobileCountry2']) && !empty($this->contactRow['MobileArea2']) && !empty($this->contactRow['MobileNumber2'])) civicrm_api3('Phone','Create', array('contact_id' => $this->contactIdentifier, 'phone' => \"+\".$this->contactRow['MobileCountry2'].$this->contactRow['MobileArea2'].$this->contactRow['MobileNumber2'], 'location_type_id' => 1, 'phone_type_id' => 2));\t\t\n\t\t\tif(!empty($this->contactRow['FaxNumber1'])) civicrm_api3('Phone','Create', array('contact_id' => $this->contactIdentifier, 'phone' => \"+\".$this->contactRow['FaxCountry1'].$this->contactRow['FaxArea1'].$this->contactRow['FaxNumber1'], 'location_type_id' => 1, 'phone_type_id' => 3));\t\t\n\t\t} catch (Exception $e) {\n\t\t\techo \"E-mail registration failed for contact \".$this->contactIdentifier.\"\\r\\n\";\n\t\t\techo $e;\n\t\t}\n\t}", "title": "" }, { "docid": "7d6fa890431e22b07e21dfd110928e83", "score": "0.46561322", "text": "public function saveContactAndNumbers($numbers, $deletedIDs, $number)\n {\n $transaction = $this->getDb()->beginTransaction();\n try\n {\n if($this->isNewRecord){\n $flag = $this->save();\n }else{\n $flag = $this->update(false) === false ? false : true;\n }\n\n if ($flag) {\n if (!empty($deletedIDs)) {\n $number->deleteAll(['id' => $deletedIDs]);\n }\n foreach ($numbers as $entry) {\n $entry->contact_id = $this->id;\n if (!($flag = $entry->save(false))){\n $transaction->rollBack();\n break;\n }\n }\n $transaction->commit();\n }\n }catch(\\Throwable $e) {\n $transaction->rollBack();\n throw $e;\n }\n }", "title": "" }, { "docid": "4ef9a86736826730d77288cfccd8bd41", "score": "0.46529147", "text": "public function insert(array $data) {\n // add a timestamp\n $data['_comm_added'] \t= date('Y-m-d H:i:s');\n $data['_comm_code'] \t= isset($data['_comm_code']) ? $data['_comm_code'] : $this->createReference(); \t\t\n\t\t\n\t\treturn parent::insert($data);\t\t\n }", "title": "" }, { "docid": "4595e0a9d6dbbe4de0068fc412284b93", "score": "0.46521842", "text": "function pnh_process_add_credit()\r\n\t{\r\n\t\t$output = array();\r\n\t\t$user=$this->auth(PNH_ADD_CREDIT);\r\n\t\t$fid_list=$this->input->post(\"fid\");\r\n\t\t$new_credit_list=$this->input->post(\"new_credit\");\r\n\t\t$new_credit_reason=$this->input->post(\"new_credit_reason\");\r\n\t\t\r\n\t\t$total_fids = count($fid_list);\r\n\t\t$affected = 0;\r\n\t\tif($total_fids)\r\n\t\t{\r\n\t\t\t\r\n\t\t\tforeach($fid_list as $fid)\r\n\t\t\t{\r\n\t\t\t\t$is_prepaid_franchise=$this->erpm->is_prepaid_franchise($fid);\r\n\t\t\t\tif($is_prepaid_franchise)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t\r\n\t\t\t\t$f=$this->db->query(\"select credit_limit from pnh_m_franchise_info where franchise_id=?\",$fid)->row_array();\r\n\t\t\t\t$inp=array($fid,$new_credit_list[$fid],$new_credit_list[$fid]+$f['credit_limit'],$new_credit_reason[$fid],$user['userid'],$user['userid'],time());\r\n\t\t\t\t$this->db->query(\"insert into pnh_t_credit_info(franchise_id,credit_added,new_credit_limit,reason,credit_given_by,created_by,created_on) values(?,?,?,?,?,?,?)\",$inp);\r\n\t\t\t\t$this->db->query(\"update pnh_m_franchise_info set credit_limit=? where franchise_id=?\",array($new_credit_list[$fid]+$f['credit_limit'],$fid));\r\n\t\t\t\t$affected += $this->db->affected_rows();\r\n\t\t\t}\r\n\t\t}\r\n\t\techo 1;\r\n\t\tdie();\r\n\t}", "title": "" }, { "docid": "35c7c1fb91fdef1e11b62c9506f1a39d", "score": "0.46478552", "text": "function get_calls()\n\t{\n\t\t// First, get the list of IDs.\n\t\t$query = \"SELECT id from calls where parent_id='$this->id' AND deleted=0\";\n\t\treturn $this->build_related_list($query, new Call());\n\t}", "title": "" }, { "docid": "f383750edec77c2ac9b939c043112b81", "score": "0.46462294", "text": "function contact_friends($message,$phonenums,$clientId,$sender){\n\n\t$numReceivers = determine_receivers($clientId, count($phonenums)); //reset number first\n\tif($numReceivers == 0){\n\t\treturn $inserted = false;\n\t}\n\telse\n\t{\n\t\t$receiversNum = count($phonenums); \n\t\t$sql = \"INSERT INTO `message` (message,noOfReceivers,clientId,sender) VALUES('$message','$receiversNum','$clientId','$sender')\";\n\t\t$result = mysql_query($sql) or (mysql_query(\"ROLLBACK\") and die(mysql_error() . \" - $sql\"));\n\t\t$last_msg_id = mysql_insert_id();\n\t\tif($result){\n\t\t\t$i=0;\n\t\t\twhile($i<count($phonenums)){\n\t\t\t\tsend_msg($clientId, $sender, $phonenums[$i], $message);\n\t\t\t\tmysql_query(\"INSERT INTO `individual_message` (messageId,contactNumber) VALUES('$last_msg_id','$phonenums[$i]')\");\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\tupdate_account($clientId, count($phonenums));\n\t\t\t$inserted=true;\n\t\t}else{\n\t\t\t$inserted=false;\n\t\t}\t\n\t\treturn $inserted;\n\t}\n}", "title": "" }, { "docid": "98b3b1e64ad52c9620d4dffc70092a71", "score": "0.46425566", "text": "function createReferenceNumber(){\n $this->logger->notice('Generating Reference Number....');\n if($this->overrideTransactionReference){\n $this->txref = $this->transactionPrefix;\n }else{\n $this->txref = uniqid($this->transactionPrefix);\n }\n $this->logger->notice('Generated Reference Number....'.$this->txref);\n return $this;\n }", "title": "" }, { "docid": "1b6120656f19d1365af2a775c3add39c", "score": "0.46356174", "text": "public function addNumber($userid, $number)\n {\n\n if ($this->checkNumber($number)) {\n return false;\n }\n\n return Capsule::table('mod_bulutfon_phonenumbers')->insert(\n ['userid' => $userid, 'phonenumber' => $number]\n );\n\n }", "title": "" }, { "docid": "a3f12a9c2c055a49a0e690fb920ffeea", "score": "0.46294796", "text": "function yaz_addinfo($id) {}", "title": "" }, { "docid": "fbb307c19a1b25e2e89c618ed3485fd0", "score": "0.4626145", "text": "public function incrementTransactions($calls = 1)\n {\n if ($calls > 0){\n \n try {\n \n $datetime = date('Y-m-d H:i:s');\n $currentTransactionsConfig = $this->getCurrentTransactionsConfig();\n $currentTransactions = $this->getCurrentTransactions() + $calls;\n \n $currentTransactionsConfig->setConfigValue($currentTransactions)\n ->setUpdatedAt($datetime);\n \n $currentTransactionsConfig->save();\n \n } catch(Exception $e){\n \n Mage::log($e->getMessage(),null,'extensions_store_constantcontact.log');\n return false;\n }\n }\n \n return true;\n }", "title": "" }, { "docid": "c882c6d3988cd89e821e6eb0d266e5c2", "score": "0.46122164", "text": "public function actionAddReferenceNumber()\n\t{\n\t\t$refnumModel=new RefNum('search');\n\t\t$refnumModel->unsetAttributes(); // clear any default values\n\t\t\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t$this->performAjaxValidation($refnumModel);\n\n\t\tif(isset($_POST['RefNum']))\n\t\t{\n\t\t\t$refnumModel->attributes=$_POST['RefNum'];\n\t\t\t$refnumModel->save();\n\t\t\t$refnumModel->unsetAttributes(); // clear any default values\n\t\t}\n\t\t\n\t\tif(isset($_GET['RefNum']))\n\t\t{\n\t\t\t$refnumModel->attributes=$_GET['RefNum'];\n\t\t}\n\t\t\n\t\t$this->render('addreferencenumber',array(\n\t\t\t'refnumModel'=>$refnumModel,\n\t\t));\n\t}", "title": "" }, { "docid": "544393f854412895ab107bcec763eb15", "score": "0.4611256", "text": "public function Create()\n {\n // CREATE PHONE_NUMBER //////////////////////////////////////////// \n $rs = mysql_query(\"INSERT INTO phone_numbers (phone_number1,\n phone_number2,\n \t\t\t\t\t\t\t\t\t\t phone_number_mobile, \n phone_number_toll_free,\n phone_number_fax,\n phone_number_fax_toll_free,\n created_by_id,\n created_date,\n \t\t\t\t\t\t\t\t\t\t modified_by_id,\n modified_date,\n \t\t\t\t\t\t\t\t\t rowguid) VALUES\n\t \t('\" . scrub($this->phone_number1) .\n\t \"','\" . scrub($this->phone_number2) .\n\t \"','\" . scrub($this->phone_number_mobile) . \n\t \"','\" . scrub($this->phone_number_toll_free) .\n\t \"','\" . scrub($this->phone_number_fax) .\n\t \"','\" . scrub($this->phone_number_fax_toll_free) .\n\t \t\t\t\t\t\t\t\t\t\t\t \"','\" . $this->created_by_id .\n\t \"','\" . date(\"Y-m-d H:i:s\") .\n\t \t\t\t\t\t\t\t\t\t\t\t \"','\" . $this->modified_by_id .\n\t \"','\" . date(\"Y-m-d H:i:s\") .\n\t \t\t\t\t\t\t\t\t\t\t\t \"','\" . create_guid() .\"')\");\n \n if (mysql_errno())\n {\n return \"MySQL error \".mysql_errno().\": \".mysql_error().\"\\n<br>When executing:<br>\\n$rs\\n<br>\";\n }\n \n \n $this->phone_number_id = mysql_insert_id();\n \n return mysql_insert_id();\n }", "title": "" }, { "docid": "43dae4a3ea91e754d12ce59b5b3da606", "score": "0.46064413", "text": "public function createOrderNumber()\n {\n $orderNumber = $this->generateOrderNumber();\n $this->orderNumber = $orderNumber;\n }", "title": "" }, { "docid": "63254adb237320fcf4c8c271e2b7a406", "score": "0.46061316", "text": "private function _generateCall(&$call) {\r\n $call[Enum\\CallAttributes::TIME] = $this->_getTime($call);\r\n\r\n if (isset($call[Enum\\CallAttributes::SUB_STACK])) {\r\n $this->_generateSubTree($call[Enum\\CallAttributes::SUB_STACK]);\r\n $time = $this->_getTimeSubStack($call[Enum\\CallAttributes::SUB_STACK]);\r\n $call[Enum\\CallAttributes::TIME_SUB_STACK] = $call[Enum\\CallAttributes::TIME] + $time;\r\n }\r\n }", "title": "" }, { "docid": "3f6282c9a8d0c55df78cea32f28bb0d5", "score": "0.45904922", "text": "function generateFormNumber($number,$batch) {\n\tglobal $datetime,$trailSessionUser;\n\n\t//log this entry into the db\n\tif(!getDetailedTableInfo2(\"vl_forms_clinicalrequest\",\"formNumber='$number' limit 1\",\"id\")) {\n\t\tmysqlquery(\"insert into vl_forms_clinicalrequest \n\t\t\t\t\t\t\t(formNumber,refNumber,created,createdby) \n\t\t\t\t\t\t\tvalues \n\t\t\t\t\t\t\t('$number','$batch','$datetime','$trailSessionUser')\");\n\t} else {\n\t\t//modify\n\t\t$id=0;\n\t\t$id=getDetailedTableInfo2(\"vl_forms_clinicalrequest\",\"formNumber='$number'\",\"id\");\n\t\tlogTableChange(\"vl_forms_clinicalrequest\",\"refNumber\",$id,getDetailedTableInfo2(\"vl_forms_clinicalrequest\",\"id='$id'\",\"refNumber\"),$batch);\n\t\tmysqlquery(\"update vl_forms_clinicalrequest set refNumber='$batch' where id='$id'\");\n\t}\n}", "title": "" }, { "docid": "033c646e37e7de23b9f4a516ab14a721", "score": "0.45893207", "text": "function activecampaign_rules_add_contact($account) {\n activecampaign_contact_id($account);\n}", "title": "" }, { "docid": "a8630a926a931b1f42a6839e38d8c467", "score": "0.45812827", "text": "protected static function bootAddBatchNumber()\n {\n static::creating(function ($model) {\n $model->batch_no = self::generateBatchNumber();\n $model->farm_id = auth()->user()->farm_id;\n });\n\n static::created(function ($batch) {\n for ($count = 0; $count < $batch->number_of_cages; ++$count) {\n Cage::create([\n 'batch_id' => $batch->id,\n 'cage_no' => self::generateCageNumber(),\n ]);\n }\n });\n }", "title": "" }, { "docid": "480ec479e781161e9b5bb0ae652739ec", "score": "0.45775786", "text": "public function run(){\n \t$org_id = DB::table('Organization') \n ->where('org', 'Myanmar Links')\n ->pluck('orgId'); \n \n\t\tDB::table('Member')->insert(array('orgid'=>$org_id, 'member'=>'John'\n , 'address'=>'Bahan', 'phone'=>'112233'));\n\t}", "title": "" }, { "docid": "9f7f0fb91aa89b4895ca19814b4a4a87", "score": "0.45658165", "text": "public function run()\n {\n $numberTypes = [\n ['type' => 'Mobile Number'],\n ['type' => 'Home Number'],\n ['type' => 'Office Number']\n ];\n\n foreach ($numberTypes as $record){\n DB::table('contact_number_type')->insert([\n 'label' => $record['type']\n ]);\n }\n }", "title": "" }, { "docid": "04534feb629e6efbd01954abd049c0cf", "score": "0.45627677", "text": "public function addLots($building, $doors, $complx) \n\t\t{\n\t\t\t\t\t\t$query = $this->db->prepare(\"SELECT lot_id FROM `\" . $this->test_input($complx) . \"_lots` ORDER BY lot_id DESC LIMIT 1;\");\t\n\t\t\t\t\t\t$query->execute();\n\t\t\t\t\t\t// fetch() is the PDO method that gets result row\n\t\t\t\t\t\t $this->lastLot = $query->fetch();\n\t\t\t\t\t\t$sth = $this->db->prepare(\"SELECT bld_id FROM `\" . $this->test_input($complx) . \"_doors` ORDER BY bld_id DESC LIMIT 1;\");\t\n\t\t\t\t\t\t$sth->execute();\n\t\t\t\t\t\t// fetch() is the PDO method that gets result row\n\t\t\t\t\t\t $this->lastId = $sth->fetch();\n\t\t\t\t\t\t\t if ($this->lastLot) { $this->idValue = $this->lastLot->lot_id;} else {$this->idValue = 0;};\n\t\t\t\tforeach ( $building as $key=>$buildings ) \n\t\t\t\t{\t\n\t\t\t\t\t//insert into complex_building building number and doors total\n\t\t\t\t\t$sal = $this->db->prepare(\"INSERT INTO \" . $this->test_input($complx) . \"_lots (`lot_id`, `lot_name`, `lots`) VALUES (:lot_id, :lot_name, :lots);\");\n\t\t\t\t\t$sal->execute(array(\":lot_id\" => ($key + 1 + $this->idValue), \":lot_name\" => $this->test_input($buildings), \":lots\" => $this->test_input($doors[$key])));\n\t\t\t\t\tfor ($door = 1; $door <= $doors[$key]; $door++) \n\t\t\t\t\t\t\t{\t\t\n\n\t\t\t\t\t\t\t\t$sth = $this->db->prepare(\"INSERT INTO \" . $this->test_input($complx) . \"_doors (`bld_id`, `door`, `buildingNumber`) VALUES (:bld_id, :door, :buildingNumber)\");\n\t\t\t\t\t\t\t\t$sth->execute(array(\":bld_id\" => ($key + 2 + $this->lastId->bld_id), \":door\" => $this->test_input($door), \":buildingNumber\" => $this->test_input($buildings)));\n\t\t\t\t\t\t\t}\n\t\n\t\t\t\t}\n\t\t\t\tif(!isset($e))\n\t\t\t\t{\n\t\t\t\t\tprint_r(\"<div class='success'>Successfully inserted lot(s) into the database.</div>\");\n\t\t\t\t}\n\t\t}", "title": "" }, { "docid": "1e0585ec7eabe31ca5bbf06c2b290842", "score": "0.4552068", "text": "public function add($rdn, $info);", "title": "" }, { "docid": "9690d4ea3b807684cb001bc1dbb8470b", "score": "0.45436367", "text": "function add_receiving($date, $method, $ref_no, $memo, $amount, $client_id) { \r\n\t\tglobal $db;\r\n\t\t$query = \"INSERT into receivings(receiving_id, datetime, method, ref_no, memo, amount, client_id, agent_id, store_id) VALUES(NULL, '\".$date.\"', '\".$method.\"', '\".$ref_no.\"', '\".$memo.\"', '\".$amount.\"', '\".$client_id.\"', '\".$_SESSION['user_id'].\"', '\".$_SESSION['store_id'].\"')\";\r\n\t\t$result = $db->query($query) or die($db->error);\r\n\t\treturn $db->insert_id;\r\n\t}", "title": "" }, { "docid": "b82bd423fafa134ca8e13ea04329cd0f", "score": "0.45431727", "text": "function addInvoiceNumbers($checks=array(),$cost=array(),$invoice_number,$is_tax=0,$invoice_date=''){\n\t\tglobal $db,$LEVEL;\n\t\t\n\t\tif(count($checks)==0){\n\t\t\t\n\t\t\techo \"Please select checks first ! \"; \n\t\t\texit;\n\t\t}else if($invoice_number==\"\"){\n\t\t\t\n\t\t\techo \"Please type invoice number ! \"; \n\t\t\texit;\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\t$selInv = $db->select('ver_checks','as_id',\" invoice_number='\".$invoice_number.\"'\");\n\t\t\t//echo \"select count(as_id) from ver_checks where invoice_number='\".$invoice_number.\"'\";\n\t\t\t\n\t\t\tif(mysql_num_rows($selInv)>0){\n\t\t\techo \"This invoice number '\".$invoice_number.\"' already exists ! \"; \n\t\t\texit;\t\n\t\t\t}else{\n\t\t\t$qr = ($invoice_date=='')?\"invoiced_date=CURRENT_TIMESTAMP , \":\"invoiced_date='$invoice_date', \";\n\t\t\t\n\t\t\tforeach ($checks as $check){\n\t\t\t\t\n\t\t\t\t$where = \"as_id=\".$check;\t\t\t\t\n\t\t\t\t$values=\"invoiced=1,invoice_number='\".$invoice_number.\"', check_cost='\".$cost[$check].\"', $qr \n\t\t\t\tis_tax=\".$is_tax.\", tax='\".getTax().\"'\";\n\t\t\t\t//echo \"update ver_checks set $values where $where\".\"<br>\"; \n\t\t\t\t$updated = $db->update($values,\"ver_checks\",$where);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\techo \"success\"; \n\t\t\texit;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "ae640edfc0f241170cc8cb33a07a4ef7", "score": "0.45387256", "text": "function convertCallToNumber( $call ) {\n\t\t$arr = preg_split( \"/[+]/\", trim( $call ) );\n\t\tif( $arr[0] + $arr[1] == 0 ) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn $arr[0] + $arr[1];\n\t\t}\n\t}", "title": "" }, { "docid": "0d7c03295dcddfda359e3c0dcb594d62", "score": "0.45358998", "text": "function addNumber($name) {\n\n $field = (new Fields\\Number($name));\n return $this->addField($field);\n\n }", "title": "" }, { "docid": "cda92a0eaaa2e010497eb84047ce42a2", "score": "0.4534831", "text": "function addViewPlanCounter($pid)\n{\n $plans = DatabaseHandler::GetRow(\"SELECT * FROM `plans` WHERE `id` = \" . $pid . \" ;\");\n if($plans)\n {\n $plans['view'] = $plans['view'] + 1;\n DatabaseHandler::Execute(\"UPDATE `plans` SET `view` = \" . $plans['view'] . \" WHERE `plans`.`id` = \" . $pid);\n }\n}", "title": "" }, { "docid": "abd0b713b7fae18319943e4ebf54a478", "score": "0.45326895", "text": "public function addNumber($userid,$number)\n {\n\n if($this->checkNumber($number)) return false;\n\n $phone = ORM::for_table('mod_bulutfon_phonenumbers')->create();\n\n $phone->userid = $userid;\n\n $phone->phonenumber = $number;\n\n $phone->save();\n\n if($phone->id()) return true;\n\n return false;\n\n }", "title": "" }, { "docid": "8076c122c1f77e41d10f08263d562623", "score": "0.45296922", "text": "function add(){\n\t\t\t$this->insertData($this->getTblIcd10(),$this->getArrayDatas());\n\t}", "title": "" }, { "docid": "01a688fe29c1c742cc5abaf40f8c483f", "score": "0.4529556", "text": "public function createBatch($common_text = \"201404007 David Asencio\"){\n for ($i = 1; $i <= 10; $i++) { \n $contact_name = \"$common_text $i\";\n echo \"Creating contact -> $contact_name\\n\";\n $this->create($contact_name);\n } // for\n }", "title": "" }, { "docid": "e6cc6fc336704044564a966193f12dac", "score": "0.45127168", "text": "private function setTotalPhoneLeads()\n {\n // Desktop\n $this->analyticsArray['desktop']['total']['calls'] = $this->analyticsArray['desktop']['search']['calls'] + $this->analyticsArray['desktop']['display']['calls'] + $this->analyticsArray['desktop']['video']['calls'];\n // Mobile\n $this->analyticsArray['mobile']['total']['calls'] = $this->analyticsArray['mobile']['search']['calls'] + $this->analyticsArray['mobile']['display']['calls'] + $this->analyticsArray['mobile']['video']['calls'];\n }", "title": "" }, { "docid": "54159f654c06d628c43b50851bb04ebe", "score": "0.451118", "text": "public function updateAvailableMentalNumbers(){\n\t\t$availableMentalNumbers=[];\n\t\t$this->logger->info(\"updating mentally available numbers\");\n\t\t$this->logger->info(\"this is done on the basis of direct availables numbers\");\n\t\t$this->logger->info($this->availableNumbers);\n\t\t$doublons=perm($this->availableNumbers,2);\n\t\t$alreadySeen=$this->availableNumbers; // Numbers already computed or defined in the problem cannot be produced by mental calculation \n\t\tforeach($doublons as $doublon){\n\t\t\tsort($doublon);\n\t\t\tif($doublon[0]!=$doublon[1]){ // 42-42 and 42+42 are avoided\n\t\t\t\t//TODO: This must be a function instead of a repetition for bloc moins\n\t\t\t\t$n_moins=strval(intval($doublon[1])-intval($doublon[0])); //$doublon[1] always bigger because of sort\n\t\t\t\t$n_plus=strval(intval($doublon[1])+intval($doublon[0]));\n\t\t\t\t$blocPlus=[\"formula\"=>$doublon[1].' + '.$doublon[0],\"str\"=>$doublon[1].' + '.$doublon[0].' = '.$n_plus];\n\t\t\t\t$blocMoins=[\"formula\"=>$doublon[1].' - '.$doublon[0],\"str\"=>$doublon[1].' - '.$doublon[0].' = '.$n_moins];\n\t\t\t\t$alreadyAdded=False;\n\t\t\t\tif(in_array($n_plus,array_keys($availableMentalNumbers))){\n\t\t\t\t\tforeach($availableMentalNumbers[$n_plus] as $bloc){\n\t\t\t\t\t\tif(serialize($bloc)==serialize($blocPlus)){\n\t\t\t\t\t\t\t$alreadyAdded=True;\n\t\t\t\t\t\t\tbreak;\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}\n\t\t\t\t\tif($alreadyAdded==False){\n\t\t\t\t\t\t$availableMentalNumbers[$n_plus][]=$blocPlus;\t\t\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t$alreadyAdded=False;\n\t\t\t\tif(in_array($n_moins,array_keys($availableMentalNumbers))){\n\t\t\t\t\tforeach($availableMentalNumbers[$n_moins] as $bloc){\n\t\t\t\t\t\tif(serialize($bloc)==serialize($blocMoins)){\n\t\t\t\t\t\t\t$alreadyAdded=True;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\tif($alreadyAdded==False){\n\t\t\t\t\t\t$availableMentalNumbers[$n_moins][]=$blocMoins;\t\t\t\n\t\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\t$this->logger->info(\"availableMentalNumbers :\");\n\t\t$this->logger->info(array_keys($availableMentalNumbers));\n\t\t/*$this->logger->trace(\"availableMentalNumbers : détails\");// to uncomment whenever there is a way to read log file with filter trace\n\t\t$this->logger->trace($availableMentalNumbers);*/\n\t\t$this->availableMentalNumbers=$availableMentalNumbers;\t\n\t}", "title": "" }, { "docid": "b68d32998a3ac078f30908dbf4155726", "score": "0.45108646", "text": "function add($index, $number) {\n }", "title": "" }, { "docid": "881acd6b257a08e9a872f4e25eb4306a", "score": "0.45101926", "text": "function contact_individual($message,$phone,$clientId,$sender){\n\t\n\t$numReceivers = determine_receivers($clientId, 1); //reset number first\n\tif($numReceivers == 0){\n\t\treturn $inserted = false;\n\t}else{\n\t\t\n\t\t$sql = \"INSERT INTO `message` (message,noOfReceivers,clientId,sender) VALUES('$message','1','$clientId','$sender')\";\n\t\t$result = mysql_query($sql) or (mysql_query(\"ROLLBACK\") and die(mysql_error() . \" - $sql\"));\n\t\t$last_msg_id = mysql_insert_id();\n\t\tif($result){\n\t\t\tsend_msg($clientId, $sender, $phone, $message);\n\t\t\tmysql_query(\"INSERT INTO `individual_message` (messageId,contactNumber) VALUES('$last_msg_id','$phone')\");\t\t\t\n\t\t\tupdate_account($clientId, 1);\n\t\t\t$inserted=true;\n\t\t}else{\n\t\t\t$inserted=false;\n\t\t}\n\t\t\t\n\t\treturn $inserted;\n\t}\n}", "title": "" }, { "docid": "5b0b58f9c64a5e379bf561284cf53c33", "score": "0.451016", "text": "function initPidList () {\n\t\t// pid_list is the pid/list of pids from where to fetch the news items.\n\t\t$pid_list = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'pages', 'sDEF');\n\t\t$pid_list = $pid_list?$pid_list:\n\t\ttrim($this->cObj->stdWrap($this->conf['pid_list'], $this->conf['pid_list.']));\n\t\t$pid_list = $pid_list ? implode(t3lib_div::intExplode(',', $pid_list), ','):\n\t\t$GLOBALS['TSFE']->id;\n\n\t\t$recursive = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'recursive', 'sDEF');\n\t\t$recursive = is_numeric($recursive)?$recursive:\n\t\t$this->cObj->stdWrap($this->conf['recursive'], $this->conf['recursive.']);\n\t\t// extend the pid_list by recursive levels\n\t\t$this->pid_list = $this->pi_getPidList($pid_list, $recursive);\n\t\t$this->pid_list = $this->pid_list?$this->pid_list:0;\n\t\t// generate array of page titles\n\t\t$this->generatePageArray();\n\t}", "title": "" }, { "docid": "050d24a8b87b26b45975637d3614ab7a", "score": "0.44987398", "text": "function approvedCreditNum($cr, $credit_id)\n{\n\t\n\t// Insert into CommerceHub Stuff\n\t$sql = \"SELECT `ch_order`.`id` FROM `ch_order` WHERE `po` IN (SELECT `po` FROM `BoL_forms` WHERE `id` = '\".$cr.\"')\";\n\t$query = mysql_query($sql);\n\tcheckDBerror($sql);\n\tif (mysql_num_rows($query)) {\n\t\t$sql = 'INSERT INTO `ch_bolqueue` (`bol_id`, `processed`) VALUES (\"'.$cr.'\",0);';\n\t\tmysql_query($sql);\n\t\tcheckDBerror($sql);\n\t}\n}", "title": "" }, { "docid": "05106a416641311755d96de334376b51", "score": "0.44929102", "text": "public static function getNidsFromNumber($number){\n //Replace + signs with 2 zeroes\n\t $number = str_replace('+','00', $number);\n\t //Replace any blanks minuses underscores...\n\t $number = str_replace(array(' ','-','.','/','(',')'), '', $number);\n $nids = module_invoke_all('get_voip_numbers', $number, 'nids');\n return $nids;\n }", "title": "" }, { "docid": "cc332be937d816cc8bb4ebb667632880", "score": "0.44928375", "text": "protected function _insert() {\n $name = $this->name;\n $identifier = $this->getIdentifier($name);\n $this->identifier = $identifier;\n }", "title": "" }, { "docid": "95583ee1df4c553b7d62808a38f2976c", "score": "0.44857466", "text": "function dbase_add_record($identifier, $data) {}", "title": "" }, { "docid": "1ebf494cbba3df5b0b3fe73793a60e41", "score": "0.44831178", "text": "protected function setAutoIncrementInfo()\n {\n }", "title": "" }, { "docid": "2983a4e86b878a9bee847f5d8a94946e", "score": "0.44803503", "text": "private function removeCallNumbers($db, $identificationid, array $callnumbers)\n {\n \tforeach ($callnumbers as $callnumber)\n \t{\n \t\t$callnumber = $this->getAdapter()->quote($callnumber);\n \t\t$db->delete('CallNumbers', 'IdentificationID=' . $identificationid . ' AND CallNumber=' . $callnumber);\n \t}\n }", "title": "" }, { "docid": "f519d2db72a4d9c727305016af30e736", "score": "0.4466787", "text": "public function run()\n {\n DB::table('package2excursion')->insert([\n 'fk_package' => 1,\n 'fk_excursion' => 1,\n ]);\n DB::table('package2excursion')->insert([\n 'fk_package' => 2,\n 'fk_excursion' => 2,\n ]); \n }", "title": "" }, { "docid": "50978dbdbb93dad438c44e8dc95ffb1e", "score": "0.44642764", "text": "function add_line($name, $number)\r\n {\r\n if($this->phone_system->line_exists($name))\r\n {\r\n return(\"Error. That line already exists.\");\r\n }\r\n else\r\n {\r\n return $this->phone_system->add_line($name, $number);\r\n }\r\n }", "title": "" }, { "docid": "d202346091bd83d3a0c4d67a67f5ddc1", "score": "0.44606674", "text": "function printOnCallNotifications($on_call_name, $start, $end, $oncall_start, $oncall_end) {\n global $nagios_state_to_badge, $nagios_alert_tags;\n\n # Non timezone version to store the data\n $range_start = $start;\n $range_end = $end;\n\n // Call the correct provider\n $oncall_config = getTeamConfig('oncall');\n if (!$oncall_config) {\n return '<div class=\"alert alert-error\">Something terrible has happened. This team doesn\\'t have on call enabled!</div>';\n }\n\n $provider_name = $oncall_config['provider'];\n logline(\"printOnCallNotifications has started, looking for provider {$provider_name}. \");\n\n // Get the global configuration for the provider\n $provider_config = getOnCallProvider($provider_name);\n $provider_global_options = $provider_config['options'];\n\n // Get the per team options for the provider\n $provider_team_options = getTeamOnCallConfig('provider_options');\n\n // Hopefully the user entered a valid oncall provider name...\n if (!$provider_config) {\n return '<div class=\"alert alert-error\">Something terrible has happened. We cannot find an on-call provider named \"'. $provider_name .'\"</div>';\n }\n\n\n logline(\"printOnCallNotifications is loading {$provider_config['lib']}\");\n // Load the provider specified.\n include_once \"{$provider_config['lib']}\";\n\n logline(\"Firing getOnCallNotificationsFromDb to get events stored in the database for the period...\");\n $notifications_from_db = getOnCallNotificationsFromDb($oncall_start, $oncall_end);\n if (empty($notifications_from_db)) {\n logline(\"getOnCallNotificationsFromDb returned an empty array! The oncall provider may have events...\");\n } else {\n logline(\"getOnCallNotificationsFromDb returned an array containing \". count($notifications_from_db) . \" notifications\");\n // Find the most recent event in the database and return its timestamp.\n // We'll use this as the start timestamp for querying the oncall provider.\n $most_recent_db_event_timestamp = getMostRecentEventTimestampFromDb($oncall_start, $oncall_end);\n logline(\"Most recent event timestamp from the database: {$most_recent_db_event_timestamp}\");\n $oncall_start = $most_recent_db_event_timestamp;\n }\n\n logline(\"Firing getOnCallNotifications...\");\n // And now ask for the notifications\n $notifications_from_provider = getOnCallNotifications($on_call_name, $provider_global_options, $provider_team_options, $oncall_start, $oncall_end);\n\n if (empty($notifications_from_provider)) {\n logline(\"getOnCallNotifications returned an empty array! Continuing with the events stored in the database.\");\n $notifications = $notifications_from_db;\n } else {\n logline(\"getOnCallNotifications returned an array containing \". count($notifications_from_provider) . \" notifications\");\n if (empty($notifications_from_db)) {\n // This is probably the first time the on-call engineer started writing the report so nothing is stored in the database.\n $notifications = $notifications_from_provider;\n } else {\n // Merge the results from the database into what we've received from our oncall provider.\n logline(\"Merging the database results with the provider results.\");\n $notifications = array_merge($notifications_from_provider, $notifications_from_db);\n }\n }\n\n // Data collection complete. Time to render the form items for report submission. \n\n // First, we populate the field with the on call ranges so the report is saved with the correct timestamp\n $html = \"<input type='hidden' name='oncall[range_start]' value='{$range_start}'>\";\n $html .= \"<input type='hidden' name='oncall[range_end]' value='{$range_end}'>\";\n // Add some javascript so we can toggle hidden events.\n $html .= \"<script type='text/javascript'>\";\n $html .= \" function toggleHiddenEvents() {\";\n $html .= \" var events = document.getElementsByClassName('hiddenEvent');\";\n $html .= \" for (var i=0; i < events.length; i++) {\";\n $html .= \" events[i].style.display = events[i].style.display == 'none' ? '' : 'none';\";\n $html .= \" }\";\n $html .= \" }\";\n $html .= \"</script>\";\n // Allow the user to display/hide hidden events.\n $html .= \"<button class='btn btn-primary pull-right' type='button' onclick='toggleHiddenEvents()'>Toggle Hidden Events</button><br><br>\";\n\n $timezone = getTimezoneSetting();\n date_default_timezone_set($timezone);\n $n_num = 0;\n $n_total = count($notifications);\n $timesaver = false;\n\n if ($n_total >= 1) {\n foreach ($notifications as $n) {\n # Add a row that lets the user potentially stop halfway and come back later\n if ($n_num >= ($n_total / 2) && !$timesaver) {\n $timesaver = true;\n $html .= \"<tr><td colspan='7'><div class='well'><b>Hey!</b> You made it halfway. If you want you can save up to here and continue later.\";\n $html .= \"<button class='btn btn-primary pull-right' type='submit'>Save draft</button></div></td></tr>\";\n }\n\n // Determine if we need to display a checked box for a hidden event.\n $hide_checked = $n['hide_event'] ? \"checked\" : \"\";\n\n $pretty_date = date(\"D d M H:i:s T\", $n['time']);\n if ($n['hide_event']) {\n $html .= \"<tr class='hiddenEvent' style='display:none'>\";\n } else {\n $html .= \"<tr>\";\n }\n $html .= \"<td>{$pretty_date}</td><td>{$n['hostname']}</td><td>{$n['service']}</td><td><pre><small>{$n['output']}</small></pre></td>\";\n $html .= \"<td><span class='label label-{$nagios_state_to_badge[$n['state']]}'>{$n['state']}</span></td>\";\n\n # Need to populate all the information into hidden fields so we get all the data back nicely when the form is submitted\n $html .= \"<input type='hidden' name='oncall[notifications][not_{$n_num}][hostname]' value='{$n['hostname']}'>\";\n $html .= \"<input type='hidden' name='oncall[notifications][not_{$n_num}][output]' value='{$n['output']}'>\";\n $html .= \"<input type='hidden' name='oncall[notifications][not_{$n_num}][time]' value='{$n['time']}'>\";\n $html .= \"<input type='hidden' name='oncall[notifications][not_{$n_num}][state]' value='{$n['state']}'>\";\n $html .= \"<input type='hidden' name='oncall[notifications][not_{$n_num}][service]' value='{$n['service']}'>\";\n if ($n['id']) {\n $html .= \"<input type='hidden' name='oncall[notifications][not_{$n_num}][id]' value='{$n['id']}'>\";\n }\n $html .= \"<td><input class='bulk-check' data-num='{$n_num}' type='checkbox'></td>\";\n $html .= \"<td><input class='hide-check' data-num='{$n_num}' name='oncall[notifications][not_{$n_num}][hide_event]' type='checkbox' {$hide_checked}></td>\";\n $html .= \"</tr>\";\n if ($n['hide_event']) {\n $html .= \"<tr class='hiddenEvent' style='display:none'>\";\n } else {\n $html .= \"<tr>\";\n }\n $html .= \"<td colspan='2'>\";\n # Dropdown that lets the user choose a tag for the alert\n $html .= \"<select name='oncall[notifications][not_{$n_num}][tag]' class='input-xlarge'>\";\n foreach ($nagios_alert_tags as $tag => $tag_name) {\n //$selected = ($tag == $previous_tag) ? \" selected\" : \"\";\n $selected = ($tag == $n['tag']) ? \" selected\" : \"\";\n $html .= \"<option value='{$tag}'{$selected}>{$tag_name}</option>\";\n }\n $html .= \"</select></td>\";\n $html .= \"<td colspan='5'><div class='control-group'><label class='control-label'><b>Notes:</b> </label>\n <div class='controls'><input type='text' name='oncall[notifications][not_{$n_num}][notes]' class='input-xxlarge' placeholder='Notes' value='{$n['notes']}'></div></div></td>\";\n $html .= \"</tr>\";\n $n_num++;\n }\n }\n date_default_timezone_set(\"UTC\");\n\n return $html; \n}", "title": "" }, { "docid": "53a0c38e1fb8e9119b5ba6bd762f7400", "score": "0.44549626", "text": "public function addToCalls(\\Calcinai\\Siri\\Objects\\AffectedCallStructureType $call)\n {\n $this->calls[] = $call;\n return $this;\n }", "title": "" }, { "docid": "5c88f2c834bb2f194daafe3b084b9f4a", "score": "0.445297", "text": "public function addRelationsFromRelatedModuleViewId(App\\Request $request)\n\t{\n\t\t$sourceRecordId = $request->getInteger('sourceRecord');\n\t\t$relatedModuleName = $request->getByType('relatedModule', 2);\n\t\t$currentUserPriviligesModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();\n\t\tif (!$currentUserPriviligesModel->hasModulePermission($relatedModuleName)) {\n\t\t\tthrow new \\App\\Exceptions\\NoPermitted('LBL_PERMISSION_DENIED', 406);\n\t\t}\n\t\t$viewId = $request->getByType('viewId', 2);\n\t\t$response = new Vtiger_Response();\n\t\tif ($viewId) {\n\t\t\t$sourceModuleModel = Vtiger_Module_Model::getInstance($request->getModule());\n\t\t\t$relatedModuleModel = Vtiger_Module_Model::getInstance($relatedModuleName);\n\t\t\t$relationModel = Vtiger_Relation_Model::getInstance($sourceModuleModel, $relatedModuleModel);\n\t\t\tif (\\in_array($relatedModuleName, ['Accounts', 'Leads', 'Vendors', 'Contacts', 'Partners', 'Competition'])) {\n\t\t\t\t$queryGenerator = new App\\QueryGenerator($relatedModuleName);\n\t\t\t\t$queryGenerator->initForCustomViewById($viewId);\n\t\t\t\t$dataReader = $queryGenerator->createQuery()->createCommand()->query();\n\t\t\t\twhile ($row = $dataReader->read()) {\n\t\t\t\t\t$relatedRecordIdsList[] = $row['id'];\n\t\t\t\t}\n\t\t\t\t$dataReader->close();\n\t\t\t\tif (empty($relatedRecordIdsList)) {\n\t\t\t\t\t$response->setResult(false);\n\t\t\t\t} else {\n\t\t\t\t\tforeach ($relatedRecordIdsList as $relatedRecordId) {\n\t\t\t\t\t\t$relationModel->addRelation($sourceRecordId, $relatedRecordId);\n\t\t\t\t\t}\n\t\t\t\t\t$response->setResult(true);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$response->setResult(false);\n\t\t\t}\n\t\t} else {\n\t\t\t$response->setResult(false);\n\t\t}\n\t\t$response->emit();\n\t}", "title": "" }, { "docid": "80fdab208ee33ea92746000ba23ce85b", "score": "0.44370407", "text": "public function addLine(){\r\n\t\t$args = func_get_args();\r\n\t\t$this->lineId[] = $args[0];\r\n for( $i=1, $n=count($args); $i<$n; $i++ )\r\n $this->line[] = $args[$i];\r\n\t}", "title": "" }, { "docid": "9263cbbcbfc7de9c0ffc22aa7a50fbcb", "score": "0.44258383", "text": "function contact_group($group, $message,$numReceivers,$clientId,$sender){\n\t\n\t$numReceivers = determine_receivers($clientId, $numReceivers); //reset number first\n\t\n\tif($numReceivers == 0){\n\t\treturn $inserted = false;\n\t}else{\n\t\t$sql = \"INSERT INTO `message` (message,noOfReceivers,clientId,sender) VALUES('$message','$numReceivers','$clientId','$sender')\";\n\t\t$result = mysql_query($sql) or (mysql_query(\"ROLLBACK\") and die(mysql_error() . \" - $sql\"));\n\t\t$last_msg_id = mysql_insert_id();\n\t\tif($result){\n\t\t\tmysql_query(\"INSERT INTO `group_message` (messageId,groupId) VALUES('$last_msg_id','$group')\");\n\t\t\tupdate_account($clientId, $numReceivers);\n\t\t\t$i=0;\n\t\t\t$numbers = get_groupContacts($group); //store numbers in an array\n\t\t\t\n\t\t\twhile($i<count($numReceivers)){ //cut down the number of receivers\n\t\t\t\tsend_msg($clientId, $sender, $numbers[$i], $message);\n\t\t\t\tmysql_query(\"INSERT INTO `individual_message` (messageId,contactNumber) VALUES('$last_msg_id','$numbers[$i]')\");\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$inserted=true;\n\t\t}else{\n\t\t\t$inserted=false;\n\t\t}\n\t\treturn $inserted;\n\t}\n}", "title": "" }, { "docid": "e73daee31f07716d0d7ff200d36db5aa", "score": "0.44217178", "text": "function insertInstIntoIDs($a_inst, $a_res_ref_to_obj_id = true)\n\t{\n\t\t// insert inst id into internal links\n\t\t$xpc = xpath_new_context($this->dom);\n\t\t$path = \"//IntLink\";\n\t\t$res =& xpath_eval($xpc, $path);\n\t\tfor($i = 0; $i < count($res->nodeset); $i++)\n\t\t{\n\t\t\t$target = $res->nodeset[$i]->get_attribute(\"Target\");\n\t\t\t$type = $res->nodeset[$i]->get_attribute(\"Type\");\n\n\t\t\tif (substr($target, 0, 4) == \"il__\")\n\t\t\t{\n\t\t\t\t$id = substr($target, 4, strlen($target) - 4);\n\t\t\t\t\n\t\t\t\t// convert repository links obj_<ref_id> to <type>_<obj_id>\n\t\t\t\t// this leads to bug 6685.\n\t\t\t\tif ($a_res_ref_to_obj_id && $type == \"RepositoryItem\")\n\t\t\t\t{\n\t\t\t\t\t$id_arr = explode(\"_\", $id);\n\t\t\t\t\t\n\t\t\t\t\t// changed due to bug 6685\n\t\t\t\t\t$ref_id = $id_arr[1];\n\t\t\t\t\t$obj_id = ilObject::_lookupObjId($id_arr[1]);\n\t\t\t\t\t\n\t\t\t\t\t$otype = ilObject::_lookupType($obj_id);\n\t\t\t\t\tif ($obj_id > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t// changed due to bug 6685\n\t\t\t\t\t\t// the ref_id should be used, if the content is\n\t\t\t\t\t\t// imported on the same installation\n\t\t\t\t\t\t// the obj_id should be used, if a different\n\t\t\t\t\t\t// installation imports, but has an import_id for\n\t\t\t\t\t\t// the object id.\n\t\t\t\t\t\t$id = $otype.\"_\".$obj_id.\"_\".$ref_id;\n\t\t\t\t\t\t//$id = $otype.\"_\".$ref_id;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$new_target = \"il_\".$a_inst.\"_\".$id;\n\t\t\t\t$res->nodeset[$i]->set_attribute(\"Target\", $new_target);\n\t\t\t}\n\t\t}\n\t\tunset($xpc);\n\n\t\t// @todo: move to media/fileitems/questions, ...\n\t\t\n\t\t// insert inst id into media aliases\n\t\t$xpc = xpath_new_context($this->dom);\n\t\t$path = \"//MediaAlias\";\n\t\t$res =& xpath_eval($xpc, $path);\n\t\tfor($i = 0; $i < count($res->nodeset); $i++)\n\t\t{\n\t\t\t$origin_id = $res->nodeset[$i]->get_attribute(\"OriginId\");\n\t\t\tif (substr($origin_id, 0, 4) == \"il__\")\n\t\t\t{\n\t\t\t\t$new_id = \"il_\".$a_inst.\"_\".substr($origin_id, 4, strlen($origin_id) - 4);\n\t\t\t\t$res->nodeset[$i]->set_attribute(\"OriginId\", $new_id);\n\t\t\t}\n\t\t}\n\t\tunset($xpc);\n\n\t\t// insert inst id file item identifier entries\n\t\t$xpc = xpath_new_context($this->dom);\n\t\t$path = \"//FileItem/Identifier\";\n\t\t$res =& xpath_eval($xpc, $path);\n\t\tfor($i = 0; $i < count($res->nodeset); $i++)\n\t\t{\n\t\t\t$origin_id = $res->nodeset[$i]->get_attribute(\"Entry\");\n\t\t\tif (substr($origin_id, 0, 4) == \"il__\")\n\t\t\t{\n\t\t\t\t$new_id = \"il_\".$a_inst.\"_\".substr($origin_id, 4, strlen($origin_id) - 4);\n\t\t\t\t$res->nodeset[$i]->set_attribute(\"Entry\", $new_id);\n\t\t\t}\n\t\t}\n\t\tunset($xpc);\n\t\t\n\t\t// insert inst id into question references\n\t\t$xpc = xpath_new_context($this->dom);\n\t\t$path = \"//Question\";\n\t\t$res =& xpath_eval($xpc, $path);\n\t\tfor($i = 0; $i < count($res->nodeset); $i++)\n\t\t{\n\t\t\t$qref = $res->nodeset[$i]->get_attribute(\"QRef\");\n//echo \"<br>setted:\".$qref;\n\t\t\tif (substr($qref, 0, 4) == \"il__\")\n\t\t\t{\n\t\t\t\t$new_id = \"il_\".$a_inst.\"_\".substr($qref, 4, strlen($qref) - 4);\n//echo \"<br>setting:\".$new_id;\n\t\t\t\t$res->nodeset[$i]->set_attribute(\"QRef\", $new_id);\n\t\t\t}\n\t\t}\n\t\tunset($xpc);\n\n\t}", "title": "" }, { "docid": "97341366df78c25321eba25f9b301ae5", "score": "0.44192874", "text": "private function updateOrderNumber() {\n\n \t// _child_count is a custom meta field that shows whether it is a parent or not\n \t$child_count = get_post_meta( $this->original_order_id, '_child_count', true );\n\t\t\n\t\t// Check if the original order is parent & if the original order is child\n\t\t\n\t\tif ( empty( $child_count ) ) {\t\n\n\t\t\t// If the original order is not parent\n\t\t\t\n\t\t\t// _parent_id is a custom meta field that shows whether it is child order or not\n\t\t\t$parent_id = get_post_meta( $this->original_order_id, '_parent_id', true );\n\n\t\t\tif ( empty( $parent_id ) ) {\n\n\t\t\t\t// If the original order is not child\n\n\t\t\t\t// Change original order to parent by adding custom field \"_child_count\"\n\t\t\t\tupdate_post_meta( $this->original_order_id, '_child_count', '2' );\n\t\t\t\t// Change original order's \"_order_number\" to XXX-1\n\t\t\t\tupdate_post_meta( $this->original_order_id, '_order_number', $this->original_order_id . \"-1\" );\n\n\t\t\t\t// Change new order's \"_order_number\" to XXX-2\n\t\t\t\tupdate_post_meta( $this->newOrderID, '_order_number', $this->original_order_id . \"-2\" );\n\t\t\t\t// Change new order to child by adding custom field \"_parent_id\"\n\t\t\t\tupdate_post_meta( $this->newOrderID, '_parent_id', $this->original_order_id );\n\t\t\t} \n\t\t\telse {\n\n\t\t\t\t// If the original order is child\n\n\t\t\t\t// Get order number index from parent id\n\t\t\t\t$child_count = get_post_meta( $parent_id, '_child_count', true );\n\n\t\t\t\t// Update parent order's child count for next child's order number\n\t\t\t\tupdate_post_meta( $parent_id, '_child_count', $child_count + 1 );\n\n\t\t\t\t// Set current order's _order_number \n\t\t\t\tupdate_post_meta( $this->newOrderID, '_order_number', $parent_id . '-' . ( $child_count + 1 ) );\n\t\t\t}\n\t\t}\n\t\telse {\n\n\t\t\t// If the order is primary\n\n // Increase primary order's _child_count value for next child order\n\t\t\tupdate_post_meta( $this->original_order_id, '_child_count', $child_count + 1 );\n\n // Set new order's _order_number to parent_id - child_count+1\n\t\t\tupdate_post_meta( $this->newOrderID, '_order_number', $this->original_order_id . '-' . ( $child_count + 1 ) );\n // Set new order's _parent_id to primary's id\n\t\t\tupdate_post_meta( $this->newOrderID, '_parent_id', $this->original_order_id );\n // As new order has all meta fields same as primary order, it has _child_count. So it should remove it.\n\t\t\tdelete_post_meta( $this->newOrderID, '_child_count' );\n\t\t}\n\n \treturn true;\n }", "title": "" }, { "docid": "3abbd77ca133ba97c5926c5f5b6e87fa", "score": "0.4416037", "text": "public static function populate_target_ids(){\n foreach(Process_Data::$target_ids as $id){\n Process_Data::$target_table_object[$id]['target_id'] = $id;\n }\n }", "title": "" }, { "docid": "ec1f858aa3af031927e1aba7022dd60a", "score": "0.44153905", "text": "public function call($number)\n\t {\n\t //TODO Implement this method\n\t }", "title": "" }, { "docid": "85a18bcc534d561eb7435965ddfd1367", "score": "0.4409297", "text": "public function run()\n {\n Number::create([\n 'number' => '447403936678',\n 'user_id' => 1,\n ]);\n }", "title": "" }, { "docid": "0d4a05083702042a19466393558479a1", "score": "0.44082594", "text": "public static function logIpnCall($callData) {\n if (self::_getConfig()->isLoggingActive()) {\n array_unshift($callData, Mage::getModel('core/date')->gmtTimestamp());\n $callData['message_xml'] = '';\n if (isset($callData['request_body']) && $callData['request_body']) {\n try {\n $requestBody = Mage::helper('core')->jsonDecode($callData['request_body']);\n if (isset($requestBody['Message'])) {\n $requestBody['Message'] = Mage::helper('core')->jsonDecode($requestBody['Message']);\n if (isset($requestBody['Message']['NotificationData'])) {\n $callData['message_xml'] = $requestBody['Message']['NotificationData'];\n $requestBody['Message']['NotificationData'] = 'see XML message';\n }\n $callData['request_body'] = Mage::helper('core')->jsonEncode($requestBody);\n }\n } catch (Exception $e) {\n Mage::logException($e);\n }\n }\n if (($fileHandle = fopen(self::getAbsoluteLogFilePath('ipn'), 'a')) !== false) {\n fputcsv($fileHandle, $callData, self::_getConfig()->getLogDelimiter(), self::_getConfig()->getLogEnclosure());\n fclose($fileHandle);\n } else {\n Mage::log('PAY WITH AMAZON: unable to open ' . self::getAbsoluteLogFilePath('ipn') . ' for writing.');\n }\n }\n }", "title": "" }, { "docid": "b54bb6cc4b4f743ba14b9172e3734e6b", "score": "0.44008803", "text": "public function add_asn() {\n if ($this->mlogin->get_permission(ASN_ADD)) {\n $asn_type_id = $this->input->get_post('asn_type_id');\n $asn_number = $this->masn->add_asn($asn_type_id);\n\n $history = array('status_id' => ASN_NEW, 'ref_type' => 'asn', 'ref' => $asn_number,\n 'field' => 'asn_number', 'field_id' => $asn_number, 'text' => 'new ASN added');\n $this->mlogin->write_history($history);\n\n echo '{\"asn_number\":\"' . $asn_number . '\",\"message\":\"\" }';\n } else {\n echo '{\"asn_number\":\"\",\"message\":\"Sorry you are not authorized to add ASNs\" }';\n }\n }", "title": "" }, { "docid": "60684c837b9bdd0820914f8f73f09a9f", "score": "0.43969563", "text": "function add_prior_booking($id){\n $this->prior_bookings[] = $id;\n }", "title": "" }, { "docid": "a8a26cfd562c0cd7a0b715d436ab31c0", "score": "0.43931997", "text": "public static function populate_agent_ids(){\n foreach(Process_Data::$agent_ids as $id){\n Process_Data::$agent_table_object[$id]['agent_id'] = $id;\n }\n }", "title": "" }, { "docid": "9926e62d95cc78bf6f9ee6359dc6c405", "score": "0.43874472", "text": "public function addNpcid( $value){\n return $this->_add(1, $value);\n }", "title": "" }, { "docid": "faae430f9bf0ff0da2c17e650acc634d", "score": "0.4379143", "text": "function insert_new_routine($routine_name){\n\t\t$database = new Database;\n\t\t\n\t\t$routine_query = \"INSERT INTO `routines` (`routine_name`) VALUES (?)\";\n\t\t$params = array($routine_name);\n\t\t$table = \"`routines`\";\n\t\t$results = $database->db_insert($routine_query, $params, $table);\n\t\t\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "04cbd91aad11f7bfdeedac09a6f431eb", "score": "0.43786013", "text": "function addRef($shortId, $title=\"\", $authors=\"\", $venue=\"\") {\n global $refs;\n\n //search if it already exists\n $exists = false;\n for($i = 0; $i < sizeof($refs); $i++)\n {\n if ($refs[$i][0] == $shortId)\n {\n $exists = true;\n $visibleNumber = $i+1;\n }\n }\n\n //else, we insert it\n if(!$exists){\n $nextId = sizeof($refs);\n $refs[$nextId] = array($shortId, $title, $authors, $venue);\n\n $visibleNumber = $nextId+1; //we start at 1\n }\n print '<a class=\"ref\" href=\"#ref'.($visibleNumber).'\">['.$visibleNumber.']</a>';\n}", "title": "" }, { "docid": "809e26914dd04c9e4c728db835325a7d", "score": "0.43752372", "text": "private function registerWorkHistory() {\n\t\t$_workHistoryRecords = $this->dbAdapter->query(\"\n\t\t\tSELECT * FROM `pum_conversie_job_experience` \n\t\t\tWHERE `person_unid` = '\".$this->contactRow['unid'].\"'\n\t\t\tGROUP BY `unid`\n\t\t\tORDER BY `from` DESC\n\t\t\");\n\t\tif(is_object($_workHistoryRecords) AND $_workHistoryRecords->num_rows > 0) {\n\t\t\twhile($_workHistoryRecord = $_workHistoryRecords->fetch_assoc()) {\n\t\t\t\tarray_walk($_workHistoryRecord, array($this, 'parseString'));\n\t\t\t\ttry { @$_country = civicrm_api('Country', 'getsingle', array('version' => 3, 'name' => $_workHistoryRecord['country'])); @$_country_id = $_country['id']; } catch(Exception $e) { $_country_id = NULL; }\t\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\t$workHistoryParams = array(\n\t\t\t\t\t\t\"id\" => -1, \"entity_id\" => $this->contactIdentifier, \n\t\t\t\t\t\t\"custom_\".$this->customFields->work_name_of_organisation['id'] => $_workHistoryRecord['companyname'], \n\t\t\t\t\t\t\"custom_\".$this->customFields->work_city['id'] => $_workHistoryRecord['city'], \n\t\t\t\t\t\t\"custom_\".$this->customFields->work_country['id'] => $_country_id, \n\t\t\t\t\t\t\"custom_\".$this->customFields->work_years_from['id'] => $_workHistoryRecord['from'], \n\t\t\t\t\t\t\"custom_\".$this->customFields->work_to['id'] => $_workHistoryRecord['till'], \n\t\t\t\t\t\t\"custom_\".$this->customFields->work_description['id'] => $_workHistoryRecord['description'], \n\t\t\t\t\t\t\"custom_\".$this->customFields->work_job_title['id'] => $_workHistoryRecord['position'], \n\t\t\t\t\t);\n\t\t\t\t\tcivicrm_api3('CustomValue', 'create', $workHistoryParams);\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\techo \"Creating job history entry failed: \".$e; \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "ef82d7f25588a3ff3d82e3a9a03ef159", "score": "0.43735865", "text": "function add_progres($params)\n {\n $this->db->insert('progress',$params);\n return $this->db->insert_id();\n }", "title": "" }, { "docid": "7dbd471ebebfcb5f57e20e80e34b94d1", "score": "0.43673748", "text": "function file_usage_add(stdClass $file, $module, $type, $id, $count = 1) {\n db_merge('file_usage')\n ->key(array(\n 'fid' => $file->fid,\n 'module' => $module,\n 'type' => $type,\n 'id' => $id,\n ))\n ->fields(array('count' => $count))\n ->expression('count', 'count + :count', array(':count' => $count))\n ->execute();\n}", "title": "" }, { "docid": "dd9e767868f5955703fd2dbe05c10e6c", "score": "0.43643823", "text": "protected function setTypeCall($call_number, array $type)\n {\n $this->type[$call_number] = $type;\n }", "title": "" }, { "docid": "60fa68248e8eb89fdea0170a8f8568c0", "score": "0.43636718", "text": "public function addInfo($data){\n$query = \"INSERT INTO #__se_search_list(user_ip,keyword,user_id,url,url_clicked,package_id,user_ip_int,uniqueid,search_type) VALUES('$data[user_ip]','$data[keyword]','$data[user_id]','$data[url]','$data[url_clicked]','$data[package_id]',INET_ATON('$data[user_ip]'),'$data[uniqueid]','$data[search_type]')\";\n$db \t= JFactory::getDbo();\n$db->setQuery($query);\n$db->query();\n$ret = $db->insertid();\nreturn $ret;\n}", "title": "" }, { "docid": "6919057e08e0995b35295946461ed681", "score": "0.4361743", "text": "function ciniki_images_refAdd(&$ciniki, $tnid, $args) {\n\n if( !isset($args['image_id']) || $args['image_id'] == '' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.images.94', 'msg'=>'No image specified'));\n }\n if( !isset($args['object']) || $args['object'] == '' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.images.95', 'msg'=>'No image specified'));\n }\n if( !isset($args['object_id']) || $args['object_id'] == '' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.images.96', 'msg'=>'No image specified'));\n }\n if( !isset($args['object_field']) || $args['object_field'] == '' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.images.97', 'msg'=>'No image specified'));\n }\n\n // \n // Note: We don't need to worry about a transaction, that will be taken care\n // of in the calling function\n //\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbUUID');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbInsert');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbAddModuleHistory');\n\n //\n // Get a new UUID\n //\n $rc = ciniki_core_dbUUID($ciniki, 'ciniki.images');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args['uuid'] = $rc['uuid'];\n\n //\n // Add the reference\n //\n $strsql = \"INSERT INTO ciniki_image_refs (uuid, tnid, ref_id, \"\n . \"object, object_id, object_field, date_added, last_updated\"\n . \") VALUES (\"\n . \"'\" . ciniki_core_dbQuote($ciniki, $args['uuid']) . \"', \"\n . \"'\" . ciniki_core_dbQuote($ciniki, $tnid) . \"', \"\n . \"'\" . ciniki_core_dbQuote($ciniki, $args['image_id']) . \"', \"\n . \"'\" . ciniki_core_dbQuote($ciniki, $args['object']) . \"', \"\n . \"'\" . ciniki_core_dbQuote($ciniki, $args['object_id']) . \"', \"\n . \"'\" . ciniki_core_dbQuote($ciniki, $args['object_field']) . \"', \"\n . \"UTC_TIMESTAMP(), UTC_TIMESTAMP())\";\n $rc = ciniki_core_dbInsert($ciniki, $strsql, 'ciniki.images');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.images.98', 'msg'=>'Unable to save image reference', 'err'=>$rc['err'])); \n }\n $ref_id = $rc['insert_id'];\n $changelog_fields = array(\n 'uuid', \n 'object',\n 'object_id',\n 'object_field',\n );\n foreach($changelog_fields as $field) {\n if( isset($args[$field]) && $args[$field] != '' ) {\n ciniki_core_dbAddModuleHistory($ciniki, 'ciniki.images', 'ciniki_image_history', \n $tnid, 1, 'ciniki_image_refs', $ref_id, $field, $args[$field]);\n }\n }\n if( isset($args['image_id']) && $args['image_id'] != '' ) {\n ciniki_core_dbAddModuleHistory($ciniki, 'ciniki.images', 'ciniki_image_history', \n $tnid, 1, 'ciniki_image_refs', $ref_id, 'ref_id', $args['image_id']);\n }\n $ciniki['syncqueue'][] = array('push'=>'ciniki.images.ref',\n 'args'=>array('id'=>$ref_id));\n\n //\n // Update the last_change date in the tenant modules\n // Ignore the result, as we don't want to stop user updates if this fails.\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'tenants', 'private', 'updateModuleChangeDate');\n ciniki_tenants_updateModuleChangeDate($ciniki, $tnid, 'ciniki', 'images');\n\n return array('stat'=>'ok', 'id'=>$ref_id);\n}", "title": "" }, { "docid": "10596ec7ccf6200ce338e699f3330317", "score": "0.43597198", "text": "public function safeUp()\n\t{\n $number_ids=$this->dbConnection->createCommand(\"select distinct number_id from balance_report_number\")->queryColumn();\n $count=0;\n foreach($number_ids as $id) {\n $number=Number::model()->findByPk($id);\n // last balance\n $brn=BalanceReportNumber::model()->findBySql(\"select * from balance_report_number where number_id=:number_id order by id desc limit 0,1\",array(':number_id'=>$number->id));\n if ($brn) {\n $number->balance=$brn->balance;\n\n // find first balance with this value\n $brn2=BalanceReportNumber::model()->findBySql(\"select * from balance_report_number where number_id=:number_id and balance=:balance order by id asc limit 0,1\",\n array(':number_id'=>$number->id,'balance'=>$brn->balance));\n\n $number->balance_changed_dt=$brn2->balanceReport->dt;\n\n $number->save();\n }\n\n $count++;\n if ($count%100==0) echo \"processed $count/\".count($number_ids).\"\\n\";\n }\n\t}", "title": "" }, { "docid": "6feb804c81d4f023cf0c1efebdb52a38", "score": "0.43555543", "text": "public function addData()\r\n {\r\n\t\t$this->datecreated = time();\r\n\r\n\r\n\t\t$sql = 'INSERT INTO ' . TABLE_PREFIX . 'notpermissionlink (\r\n\t\t\t\t\tu_id,\r\n\t\t\t\t\tn_sessionid,\r\n\t\t\t\t\tn_referer,\r\n\t\t\t\t\tn_ipaddress,\r\n\t\t\t\t\tn_useragent,\r\n\t\t\t\t\tn_datecreated,\r\n\t\t\t\t\tn_datemodified\r\n\t\t\t\t\t)\r\n\t\t VALUES(?, ?, ?, ?, ?, ?, ?)';\r\n\t\t$rowCount = $this->db->query($sql, array(\r\n\t\t\t\t\t(int)$this->uid,\r\n\t\t\t\t\t(string)$this->sessionid,\r\n\t\t\t\t\t(string)$this->referer,\r\n\t\t\t\t\t(int)$this->ipaddress,\r\n\t\t\t\t\t(string)$this->useragent,\r\n\t\t\t\t\t(int)$this->datecreated,\r\n\t\t\t\t\t(int)$this->datemodified\r\n\t\t\t\t\t))->rowCount();\r\n\r\n\t\t$this->id = $this->db->lastInsertId();\r\n\t\treturn $this->id;\r\n\t}", "title": "" } ]
19f7c436abd652dd3c4dacf7d17a19b5
function to select the computer's move crash due to memory. error in line 109
[ { "docid": "3afd26c1ed8deb7f4c44c079dcda8359", "score": "0.45422888", "text": "function pick_move($new) {\n\t\t\t$num = rand(0,8);\n\t\t\tif ($new[$num] == '-') {\n\t\t\t\t$new[$num] = 'o';\n\t\t\t} else {\n\t\t\t\tunset($num);\n\t\t\t\treturn $this->pick_move($new);\n\t\t\t}\n\t\t\treturn $new;\n\t\t}", "title": "" } ]
[ { "docid": "93dbe6a9cc27be678847bbd4869291ce", "score": "0.5959583", "text": "protected function specialMove() \n\t{\n\t}", "title": "" }, { "docid": "93dbe6a9cc27be678847bbd4869291ce", "score": "0.5959583", "text": "protected function specialMove() \n\t{\n\t}", "title": "" }, { "docid": "bd321d1ce47a6250448176f96ee2429c", "score": "0.553559", "text": "function pick_move() {\r\n // itirating though the entire table. \r\n for ($pos = 0; $pos < 8; $pos++) {\r\n // if we find a dash then place an X in the board\r\n if ($this->position[$pos] == '-') {\r\n $this->position[$pos] = 'x'; // place an x in the empty cell\r\n // break out of itiration once one X has been placed.\r\n break;\r\n }\r\n }\r\n }", "title": "" }, { "docid": "c3cd70b3b5b7efa4d85ff24cf7246540", "score": "0.540082", "text": "public function node_move() {\n throw Exception('Not implemented');\n }", "title": "" }, { "docid": "7d782f33dc66e35ae5f5f9dbd9fb2415", "score": "0.5317002", "text": "private function pick_move() {\n\t\t\t$valid_move = false;\n\t\t\t$pos = -1;\n\t\t\tdo {\n\t\t\t\t$pos++;\n\t\t\t\tif ($this->position[$pos] == '-')\n\t\t\t\t\t$valid_move = true;\n\t\t\t} while (!$valid_move);\n\t\t\t$this->position[$pos] = \"o\";\n\t\t}", "title": "" }, { "docid": "3c225c5617227a338e984392f7f7134c", "score": "0.5284778", "text": "function pick_move() {\n for($pos=0; $pos < 9; $pos++) {\n if($this->position[$pos] == '-') {\n $this->position[$pos] = 'o';\n break;\n }\n }\n }", "title": "" }, { "docid": "01b2a246ff1fe06c316b2120c2374724", "score": "0.52480984", "text": "public function Move ();", "title": "" }, { "docid": "07f3d6b9fb1fcd5ba29f9f8ec95a945b", "score": "0.5246727", "text": "function switch_computer($device, $action) {\n debug(\"switch Computer for device='\".(string)$device->id.\"' action='\".(string)$action.\"'\");\n\n if(empty($device->address->masterdip)) {\n echo \"ERROR: masterdip (PC-IP) ist ungültig für device id \".$device->id.\"\\n\";\n return;\n }\n if(empty($device->address->slavedip)) {\n echo \"ERROR: slavedip (MAC Adresse) ist ungültig für device id \".$device->id.\"\\n\";\n return;\n }\n\n $IPpc = $device->address->masterdip;\n\n // MAC Address des lauschenden Computers\n $mac_addr = $device->address->slavedip;\n\n if($action == \"OFF\") {\n // Shutdown eines Windows-PC, muss in den Computerrichtlinien für remote erlaubt werden \n //exec(\"shutdown.exe -s -f -m \\\\\\\\$IPpc -t 30\"); // von einem Windowsserver\n //exec(\"net rpc shutdown -I $IPpc -U gast%\"); // von einem LINUXserver \n\n //echo \"Shutdown ausgeführt für $IPpc \\n\";\n echo \"PC-Shutdown-Funktion DEAKTIVIERT!! \\n\";\n } else {\n /* \n Port number auf die der Computer hört.\n Normalerweise zwischen 1-50000. Standard ist 7 or 9.\n */\n $socket_number = \"7\";\n\n //Broadcast ip ermitteln\n $pos = strrpos($IPpc,'.');\n if ($pos !== false) {\n $IPpc = substr($IPpc,0, $pos).\".255\";\n }\n WakeOnLan($IPpc, $mac_addr, $socket_number);\n\n echo \"Wake on Lan ausgeführt für $IPpc - $mac_addr \\n\";\n }\n\n return \"\";\n}", "title": "" }, { "docid": "d03aa865618c107066b5d69ed5c04123", "score": "0.5204578", "text": "function o_move($move_list){\n if (!in_array(\" \", $move_list)){\n exit(\"No more valid moves left. Game ends in a tie.\\n\");\n }\n echo \"Player O Turn. Choose a position on the board from 1 to 9.\\n\";\n $o_input = readline(\"Command: \");\n while($o_input < 1 || $o_input > 9){ //while o input out of scope\n echo \"Invalid Input. Please enter a number between 1-9.\\n\";\n $o_input = readline(\"Command: \");\n }\n while($move_list[$o_input - 1] != \" \"){ //while o input not free\n echo \"Invalid Move. Please enter the number of a free space on the board.\\n\";\n $o_input = readline(\"Command: \");\n }\n if($move_list[$o_input - 1] == \" \"){ //valid move\n $move_list[$o_input - 1] = \"O\" ;\n }\n printBoard($move_list);\n check_o_winner($move_list);\n x_move($move_list);\n}", "title": "" }, { "docid": "a6cadadda52230d123c84941ecd91f5d", "score": "0.51898825", "text": "abstract public function move();", "title": "" }, { "docid": "aa333d7a184be7ddb51a9e29e2286049", "score": "0.50805396", "text": "public function move()\r\n {\r\n }", "title": "" }, { "docid": "d4369d0fb9e6b14e17adfb003800fb85", "score": "0.50498396", "text": "function pick_move()\n {\n $makeMove = false;\n \n while(!$makeMove)\n {\n\n $move = rand(0, 8);\n \n if($this->position != \"x\" && $this->position != \"o\")\n {\n $makeMove = true;\n }\n }\n return $move;\n }", "title": "" }, { "docid": "5244dee6061f49dbbd13cdb9815ed330", "score": "0.50058436", "text": "function stResetTurn() {\r\n if (self::getActivePlayerId() \r\n != self::getGameStateValue(\"reset_turn_player_id\")) {\r\n throw new BgaVisibleSystemException(\r\n \"Internal error: Save pointer player is not active player.\");\r\n }\r\n self::undoRestorePoint();\r\n $this->gamestate->nextState(\"continueSamePlayer\");\r\n }", "title": "" }, { "docid": "5d5fe29ae5cb502c231cf62dbcaa7374", "score": "0.49664474", "text": "public abstract function toMOVE();", "title": "" }, { "docid": "2088d631042a1ea14209eb2ae2c171f6", "score": "0.49565312", "text": "private function machineMove($game)\n {\n // find move by machine\n $bitboard = $this->findMove(\n $game->getBitboardTwo(),\n $game->getBitboardOne()\n );\n\n // save move into database\n $move = new Move();\n $move->setGame($game)\n ->setPlayer(2)\n ->setBitboard($bitboard);\n\n // get doctrince manager\n $entityManager = $this->getDoctrine()->getManager();\n\n $entityManager->persist($move);\n\n // update game status with player2 move and change game turn\n $game->setBitboardTwo($game->getBitboardTwo()->or($bitboard));\n $game->setTurn(1);\n\n $entityManager->flush();\n\n // return bitboard with move\n return $bitboard;\n }", "title": "" }, { "docid": "7d1dd9d3672edc9aedb59cc4fdc99954", "score": "0.4947104", "text": "function move()\n {\n\tglobal $connect;\n\tglobal $template;\n\n\t// 최종 작업\n\trequire_once \"class_worktx.php\";\n\t$obj = new class_worktx();\n\t$obj->clean_tx();\n\t\n\t$sys_connect = sys_db_connect();\n\n $master_code = substr( $template, 0,1);\n include \"template/\" . $master_code .\"/\" . $template . \"_move.php\";\n\n\texit;\n }", "title": "" }, { "docid": "0f70149c63faed602323a0ce727c88ef", "score": "0.4941193", "text": "function x_move($move_list){\n if (!in_array(\" \", $move_list)){\n exit(\"No more valid moves left. Game ends in a tie.\\n\");\n }\n echo \"Player X Turn. Choose a position on the board from 1 to 9.\\n\";\n $x_input = readline(\"Command: \");\n while($x_input < 1 || $x_input > 9){ //while x input out of scope\n echo \"Invalid Input. Please enter a number between 1-9.\\n\";\n $x_input = readline(\"Command: \");\n }\n while($move_list[$x_input - 1] != \" \"){ //while x input not free\n echo \"Invalid Move. Please enter the number of a free space on the board.\\n\";\n $x_input = readline(\"Command: \");\n }\n if($move_list[$x_input - 1] == \" \"){ //valid move\n $move_list[$x_input - 1] = \"X\" ;\n }\n printBoard($move_list);\n check_x_winner($move_list);\n o_move($move_list);\n}", "title": "" }, { "docid": "d2dbb543f2278f2eb5f44b19ae8677cc", "score": "0.4910407", "text": "function pick_move() {\n\t\t$corners = array(0, 2, 6, 8);\n\n\t\t//The middle square is the most vital to success!\n\t\tif ($this->position[4] == '-') {\n\t\t\t$this->position[4] = 'o';\n\t\t\treturn true;\n\t\t}\n\n\t\t//If an pos would cause victory, grab it.\n\t\t//If a pos could cause defeat, steal it.\n\t\t//Otherwise hold off for a corners.\n\t\tfor ($pos=0; $pos<9; $pos++) {\n\t\t\tif ($this->position[$pos] == '-') {\n\t\t\t\t$this->position[$pos] = 'o';\n\t\t\t\tif ($this->winner('o')) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\t$this->position[$pos] = 'x';\n\t\t\t\t\tif ($this->winner('x')) {\n\t\t\t\t\t\t$this->position[$pos] = 'o';\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->position[$pos] = '-';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Check corners. If they're free, take them.\n\t\tforeach ($corners as $pos) {\n\t\t\tif ($this->position[$pos] == '-') {\n\t\t\t\t$this->position[$pos] = 'o';\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Check edges again and take them if they're free.\n\t\tfor ($pos=1; $pos<9; $pos += 2) {\n\t\t\tif ($this->position[$pos] == '-') {\n\t\t\t\t$this->position[$pos] = 'o';\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "6159097f53414d268595cbf6bd8070d4", "score": "0.4902572", "text": "public function move()\n {\n }", "title": "" }, { "docid": "d9fd7f04ce2b89873ba77fc861442b08", "score": "0.48470196", "text": "function drive();", "title": "" }, { "docid": "628e76b878440fba51fa5ada15e4d5f3", "score": "0.4829446", "text": "private function moveCam() {\n\t\tfile_get_contents(URL_CAM_CTRL . '?move=right&speedpan=-5');\n\t\tfile_get_contents(URL_CAM_CTRL . '?move=right&speedpan=-5');\n\t\t\n\t\tfile_get_contents(URL_CAM_CTRL . '?move=right&speedpan=0');\n\t\tfile_get_contents(URL_CAM_CTRL . '?move=right&speedpan=0');\n\t\tfile_get_contents(URL_CAM_CTRL . '?move=right&speedpan=0');\n\t\t\n\t\tsleep(3);\n\t}", "title": "" }, { "docid": "11b82039ab5a2d1acfc998feda277c2e", "score": "0.4826165", "text": "function evaluateMoveSelection(Board $board) {\n\n // While searching for a winning move, we also keep track of if we can block a user from winning. If we\n // unable to find a winning move, then we use the block move. If we are unable to block, then we just\n // move to any location that we found.\n $records = new MoveRecords();\n $combos = range(0, $board->getWidth() - 1);\n $checkerSettings = new CheckerSettings(true, false, Player::user());\n $moveChecker = new MoveChecker();\n\n // Repeatedly look at columns for a winning move. Randomize the columns we search for, but unlike random,\n // we will look at all the columns unless we find a winning move.\n for ($i = 0; $i < $board->getWidth(); $i++) {\n $randIndex = rand(0, $board->getWidth() - 1 - $i);\n $newHeight = $board->getHeightForCol($combos[$randIndex]) - 1;\n\n // Evaluate the position if we can put a piece there.\n if ($newHeight >= 0 && $board->getRows()[$newHeight][$combos[$randIndex]]->getToken() == \".\") {\n $precedence = $moveChecker->checkMove($combos[$randIndex], $checkerSettings, $board);\n\n // Found blocking move.\n if ($checkerSettings->getBlockRequest() && $checkerSettings->getBlockReply()) {\n $checkerSettings->setBlockReply(false);\n\n // Found block move of the highest precedence so stop all other move requests.\n if ($precedence == Precedence::THREE) {\n $records->setBlock($combos[$randIndex], $precedence);\n $checkerSettings->setBlockRequest(false);\n }\n // Otherwise, store higher precedence block move.\n else if ($precedence > $records->getBlock()->getPrecedence()) {\n $records->setBlock($combos[$randIndex], $precedence);\n }\n }\n // If the direction is not NONE, then the move was a winning move. Make the move and return.\n else if ($precedence == Precedence::FOUR) {\n return Result::error(\"Winning move: \".($combos[$randIndex] + 1));\n }\n\n // If we have found a higher precedence non-win/block move, store it.\n else if ($precedence > $records->getNoWin()->getPrecedence()) {\n\n // If user can't win by placing the piece here, then store in noWin, otherwise, set as\n // default.\n if ($newHeight > 0 && !$this->imaginaryCheck($moveChecker, $combos[$randIndex], $board)) {\n if ($precedence > $records->getDefault()->getPrecedence()) {\n $records->setDefault($combos[$randIndex], $precedence);\n }\n }\n else {\n $records->setNoWin($combos[$randIndex], $precedence);\n }\n }\n }\n // Replace with last for O(1) deletions.\n $combos[$randIndex] = $combos[$board->getWidth() - 1 - $i];\n array_pop($combos);\n }\n\n // Block move has priority over no win move and default move.\n $recordNum = $records->getHighestPriorityRecord();\n if ($recordNum != -1) {\n return Result::error($records->recordDescription($recordNum));\n }\n throw new InformationMismatchException(\"The game server contained malformed data\");\n }", "title": "" }, { "docid": "5f600c50c69e249394a5b31525527fdd", "score": "0.47825485", "text": "function movemaze( $db, $move, $user ) {\n\n $requete = $db -> prepare( 'SELECT * FROM maze WHERE user = :user ORDER BY idmaze DESC' );\n $requete -> execute( array( 'user' => $user ) );\n while ( $data = $requete -> fetch() ) { break; }\n $result = false;\n\n $artefact = 0;\n for ( $i = 0; $i < 10; $i++ ) {\n\n $nombre = $i + 1;\n if ( $data['artefact'. $nombre .''] == 1 ) {\n $artefact++;\n }\n }\n\n\n if ( $move == 'up') {\n\n $lig = -1;\n $col = 0;\n \n $q = $db -> prepare( 'SELECT COUNT(*) FROM cases WHERE ligne = :ligne + :lig AND \n colonne = :colonne + :col AND upcase != 0' );\n $q -> execute(array( \n 'ligne' => $data['ligne'],\n 'lig' => $lig,\n 'colonne' => $data['colonne'],\n 'col' => $col\n \n ));\n $donnees = $q -> fetch();\n\n } else if ( $move == \"down\") {\n\n $lig = 1;\n $col = 0;\n\n $q = $db -> prepare( 'SELECT COUNT(*) FROM cases WHERE ligne = :ligne + :lig AND \n colonne = :colonne + :col AND downcase != 0' );\n $q -> execute(array( \n 'ligne' => $data['ligne'],\n 'lig' => $lig,\n 'colonne' => $data['colonne'],\n 'col' => $col\n \n ));\n $donnees = $q -> fetch();\n\n } else if ( $move == \"left\") {\n\n $lig = 0;\n $col = -1;\n\n $q = $db -> prepare( 'SELECT COUNT(*) FROM cases WHERE ligne = :ligne + :lig AND \n colonne = :colonne + :col AND leftcase != 0' );\n $q -> execute(array( \n 'ligne' => $data['ligne'],\n 'lig' => $lig,\n 'colonne' => $data['colonne'],\n 'col' => $col\n \n ));\n $donnees = $q -> fetch();\n\n } else if ( $move == \"right\") {\n\n $lig = 0;\n $col = 1;\n\n $q = $db -> prepare( 'SELECT COUNT(*) FROM cases WHERE ligne = :ligne + :lig AND \n colonne = :colonne + :col AND rightcase != 0' );\n $q -> execute(array( \n 'ligne' => $data['ligne'],\n 'lig' => $lig,\n 'colonne' => $data['colonne'],\n 'col' => $col\n \n ));\n $donnees = $q -> fetch();\n\n if ( $data['ligne'] == 4 AND $data['colonne'] == 9 AND $artefact == 10 ) {\n \n endmaze( $db, $user );\n\n }\n\n }\n\n if ( $donnees[ 'COUNT(*)' > 0 ] ) {\n\n $result = true;\n\n }\n\n \n if ( $result ) {\n\n $req = $db -> prepare( 'UPDATE maze SET ligne = ligne + :lig, colonne = colonne + :col, \n nbcoups = nbcoups + 1 WHERE user = :user AND endgame = 0' );\n $req -> execute(array( \n 'lig' => $lig,\n 'col' => $col,\n 'user' => $user\n \n ));\n\n $obj = $db -> prepare( 'SELECT * FROM maze WHERE user = :user ORDER BY idmaze DESC');\n $obj -> execute(array( 'user' => $user ) );\n while ( $data = $obj -> fetch() ) { break; }\n\n if ( $data['ligne'] == 1 AND $data['colonne'] == 0 ) {\n\n $req = $db -> prepare( 'UPDATE maze SET artefact1 = 1 WHERE user = :user AND endgame = 0' );\n $req -> execute( array( 'user' => $user ) );\n\n } else if ( $data['ligne'] == 0 AND $data['colonne'] == 4 ) {\n\n $req = $db -> prepare( 'UPDATE maze SET artefact2 = 1 WHERE user = :user AND endgame = 0' );\n $req -> execute( array( 'user' => $user ) );\n \n } else if ( $data['ligne'] == 0 AND $data['colonne'] == 7 ) {\n\n $req = $db -> prepare( 'UPDATE maze SET artefact3 = 1 WHERE user = :user AND endgame = 0' );\n $req -> execute( array( 'user' => $user ) );\n \n } else if ( $data['ligne'] == 3 AND $data['colonne'] == 2 ) {\n\n $req = $db -> prepare( 'UPDATE maze SET artefact4 = 1 WHERE user = :user AND endgame = 0' );\n $req -> execute( array( 'user' => $user ) );\n \n } else if ( $data['ligne'] == 5 AND $data['colonne'] == 3 ) {\n\n $req = $db -> prepare( 'UPDATE maze SET artefact5 = 1 WHERE user = :user AND endgame = 0' );\n $req -> execute( array( 'user' => $user ) );\n \n } else if ( $data['ligne'] == 5 AND $data['colonne'] == 8 ) {\n\n $req = $db -> prepare( 'UPDATE maze SET artefact6 = 1 WHERE user = :user AND endgame = 0' );\n $req -> execute( array( 'user' => $user ) );\n \n } else if ( $data['ligne'] == 6 AND $data['colonne'] == 5 ) {\n\n $req = $db -> prepare( 'UPDATE maze SET artefact7 = 1 WHERE user = :user AND endgame = 0' );\n $req -> execute( array( 'user' => $user ) );\n \n } else if ( $data['ligne'] == 9 AND $data['colonne'] == 0 ) {\n\n $req = $db -> prepare( 'UPDATE maze SET artefact8 = 1 WHERE user = :user AND endgame = 0' );\n $req -> execute( array( 'user' => $user ) );\n \n } else if ( $data['ligne'] == 9 AND $data['colonne'] == 5 ) {\n\n $req = $db -> prepare( 'UPDATE maze SET artefact9 = 1 WHERE user = :user AND endgame = 0' );\n $req -> execute( array( 'user' => $user ) );\n \n } else if ( $data['ligne'] == 9 AND $data['colonne'] == 9 ) {\n\n $req = $db -> prepare( 'UPDATE maze SET artefact10 = 1 WHERE user = :user AND endgame = 0' );\n $req -> execute( array( 'user' => $user ) );\n \n }\n\n }\n\n }", "title": "" }, { "docid": "bcdde76302e3e063ac2784c163874e1b", "score": "0.47742605", "text": "private function move(): void\n {\n if ($this->coordinates->getFace() === Coordinates::FACE_MAP[Coordinates::NORTH]) {\n $this->coordinates->updatePosition(0, 1);\n }\n\n if ($this->coordinates->getFace() === Coordinates::FACE_MAP[Coordinates::EAST]) {\n $this->coordinates->updatePosition(1, 0);\n }\n\n if ($this->coordinates->getFace() === Coordinates::FACE_MAP[Coordinates::SOUTH]) {\n $this->coordinates->updatePosition(0, -1);\n }\n\n if ($this->coordinates->getFace() === Coordinates::FACE_MAP[Coordinates::WEST]) {\n $this->coordinates->updatePosition(-1, 0);\n }\n\n if (!$this->map->checkPosition($this->coordinates->getX(), $this->coordinates->getY())) {\n throw new RuntimeException('The rover fell into a blind spot');\n }\n }", "title": "" }, { "docid": "2dafdd2451e5360ff24dfa0ec1b0729e", "score": "0.47517815", "text": "public function findPlayerToMove() {\r\n\t\tswitch($this->_state) {\r\n\t\t\tcase OpenChess_Model_Game::STATE_BLACK_TO_MOVE:\r\n\t\t\t\treturn $this->_black;\r\n\t\t\tcase OpenChess_Model_Game::STATE_WHITE_TO_MOVE:\r\n\t\t\t\treturn $this->_white;\r\n\t\t\tcase OpenChess_Model_Game::STATE_CHECKMATE:\r\n\t\t\tcase OpenChess_Model_Game::STATE_STALEMATE:\r\n\t\t\tcase OpenChess_Model_Game::STATE_RESIGNATION:\r\n\t\t\t\treturn null;\r\n\t\t\tdefault:\r\n\t\t\t\tthrow new OpenChess_Model_Exception_InvalidStateException($this->_state);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "2f2bf4eaacdb397ec2540f8cd56db947", "score": "0.47487712", "text": "function _MOVE() {\r\n\t\tmosMenuBar::startTable();\r\n\t\tmosMenuBar::save( 'movesave' );\r\n\t\tmosMenuBar::spacer();\r\n\t\tmosMenuBar::cancel();\r\n\t\tmosMenuBar::endTable();\r\n\t}", "title": "" }, { "docid": "2438bf5839bcb866211522b6ff5a977a", "score": "0.47270352", "text": "public function move() {\n $rmPeg = $this->isValidMove($this->start, $this->end, true);\n if ($rmPeg != false) {\n // remove the peg that was hopped over\n $this->pegs[$rmPeg[0]][$rmPeg[1]] = 0;\n \n // put moved peg in ending position\n $endPegCoords = $this->indexToCoords($this->end);\n $this->pegs[$endPegCoords[0]][$endPegCoords[1]] = 1;\n\n // remove peg in starting position\n $startPegCoords = $this->indexToCoords($this->start);\n $this->pegs[$startPegCoords[0]][$startPegCoords[1]] = 0;\n\n $this->moves++;\n } \n }", "title": "" }, { "docid": "e5d047520c6b65370d257d0cf424b3b5", "score": "0.47225586", "text": "function move($board){\n\t\t\t$possibleMoves = parent::getPossibleMoves();\n\t\t\t\n\t\t\tif(empty($this->potentialShipLoc)){\n\t\t\t// if the stack is empty, a ship has not been found\n\t\t\t\t$this->isShipFound = false;\n\t\t\t}\n\t\t\n\t\t\tif( $this->isShipFound ){\n\t\t\t//if a ship was found try to shoot at the surrounding cells\n\t\t\t\t$shot = array_pop( $this->potentialShipLoc);\n\t\t\t} else{\n\t\t\t//otherwise, generate random value and check if a ship was hit\n\t\t\t\t$randomKey = array_rand( $possibleMoves );\n\t\t\t\t$shot = $possibleMoves[$randomKey];\n\t\t\t\tparent::removeShot($randomKey);\n\t\t\t}\t\t\n\t\t\t\n\t\t\t// if the cell contains a ship, set flag and fill potential moves\n\t\t\tif( $board->isCellOccupied($shot->getX(), $shot->getY()) ){\n\t\t\t\t$this->isShipFound = true;\n\t\t\t\t$this->generatePotentialMoves( $shot, $possibleMoves);\n\t\t\t}\n\n\t\t\t$board->fireAt($shot);\n\t\t\treturn $shot;\n\t\t}", "title": "" }, { "docid": "9e17f9cf8b13aa517841072857da66a6", "score": "0.47017062", "text": "private function promptMove()\n {\n echo '[' . $this->activePlayer . '] Masukan koordinat pertama: ';\n $cord1 = $this->handleInput();\n\n echo '[' . $this->activePlayer . '] Masukan koordinat kedua: ';\n $cord2 = $this->handleInput();\n\n if (!$this->validateMove($cord1, $cord2)) {\n echo 'ERROR: Invalid move' . PHP_EOL;\n $this->promptMove();\n } else {\n $this->board->movePiece($cord1, $cord2);\n }\n }", "title": "" }, { "docid": "90eba0051bc6d96073d8f9dc0fa5a397", "score": "0.46691886", "text": "function dnd_move_get($widget, $context, $selection_data, $info, $time) {\n\t\n\t //print_r($widget);\n\t\n\t\t\t$dnd_string = $widget->get_name();//\"Perl is the only language that looks\\nthe same before and after RSA encryption\";\n\t\t\t$selection_data->set($selection_data->target, 8, $dnd_string);\n\t}", "title": "" }, { "docid": "8c43a9705f53947afb7a0907a42c70ac", "score": "0.46677637", "text": "function pickMove($aMoves) {\n\treturn $aMoves[mt_rand(0, count($aMoves) - 1)];\n}", "title": "" }, { "docid": "1d57d926c31cd9286c6ac0b8f47869c2", "score": "0.4657393", "text": "function checkLegalityOfMove($new_column){\r\n $column = 0;\r\n \r\n switch($new_column){\r\n case 'c1':\r\n $column = 0;\r\n break;\r\n case 'c2':\r\n $column = 1;\r\n break;\r\n case 'c3':\r\n $column = 2;\r\n break;\r\n case 'c4':\r\n $column = 3;\r\n break;\r\n case 'c5':\r\n $column = 4;\r\n break;\r\n case 'c6':\r\n $column = 5;\r\n break;\r\n case 'c7':\r\n $column = 6;\r\n break;\r\n default:\r\n break;\r\n }\r\n $array = $this->get_boardState();\r\n if($array[0][$column] != 0){\r\n return 0;//Move is blocked and is not legal\r\n }\r\n else{\r\n return 1;//Move is not occupied/blocked and legal\r\n }\r\n }", "title": "" }, { "docid": "98b1c303a7f98df561de3192ac7b98f1", "score": "0.4647295", "text": "function make_move(&$board, $move)\n\t{\n\t$board[$move[4]][$move[5]] = $move[1];\n\tif ($move[2] != -1)\n\t\t$board[$move[2]][$move[3]] = '--';\n\n\t$board['s'] = ($board['s'] == 'w' ? 'b' : 'w');\n\t}", "title": "" }, { "docid": "3cb094e95efb172338a965a2666ce749", "score": "0.46365702", "text": "function ms_is_switched()\n{\n}", "title": "" }, { "docid": "ba59dd1d42e205573985c69c96c7a9d8", "score": "0.4624477", "text": "public function move(): void\n {\n $newPos = $this->canMove();\n if ($newPos) {\n $this->currentPosition = $newPos;\n }\n }", "title": "" }, { "docid": "1513ae4aad7dd894db2478a43b0027b1", "score": "0.4611312", "text": "public static function explore()\n {\n $aPossibleMvt = self::$oLabyrinth->getPossibleMovementForKirk();\n //Remove the possibility of behind if exists\n if (\n self::$oKirk->prevMvt &&\n false !== ($key = array_search(self::$aReverse[self::$oKirk->prevMvt], $aPossibleMvt))\n ) {\n unset($aPossibleMvt[$key]);\n }\n\n //If there's no more possibility, we are in a dead-end so go back\n if (empty($aPossibleMvt)) {\n self::$oKirk->move(self::$aReverse[self::$oKirk->prevMvt]);\n debug('Go Back!');\n self::$bExplorationMode = !self::$oLabyrinth->isCommandCenterFound();\n return true;\n }\n\n //If only one movement possible, do it.\n if (count($aPossibleMvt) === 1) {\n debug('One direction!');\n self::$oKirk->move(reset($aPossibleMvt));\n self::$bExplorationMode = !self::$oLabyrinth->isCommandCenterFound();\n return true;\n }\n\n //Remove all visited cases\n $aPreviousPossibleMvt = $aPossibleMvt;\n foreach ($aPossibleMvt as $idx => $sMvt) {\n if ($sMvt === LEFT && isset(self::$aVisited[self::$iPosKirk - 1])) {\n unset($aPossibleMvt[$idx]);\n }\n if ($sMvt === RIGHT && isset(self::$aVisited[self::$iPosKirk + 1])) {\n unset($aPossibleMvt[$idx]);\n }\n if ($sMvt === UP && isset(self::$aVisited[self::$iPosKirk - self::$oLabyrinth->iCols])) {\n unset($aPossibleMvt[$idx]);\n }\n if ($sMvt === DOWN && isset(self::$aVisited[self::$iPosKirk + self::$oLabyrinth->iCols])) {\n unset($aPossibleMvt[$idx]);\n }\n }\n\n //If no possible movement left, choose the 1st visited case to go\n if (empty($aPossibleMvt)) {\n $aPossibleMvt = $aPreviousPossibleMvt;\n $aLeftVisited = [];\n foreach ($aPossibleMvt as $idx => $sMvt) {\n if ($sMvt === LEFT) {\n $aLeftVisited[LEFT] = self::$aVisited[self::$iPosKirk - 1];\n }\n if ($sMvt === RIGHT) {\n $aLeftVisited[RIGHT] = self::$aVisited[self::$iPosKirk + 1];\n }\n if ($sMvt === UP) {\n $aLeftVisited[UP] = self::$aVisited[self::$iPosKirk - self::$oLabyrinth->iCols];\n }\n if ($sMvt === DOWN) {\n $aLeftVisited[DOWN] = self::$aVisited[self::$iPosKirk + self::$oLabyrinth->iCols];\n }\n }\n list($sMove) = array_keys($aLeftVisited, max($aLeftVisited));\n self::$oKirk->move($sMove);\n self::$bExplorationMode = !self::$oLabyrinth->isCommandCenterFound();\n return true;\n }\n\n //If only one movement left, do it.\n if (count($aPossibleMvt) === 1) {\n debug('One direction left after trimming visited!');\n self::$oKirk->move(reset($aPossibleMvt));\n self::$bExplorationMode = !self::$oLabyrinth->isCommandCenterFound();\n return true;\n }\n\n //Otherwise, try to continue in the previous movement.\n if (in_array(self::$oKirk->prevMvt, $aPossibleMvt)) {\n debug('In front is not visited !');\n self::$oKirk->move(self::$oKirk->prevMvt);\n self::$bExplorationMode = !self::$oLabyrinth->isCommandCenterFound();\n return true;\n }\n\n //If only one movement still possible, do it.\n if (count($aPossibleMvt) === 1) {\n //If exists another path but already visited, rollback in mode\n foreach ([LEFT, RIGHT, UP, DOWN] as $sMvt) {\n if (reset($aPossibleMvt) === $sMvt || self::$aReverse[self::$oKirk->prevMvt] === $sMvt) {\n continue;\n }\n }\n debug('Only one left after several choices !');\n self::$oKirk->move(reset($aPossibleMvt));\n return true;\n }\n\n //If not possible, go to the direction there's the most unknown case \"?\"\n if (null !== ($sOptimizedDir = self::$oLabyrinth->getOptimizedDirection($aPossibleMvt))) {\n self::$oKirk->move($sOptimizedDir);\n debug('Optimized choice !');\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "7d30e328ee9d494b4503a220cc061f4c", "score": "0.45334056", "text": "public function move_apsolute(int $x,int $y);", "title": "" }, { "docid": "d9dd62e3313522d90b21c3321ebaf542", "score": "0.45213723", "text": "public function move(){\n echo \"I'm bipedal! Haha!\";\n }", "title": "" }, { "docid": "7915325b7d62e0e698dd04fc9a871b80", "score": "0.4510743", "text": "public function moveFw()\n {\n $indexCurrent = array_search($this->getCurrentPage(), $this->getPages());\n $this->setCurrentPage($this->getPages()[$indexCurrent + 1]);\n }", "title": "" }, { "docid": "408c23364e2c5eedf4714732773ba040", "score": "0.4509146", "text": "abstract public function getMove (array $grid);", "title": "" }, { "docid": "756acf0ac4d1f8f80ba86ef723badcfe", "score": "0.45041108", "text": "function Xsy_Pho_Move($itemtype, $UpOrDown){\n\n global $SQL_DATABASE, $sqlPho_MenuCate, $sqlPho_MenuItem;\n\n // define variables\n $postIdField = ($itemtype == \"item\") ? \"PhoItemID\" : \"PhoCateID\";\n $postOrdField = ($itemtype == \"item\") ? \"PhoItemOrder\" : \"PhoCateOrder\";\n\n $itemId = $_POST[$postIdField];\n $itemOrder = $_POST[$postOrdField];\n $idField = ($itemtype == \"item\") ? \"ID_MenuItem\" : \"ID_MenuCate\";\n $orderField = ($itemtype == \"item\") ? \"Int_Item%Order\" : \"Int_Cate%Order\";\n $sqlTable = ($itemtype == \"item\") ? $sqlPho_MenuItem : $sqlPho_MenuCate;\n $targetOrder = ($UpOrDown == \"Down\") ? ($itemOrder + 1) : ($itemOrder - 1);\n\n // search for target order\n $query_target = Xsy_Sql_FetchAll(\"SELECT `$idField` FROM `$SQL_DATABASE`.`$sqlTable` WHERE `$orderField`='$targetOrder'\");\n $targetId = $query_target[0][$idField];\n\n // proceed to switches\n Xsy_Sql_Update($SQL_DATABASE, $sqlTable, array($orderField => \"0\"), $targetId);\n Xsy_Sql_Update($SQL_DATABASE, $sqlTable, array($orderField => $targetOrder), $itemId);\n Xsy_Sql_Update($SQL_DATABASE, $sqlTable, array($orderField => $itemOrder), $targetId);\n\n\n}", "title": "" }, { "docid": "3b384e7f073e27a3f78fc15b3e217dd5", "score": "0.44968495", "text": "function towerOfHanoi($n, $from_rod, $to_rod, $aux_rod) { \n\t\n\tif ($n === 1) { \n\techo (\"Move disk 1 from rod $from_rod to rod $to_rod \\n\"); \n\treturn; \n\t} \n\t\n\ttowerOfHanoi($n-1, $from_rod, $aux_rod, $to_rod); \n\techo (\"Move disk $n from rod $from_rod to rod $to_rod \\n\"); \n\ttowerOfHanoi($n-1, $aux_rod, $to_rod, $from_rod); \n\n}", "title": "" }, { "docid": "645959218c8d697cea868a803effdcb5", "score": "0.44744408", "text": "function SwapScreenBuffer(): void { }", "title": "" }, { "docid": "8a19b738992da54bb524429c2a1b9937", "score": "0.4461165", "text": "public function switchTurn() {\n if($this->currentPlayer == 0) {\n $this->currentPlayer = 1;\n }\n else {\n $this->currentPlayer = 0;\n }\n\n $this->getPlayer(0)->resetFlags();\n $this->getPlayer(0)->getPipes()[0]->indicateLeaks();\n\n $this->getPlayer(1)->resetFlags();\n $this->getPlayer(1)->getPipes()[0]->indicateLeaks();\n }", "title": "" }, { "docid": "821a275d114f74ca0a2cf1d50e85e02a", "score": "0.44522053", "text": "function copiar($archivo,$destino){\r\n\r\n if (SERVER_OS == \"linux\") {\r\n \t\t $copiar = \"cp -f $archivo $destino \";\r\n $return=exec ($copiar); \r\n\t\t\t} \r\n elseif (SERVER_OS == \"windows\"){\r\n $destino=ereg_replace(\"/\",\"\\\\\",$destino) ;\r\n $archivo=ereg_replace(\"/\",\"\\\\\",$archivo) ;\r\n $copiar = \"copy $archivo $destino /Y\";\r\n $return=shell_exec($copiar);\r\n }\r\nreturn $return; \r\n}", "title": "" }, { "docid": "db73437ea682e36687485a2db076fcb2", "score": "0.44481447", "text": "private function handleMoves() {\n foreach ($this->moveList as $move) {\n $turnValue = $move[0];\n $moveValue = substr($move, 1);\n $this->handleTurning($turnValue);\n if ($this->performMove($moveValue)){\n return;\n }\n }\n }", "title": "" }, { "docid": "dd66b1d02a3779789d3687ce57263d05", "score": "0.44472572", "text": "function tictactoeNextMove($board, $token)\n{\n\tdo {\n\t\t$cell = rand(1,9);\n\t} while (isset($board[(($cell-1)/3)+1][(($cell-1)%3)+1]));\n\treturn $cell;\n}", "title": "" }, { "docid": "4ef33bb20dafe81642fe9a62d1933e25", "score": "0.44447482", "text": "public function moveDisk($project, Appointments_Google_Service_Compute_DiskMoveRequest $postBody, $optParams = array())\n {\n $params = array('project' => $project, 'postBody' => $postBody);\n $params = array_merge($params, $optParams);\n return $this->call('moveDisk', array($params), \"Appointments_Google_Service_Compute_Operation\");\n }", "title": "" }, { "docid": "e1113ac4e02052f1177a8c004c52d1bf", "score": "0.4441384", "text": "function aiMove($board, $strat) {\n\t\t$arrOfPossMoves = array();\n\t\t$topRow = $board[0];\n\t\tforeach($topRow as $key=>$value){\n\t\t\tif($value == 0)\n\t\t\t\tarray_push($arrOfPossMoves, $key);\n\t\t}\n\t\tif(sizeof($arrOfPossMoves) == 0) {\n\t\t\treturn -1;\n\t\t}\n\t\n\t\tif($strat == \"Smart\") {\n\t\t\t// check if there is any move ai can do to win the game. If yes, return col\n\t\t\tforeach ($arrOfPossMoves as $col=>$value) {\n\t\t\t\t$tempBoard = makeMove($board, $col, 2);\n\t\t\t\tif(checkIfWin($tempBoard))\n\t\t\t\t\treturn $col;\n\t\t\t}\n\t\n\t\t\t// check if there is any move a user can do to win the game, block that move. If yes, return column number to block it\n\t\t\tforeach ($arrOfPossMoves as $col=>$value) {\n\t\t\t\t$tempBoard = makeMove($board, $col, 1);\n\t\t\t\tif(checkIfWin($tempBoard))\n\t\t\t\t\treturn $col;\n\t\t\t}\n\t\t}\n\t\n\t\t// from those available moves, choose one by random and return it\n\t\treturn array_rand($arrOfPossMoves);\n\t}", "title": "" }, { "docid": "2be9ba22327440a3932268e76e8e6d9c", "score": "0.44395095", "text": "public function moveFinger()\r\n {\r\n }", "title": "" }, { "docid": "9f5e0b72a21cbd7c1330eae9964f4e6d", "score": "0.4439014", "text": "public function movedElementsCanNotBeFoundAtTheirOrigin() {}", "title": "" }, { "docid": "47cac0ffd999606f677dd70c74318512", "score": "0.44372642", "text": "function move() {\n \n global $userrow, $controlrow;\n \n if ($userrow[\"currentaction\"] == \"Fighting\") { header(\"Location: index.php?do=fight\"); die(); }\n \n $latitude = $userrow[\"latitude\"];\n $longitude = $userrow[\"longitude\"];\n if (isset($_POST[\"north\"])) { $latitude++; if ($latitude > $controlrow[\"gamesize\"]) { $latitude = $controlrow[\"gamesize\"]; } }\n if (isset($_POST[\"south\"])) { $latitude--; if ($latitude < ($controlrow[\"gamesize\"]*-1)) { $latitude = ($controlrow[\"gamesize\"]*-1); } }\n if (isset($_POST[\"east\"])) { $longitude++; if ($longitude > $controlrow[\"gamesize\"]) { $longitude = $controlrow[\"gamesize\"]; } }\n if (isset($_POST[\"west\"])) { $longitude--; if ($longitude < ($controlrow[\"gamesize\"]*-1)) { $longitude = ($controlrow[\"gamesize\"]*-1); } }\n \n $townquery = doquery(\"SELECT id FROM {{table}} WHERE latitude='$latitude' AND longitude='$longitude' LIMIT 1\", \"towns\");\n if (mysql_num_rows($townquery) > 0) {\n $townrow = mysql_fetch_array($townquery);\n include('towns.php');\n travelto($townrow[\"id\"], false);\n die();\n }\n \n $chancetofight = rand(1,5);\n if ($chancetofight == 1) { \n $action = \"currentaction='Fighting', currentfight='1',\";\n } else {\n $action = \"currentaction='Exploring',\";\n }\n\n \n $updatequery = doquery(\"UPDATE {{table}} SET $action latitude='$latitude', longitude='$longitude', dropcode='0' WHERE id='\".$userrow[\"id\"].\"' LIMIT 1\", \"users\");\n header(\"Location: index.php\");\n \n}", "title": "" }, { "docid": "bcefa39b631772cb78a1991df178919f", "score": "0.44316015", "text": "function selectNextPlayer() //Selects the next player to make a turn\n\t{\n\t\trequire_once(\"connect.php\");\n\t\t$dbo = getDBO(\"map\");\n\t\t$sqlRequest = \"SELECT * FROM `base` WHERE 1\";\n\t\t$stmt = $dbo->prepare($sqlRequest);\n\n\t\t$stmt->execute();\n\t\t$result = $stmt->fetch();\n\n\t\t$lastPlayer = $result[\"currentTurn\"];\n\n\t\t//Getting the list of players\n\t\t$dbo = getDBO(\"map\");\n\t\t$sqlRequest = \"SELECT * FROM `players` WHERE 1 ORDER BY `ID`\";\n\t\t$stmt = $dbo->prepare($sqlRequest);\n\t\t$stmt->execute();\n\n\t\t$players = $stmt->fetchAll();\n\n\t\t//Checking if the last player is part of the player list\n\n\t\t$lastExists = false;\n\t\tforeach($players as $player)\n\t\t{\n\t\t\tif($player[\"Name\"] == $lastPlayer)\n\t\t\t{\n\t\t\t\t$lastExists = true;\n\t\t\t}\n\t\t}\n\n\t\tif($lastExists == false) //The last player does not exist anymore, give the turn to the first player\n\t\t{\n\t\t\tsetNextPlayer($players[0][\"Name\"]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//The player is still in the game, select the next player\n\n\t\t\t//Finding the index of the player\n\t\t\t$playerIndex = 0;\n\t\t\tfor($i = 0; $i < count($players); $i++)\n\t\t\t{\n\t\t\t\tif($players[$i][\"Name\"] == $lastPlayer)\n\t\t\t\t{\n\t\t\t\t\t$playerIndex = $i;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$nextIndex = $playerIndex + 1;\n\t\t\tif($nextIndex >= count($players)) //If there are more players after the current one\n\t\t\t{\n\t\t\t\t$nextIndex = 0; //Selelcting the first player in the list\t\n\t\t\t}\n\n\t\t\tsetNextPlayer($players[$nextIndex][\"Name\"]);\n\t\t}\n\n\t}", "title": "" }, { "docid": "dd2e3c98f47b758a40c12a4b31f7185c", "score": "0.4430125", "text": "function query_move_slow_page($server_cfg, $game_name, $name_split, \n\t\t\t $profile_file, $flat_profile, $page_time, $time_slot, &$output)\n{\n\t$target_dir = sprintf($server_cfg[\"slow_page_dir_ts\"],\n\t\t\t $game_name, $time_slot);\t\n\n\tif(!is_dir($target_dir)){\n\t\tmkdir($target_dir);\n\t}\n\n\t$file_name = basename($profile_file);\n\t$target_file = \"$target_dir$file_name\";\n\n\t$result = rename($profile_file, $target_file);\n\n\tif($result == FALSE){\n\t\treturn 0;\n\t}\n\n\tarray_push($output, $profile_file);\n\t\n\terror_log(\"Moving $target_file -> $profile_file\\n\", 3, sprintf($server_cfg['log_file'],$game_name));\n\treturn 1;\n}", "title": "" }, { "docid": "61ce3c7fcc4a495e9ba1378aeb16a789", "score": "0.44201273", "text": "function vedirect_scan() {\n\tglobal $config;\n\ttrucAdir(4, 'Recherche de périphérique vedirect');\n\t$idDevice=0;\n\tforeach (scandir('/dev') as $unDev) {\n\t\tif (substr($unDev, 0, 6) == 'ttyUSB') {\n\t\t\ttrucAdir(4, 'Un périphérique TTY à été trouvé : '.$unDev);\n\t\t\tunset($vedirect_sortie);\n\t\t\tunset($vedirect_retour);\n\t\t\texec($config['vedirect']['usb']['bin'].' /dev/'.$unDev, $vedirect_sortie, $vedirect_retour);\n\t\t\tif ($vedirect_retour != 0){\n\t\t\t\ttrucAdir(1, 'Erreur à l\\'exécution du script '.$config['vedirect']['usb']['bin'].' sur le '.$unDev);\n\t\t\t} else {\n\t\t\t\t// Pour gérer le BMV-600\n\t\t\t\t$BMV600=false;\n\t\t\t\t$ve_nom=null;\n\t\t\t\t$ve_type='Inconnu';\n\t\t\t\t$ve_modele='Inconnu';\n\t\t\t\tforeach ($vedirect_sortie as $vedirect_ligne) {\n\t\t\t\t\t$vedirect_data = explode(':', $vedirect_ligne);\n\t\t\t\t\tswitch ($vedirect_data[0]) {\n\t\t\t\t\t\tcase 'PID':\n\t\t\t\t\t\t\t$ve_type=ve_type($vedirect_data[1]);\n\t\t\t\t\t\t\t$ve_modele=ve_modele($vedirect_data[1]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'SER#':\n\t\t\t\t\t\t\t$ve_serial=$vedirect_data[1];\n\t\t\t\t\t\t\t$ve_nom=ve_nom($vedirect_data[1]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'BMV':\n\t\t\t\t\t\t\t$ve_type='BMV';\n\t\t\t\t\t\t\t$ve_nom=str_replace(' ', '', $vedirect_data[1]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttrucAdir(3, 'C\\'est un '.$ve_type.', modèle \"'.$ve_modele.'\" du nom de '.$ve_nom);\n\t\t\t\t$vedirect_data_formate='';\n\t\t\t\tforeach ($vedirect_sortie as $vedirect_ligne) {\n\t\t\t\t\t$vedirect_data = explode(':', $vedirect_ligne);\n\t\t\t\t\tswitch ($ve_type) {\n\t\t\t\t\t\tcase 'MPPT':\n\t\t\t\t\t\t\tif (in_array($vedirect_data[0], $config['vedirect']['data_ok']['mppt'])) {\n\t\t\t\t\t\t\t\t# éviter les doublons\n\t\t\t\t\t\t\t\tif (!stristr($vedirect_data_formate, $vedirect_data[0].':')) {\n\t\t\t\t\t\t\t\t\ttrucAdir(5, 'Valeur trouvé : '.$vedirect_data[0].':'.$vedirect_data[1]);\n\t\t\t\t\t\t\t\t\tif ($vedirect_data_formate != '') {\t\n\t\t\t\t\t\t\t\t\t\t$vedirect_data_formate = $vedirect_data_formate.',';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$vedirect_data_formate = $vedirect_data_formate.$vedirect_data[0].':'.ve_value($vedirect_data[0], $vedirect_data[1]);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ttrucAdir(5, 'Doublon, on passe');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'BMV':\n\t\t\t\t\t\t\tif (in_array($vedirect_data[0], $config['vedirect']['data_ok']['bmv'])) {\n\t\t\t\t\t\t\t\t# éviter les doublons\n\t\t\t\t\t\t\t\tif (!stristr($vedirect_data_formate, $vedirect_data[0].':')) {\n\t\t\t\t\t\t\t\t\ttrucAdir(5, 'Valeur trouvé : '.$vedirect_data[0].':'.$vedirect_data[1]);\n\t\t\t\t\t\t\t\t\tif ($vedirect_data_formate != '') {\n\t\t\t\t\t\t\t\t\t\t$vedirect_data_formate = $vedirect_data_formate.',';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$vedirect_data_formate = $vedirect_data_formate.$vedirect_data[0].':'.ve_value($vedirect_data[0], $vedirect_data[1]);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ttrucAdir(5, 'Doublon, on passe');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'PhoenixInverter':\n\t\t\t\t\t\t\t\tif (in_array($key, $config['vedirect']['data_ok']['phoenix'])) {\n\t\t\t\t\t\t\t\t\t# éviter les doublons\n\t\t\t\t\t\t\t\t\tif (!stristr($vedirect_data_formate, $vedirect_data[0].':')) {\n\t\t\t\t\t\t\t\t\t\ttrucAdir(5, 'Valeur trouvé : '.$vedirect_data[0].':'.$vedirect_data[1]);\n\t\t\t\t\t\t\t\t\t\tif ($vedirect_data_formate != '') {\n\t\t\t\t\t\t\t\t\t\t\t$vedirect_data_formate = $vedirect_data_formate.',';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t$vedirect_data_formate = $vedirect_data_formate.$key.':'.ve_value($vedirect_data[0], $vedirect_data[1]);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ttrucAdir(5, 'Doublon, on passe');\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\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tif ($vedirect_data_formate != '') {\n\t\t\t\t\t\t\t\t\t\t$vedirect_data_formate = $vedirect_data_formate.',';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$vedirect_data_formate = $vedirect_data_formate.$key.':'.ve_value($vedirect_data[0], $vedirect_data[1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttrucAdir(3, 'Les données sont formatées comme ceci : '.$vedirect_data_formate );\n\t\t\t\t$vedirect_scan_return[$idDevice]['nom']=$ve_nom;\n\t\t\t\t$vedirect_scan_return[$idDevice]['type']=$ve_type;\n\t\t\t\t$vedirect_scan_return[$idDevice]['serial']=$ve_serial;\n\t\t\t\t$vedirect_scan_return[$idDevice]['modele']=$ve_modele;\n\t\t\t\t$vedirect_scan_return[$idDevice]['data']=$vedirect_data_formate;\n\t\t\t\t$idDevice++;\n\t\t\t}\t\n\t\t}\n\t}\n\treturn $vedirect_scan_return;\n}", "title": "" }, { "docid": "418bc401c0b31471e668c309b3b129a6", "score": "0.44201115", "text": "public function doSpecialMove (){\n return \"walk\";\n }", "title": "" }, { "docid": "2c932c28098e8f317fa899eb028d44d8", "score": "0.4413221", "text": "private function select() : void\n {\n if ($rdCnt = count($this->recvs)) $rd = $this->recvs;\n else $rd = array();\n\n if ($wrCnt = count($this->sends)) $wr = $this->sends;\n else $wr = array();\n\n $en = null;\n $rn = null;\n $wn = null;\n\n $fdCnt = 0;\n\n try {\t// try нужен для подавления ошибки interrupted system call, возникающей при системном сигнале\n if ($wrCnt && $rdCnt) $fdCnt = @stream_select($rd, $wr, $en, 0);\n else if ($wrCnt) $fdCnt = @stream_select($rn, $wr, $en, 0);\n else if ($rdCnt) $fdCnt = @stream_select($rd, $wn, $en, 0);\n else {\n return;\n }\n } catch (Exception $e) {\n $this->err('ERROR: select exception ' . $e->getMessage());\n return;\n }\n\n if ($fdCnt === false ) {\n $e = error_get_last();\n// ошибка, видимо, выдается только когда приходит сигнал завершения\n $this->err(\"ERROR: '\" . $e['message'] . \"' (line \" . $e['line'] . \" in '\" . $e['file'] . \"')\");\n return;\n }\n\n if ($fdCnt === 0) {\n return;\n }\n\n $this->needSleep = false;\n\n// пишем исходящие (делаем это в первую очередь, чтобы внешний сервер не простаивал, пока мы читаем входящие)\n foreach($wr as $fd) {\n if ($socketId = array_search($fd, $this->sends, true)) {\n $this->getSocket($socketId)->send();\n\n if (DBG_ONEBYTE_SEND_USLEEP) {\n usleep(DBG_ONEBYTE_SEND_USLEEP); // отладочное для побайтовой отправки пакетов\n }\n\n }\n }\n\n// проверяем новые подключения\n $listenFd = null;\n $isServerBusy = false;\n\n if ($listenSocket = $this->getSocket(self::LISTEN_SOCKET_ID)) {\n $listenFd = $listenSocket->getFd();\n\n if (in_array($listenFd, $rd, true)) {\n if (count($this->sockets) >= (self::MAX_SOCK)) {\n throw new Exception('Cannot accept: reach maximal sockets count');\n }\n\n if (count($this->sockets) >= (self::MAX_SOCK - self::RESERVE_SOCK)) {\n if (!$this->removeUnusedConnected()) { // try to remove unused connected socket to accept connection\n $isServerBusy = true; // if cannot remove unused socket - accept, read \"alive req\", answer \"Busy!\" and close socket\n }\n }\n\n if (($fd = @stream_socket_accept($listenFd, -1)) === false) {\n $this->err('ERROR: accept error');\n// TODO продумать действия при ошибке принятия соединения. Возможно, для ноды - отправка транзакции о временном уходе со службы\n $this->softFinish();\n } else {\n $acceptedSocket = $this->newReadSocket(\n $fd,\n Host::create(\n $this->getApp(),\n $this->getListenHost()->getTransport(),\n stream_socket_get_name($fd,true)\n )\n );\n\n if ($isServerBusy) {\n $this->dbg('Server is busy!');\n $acceptedSocket->getLegate()->setServerBusy();\n }\n\n $this->dbg('Accept connection from ' . $acceptedSocket->getHost()->getTarget());\n }\n }\n }\n\n// читаем входящие\n foreach($rd as $fd) {\n if ($fd === $listenFd) continue;\n\n if ($socketId = array_search($fd, $this->recvs, true)) {\n $this->getSocket($socketId)->receive();\n }\n }\n }", "title": "" }, { "docid": "397d26538e7eb4c1d3ac4d60cc28e5d4", "score": "0.44049248", "text": "function PortUnknownConnection($p_mac, $p_ip) {\n $PluginFusioninventoryUnknownDevice = new PluginFusioninventoryUnknownDevice();\n $unknown_infos = array();\n $unknown_infos[\"name\"] = '';\n $newID=$PluginFusioninventoryUnknownDevice->add($unknown_infos);\n // Add networking_port\n $NetworkPort =new NetworkPort();\n $port_add = array();\n $port_add[\"items_id\"] = $newID;\n $port_add[\"itemtype\"] = 'PluginFusioninventoryUnknownDevice';\n $port_add[\"ip\"] = $p_ip;\n $port_add['mac'] = $p_mac;\n $dport = $NetworkPort->add($port_add);\n $this->connectDB($dport);\n }", "title": "" }, { "docid": "5d66a7bb33c2f1a60382a5b65824cf71", "score": "0.44002962", "text": "private function move(): void\n {\n // Consume the next token, that is the current to process.\n $this->lexer->getToken();\n \n $this->initTokenToProcess();\n }", "title": "" }, { "docid": "298ba425bb25aa42fbd22e54b38129c1", "score": "0.43853733", "text": "function ActionMove(DBManage &$db, &$check, personnage &$oJoueur, &$objManager){\r\n\tunset($_SESSION['message']);\r\n\r\n\t//on libère la ressource avant de bouger\r\n\t$objRessource = FoundBatiment(NULL, NULL, $oJoueur->GetCoordonnee());\r\n\t\r\n\tif(!is_null($objRessource) AND get_class($objRessource) == 'ressource')\r\n\t{\r\n\t\tif($objRessource->GetCollecteur() == $oJoueur->GetLogin())\r\n\t\t{\r\n\t\t\t$objRessource->FreeRessource($oJoueur);\r\n\t\t}\r\n\t\t$objManager->UpdateBatiment($objRessource);\r\n\t\tunset($objRessource);\r\n\t}\r\n\r\n\t//on déplace le joueur\r\n\tif(!is_null($_GET['move']) AND $oJoueur->CheckMove(strtolower($_GET['move']))){\r\n\t\t$oJoueur->deplacer($_GET['move']);\r\n\t\t$_GET['move'] = null;\r\n\t}else{\r\n\t\t$check = false;\r\n\t\techo 'Erreur GLX0002: Fonction ActionMove';\r\n\t}\r\n\r\n\t//on vérifie si on a trouvé une quete\r\n\t\r\n\tif(isset($_SESSION['QueteEnCours'])){\r\n\t\tforeach($_SESSION['QueteEnCours'] as $Quete){\r\n\t\t\t$Quete->ActionSurQuete($oJoueur);\r\n\t\t\t$objManager->UpdateQuete($Quete);\r\n\t\t}\r\n\t}\r\n\t\r\n\r\n\t//on se fait voler par un voleur\r\n\t$num = mt_rand(1, 1000);\r\n\tif($num == 100){\r\n\t\t$oJoueur->ArgentVole();\r\n\t\t$msg = '<p>Un voleur vous a dérobé tout votre argent.</p>';\r\n\t\t$_SESSION['message'][] = $msg;\r\n\t\t$db->InsertHistory($oJoueur->GetLogin(), $oJoueur->GetCarte(), $oJoueur->GetPosition(), 'voleur', 'Voleur', NULL, $msg);\r\n\t}\r\n\r\n\t//on se fait attaquer par une tour\r\n\tif(!$oJoueur->GetAttaqueTour()){\r\n\t\t$tmp = AttaqueTour($db, $oJoueur);\r\n\t\tif($tmp > 0){\r\n\t\t\t$_SESSION['message'][] = '<p>Vous avez été attaqué par une ou des tours. Vous êtes blessé de '.$tmp.'pts de vie.</p>';\r\n \t\t}\r\n\t}\r\n\r\n\tif(isset($_SESSION['QueteEnCours'])){\r\n\t\treset($_SESSION['QueteEnCours']);\r\n\t}\r\n\r\n\tunset($_SESSION['retour_combat']);\r\n\tunset($_SESSION['retour_attaque']);\r\n\tunset($_GET['move']);\r\n}", "title": "" }, { "docid": "26eaeedc3f68ff201a024a60be076a77", "score": "0.43815342", "text": "function generatePotentialMoves($shot, $possibleMoves){\n\t\t\t$cell = (($shot->getX() - 1) * 10) + ($shot->getY() - 1);\n\t\t\t\n\t\t\t// if the cell to the left exists or hasnt been hit, add it to potential move\n\t\t\tif( $shot->getY() > 1 && !empty($possibleMoves[$cell-1]) ) {\n\t\t\t\tarray_push($this->potentialShipLoc, $possibleMoves[$cell-1]);\n\t\t\t\tparent::removeShot($cell-1);\n\t\t\t}\n\t\t\t\n\t\t\t// if the cell to the right exists or hasnt been hit, add it to potential move\n\t\t\tif( $shot->getY() < 10 && !empty($possibleMoves[$cell+1]) ) {\n\t\t\t\tarray_push($this->potentialShipLoc, $possibleMoves[$cell+1]);\n\t\t\t\tparent::removeShot($cell+1);\n\t\t\t}\n\t\t\t\n\t\t\t// if the cell above exists or hasnt been hit, add it to potential move\n\t\t\tif( $shot->getX() > 1 && !empty($possibleMoves[$cell-10]) ) {\n\t\t\t\tarray_push($this->potentialShipLoc, $possibleMoves[$cell-10]);\n\t\t\t\tparent::removeShot($cell-10);\n\t\t\t}\n\t\t\t\n\t\t\t// if the cell below exists or hasnt been hit, add it to potential move\n\t\t\tif( $shot->getX() < 10 && !empty($possibleMoves[$cell+10]) ) {\n\t\t\t\tarray_push($this->potentialShipLoc, $possibleMoves[$cell+10]);\n\t\t\t\tparent::removeShot($cell+10);\n\t\t\t}\t\t\n\t\t}", "title": "" }, { "docid": "b0801ef745370d06982a13dd24e6e9e6", "score": "0.43718147", "text": "public function setWashMachine()\n {\n }", "title": "" }, { "docid": "11119170b0408543555e7d4d47ba55e9", "score": "0.43632692", "text": "abstract public function move ($fromx, $fromy, $tox, $toy);", "title": "" }, { "docid": "cd98a46dee4146d442153f92550bbe6f", "score": "0.43547", "text": "public function diagnose()\n {\n $this->diagnoseScreen()\n ->diagnoseHardDrive();\n }", "title": "" }, { "docid": "ffc219dd940a1a4b3fb31c1e9bf535f3", "score": "0.4352357", "text": "public function canMove(){\n return true;\n }", "title": "" }, { "docid": "a6a7596d76f8ce659be3bda3b5efc5f9", "score": "0.43491942", "text": "protected function memory_exceeded()\n {\n }", "title": "" }, { "docid": "a6a7596d76f8ce659be3bda3b5efc5f9", "score": "0.4348177", "text": "protected function memory_exceeded()\n {\n }", "title": "" }, { "docid": "bfec16caba57d4f144f540c55af472cc", "score": "0.43453664", "text": "public function move(){\n echo 'I move on all fours';\n }", "title": "" }, { "docid": "f8ec116ec57843983a5da04ea1a5f4d3", "score": "0.4341516", "text": "public function restoreNextBoard()\n {\n if ($this->currentBoard == count($this->historyOfBoards) - 1)\n {\n throw new \\Exception(\"There is no next board in the history.\");\n }\n\n $this->currentBoard++;\n $this->board->copy($this->historyOfBoards[$this->currentBoard]);\n }", "title": "" }, { "docid": "e8939f0cb4e5d206edd448648daeea42", "score": "0.43372834", "text": "public function getWhiteMove($move_no) {\n return $this->getMove($move_no, \"w\");\n }", "title": "" }, { "docid": "2d33fad828231cbfdcdd371d4ba2e27d", "score": "0.43351665", "text": "function check_o_winner($move_list){\n //Check horizontal winning conditions\n if($move_list[0] == \"O\" && $move_list[1] == \"O\" && $move_list[2] == \"O\"){\n exit(\"Game over. Player O is the winner!\\n\");\n }\n if($move_list[3] == \"O\" && $move_list[4] == \"O\" && $move_list[5] == \"O\"){\n exit(\"Game over. Player O is the winner!\\n\");\n }\n if($move_list[6] == \"O\" && $move_list[7] == \"O\" && $move_list[8] == \"O\"){\n exit(\"Game over. Player O is the winner!\\n\");\n }\n #Check vertical winning conditions\n if($move_list[0] == \"O\" && $move_list[3] == \"O\" && $move_list[6] == \"O\"){\n exit(\"Game over. Player O is the winner!\\n\");\n }\n if($move_list[1] == \"O\" && $move_list[4] == \"O\" && $move_list[7] == \"O\"){\n exit(\"Game over. Player O is the winner!\\n\");\n }\n if($move_list[2] == \"O\" && $move_list[5] == \"O\" && $move_list[8] == \"O\"){\n exit(\"Game over. Player O is the winner!\\n\");\n }\n #Check diagonal winning conditions\n if($move_list[0] == \"O\" && $move_list[4] == \"O\" && $move_list[8] == \"O\"){\n exit(\"Game over. Player O is the winner!\\n\");\n }\n if($move_list[2] == \"O\" && $move_list[4] == \"O\" && $move_list[6] == \"O\"){\n exit(\"Game over. Player O is the winner!\\n\");\n }\n}", "title": "" }, { "docid": "29d608a4208fd8917095fa5403146877", "score": "0.43074533", "text": "function navegadorMovil(){\n\t$iphone = strpos($_SERVER['HTTP_USER_AGENT'],\"iPhone\");\n\t$android = strpos($_SERVER['HTTP_USER_AGENT'],\"Android\");\n\t$palmpre = strpos($_SERVER['HTTP_USER_AGENT'],\"webOS\");\n\t$berry = strpos($_SERVER['HTTP_USER_AGENT'],\"BlackBerry\");\n\t$ipod = strpos($_SERVER['HTTP_USER_AGENT'],\"iPod\");\n\t$ipad = strpos($_SERVER['HTTP_USER_AGENT'],\"iPad\");\n\t \n\tif ($iphone || $android || $palmpre || $ipod || $berry || $ipad == true){\n\t\t$navMovil = true;\n\t} else{\n\t\t$navMovil = false;\n\t}\n\t\n\treturn $navMovil;\n}", "title": "" }, { "docid": "68902127f094a47503fe408f34a673aa", "score": "0.43059096", "text": "public function move($dest)\n {\n }", "title": "" }, { "docid": "b2471a1fcd43d14e062ca4e1af3de312", "score": "0.43033516", "text": "function MoveCard ($cardid, $destination, $x = 0, $y = 0, $morphed = false, $stackorder = \"TOP\") { \r\n global $CONF;\r\n $prefix = $CONF[GENERAL]['prefix'];\r\n $SQL_executed = array();\r\n $SQL_toexecute = array();\r\n $SQL_delete = array();\r\n $tempstack = '';\r\n \r\n if (!$this->valid) //Do nothing if we're not connected to a valid game\r\n return false;\r\n \r\n $card = $this->dblan->GetRow(\"select * from `\" . $prefix . \"_game\" . $this->gameid . \"_cards` where card_id = ?\", array($cardid));\r\n \r\n if (!isset($card['card_id']))\r\n return false;\r\n \r\n $success = true; //Assume success unless we set this to false\r\n $this->dblan->Execute(\"delete from `\" . $prefix . \"_game\" . $this->gameid . \"_cards` where card_id = ?\", array($cardid));\r\n $SQL_executed[0] = array(\"delete from `\" . $prefix . \"_game\" . $this->gameid . \"_cards` where card_id = ?\", array($cardid));\r\n \r\n if ($destination == 'table') { //The table needs extra parameters and ignores stackorder\r\n $SQL_toexecute = $this->sqlTableMove($card, $x, $y, $morphed);\r\n } else if (strpos(\"hand\", $destination)){ //The hand also ignores stackorder\r\n $SQL_toexecute = $this->sqlGenericMove($card, $destination);\r\n } else { //Everywhere else keeps stackorder\r\n $newstackorder = $this->moveCalculateStackOrder($stackorder, $destination, $SQL_executed);\r\n if ($newstackorder == false) { //Something was invalid in the arguments, so quietly re-insert the card as is\r\n $SQL_toexecute = $this->sqlGenericMove($card, $card['location'], $card['stackorder']);\r\n $success = false;\r\n } else {\r\n $SQL_toexecute = $this->sqlGenericMove($card, $destination, $newstackorder);\r\n }\r\n }\r\n \r\n $this->dblan->Execute($SQL_toexecute[0]);\r\n array_push($SQL_executed, $SQL_toexecute);\r\n \r\n //Notify players that there has been a move\r\n //Commit $SQL_executed to the game record\r\n \r\n return $success;\r\n }", "title": "" }, { "docid": "6c1e402650a829170dbb95f16369ca19", "score": "0.43002182", "text": "protected function loadMoves() {\n if ($this->gameId) {\n /** @var \\Drupal\\vchess\\Entity\\Move[] $moves */\n $moves = \\Drupal::entityTypeManager()->getStorage('vchess_move')\n ->loadByProperties(['gid' => $this->gameId]);\n\n foreach ($moves as $move) {\n $this->moves[$move->getMoveNo()][$move->getColor()] = $move;\n }\n ksort($this->moves);\n }\n }", "title": "" }, { "docid": "b8bab1b9d58225511a22ac74cd7bc022", "score": "0.42951286", "text": "public function move($from, $to);", "title": "" }, { "docid": "9959f11ab3224e8afb738673bb12398b", "score": "0.42902765", "text": "function stEvaluatePlayerMove() {\r\n // Determine if there's a district tie break decision to make.\r\n $unclaimedDistricts = self::getUnclaimedDistricts();\r\n if (count($unclaimedDistricts) > 0) {\r\n $this->gamestate->nextState(\"districtTieBreak\");\r\n return;\r\n }\r\n\r\n $turnsTaken = self::getGameStateValue(\"player_turns_taken\");\r\n $this->gamestate->nextState(\"samePlayer\");\r\n }", "title": "" }, { "docid": "3034e7153d76809dc2c7373aea75d34a", "score": "0.4284763", "text": "public function setup_pointers_for_screen()\n {\n }", "title": "" }, { "docid": "4fc9ed439d23c931de2e842ee5ee936e", "score": "0.42808098", "text": "public function restorePreviousBoard()\n {\n if ($this->currentBoard == 0) throw new \\Exception(\"There is no previous board in the history.\");\n\n $this->currentBoard--;\n $this->board->copy($this->historyOfBoards[$this->currentBoard]);\n }", "title": "" }, { "docid": "f3df00f43d682b667d4f8c9a50dca856", "score": "0.4269876", "text": "protected function getMove($move_no, $color) {\n if (array_key_exists($move_no, $this->moves) && array_key_exists($color, $this->moves[$move_no])) {\n return $this->moves[$move_no][$color];\n }\n return NULL;\n }", "title": "" }, { "docid": "af6dfe1d4f5b9fef1081625b4805d7d3", "score": "0.42608982", "text": "function GotoNextDevice () {\n\t//If the current device of the object is not connected to at all, gives back \"false\" and the object does not change\n\t\tglobal $dbh;\n\t\t$this->MakeSafe();\n\t\t\n\t\t$port=new DevicePorts();\n\t\t$port->DeviceID=$this->DeviceID;\n\t\t$port->PortNumber=$this->PortNumber;\n\t\tif ($port->getPort()){\n\t\t\tif (is_null($port->ConnectedDeviceID) || is_null($port->ConnectedPort)){\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\t$this->DeviceID=$port->ConnectedDeviceID;\n\t\t\t\t$this->PortNumber=-$port->ConnectedPort;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "c3ef22caec1d3b2f1a8342795cf75932", "score": "0.42573744", "text": "function MoveNumReg($NumReg){\r\n mysqli_data_seek($this->buscar, $NumReg);\r\n }", "title": "" }, { "docid": "a195e721fc633e8f68c5028aec6d55c9", "score": "0.42386433", "text": "abstract protected function kickoff();", "title": "" }, { "docid": "1494ee68e3f6b244928a50213e00d104", "score": "0.42329448", "text": "private function step(){\n for($i = 0; $i <= $this->x_size; ++$i)\n for($j = 0; $j <= $this->y_size; ++$j) {\n $neightbours = $this->neighbours_amount($i, $j);\n $this->change_cell(\n $neightbours,\n $this->copy_board[$i][$j]\n );\n }\n array_push($this->boards, $this->copy_board);\n $this->check_state();\n }", "title": "" }, { "docid": "9166ae37612d18c21b2763813d2260c2", "score": "0.42277333", "text": "public function leaveMachine(): void;", "title": "" }, { "docid": "f213c63b723fb71ba59a63a8d79b23e2", "score": "0.42244923", "text": "function move($start_pos, $steps_qty, $direction, $obstacles) {\n switch ($direction) {\n case 'N':\n // Calculetes new position if direction is North\n $x = ltrim(strstr($start_pos, ' ', true));\n $y1 = ltrim(strstr($start_pos, ' '));\n $y2 = $y1 + $steps_qty;\n\n $new_pos = $x . ' ' . $y2;\n\n foreach ($obstacles as $obstacle) {\n $x_obstacle = ltrim(strstr($obstacle, ' ', true));\n $y_obstacle = ltrim(strstr($obstacle, ' '));\n if ($x === $x_obstacle && $y2 >= $y_obstacle) {\n $new_y = $y_obstacle - 1;\n $new_pos = $x . ' ' . $new_y;\n }\n }\n\n return $new_pos;\n break;\n\n case 'S':\n\n // Calculetes new position if direction is South\n $x = ltrim(strstr($start_pos, ' ', true));\n $y1 = ltrim(strstr($start_pos, ' '));\n $y2 = $y1 - $steps_qty;\n\n $new_pos = $x . ' ' . $y2;\n\n foreach ($obstacles as $obstacle) {\n $x_obstacle = ltrim(strstr($obstacle, ' ', true));\n $y_obstacle = ltrim(strstr($obstacle, ' '));\n if ($x === $x_obstacle && $y2 <= $y_obstacle) {\n $new_y = $y_obstacle + 1;\n $new_pos = $x . ' ' . $new_y;\n }\n }\n \n return $new_pos;\n break;\n\n case 'E':\n // Calculetes new position if direction is East\n $x1 = ltrim(strstr($start_pos, ' ', true));\n $x2 = $x1 + $steps_qty;\n $y = ltrim(strstr($start_pos, ' '));\n\n $new_pos = $x2 . ' ' . $y;\n\n foreach ($obstacles as $obstacle) {\n $x_obstacle = ltrim(strstr($obstacle, ' ', true));\n $y_obstacle = ltrim(strstr($obstacle, ' '));\n if ($y === $y_obstacle && $x2 >= $x_obstacle) {\n $new_x = $x_obstacle - 1;\n $new_pos = $new_x . ' ' . $y;\n }\n }\n\n return $new_pos;\n break;\n\n case 'O':\n // Calculetes new position if direction is West\n $x1 = ltrim(strstr($start_pos, ' ', true));\n $x2 = $x1 - $steps_qty;\n $y = ltrim(strstr($start_pos, ' '));\n\n $new_pos = $x2 . ' ' . $y;\n\n foreach ($obstacles as $obstacle) {\n $x_obstacle = ltrim(strstr($obstacle, ' ', true));\n $y_obstacle = ltrim(strstr($obstacle, ' '));\n if ($y === $y_obstacle && $x2 <= $x_obstacle) {\n $new_x = $x_obstacle + 1;\n $new_pos = $new_x . ' ' . $y;\n }\n\n }\n\n return $new_pos;\n break;\n }\n }", "title": "" }, { "docid": "9bccfbecfcebfd1c7c44e832f728bb57", "score": "0.42204297", "text": "public function getValidMove(HumanPlayer $player)\n {\n while (true) {\n $this->interface->promptMove($player);\n $src_and_dest = $player->getMove();\n //$this->interface->displayBoard($this->board->board);\n if ($this->isValidMove($src_and_dest, $player)) { \n break; \n }\n }\n return $src_and_dest;\n }", "title": "" }, { "docid": "5fefd856a50bb90de3cca046bf92bb3e", "score": "0.42202002", "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": "841d947aba7c43906f546722ae313c59", "score": "0.4218715", "text": "public function moveDown()\n {\n // check passanger in queue where destination DOWN\n }", "title": "" }, { "docid": "1a3820fb2ebd220d09e3df72ca5f27ff", "score": "0.4218641", "text": "public function move(){\n if ($this->uri->segment(2) === FALSE)\n {\n if ($this->agent->is_referral())\n {\n echo $this->agent->referrer();\n }\n }\n else\n {\n $id = $this->uri->segment(2);\n $this->MPrinciples->move($id);\n $this->session->set_flashdata('success', 'A Principle successully moved');\n redirect('principle-list', 'refresh');\n }\n }", "title": "" }, { "docid": "79e0e75c8a88a966727f527f3052c830", "score": "0.421708", "text": "function moveSoldier($x, $y) {\n self::checkAction(\"moveSoldier\");\n\n $player_id = self::getActivePlayerId();\n $y = self::invertLineOnBoard($player_id, $y);\n\n //Identify which square has been selected\n $sql = \"SELECT board_player player_id, soldier_type soldier_type, soldier_id soldier_id FROM board WHERE (board_x = $x AND board_y = $y)\";\n $soldier = self::getCollectionFromDb($sql);\n $soldierOwner = (int)array_keys($soldier)[0];\n\n $ChosenSoldierId = self::getGameStateValue('ChosenSoldierId');\n \n $sql = \"SELECT board_player player_id, soldier_type soldier_type, board_x x, board_y y FROM board WHERE soldier_id = $ChosenSoldierId\";\n $selectedSoldier = self::getCollectionFromDb( $sql );\n\n $ChosenSoldierX = $selectedSoldier[$player_id]['x'];\n $ChosenSoldierY = $selectedSoldier[$player_id]['y'];\n $ChosenSoldierType = $selectedSoldier[$player_id]['soldier_type'];\n\n if($soldierOwner == $player_id) { //If a player click on another soldier of its own, select the new solider\n if($this->gamestate->state()[\"name\"] == \"specialScoutAction\") {\n throw new BgaUserException ( clienttranslate('You cannot change selected soldier, you already moved') );\n }\n else {\n $this->gamestate->nextState(\"selectSoldier\");\n\n $y = self::invertLineOnBoard($player_id, $y);\n self::selectSoldier($x, $y);\n\n return;\n }\n }\n else if((abs($x - $ChosenSoldierX) >= 1 && abs($y - $ChosenSoldierY) >= 1)) {\n throw new BgaUserException ( clienttranslate('You cannot move in diagonal') );\n }\n else if($this->gamestate->state()[\"name\"] == \"specialScoutAction\") {\n if($soldier[$soldierOwner]['soldier_type'] == $this->NO_TYPE) {\n throw new BgaUserException ( clienttranslate('You can only attack but not move') );\n }\n else if((abs($x - $ChosenSoldierX) > 1 || abs($y - $ChosenSoldierY) > 1)) {\n throw new BgaUserException ( clienttranslate('You can only attack close from you') );\n }\n }\n else if( (abs($x - $ChosenSoldierX) > 1 || abs($y - $ChosenSoldierY) > 1) ) {\n if ($ChosenSoldierType != $this->SCOUT) {\n throw new BgaUserException ( clienttranslate('You cannot move more than one square at a time') );\n }\n else if(self::specialScoutMovement($x, $y, $ChosenSoldierX, $ChosenSoldierY)) {\n throw new BgaUserException ( clienttranslate('There is a soldier or a lake on the direction') );\n }\n }\n\n //Conditions for specific soldiers\n $cheatWithSpecialSoldier = $this->NO_CHEAT;\n if($soldier[$soldierOwner]['soldier_type'] == $this->BOMB) {\n if($ChosenSoldierType != $this->MINER) {\n // $ChosenSoldierType = $this->BOMB - 1; //Cheat to kill any soldier which attack the bomb\n $cheatWithSpecialSoldier = $this->BOMB_KILLS;\n }\n }\n else if($soldier[$soldierOwner]['soldier_type'] == $this->MARSHAL) {\n if($ChosenSoldierType == $this->SPY) {\n // $soldier[$soldierOwner]['soldier_type'] = $this->SPY - 1; //Cheat to kill the marshal\n $cheatWithSpecialSoldier = $this->SPY_KILLS;\n }\n }\n else if($soldier[$soldierOwner]['soldier_type'] == $this->FLAG) { //End of the game\n //Get opponent score\n $oppopent_player_id = self::getOpponentID($player_id);\n $sql = \"SELECT player_id player_id, player_score player_score FROM player WHERE player_id = $oppopent_player_id\";\n $opponentscore = self::getCollectionFromDb( $sql );\n $opponentscore = $opponentscore[$oppopent_player_id]['player_score'];\n // self::dump( \"opponentscore = \", $opponentscore);\n \n // Update winner score\n $sql = \"UPDATE player SET player_score = $opponentscore + 1 WHERE player_id = $player_id\";\n self::DbQuery( $sql );\n\n //Send update to players\n $newScores = self::getCollectionFromDb( \"SELECT player_id, player_score FROM player\", true );\n self::notifyAllPlayers( \"newScores\", \"\", array(\n \"scores\" => $newScores\n ) );\n\n self::sendDiscoverNotification($ChosenSoldierId, \n $ChosenSoldierType, \n $soldier[$soldierOwner]['soldier_id'], \n $soldier[$soldierOwner]['soldier_type'],\n $player_id);\n\n $this->gamestate->nextState('endGame');\n return;\n }\n\n //Send movement to opponent player when scout action is finished an it attacks another soldier\n if($this->gamestate->state()[\"name\"] == \"specialScoutAction\") {\n self::sendMovementScoutAction();\n }\n\n // Verify if you just move on an empty square or, if you click on an opponent soldier, you will attack! and maybe die...\n if($soldier[$soldierOwner]['soldier_type'] == $this->NO_TYPE) {\n self::DbQuery(\"UPDATE board SET board_player = $player_id, soldier_type = $ChosenSoldierType, soldier_id = $ChosenSoldierId WHERE (board_x = $x AND board_y = $y)\");\n self::DbQuery(\"UPDATE board SET board_player = $this->NO_PLAYER, soldier_type = $this->NO_TYPE, soldier_id = $this->NO_SOLIDER_ID WHERE (board_x = $ChosenSoldierX AND board_y = $ChosenSoldierY)\");\n\n if($ChosenSoldierType == $this->SCOUT) { //Avoid sending info to do not tell it is a scout!\n $yTmp = self::invertLineOnBoard($player_id, $y);\n\n self::notifyPlayer(\n $player_id,\n 'moveSoldierEmptySquare', \n clienttranslate('${player_name} moves a soldier on board'), \n array (\n 'x' => $x,\n 'y' => $yTmp,\n 'soldier_id' => $ChosenSoldierId,\n 'opponent_soldier_id' => $soldier[$soldierOwner]['soldier_id'],\n 'player_id' => $player_id,\n 'player_name' => self::getActivePlayerName()\n )\n );\n\n self::setGameStateValue( 'ScoutSpecialActionX', $x ); //Save value to be able to use it if active player click EndTurn Button\n self::setGameStateValue( 'ScoutSpecialActionY', $y ); //Save value to be able to use it if active player click EndTurn Button\n }\n else {\n self::sendMovementNotification('moveSoldierEmptySquare', \n clienttranslate('${player_name} moves a soldier on board'), \n $x, \n $y, \n $ChosenSoldierId, \n $soldier[$soldierOwner]['soldier_id'],\n $player_id);\n }\n }\n else if(($ChosenSoldierType > $soldier[$soldierOwner]['soldier_type'] && $cheatWithSpecialSoldier == $this->NO_CHEAT)\n || $cheatWithSpecialSoldier == $this->SPY_KILLS) { //You attack a weaker opponent soldier or cheat with specific rules\n //Update board\n self::DbQuery(\"UPDATE board SET board_player = $player_id, soldier_type = $ChosenSoldierType, soldier_id = $ChosenSoldierId WHERE (board_x = $x AND board_y = $y)\");\n self::DbQuery(\"UPDATE board SET board_player = $this->NO_PLAYER, soldier_type = $this->NO_TYPE, soldier_id = $this->NO_SOLIDER_ID WHERE (board_x = $ChosenSoldierX AND board_y = $ChosenSoldierY)\");\n\n // Update scores\n $sql = \"UPDATE player SET player_score = player_score + 1 WHERE player_id = $player_id\";\n self::DbQuery( $sql );\n\n self::sendDiscoverNotification($ChosenSoldierId, \n $ChosenSoldierType, \n $soldier[$soldierOwner]['soldier_id'], \n $soldier[$soldierOwner]['soldier_type'],\n $player_id);\n\n self::sendMovementNotification('attackWeakerSoldier', \n clienttranslate('${player_name} attack a weaker soldier!!'), \n $x, \n $y, \n $ChosenSoldierId, \n $soldier[$soldierOwner]['soldier_id'], \n $player_id);\n\n self::updateSoldierCount(self::getOpponentID($player_id), $soldier[$soldierOwner]['soldier_type']);\n\n $newScores = self::getCollectionFromDb( \"SELECT player_id, player_score FROM player\", true );\n self::notifyAllPlayers( \"newScores\", \"\", array(\n \"scores\" => $newScores\n ) );\n }\n else if($ChosenSoldierType == $soldier[$soldierOwner]['soldier_type']) { //If you have the same level than the the opponent soldier\n //Update board\n self::DbQuery(\"UPDATE board SET board_player = $this->NO_PLAYER, soldier_type = $this->NO_TYPE, soldier_id = $this->NO_SOLIDER_ID WHERE (board_x = $x AND board_y = $y)\");\n self::DbQuery(\"UPDATE board SET board_player = $this->NO_PLAYER, soldier_type = $this->NO_TYPE, soldier_id = $this->NO_SOLIDER_ID WHERE (board_x = $ChosenSoldierX AND board_y = $ChosenSoldierY)\");\n\n // Update scores\n $sql = \"UPDATE player SET player_score = player_score + 1\";\n self::DbQuery( $sql );\n\n self::sendDiscoverNotification($ChosenSoldierId, \n $ChosenSoldierType, \n $soldier[$soldierOwner]['soldier_id'], \n $soldier[$soldierOwner]['soldier_type'],\n $player_id);\n\n self::sendMovementNotification('attackSameSoldier', \n clienttranslate('${player_name} attack a soldier of the same level...'), \n $x, \n $y, \n $ChosenSoldierId, \n $soldier[$soldierOwner]['soldier_id'], \n $player_id);\n\n self::updateSoldierCount(self::getGameStateValue( 'FirstPlayerID' ), $soldier[$soldierOwner]['soldier_type']);\n self::updateSoldierCount(self::getGameStateValue( 'SecondPlayerID' ), $soldier[$soldierOwner]['soldier_type']);\n\n $newScores = self::getCollectionFromDb( \"SELECT player_id, player_score FROM player\", true );\n self::notifyAllPlayers( \"newScores\", \"\", array(\n \"scores\" => $newScores\n ) );\n }\n else { //You attack a stronger soldier, you die...\n //Update board\n self::DbQuery(\"UPDATE board SET board_player = $this->NO_PLAYER, soldier_type = $this->NO_TYPE, soldier_id = $this->NO_SOLIDER_ID WHERE (board_x = $ChosenSoldierX AND board_y = $ChosenSoldierY)\");\n\n // Update scores\n $opponent_player_id = self::getOpponentID($player_id);\n $sql = \"UPDATE player SET player_score = player_score + 1 WHERE player_id = $opponent_player_id\";\n self::DbQuery( $sql );\n\n self::sendDiscoverNotification($ChosenSoldierId, \n $ChosenSoldierType, \n $soldier[$soldierOwner]['soldier_id'], \n $soldier[$soldierOwner]['soldier_type'],\n $player_id);\n\n self::sendMovementNotification('attackStrongerSoldier', \n clienttranslate('${player_name} attacks a stronger soldier...'), \n $x, \n $y, \n $ChosenSoldierId, \n $soldier[$soldierOwner]['soldier_id'], \n $player_id);\n\n self::updateSoldierCount($player_id, $ChosenSoldierType);\n\n $newScores = self::getCollectionFromDb( \"SELECT player_id, player_score FROM player\", true );\n self::notifyAllPlayers( \"newScores\", \"\", array(\n \"scores\" => $newScores\n ) );\n }\n\n if($ChosenSoldierType == $this->SCOUT \n && $this->gamestate->state()[\"name\"] == \"moveSoldier\"\n && $soldier[$soldierOwner]['soldier_type'] == $this->NO_TYPE)\n $this->gamestate->nextState(\"specialScoutAction\");\n else {\n self::setGameStateValue( 'ChosenSoldierId', 0 ); //Reset ID value\n $this->gamestate->nextState('moveSoldier');\n }\n }", "title": "" }, { "docid": "b007e732ae90bb92811742032f8deaa1", "score": "0.42070678", "text": "public function move($x, $y);", "title": "" }, { "docid": "eb9ef783b819e0dde857fd9a834eb0fe", "score": "0.42042696", "text": "private function move(string $move, array $current) : array {\n // Consider the axes to be the corners and not the edges\n switch ($move) {\n case 'n':\n $current['y']++;\n $current['z']--;\n break;\n case 'ne':\n $current['z']--;\n $current['x']++;\n break;\n\n case 'se':\n $current['x']++;\n $current['y']--;\n break;\n\n case 's':\n $current['y']--;\n $current['z']++;\n break;\n\n case 'sw':\n $current['z']++;\n $current['x']--;\n break;\n\n case 'nw':\n $current['x']--;\n $current['y']++;\n break;\n \n default:\n # code...\n break;\n }\n\n return $current;\n }", "title": "" }, { "docid": "c6a31b8a0c4e5e3ca9c0122f76b1eeb2", "score": "0.41950896", "text": "function check_x_winner($move_list){\n //Check horizontal winning conditions\n if($move_list[0] == \"X\" && $move_list[1] == \"X\" && $move_list[2] == \"X\"){\n exit(\"Game over. Player X is the winner!\\n\");\n }\n if($move_list[3] == \"X\" && $move_list[4] == \"X\" && $move_list[5] == \"X\"){\n exit(\"Game over. Player X is the winner!\\n\");\n }\n if($move_list[6] == \"X\" && $move_list[7] == \"X\" && $move_list[8] == \"X\"){\n exit(\"Game over. Player X is the winner!\\n\");\n }\n #Check vertical winning conditions\n if($move_list[0] == \"X\" && $move_list[3] == \"X\" && $move_list[6] == \"X\"){\n exit(\"Game over. Player X is the winner!\\n\");\n }\n if($move_list[1] == \"X\" && $move_list[4] == \"X\" && $move_list[7] == \"X\"){\n exit(\"Game over. Player X is the winner!\\n\");\n }\n if($move_list[2] == \"X\" && $move_list[5] == \"X\" && $move_list[8] == \"X\"){\n exit(\"Game over. Player X is the winner!\\n\");\n }\n #Check diagonal winning conditions\n if($move_list[0] == \"X\" && $move_list[4] == \"X\" && $move_list[8] == \"X\"){\n exit(\"Game over. Player X is the winner!\\n\");\n }\n if($move_list[2] == \"X\" && $move_list[4] == \"X\" && $move_list[6] == \"X\"){\n exit(\"Game over. Player X is the winner!\\n\");\n }\n}", "title": "" }, { "docid": "585949de429f57028b79229e85d84e3a", "score": "0.41909748", "text": "function move($gamedata)\n\t{\n\n\t\tif ($this->isOver())\n\t\t\treturn;\n\n\t\t//remove duplicate entries on the board\n\t\t$gamedata = array_unique($gamedata);\n\n\t\tforeach ($gamedata as $key => $value)\n\t\t{\n\t\t\tif ($value == $this->player)\n\t\t\t{\n\t\t\t\t//update the board in that position with the player's X or O\n\t\t\t\t$coords = explode(\"_\", $key);\n\t\t\t\t$this->board[$coords[0]][$coords[1]] = $this->player;\n\n\t\t\t\t//change the turn to the next player\n\t\t\t\tif ($this->player == \"X\")\n\t\t\t\t\t$this->player = \"O\";\n\t\t\t\telse\n\t\t\t\t\t$this->player = \"X\";\n\n\t\t\t\t$this->totalMoves++;\n\t\t\t}\n\t\t}\n\n\t\tif ($this->isOver())\n\t\t\treturn;\n\t}", "title": "" }, { "docid": "c49464c839f58bea9af1afd1d347df66", "score": "0.41875422", "text": "function makeMove($board, $col, $tokenType){\n\t\t//no need to check if column full\n\t\tfor($i = sizeof($board)-1; $i > 0; $i--){\n\t\t\tif($board[$i][$col] == 0){\n\t\t\t\t$board[$i][$col] = $tokenType;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $board;\n\t}", "title": "" }, { "docid": "be59fab784985fca65a55bc0a349c8eb", "score": "0.4186854", "text": "function movequest() {\n\tcheckPerm('view', false, 'storage');\n\t$lang =& DoceboLanguage::createInstance('poll');\n\t\n\t\n\t$id_poll = importVar('id_poll', true, 0);\n\t$back_url = urldecode(importVar('back_url'));\n\t$back_coded = htmlentities(urlencode($back_url));\n\t$source_seq = importVar('source_quest', true, 0);\n\t$dest_seq = importVar('dest_quest', true, 0);\n\t\n\tlist($id_quest) = sql_fetch_row(sql_query(\"\n\tSELECT id_quest \n\tFROM \".$GLOBALS['prefix_lms'].\"_pollquest \n\tWHERE id_poll = '$id_poll' AND sequence = '$source_seq'\"));\n\t\n\tif($source_seq < $dest_seq) {\n\t\tsql_query(\"\n\t\tUPDATE \".$GLOBALS['prefix_lms'].\"_pollquest \n\t\tSET sequence = sequence - 1 \n\t\tWHERE id_poll = '$id_poll' AND sequence > '\".($source_seq).\"' AND sequence < '\".($dest_seq).\"'\");\n\t\tsql_query(\"\n\t\tUPDATE \".$GLOBALS['prefix_lms'].\"_pollquest \n\t\tSET sequence = '\".($dest_seq - 1).\"' \n\t\tWHERE id_quest = '$id_quest'\");\n\t} else {\n\t\tsql_query(\"\n\t\tUPDATE \".$GLOBALS['prefix_lms'].\"_pollquest \n\t\tSET sequence = sequence + 1 \n\t\tWHERE id_poll = '$id_poll' AND sequence >= '\".($dest_seq).\"' AND sequence < '\".($source_seq).\"'\");\n\t\t\n\t\tsql_query(\"\n\t\tUPDATE \".$GLOBALS['prefix_lms'].\"_pollquest \n\t\tSET sequence = '$dest_seq' \n\t\tWHERE id_quest = '$id_quest'\");\n\t}\n\tfixPageSequence($id_poll);\n\tUtil::jump_to( 'index.php?modname=poll&op=modpollgui&id_poll='.$id_poll.'&back_url='.$back_coded);\n}", "title": "" }, { "docid": "dcbffff71a1ba6ff20d1e67ee1931465", "score": "0.4178787", "text": "function moveFirst() {\r\n \t\t\treset($this->model->triples);\r\n \t\t\t$this->position=0;\r\n }", "title": "" }, { "docid": "841c347fa0640e8000301aa106955c7a", "score": "0.41743755", "text": "function move($ndisks, $startPeg, $endPeg, &$tmp_v, &$return_list){\n if ($ndisks>0) {\n move($ndisks - 1,$startPeg, 3-$startPeg-$endPeg,$tmp_v,$return_list);\n $element=-array_search($startPeg,array_reverse($tmp_v))-1;\n $tmp_v[count($tmp_v)+$element]=$endPeg;\n array_push($return_list,[$startPeg, $endPeg,abs($element+1)]);\n move($ndisks - 1,3-$startPeg-$endPeg,$endPeg,$tmp_v,$return_list);\n }\n }", "title": "" }, { "docid": "e4a309e5987ab0a3df32034f974a93c0", "score": "0.4171385", "text": "private function move(){\t\n\t\tif(!$this->hasAccessRight())\n\t\t\treturn;\t\t\t\t\t\n\t\t$sourceTask = $this->getParam('source');\t\n\t\t$targetTask = $this->getParam('target');\n\t\tvar_dump($sourceTask.$targetTask);\n\t\t$sourceTaskParent = WTTaskUtil::findParenttaskByTaskid($sourceTask);\n\t\tif($sourceTaskParent != null)\n\t\t\tWTFactsAPI::delFact($sourceTaskParent, 'SubTask', $sourceTask, null, null);\n\t\tif(!WTTaskUtil::pageExist($targetTask))\n\t\t\tWTFactsAPI::createPageWithCategory($targetTask, 'Task');\t\n\t\tWTFactsAPI::addFact($targetTask, 'SubTask', $sourceTask, null, true, null);\n\t\t$this->result['success'] = true;\n\t}", "title": "" } ]
5b634271e52a8c9442eb96f2a0efd1e3
Get the value of a URL parameter by key.
[ { "docid": "e37761041482c5d766597406261dcf5b", "score": "0.75660735", "text": "public function getParameter(string $key)\n {\n return $this->parameters[$key];\n }", "title": "" } ]
[ { "docid": "e7e2ee2b6b99404e8d7372f76d161fca", "score": "0.795103", "text": "public function getParameter($key);", "title": "" }, { "docid": "0536825e3add95be1a9163ccf1b68ce4", "score": "0.785087", "text": "private function getUrlParameter($url, $key) {\n if (preg_match(\"/\\/$key\\/([^\\/]*)(\\/|$)/\", $url, $matches)) return $matches[1];\n }", "title": "" }, { "docid": "fcea122bcaeda1932b43e2813c317e23", "score": "0.7847867", "text": "function Get($key){\r\n //\r\n // return the value denoted by the key in the params array\r\n //\r\n if (array_key_exists($key, $this->params)) {\r\n $value = $this->params[$key];\t\t// Pull value from list\r\n return $value;\t\t\t\t// And return it to caller\r\n }\r\n return NULL;\t\t\t\t// Key was not found\r\n }", "title": "" }, { "docid": "a2bb4d165ae3b38a3e5a6c53d8d083cc", "score": "0.78313136", "text": "public function getParam($key);", "title": "" }, { "docid": "2dc6535fc9fbb67a4692a759e9f2c9d2", "score": "0.76413035", "text": "public function getParam( $key = \"\" ) {\n\t\treturn ArrayHelper::getValue( $this->_params, $key, false );\n\t}", "title": "" }, { "docid": "20bf0fbb8263ee93a4169f2c223ebf6b", "score": "0.742352", "text": "public function getParam(string $key)\n {\n if(key_exists($key, $this->params)) return $this->params[$key];\n return null;\n }", "title": "" }, { "docid": "dee678431648f0c69dccdbc8f9513beb", "score": "0.7342142", "text": "public function getParameter($key)\n {\n $config = $this->getApplication()->getConfig();\n\n return $config->get($key);\n }", "title": "" }, { "docid": "9653dc07d5eb0c0bf0deb05221550805", "score": "0.73242444", "text": "public static function parameter($key)\n {\n if (isset($_REQUEST[$key])) {\n return $_REQUEST[$key];\n }\n\n return false;\n }", "title": "" }, { "docid": "a06319946b41c70b8451ef307435b986", "score": "0.7315115", "text": "public function getParam($key) {\n return isset($this->aParams[$key])? $this->aParams[$key] : \"\";\n }", "title": "" }, { "docid": "9ed0a81d9c19a7dd6bb8ba7fbf19b664", "score": "0.7253237", "text": "function getGETValue($key){\n\treturn isset($_GET[$key]) ? $_GET[$key]: false;\n}", "title": "" }, { "docid": "62546af79295c1dbc2e7c46a07c05797", "score": "0.72217333", "text": "public function getParam($key) {\n return isset($this->aParam[$key])? $this->aParam[$key] : \"\";\n }", "title": "" }, { "docid": "fe1dec812256ddd1c8d2e7b7d5823b12", "score": "0.71958786", "text": "public function getParam($key)\n {\n if (isset($this->_params[$key])) {\n return $this->_params[$key];\n }\n\n return false;\n }", "title": "" }, { "docid": "682bd8ebcee3724df9400bbd22550da8", "score": "0.71892273", "text": "public function getParameter($key)\n {\n $key = (string) $key;\n if (key_exists($key, $this->_parameters)) {\n return $this->_parameters[$key];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "34ce3617ddde1100a8170176a6d5be1d", "score": "0.71727747", "text": "public function getValue(string $key);", "title": "" }, { "docid": "177a965ea9b03015e225601984c1b340", "score": "0.7152738", "text": "protected function _getParam($key)\r\n\t{\r\n\t\t$params = Katharsis_Request::getParams();\r\n\t\tif(array_key_exists($key,$params))\r\n\t\t{\r\n\t\t\treturn $params[$key];\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "title": "" }, { "docid": "de38ce06ab00f4ab9643924271f4963b", "score": "0.71286625", "text": "protected function getParameter($key)\r\n {\r\n if (isset($this->parameters[$key])) {\r\n return $this->parameters[$key];\r\n } else {\r\n return null;\r\n }\r\n }", "title": "" }, { "docid": "79b9dac458e5d918b812f141ddba9f8c", "score": "0.7121418", "text": "public static function find($key) {\r\n return trim($_GET[$key]);\r\n }", "title": "" }, { "docid": "ece99e5b87977074ac22fe194751d6f9", "score": "0.7086234", "text": "public function getParamByKey($key){\n \n if( array_key_exists( $key, array_dot( $this->service['param'] ) ) ){\n \n return array_get($this->service['param'], $key);\n }\n }", "title": "" }, { "docid": "b1f1fb82d00daa352c2651f573661da9", "score": "0.70744413", "text": "public function get_param($key=null)\r\n\t\t{\r\n\t\t\treturn ((isset($key)) ? $this->_param[$key] : $this->_param);\r\n\t\t}", "title": "" }, { "docid": "0d4db44cea8db1e923ea6165ea4445d2", "score": "0.7059428", "text": "public function getParam(string $key = null)\n {\n if ($key == null) {\n return $this->param->get();\n }\n if ($this->param->has($key) == false) {\n return;\n }\n return $this->param->get($key);\n }", "title": "" }, { "docid": "f19be44b86e005a27609276a1f987a61", "score": "0.70431465", "text": "public function getParam($key)\n {\n $value = null;\n\n if (property_exists(get_class($this), '_'.$key)) {\n $value = $this->{'_'.$key};\n }\n else if (isset($this->_customParams[$key])) {\n $value = $this->_customParams[$key];\n }\n\n return $value;\n }", "title": "" }, { "docid": "79200cc4219558de9dd8426ff4647649", "score": "0.70413375", "text": "function offsetGet($key)\n\t{\n\t\tif (array_key_exists($key, $this->params))\n\t\t{\n\t\t\treturn $this->params[$key];\n\t\t}\n\t}", "title": "" }, { "docid": "3ab641ead6e5352b23d423d5b9be25f9", "score": "0.70204633", "text": "public function __get($key) {\n if ( !empty($this->params) && array_key_exists($key, $this->params) ) {\n return $this->params[$key];\n }\n\n return NULL;\n }", "title": "" }, { "docid": "b0c2b1f514b72768250a9b78dbfab04b", "score": "0.700322", "text": "public function getParam($key)\n {\n if(array_key_exists($key,$this->request)) {\n return $this->request[$key];\n }else{\n throw new Exception(\"Index \\\"{$key}\\\"\n passed to method getParam() does not exist\");\n }\n }", "title": "" }, { "docid": "a8c24c63748c471277885681329ae5bd", "score": "0.6956265", "text": "public function getParam(string $key) : string\n {\n $params = $this->getParams();\n\n if (isset($params[$key])) {\n return $params[$key];\n }\n\n return '';\n }", "title": "" }, { "docid": "a73dd1409a642498bd124a233b87c668", "score": "0.6944202", "text": "public function getParam($key)\n {\n if (isset($this->request[$key])) {\n return $this->request[$key];\n }\n\n if (isset($this->files[$key])) {\n return $this->files[$key];\n }\n\n return false;\n }", "title": "" }, { "docid": "b4c4e969055178fe8b831eed65e2e494", "score": "0.693676", "text": "public function __get($key)\n\t{\n\t\tif (array_key_exists($key, $this->_params))\n\t\t{\n\t\t\treturn $this->_params[$key];\n\t\t}\n\t\t\n\t\treturn NULL;\n\t}", "title": "" }, { "docid": "b4c4e969055178fe8b831eed65e2e494", "score": "0.693676", "text": "public function __get($key)\n\t{\n\t\tif (array_key_exists($key, $this->_params))\n\t\t{\n\t\t\treturn $this->_params[$key];\n\t\t}\n\t\t\n\t\treturn NULL;\n\t}", "title": "" }, { "docid": "38e65ff5525a95cee8f544f53f356dd6", "score": "0.69261533", "text": "public function param( $key ) {\n\n\t\tif( isset( $_POST['achilles'] ) && isset( $_POST[ $key ] ) ) {\n\t\t\treturn $_POST[ $key ];\n\t\t}\n\t\t\n\t\treturn NULL;\n\t}", "title": "" }, { "docid": "71a248376c7bb1774ccf383e74bdac00", "score": "0.6911077", "text": "public static function getValueByKey(string $key);", "title": "" }, { "docid": "6521febf0a4920238903b39c068a11f9", "score": "0.69087195", "text": "public static function arg(string $key)\n {\n if (static::$request) {\n return @static::$request->url()->arg($key);\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "c70d5d763fea7b87ee85adf695571a01", "score": "0.6896438", "text": "public static function Get($key) {\n return isset($_GET[$key]) ? $_GET[$key] : false;\n }", "title": "" }, { "docid": "c661b684ae6e64dfed00b11933739865", "score": "0.68860215", "text": "function Get($key)\r\n\t{\r\n\t\tif (isset($_GET[$key]))\r\n\t\t{\r\n\t\t\treturn $_GET[$key];\t\r\n\t\t}\t\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\t\r\n\t}", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.6871378", "text": "public function get(string $key);", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.6871378", "text": "public function get(string $key);", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.6871378", "text": "public function get(string $key);", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.6871378", "text": "public function get(string $key);", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.6871378", "text": "public function get(string $key);", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.6871378", "text": "public function get(string $key);", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.6871378", "text": "public function get(string $key);", "title": "" }, { "docid": "3a23fd1de571a56567f7381d46ea4b75", "score": "0.6869312", "text": "public function get(/*mixed*/ $key);", "title": "" }, { "docid": "eaf6ebcc09e20600f4c6866c0d117504", "score": "0.6847062", "text": "public function getValue($key)\n {\n $value = '';\n if (isset($this->hQueryString[$key])) {\n $value = $this->hQueryString[$key];\n }\n if(isset($_SESSION['AAT']['debug']) && $_SESSION['AAT']['debug'] === 1) {\n\t\t\t$this->oDebugLog->addLog('input & output','QueryString','getValue',$key . ' = ' . $value); \n }\n\t\treturn $value; \n }", "title": "" }, { "docid": "456153d9577e9dc8c23612fbedcedb23", "score": "0.68452144", "text": "protected final function getParameter($key)\n {\n if (!isset($this->parameters[$key])) {\n throw new InvalidArgumentException('Key does not exist');\n }\n\n return $this->parameters[$key];\n }", "title": "" }, { "docid": "243886fa8606be9f0b754af67ab66b3f", "score": "0.682961", "text": "public function getValue($key);", "title": "" }, { "docid": "11216cd3763294e0ae2fb2fa0064362b", "score": "0.6816207", "text": "public function get( $key );", "title": "" }, { "docid": "11216cd3763294e0ae2fb2fa0064362b", "score": "0.6816207", "text": "public function get( $key );", "title": "" }, { "docid": "9860c0452fe83b2dd18e8e644b8e7a4a", "score": "0.6799214", "text": "public static function get($key);", "title": "" }, { "docid": "7976e5ad5ad0cfd74f48f155a75b4f17", "score": "0.67986786", "text": "public function get(/*# string */ $key)/*# : string */;", "title": "" }, { "docid": "2f8ee1cebec263cf2bbc5c7c3b3ee1ae", "score": "0.6789287", "text": "public function getRequestValue($key) {\n\t\treturn isset($_REQUEST[$key]) ? $_REQUEST[$key] : null;\n\t}", "title": "" }, { "docid": "adc23c04ea86b9b45eaf003610b11497", "score": "0.67564964", "text": "public function get($key) {\n\t\tlist($var, $key) = explode(':', $key);\n\n\t\tswitch (true) {\n\t\t\tcase in_array($var, ['params', 'data', 'query']):\n\t\t\t\treturn isset($this->{$var}[$key]) ? $this->{$var}[$key] : null;\n\t\t\tcase ($var === 'env'):\n\t\t\t\treturn $this->env(strtoupper($key));\n\t\t\tcase ($var === 'http' && $key === 'method'):\n\t\t\t\treturn $this->env('REQUEST_METHOD');\n\t\t\tcase ($var === 'http'):\n\t\t\t\treturn $this->env('HTTP_' . strtoupper($key));\n\t\t}\n\t}", "title": "" }, { "docid": "eff58cd999ca077ffda1325dac4dc272", "score": "0.6752819", "text": "function getGet($key) {\n return getFromReq($key, $_GET);\n}", "title": "" }, { "docid": "7be9aae75cd26887ddeb637bd2063121", "score": "0.67267317", "text": "public function getParameter($key=null)\n {\n if (isset($key)) {\n if (isset($this->params[$key])) {\n return $this->params[$key];\n }\n return null;\n }\n return $this->params;\n }", "title": "" }, { "docid": "ebfacb938031e6ed561be152f1e1b935", "score": "0.6724094", "text": "public function getParam($strKey) {\n return $this->objSystemCommon->getParam($strKey);\n }", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6720798", "text": "public function get($key);", "title": "" }, { "docid": "d5dd2740b8d1b1c911b37180aef99342", "score": "0.66915864", "text": "public function getParameter($sKey)\n {\n return $this->_aData[$sKey];\n }", "title": "" }, { "docid": "056d254ab4fb7eeba5f2374f6197c677", "score": "0.6672093", "text": "protected function _get( $key )\n\t{\n\t\tif( isset($_REQUEST[$key]) ) {\n\t\t\treturn $_REQUEST[$key];\n\t\t} else {\n\t\t\treturn NULL;\n\t\t}\n\t}", "title": "" }, { "docid": "07c4cc2edd6a2a486d9ef20df722b622", "score": "0.6647875", "text": "function get($key, $default=NULL) {\n return array_key_exists($key, $_GET) ? $_GET[$key] : $default;\n }", "title": "" }, { "docid": "39fdb022cd2a1212ad93f0fa31930026", "score": "0.6616353", "text": "function get($key = \"\")\n{\n if (trim($key) == \"\") {\n $get = $_GET;\n } else {\n if (isset($_GET[$key])) {\n $get = $_GET[$key];\n } else {\n $get = null;\n }\n \n }\n\n return $get;\n\n}", "title": "" }, { "docid": "e91dcede0418613965a6fc9af47890e4", "score": "0.6599091", "text": "private function getWithKey(?string $key = null) \n {\n if (!is_null($key)) {\n if (is_array($this->params)) {\n if (isset($this->params[$key])) {\n return $this->params[$key];\n } else {\n $this->errors[] = array(\n 'GENERAL Error' => 'There is no data with the key value you entered.'\n );\n return null;\n }\n } else {\n if (isset($this->params->$key)) {\n return $this->params->$key;\n } else {\n $this->errors[] = array(\n 'GEENERAL Error' => 'There is no data with the key value you entered.'\n );\n return null;\n }\n }\n } else {\n return $this->params;\n }\n }", "title": "" }, { "docid": "c4d351c546e2a88e2f6a70e2468dcd4c", "score": "0.65915024", "text": "public function getParam($key, $default = null);", "title": "" }, { "docid": "aec240ccc87884b103bffe27e935bc0f", "score": "0.6552523", "text": "public function get(string $key = '');", "title": "" }, { "docid": "34f07df0ee7566afcfe9911fe42ba7ec", "score": "0.65320486", "text": "function param($key, $default=false) {\n global $site;\n return $site->uri->params($key, $default);\n}", "title": "" }, { "docid": "72b391dab8e58ea38be7f2c19181ced4", "score": "0.6526922", "text": "public function get($key = null)\n {\n if ($key === null) {\n return $_GET;\n }\n\n return (isset($_GET[$key]) ? $_GET[$key] : false);\n }", "title": "" }, { "docid": "7b916b59fc7b29ca88f35f5bf7ea3ab4", "score": "0.6505534", "text": "private function getParam($key, $default = null)\n\t{\n\t\tif (array_key_exists($key, $this->params))\n\t\t{\n\t\t\treturn $this->params[$key];\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $default;\n\t\t}\n\t}", "title": "" } ]
83cf71f0d25f658a58ceee8ffde1e59b
Change the icon inside my account on Proteo Theme
[ { "docid": "05293404f13985f41e4c1d9872f9cec4", "score": "0.7221043", "text": "public function customize_my_account_proteo_icon( $icon, $endpoint ) {\n\t\t\tif ( $endpoint == $this->endpoint ) {\n\t\t\t\treturn '<span class=\"yith-proteo-myaccount-icons lnr lnr-diamond\"></span>';\n\t\t\t}\n\n\t\t\treturn $icon;\n\t\t}", "title": "" } ]
[ { "docid": "90ab8543b57f2c572c939f753d9c5bb2", "score": "0.6883407", "text": "public function icon()\n {\n $user = $this->di->get('user');\n if ($user->isLevel(UserLevels::USER)) {\n $imageUrl = (new Gravatar($user->email(), 35))->url();\n return \"<img class=\\\"login-button\\\" src=\\\"$imageUrl\\\">\";\n }\n return \"<i class=\\\"login-button fa fa-sign-in\\\"></i>\";\n }", "title": "" }, { "docid": "6aae3eb6a6dd156ac75cd230bd3e0201", "score": "0.66907626", "text": "function paypal_checkout_icon() {\n return 'https://d1zczzapudl1mr.cloudfront.net/icono-paypal-tarjetas.png'; // write your own image URL here\n }", "title": "" }, { "docid": "453746ba832ca3496440c5234e5d4e74", "score": "0.6662589", "text": "function wp_ozh_yourls_customicon($in) {\n\treturn WP_PLUGIN_URL.'/'.plugin_basename(dirname(dirname(__FILE__))).'/res/icon.gif';\n}", "title": "" }, { "docid": "8d2520425f1c6d5204363393e5eee111", "score": "0.6658521", "text": "public function module_icon_url() {\n \t\treturn '/standard_profile_module/img/icon.png';\n \t}", "title": "" }, { "docid": "1e698c0ebba24425fa8dee891c876597", "score": "0.66563827", "text": "public static function icon(): string\n\t{\n\t\treturn view('nova::svg.icon-profile')->render();\n\t}", "title": "" }, { "docid": "cbbbb9ca809eda5ddb64376e3e0af47d", "score": "0.6648317", "text": "public function addMenuIcon()\n { \n ?>\n <style>\n #adminmenu #toplevel_page_<?php echo $this->args['menu_slug']; ?> .wp-menu-image:before {\n content: \"\\<?php echo $this->args['icon_code']; ?>\"; \n font-family: 'FontAwesome' !important;\n font-size: 18px !important;\n }\n </style>\n <?php\n }", "title": "" }, { "docid": "d5f7d756178e4d859deababe0e048869", "score": "0.6589648", "text": "public function get_icon() {\n // FIXME: This is from the tutorial\n return 'fa fa-pencil';\n }", "title": "" }, { "docid": "8eaaaec0545d6d3a527130a121935423", "score": "0.65835303", "text": "public function get_icon() {\n return 'eicon-person';\n }", "title": "" }, { "docid": "f07af426f9091c161d8b9e726842831c", "score": "0.65743786", "text": "public function get_icon() {\n return 'addonse-creative-image';\n }", "title": "" }, { "docid": "1de17c9faef7b99f15eabd4f768e8d8b", "score": "0.6538544", "text": "function shoestrap_footer_icon() {\n global $wp_customize;\n\n if ( current_user_can( 'edit_theme_options' ) && !isset( $wp_customize ) ) : ?>\n <div id=\"shoestrap_icon\" class=\"visible-lg\">\n <a href=\"<?php echo admin_url( 'themes.php?page=shoestrap' ); ?>\"><i class=\"icon el-icon-cogs\"></i></a>\n </div>\n <?php endif; ?>\n </div>\n <?php\n}", "title": "" }, { "docid": "d3d432dd41e109bb58bc550995bc2056", "score": "0.6513316", "text": "public function add_icon_site() {\n\t\techo '<link rel=\"icon\" href=\"'.$GLOBALS['LOGIN_PAGE_LOGO']['icon'].'\" type=\"image/png\">'.\"\\n\";\n\t}", "title": "" }, { "docid": "0bcce4296ada6f9e6659406cd1a259a6", "score": "0.64118713", "text": "public function post_page_edit_icon(){\n global $current_screen;\n\n if($current_screen->parent_base != 'edit' ) return;\n\n $p = explode('?', $current_screen->parent_file );\n\n if( count($p) < 2 ) return;\n\n parse_str( $p[1], $args );\n\n if( !isset($args['post_type']) ) return;\n\n $type = $args['post_type'];\n\n if( empty($this->fields_info['types'][$type]['menu_icon']) ) return;\n\n $icon = $this->fields_info['types'][$type]['menu_icon'];\n $icon = str_replace( '-16.', '-32.', $icon );\n ?><style type=\"text/css\">\n body #icon-post, body #icon-edit {\n background: url(\"<?php echo EASYPOSTTYPES_ICONS_URL.$icon;?>\") no-repeat 50% 50%;\n }\n </style><?php\n\n }", "title": "" }, { "docid": "c3b73013983275a33bf43ab8032fb92c", "score": "0.64053106", "text": "protected function registerBackendIcons() {}", "title": "" }, { "docid": "80b907b38a8fe75b06ab2097c128e093", "score": "0.6378186", "text": "protected function registerTCAIcons() {}", "title": "" }, { "docid": "9024b88588992d1bdbffde8c667126a0", "score": "0.6373476", "text": "public function SetIcon() {\n\n if ($this->icon) {\n echo '<link rel=\"shortcut icon\" href=\"'.$this->icon.'.ico\" />';\n }\n }", "title": "" }, { "docid": "b5ff589574e1c079bde26293958a2bcb", "score": "0.6316559", "text": "function change_admin_icon($args){\r\n$args['menu_icon'] = 'dashicons-format-aside';\r\nreturn $args;\r\n}", "title": "" }, { "docid": "bfc806e56adacada2fac379dd36e16ac", "score": "0.63160086", "text": "function tve_leads_set_product_icon( $info ) {\n\t$info->icons['1x'] = TVE_LEADS_ADMIN_URL . 'img/thrive-leads-logo.png';\n\n\treturn $info;\n}", "title": "" }, { "docid": "e2f0e52ec1ee93477ac9bd268298fb6f", "score": "0.63112724", "text": "function newPayment_gateway_icon( $icon, $id ) {\n if ( $id === 'paypal' ) {\n return '<img src=\"' . get_stylesheet_directory_uri() . '/images/pp-logo.png\" alt=\"PayPal\" />';\n } else {\n return $icon;\n }\n}", "title": "" }, { "docid": "e8ea5333dd4ba443350efbb4a26f7247", "score": "0.62983555", "text": "public function icon($icon)\n {\n $this->options['menu_icon'] = $icon;\n }", "title": "" }, { "docid": "327c010a9111323b6cc475556daaf1da", "score": "0.6291809", "text": "public function get_icon() {\n return 'astha eicon-integration';\n }", "title": "" }, { "docid": "eb098c1348f36f54051ac2424766f9f6", "score": "0.6266115", "text": "function theme_haarlem_intranet_profile_icon($hook, $type, $return_value, $params) {\n\t\n\tif (!elgg_is_logged_in()) {\n\t\treturn;\n\t}\n\t\n\tif (empty($params) || !is_array($params)) {\n\t\treturn;\n\t}\n\t\n\t$user = elgg_extract('entity', $params);\n\tif (empty($user) || !($user instanceof ElggUser)) {\n\t\treturn;\n\t}\n\t\n\tif (!$user->haarlem_icontime) {\n\t\treturn;\n\t}\n\t\n\t$size = elgg_extract('size', $params);\n\t$icon_sizes = elgg_get_config('icon_sizes');\n\tif (!isset($icon_sizes[$size])) {\n\t\treturn;\n\t}\n\t\n\t$fh = new ElggFile();\n\t$fh->owner_guid = $user->getGUID();\n\t\n\t$fh->setFilename(\"haarlem_icon/{$size}.jpg\");\n\tif (!$fh->exists()) {\n\t\treturn;\n\t}\n\t\n\treturn \"haarlem_avatar/{$user->getGUID()}/{$size}/{$user->haarlem_icontime}.jpg\";\n}", "title": "" }, { "docid": "2a0baa8739845ebae0fb6150560bf0de", "score": "0.6261728", "text": "function permIcon($perm) {\r\n\t\t\tswitch($perm) {\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\treturn 'member_icon.gif';\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\treturn 'members_icon.gif';\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\treturn 'approve_icon.gif';\r\n\t\t\t\tdefault:\r\n\t\t\t\t\treturn 'stop_icon.gif';\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "1d3594f2b1f0fe6d2825fc8faab9dd29", "score": "0.6252936", "text": "public function icon(): string;", "title": "" }, { "docid": "1fcbd61fd51e5fd33dd7aa0918fc1173", "score": "0.62430394", "text": "function plugin_geticon_nextime()\r\n{\r\n global $_CONF;\r\n\r\n return $_CONF['layout_url'] . '/nextime/images/admin/nextime.gif';\r\n}", "title": "" }, { "docid": "bfd884d722a4ce9c752175557253ec8e", "score": "0.62029386", "text": "public function getIconUrl()\n {\n return UrlHelper::getResourceUrl('oauth/providers/instagram.svg');\n }", "title": "" }, { "docid": "0260d2d6d2e3573f7ac923696402c8bb", "score": "0.6201454", "text": "public function get_icon()\n\t{\n\t\treturn 'fab fa-algolia';\n\t}", "title": "" }, { "docid": "e03df2cc3762f10edfc2f7354e554a46", "score": "0.61993074", "text": "public function get_icon() {\n return 'eicon-carousel essential-addons-elementor-admin-icon';\n }", "title": "" }, { "docid": "c3746922ec43d92b617225756697b568", "score": "0.61761016", "text": "function userTypeIcon($type)\n{\n $types = [\n 'admin' => 'fa-user-secret',\n 'editor' => 'fa-users',\n 'contributor' => 'fa-users',\n 'user' => 'fa-user'\n ];\n \n if (array_key_exists($type, $types))\n {\n return $types[$type];\n }\n return 'fa-question'; \n}", "title": "" }, { "docid": "f60c7a85651ebcd7ac4eb13470e35e4e", "score": "0.6167252", "text": "public static function checkout_icon() {\n\t\treturn '<img src=\"https://www.epay.com/upload/images/paymentlogoshorizontal.png\" title=\"ePay\" id=\"epay_button\"/>';\n\t}", "title": "" }, { "docid": "5064cd9ef376aac7d150efc79a1bf014", "score": "0.61664027", "text": "function wpb_custom_logo() {\r\necho '<style type=\"text/css\">\r\n #wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before {\r\n background-image: url(' . get_bloginfo('stylesheet_directory') . '/images/core-image/icon.png) !important;\r\n background-position: center center;\r\n background-size: cover;\r\n backgroun-repeat: no-repeat;\r\n color:rgba(0, 0, 0, 0);\r\n }\r\n #wpadminbar #wp-admin-bar-wp-logo.hover > .ab-item .ab-icon {\r\n background-position: 0 0;\r\n }\r\n </style>\r\n';\r\n}", "title": "" }, { "docid": "ed319b6c8d5e2cb5cbebe6aec8dc2b90", "score": "0.6161587", "text": "public static function icones_mamagement () {\n if ( !current_user_can( 'manage_options' ) ) {\n wp_die( __( 'Vous n\\'avez pas de consulter cette page.' ) );\n }\n //permet d'utiliser la variable globale dans le fichier récupéré par la function require\n global $plugin_url;\n require( 'views/icon-wrapper.php' );\n }", "title": "" }, { "docid": "dd8e40b9a9a6d65b9b8d4c14d2eb53e2", "score": "0.6155494", "text": "function ilc_social_share_icons() {\n\tget_template_part( 'partials/social-shares-icons' );\n}", "title": "" }, { "docid": "41307b42800ddff3737715404bf8bd0f", "score": "0.61494917", "text": "public function icon()\n {\n return '/images/.png';\n }", "title": "" }, { "docid": "c7f3479362b746b2fc3e734fbafad76f", "score": "0.6135524", "text": "public static function set_tinymce_button_icon() {\n\t\t?>\n<style>\ni.mce-i-wcopc {\n\tfont: 400 20px/1 dashicons;\n\tpadding: 0;\n\tvertical-align: top;\n\tspeak: none;\n\t-webkit-font-smoothing: antialiased;\n\t-moz-osx-font-smoothing: grayscale;\n\tmargin-left: -2px;\n\tpadding-right: 2px\n}\n</style>\n<?php\n\t}", "title": "" }, { "docid": "5cfb3d5cb4f1dc041b8d1c7fad0687a9", "score": "0.61154485", "text": "public function get_icon() {\n return 'fa fa-twitch';\n }", "title": "" }, { "docid": "285e675b52644ad8cbf83aa8aafcdb7f", "score": "0.61094594", "text": "function r0bsc0tt_social_callback(){ \n $social_media_accounts = social_media_accounts_translated();\n //loop through to get accounts, then use genericons to display a link to each\n foreach ($social_media_accounts as $account => $name) {\n \tif (get_theme_mod('r0bsc0tt_social_'.$name.'')) {\n \t\techo '<a href=\"'.get_theme_mod('r0bsc0tt_social_'.$name.'').'\" class=\"r0bsc0tt-social-icons\" id=\"r0bsc0tt-social-'.strtolower($name).'\" target=\"_blank\"><span>'.$name.'</span></a>'. PHP_EOL;\n }\n }\n}", "title": "" }, { "docid": "fe3b61037e270fb4c6f28193e13c8a0d", "score": "0.6091021", "text": "public function get_icon() {\n return 'eicon-button';\n }", "title": "" }, { "docid": "dd292e5408b97ff75625524ee7a70e39", "score": "0.60624295", "text": "public function add_default_icon_wrap(){\n\t\tif (is_admin()) {\n\t\t\t$screen = get_current_screen();\n\n\t\t\t$array = [\n\t\t\t\t'dashboard' => 'fa-dashboard',\n\t\t\t\t'edit-post' => 'fa-pencil',\n\t\t\t\t'post' => 'fa-pencil',\n\t\t\t\t'edit-category' => 'fa-unlink',\n\t\t\t\t'edit-post_tag' => 'fa-tag',\n\t\t\t\t'upload' => 'fa-upload',\n\t\t\t\t'media' => 'fa-upload',\n\t\t\t\t'edit-page' => 'fa-pencil',\n\t\t\t\t'page' => 'fa-pencil',\n\t\t\t\t'edit-comments' => 'fa-comment',\n\t\t\t\t'themes' => 'fa-paint-brush',\n\t\t\t\t'widgets' => 'fa-th-large',\n\t\t\t\t'nav-menus' => 'fa-th-list',\n\t\t\t\t'plugins' => 'fa-plug',\n\t\t\t\t'users' => 'fa-users',\n\t\t\t\t'profile' => 'fa-user',\n\t\t\t\t'options-general' => 'fa-cog',\n\t\t\t\t'options-writing' => 'fa-cog',\n\t\t\t\t'options-reading' => 'fa-cog',\n\t\t\t\t'options-discussion' => 'fa-cog',\n\t\t\t\t'options-media' => 'fa-cog',\n\t\t\t\t'options-permalink' => 'fa-cog',\n\n\t\t\t\t//Extra page\n\t\t\t\t//'user_maharat' => 'fa-user'\n\t\t\t];\n\t\t\tforeach($array as $screen_id => $icon_wrap) {\n\n\t\t\t\t//Extrapage\n\t\t\t\tif (strlen(strstr($screen->id,'_page_')) >0) {\n\t\t\t\t\tif(strstr($screen->id,'_page_'.$screen_id)) {\n\t\t\t\t\t\tadd_action_once('adminpage_icon', function() use ($screen_id, $array) {\n\t\t\t\t\t\t\techo \"fa {$array[$screen_id]}\";\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//base wordpress page\n\t\t\t\tif ($screen->id == $screen_id) {\n\t\t\t\t\tadd_action_once('adminpage_icon', function() use ($screen_id, $array) {\n\t\t\t\t\t\techo \"fa {$array[$screen_id]}\";\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8eb30270b39af6c78501d8616383a48b", "score": "0.6043236", "text": "public function show_icon()\n\t{\n\t\treturn plugins_url('/assets/images/' . $this->id . '.png', plugin_basename(dirname(__FILE__)));\n\t}", "title": "" }, { "docid": "806d6670e63eacc2220127fdd611bffc", "score": "0.60308725", "text": "public function icon() {\n\t\treturn 'reveal';\n\t}", "title": "" }, { "docid": "6f282addc31182abb8cd803fa83edfe2", "score": "0.6024707", "text": "public function getIcon(){\n\t\tswitch ($this->getType()) {\n\t\t\tcase 'info':\n\t\t\t\treturn '<i class=\"fa fa-info-circle text-info\"></i>';\n\t\t\tcase 'warning':\n\t\t\t\treturn '<i class=\"fa fa-exclamation-triangle text-warning\"></i>';\n\t\t\tcase 'request':\n\t\t\t\treturn '<i class=\"fa fa-bell-o text-warning\"></i>';\n\t\t\tcase 'success':\n\t\t\t\treturn '<i class=\"fa fa-check text-success\"></i>';\n\t\t}\n\t}", "title": "" }, { "docid": "4270ab9adc3a9133b1ae602f5ee16b27", "score": "0.6018317", "text": "function shapely_social_icons() {\n\t\tif ( has_nav_menu( 'social-menu' ) ) {\n\t\t\twp_nav_menu(\n\t\t\t\tarray(\n\t\t\t\t\t'theme_location' => 'social-menu',\n\t\t\t\t\t'container' => 'nav',\n\t\t\t\t\t'container_id' => 'social',\n\t\t\t\t\t'container_class' => 'social-icons',\n\t\t\t\t\t'menu_id' => 'menu-social-items',\n\t\t\t\t\t'menu_class' => 'list-inline social-list',\n\t\t\t\t\t'depth' => 1,\n\t\t\t\t\t'fallback_cb' => '',\n\t\t\t\t\t'link_before' => '<i class=\"social_icon fa\"><span>',\n\t\t\t\t\t'link_after' => '</span></i>',\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "9b337668d3da13b8ae536b92e7f38bb0", "score": "0.60034466", "text": "function user_icon()\n{\n //$user = wp_get_current_user();\n global $current_user;\n get_currentuserinfo();\n $user_id = $user->ID;\n $user_fields = stm_get_user_custom_fields( $user_id );\n?>\n <div class=\"profile_picture sticky\">\n <div class=\"acco-title\">\n <?php global $current_user;\n wp_get_current_user();\n echo $current_user->user_login;\n \n ?>\n </div>\n <div class=\"profile_area\">\n <?php\n $link = add_query_arg(array('page_admin' => 'settings'), stm_get_author_link(''));\n $hide_empty = '';\n if(!empty($user_fields['image'])) \n {\n $hide_empty = 'hide-empty';\n echo '<img src=\"'.esc_url($user_fields['image']).'\" width=\"100%\" />';\n } \n else \n {\n $hide_empty = 'hide-photo';\n echo '<img src=\"'.get_template_directory_uri().'/assets/images/gravataricon.png\" width=\"100%\" />';\n } ?>\n \n \n </div>\n \n<?php \n}", "title": "" }, { "docid": "3d122e45dae615f4937b00b97f963792", "score": "0.59964764", "text": "public function getIcon(): string {\n return 'far fa-images';\n }", "title": "" }, { "docid": "b90f4b02d9d875b9f612c9eb642587f0", "score": "0.59928447", "text": "function msp_file_icon($variables) {\n $file = $variables['file'];\n $icon_directory = drupal_get_path('theme', 'msp') . '/images/icons';\n\n $mime = check_plain($file->filemime);\n $icon_url = file_icon_url($file, $icon_directory);\n return '<img alt=\"\" class=\"file-icon\" src=\"' . $icon_url . '\" title=\"' . $mime . '\" />';\n}", "title": "" }, { "docid": "ee0919edbcac7bfad67b42a7f99292f3", "score": "0.5988266", "text": "public function modifyAvatar()\n {\n $pageTwig = 'Profil/profil.html.twig';\n $template = $this->twig->load($pageTwig);\n echo $template->render([\n 'slug' => 'avatar', \n 'status' => $_SESSION['status'], \n 'user' => $_SESSION['utilisateur'], \n 'avatar' => $_SESSION['avatar'], \n 'alertMessage' => $_SESSION['receiveMessage']\n ]);\n }", "title": "" }, { "docid": "a8878c6b608ab9cdb22a01617b7e9c81", "score": "0.59857386", "text": "function modal_buddy_use_site_icon() {\n\t/**\n\t * filter here to disable the \"site icon avatar\"\n\t *\n\t * @since 1.0.0\n\t *\n\t * @param bool $value True to use the site icon, false otherwise.\n\t */\n\treturn (bool) apply_filters( 'modal_buddy_use_site_icon', function_exists( 'get_site_icon_url' ) );\n}", "title": "" }, { "docid": "089ac725c5d274347546090da0b20f8b", "score": "0.5983812", "text": "public function change_login_logo()\n {\n $logo_url = esc_url(get_theme_mod($this->logo_setting_name));\n if (get_theme_mod($this->logo_setting_name)): \n ?>\n <style type=\"text/css\">\n #login h1 a, .login h1 a {\n background-image: url(<?php echo $logo_url; ?>);\n width: 200px;\n height: 150px;\n background-size: 200px;\n padding-bottom: 30px;\n }\n </style>\n <?php \n endif;\n }", "title": "" }, { "docid": "9bf3d7c77a49d14ac00ea02066928cee", "score": "0.59768575", "text": "function image() {\n return data_field_admin::field_icon($this);\n }", "title": "" }, { "docid": "989a26fecfec14ffb58608e079ab938e", "score": "0.5973744", "text": "public function icon() {\n\t\treturn 'rating';\n\t}", "title": "" }, { "docid": "bc867d09de2e4ab5362272e07d7fae94", "score": "0.59725016", "text": "function update_mymoodle_icon() {\n\t\n\tglobal $CFG, $USER;\n\t\n\tif (! empty ( $USER->editing )) {\n\t\t$string = get_string ( 'updatemymoodleoff' );\n\t\t$edit = '0';\n\t} else {\n\t\t$string = get_string ( 'updatemymoodleon' );\n\t\t$edit = '1';\n\t}\n\t\n\treturn \"<form $CFG->frametarget method=\\\"get\\\" action=\\\"$CFG->wwwroot/my/index.php\\\">\" . \"<div>\" . \"<input type=\\\"hidden\\\" name=\\\"edit\\\" value=\\\"$edit\\\" />\" . \"<input type=\\\"submit\\\" value=\\\"$string\\\" /></div></form>\";\n}", "title": "" }, { "docid": "9d18b9bea11e69cba3e99e2282001d05", "score": "0.59446305", "text": "function secret_newIconFont() {\n wp_register_style(\n 'redux-font-awesome',get_template_directory_uri().'/fonts/fa/css/font-awesome.min.css',\n array(),\n time(),\n 'all'\n ); \n wp_enqueue_style( 'redux-font-awesome' );\n}", "title": "" }, { "docid": "a1d7f6b068cc27d31977732da54462d6", "score": "0.59280026", "text": "public static function get_image() {\n\t\treturn 'tap-add-user';\n\t}", "title": "" }, { "docid": "f33461ed2b7abb201965fc2c54d8d416", "score": "0.5920363", "text": "protected function _accountAvatar()\r\n\t{\r\n\t}", "title": "" }, { "docid": "698bbad1c2655533220f8f4945be0120", "score": "0.59110016", "text": "public function get_icon() {\n return 'eicon-coding';\n }", "title": "" }, { "docid": "d3fcd36e2becc984c86d997fcbe3db06", "score": "0.59089464", "text": "public function icon() {\n\t\treturn 'button';\n\t}", "title": "" }, { "docid": "3caa40611edcd1123a8a04a5659cfe3e", "score": "0.590527", "text": "public function activate_favicon()\n {\n if (get_theme_mod($this->favicon_setting_name)) \n {\n echo \"<link rel='Shortcut Icon' type='image/x-icon' href='\" .\n esc_url(get_theme_mod($this->favicon_setting_name)) . \"' />\";\n }\n }", "title": "" }, { "docid": "afec30fb88b0ba2a6c81f1c3ed737da8", "score": "0.5897342", "text": "function add_icons_to_header() {\n wp_register_style( 'cc85-awesome-icons', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css', array(), '1.0', 'all');\n}", "title": "" }, { "docid": "f433787da4cbc5ce136741a463f1e6d0", "score": "0.58926284", "text": "protected function assignIcon()\n {\n switch ($this->suite) {\n\n case 'D':\n $this->icon = '&diams;';\n break;\n\n case 'H':\n $this->icon = '&hearts;';\n break;\n\n case 'S':\n $this->icon = '&spades;';\n break;\n\n case 'C':\n $this->icon = '&clubs;';\n break;\n }\n }", "title": "" }, { "docid": "e202126a73251a9ef9614d08fe423865", "score": "0.58843374", "text": "function add_menu_icons_styles()\n{\n ?>\n\n<style>\n#adminmenu .menu-icon-cpt div.wp-menu-image:before {\n content: \"\\f319\";\n}\n</style>\n\n<?php\n}", "title": "" }, { "docid": "f0019ee2a9dfa8ac83f1a92ba3f33207", "score": "0.58834606", "text": "public function get_icon() {\r\n return 'fas fa-file-code';\r\n }", "title": "" }, { "docid": "986db079d51343c2d7023e4501c835f4", "score": "0.58824503", "text": "function getIconPath ()\r\n {\r\n return \"./icons/\";\r\n }", "title": "" }, { "docid": "afed95aa9d29184e33ddf4566e7d73cd", "score": "0.58801335", "text": "public function registerIconShortcode()\n {\n $this->grav['shortcode']->registerAllShortcodes(__DIR__.'/shortcodes');\n }", "title": "" }, { "docid": "ce6c3361522ae36d29bd3108441338a2", "score": "0.58782125", "text": "protected function getIcon() {\n return '';\n }", "title": "" }, { "docid": "2967b29110f706025c518c3939f60cbd", "score": "0.5847912", "text": "public function get_icon() {\n return 'fa fa-code';\n }", "title": "" }, { "docid": "5ca1e38d8f14c4e0f1230695adb9047f", "score": "0.5847499", "text": "public function getManageIconUrlAttribute()\n {\n return module(\"manage\")->getAssetPath(\"images/settings/$this->category.svg\");\n }", "title": "" }, { "docid": "2209f1be78674707fecaffec9f6ef894", "score": "0.5847368", "text": "function base_admin_bar_add_custom_logo() {\n\t?>\n\t<style>\n\t#wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon::before {\n\t\tbackground-image: url('<?php echo esc_url( THEME_IMAGES ); ?>/logo-admin-branding.svg');\n\t\tbackground-position: center;\n\t\tbackground-repeat: no-repeat;\n\t\tcolor: transparent;\n\t}\n\t</style>\n\t<?php\n}", "title": "" }, { "docid": "8cbf521508ad54e4b2c998013b597067", "score": "0.5846005", "text": "public function get_default_icon()\n {\n return 'themes/default/images_custom/icons/48x48/menu/adminzone/audit/community_billboard.png';\n }", "title": "" }, { "docid": "a71d4e7454615dacd2d8002fde243e95", "score": "0.58320785", "text": "function admin_favicon() {\n echo '<link rel=\"icon\" sizes=\"512x512\" type=\"image/png\" href=\"'\n . Assets\\asset_path('images/favicons/favicon-admin.png') . '\">';\n}", "title": "" }, { "docid": "e45c02146500091594cb358b92832ea1", "score": "0.5818621", "text": "public function get_icon() {\r\n\t\treturn 'fa fa-product-hunt';\r\n\t}", "title": "" }, { "docid": "e0d70623dffd07c9b36d31ee04f14d7a", "score": "0.58171165", "text": "function tfuse_icon_check() {\n return '<img src=\"' . get_template_directory_uri(). '/images/icons/icon_check2.png\" class=\"check_icon\" />';\n}", "title": "" }, { "docid": "8a7a015546d50e36676b4a73fa47b711", "score": "0.5812241", "text": "public function get_icon() {\n return 'eicon-alert';\n }", "title": "" }, { "docid": "a0d21abc92bb9854c85a758d20a6d8ef", "score": "0.5811696", "text": "public function setIcon($icon)\n\t{\n\t\t$this->icon = $icon;\n\t}", "title": "" }, { "docid": "661501fb31b7906c3f14ed488736b851", "score": "0.57931554", "text": "function favicon4admin() {echo '<link rel=\"Shortcut Icon\" type=\"image/x-icon\" href=\"' . get_bloginfo('template_directory') . '/favicon.ico\" />';}", "title": "" }, { "docid": "55aba4a294d3fd05bdc7e351c8588102", "score": "0.57903266", "text": "function GetNotifIcon($type)\n\t{\n\tglobal $template_phrases;\n\tif ($type == 1)\n\t\t$return = $GLOBALS['common_path'].'comment_ico.jpg';\n\tif ($type == 2)\n\t\t$return = $GLOBALS['common_path'].'comment_ico.jpg';\n\t\t\n\treturn($return);\n\t}", "title": "" }, { "docid": "827a2043f6c8c7c9f1d016f18dc71ff4", "score": "0.5779085", "text": "function addonse_render_icon( $settings = [], $old_icon_id = 'icon', $new_icon_id = 'selected_icon', $attributes = [] ) {\n // Check if its already migrated\n $migrated = isset( $settings['__fa4_migrated'][ $new_icon_id ] );\n // Check if its a new widget without previously selected icon using the old Icon control\n $is_new = empty( $settings[ $old_icon_id ] );\n\n $attributes['aria-hidden'] = 'true';\n\n if ( addonse_is_elementor_version( '>=', '2.6.0' ) && ( $is_new || $migrated ) ) {\n \\Elementor\\Icons_Manager::render_icon( $settings[ $new_icon_id ], $attributes );\n } else {\n if ( empty( $attributes['class'] ) ) {\n $attributes['class'] = $settings[ $old_icon_id ];\n } else {\n if ( is_array( $attributes['class'] ) ) {\n $attributes['class'][] = $settings[ $old_icon_id ];\n } else {\n $attributes['class'] .= ' ' . $settings[ $old_icon_id ];\n }\n }\n printf( '<i %s></i>', \\Elementor\\Utils::render_html_attributes( $attributes ) );\n }\n}", "title": "" }, { "docid": "451ca1994c9228d8095bf8a0715c905f", "score": "0.57754785", "text": "function set_staff_icon() {\n global $post_type;\n ?>\n <style>\n <?php if ((isset($_GET['post_type']) && $_GET['post_type'] == 'staff') || ($post_type == 'staff')) : ?>\n #icon-edit { background:transparent url('<?php echo get_bloginfo('url');?>/wp-admin/images/icons32.png') no-repeat -600px -5px; }\n <?php endif; ?>\n \n #adminmenu #menu-posts-staff div.wp-menu-image{background:transparent url('<?php echo get_bloginfo('url');?>/wp-admin/images/menu.png') no-repeat scroll -300px -33px;}\n #adminmenu #menu-posts-staff:hover div.wp-menu-image,#adminmenu #menu-posts-staff.wp-has-current-submenu div.wp-menu-image{background:transparent url('<?php echo get_bloginfo('url');?>/wp-admin/images/menu.png') no-repeat scroll -300px -1px;} \n </style>\n <?php\n}", "title": "" }, { "docid": "32c8f7761c9423857aa2812c75eae3d0", "score": "0.57658917", "text": "function jltmaf_dashboard_icon(){ ?>\n\t<style>\n\t\t/*FAQs Dashboard Icons*/\n\t\t#adminmenu .menu-icon-faq div.wp-menu-image:before { content: \"\\f348\"; }\n\n\t\t.jltmaf-pro-badge{\n\t\t \tposition: absolute;\n\t\t \tz-index: 333;\n\t\t \ttext-align: center;\n\t\t \tpadding-left: 23%;\n\t\t \tfont-size: 70px !important;\n\t\t \tpadding-top: 10%;\n\t\t}\n\t\t.jltmaf-pro-badge:before{\n\t\t\tcontent: 'Pro';\n\t\t\tfont-size: 90px;\n\t\t\tcolor: #fff;\n\t\t\tbackground: #000;\n\t\t\tpadding: 20px;\n\t\t\tborder-radius: 30px; \n\t\t\topacity: .6;\n\t\t}\n\t\t.top-badge{\n\t\t \tpadding-left: 20%;\n\t\t \tpadding-top: 0;\n\t\t}\n\t\t.jltmaf-disabled{\n\t\t \tpointer-events: none;\n\t\t \topacity: 0.4;\n\t\t}\n\t\t.jltmaf-pro-feature{\n\t\t\tposition: absolute;\n\t\t\tz-index: 555;\n\t\t\ttext-align: center;\n\t\t\tfont-size: 30px;\n\t\t\topacity: 1;\n\t\t\tpadding-left: 3%;\n\t\t\tfont-size: 70px !important;\n\t\t\tpadding-top: 10%;\n\t\t}\n\t\t.jltmaf-text-small{\n\t\t\tposition: relative !important;\n\t\t\tfont-size: 12px !important;\n\t\t\tfont-style: italic !important;\n\t\t\tcolor: #000 !important;\n\t\t\topacity: .8 !important;\n\t\t}\n\t</style>\n\t<?php\n}", "title": "" }, { "docid": "86010ae957b4d768dd1c4bcb8e4a610a", "score": "0.57658863", "text": "public function getProfileIcons()\n {\n return $this->getFile('profileicon');\n }", "title": "" }, { "docid": "ecc9c14d9d3f8e4c53b33412c5a61fd8", "score": "0.5763825", "text": "public function getUserIcon()\n {\n return $this->userIcon;\n }", "title": "" }, { "docid": "3886059db4eb2642201be496283aa0f6", "score": "0.5763733", "text": "function setIconName($name);", "title": "" }, { "docid": "36ac5f96dd9a8abaf762247cf6093b4a", "score": "0.57619065", "text": "public function get_icon() {\n\t\treturn 'fa fa-star';\n\t}", "title": "" }, { "docid": "0b04fa00dfe9710e8ae54ddd27dc6c0c", "score": "0.57577795", "text": "public function getStrIcon() {\n return \"icon_favorite\";\n }", "title": "" }, { "docid": "f0fe72eb6306788dd4d98f2479bd0173", "score": "0.5757036", "text": "function placeholder_avatar()\n{\n\treturn find_theme_image('ocf_default_avatars/default_set/ocp_fanatic',true);\n}", "title": "" }, { "docid": "039c42b26e14cf22a2aa86bb1c873985", "score": "0.5744873", "text": "public function icon($value) {\n return $this->setProperty('icon', $value);\n }", "title": "" }, { "docid": "8be340cbbf07a23ca1153fa89fe9310f", "score": "0.5731264", "text": "function my_custom_login_logo()\n{\n echo '\n <style>\n .login h1 a {\n background-image:url(\"' . get_option('consilio_options')['login_logo'] . '\");\n background-size: ' . get_option('consilio_options')['width_login_logo'] . ' ' . get_option('consilio_options')['height_login_logo'] . ';\n color: blue;\n fill: currentColor;\n width: 100%;\n }\n ' . get_option('consilio_options')['login_css'] . '\n </style>\n ';\n}", "title": "" }, { "docid": "29c7a0aca4d97b094f007d0fee6ca880", "score": "0.5730918", "text": "public function get_icon() {\n\t\treturn 'eicon-tabs';\n\t}", "title": "" }, { "docid": "a6ad317c4f07d78bd6412042721cdb1c", "score": "0.57274514", "text": "function md_custom_login_logo() {\n\t echo '<style type=\"text/css\">\n\t\t\t h1 a { background-image: url('.get_option('of_login_logo').') !important; }\n\t\t\t</style>';\n\t}", "title": "" }, { "docid": "ecbc2e4dfff4c4f9a798dfda5b275c6d", "score": "0.5720601", "text": "function add_icons_css() {\n wp_enqueue_style('admin-custom-icons', get_stylesheet_directory_uri().'/assets/css/icon-font.php');\n}", "title": "" }, { "docid": "192dd4d41263201181d16ea2a518b7e9", "score": "0.5717079", "text": "public static function setIcon($value=null) {\n // Use the catch-all setter to build a method call to set the page icon.\n // Check for and strip off the passed <i> tag; this should be the icon \"class\" only.\n\n // <i class=\"fa-solid fa-watch-smart\"></i>\n ///////////////////////////////////////////////////////////////////////////////////////////\n // Check if the whole Font Awesome 6 class was copied into the field.\n // And then just pull out the class by itself.\n // Note: this is duplicated in the PagesController@dataConsistencyCheck section and could be combined/simplified.\n\n $tmp = $value;\n $tmp = str_replace('<i class=\"', \"\", $tmp);\n $tmp = str_replace('\"></i>', \"\", $tmp);\n $value = $tmp;\n\n return self::__callStatic('setIcon', $value);\n }", "title": "" }, { "docid": "f5c5f1261ec0c1b51b2a2159f2799260", "score": "0.5712819", "text": "function cloudpress_social_icon_widget() {\n\t register_widget( 'cloudpress_social_icon_widget' );\n\t}", "title": "" }, { "docid": "bdcca3d6b9d800598e1100a4240292dc", "score": "0.57091486", "text": "function wp_custom_logo_in_login() { ?>\n<style type=\"text/css\">\n#login h1 a, .login h1 a {background-image:url('https://comet-space.nyc3.digitaloceanspaces.com/assets/default/logo-inova-circle-pink.png');background-repeat:no-repeat;background-size: 120px;height:120px;width:120px;}body{background:#141414!important}.login #backtoblog a,.login #nav a{color:#adadad!important}.login #login_error,.login .message,.login .success,.login form{border-radius:10px}.wp-core-ui .button-primary{background:#000!important;border-color:#000!important;box-shadow:none!important;color:#fff!important;text-decoration:none!important;text-shadow:none!important;border-radius:0!important;}input[type=text]:focus, input[type=password]:focus { border-color: #ff0083 !important;\n box-shadow: none !important;}\n</style>\n<?php }", "title": "" }, { "docid": "5578970fcd41a36c98c317b620399901", "score": "0.5706005", "text": "public function icon()\n {\n return $this->icon;\n }", "title": "" }, { "docid": "d40fc697cd94d5097c61262bab9162f5", "score": "0.5701792", "text": "public function custom_login_logo() {\n\t echo '<style type=\"text/css\">\n\t .login h1 a { background-size:auto; width:100%; height:150px; background-position:center center; background-image:url('.get_bloginfo('template_directory').'/public/images/logos/admin-logo.svg) !important; }\n\t </style>';\n\t}", "title": "" }, { "docid": "3c49313cc6d0d95843a7ef7f34b42e26", "score": "0.5699166", "text": "public function get_icon() {\n\t\treturn 'eicon-integration';\n\t}", "title": "" }, { "docid": "394ac0e2fb4dcf83ddbabf795b7a8d76", "score": "0.5698056", "text": "function add_social_menu_item() {\n\n\t\n\n add_menu_page( 'Social Media Icons',\n 'Social Media Icons!',\n\t\t\t 'manage_options',\n\t\t\t 'social_media_test_icon',\n\t\t\t 'social_media_icon_function',\n\t\t\t plugins_url( 'test-task-social-media-icon/images/social_icon.png' ),\n\t\t\t 6\n );\n}", "title": "" }, { "docid": "be60e07f4346bce1daba0cf05dd3dd75", "score": "0.5692954", "text": "function thaim_login_screen_logo() {\n\t$logo_icon_url = get_site_icon_url( 84 );\n\n\tif ( ! empty( $logo_icon_url ) ) {\n\t\twp_add_inline_style( 'login', sprintf( '\n\t\t\t#login h1 a {\n\t\t\t\tbackground-image: none, url(%s);\n\t\t\t}\n\n\t\t\t#login p.submit .button-primary.button-large {\n\t\t\t\tcolor: #FFF;\n\t\t\t\tbackground-color: #23282d;\n\t\t\t\tborder-color: #23282d;\n\t\t\t\t-webkit-box-shadow: none;\n\t\t\t\tbox-shadow: none;\n\t\t\t\ttext-shadow: none;\n\t\t\t}\n\n\t\t\t#login p.submit .button-primary.button-large:hover {\n\t\t\t\tcolor: #23282d;\n\t\t\t\tbackground-color: #FFF;\n\t\t\t\tborder-color: #23282d;\n\t\t\t}\n\n\t\t\ta:focus {\n\t\t\t\tcolor: #23282d;\n\t\t\t\t-webkit-box-shadow: none;\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\n\t\t\t#login input[type=\"text\"]:focus,\n\t\t\t#login input[type=\"password\"]:focus {\n\t\t\t\tborder-color: #23282d;\n\t\t\t\t-webkit-box-shadow: none;\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\t\t', esc_url_raw( $logo_icon_url ) ) );\n\t}\n}", "title": "" }, { "docid": "96168cc170b57ae2eaade1d7ba6dac48", "score": "0.5692376", "text": "function change_login_logo() { ?>\n\t<style>\n\t\t.login h1 a {\n\t\t\tbackground-image: url( <?php echo get_stylesheet_directory_uri(); ?>/images/login-logo.png );\n\t\t\tpadding-bottom: 20px;\n\t\t}\n\t</style>\n<?php }", "title": "" }, { "docid": "87843c3fde2abcc5525d196e9fa03ce3", "score": "0.56901324", "text": "function icon($directory='')\n{\n if(APP_ENV == 'dev')\n $location = APP_URL.'/resources/assets/'.$directory.'?'.mt_rand();\n else\n $location = APP_URL.'/resources/assets/'.$directory;\n\n return '<link rel=\"icon\" href=\"'.$location.'\" type=\"image/x-icon\">';\n}", "title": "" }, { "docid": "c38d120becb66a2099a9f941d45b11c7", "score": "0.56793797", "text": "public function modifyPseudo()\n {\n $pageTwig = 'Profil/profil.html.twig';\n $template = $this->twig->load($pageTwig);\n echo $template->render([\n 'slug' => 'pseudo', \n 'status' => $_SESSION['status'], \n 'user' => $_SESSION['utilisateur'], \n 'avatar' => $_SESSION['avatar'], \n 'alertMessage' => $_SESSION['receiveMessage']\n ]);\n }", "title": "" } ]
49542effcf6851de9a9e7fb89349f953
Adds a validation that asserts a field is list of type
[ { "docid": "51ab89836e060bba02c2af17bf6636ae", "score": "0.65773726", "text": "public function addListOfValidation(string $fieldName, string $errorMessage, string $type): void\n {\n $this->addValidator(\n new BasicValidator(\n new SingleFieldSpecification($fieldName, new IsListOf($type)),\n $fieldName,\n $errorMessage\n )\n );\n }", "title": "" } ]
[ { "docid": "c5e50d7344db668dbdd0e9b063a1899f", "score": "0.6525677", "text": "public function addListOfValidation(\n string $fieldName,\n string $errorMessage,\n string $type\n ): void {\n $this->addValidator(\n new BasicValidator(\n new SingleFieldSpecification(\n $fieldName,\n new IsListOf($type)\n ),\n $fieldName,\n $errorMessage\n )\n );\n }", "title": "" }, { "docid": "574b56cb596853d4acbf68ad487e274d", "score": "0.65037876", "text": "public function addInListValidation(string $fieldName, string $errorMessage, string ...$list): void\n {\n $this->addValidator(\n new BasicValidator(\n new SingleFieldSpecification($fieldName, new InList($list)),\n $fieldName,\n $errorMessage\n )\n );\n }", "title": "" }, { "docid": "bb955d526a83a7a09d4e66a6cbdcafc9", "score": "0.63770425", "text": "public function addInListValidation(\n string $fieldName,\n string $errorMessage,\n string ...$list\n ): void {\n $this->addValidator(\n new BasicValidator(\n new SingleFieldSpecification(\n $fieldName,\n new InList($list)\n ),\n $fieldName,\n $errorMessage\n )\n );\n }", "title": "" }, { "docid": "cd9840378f24f932669074af2b41ce9a", "score": "0.61924917", "text": "public function isValidListFieldData(array $data, string $fieldId, string $fieldType): bool\n {\n $listId = self::isListField($fieldId);\n $listType = self::isListField($fieldType);\n if (!$listId) {\n return false;\n }\n\n //====================================================================//\n // Verify List is in Data Response\n $this->assertIsArray($listId);\n $this->assertArrayHasKey(\n $listId[\"listname\"],\n $data,\n \"List '\".$listId[\"listname\"].\"' is not defined in returned Data Block.\"\n );\n\n //====================================================================//\n // Verify Field Type is List Type Identifier\n $this->assertIsArray($listType);\n $this->assertEquals(\n $listType[\"listname\"],\n SPL_T_LIST,\n \"List Field Type Must match Format 'type'@list. (Given \".print_r($fieldType, true).\")\"\n );\n\n //====================================================================//\n // Verify Field Type is Valid Splash Field type\n $this->assertNotEmpty(\n self::isValidType($listType[\"fieldname\"]),\n \"List Field Type is not a valid Splash Field Type. (Given \".print_r($listType[\"fieldname\"], true).\")\"\n );\n\n $listData = $data[$listId[\"listname\"]];\n //====================================================================//\n // Verify if Field Data is Null\n if (empty($listData)) {\n return true;\n }\n\n //====================================================================//\n // Verify if Field Data is an Array\n $this->assertIsArray(\n $listData,\n \"List Field '\".$listId[\"listname\"].\"' is not of Array Type. (Given \"\n .print_r($listData, true).\")\"\n );\n\n //====================================================================//\n // Verify all List Data Are Valid\n foreach ($listData as $listValue) {\n $this->isValidFieldData($listValue, $listId[\"fieldname\"], $fieldType);\n }\n\n return true;\n }", "title": "" }, { "docid": "07cf3ec1a271e6d5cc16ae47257d93bf", "score": "0.61484855", "text": "function elb_validate_list( $list_object )\n{\n\tif( isset($list_object->post_type) && $list_object->post_type == 'elb_list' )\n\t\treturn true;\n\n\treturn false;\n}", "title": "" }, { "docid": "64da24a01a6b2f8a86b8b3897bb373ce", "score": "0.6041975", "text": "public function makeFieldList() {}", "title": "" }, { "docid": "1c1b12c65c643ed8800bd68033997a1d", "score": "0.60067064", "text": "protected function _validateListType($type) \n\t{\n\t\tif (isset($type) && in_array($type, array('ul', 'ol'))) {\n\t\t\treturn $type;\n\t\t} else {\n\t\t\treturn self::LIST_TYPE;\n\t\t}\n\t}", "title": "" }, { "docid": "4f99193e0e899491841e25fe0470c8bb", "score": "0.5790108", "text": "public function isList()\n {\n foreach ($this->value as $a => $b) {\n if ($a !== (integer) $a) {\n /** @var boolean */\n return false;\n }\n }\n\n /** @var boolean */\n return true;\n }", "title": "" }, { "docid": "3642f07123cae553b8581c3ccd0b111d", "score": "0.5693857", "text": "public function testShouldKnowItsType() {\n $this->assertEquals($this->entry->type, 'list');\n }", "title": "" }, { "docid": "0c56cbecc74e162e518057fd1871c101", "score": "0.5661001", "text": "public function validableFields($request) { return $this->getFieldList(); }", "title": "" }, { "docid": "666fd6b115054348d87d25dc1de6ecdb", "score": "0.563305", "text": "protected function validates_exclusion_of($campo, $list){\n\t\t$this->connect();\n\t\tif(!is_array($this->validates_exclusion)){\n\t\t\t$this->validates_exclusion = array();\n\t\t}\n\t\t$this->validates_exclusion[$campo] = $list;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "3d2e21c7e58c6197e90a6b4e56d3cba4", "score": "0.5630997", "text": "public function testJsonArrayDeserialization()\n {\n $fields = MailingListFieldSerializer::deserializeMultiple($this->json);\n\n $this->assertIsArray($fields);\n $this->assertContainsOnlyInstancesOf(MailingListField::class, $fields);\n $this->assertCount(3, $fields);\n }", "title": "" }, { "docid": "bbac010d8a9a06146928d391649cf1f9", "score": "0.56151533", "text": "protected function validates_inclusion_in($campo, $list){\n\t\t$this->connect();\n\t\tif(!is_array($this->validates_inclusion)){\n\t\t\t$this->validates_inclusion = array();\n\t\t}\n\t\t$this->validates_inclusion[$campo] = $list;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "fb17e93e5924b6fd75528a9ae73b9a53", "score": "0.5613074", "text": "public function testList()\n {\n\n $this->assertEquals('li1ei2e1:34:testi5ee', Bencode::encode([1, 2, '3', 'test', 5]));\n\n // list type wrapped traversable should become list\n\n $this->assertEquals('li1ei2e1:34:testi5ee', Bencode::encode(\n new ListType(\n new ArrayObject([1, 2, '3', 'test', 5])\n )\n ));\n\n // sequential or not, we ignore the keys for ListType\n $this->assertEquals('li1ei2e1:34:testi5ee', Bencode::encode(\n new ListType(\n new ArrayObject([\n 'key1' => 1,\n 'key2' => 2,\n 'key0' => '3',\n 'qqqq' => 'test',\n 423112 => 5,\n ])\n )\n ));\n\n // test list type consuming an array\n\n $this->assertEquals('li1ei2e1:34:testi5ee', Bencode::encode(\n new ListType([\n 'key1' => 1,\n 'key2' => 2,\n 'key0' => '3',\n 'qqqq' => 'test',\n 423112 => 5,\n ])\n ));\n\n // empty list\n\n $this->assertEquals('le', Bencode::encode([]));\n }", "title": "" }, { "docid": "59e2c7d66813652006ca1f05f62a4e6c", "score": "0.5561369", "text": "private function is_list($value) {\n return is_array($value) && array_keys($value) === range(0, count($value) - 1);\n }", "title": "" }, { "docid": "9ea52ff4f08191d3af921e7e1a78553a", "score": "0.5480178", "text": "public function testInList() {\n $list = [\n '10.0.0.1',\n '10.0.0.2',\n '127.0.0.1',\n '10.0.0.3',\n '10.0.0.4',\n ];\n $this->rule->set('list', $list);\n\n $result = $this->rule->assert();\n $this->assertTrue($result);\n }", "title": "" }, { "docid": "daaadcb93c8c181e53d071a0d4409732", "score": "0.54682237", "text": "public function validator(array $data);", "title": "" }, { "docid": "2fdacbce12584e0f67d306e8f0e2a390", "score": "0.54567194", "text": "public function testNotInList() {\n $list = ['10.0.0.1'];\n $this->rule->set('list', $list);\n\n $result = $this->rule->assert();\n $this->assertFalse($result);\n }", "title": "" }, { "docid": "5c899b145aebf5f7770bd93c6ba8c308", "score": "0.5453716", "text": "protected function validates_inclusion_in($field, $list, $params = array())\n {\n if (is_string($params)) {\n $params = Util::getParams(func_get_args());\n }\n $this->_validates['inclusion_in'][$field] = $params;\n $this->_validates['inclusion_in'][$field]['list'] = $list;\n }", "title": "" }, { "docid": "49035e9d31cfdd90ee2cc511157fc6fb", "score": "0.5436806", "text": "public function inValids(){\n\t\t$ret = array();\n\t\tforeach($this->_fieldValidations as $f){\n\t\t\tif(!$f->isValid){\n\t\t\t\t$ret[] = $f;\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "8ccfbadfc82f8e5de29ff8d870be6c22", "score": "0.5433338", "text": "public function validate($value, array $constraints = null, array $groups = []): ConstraintViolationListInterface;", "title": "" }, { "docid": "b4a6973ef11ac766d2d8a84bfc43a3ad", "score": "0.5422433", "text": "public function listCaseTestValidateForInput()\n {\n return [\n ['name', '', 'The name field is required.'],\n ['email', '', 'The email field is required.'],\n ['identity_number', '', 'The identity number field is required.'],\n ['dob', '', 'The dob does not match the format Y-m-d.'],\n ['address', '', 'The address must be a string.'],\n ];\n }", "title": "" }, { "docid": "0f915cb41df09182955f2f6aebcb678e", "score": "0.5421933", "text": "public static function isList(mixed $mixed): bool {\n\t\tif (!is_array($mixed)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn !self::isAssoc($mixed);\n\t}", "title": "" }, { "docid": "ce019dd85983ff2936e6b248bc60969e", "score": "0.5420351", "text": "public function rules(): array\n {\n return [\n \"items\" => \"required|array|min:1\",\n \"items.*.id\" => \"required|uuid\",\n \"items.*.title\" => \"required|string\",\n \"items.*.price\" => \"required|numeric\",\n \"items.*.quantity\" => \"required|numeric\",\n ];\n }", "title": "" }, { "docid": "708b044f7470eb7b23c94f3607df5410", "score": "0.5415107", "text": "private function validateFields(): array\n {\n $fields = (array) $this->fields;\n\n if (empty($fields)) {\n throw new Exception\\InvalidArgumentException('Provided fields list was empty!');\n }\n\n foreach ($fields as $key => $field) {\n if (! is_string($field)) {\n throw new Exception\\InvalidArgumentException(\n sprintf('Provided fields must be strings, %s provided for key %s', gettype($field), $key),\n );\n }\n }\n\n $this->fields = array_values($fields);\n\n return $this->fields;\n }", "title": "" }, { "docid": "580d3e4fd3f20be3f16869c28528ec51", "score": "0.5410759", "text": "public function listCaseTestValidateForInput()\n {\n return [\n ['name', '', 'The name field is required.'],\n ['name', ' ', 'The name field is required.'],\n ['name', '.-=+{}()[]^$@#', 'The name format is invalid.'],\n ['name', 'Iphone', 'The name has already been taken.'],\n ];\n }", "title": "" }, { "docid": "77f74157a854753ee297d9eb65d44f15", "score": "0.54090947", "text": "public function testInSingleList() {\n $list = ['127.0.0.1'];\n $this->rule->set('list', $list);\n\n $result = $this->rule->assert();\n $this->assertTrue($result);\n }", "title": "" }, { "docid": "001b3292a13ea8bbb639d7c552cf84ed", "score": "0.53983784", "text": "public function rules()\n {\n return [\n 'listId' => array(\n \"required\",\n \"regex:/((ls)|(ur))\\d{1,12}/\"\n )\n ];\n }", "title": "" }, { "docid": "d87bff33538034063def3bcaa0bef60d", "score": "0.5377772", "text": "#[ArrayShape(['images' => \"array\"])]\n public function rules(): array\n {\n return [\n 'images' => 'required',\n ];\n }", "title": "" }, { "docid": "1ca891243a44b98a53f3afa4a85af32c", "score": "0.5361906", "text": "public function rules()\n {\n return [\n 'type_id' => 'required',\n 'links' => 'required|array|min:1',\n ];\n }", "title": "" }, { "docid": "52ead2644980ea89821bf94d1035e732", "score": "0.5361705", "text": "public static function isList($array)\n {\n if (!\\is_array($array)) {\n return false;\n }\n if ($array === []) {\n return true;\n }\n if (\\array_keys($array) !== \\range(0, \\count($array) - 1)) {\n return false;\n }\n \n return true;\n }", "title": "" }, { "docid": "b51943eaad393ca9dee97ed77c74e859", "score": "0.5353021", "text": "public function testArrayValidationSuccess()\n {\n $validator = new Validator();\n\n $validator->addValidation(['test'], 'array')\n ->validate();\n\n $this->assertEquals([], $validator->getFailed());\n }", "title": "" }, { "docid": "242eb441fc39bcd42a608939d8b42acf", "score": "0.53517354", "text": "abstract protected function listOf(mixed $type): mixed;", "title": "" }, { "docid": "5085607b35cf8df73fd191aea311478e", "score": "0.534836", "text": "protected function validates_exclusion_of($field, $list, $params = array())\n {\n if (is_string($params)) {\n $params = Util::getParams(func_get_args());\n }\n $this->_validates['exclusion_of'][$field] = $params;\n $this->_validates['exclusion_of'][$field]['list'] = $list;\n }", "title": "" }, { "docid": "d53fd60ef6a6c2d758e3657464fa6170", "score": "0.5332372", "text": "public function serializeConstraintViolationList(JsonSerializationVisitor $visitor, ConstraintViolationList $list, array $type, Context $context)\n {\n return $visitor->visitArray(iterator_to_array($list), $type, $context);\n }", "title": "" }, { "docid": "dcf3e4da5e7f43810ca79aee97493d28", "score": "0.53319925", "text": "protected function getTypeOf() {\r\n\t\treturn 'list';\r\n\t}", "title": "" }, { "docid": "3e75cab7b269256c1540efdfd45800e0", "score": "0.53068125", "text": "public function validate() {\n $result = TRUE;\n foreach ($this->_items as $field) {\n if (!$field->validate()) {\n $result = FALSE;\n }\n }\n return $result;\n }", "title": "" }, { "docid": "f596158703900c8a682586a5c85f234a", "score": "0.5304682", "text": "public function testCreateListValidationFailed(): void\n {\n $this->post('/mailchimp/lists');\n\n $content = \\json_decode($this->response->getContent(), true);\n\n $this->assertResponseStatus(400);\n self::assertArrayHasKey('message', $content);\n self::assertArrayHasKey('errors', $content);\n self::assertEquals('Invalid data given', $content['message']);\n\n foreach (\\array_keys(static::$listData) as $key) {\n if (\\in_array($key, static::$notRequired, true)) {\n continue;\n }\n\n self::assertArrayHasKey($key, $content['errors']);\n }\n }", "title": "" }, { "docid": "eb52cb281260a0a564a7082082eff7b2", "score": "0.5294658", "text": "static function is_list($ary)\n {\n if (is_array($ary)) {\n $i = 0;\n foreach ($ary as $k => $v) {\n if ($i !== $k)\n return false;\n $i++;\n }\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "06918fde28cbf2d5ecaa417ebcd2aadd", "score": "0.52756953", "text": "public function providerValidateFields()\n {\n return array(\n array(array('field1' => 'value1', 'field2' => 'value2'), array(), true),\n array(array('field1' => 'value1', 'field2' => 'value2', 'field3' => 'value3'), array(), true),\n array(array('field1' => 'value1', 'field2' => 'value2', 'field3' => ''), array(), true),\n array(array('field1' => 'value1', 'field2' => ''), array('field2'), false),\n array(array('field1' => '', 'field2' => 'value2'), array('field1'), false),\n array(array('field1' => '', 'field2' => ''), array('field1', 'field2'), false),\n array(array('field1' => '', 'field2' => '', 'field3' => 'value3'), array('field1', 'field2'), false),\n array(array('field1' => 'value1'), array('field2'), false),\n array(array('field2' => 'value2'), array('field1'), false),\n array(array('field2' => 'value2', 'field3' => 'value3'), array('field1'), false),\n array(array(), array('field1', 'field2'), false),\n );\n }", "title": "" }, { "docid": "843058f9341f8bdc7362de9fd43daef6", "score": "0.52722484", "text": "public function rules()\n {\n return [\n 'type' => ['required', Rule::in(['2', '3', '4'])],\n ];\n }", "title": "" }, { "docid": "17f5d45b1a7aa698a5675cb16f7a7969", "score": "0.52659047", "text": "private function _validateLists()\n\t{\n\t\t$list_open = substr_count($this->message, '[list]') + substr_count($this->message, '[list ');\n\t\t$list_close = substr_count($this->message, '[/list]');\n\n\t\tif ($list_close - $list_open > 0)\n\t\t{\n\t\t\t$this->message = str_repeat('[list]', $list_close - $list_open) . $this->message;\n\t\t}\n\n\t\tif ($list_open - $list_close > 0)\n\t\t{\n\t\t\t$this->message .= str_repeat('[/list]', $list_open - $list_close);\n\t\t}\n\t}", "title": "" }, { "docid": "fe2173164f23d08b14f354edb8012bd3", "score": "0.5243535", "text": "#[@test]\n public function string_arraylist() {\n $this->assertEquals(array('Hello', 'World'), $this->fixture->convert(new ArrayList('Hello', 'World')));\n }", "title": "" }, { "docid": "76c12b9a723b35081ecc00f7d7ba6454", "score": "0.5224485", "text": "function validateList($list = false, $item_id = false) {\n\t\t$this->data_errors = array();\n\n//\t\tprint_r($this->data_entities);\n\t\tforeach($list as $name) {\n\t\t\tif(isset($this->data_entities[$name])) {\n\t\t\t\tif(!$this->validate($name, $item_id)) {\n\t\t\t\t\t$this->data_errors[$name] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// prepare values to be returned to screen if errors exist\n\t\tif(count($this->data_errors)) {\n\t\t\tforeach($this->data_entities as $name => $entity) {\n\t\t\t\tif($this->getProperty($name, \"value\") !== false) {\n\t\t\t\t\t$this->setProperty($name, \"value\", prepareForHTML($this->getProperty($name, \"value\")));\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "b4be54ad59ec67dd8f237f4a75137795", "score": "0.51970905", "text": "public function testCheckListOfIds(): void\n {\n $this->checkListOfIdsTrait(\n EscalationRepository::class,\n 'checkListOfIds'\n );\n }", "title": "" }, { "docid": "dbdfd7a770da7c2224bf5fd55b9eedc8", "score": "0.51861745", "text": "public function testLists() {\n $list_definition = ListDataDefinition::create('string');\n $this->assertInstanceOf(ListDataDefinitionInterface::class, $list_definition);\n $item_definition = $list_definition->getItemDefinition();\n $this->assertInstanceOf(DataDefinitionInterface::class, $item_definition);\n $this->assertEquals('string', $item_definition->getDataType());\n\n // Test using the definition factory.\n $list_definition2 = $this->typedDataManager->createListDataDefinition('string');\n $this->assertInstanceOf(ListDataDefinitionInterface::class, $list_definition2);\n $this->assertEquals($list_definition, $list_definition2);\n\n // Test creating the definition of data with type 'list', which is the same\n // as creating a definition of a list of items of type 'any'.\n $list_definition = $this->typedDataManager->createDataDefinition('list');\n $this->assertInstanceOf(ListDataDefinitionInterface::class, $list_definition);\n $this->assertEquals('list', $list_definition->getDataType());\n $this->assertEquals('any', $list_definition->getItemDefinition()->getDataType());\n }", "title": "" }, { "docid": "c1c705f2f0e983ae9d174074780ba186", "score": "0.5184374", "text": "public function setValidationData(array $validation_data): Validable;", "title": "" }, { "docid": "f4c504d4ff27c46c6efbfe12f6b069fd", "score": "0.5170121", "text": "public function rules()\n {\n return [\n 'roles' => 'array[min[1]:max[2]:size[2]]',\n //'roles.*.name' => 'in_list[A,B]',\n //'roles.*.name' => 'integer',\n //'colors.*.color.*' => 'in_list[A,B]',\n 'colors.*.color' => 'array[min[1]:max[2]]',\n 'messages.*.username' => 'test[messages.*.age=>age]|exist_by[messages:username=>name:store_no=>store:order_status=>status]'\n ];\n }", "title": "" }, { "docid": "f067a0106d66d586cb18ed10567342f9", "score": "0.5169831", "text": "public function rules()\n {\n return [\n 'type' => ['required', 'string', Rule::in(['city', 'country'])],\n 'value' => ['required', 'integer', function($attribute, $value, $fail) {\n $city = City::whereId($value)->exists();\n $country = Country::whereId($value)->exists();\n if (!$city && !$country) {\n return $fail('Выбранное значение не найдено');\n }\n return true;\n }],\n ];\n }", "title": "" }, { "docid": "715532d70bf52e6503c37f9f6f600da5", "score": "0.5161466", "text": "public function validate(Collection $data, $model = null);", "title": "" }, { "docid": "5a8b90f3e13bbfd4c4bda0eb3098c326", "score": "0.51537174", "text": "public static function validateObl()\n\t{\n\t\treturn array(\n\t\t\tnew Main\\Entity\\Validator\\Length(null, 255),\n\t\t);\n\t}", "title": "" }, { "docid": "b98112cd1bee9d0084a68374528968c9", "score": "0.5151234", "text": "protected function isFieldValueBeDerivableFromListParent($field)\n {\n return false;\n }", "title": "" }, { "docid": "4e4f0e321f7731423fb8e36dc2466c9a", "score": "0.51392716", "text": "public function testByListReturnsTrue(): void\n {\n $sut = new DerivationType(FALSE, FALSE, FALSE, TRUE, FALSE);\n self::assertFalse($sut->byRestriction());\n self::assertFalse($sut->byExtension());\n self::assertFalse($sut->bySubstitution());\n self::assertTrue($sut->byList());\n self::assertFalse($sut->byUnion());\n }", "title": "" }, { "docid": "4c93040a7f43bffe1d30c7d8ef5efd90", "score": "0.5132044", "text": "public function testCreateFieldValidation()\n {\n $exceptionsCount = 0;\n\n $invalidFieldStatements = [\n ['type' => 'varchar'],\n ['name' => '', 'type' => 'varchar'],\n ['name' => 'title'],\n ['name' => 'title', 'type' => null],\n ['name' => 'title', 'type' => 'set'],\n ['name' => 'title', 'type' => 'enum', 'values' => 555],\n ['name' => 'title', 'type' => 'enum', 'values' => 'abc']\n ];\n\n foreach ($invalidFieldStatements as $invalidFieldStatement) {\n try {\n $this->migration->createTable(\n 'my_table', [$invalidFieldStatement]\n );\n } catch (\\Exception $e) {\n if ($e instanceof InvalidArgumentException) {\n $exceptionsCount += 1;\n }\n }\n }\n\n $this->assertEquals(count($invalidFieldStatements), $exceptionsCount);\n }", "title": "" }, { "docid": "5a31802c57eb81fec1c3ed76b08f3ae6", "score": "0.5131699", "text": "protected function validator(array $data)\n {\n }", "title": "" }, { "docid": "e9dd62fbf7fe4f5f388c58df5381afd2", "score": "0.5130228", "text": "public function rules()\n {\n return [\n 'carrito' => 'required|array|min:1',\n 'carrito.*.cantidad' => 'required|numeric|min:1',\n 'carrito.*.producto_id' =>'required|numeric',\n 'validadoStock' => 'required',\n 'usuario_id' => 'tieneDepartamento'\n ];\n }", "title": "" }, { "docid": "eb1e20f8f8f485b97fc30c6b8b6fba69", "score": "0.5124894", "text": "function checkObjectOrArray($list) {\n if (gettype($list) == 'object') {\n return true;\n }\n else {\n return false;\n }\n}", "title": "" }, { "docid": "7e64b3c0e5c906dbf6445dbc07b09e3f", "score": "0.5123137", "text": "public function validate()\n {\n $valid = [];\n foreach ($this->fields as $field) {\n $obj = $this->{'get' . ucfirst($field)}();\n if (null === $obj) {\n continue;\n }\n if (!is_array($obj)) {\n $obj = [$obj];\n }\n\n foreach ($obj as $objItem) {\n $objValid = $objItem->validate();\n if (true !== $objValid) {\n $valid[] = $objValid;\n }\n }\n\n }\n\n return (!isset($valid[0]))? true : $valid;\n }", "title": "" }, { "docid": "876c4b03f7a725c9ddd675953616b34f", "score": "0.5121633", "text": "protected function validateArray( $fieldName, $validateValue, $value ) {\n if( ! empty( $value ) ) {\n if( ! is_array( $value ) ) $this->setError( $fieldName, '{label} need to be an array', $validateValue[ 0 ] );\n }\n }", "title": "" }, { "docid": "7b543ee14b37f0d20b12d0b7d8e1a7c0", "score": "0.511824", "text": "public function getListDefinition(array $fieldcontents);", "title": "" }, { "docid": "61b286593b8d9e50815dbfb4b68871f9", "score": "0.51009107", "text": "public function validateData($data)\n {\n if (is_array($data) && isset($data['items']) && is_array($data['items'])) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "57926eaba087a2bb5f24c8507c6bd676", "score": "0.50984794", "text": "private static function getValidTypes(): array\n {\n return [\n 'boolean',\n 'integer',\n 'float',\n 'string',\n 'array',\n 'resource',\n 'object',\n ];\n }", "title": "" }, { "docid": "1da823647ba436dab55169bfdd7aa5cd", "score": "0.5092795", "text": "private function validate(array &$value)\n {\n Configuration::getInstance()->getValidatorStack(static::T_TYPE)->validate($value);\n }", "title": "" }, { "docid": "5af21bdf5567e69ac17b9a0457ffe6b8", "score": "0.50851953", "text": "public function rules(): array\n {\n return [\n 'payment_items' => 'required|array',\n 'payment_items.*.invoice_id' => 'required|exists:invoices,id',\n 'payment_items.*.amount' => 'required|numeric',\n ];\n }", "title": "" }, { "docid": "49d5decc03c72175b468a79b6c4b697b", "score": "0.508368", "text": "public function rules()\n {\n return [\n 'name' => 'required|unique:question_types|max:255',\n 'title' => 'required|unique:question_types|max:255',\n 'delimiter' => 'required|unique:question_types|max:10',\n 'is_multiple_choice' => 'required|boolean'\n ];\n }", "title": "" }, { "docid": "e980507b8a0d1af1005e5425bc5a76e4", "score": "0.5080962", "text": "protected function validateList($list) {\n\t\t// continuous rule numbers starting from 1\n\t\tif (!$list) {\n\t\t\treturn $this->setError('Empty list');\n\t\t}\n\t\t$now = new Zend_Date();\n\t\tforeach ($list as $item) {\n\t\t\tif (!in_array($item['usage_type'], $this->usage_types)) {\n\t\t\t\treturn $this->setError('Unknown usage type', $item);\n\t\t\t} else if ($item['category'] && !in_array($item['category'], $this->categories)) {\n\t\t\t\treturn $this->setError('Unknown category', $item);\n\t\t\t} else if (!($this->isIntValue($item['rule']) && $item['rule'] > 0)) {\n\t\t\t\treturn $this->setError('Illegal rule number', $item);\n\t\t\t} else if (!($this->isIntValue($item['interval']) && $item['interval'] > 0)) {\n\t\t\t\treturn $this->setError('Illegal interval', $item);\n\t\t\t} else if (!($this->isIntValue($item['times']) && $item['times'] >= 0)) {\n\t\t\t\treturn $this->setError('Illegal times', $item);\n\t\t\t} else if (!(is_numeric($item['access_price']) && $item['access_price'] >= 0)) {\n\t\t\t\treturn $this->setError('Illegal access price', $item);\n\t\t\t} else if (!(is_numeric($item['price']) && $item['price'] >= 0)) {\n\t\t\t\treturn $this->setError('Illegal price', $item);\n\t\t\t} else if (!Zend_Date::isDate($item['from_date'], 'yyyy-MM-dd HH:mm:ss')) {\n\t\t\t\treturn $this->setError('Illegal from date', $item);\n\t\t\t} else if ((new Zend_Date($item['from_date'], 'yyyy-MM-dd HH:mm:ss')) <= $now) {\n\t\t\t\treturn $this->setError('from date must be in the future', $item);\n\t\t\t} else if (!$item['key']) {\n\t\t\t\treturn $this->setError('Illegal key', $item);\n\t\t\t}\n\n\t\t\tif (isset($this->rules[$item['key']]['usage_type_rates'][$item['usage_type']]['rules'][$item['rule']])) {\n\t\t\t\treturn $this->setError('Duplicate rule (' . $item['rule'] . ') for ' . $item['key'] . ', ' . $item['usage_type']);\n\t\t\t} else {\n\t\t\t\t$this->rules[$item['key']]['usage_type_rates'][$item['usage_type']]['rules'][$item['rule']] = $item;\n\t\t\t}\n\n\t\t\tif (isset($this->rules[$item['key']]['usage_type_rates'][$item['usage_type']]['category'])) {\n\t\t\t\tif ($this->rules[$item['key']]['usage_type_rates'][$item['usage_type']]['category'] != $item['category']) {\n\t\t\t\t\treturn $this->setError('Conflict in category', $item);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->rules[$item['key']]['usage_type_rates'][$item['usage_type']]['category'] = $item['category'];\n\t\t\t}\n\n\t\t\tif (isset($this->rules[$item['key']]['usage_type_rates'][$item['usage_type']]['access'])) {\n\t\t\t\tif ($this->rules[$item['key']]['usage_type_rates'][$item['usage_type']]['access'] != $item['access_price']) {\n\t\t\t\t\treturn $this->setError('Conflict in access price', $item);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->rules[$item['key']]['usage_type_rates'][$item['usage_type']]['access'] = $item['access_price'];\n\t\t\t}\n\n\t\t\tif (isset($this->rules[$item['key']]['from'])) {\n\t\t\t\tif ($this->rules[$item['key']]['from'] != $item['from_date']) {\n\t\t\t\t\treturn $this->setError('Conflict in from_date for ' . $item['key']);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->rules[$item['key']]['from'] = $item['from_date'];\n\t\t\t}\n\n\t\t\tif (isset($this->rules[$item['key']]['prefix']) && !empty($this->rules[$item['key']]['prefix'])) {\n\t\t\t\tif (!empty($item['prefix']) && $this->rules[$item['key']]['prefix'] != $item['prefix']) {\n\t\t\t\t\treturn $this->setError('Conflict in prefix for ' . $item['key']);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->rules[$item['key']]['prefix'] = $item['prefix'];\n\t\t\t}\n\t\t}\n\t\tforeach ($this->rules as $key => $rule) {\n\t\t\tforeach ($rule['usage_type_rates'] as $usage_type => $usage_type_rate) {\n\t\t\t\t$rate_rules = $usage_type_rate['rules'];\n\t\t\t\t$rule_numbers = array_map('intval', array_keys($rate_rules));\n\t\t\t\tif (!in_array(1, $rule_numbers)) {\n\t\t\t\t\treturn $this->setError('Missing first rule for ' . $key . ', ' . $usage_type);\n\t\t\t\t}\n\t\t\t\t$min = min($rule_numbers);\n\t\t\t\t$max = max($rule_numbers);\n\t\t\t\tif (count($rule_numbers) != $max - $min + 1) {\n\t\t\t\t\treturn $this->setError('Missing rule for ' . $key . ', ' . $usage_type);\n\t\t\t\t}\n\t\t\t\t$infinite_counter = 0;\n\t\t\t\tforeach ($rate_rules as $rate_rule) {\n\t\t\t\t\tif ($rate_rule['times'] == '0' || $rate_rule['times'] == pow(2, 31) - 1) {\n\t\t\t\t\t\t$infinite_counter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($infinite_counter != 1) {\n\t\t\t\t\treturn $this->setError('None or more than one infinite rule detected for ' . $key . ', ' . $usage_type);\n\t\t\t\t}\n\t\t\t\tif ($rate_rules[strval($max)]['times'] != '0' && $rate_rules[strval($max)]['times'] != pow(2, 31) - 1) {\n\t\t\t\t\treturn $this->setError('The last rule must be an infinite one (' . $key . ', ' . $usage_type . ')');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "77f7cf658ed2b36188cd5d5ee513e884", "score": "0.5080757", "text": "public function testArrayValidationFailed()\n {\n $validator = new Validator();\n\n $this->expectException(ValidationException::class);\n $this->expectExceptionMessage('Validation failed');\n\n $validator->addValidation('test', 'array')\n ->validate();\n }", "title": "" }, { "docid": "35d988977ebaa7422c95cbae5fe66e7f", "score": "0.50803477", "text": "public static function validationArray():array {\n $validation = array (\n \"displayName\" => 'required|string|max:255',\n \"fieldName\" => 'required|string|max:255',\n \"uri\" => 'required|string|max:255',\n \"mediaType\" => 'required|integer|max:255',\n );\n\n return $validation;\n }", "title": "" }, { "docid": "0341537f5decc1c0929a30ca47f4e7cf", "score": "0.5065674", "text": "public function validation($data, $type){\n $return = $data;\n foreach($data as $key => $input){\n $temp = null;\n $input = is_array($input) ? FormInput::trimArray($input) : FormInput::checkInput($input);\n $return[$key] = $input;\n }\n return $return;\n }", "title": "" }, { "docid": "b4ccb89d2d97a7bffad0d144ff798d30", "score": "0.50649554", "text": "public function testAnnotationParsingSimpleTypeCollectionParameterFail()\n {\n // Get the object to test\n $annotationTestClass = new AnnotationTestClass();\n $annotationTestClass->simpleTypeCollection(array('asd', new \\stdClass(), 'awd'));\n }", "title": "" }, { "docid": "5024b0fd9ecafb24ff1e4039ded23a7d", "score": "0.50577325", "text": "public function rules()\n\t{\n\t\treturn [\n\t\t\t__!foreach($fields as $field):__\n '__$field__' => 'required',\n __!endforeach;__\n\t\t];\n\t}", "title": "" }, { "docid": "0ff860b45ba4e7727e703be3cc268ee0", "score": "0.50556207", "text": "public function allowsStaticListType(StaticListType $candidateType, TypeInterface $elementType);", "title": "" }, { "docid": "34f06578a89439cc5f35ae93c6ea2664", "score": "0.50407094", "text": "function SetList($fieldName, Value $value)\n {\n return parent::CreateSetList($fieldName, $value);\n }", "title": "" }, { "docid": "bbd80b49cc647258b12901c8f331b3e6", "score": "0.5037592", "text": "public function rules()\n {\n return [\n //\n 'List_Classes.*.name_ar' => 'required',\n 'List_Classes.*.name_en' => 'required',\n ];\n }", "title": "" }, { "docid": "c966e4eaca2a813649527eb09ac2fd34", "score": "0.50375754", "text": "public function testAnnotationParsingSimpleTypeCollectionParameter()\n {\n // Get the object to test\n $annotationTestClass = new AnnotationTestClass();\n $annotationTestClass->simpleTypeCollection(array('asd', 'wad', 'awd'));\n }", "title": "" }, { "docid": "16c0239d9de020f7d6eadfac618b1ff6", "score": "0.5035684", "text": "public function inList($field, array $list, $message = null, $when = null)\n {\n $extra = array_filter(['on' => $when, 'message' => $message]);\n\n return $this->add($field, 'inList', $extra + [\n 'rule' => ['inList', $list]\n ]);\n }", "title": "" }, { "docid": "e61dae23e276508116522879047bdd64", "score": "0.5029916", "text": "public function rules()\n {\n return [\n 'athlete_id' => ['required', 'numeric', 'exists:athletes,id'],\n 'realization_date' => ['required', 'date', 'before:tomorrow'],\n 'physicalTests' => ['array'],\n 'physicalTests.*.id' => ['required', 'numeric'],\n 'physicalTests.*.value' => ['nullable', 'numeric', 'min:0'],\n 'bodyIndexes' => ['array'],\n 'bodyIndexes.*.id' => ['required', 'numeric'],\n 'bodyIndexes.*.value' => ['nullable', 'numeric', 'min:0']\n ];\n }", "title": "" }, { "docid": "247481fffd3344361e025523ed133b21", "score": "0.5029612", "text": "public function rules()\n {\n return [\n 'name' => 'required|string|min:2',\n 'user_id' => 'nullable|int|exists:users,id',\n 'code' => 'nullable|string|min:10',\n 'ids' => 'nullable|array',\n \"ids.*\" => [\n 'required',\n 'int',\n 'exists:users,id',\n ]\n ];\n }", "title": "" }, { "docid": "daadf299f0edc5aad83a835655a73ca4", "score": "0.5024102", "text": "public static function isList($array)\n {\n if (!\\is_array($array)) {\n return false;\n }\n if ([] === $array) {\n return true;\n }\n if (\\array_keys($array) !== \\range(0, \\count($array) - 1)) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "ba198542d4a2b50e6ea2262a017af761", "score": "0.50217015", "text": "public function rules()\n {\n return [\n 'id'=>'required|numeric|exists:segmentation.bbdd_lists,id',\n 'action'=>[\"required\",Rule::in(['register', 'unsub'])],\n \"data\" => \"array|required|between:1,1000\",\n \"data.*\" => \"required|numeric|min:1\",//|exists:segmentation.bbdd_users,id \n \n\n ];\n }", "title": "" }, { "docid": "5ce8c401f5b7a99904e0cd4a8f5a0176", "score": "0.5019814", "text": "public function rules()\n {\n return [\n 'name' => 'required',\n 'type' => 'required',\n 'info' => 'required',\n 'assign_to' => 'required',\n 'user_list' => 'required_if:assign_to, \"user\"',\n 'company_list' => 'required_if:assign_to, \"company\"',\n 'group_list' => 'required_if:assign_to, \"group\"',\n ];\n }", "title": "" }, { "docid": "80c014948814edc900a256dad2490b3e", "score": "0.50187266", "text": "public function testArrayToObjectValidation()\n {\n $classMetadata = $this->prepareClassMetadata();\n $this->entityManager->expects($this->once())\n ->method('getClassMetadata')\n ->willReturn($classMetadata);\n $this->crudTransformer->initializeClassMetadata('className');\n\n $errors = $this->crudTransformer->arrayToObjectPropertyValidation(array('invalid' => 'test'), 'className');\n\n $this->assertEquals(1, $errors->count());\n $this->assertEquals('This is not a valid property of className', $errors->get(0)->getMessage());\n }", "title": "" }, { "docid": "8bff818bc95855afe84a3b97bf2fb50c", "score": "0.50151753", "text": "public function typeList();", "title": "" }, { "docid": "e177d709e31f1ba8c8dc15d180d1abb4", "score": "0.50106466", "text": "public function list_test_case_validate_for_input()\n {\n return [\n ['name', '', 'The name field is required.'],\n ['address', '', 'The address field is required.'],\n ['phone', '', 'The phone field is required.'],\n ['time_open', '', 'The time open field is required.'],\n ['time_close', '', 'The time close field is required.'],\n ['name', 'Moriah KuhnMoriah KuhnMoriah KuhnMoriah KuhnMoriah KuhnMoriah KuhnMoriah Moriah KuhnMoriah KuhnMoriah KuhnMoriah KuhnMoriah KuhnMoriah KuhnMoriah ', 'The name may not be greater than 100 characters.'],\n ['phone', '3156556645', 'The phone format is invalid.'],\n ['time_open', 'asdfdfg', 'The time open does not match the format H:i:s.'],\n ['time_close', 'fsdgfdgf', 'The time close does not match the format H:i:s.'],\n ];\n }", "title": "" }, { "docid": "66331ef401d547be0a379a58a3560b4c", "score": "0.5008569", "text": "function upload_direct_mail_list_form_validate($form, &$form_state) {\n $values = $form_state['values'];\n $listed_count = count($values['listed_mailing_list']);\n $sold_count = count($values['sold_mailing_list']);\n if ($listed_count > 1) {\n form_set_error('listed_mailing_list', 'Kindly select only one file.');\n }\n if ($values['same_listed_list'] == 0 && $sold_count > 1) {\n form_set_error('sold_mailing_list', 'Kindly select only one file.');\n }\n}", "title": "" }, { "docid": "a10c7c19ddbce05fa6fd132dbf330d5e", "score": "0.49951646", "text": "public function afterValidate($event)\n {\n parent::afterValidate($event);\n $values = $this->getOwner()->{$this->arrayPropertyName};\n if ($values && is_array($values)) {\n foreach ($values as $doc) {\n if (!$doc->validate(null, false)) {\n $this->getOwner()->addErrors($doc->getErrors());\n }\n }\n }\n }", "title": "" }, { "docid": "8b124b5c9899dbee423a9aa9b4f06231", "score": "0.49943238", "text": "public function validateGetWeightListsRequest(Request $request){\n $rules = [\n 'user_id' => 'required|numeric',\n ];\n\n $this->validate($request, $rules);\n }", "title": "" }, { "docid": "97b79c3ec068e9d631ad3c57e552eabd", "score": "0.49929154", "text": "public function canHaveValue()\n {\n return $this->inType(array(\n FieldTypeCollection::TYPE_SELECT,\n FieldTypeCollection::TYPE_CHECKBOX_LIST,\n FieldTypeCollection::TYPE_RADIO_LIST\n ));\n }", "title": "" }, { "docid": "7498d2bb1fa45e4a02824a118e1c97f3", "score": "0.4991091", "text": "public function rules()\n {\n return [\n 'students.*.name' => 'required',\n 'students.*.birthday' => 'required|date',\n 'students.*.gender' => 'required'\n ];\n }", "title": "" }, { "docid": "3f22733033616d289bd445ac03a249c4", "score": "0.4987748", "text": "public function rules()\n {\n return [\n 'uid' => 'required|integer',\n 'roleId' => 'required|array',\n 'roleId.*' => 'required|integer',\n ];\n }", "title": "" }, { "docid": "03a97b78ee8bead900f68724c369088c", "score": "0.4987746", "text": "public static function validateEntityType()\n {\n return array(\n new Main\\Entity\\Validator\\Length(null, 2),\n );\n }", "title": "" }, { "docid": "a91a6cb11a7ce2109eb30b453778495d", "score": "0.49874538", "text": "public function rules()\n {\n $rules = [\n 'spots' => 'required|array',\n 'location.lat' => 'required_with:location.lng|latitude',\n 'location.lng' => 'required_with:location.lat|longitude',\n 'address' => 'required_with:location.lat,location.lng|string',\n 'start_date' => 'date_format:Y-m-d',\n 'end_date' => 'date_format:Y-m-d',\n 'users' => 'integer|exists:users,id',\n 'category' => 'integer|exists:spot_type_categories,id'\n ];\n $rules = array_merge($rules, $this->arrayFieldRules('spots', 'integer'));\n\n return $rules;\n }", "title": "" }, { "docid": "993388a68858a8c1217f9d24882ff9d9", "score": "0.49872565", "text": "public function rules()\n {\n return [\n 'items' => 'required|array',\n 'items.title' => 'required|string',\n 'items.description' => 'required|string',\n 'items.steps' => 'present|array',\n 'items.logo' => 'nullable|string',\n ];\n }", "title": "" }, { "docid": "d3d57b61d574db0aca20a7b5f8f828f9", "score": "0.49855486", "text": "public function validate()\r\n {\r\n parent::validate();\r\n\r\n if (!is_array($this->varValue) || count($this->varValue) < 1) {\r\n $this->addError(sprintf($GLOBALS['TL_LANG']['tl_user']['chooseAtLeastOne'], $this->strLabel));\r\n }\r\n }", "title": "" }, { "docid": "f87709c57d2fee4f49a912ab5e8073c5", "score": "0.49809206", "text": "public static function validate(array $param);", "title": "" }, { "docid": "a41043699709790e38f36fb1e9123c42", "score": "0.49767435", "text": "public function rules()\n {\n return [\n 'type' => 'required|in:' . implode(',', array_keys(__('app.selects.movement.type'))),\n 'stock' => 'required|numeric',\n 'origin_id' => 'required|exists:warehouses,id',\n 'destination_id' => 'required|exists:warehouses,id',\n ];\n }", "title": "" }, { "docid": "7e9b6837c0b522153676ce95233d865d", "score": "0.49747348", "text": "public function canAddFieldsToAllTCATypesAfterExistingOnes() {}", "title": "" }, { "docid": "3ce21d7a14418757186b90a585283ba5", "score": "0.49743757", "text": "public function checkImplementationOfListable(array $datas)\n\t{\n\t\tforeach($datas as $entity){\n\t\t\tif( !is_object($entity) or ! $entity instanceof ListableDatasInterface ){\n\t\t\t\tthrow new ListableEntityViolation(\n\t\t\t\t\tsprintf('OUps ! the entity %s must implements the App\\\\Model\\\\ListableDatasInterface for \n\t\t\t\t\t\tbeing administrable as a table :( !', get_class($entity))\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c7e0c7d21c1ec06f0e0652eeac04d7bb", "score": "0.49702686", "text": "function validation_types() {\r\n\r\n\t\t\t$array[0] = __('None','ultimate-member');\r\n\t\t\t$array['alphabetic'] = __('Alphabetic value only','ultimate-member');\r\n\t\t\t$array['alpha_numeric'] = __('Alpha-numeric value','ultimate-member');\r\n\t\t\t$array['english'] = __('English letters only','ultimate-member');\r\n\t\t\t$array['facebook_url'] = __('Facebook URL','ultimate-member');\r\n\t\t\t$array['google_url'] = __('Google+ URL','ultimate-member');\r\n\t\t\t$array['instagram_url'] = __('Instagram URL','ultimate-member');\r\n\t\t\t$array['linkedin_url'] = __('LinkedIn URL','ultimate-member');\r\n\t\t\t$array['vk_url'] = __('VKontakte URL','ultimate-member');\r\n\t\t\t$array['lowercase'] = __('Lowercase only','ultimate-member');\r\n\t\t\t$array['numeric'] = __('Numeric value only','ultimate-member');\r\n\t\t\t$array['phone_number'] = __('Phone Number','ultimate-member');\r\n\t\t\t$array['skype'] = __('Skype ID','ultimate-member');\r\n\t\t\t$array['soundcloud'] = __('SoundCloud Profile','ultimate-member');\r\n\t\t\t$array['twitter_url'] = __('Twitter URL','ultimate-member');\r\n\t\t\t$array['unique_email'] = __('Unique E-mail','ultimate-member');\r\n\t\t\t$array['unique_value'] = __('Unique Metakey value','ultimate-member');\r\n\t\t\t$array['unique_username'] = __('Unique Username','ultimate-member');\r\n\t\t\t$array['unique_username_or_email'] = __('Unique Username/E-mail','ultimate-member');\r\n\t\t\t$array['url'] = __('Website URL','ultimate-member');\r\n\t\t\t$array['youtube_url'] = __('YouTube Profile','ultimate-member');\r\n\t\t\t$array['custom'] = __('Custom Validation','ultimate-member');\r\n\r\n\t\t\t/**\r\n\t\t\t * UM hook\r\n\t\t\t *\r\n\t\t\t * @type filter\r\n\t\t\t * @title um_admin_field_validation_hook\r\n\t\t\t * @description Extend validation types\r\n\t\t\t * @input_vars\r\n\t\t\t * [{\"var\":\"$types\",\"type\":\"array\",\"desc\":\"Validation Types\"}]\r\n\t\t\t * @change_log\r\n\t\t\t * [\"Since: 2.0\"]\r\n\t\t\t * @usage add_filter( 'um_admin_field_validation_hook', 'function_name', 10, 1 );\r\n\t\t\t * @example\r\n\t\t\t * <?php\r\n\t\t\t * add_filter( 'um_admin_field_validation_hook', 'my_admin_field_validation', 10, 1 );\r\n\t\t\t * function my_admin_field_validation( $types ) {\r\n\t\t\t * // your code here\r\n\t\t\t * return $types;\r\n\t\t\t * }\r\n\t\t\t * ?>\r\n\t\t\t */\r\n\t\t\t$array = apply_filters( 'um_admin_field_validation_hook', $array );\r\n\t\t\treturn $array;\r\n\t\t}", "title": "" }, { "docid": "18560b7bdf701d4acb8bf63eecde9d27", "score": "0.4966901", "text": "function input_list($field_data){\n\t\tglobal $i18n_std;\n\t\t//p2($field_data);\n\t\t$f=$field_data;\n\t\tif(!array_key_exists('list_type',$f)){$f['list_type']='';}\n\t\tif(!array_key_exists('size',$f)){$f['size']='1';}\n\t\tif(!array_key_exists('values',$f)){$f['values']=array();}\n\t\tif(!array_key_exists('value',$f)){$f['value']=null;}\n\t\tif(!array_key_exists('required',$f)){$f['required']=0;}\n\n\t\t$txt=\"<select size='\".$f['size'].\"' \".$f['cdata'].$f['ev1'].\" \";\n\t\t$txt.=\" name='\".$f[\"name\"].\"' title='\".$field_data[\"help_text\"].\"' \".$f['list_type'].\" >\";\n\t\tif($f['required']==1){\n\t\t\t$txt.=\"\\n\\t<option value='**INVALID**' $txt1> \".$i18n_std[\"form\"]['please_select'].\"</option>\";\n\t\t}\n\t\tif(!is_array($f[\"options\"])){\n\t\t\tstd::error('No Options for input:<pre>'.print_r($f,true).'</pre>');\n\t\t}else{\n\t\t\tforeach($f[\"options\"] as $k1=>$op){\n\t\t\t\tif(($f['value']!=null && $k1==$f['value']) || ($f['list_type']=='multiple' && in_array($k1,$f['values']))){$txt1=\" SELECTED \";}else{$txt1=\"\";}\n\t\t\t\t$txt.=\"\\n\\t<option value='\".$k1.\"' $txt1> \".$op.\"</option>\";\n\t\t\t}\n\t\t}\t\n\t\t$txt.=\"</select>\";\n\t\treturn($txt);\n\t}", "title": "" } ]
3a0af4f7b7a9ff4500e869d5fd585cc9
link to the glossary with no epobject_id i.e. show all entries
[ { "docid": "5a5452c3c7bdb27aa22747a2a61113f5", "score": "0.68512905", "text": "function glossary_link() {\n\t\t$URL = new URL('glossary');\n\t\t$URL->remove(array(\"g\"));\n\t\t$glossary_link = $URL->generate('url');\n\t\tprint \"<small><a href=\\\"\" . $glossary_link . \"\\\">Browse the glossary</a></small>\";\n\t}", "title": "" } ]
[ { "docid": "2fdf50db2b5cc4be6dd404ea139144d3", "score": "0.64268696", "text": "function index()\n\t{\n\t\t$this->db->from('glossary')->orderby('g_term', 'asc');\n\t\t$query = $this->db->get();\n\t\t$data['title'] = $this->lang->line('kb_glossary') . ' | '. $this->init_model->get_setting('site_name');\n\t\t$data['glossary'] = $query;\n\t\t$data['letter'] = range('a', 'z');\n\t\t\n\t\t$this->init_model->display_template('glossary', $data);\n\t}", "title": "" }, { "docid": "1bcb7907f2a188ddefe8f54fcb522714", "score": "0.5879308", "text": "function glossary_display_term(&$GLOSSARY) {\n\t\tglobal $this_page;\n\n\t\t$term = $GLOSSARY->current_term;\n\n\t\t$term['body'] = $GLOSSARY->glossarise($term['body'], 0, 1);\n\n\t\t// add some extra controls for the administrators\n\t\tif ($this_page == \"admin_glossary\"){\n\t\t\tprint \"<a id=\\\"gl\".$term['glossary_id'].\"\\\"></a>\";\n\t\t\tprint \"<h3>\" . $term['title'] . \"</h3>\";\n\t\t\t$URL = new URL('admin_glossary');\n\t\t\t$URL->insert(array(\"delete_confirm\" => $term['glossary_id']));\n\t\t\t$delete_url = $URL->generate();\n\t\t\t$admin_links = \"<br><small><a href=\\\"\".$delete_url.\"\\\">delete</a></small>\";\n\t\t}\n\t\telse {\n\t\t\t$admin_links = \"\";\n\t\t}\n\n\t\tif (isset($term['user_id'])) {\n\t\t\t$URL = new URL('userview');\n\t\t\t$URL->insert(array('u' => $term['user_id']));\n\t\t\t$user_link = $URL->generate('url');\n\n\t\t\t$user_details = \"\\t\\t\\t\\t<p><small>contributed by user <a href=\\\"\" . $user_link . \"\\\">\" . $term['firstname'] . \" \" . $term['lastname'] . \"</a></small>\" . $admin_links . \"</p>\\n\";\n\t\t}\n\t\telse {\n\t\t\t$user_details = \"\";\n\t\t}\n\n\t\tprint \"\\t\\t\\t\\t<p class=\\\"glossary-body\\\">\" . $term['body'] . \"</p>\\n\" . $user_details;\n\n\t\tif ($this_page == \"glossary_item\") {\n\t\t\t// Add a direct search link for current glossary item\n\t\t\t$URL = new URL('search');\n\t\t\t// remember to quote the term for phrase matching in search\n\t\t\t$URL->insert(array('s' => '\"'.$term['title'].'\"'));\n\t\t\t$search_url = $URL->generate();\n\t\t\tprintf (\"\\t\\t\\t\\t<p>Search hansard for \\\"<a href=\\\"%s\\\" title=\\\"View search results for this glossary item\\\">%s</a>\\\"</p>\", $search_url, $term['title']);\n\t\t}\n\t}", "title": "" }, { "docid": "87ca7f1bea12482e6a924ce9eb287e12", "score": "0.56849617", "text": "function glossary_atoz(&$GLOSSARY) {\n\n\t\t$letters = array ();\n\n\t\tforeach ($GLOSSARY->alphabet as $letter => $eps) {\n\t\t\t// if we're writing out the current letter (list or item)\n\t\t\tif ($letter == $GLOSSARY->current_letter) {\n\t\t\t\t// if we're in item view - show the letter as \"on\" but make it a link\n\t\t\t\tif ($GLOSSARY->current_term != '') {\n\t\t\t\t\t$URL = new URL('glossary');\n\t\t\t\t\t$URL->insert(array('az' => $letter));\n\t\t\t\t\t$letter_link = $URL->generate('url');\n\n\t\t\t\t\t$letters[] = \"<li class=\\\"on\\\"><a href=\\\"\" . $letter_link . \"\\\">\" . $letter . \"</a></li>\";\n\t\t\t\t}\n\t\t\t\t// otherwise in list view show no link\n\t\t\t\telse {\n\t\t\t\t\t$letters[] = \"<li class=\\\"on\\\">\" . $letter . \"</li>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif (!empty($GLOSSARY->alphabet[$letter])) {\n\t\t\t\t$URL = new URL('glossary');\n\t\t\t\t$URL->insert(array('az' => $letter));\n\t\t\t\t$letter_link = $URL->generate('url');\n\n\t\t\t\t$letters[] = \"<li><a href=\\\"\" . $letter_link . \"\\\">\" . $letter . \"</a></li>\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$letters[] = '<li>' . $letter . '</li>';\n\t\t\t}\n\t\t}\n\t\t?>\n\t\t\t\t\t<div class=\"letters\">\n\t\t\t\t\t\t<ul>\n\t<?php\n\t\tfor($n=0; $n<13; $n++) {\n\t\t\tprint $letters[$n];\n\t\t}\n\t\t?>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t<ul>\n\t<?php\n\t\tfor($n=13; $n<26; $n++) {\n\t\t\tprint $letters[$n];\n\t\t}\n\t\t?>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"break\">&nbsp;</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "14cd22cd40e4960e79e30036e7f6a9f8", "score": "0.55194074", "text": "public function allGlossaries()\n {\n # Load view\n $view = View::make('admin.glossaries.listing');\n $view->with('listing_title', 'All Glossaries');\n\n # Fetch all glossaries\n $glossaries = Glossary::select('*')->withLanguage('en');\n \n # Filtration\n $status = Input::get('status');\n if ($status) {\n $glossaries->where('status', $status);\n $view->with('listing_title', ucfirst($status) . ' Glossaries');\n }\n\n # Searching\n if (Input::has('search')) {\n $glossaries->where(function($query){\n $keywords = Input::get('search');\n $query->where('terms', 'LIKE', '%'.$keywords.'%');\n $query->orWhere('definition', 'LIKE', '%'.$keywords.'%');\n });\n\n $view->with('listing_title', 'Search Result: ' . Input::get('search'));\n }\n\n # Ordering\n $sort = Input::get('sort', 'glossaries.id');\n $sort_order = Input::get('sort_order', 'desc');\n $glossaries->orderBy($sort, $sort_order);\n\n # Pagination\n $per_page = Input::get('show', 20);\n $records = $glossaries->paginate($per_page);\n\n $view->with('records', $records);\n\n # Data Grid\n $datagrid = DataGrid::make($records, [\n 'terms' => ['sort' => true, 'callback' => [$this, 'editLink']],\n 'status' => ['width' => '150px', 'callback' => 'HTML::statusLabel'],\n 'ordering' => ['width' => '150px', 'sort' => true, 'class' => 'text-right'],\n 'updated_date' => ['width' => '150px', 'sort' => true, 'callback' => 'DataGrid::dateTimeFormat']\n ]);\n\n $datagrid->actionRegister('Edit', 'edit', URL::admin('glossaries/edit'));\n $datagrid->actionRegister('Delete', 'delete', URL::admin('glossaries/delete'));\n $datagrid->actionRegister('Active', 'active', URL::admin('glossaries/status/active'));\n $datagrid->actionRegister('Inactive', 'inactive', URL::admin('glossaries/status/inactive'));\n\n $datagrid->bulkActions(['active','inactive','delete']);\n $datagrid->singleActions(['edit','active','inactive','delete']);\n $datagrid->sortBy($sort, $sort_order);\n\n $view->with('datagrid', $datagrid);\n\n return $view;\n }", "title": "" }, { "docid": "4bf3c1954ab970d8add1a1d5f22648ea", "score": "0.54666996", "text": "function glossary_addterm_link() {\n\t\t$URL = new URL('glossary_addterm');\n\t\t$URL->remove(array(\"g\"));\n\t\t$glossary_addterm_link = $URL->generate('url');\n\t\tprint \"<small><a href=\\\"\" . $glossary_addterm_link . \"\\\">Add a term to the glossary</a></small>\";\n\t}", "title": "" }, { "docid": "2c8d84f352949900d03cd1b26503a82a", "score": "0.53682595", "text": "function glossary_addlink_link() {\n\t\t$URL = new URL('glossary_addlink');\n\t\t$URL->remove(array(\"g\"));\n\t\t$glossary_addlink_link = $URL->generate('url');\n\t\tprint \"<small><a href=\\\"\" . $glossary_addlink_link . \"\\\">Add an external link</a></small>\";\n\t}", "title": "" }, { "docid": "fa23933e40d13b4030a5e692e8cf9472", "score": "0.5299023", "text": "public static function tryGenerateGlossaryIndexPage() {\n\t\t$glossaryIndexId = self::getGlossaryIndexPageId();\n\t\tif ( $glossaryIndexId == -1 && get_post( $glossaryIndexId ) === null ) {\n\t\t\t$id = wp_insert_post( array(\n\t\t\t\t'post_author'\t => get_current_user_id(),\n\t\t\t\t'post_status'\t => 'publish',\n\t\t\t\t'post_title'\t => 'Glossary',\n\t\t\t\t'post_type'\t\t => 'page',\n\t\t\t\t'post_content'\t => '[glossary]'\n\t\t\t) );\n\n\t\t\tif ( is_numeric( $id ) ) {\n\t\t\t\tupdate_option( 'cmtt_glossaryID', $id );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "3e90ffc5f98f567af4e92cbcb64112ed", "score": "0.5296378", "text": "public function get_rdf_repository_simple() {\n \n //$user_owner = get_user_by('id', $item->post_author);\n $xml = '<owl:Ontology rdf:about=\"'.site_url().'\" >';\n if(!empty(get_option('blogname'))):\n $xml .= \"<rdfs:label>\".htmlspecialchars(get_option('blogname')).\"</rdfs:label>\";\n endif;\n if(!empty(get_option('blogdescription'))):\n $xml .= \"<rdfs:comment>\". htmlspecialchars(get_option('blogdescription')).\"</rdfs:comment>\";\n endif;\n $xml .= '</owl:Ontology>';\n //category_root\n $xml .= '<owl:Class rdf:about=\"'. $this->root_url.'\" >';\n $xml .= \"<rdfs:label>{$this->category_root->name}</rdfs:label>\";\n $xml .= '<rdfs:subClassOf rdf:resource=\"http://www.w3.org/2004/02/skos/core#Concept\" />';\n $xml .= '</owl:Class>';\n //content-text\n $xml .= '<owl:DataTypeProperty rdf:about=\"'.site_url().'?property=content-text\" >';\n $xml .= '<rdfs:range rdf:resource=\"http://www.w3.org/2001/XMLSchema#string\" />';\n $xml .= '<rdfs:domain rdf:resource=\"'.$this->root_url.'\" />';\n $xml .= '<rdfs:label>'.__('Content','tainacan').'</rdfs:label>';\n $xml .= '<owl:maxCardinality rdf:datatype=\"xsd:nonNegativeInteger\" >1</owl:maxCardinality>';\n $xml .= '</owl:DataTypeProperty>';\n //content\n $xml .= '<owl:ObjectProperty rdf:about=\"'.site_url().'?property=content\" >';\n $xml .= '<rdfs:range rdf:resource=\"'.site_url().'?category=media\" />';\n $xml .= '<rdfs:domain rdf:resource=\"'.$this->root_url.'\" />';\n $xml .= '<rdfs:label>'.__('Content','tainacan').'</rdfs:label>';\n $xml .= '<owl:maxCardinality rdf:datatype=\"xsd:nonNegativeInteger\" >1</owl:maxCardinality>';\n $xml .= '</owl:ObjectProperty>';\n //attachment\n $xml .= '<owl:ObjectProperty rdf:about=\"'.site_url().'?property=attachment\" >';\n $xml .= '<rdfs:range rdf:resource=\"'.site_url().'?category=media\" />';\n $xml .= '<rdfs:domain rdf:resource=\"'.$this->root_url.'\" />';\n $xml .= '<rdfs:label>'.__('Attachment','tainacan').'</rdfs:label>';\n $xml .= '<owl:maxCardinality rdf:datatype=\"xsd:nonNegativeInteger\" >1</owl:maxCardinality>';\n $xml .= '</owl:ObjectProperty>';\n //ranking\n $xml .= '<owl:DataTypeProperty rdf:about=\"'.site_url().'?property=socialdb_property_ranking\" >';\n $xml .= '<rdfs:range rdf:resource=\"http://www.w3.org/2001/XMLSchema#string\" />';\n $xml .= '<rdfs:domain rdf:resource=\"'.$this->root_url.'\" />';\n $xml .= '<rdfs:label>'.__('Ranking','tainacan').'</rdfs:label>';\n $xml .= '</owl:DataTypeProperty>';\n //ranking-binary\n $xml .= '<owl:DataTypeProperty rdf:about=\"'.site_url().'?property=socialdb_property_ranking_binary\" >';\n $xml .= '<rdfs:subClassOf rdf:resource=\"'.site_url().'?property=socialdb_property_ranking\" />';\n $xml .= '<rdfs:label>'.__('Ranking Binary','tainacan').'</rdfs:label>';\n $xml .= '</owl:DataTypeProperty>';\n //ranking-stars\n $xml .= '<owl:DataTypeProperty rdf:about=\"'.site_url().'?property=socialdb_property_ranking_stars\" >';\n $xml .= '<rdfs:subClassOf rdf:resource=\"'.site_url().'?property=socialdb_property_ranking\" />';\n $xml .= '<rdfs:label>'.__('Ranking Stars','tainacan').'</rdfs:label>';\n $xml .= '</owl:DataTypeProperty>';\n //ranking-like\n $xml .= '<owl:DataTypeProperty rdf:about=\"'.site_url().'?property=socialdb_property_ranking_like\" >';\n $xml .= '<rdfs:subClassOf rdf:resource=\"'.site_url().'?property=socialdb_property_ranking\" />';\n $xml .= '<rdfs:label>'.__('Ranking Binary','tainacan').'</rdfs:label>';\n $xml .= '</owl:DataTypeProperty>';\n //tag\n $xml .= '<owl:Class rdf:about=\"'.site_url().'?category=tag\" >';\n $xml .= \"<rdfs:label>\".__('Tag','tainacan').\"</rdfs:label>\";\n $xml .= '<rdfs:subClassOf rdf:resource=\"http://www.w3.org/2004/02/skos/core#Concept\" />';\n $xml .= '</owl:Class>';\n //propriedade de objeto da categoria com a tag\n $xml .= '<owl:ObjectProperty rdf:about=\"'.site_url().'?property=has-tag\" >';\n $xml .= '<rdfs:range rdf:resource=\"'.site_url().'?category=tag\" />';\n $xml .= '<rdfs:domain rdf:resource=\"'.$this->root_url.'\" />';\n $xml .= '<rdfs:label>'.__('Classified as tag','tainacan').'</rdfs:label>';\n $xml .= '</owl:ObjectProperty>';\n //license\n $xml .= '<owl:Class rdf:about=\"'.site_url().'?category=license\" >';\n $xml .= \"<rdfs:label>\".__('License','tainacan').\"</rdfs:label>\";\n $xml .= '<rdfs:subClassOf rdf:resource=\"http://www.w3.org/2004/02/skos/core#Concept\" />';\n $xml .= '</owl:Class>';\n //media\n $xml .= '<owl:Class rdf:about=\"'.site_url().'?category=media\" >';\n $xml .= \"<rdfs:label>\".__('Media','tainacan').\"</rdfs:label>\";\n $xml .= '<rdfs:subClassOf rdf:resource=\"http://www.w3.org/2004/02/skos/core#Concept\" />';\n $xml .= '</owl:Class>';\n $xml .= $this->generate_rdf_properties_repository();\n return $xml;\n }", "title": "" }, { "docid": "1278c40323c7932b717357a253928d53", "score": "0.5275848", "text": "function hyrarchic_links($id)\r\n {\r\n $tempArray = thesaurus::get_parent($id);\r\n if ($tempArray)\r\n {\r\n echo \"<form method='get' action='index.php' name='ob'>\";\r\n echo \"<fieldset>\";\r\n echo \"<legend>Oberbegriffe</legend>\";\r\n \r\n $x = 0;\r\n $listArray = array();\r\n foreach($tempArray as $entry)\r\n {\r\n $listArray[$x++] = thesaurus::get_descriptor($entry);\r\n }\r\n\r\n echo_selection($listArray,\"id\",\"\",3,\"upper-field\");\r\n\r\n // display action line\r\n action::display($id,1);\r\n\r\n echo \"</fieldset>\";\r\n echo \"</form>\";\r\n }\r\n }", "title": "" }, { "docid": "d996a9de532c455cc99d541eca99470f", "score": "0.5131315", "text": "function glossary_search_form ($args) {\n\t\tglobal $THEUSER;\n\n\t\t$type = \"\";\n\n\t\tif (isset($args['blankform']) && $args['blankform'] == 1) {\n\t\t\t$formcontent = \"\";\n\t\t}\n\t\telse {\n\t\t\t$formcontent = htmlentities(get_http_var('g'));\n\t\t}\n\n\t\tif ($THEUSER->isloggedin()) {\n\t\t\t$URL = new URL($args['action']);\n\t\t\t$URL->remove(array('g'));\n\t\t}\n\t\telse {\n\t\t\t$URL = new URL('userprompt');\n\t\t\t$URL->remove(array('g'));\n\t\t\t$type = \"<input type=\\\"hidden\\\" name=\\\"type\\\" value=\\\"2\\\">\";\n\t\t}\n\n\t\t$add_link = $URL->generate('url');\n\t\t?>\n\t\t<form action=\"<?php echo $add_link; ?>\" method=\"get\">\n\t\t<?php echo $type; ?>\n\t\t<p>Help make OpenAustralia.org better by adding a definition:<br>\n\t\t<label for=\"g\"><input type=\"text\" name=\"g\" value=\"<?php echo $formcontent; ?>\" size=\"45\">\n\t\t<input type=\"submit\" value=\"Search\" class=\"submit\"></label>\n\t\t</p>\n\t\t</form>\n<?php\n\t}", "title": "" }, { "docid": "04956a0a606742f3278d7954dd90d87b", "score": "0.51167214", "text": "function opensearch_view($os) {\n if ($os['feed']) {\n // Retrieve and log the search keywords.\n $keywords = trim(search_get_keys());\n $os->watchdog($keywords);\n\n // OpenSearch pages are 1-indexed.\n if (isset($_GET['page'])) {\n $_GET['page']--;\n }\n\n $os->feed($keywords);\n }\n else {\n drupal_not_found();\n }\n}", "title": "" }, { "docid": "8211cfffe478c148986759f0910300ed", "score": "0.5113549", "text": "function term($term='')\n\t{\n\t\t$term = $this->input->xss_clean($term);\n\t\t$this->db->from('glossary');\n\t\tif($term == 'sym') {\n\t\t\t$this->db->where('g_term LIKE', '.%');\n\t\t\t$this->db->orwhere('g_term LIKE', '0%');\n\t\t\t$this->db->orwhere('g_term LIKE', '1%');\n\t\t\t$this->db->orwhere('g_term LIKE', '2%');\n\t\t\t$this->db->orwhere('g_term LIKE', '3%');\n\t\t\t$this->db->orwhere('g_term LIKE', '4%');\n\t\t\t$this->db->orwhere('g_term LIKE', '5%');\n\t\t\t$this->db->orwhere('g_term LIKE', '6%');\n\t\t\t$this->db->orwhere('g_term LIKE', '7%');\n\t\t\t$this->db->orwhere('g_term LIKE', '8%');\n\t\t\t$this->db->orwhere('g_term LIKE', '9%');\n\t\t} else {\n\t\t\t$this->db->where('g_term LIKE', $term.'%');\n\t\t}\n\t\t$query = $this->db->get();\n\t\t$data['glossary'] = $query;\n\t\t$data['letter'] = range('a', 'z');\n\t\t$data['title'] = $this->lang->line('kb_glossary') . ' | '. $this->init_model->get_setting('site_name');\n\t\t\n\t\t$this->init_model->display_template('glossary', $data);\n\t}", "title": "" }, { "docid": "c0ec75cab0e13cf00943315d762245e6", "score": "0.50716007", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $galeries = $em->getRepository('HopitalBundle:Galerie')->findAll();\n $categories = $em->getRepository('HopitalBundle:GalerieCategorie')->findAll();\n\n\n\n\n return $this->render('HopitalBundle:documentation:galerie_index.html.twig', array(\n 'galeries' => $galeries,\n 'categories' => $categories,\n ));\n }", "title": "" }, { "docid": "ee38ef9e224f9eb3245d455188cd82e7", "score": "0.5055662", "text": "public static function view_entry($id) {\n global $DB, $USER;\n\n $params = self::validate_parameters(self::view_entry_parameters(), array('id' => $id));\n $id = $params['id'];\n $warnings = array();\n\n // Get and validate the glossary.\n $entry = $DB->get_record('glossary_entries', array('id' => $id), '*', MUST_EXIST);\n list($glossary, $context, $course, $cm) = self::validate_glossary($entry->glossaryid);\n\n if (!glossary_can_view_entry($entry, $cm)) {\n throw new invalid_parameter_exception('invalidentry');\n }\n\n // Trigger view.\n glossary_entry_view($entry, $context);\n\n return array(\n 'status' => true,\n 'warnings' => $warnings\n );\n }", "title": "" }, { "docid": "397838c24fb3bdcdf7c6b609f853fea8", "score": "0.50186706", "text": "public static function outputGlossaryIndexPage( $shortcodeAtts ) {\n\t\tglobal $post;\n\n\t\t$content = '';\n\n\t\t$glossaryIndexContentArr = array();\n\n\t\tif ( $post === NULL && !empty( $shortcodeAtts[ 'post_id' ] ) ) {\n\t\t\t$post = get_post( $shortcodeAtts[ 'post_id' ] );\n\t\t}\n\n\t\t/*\n\t\t * Checks whether to show tooltips on main glossary page or not\n\t\t */\n\t\t$tooltipsDisabled = apply_filters( 'cmtt_glossary_index_disable_tooltips', FALSE, $post );\n\n\t\t/*\n\t\t * Checks whether to show links to glossary pages or not\n\t\t */\n\t\t$removeLinksToTerms = apply_filters( 'cmtt_glossary_index_remove_links_to_terms', FALSE, $post );\n\n\t\t/*\n\t\t * Whether the terms should be hidden\n\t\t */\n\t\t$hideTerms = !empty( $shortcodeAtts[ 'hide_terms' ] );\n\n\t\t/*\n\t\t * Set the display style of Glossary Index Page\n\t\t */\n\t\t$glossaryIndexStyle = $shortcodeAtts[ 'glossary_index_style' ];\n\n\t\t/*\n\t\t * Get the pagination position\n\t\t */\n\t\t$paginationPosition = $shortcodeAtts[ 'pagination_position' ];\n\n\t\t$args = array(\n\t\t\t'post_type'\t\t\t\t => 'glossary',\n\t\t\t'post_status'\t\t\t => 'publish',\n\t\t\t'orderby'\t\t\t\t => 'title',\n\t\t\t'order'\t\t\t\t\t => 'ASC',\n\t\t\t'update_post_meta_cache' => false,\n\t\t\t'update_post_term_cache' => false,\n\t\t\t'suppress_filters'\t\t => false\n\t\t);\n\n\t\tif ( self::isServerSide() ) {\n\t\t\t$args[ 'posts_per_page' ] = get_option( 'cmtt_perPage' );\n\n\t\t\t/*\n\t\t\t * Turn off the pagination if terms are hidden, so we can fill the list with synonyms and abbreviations\n\t\t\t */\n\t\t\tif ( $args[ 'posts_per_page' ] != 0 && !$hideTerms ) {\n\t\t\t\t$currentPage = isset( $shortcodeAtts[ 'itemspage' ] ) ? $shortcodeAtts[ 'itemspage' ] : 1;\n\t\t\t\tif ( $currentPage < 1 ) {\n\t\t\t\t\t$currentPage = 1;\n\t\t\t\t}\n\t\t\t\t$args[ 'paged' ] = $currentPage;\n\t\t\t} else {\n\t\t\t\t$args[ 'nopaging' ] = true;\n\t\t\t}\n\t\t} else {\n\t\t\t$args[ 'nopaging' ] = true;\n\t\t}\n\n\t\t/*\n\t\t * Added in 3.3.7 - we need a way to make sure no posts are displayed if the search_term is empty,\n\t\t * as we only want to display the Index if the user's searching\n\t\t */\n\t\tif($shortcodeAtts['only_on_search'] && empty($shortcodeAtts[ 'search_term' ])){\n\t\t\t$args['p'] = -1;\n\t\t}\n\n\t\t$args = apply_filters( 'cmtt_glossary_index_query_args', $args, $shortcodeAtts );\n\t\tdo_action( 'cmtt_glossary_index_query_before', $args, $shortcodeAtts );\n\n\t\t$glossary_index\t = CMTT_Pro::getGlossaryItems( $args );\n\t\t$glossary_query\t = CMTT_Pro::$lastQueryDetails[ 'query' ];\n\n\t\tdo_action( 'cmtt_glossary_index_query_after', $glossary_query, $args );\n\n\t\t/*\n\t\t * Size of the Glossary Index Letters (defaults to 'small')\n\t\t */\n\t\t$letterSize\t\t\t = get_option( 'cmtt_indexLettersSize' );\n\t\t$glossary_list_id\t = apply_filters( 'cmtt_glossary_index_list_id', 'glossaryList' );\n\t\t/*\n\t\t * Style links based on option\n\t\t */\n\t\t$glossary_list_class = apply_filters( 'cmtt_glossary_index_list_class', (get_option( 'cmtt_glossaryDiffLinkClass' ) == 1) ? 'glossaryLinkMain' : 'glossaryLink' );\n\n\t\t$content .= apply_filters( 'cmtt_glossary_index_before_listnav_content', '', $shortcodeAtts, $glossary_query );\n\n\t\t$listnavContent = '<div id=\"' . $glossary_list_id . '-nav\" class=\"listNav ' . $letterSize . '\" role=\"tablist\">';\n\t\t$listnavContent .= apply_filters( 'cmtt_glossary_index_listnav_content_inside', '', $shortcodeAtts, $glossary_query );\n\t\t$listnavContent .= '</div>';\n\n\t\t$content .= apply_filters( 'cmtt_glossary_index_listnav_content', $listnavContent, $shortcodeAtts, $glossary_query );\n\n\t\tif ( self::isServerSide() && !isset( $args[ 'nopaging' ] ) && in_array( $paginationPosition, array( 'top', 'both' ) ) ) {\n\t\t\t$content .= apply_filters( 'cmtt_glossary_index_pagination', '', $glossary_query, $shortcodeAtts );\n\t\t}\n\n\t\tif ( $glossary_index ) {\n\n\t\t\tforeach ( $glossary_index as $glossaryItem ) {\n\t\t\t\t/*\n\t\t\t\t * Check if need to add description/excerpt on tooltip index\n\t\t\t\t */\n\t\t\t\t$glossaryItemDesc\t = (get_option( 'cmtt_glossaryTooltipDesc' ) == 1) ? '<div class=\"glossary_itemdesc\">' . strip_tags( $glossaryItem->post_content ) . '</div>' : '';\n\t\t\t\t$glossaryItemDesc\t = apply_filters( 'cmtt_glossary_index_item_desc', $glossaryItemDesc, $glossaryItem, $glossaryIndexStyle, $shortcodeAtts );\n\n\t\t\t\t$permalink = apply_filters( 'cmtt_term_tooltip_permalink', get_permalink( $glossaryItem ), $glossaryItem );\n\n\t\t\t\tif ( $removeLinksToTerms ) {\n\t\t\t\t\t$href\t = '';\n\t\t\t\t\t$tag\t = 'span';\n\t\t\t\t} else {\n\t\t\t\t\t$tag\t = 'a';\n\t\t\t\t\t$href\t = 'href=\"' . apply_filters( 'cmtt_index_term_tooltip_permalink', $permalink, $glossaryItem, $shortcodeAtts ) . '\"';\n\t\t\t\t}\n\n\t\t\t\t$letterSeparatorContent\t = '';\n\t\t\t\t$preItemTitleContent\t = '';\n\t\t\t\t$postItemTitleContent\t = '';\n\n\t\t\t\t$liAdditionalClass\t = '';\n\t\t\t\t$thumbnail\t\t\t = '';\n\n\t\t\t\tif ( get_option( 'cmtt_showFeaturedImageThumbnail', FALSE ) && in_array( $glossaryIndexStyle, array( 'classic-excerpt', 'classic-definition' ) ) ) {\n\t\t\t\t\t$thumbnail = get_the_post_thumbnail( $glossaryItem->ID, array( 50, 50 ), array( 'style' => 'margin:1px 5px' ) );\n\t\t\t\t\tif ( !empty( $thumbnail ) ) {\n\t\t\t\t\t\t$liAdditionalClass = 'cmtt-has-thumbnail';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$preItemTitleContent .= '<li class=\"' . $liAdditionalClass . '\">';\n\t\t\t\t$preItemTitleContent .= $thumbnail;\n\n\t\t\t\t/*\n\t\t\t\t * Start the internal tag: span or a\n\t\t\t\t */\n\t\t\t\t$additionalClass = apply_filters( 'cmtt_term_tooltip_additional_class', '', $glossaryItem );\n\t\t\t\t$excludeTT\t\t = CMTT_Pro::_get_meta( '_cmtt_exclude_tooltip', $glossaryItem->ID );\n\t\t\t\t$preItemTitleContent .= '<' . $tag . ' class=\"' . $glossary_list_class . ' ' . $additionalClass . '\" ' . $href . ' ';\n\n\t\t\t\t/*\n\t\t\t\t * Add tooltip if needed (general setting enabled and page not excluded from plugin)\n\t\t\t\t */\n\t\t\t\tif ( !$tooltipsDisabled && !$excludeTT ) {\n\t\t\t\t\t$tooltipContent\t = apply_filters( 'cmtt_glossary_index_tooltip_content', '', $glossaryItem );\n\t\t\t\t\t$tooltipContent\t = apply_filters( 'cmtt_3rdparty_tooltip_content', $tooltipContent, $glossaryItem, true );\n\t\t\t\t\t$tooltipContent\t = apply_filters( 'cmtt_tooltip_content_add', $tooltipContent, $glossaryItem );\n\t\t\t\t\t$preItemTitleContent .= 'data-cmtooltip=\"' . $tooltipContent . '\"';\n\t\t\t\t}\n\t\t\t\t$preItemTitleContent .= '>';\n\n\t\t\t\t/*\n\t\t\t\t * Add filter to change the content of what's before the glossary item title on the list\n\t\t\t\t */\n\t\t\t\t$preItemTitleContent = apply_filters( 'cmtt_glossaryPreItemTitleContent_add', $preItemTitleContent, $glossaryItem );\n\n\t\t\t\t/*\n\t\t\t\t * Insert post title here later on\n\t\t\t\t */\n\t\t\t\t$postItemTitleContent .= '</' . $tag . '>';\n\t\t\t\t/*\n\t\t\t\t * Add description if needed\n\t\t\t\t */\n\t\t\t\t$postItemTitleContent .= $glossaryItemDesc;\n\t\t\t\t$postItemTitleContent .= '</li>';\n\n\t\t\t\tif ( !$hideTerms ) {\n\t\t\t\t\t$glossaryIndexContentArr[ mb_strtolower( $glossaryItem->post_title ) ] = $letterSeparatorContent . $preItemTitleContent . $glossaryItem->post_title . $postItemTitleContent;\n\t\t\t\t}\n\n\t\t\t\t$glossaryIndexContentArr = apply_filters( 'cmtt_glossary_index_content_arr', $glossaryIndexContentArr, $glossaryItem, $preItemTitleContent, $postItemTitleContent, $shortcodeAtts );\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * Don't need this later\n\t\t\t */\n\t\t\t$glossary_index = NULL;\n\n\t\t\t$content .= '<ul class=\"glossaryList\" role=\"tabpanel\" id=\"' . $glossary_list_id . '\">';\n\n\t\t\tif ( extension_loaded( 'intl' ) === true ) {\n\t\t\t\t$customLocale\t = get_option( 'cmtt_index_locale', '' );\n\t\t\t\t$locale\t\t\t = !empty( $customLocale ) ? $customLocale : get_locale();\n\n\t\t\t\tif ( is_object( $collator = collator_create( $locale ) ) === true ) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Add support for natural sorting order\n\t\t\t\t\t */\n\t\t\t\t\t$collator->setAttribute( Collator::NUMERIC_COLLATION, Collator::ON );\n\t\t\t\t\t$glossariIndexContentArrFliped\t = array_flip( $glossaryIndexContentArr );\n\t\t\t\t\t$glossaryIndexContentArr\t\t = null;\n\t\t\t\t\tcollator_asort( $collator, $glossariIndexContentArrFliped );\n\t\t\t\t\t$glossariIndexContentArrUnFliped = array_flip( $glossariIndexContentArrFliped );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$glossariIndexContentArrUnFliped = $glossaryIndexContentArr;\n\t\t\t\tuksort( $glossariIndexContentArrUnFliped, array( __CLASS__, 'mb_string_compare' ) );\n\t\t\t}\n\n\t\t\t$isFirstIndexLetter = true;\n\n\t\t\tforeach ( $glossariIndexContentArrUnFliped as $key => $value ) {\n\n\t\t\t\t/* ML */\n\t\t\t\tif ( in_array( $glossaryIndexStyle, array( 'classic-table', 'modern-table','expand-style','grid-style','cube-style' ) ) ) {\n\t\t\t\t\t$newIndexLetter = self::detectStartNewIndexLetter( null, $key );\n\n\t\t\t\t\tif ( $newIndexLetter !== false ) {\n\t\t\t\t\t\tif ( !$isFirstIndexLetter ) {\n\t\t\t\t\t\t\t$content .= '<li class=\"the-letter-separator\"></li>';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$content .= '<li class=\"the-index-letter\"><h2>' . $newIndexLetter . '</h2></li>';\n\t\t\t\t\t\t$isFirstIndexLetter = FALSE;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$content .= $value;\n\t\t\t}\n\t\t\t$content .= '</ul>';\n\n\t\t\tif ( self::isServerSide() && !isset( $args[ 'nopaging' ] ) && in_array( $paginationPosition, array( 'bottom', 'both' ) ) ) {\n\t\t\t\t$content .= apply_filters( 'cmtt_glossary_index_pagination', '', $glossary_query, $shortcodeAtts );\n\t\t\t}\n\t\t} else {\n\t\t\t$noResultsText = __( get_option( 'cmtt_glossary_NoResultsLabel', 'Nothing found. Please change the filters.' ), 'cm-tooltip-glossary' );\n\t\t\t$content.= '<span class=\"error\">' . $noResultsText . '</span>';\n\t\t}\n\n\t\t$content = apply_filters( 'cmtt_glossary_index_after_content', $content, $glossary_query, $shortcodeAtts );\n\n\t\tdo_action( 'cmtt_after_glossary_index' );\n\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "b29809273cad707c88c944dbd87fd5b9", "score": "0.5010222", "text": "public static function view_glossary($id, $mode) {\n $params = self::validate_parameters(self::view_glossary_parameters(), array(\n 'id' => $id,\n 'mode' => $mode\n ));\n $id = $params['id'];\n $mode = $params['mode'];\n $warnings = array();\n\n // Get and validate the glossary.\n list($glossary, $context, $course, $cm) = self::validate_glossary($id);\n\n // Trigger module viewed event.\n glossary_view($glossary, $course, $cm, $context, $mode);\n\n return array(\n 'status' => true,\n 'warnings' => $warnings\n );\n }", "title": "" }, { "docid": "404e28641c8d4b8fa57e2bac03eb3087", "score": "0.5003707", "text": "public function listAction($id = null, Request $request)\n {\n $termManager = new TermManager($this->getDoctrine()->getEntityManager());\n $repository = $termManager->getRepository();\n\n $searchForm = $this->createForm(new SearchType(), new Search());\n $searchFormHandler = new SearchFormHandler($searchForm, $request);\n if ($searchFormHandler->process()) {\n $terms = $repository->findByKeywordsAndOrderedByTerm($searchForm->getData()->getKeywords());\n } else {\n $terms = $repository->findAllOrderedByTerm();\n }\n \n // Grouping terms by first letter\n $letters = array_fill_keys(range('A', 'Z'), array());\n foreach ($terms as $term) {\n $letter = strtoupper(substr($term, 0, 1)); \n $letters[$letter][] = $term;\n }\n \n $term = (null !== $id) ? $repository->find($id) : $termManager->create();\n\n $form = $this->createForm(new TermType(), $term);\n $formHandler = new TermFormHandler($form, $request, $termManager);\n if ($formHandler->process()) {\n return $this->redirect($this->generateUrl('isics_glossary_list'));\n }\n\n return $this->render('IsicsGlossaryBundle:Main:list.html.twig', array(\n 'id' => $id,\n 'form' => $form->createView(),\n 'searchForm' => $searchForm->createView(),\n 'letters' => $letters\n ));\n }", "title": "" }, { "docid": "15d78eff55f69889594eba8861c39170", "score": "0.49681205", "text": "function edan_search_object_shortcode($atts)\n {\n $edanURL = NULL;\n $nosearch = False;\n\n if($atts)\n {\n if(array_key_exists('url', $atts))\n {\n $edanURL = $atts['url'];\n $nosearch = True;\n }\n }\n\n $call = new edan_object_call();\n $object = new edan_object_view($call->get($edanURL), $nosearch);\n\n return $object->get_content();\n }", "title": "" }, { "docid": "ec20cab8924aa75be98630d72f262625", "score": "0.49412566", "text": "public function actionIndex()\n {\n $searchModel = new ArticleSearch();\n if(isset($_GET['kind'])) $searchModel->kind=$_GET['kind'];\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "81c93041018eb04bfbbff13dc4e15806", "score": "0.4926849", "text": "public function show_list($p_obj_id)\n {\n $l_sql = 'SELECT isys_catg_relation_list__isys_obj__id__master, isys_catg_relation_list__isys_obj__id__slave, obj.isys_obj__isys_obj_type__id, obj.isys_obj__title AS title\n FROM isys_catg_relation_list\n INNER JOIN isys_obj AS obj ON isys_catg_relation_list__isys_obj__id__slave = obj.isys_obj__id\n INNER JOIN isys_obj AS relObj ON isys_catg_relation_list__isys_obj__id = relObj.isys_obj__id\n WHERE isys_catg_relation_list__isys_obj__id__master = ' . $this->m_dao_rel->convert_sql_id($p_obj_id) . '\n AND obj.isys_obj__status = ' . $this->m_dao_rel->convert_sql_int(C__RECORD_STATUS__NORMAL) . '\n AND isys_catg_relation_list__status = ' . $this->m_dao_rel->convert_sql_int(C__RECORD_STATUS__NORMAL) . '\n AND relObj.isys_obj__status = ' . $this->m_dao_rel->convert_sql_int(C__RECORD_STATUS__NORMAL) . '\n GROUP BY isys_catg_relation_list__isys_obj__id__slave ';\n\n $l_res = $this->m_dao_rel->retrieve($l_sql);\n\n while ($l_row = $l_res->get_row()) {\n if ($l_row[\"isys_catg_relation_list__isys_obj__id__master\"] == $p_obj_id &&\n (is_null($this->m_obj_arr) || !in_array($l_row[\"isys_catg_relation_list__isys_obj__id__slave\"], $this->m_obj_arr))) {\n if ($l_row[\"isys_obj__isys_obj_type__id\"] == defined_or_default('C__OBJTYPE__IT_SERVICE')) {\n $this->m_its_arr[$l_row[\"isys_catg_relation_list__isys_obj__id__slave\"]] = $l_row[\"title\"];\n }\n\n if (in_array($this->m_dao_rel->get_objTypeID($l_row['isys_catg_relation_list__isys_obj__id__slave']), $this->m_software_obj_types)) {\n $l_sql = 'SELECT isys_catg_relation_list__isys_obj__id\n FROM isys_catg_relation_list\n INNER JOIN isys_obj ON isys_obj__id = isys_catg_relation_list__isys_obj__id\n WHERE isys_catg_relation_list__isys_obj__id__master = ' . $this->m_dao_rel->convert_sql_id($p_obj_id) . '\n AND isys_catg_relation_list__isys_obj__id__slave = ' . $this->m_dao_rel->convert_sql_id($l_row['isys_catg_relation_list__isys_obj__id__slave']) . '\n AND isys_obj__status = ' . $this->m_dao_rel->convert_sql_int(C__RECORD_STATUS__NORMAL) . '\n AND isys_catg_relation_list__status = ' . $this->m_dao_rel->convert_sql_int(C__RECORD_STATUS__NORMAL) . '\n GROUP BY isys_catg_relation_list__isys_obj__id';\n\n $l_res_app = $this->m_dao_rel->retrieve($l_sql);\n\n while ($l_row_app = $l_res_app->get_row()) {\n $l_its_data = $this->m_dao_its_comp\n ->get_data(null, null, \"AND isys_connection__isys_obj__id = \" . $this->m_dao_rel->convert_sql_id($l_row_app[\"isys_catg_relation_list__isys_obj__id\"]), null, C__RECORD_STATUS__NORMAL)\n ->get_row();\n\n // Check in it service components\n if (isset($l_its_data['isys_obj__id']) &&\n $this->m_dao_rel->get_objTypeID($l_its_data['isys_obj__id']) == defined_or_default('C__OBJTYPE__IT_SERVICE')) {\n if (!array_key_exists($l_its_data['isys_obj__id'], $this->m_its_arr)) {\n $this->m_its_arr[$l_its_data['isys_obj__id']] = $l_its_data['isys_obj__title'];\n }\n }\n }\n }\n\n $this->m_obj_arr[] = $l_row[\"isys_catg_relation_list__isys_obj__id__slave\"];\n $this->new_recurse_relation($l_row[\"isys_catg_relation_list__isys_obj__id__slave\"], $p_obj_id);\n unset($this->m_obj_arr);\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "21f8f31c3f6c4f60e6b0edf89bec8dbf", "score": "0.49187762", "text": "function do_feed_rdf()\n {\n }", "title": "" }, { "docid": "309ad29c9f200f6b880605a5926c72ba", "score": "0.49180558", "text": "function glossary_add_link_form ($args) {\n\t\tglobal $GLOSSARY;\n\n\t\t$URL = new URL('glossary_addlink');\n\t\t$URL->remove(array('g'));\n\t\t?>\n\t<h4>All checks fine and dandy!</h4><p>Just so you know, we found <strong><?php echo $args['count']; ?></strong> occurences of <?php echo $GLOSSARY->query; ?> in Hansard</p>\n\t<p>Please add your link below:</p>\n\t<h4>Add an external link for <em><?php echo $args['s']; ?></em></h4>\n\t<div class=\"glossaryaddbox\">\n\t\t<form action=\"<?php print $URL->generate(); ?>\" method=\"post\">\n\t\t<input type=\"hidden\" name=\"g\" value=\"<?php echo $args['s']; ?>\">\n\t\t<input type=\"hidden\" name=\"return_page\" value=\"glossary\">\n\t\t<label for=\"definition\"><input type=\"text\" name=\"definition\" id=\"definition\">\n\t\t<p><!-- input type=\"submit\" name=\"previewterm\" value=\"Preview\" class=\"submit\" /-->\n\t\t<input type=\"submit\" name=\"submitterm\" value=\"Post\" class=\"submit\"></p></label>\n\t\t<p><small>Only &lt;b&gt; and &lt;i&gt; tags are allowed. URLs and email addresses will automatically be turned into links.</small></p>\n\t</div>\n<?php\n\t}", "title": "" }, { "docid": "9c99ece895f357ad19f074dbdff501a1", "score": "0.4908675", "text": "public function indexAction() : object\n {\n $title = \"Visar allt innehåll i databasen\";\n $db = $this->app->db;\n\n // Deal with incoming variables\n $route = [\n \"orderBy\" => esc(getGet(\"orderby\", \"created\")),\n \"order\" => esc(getGet(\"order\", \"desc\")),\n \"hits\" => esc(getGet(\"hits\", 10)),\n \"page\" => esc(getGet(\"page\", 1))\n ];\n\n // Get max number of pages\n $max = getMax($db, \"content\");\n $max = ceil($max->max / $route[\"hits\"]);\n\n // Prepare and execute sql-statement\n $res = getAll($db, $route, $max, \"content\");\n\n $data = [\n \"res\" => $res,\n \"heading\" => $title,\n \"max\" => $max\n ];\n\n // Add and render page to display database\n $this->app->page->add(\"content/index\", $data);\n return $this->app->page->render([\"title\" => $title,]);\n }", "title": "" }, { "docid": "1da234fd153caed40ba793a5e5d72da5", "score": "0.49065447", "text": "public function Index($gsg) {\r\n\t\t/**\r\n\t\t * @var $wpdb wpdb\r\n\t\t */\r\n\t\tglobal $wpdb;\r\n\r\n\t\t$blogUpdate = strtotime(get_lastpostmodified('gmt'));\r\n\r\n\t\t$gsg->AddSitemap(\"misc\", null, $blogUpdate);\r\n\r\n\r\n\t\t$taxonomies = $this->GetEnabledTaxonomies($gsg);\r\n\t\tforeach($taxonomies AS $tax) {\r\n\t\t\t$gsg->AddSitemap(\"tax\", $tax, $blogUpdate);\r\n\t\t}\r\n\r\n\t\t$pages = $gsg->GetPages();\r\n\t\tif(count($pages) > 0) {\r\n\t\t\tforeach($pages AS $page) {\r\n\t\t\t\tif($page instanceof GoogleSitemapGeneratorPage && $page->GetUrl()) {\r\n\t\t\t\t\t$gsg->AddSitemap(\"externals\", null, $blogUpdate);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$enabledPostTypes = $gsg->GetActivePostTypes();\r\n\r\n\t\t$hasEnabledPostTypesPosts = false;\r\n\t\t$hasPosts = false;\r\n\r\n\t\tif(count($enabledPostTypes) > 0) {\r\n\r\n\t\t\t$excludedPostIDs = $gsg->GetExcludedPostIDs($gsg);\r\n\t\t\t$exPostSQL = \"\";\r\n\t\t\tif(count($excludedPostIDs) > 0) {\r\n\t\t\t\t$exPostSQL = \"AND p.ID NOT IN (\" . implode(\",\", $excludedPostIDs) . \")\";\r\n\t\t\t}\r\n\r\n\t\t\t$excludedCategoryIDs = $gsg->GetExcludedCategoryIDs($gsg);\r\n\t\t\t$exCatSQL = \"\";\r\n\t\t\tif(count($excludedCategoryIDs) > 0) {\r\n\t\t\t\t$exCatSQL = \"AND ( p.ID NOT IN ( SELECT object_id FROM {$wpdb->term_relationships} WHERE term_taxonomy_id IN (\" . implode(\",\", $excludedCategoryIDs) . \")))\";\r\n\t\t\t}\r\n\r\n\t\t\tforeach($enabledPostTypes AS $postType) {\r\n\t\t\t\t$q = \"\r\n\t\t\t\t\tSELECT\r\n\t\t\t\t\t\tYEAR(p.post_date_gmt) AS `year`,\r\n\t\t\t\t\t\tMONTH(p.post_date_gmt) AS `month`,\r\n\t\t\t\t\t\tCOUNT(p.ID) AS `numposts`,\r\n\t\t\t\t\t\tMAX(p.post_modified_gmt) as `last_mod`\r\n\t\t\t\t\tFROM\r\n\t\t\t\t\t\t{$wpdb->posts} p\r\n\t\t\t\t\tWHERE\r\n\t\t\t\t\t\tp.post_password = ''\r\n\t\t\t\t\t\tAND p.post_type = '\" . esc_sql($postType) . \"'\r\n\t\t\t\t\t\tAND p.post_status = 'publish'\r\n\t\t\t\t\t\t$exPostSQL\r\n\t\t\t\t\t\t$exCatSQL\r\n\t\t\t\t\tGROUP BY\r\n\t\t\t\t\t\tYEAR(p.post_date_gmt),\r\n\t\t\t\t\t\tMONTH(p.post_date_gmt)\r\n\t\t\t\t\tORDER BY\r\n\t\t\t\t\t\tp.post_date_gmt DESC\";\r\n\r\n\t\t\t\t$posts = $wpdb->get_results($q);\r\n\r\n\t\t\t\tif($posts) {\r\n\t\t\t\t\tif($postType==\"post\") $hasPosts = true;\r\n\r\n\t\t\t\t\t$hasEnabledPostTypesPosts = true;\r\n\r\n\t\t\t\t\tforeach($posts as $post) {\r\n\t\t\t\t\t\t$gsg->AddSitemap(\"pt\", $postType . \"-\" . sprintf(\"%04d-%02d\", $post->year, $post->month), $gsg->GetTimestampFromMySql($post->last_mod));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//Only include authors if there is a public post with a enabled post type\r\n\t\tif($gsg->GetOption(\"in_auth\") && $hasEnabledPostTypesPosts) $gsg->AddSitemap(\"authors\", null, $blogUpdate);\r\n\r\n\t\t//Only include archived if there are posts with postType post\r\n\t\tif($gsg->GetOption(\"in_arch\") && $hasPosts) $gsg->AddSitemap(\"archives\", null, $blogUpdate);\r\n\t}", "title": "" }, { "docid": "ed8bb6af87da6122031637865075297c", "score": "0.48741597", "text": "private function show_object_list()\n {\n global $g_comp_database, $g_comp_template_language_manager, $g_comp_session;\n $l_global = isys_cmdb_dao_category_g_global::instance($g_comp_database);\n\n $l_objects = $l_global->get_data(\n null,\n null,\n \"AND ((isys_obj__status = '\" . C__RECORD_STATUS__NORMAL . \"') OR (isys_obj__status = '\" . C__RECORD_STATUS__TEMPLATE . \"')) \" . \"AND (isys_obj__isys_obj_type__id NOT IN ('\" . C__OBJTYPE__RELATION . \"', '\" . C__OBJTYPE__PARALLEL_RELATION . \"'))\",\n $_GET['search']\n );\n\n if ($l_objects->num_rows() > 0)\n {\n\n $l_html = \"<table class=\\\"listing\\\">\" . \"<colgroup><col width=\\\"10\\\" /><col width=\\\"10\\\" /></colgroup>\" . \"<thead>\" . \"<tr>\" . \"<th><label><input type=\\\"checkbox\\\" onclick=\\\"CheckAllBoxes(this);\\\" /></label></th>\" . \"<th></th>\" . \"<th>\" . $g_comp_template_language_manager->{'LC__CATG__ODEP_OBJ'} . \"-ID</th>\" . \"<th>\" . $g_comp_template_language_manager->{'LC__CATG__ODEP_OBJ'} . \"</th>\" . \"<th>\" . $g_comp_template_language_manager->{'LC__CMDB__OBJTYPE'} . \"</th>\" . \"<th>Status</th>\" . \"</tr>\" . \"</thead>\" . \"<tbody>\";\n\n while ($l_row = $l_objects->get_row())\n {\n\n $l_html .= \"<tr>\" . \"<td>\" . \"<input type=\\\"checkbox\\\" class=\\\"checkbox\\\" name=\\\"object[]\\\" value=\\\"\" . $l_row['isys_obj__id'] . \"\\\" title=\\\"\" . $l_row['isys_obj__title'] . \"\\\" />\" . \"</td>\" . \"<td>\" . \"<a href=\\\"javascript:\\\" class=\\\"bold\\\" onclick=\\\"add_object_to_export('\" . $l_row['isys_obj__id'] . \"', '\" . addslashes(\n $l_row['isys_obj__title']\n ) . \"')\\\">\" . \"+\" . \"</a>\" . \"</td>\" . \"<td>\" . $l_row[\"isys_obj__id\"] . \"</td>\" . \"<td>\" . htmlentities(\n $l_row[\"isys_obj__title\"]\n ) . \"</td>\" . \"<td>\" . $g_comp_template_language_manager->{$l_global->get_objtype_name_by_id_as_string(\n $l_global->get_objTypeID($l_row['isys_obj__id'])\n )} . \"</td>\" . \"<td>\" . $l_global->get_object_status_by_id_as_string($l_row[\"isys_obj__id\"]) . \"</td>\" . \"</tr>\";\n }\n $l_html .= \"</body></table>\";\n $l_html .= '<br /><input type=\"button\" onclick=\"add_selected_objects_to_export();\" value=\"' . $g_comp_template_language_manager->get(\n 'LC__CMDB__EXPORT__ADD'\n ) . '\" />';\n\n echo $l_html;\n }\n else\n {\n printf($g_comp_template_language_manager->{'LC__CMDB__EXPORT__NO_OBJECTS_FOUND'}, $_GET['search']);\n }\n }", "title": "" }, { "docid": "1f4cfce445d5785fc39db8a1550d4168", "score": "0.48731172", "text": "public function show_ebook_urls() {\n\t\tglobal $product;\n\t\t$variations = $product->get_children();\n\t\t$ebooklinks = '';\n\t\tforeach ( $variations as $variationId ) {\n\t\t\t$attributes = wc_get_product_variation_attributes( $variationId );\n\t\t\t$format = $attributes['attribute_pa_format'];\n\t\t\tif ( $format == 'ebook' ) {\n\t\t\t\t$meta = get_post_meta( $variationId );\n\t\t\t\tforeach ( self::$EBOOKSTORES as $key => $value ) {\n\t\t\t\t\tif ( $meta[ '_' . $key ][0] <> '' ) {\n\t\t\t\t\t\t$ebooklinks .= sprintf( '<li><a href=\"%s\" target=\"_blank\">%s</a></li>', $meta[ '_' . $key ][0], $value );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( $ebooklinks <> '' ) {\n\t\t\t\t\t$ebooklinks = \"<ul style=\\\"display: none\\\" id=\\\"ebooklinks\\\">\" . $ebooklinks . \"</ul>\";\n\t\t\t\t\techo( $ebooklinks );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "326a0842c18c2c680d00d1f06d19af96", "score": "0.48599607", "text": "public function showAllHotdrinks() {\n echo json_encode([\"MSG\" => $this->rest->showAllHotdrinks(), \"CODE\" => 200]);\n }", "title": "" }, { "docid": "e906f7ea9ad405c2e983f61a6904b576", "score": "0.48274356", "text": "function show_child_objects()\n\t{\n\t\tglobal $openldap_overlay_module,$openldap_backend_module;\n\n\t\t$search_resource = @ldap_list($this->ldap_server->connection,\n\t\t\t$this->ldap_entry[\"dn\"],\"(objectclass=*)\");\n\n\t\tif($search_resource && !$this->create)\n\t\t{\n\t\t\t$child_entries = ldap_get_entries($this->ldap_server->connection,$search_resource);\n\t\t\tif($child_entries[\"count\"]>0)\n\t\t\t\tforeach($child_entries as $child_entry)\n\t\t\t\t{\n\t\t\t\t\tif(is_array($child_entry))\n\t\t\t\t\t{\n\t\t\t\t\t\t$icon = $this->ldap_server->get_icon_for_ldap_entry($child_entry);\n\t\t\t\t\t\t$item_object_class = $this->ldap_server->get_object_class($child_entry);\n\t\t\t\t\t\t$rdn_list = ldap_explode_dn2($child_entry[\"dn\"]);\n\t\t\t\t\t\t$value_display_name = $rdn_list[\"0\"][\"value\"];\n\t\t\t\t\t\t$alt_text = $item_object_class;\n\n\t\t\t\t\t\t$is_folder = $this->ldap_server->get_object_schema_setting(\n\t\t\t\t\t\t\t$item_object_class,\"is_folder\");\n\n\t\t\t\t\t\techo \"<img alt=\\\"\" . $alt_text . \"\\\" title=\\\"\" . $alt_text\n\t\t\t\t\t\t\t. \"\\\" src=\\\"\" . $icon . \"\\\"> \";\n\n\t\t\t\t\t\tif($this->show_embedded_links &&\n\t\t\t\t\t\t\t($this->ldap_server->compare_dn_to_base($child_entry[\"dn\"],\n\t\t\t\t\t\t\t$this->ldap_server->base_dn)\n\t\t\t\t\t\t\t|| $this->ldap_server->get_user_setting(\"allow_system_admin\")))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($is_folder)\n\t\t\t\t\t\t\t\techo \"<a href=\\\"\" . current_page_folder_url() . \"?dn=\";\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\techo \"<a href=\\\"info.php?dn=\";\n\t\t\t\t\t\t\techo urlencode($child_entry[\"dn\"])\n\t\t\t\t\t\t\t\t. ($this->ldap_server->server_id == 0 ? \"\"\n\t\t\t\t\t\t\t\t: (\"&server_id=\" . $this->ldap_server->server_id))\n\t\t\t\t\t\t\t\t. \"\\\">\"\n\t\t\t\t\t\t\t\t. htmlentities($value_display_name,ENT_COMPAT,\"UTF-8\")\n\t\t\t\t\t\t\t\t. \"</a>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\techo htmlentities($value_display_name,ENT_COMPAT,\"UTF-8\");\n\n\t\t\t\t\t\t// Append OpenLDAP database naming context if set\n\t\t\t\t\t\tif(!empty($child_entry[\"olcsuffix\"][0]))\n\t\t\t\t\t\t\techo \" \" . sprintf(gettext(\"for '%s'\"),\n\t\t\t\t\t\t\t\t\"<a href=\\\"\" . current_page_folder_url() . \"?dn=\"\n\t\t\t\t\t\t\t\t. urlencode($child_entry[\"olcsuffix\"][0]) . \"\\\">\"\n\t\t\t\t\t\t\t\t. htmlentities($child_entry[\"olcsuffix\"][0],\n\t\t\t\t\t\t\t\tENT_COMPAT,\"UTF-8\") . \"</a>\");\n\n\t\t\t\t\t\t// Append OpenLDAP database directory location if set\n\t\t\t\t\t\tif(!empty($child_entry[\"olcdbdirectory\"][0]))\n\t\t\t\t\t\t\techo \" \" . sprintf(gettext(\"at '%s'\"),\n\t\t\t\t\t\t\t\thtmlentities($child_entry[\"olcdbdirectory\"][0],\n\t\t\t\t\t\t\t\tENT_COMPAT,\"UTF-8\"));\n\n\t\t\t // Append OpenLDAP database URI if set\n\t\t\t\t\t\tif(!empty($child_entry[\"olcdburi\"][0]))\n\t\t\t echo \" \" . sprintf(gettext(\"from '%s'\"),\n\t\t\t\t\t\t\t\thtmlentities($child_entry[\"olcdburi\"][0],\n\t\t\t\t\t\t\t\tENT_COMPAT,\"UTF-8\"));\n\n\t\t\t // Append OpenLDAP module path if set\n\t\t\t\t\t\tif(!empty($child_entry[\"olcmodulepath\"][0]))\n\t\t\t echo \" \" . sprintf(gettext(\"loading from '%s'\"),\n\t\t\t\t\t\t\t\thtmlentities($child_entry[\"olcmodulepath\"][0],\n\t\t\t\t\t\t\t\tENT_COMPAT,\"UTF-8\"));\n\n\t\t\t\t\t\t// Append OpenLDAP module names to be loaded if set\n\t\t\t\t\t\tif(!empty($child_entry[\"olcmoduleload\"][0]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo \"<table style=\\\"margin-top:4pt;margin-left:40pt\\\">\";\n\t\t\t\t\t\t\t$first_value = true;\n\t\t\t\t\t\t\tfor($i=0;$i<$child_entry[\"olcmoduleload\"][\"count\"];$i++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\techo \"<tr>\";\n\t\t\t\t\t\t\t\t$module_name = explode(\"}\",\n\t\t\t\t\t\t\t\t\t$child_entry[\"olcmoduleload\"][$i]);\n\t\t\t\t\t\t\t\t$module_name = $module_name[1];\n\n\t\t\t\t\t\t\t\techo \"<td style=\\\"width:0px;white-space:nowrap\\\">\"\n\t\t\t\t\t\t\t\t\t. \"&bull; \" . htmlentities($module_name,\n\t\t\t\t\t\t\t\t\tENT_COMPAT,\"UTF-8\") . \"</td>\";\n\n\t\t\t\t\t\t\t\tif(isset($openldap_overlay_module[$module_name]))\n\t\t\t\t\t\t\t\t\techo \"<td>&nbsp;- \" . htmlentities(\n\t\t\t\t\t\t\t\t\t\t$openldap_overlay_module[$module_name],\n\t\t\t\t\t\t\t\t\t\tENT_COMPAT,\"UTF-8\") . \"</td>\";\n\t\t\t\t\t\t\t\telse if(isset($openldap_backend_module[$module_name]))\n\t\t\t\t\t\t\t\t\techo \"<td>&nbsp;- \" . htmlentities(\n\t\t\t\t\t\t\t\t\t\t$openldap_backend_module[$module_name],\n\t\t\t\t\t\t\t\t\t\tENT_COMPAT,\"UTF-8\") . \"</td>\";\n\n\t\t\t\t\t\t\t\techo \"</tr>\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\techo \"</table>\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\techo \"<br>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\telse\n\t\t\t\techo \"(\" . gettext(\"none\") . \")\";\n\t\t}\n\t\telse\n\t\t\techo \"(\" . gettext(\"none\") . \")\";\n\n\t\tif(!$this->edit && $this->ldap_server->get_user_setting(\"allow_create\") && !$this->create)\n\t\t\techo \"<br><a href=\\\"create.php?dn=\"\n\t\t\t\t. urlencode($this->ldap_entry[\"dn\"])\n\t\t\t\t. ($this->ldap_server->server_id == 0 ? \"\" : (\"&server_id=\" . $this->ldap_server->server_id))\n\t\t\t\t. \"\\\"><button>\" . gettext(\"Add\") . \"</button></a>\\n\";\n\t}", "title": "" }, { "docid": "f6c3d258ba0fb4249fcd3e1a482d67cf", "score": "0.48033172", "text": "public function show(Og $og)\n {\n\t\t//\n\t}", "title": "" }, { "docid": "1111f5250ed9f6ecbce0dc977bcef4b9", "score": "0.480329", "text": "public function indexAction() {\n\t\t$viewer_id = Engine_Api::_()->user()->getViewer()->getIdentity();\n\t\tif(empty($viewer_id)) {\n\t\t\treturn $this->setNoRender();\n }\n\n\t\t//DONT RENDER IF SUBJECT IS NOT SET\n if (!Engine_Api::_()->core()->hasSubject()) {\n return $this->setNoRender();\n }\n\n\t\t//GET LIST SUBJECT\n\t\t$subject = Engine_Api::_()->core()->getSubject();\n\t\t$this->view->resource_type = $resource_type = $subject->getType(); \n\t\t$this->view->resource_id = $resource_id = $subject->getIdentity();\n\t\t$seaocoreLike = Engine_Api::_()->getApi('like', 'seaocore');\n $this->view->paginator = $paginator = $seaocoreLike->peopleLike($resource_type, $resource_id);\n\n // Set item count per page and current page number\n $this->view->paginator = $paginator->setItemCountPerPage(10)->setCurrentPageNumber($this->_getParam('page', 1));\n $this->_childCount = $paginator->getTotalItemCount();\n\n if($paginator->getTotalItemCount() <= 0 ) \n return $this->setNoRender();\n\n\t}", "title": "" }, { "docid": "123123d01f16dc8e30cc6910cd15c63c", "score": "0.48012367", "text": "function bp_docs_item_docs_link() {\n\techo bp_docs_get_item_docs_link();\n}", "title": "" }, { "docid": "11e14b601a0eba5bd7e12934451b7880", "score": "0.47944933", "text": "public function index_adminAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $galeries = $em->getRepository('HopitalBundle:Galerie')->findAll();\n $categories = $em->getRepository('HopitalBundle:GalerieCategorie')->findAll();\n\n\n\n\n return $this->render('HopitalBundle:documentation:galerie_index_admin.html.twig', array(\n 'galeries' => $galeries,\n 'categories' => $categories,\n ));\n }", "title": "" }, { "docid": "ec515954937578ee56acc5c2de03808f", "score": "0.4790433", "text": "public function actionIndex()\n {\n \t$query = Dict::find()->where(['parent_id'=>0]);\n \t\n \t$locals = LuLu::getPagedRows($query);\n \t \n \treturn $this->render('index', $locals);\n }", "title": "" }, { "docid": "b6f2cd3da6a3d159cb3bdbd9f18b6bb1", "score": "0.47773793", "text": "public function indexAction()\n {\n $query = !empty(trim($_GET['s'])) ? trim($_GET['s']) : null;\n if($query)\n {\n $products = \\R::find('product', \"title LIKE ? AND status = '1'\", [\"%{$query}%\"]);\n }\n $this->setMeta('Поиск по: ' . h($query));\n $this->set(compact('products', 'query'));\n }", "title": "" }, { "docid": "dc4d4e3179621be981e0088c738d9680", "score": "0.47632942", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n // On récupére tous les liens\n $entities = $em->getRepository('IsmSiteBundle:Links')->findAll();\n\n return $this->render('IsmSiteBundle:Links:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "title": "" }, { "docid": "da76657ebe26f093a3486a74aaee1c97", "score": "0.4759074", "text": "public function single($uri)\n {\n $r = urlencode('http://www.edamam.com/ontologies/edamam.owl#'.trim($uri));\n $appid = '6433c1f8';\n $appkey = 'acf4191deb52673bc8bcbf205e8c2ccc';\n $client = new Client([\n 'base_uri' => 'https://api.edamam.com',\n ]);\n $search = 'search?r='.$r.'&app_id='.$appid.'&app_key='.$appkey;\n $req = $client->request('GET', $search);\n $datas = json_decode($req->getBody(), true);\n\n foreach($datas as $data){\n $results = [\n 'uri'=>$data['uri'],\n 'url'=>$data['url'],\n 'shareAs'=>$data['shareAs'],\n 'sourceUrl'=>$data['url'],\n 'label'=>$data['label'],\n 'image'=>$data['image'],\n 'source'=>$data['source'],\n 'calories'=>$data['calories'],\n 'ingredients'=>$data['ingredients'],\n 'totalNutrients'=>$data['totalNutrients']\n ];\n $label = $data['label'];\n }\n\n// foreach($results['totalNutrients'] as $res => $val){\n// echo $val['label'];\n// echo '<pre>';\n// print_r($val);\n// echo '<pre>';\n// }\n// die();\n return view('search.single')->withLabel($label)->withResult($results);\n }", "title": "" }, { "docid": "5c3c0e448a2b14488715f018a742fd85", "score": "0.47341153", "text": "function osc_search_show_all_url($params = array()) {\n $params['page'] = 'search';\n return osc_update_search_url($params);\n }", "title": "" }, { "docid": "5c9471ede19c5b2253a0684aef0846c9", "score": "0.47290647", "text": "function glossary_add_definition_form ($args) {\n\t\tglobal $GLOSSARY;\n\n\t\t$URL = new URL($args['action']);\n\t\t$URL->remove(array('g'));\n\n\t\t?>\n\t<div class=\"glossaryaddbox\">\n\t\t<form action=\"<?php print $URL->generate(); ?>\" method=\"post\">\n\t\t<input type=\"hidden\" name=\"g\" value=\"<?php echo $args['s']; ?>\">\n\t\t<input type=\"hidden\" name=\"return_page\" value=\"glossary\">\n\t\t<label for=\"definition\"><p><textarea name=\"definition\" id=\"definition\" rows=\"15\" cols=\"55\"><?php echo htmlentities($GLOSSARY->current_term['body']); ?></textarea></p>\n\n\t\t<p><input type=\"submit\" name=\"previewterm\" value=\"Preview\" class=\"submit\">\n\t\t<input type=\"submit\" name=\"submitterm\" value=\"Post\" class=\"submit\"></p></label>\n\t\t<p><small>Only &lt;b&gt; and &lt;i&gt; tags are allowed. URLs and email addresses will automatically be turned into links.</small></p>\n\t</div>\n<?php\n\t}", "title": "" }, { "docid": "aaf2ed70a44d3d843f23b0cc8348ac6b", "score": "0.47285008", "text": "public function indexAction()\n { \n if(!$this->_rParams->id) {\n // we want all items\n }\n }", "title": "" }, { "docid": "0ac2a5824c15e77d008e755753578b64", "score": "0.47117418", "text": "function alt_term_links_search( $args ) {\n \n foreach( alt_term_links_config() as $conf ) {\n $var = adverts_request( $conf[\"param\"] );\n if( ! empty( $var ) ) {\n $args[\"tax_query\"] = _alt_term_links_search_apply( $conf, $var, $args[\"tax_query\"] ); \n }\n }\n \n return $args;\n}", "title": "" }, { "docid": "cc4cdaeb75002936d33f4eb3ab687423", "score": "0.4704254", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $docents = $em->getRepository('AppBundle:Docent')->findAll();\n\n return $this->render('docent/index.html.twig', array(\n 'docents' => $docents,\n ));\n }", "title": "" }, { "docid": "9e4c6c57a5bdb9276b1fdae97820df83", "score": "0.47008517", "text": "function display_taxon_name($r)\n{\n\tglobal $couch;\n\tglobal $config;\n\t\n\techo html_html_open();\n\techo html_head_open();\n\techo html_title($r->nameComplete . ' - ' . $config['site_name']);\n\techo html_include_css('css/main.css');\n\techo html_head_close();\n\techo html_body_open();\n\t\n\techo '<div style=\"padding:10px;\">';\n\t\t\n\t//----------------------------------------------------------------------------------------------\n\t// Home\n\techo '<span><a href=\"' . $config['web_root']\t . '\">' . $config['site_name'] . '</a></span>';\t\n\techo html_search_box();\n\t\n\t//----------------------------------------------------------------------------------------------\n\t// Object\t\n\techo '<div>';\n\techo '<h1>Name:' . $r->nameCompleteHtml . '</h1>';\n\techo '</div>';\n\t\n\t\n\t//----------------------------------------------------------------------------------------------\n\t// Concept(s)\n\t$resp = $couch->send(\"GET\", \"/\" . $config['couchdb'] . \"/_design/taxon/_view/taxaWithName?key=\" . urlencode('\"' . $r->_id . '\"') . '&include_docs=true' );\n\t$taxa = json_decode($resp);\n\tif (count($taxa->rows) > 0)\n\t{\n\t\techo '<h2>Taxa with this name</h2>';\n\t\techo '<ul>';\n\t\tforeach ($taxa->rows as $row)\n\t\t{\n\t\t\t// Get name of taxon concept\n\t\t\t$resp2 = $couch->send(\"GET\", \"/\" . $config['couchdb'] . \"/\" . $row->value);\n\t\t\t$concept = json_decode($resp2);\n\t\t\t\n\t\t\techo '<li>' . '<a href=\"id/' . $row->value . '\">' . $concept->nameStringHtml . '</a></li>';\n\t\t}\n\t\techo '</ul>';\n\t}\n\t\n\t//----------------------------------------------------------------------------------------------\n\t// Publication\n\n\tif (isset($r->publishedInCitation))\n\t{\n\t\techo '<h2>Publication</h2>';\n\t\t\n\t\t$resp = $couch->send(\"GET\", \"/\" . $config['couchdb'] . \"/\" . $r->publishedInCitation );\n\t\t$publication = json_decode($resp);\n\t\tif (isset($publication->error))\n\t\t{\n\t\t\t// We don't have this reference\n\t\t\tif (isset($row->value->publishedIn))\n\t\t\t{\n\t\t\t\techo '<div style=\"position:relative;padding:4px;min-height:100px;\">';\t\t\t\t\n\t\t\t\techo '<div style=\"position:absolute;left:0px;top:0px;width:70px;height:100px;border:1px solid #ddd;text-align:center;font-size:72px;color:rgb(192,192,192);background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#eee));background: -moz-linear-gradient(-45deg, #fff, #eee);filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=\\'#ffffff\\', EndColorStr=\\'#eeeeee\\');\">?</div>';\t\t\t\t\n\t\t\t\techo '<div style=\"padding-left:80px;padding-top:10px;padding-right:10px;padding-bottom:10px;\">';\n\t\t\t\techo '<div>' . $r->publishedIn . '</div>';\t\t\t\t\n\t\t\t\techo '<div>' . $r->publishedInCitation . '</div>';\t\t\t\t\n\t\t\t\techo '</div>';\n\t\t\t\techo '</div>';\t\t\t\t\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo display_one_publication($publication);\n\t\t}\n\t}\n\t\n\techo '</div>';\n\t\n\techo html_body_close();\n\techo html_html_close();\t\n}", "title": "" }, { "docid": "a623987d099170ab43ec4c88817d3e73", "score": "0.46993244", "text": "public function getAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Resource_Service_Keyword::getResourceKeyword(intval($id));\n\t\tif(!$info) $this->output(-1, '操作失败.');\n\t\t$this->output(0, '', $info);\n\t}", "title": "" }, { "docid": "5e552501f00649eb60a1d386ce00e9c0", "score": "0.46947557", "text": "function query_publications_from_taxon ($uri)\n{\n\tglobal $store_config;\n\tglobal $store;\n\n\t$xml = '';\n\t$sparql = '\nPREFIX dcterms: <http://purl.org/dc/terms/>\nPREFIX bibo: <http://purl.org/ontology/bibo/>\n\n\nCONSTRUCT \n{\n ?pub bibo:doi ?o .\n?pub dcterms:title ?doi .\n?pub rdf:type ?t .\n}\nWHERE\n{\n ?gb dcterms:subject <' . $uri . '> .\n ?gb dcterms:title ?accession .\n?gb dcterms:isReferencedBy ?pub .\n?pub rdf:type ?t .\n?pub bibo:doi ?o .\n?pub dcterms:title ?doi .\n}';\n\n\n\t$r = $store->query($sparql);\n\t$index = $r['result'];\n\t$parser = ARC2::getRDFParser();\n\t$xml = $parser->toRDFXML($index);\n\t\n\treturn $xml;\n}", "title": "" }, { "docid": "97de6554a3d811bbb05607e21d5466d3", "score": "0.4690345", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM wiki_articleforobject';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "908b71b7074211d34c70da3c1b87c9d4", "score": "0.4687837", "text": "function getOpensearchTemplate();", "title": "" }, { "docid": "f7695f815edc27ab0e5c9ed17bd245e1", "score": "0.46843678", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $entities = $em->getRepository('QihooToolBundle:AutoDownUrl')->getAllList();\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "2c13f7870d1cb2ae10482edad2948801", "score": "0.4682883", "text": "public function actionIndex()\n {\n $searchModel = new GolferSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "96f9de0f2cec5fb202b9c2bdb7330860", "score": "0.46796665", "text": "function _greeting_resource_list() {\n $node_select = db_select('node');\n $results = db_select('node', 'n')\n ->fields('n', array())\n ->condition('n.type', 'greeting')\n ->execute();\n return services_resource_build_index_list($results, 'node', 'nid');\n}", "title": "" }, { "docid": "7932bdbbc8478e162a4931707e4538f2", "score": "0.4676152", "text": "public function deleteGlossaries($id = null)\n {\n $ids = is_null($id) ? Input::get('id') : [$id];\n $glossaries = Glossary::whereIn('id', $ids)->get();\n\n foreach ($glossaries as $glossary) {\n $glossary->delete();\n }\n\n Alert::success('Deleted successfully!');\n return Redirect::admin('glossaries')->withAlerts();\n }", "title": "" }, { "docid": "782bd501bdb4ae5eb4654d8edd5fa0a7", "score": "0.46758977", "text": "public static function glossaryShortcode( $atts = array() ) {\n\t\tglobal $post;\n\n\t\tif ( !is_array( $atts ) ) {\n\t\t\t$atts = array();\n\t\t}\n\n\t\tif ( $post !== null ) {\n\t\t\t$glossaryPageLink = get_page_link( $post );\n\t\t} elseif ( !empty( $atts[ 'post_id' ] ) ) {\n\t\t\t$glossaryPageLink = get_permalink( $atts[ 'post_id' ] );\n\t\t} else {\n\t\t\t$glossaryPageLink = get_permalink( self::getGlossaryIndexPageId() );\n\t\t}\n\n\t\t$default_atts\t = apply_filters( 'cmtt_glossary_index_shortcode_default_atts', array(\n\t\t\t'glossary_page_link'\t => $glossaryPageLink,\n\t\t\t'only_on_search'\t\t => get_option( 'cmtt_showOnlyOnSearch' ),\n\t\t\t'glossary_index_style'\t => apply_filters( 'cmtt_glossary_index_style', get_option( 'cmtt_glossaryListTiles' ) == '1' ? 'small-tiles' : 'classic' ),\n\t\t\t'itemspage'\t\t\t\t => filter_input( INPUT_GET, 'itemspage' )\n\t\t)\n\t\t);\n\t\t$shortcode_atts\t = apply_filters( 'cmtt_glossary_index_atts', array_merge( $default_atts, $atts ) );\n\n\t\tdo_action( 'cmtt_glossary_shortcode_before', $shortcode_atts );\n\n\t\t$output = self::outputGlossaryIndexPage( $shortcode_atts );\n\n\t\tdo_action( 'cmtt_glossary_shortcode_after', $shortcode_atts, $atts );\n\n\t\tself::$shortcodeDisplayed = true;\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "66e5445bccafa4dc9a3b80793660e2da", "score": "0.467317", "text": "function get_link($bookmark_id, $output = \\OBJECT, $filter = 'raw')\n {\n }", "title": "" }, { "docid": "5572f5ffef5ec974179c7f78a8399ee7", "score": "0.4670726", "text": "public function getEntry($permalink);", "title": "" }, { "docid": "621e0b0fdfc736286c156e5331b62cff", "score": "0.46666187", "text": "public function appriciationTypeAction()\n {\n /*--search---*/\n $search = trim($this->_getParam('search'));\n $where=\"1=1\";\n $this->view->linkArray=array();\n $this->view->search=\"Search...\";\n if($search<>\"\" && $search!=\"Search...\")\n {\n $where=\"title like '%{$search}%'\";\n $this->view->linkArray=array('search'=>$search);\n $this->view->search=$search;\n }\n \n $this->view->page_size=$page_size= $this->_getParam('page_size',25);\n $page =\t$this->_getParam('page',1);\n\n $model=new Application_Model_AppriciationType();\n $table=$model->getMapper()->getDbTable();\n $select = $table->select()->order('addedon DESC')->where($where);\n $paginator = Base_Paginator::factory($select);\n $paginator->setItemCountPerPage($page_size);\n $paginator->setCurrentPageNumber($page);\n $this->view->totalItems= $paginator->getTotalItemCount();\n $this->view->paginator=$paginator;\n }", "title": "" }, { "docid": "b798e05382088d2e2aba5ed5a1f72e7f", "score": "0.46611422", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('GurmeMainBundle:Recipe')->findBy(array(), array('id'=>'desc'));\n\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "816ce8c54a9ee6a95848393dca387ccf", "score": "0.46592143", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $links = $em->getRepository('AppBundle:Link')->findAll();\n $sheetdev = $em->getRepository('AppBundle:SheetDev')->findBy(array('id' => $links));\n $sheet = $em->getRepository('AppBundle:Sheet')->findBy(array('id' => $links));\n $delivery = $em->getRepository('AppBundle:Delivery')->findBy(array('id' => $links));\n $sheetdevdel = $em->getRepository('AppBundle:SheetDev')->findBy(array('id' => $delivery));\n $society = $em->getRepository('AppBundle:society')->findBy(array('id' => $sheetdevdel));\n\n return $this->render('link/index.html.twig', array(\n 'links' => $links,\n 'sheetdev' => $sheetdev,\n 'sheet' => $sheet,\n 'delivery' => $delivery,\n 'sheetdevdel' => $sheetdevdel,\n 'society' => $society\n ));\n }", "title": "" }, { "docid": "38f54ee6b196052663ed36ad1752555d", "score": "0.46552235", "text": "public function get_sitemap_entries()\n {\n }", "title": "" }, { "docid": "d1d68d87fb1a48157802b014f2c0809b", "score": "0.4652934", "text": "public function display_existing( stdClass $rel ) {\n $this->display_blank(\n $rel->from_object, $rel->from_object_label,\n $rel->to_object, $rel->to_object_label,\n json_decode( $rel->relationships ),\n json_decode( $rel->required_sf_objects ),\n json_decode( $rel->unique_sf_fields )\n );\n }", "title": "" }, { "docid": "12b5ce1415ebafe58e92bc0fbae42757", "score": "0.46527243", "text": "public function using_index_permalinks()\n {\n }", "title": "" }, { "docid": "0c735e1d4f80fc1ff5c7f8e951cdaa16", "score": "0.46497354", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $labAlmEgresos = $em->getRepository('AlmControlStockBundle:LabAlmEgreso')->findAll();\n\n return $this->render('labalmegreso/index.html.twig', array(\n 'labAlmEgresos' => $labAlmEgresos,\n ));\n }", "title": "" }, { "docid": "b263fa2968f11bd2fbb68947e8e7809c", "score": "0.46440268", "text": "public function productByUrlAction()\n {\n $search = \"http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]\";\n $words = explode('/', $search);\n $lastWord = array_pop($words);\n $vars['products'] = $this->model->getProductsBySearch($lastWord);\n $this->view->render('Riding Gear', $vars);\n }", "title": "" }, { "docid": "2f19a0b599f85e04c4158fc930cab95c", "score": "0.46413606", "text": "public function actionIndex()\n {\n $searchModel = new GalerySearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "a3279bbb3a474c5ba0c1f6cc11d0c1de", "score": "0.46382797", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $gagnants = $em->getRepository('AppBundle:Gagnant')->findAll();\n\n return $this->render('gagnant/index.html.twig', array(\n 'gagnants' => $gagnants,\n ));\n }", "title": "" }, { "docid": "0dd01c9f57c04e626cd65be0e95bb877", "score": "0.46377215", "text": "public function listHitView() {\r\n $command = Yii::app()->db->createCommand('SELECT post_title, post_link, cat_name FROM ' . $this->tableName() . ', hoiit_cats WHERE ' . $this->tableName() . '.hoiit_cats_cat_id = hoiit_cats.cat_id AND post_enable=1 ORDER BY post_hit DESC LIMIT 0, 7');\r\n return $command->queryAll();\r\n }", "title": "" }, { "docid": "4ce4bd9e5cfd5cf0d69e5c8307bdd4e3", "score": "0.4628066", "text": "public function overviewAction()\n\t{\n\t\t\n\t\t//$addresses = Coda_Model_AddressTable::getActiveAddressesByClubId($this->_request->getParam('id'));\n\t\t\n\t}", "title": "" }, { "docid": "3b532e52b2dbd6d62dd3de6f08ae3900", "score": "0.46280584", "text": "function index()\n {\n $data['ingreso_egresox'] = $this->Ingreso_egresox_model->get_all_ingreso_egresox();\n \n $data['_view'] = 'ingreso_egresox/index';\n $this->load->view('layouts/main',$data);\n }", "title": "" }, { "docid": "8b7ca1ddba57916eb28afc95cb1c7073", "score": "0.46229002", "text": "function index() {\n redirect(site_url(\"kw/all\"));\n }", "title": "" }, { "docid": "ecfa9a124e15e71f50fb56a4129cc0c7", "score": "0.46092856", "text": "function equivalent_links($id)\r\n {\r\n $tempArray = thesaurus::get_equiv($id);\r\n echo \"<form method='get' action='index.php' name='eq'>\";\r\n echo \"<fieldset>\";\r\n echo \"<legend>Synonyme</legend>\";\r\n\r\n $x = 0;\r\n $listArray = array();\r\n if ($tempArray)\r\n {\r\n foreach($tempArray as $entry)\r\n {\r\n $synonym = thesaurus::get_descriptor($entry);\r\n\r\n if ($entry > 0) $synonym[name] = \"BS \" . $synonym[name];\r\n else $synonym[name] = \"BF \" . $synonym[name];\r\n\r\n $listArray[$x++] = $synonym;\r\n }\r\n }\r\n echo_selection($listArray,\"id\",\"\",3,\"equal-field\");\r\n\r\n // display action line\r\n action::display($id,2);\r\n\r\n echo \"</fieldset>\";\r\n echo \"</form>\"; \r\n }", "title": "" }, { "docid": "34fac039753d7c23508ee00593584afc", "score": "0.46072426", "text": "public function indexAction()\n\t{\n\t\t$this->render( View::make( 'schools/index' , array(\n\t\t\t'title' => 'Mes &Eacute;coles',\n\t\t\t'entities' => School::all()\n\t\t) ) );\n\t}", "title": "" }, { "docid": "4e5f663fb3f8a0e68a3db3873b704331", "score": "0.46056446", "text": "public function actionIndex()\n {\n return $this->render('grid', ['model' => new ListOrgKind()]);\n }", "title": "" }, { "docid": "44b36db19942c1906488fe4ed9b022e7", "score": "0.46038663", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $agences = $em->getRepository('AppBundle:Agence')->findAll();\n\n return $this->render('agence/index.html.twig', array(\n 'agences' => $agences,\n ));\n }", "title": "" }, { "docid": "4ea13b91645fa7fb4c421cf3ec184c5a", "score": "0.46027008", "text": "public function actionLinkIndex()\n\t{\n\t\t$variables['groups'] = linxy()->getAllGroups();\n\n\t\t$this->renderTemplate('linxy/_index', $variables);\n\t}", "title": "" }, { "docid": "59f39fe8420ed78d65625697cb87772f", "score": "0.4595852", "text": "function assoc_links($id)\r\n {\r\n $tempArray = thesaurus::get_assoc($id);\r\n echo \"<form method='get' action='index.php' name='vb'>\";\r\n echo \"<fieldset>\";\r\n echo \"<legend>Verwandte Begriffe</legend>\";\r\n\r\n $x = 0;\r\n $listArray = array();\r\n if ($tempArray)\r\n {\r\n foreach($tempArray as $entry)\r\n {\r\n $listArray[$x++] = thesaurus::get_descriptor($entry);\r\n }\r\n }\r\n\r\n echo_selection($listArray,\"id\",\"\",3,\"assoc-field\");\r\n\r\n // display action line\r\n action::display($id,3);\r\n\r\n echo \"</fieldset>\";\r\n echo \"</form>\";\r\n }", "title": "" }, { "docid": "bf1dbc2fbb808d129e222e19635750cd", "score": "0.45922056", "text": "public function index() {\n $all = $this->Keyword->find('all');\n\t}", "title": "" }, { "docid": "7cabf5fd238ca2cdcaf2541402e24956", "score": "0.45918456", "text": "public function get_not_created_links()\r\n {\r\n \tif (empty($this->course_code))\r\n \t\tdie('Error in get_not_created_links() : course code not set');\r\n \t\r\n \t$tbl_grade_links = Database :: get_main_table(TABLE_MAIN_GRADEBOOK_LINK);\r\n\r\n\t\t$sql = 'SELECT id,title from '.$this->get_exercise_table()\r\n\t\t\t\t.' WHERE id NOT IN'\r\n\t\t\t\t.' (SELECT ref_id FROM '.$tbl_grade_links\r\n\t\t\t\t.' WHERE type = '.LINK_EXERCISE\r\n\t\t\t\t.\" AND course_code = '\".$this->get_course_code().\"'\"\r\n\t\t\t\t.')';\r\n\r\n\t\t$result = api_sql_query($sql, __FILE__, __LINE__);\r\n\r\n\t\t$cats=array();\r\n\t\twhile ($data=mysql_fetch_array($result))\r\n\t\t{\r\n\t\t\t$cats[] = array ($data['id'], $data['title']);\r\n\t\t}\r\n\t\treturn $cats;\r\n }", "title": "" }, { "docid": "de2f573d6fce11ca67a2bc8b9b259fd0", "score": "0.4591272", "text": "public function add_lines_property_object_repository($data) {\n $domain = get_term_by('id',$data['metas'][\"socialdb_property_created_category\"],'socialdb_category_type') ;\n $range = get_term_by('id',$data['metas'][\"socialdb_property_object_category_id\"],'socialdb_category_type') ;\n $xml = '';\n $xml .= '<owl:ObjectProperty rdf:about=\"'.site_url().'?property='.$data['slug'].'\" >';\n $xml .= '<rdfs:range rdf:resource=\"'.site_url().'?category='.$range->slug.'\" />';\n $xml .= '<rdfs:domain rdf:resource=\"'.site_url().'?category='.$domain->slug.'\" />';\n $xml .= '<rdfs:label>'.$data['name'].'</rdfs:label>';\n \n $cardinality = get_term_meta($data['id'], 'socialdb_property_object_cardinality', true);\n $required = get_term_meta($data['id'], 'socialdb_property_required', true);\n $reverse = get_term_meta($data['id'], 'socialdb_property_object_is_reverse', true);\n \n if($required=='true'){\n $xml .= '<rdf:type rdf:resource=\"http://www.w3.org/2002/07/owl#FunctionalProperty\" />';\n }\n if(!$cardinality||$cardinality=='1'){\n $xml .= '<owl:maxCardinality rdf:datatype=\"xsd:nonNegativeInteger\" >1</owl:maxCardinality>';\n }\n \n if($reverse=='true'){\n $inverse = get_term_by('id',$data['metas'][\"socialdb_property_object_reverse\"],'socialdb_property_type') ;\n $xml .= '<owl:inverseOf rdf:about=\"'.site_url().'?property='.$inverse->slug.'\" />';\n }else if($domain->term_id==$range->term_id){\n $xml .= '<owl:SymmetricProperty rdf:about=\"'.site_url().'?property='.$data['slug'].'\" />';\n }\n $xml .= '</owl:ObjectProperty>';\n return $xml;\n }", "title": "" }, { "docid": "8ed39baf997c19c8ac3152f8d60b0128", "score": "0.458539", "text": "function getOverview() ;", "title": "" }, { "docid": "8db71aecb33b2a568f7851835be21b60", "score": "0.45828375", "text": "protected function __construct() {\r\n\t\tparent::__construct(\"term_relationships\");\r\n\t}", "title": "" }, { "docid": "8427e8df5efee78a8d34e02892a25acd", "score": "0.45795944", "text": "public static function get_glossaries_by_courses_returns() {\n return new external_single_structure(array(\n 'glossaries' => new external_multiple_structure(\n new external_single_structure(array(\n 'id' => new external_value(PARAM_INT, 'Glossary id'),\n 'coursemodule' => new external_value(PARAM_INT, 'Course module id'),\n 'course' => new external_value(PARAM_INT, 'Course id'),\n 'name' => new external_value(PARAM_RAW, 'Glossary name'),\n 'intro' => new external_value(PARAM_RAW, 'The Glossary intro'),\n 'introformat' => new external_format_value('intro'),\n 'introfiles' => new external_files('Files in the introduction text', VALUE_OPTIONAL),\n 'allowduplicatedentries' => new external_value(PARAM_INT, 'If enabled, multiple entries can have the' .\n ' same concept name'),\n 'displayformat' => new external_value(PARAM_TEXT, 'Display format type'),\n 'mainglossary' => new external_value(PARAM_INT, 'If enabled this glossary is a main glossary.'),\n 'showspecial' => new external_value(PARAM_INT, 'If enabled, participants can browse the glossary by' .\n ' special characters, such as @ and #'),\n 'showalphabet' => new external_value(PARAM_INT, 'If enabled, participants can browse the glossary by' .\n ' letters of the alphabet'),\n 'showall' => new external_value(PARAM_INT, 'If enabled, participants can browse all entries at once'),\n 'allowcomments' => new external_value(PARAM_INT, 'If enabled, all participants with permission to' .\n ' create comments will be able to add comments to glossary entries'),\n 'allowprintview' => new external_value(PARAM_INT, 'If enabled, students are provided with a link to a' .\n ' printer-friendly version of the glossary. The link is always available to teachers'),\n 'usedynalink' => new external_value(PARAM_INT, 'If site-wide glossary auto-linking has been enabled' .\n ' by an administrator and this checkbox is ticked, the entry will be automatically linked' .\n ' wherever the concept words and phrases appear throughout the rest of the course.'),\n 'defaultapproval' => new external_value(PARAM_INT, 'If set to no, entries require approving by a' .\n ' teacher before they are viewable by everyone.'),\n 'approvaldisplayformat' => new external_value(PARAM_TEXT, 'When approving glossary items you may wish' .\n ' to use a different display format'),\n 'globalglossary' => new external_value(PARAM_INT, ''),\n 'entbypage' => new external_value(PARAM_INT, 'Entries shown per page'),\n 'editalways' => new external_value(PARAM_INT, 'Always allow editing'),\n 'rsstype' => new external_value(PARAM_INT, 'To enable the RSS feed for this activity, select either' .\n ' concepts with author or concepts without author to be included in the feed'),\n 'rssarticles' => new external_value(PARAM_INT, 'This setting specifies the number of glossary entry' .\n ' concepts to include in the RSS feed. Between 5 and 20 generally acceptable'),\n 'assessed' => new external_value(PARAM_INT, 'Aggregate type'),\n 'assesstimestart' => new external_value(PARAM_INT, 'Restrict rating to items created after this'),\n 'assesstimefinish' => new external_value(PARAM_INT, 'Restrict rating to items created before this'),\n 'scale' => new external_value(PARAM_INT, 'Scale ID'),\n 'timecreated' => new external_value(PARAM_INT, 'Time created'),\n 'timemodified' => new external_value(PARAM_INT, 'Time modified'),\n 'completionentries' => new external_value(PARAM_INT, 'Number of entries to complete'),\n 'section' => new external_value(PARAM_INT, 'Section'),\n 'visible' => new external_value(PARAM_INT, 'Visible'),\n 'groupmode' => new external_value(PARAM_INT, 'Group mode'),\n 'groupingid' => new external_value(PARAM_INT, 'Grouping ID'),\n 'browsemodes' => new external_multiple_structure(\n new external_value(PARAM_ALPHA, 'Modes of browsing allowed')\n ),\n 'canaddentry' => new external_value(PARAM_INT, 'Whether the user can add a new entry', VALUE_OPTIONAL),\n ), 'Glossaries')\n ),\n 'warnings' => new external_warnings())\n );\n }", "title": "" }, { "docid": "c39c87933576484b9ee8326c5722957c", "score": "0.45773765", "text": "public function get_links()\n {\n }", "title": "" }, { "docid": "a39f9810ad6eeb324541a108506f370f", "score": "0.457251", "text": "public function show(gasto $gasto)\n {\n //\n }", "title": "" }, { "docid": "144c15e4e0275794b9fa23784bde5345", "score": "0.4563956", "text": "public function getLinks($target='_top'){\r\n\t\t// Rens url\r\n\t\t$url=YRComms::convertEncodingEntities($this->yr_url);\r\n\t\t// Spytt ut\r\n\t\t$this->ht.=<<<EOT\r\n <p class=\"yr-lenker\">$this->yr_name p&aring; yr.no:\r\n <a href=\"$url/\" target=\"$target\">Varsel med kart</a>\r\n <a href=\"$url/time_for_time.html\" target=\"$target\">Time for time</a>\r\n <a href=\"$url/helg.html\" target=\"$target\">Helg</a>\r\n <a href=\"$url/langtidsvarsel.html\" target=\"$target\">Langtidsvarsel</a>\r\n </p>\r\n\r\nEOT\r\n\t\t;\r\n\t}", "title": "" }, { "docid": "32a3c95c4eb16a92aa1a2f4e2b65dbfa", "score": "0.45636028", "text": "public function index()\n\t{\n\t\tclientLang(\"cant_be_empty\", \"armory\");\n\n\t\t$this->template->setTitle(lang(\"search_title\", \"armory\"));\n\n\t\t$page = $this->template->loadPage(\"search.tpl\");\n\n\t\t$data = array(\n\t\t\t\t\"module\" => \"default\",\n\t\t\t\t\"headline\" => lang(\"search_headline\", \"armory\"),\n\t\t\t\t\"content\" => $page\n\t\t\t);\n\n\t\t$page = $this->template->loadPage(\"page.tpl\", $data);\n\n\t\t$this->template->view($page, \"modules/armory/css/search.css\", \"modules/armory/js/search.js\");\n\t}", "title": "" }, { "docid": "6cd99374b7ee4f01ec9697ccb83017ab", "score": "0.45613194", "text": "public function showAllHotdrinks() {\n $this->db->query('SELECT * FROM tbl_hotdrinks');\n return $this->db->resultSet();\n }", "title": "" }, { "docid": "74b897eab16de201348615a3943f846f", "score": "0.45604658", "text": "public function d3_browser_suggest()\n {\n // zwingend, um die Gültigkeit des Dokuments sicherzustellen\n // fängt Fehlausgaben anderer Module ab\n ob_end_clean();\n\n // we don't require a complete object\n $blOldFullObject = $this->_d3GetSet()->getValue('blExtSearch_QuickSearchLoadFullObject');\n $this->_d3GetSet()->setValue('blExtSearch_QuickSearchLoadFullObject', false);\n\n echo $this->_getD3SearchHandler()->browserSuggestGetContent();\n\n // restore setting\n $this->_d3GetSet()->setValue('blExtSearch_QuickSearchLoadFullObject', $blOldFullObject);\n\n oxRegistry::getConfig()->pageClose();\n die();\n }", "title": "" }, { "docid": "87e5cb9f5392b01ec0df3f5a649308ac", "score": "0.455265", "text": "public function indexAction() {\n $this->view->dynasties = $this->_dynasties->getDynastyList();\n }", "title": "" }, { "docid": "15eb5828a6b5b12979bc48e94e7cd1e1", "score": "0.45516875", "text": "function get_oembed_endpoint_url($permalink = '', $format = 'json')\n {\n }", "title": "" }, { "docid": "7194c104599b46a502bc96af9a50c1a0", "score": "0.45513225", "text": "public function no_items() {\n\t\tesc_html_e( 'No address found', 'wdaf' );\n\t}", "title": "" }, { "docid": "84034d37b5927e34c8c7e468568cbeb4", "score": "0.45511597", "text": "public function view_allseo() \n {\n $query = $this->db->get('metadata'); \n return $query; \n }", "title": "" }, { "docid": "1366c1bfec78b9b767742667c36394b2", "score": "0.45510602", "text": "public function showAll() {\n $qry = $this->db->prepare('SELECT DISTINCT NAME,ADDRESS,SUBURB,LATITUDE,LONGITUDE FROM n8598177.items;');\n $qry->execute();\n foreach ($qry as $hotspot) {\n include('server/includes/recentReview.tpl.php');\n }\n }", "title": "" }, { "docid": "1e0ac6d0648ba65343473e7775703eb0", "score": "0.45460263", "text": "function index()\n {\n\t\tenhancedmap_helper::json_index($this);\n }", "title": "" }, { "docid": "ba1ca749e3d7011132e4ff8003f6eef9", "score": "0.45455256", "text": "public function getOfficialDocuments() {}", "title": "" }, { "docid": "72b7e232a7c8f8e3d64e040dce479953", "score": "0.45426813", "text": "function no_items() {\n\t\tesc_attr_e( 'No assessment results found.' );\n\t}", "title": "" }, { "docid": "fc72bfe2d70e96b709d21aa7d8a77787", "score": "0.45382017", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('JetBredaBundle:Alquiler')->findAll();\n\n return array('entities' => $entities);\n }", "title": "" }, { "docid": "d817855376a486cd0bbad2e29e7d21aa", "score": "0.45380166", "text": "function noidex_for_rule_not_found(){\n\tremove_action('premmerce_filter_rule_not_found', 'ruleNotFound');\n\tif (defined('WPSEO_VERSION')) {\n\t\tremove_action('wpseo_head', array(\\WPSEO_Frontend::get_instance(), 'canonical'), 20);\n\t\tremove_action('wpseo_head', array(\\WPSEO_Frontend::get_instance(), 'metadesc'), 6);\n\t}\n\n\t// If you need add custom canonical landing page(посадочная страница)\n\tadd_action('wp_head', function (){\n\t\t$term = get_queried_object();\n\t\t\tif ($term instanceof \\WP_Term) {\n\t\t\t\t$canonical = get_term_link($term);\n\t\t\t\tif (is_string($canonical)) {\n\t\t\t\t\t// printf('<link rel=\"canonical\" href=\"%s\" />', 'my canonical'); // esc_url($canonical, null, null)\n\t\t\t\t\techo('<meta name=\"robots\" content=\"noindex, nofollow\" count=\"n2\"/>');\n\t\t\t\t}\n\t\t\t}\n\t},-1);\n}", "title": "" }, { "docid": "02b46b8e028bfb97b66c8d1a4e353591", "score": "0.45289567", "text": "public function indexAction()\n {\n $this->view->headLink()->appendStylesheet($this->view->baseUrl().'/css/center.css');\n \n $q = Doctrine_Query::create()\n ->from('Tripjacks_Model_Venue v')\n ->where('v.type = ?', \"normal\");;\n $result = $q->fetchArray();\n \n $q2 = Doctrine_Query::create()\n ->from('Tripjacks_Model_Venue v')\n ->where('v.type = ?', \"special\");;\n $result2 = $q2->fetchArray();\n \n $this->view->records = $result; \n $this->view->records2 = $result2; \n }", "title": "" }, { "docid": "a191b2ff9db67055edd2abbf1569dd54", "score": "0.45288286", "text": "public abstract function onJSolrSearchURIGet($document);", "title": "" }, { "docid": "911a55a9d473b5f39f0839ab2de227e2", "score": "0.45259115", "text": "public function dictlistAction()\n {\n $this->view->information = \"information/dictionaries.phtml\";\n $this->view->englishDictList = true;\n }", "title": "" }, { "docid": "dabe047a4d8d1153c03fd25a00bc0f2a", "score": "0.45224655", "text": "public function getAll($display_query = false)\n {\n }", "title": "" }, { "docid": "f396a9b71e57ebfd01b73d038b75d5bc", "score": "0.45139286", "text": "public function foodista3(Request $request){\n \t\\EasyRdf_Namespace::set('rdfs', 'http://www.w3.org/2000/01/rdf-schema#');\n \t\\EasyRdf_Namespace::set('owl', 'http://www.w3.org/2002/07/owl#');\n \t\\EasyRdf_Namespace::set('rdf', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#');\n \t\\EasyRdf_Namespace::set('cat', 'http://www.w3.org/2004/02/skos/core#prefLabel');\n \t\n \t// echo 'you like:';\n \t// foreach ($request->likes as $like)\n \t\t// \techo '<li>'.$like.'</li>';\n \t\t// echo '<br>you dislike:';\n \t\t// foreach ($request->dislikes as $dislike)\n \t\t\t// echo '<li>'.$dislike.'</li>';\n \t\t\t// echo '<br>you whant to eat me at:';\n \t\t\t// dd($request->when);\n \t\t$sparql = new \\EasyRdf_Sparql_Client('http://localhost:3030/Foodista/query');\n \t\t \n \t\n \t\n \t\t$i=1;\n \t\t$filter=' ';\n \t\t$labels=' ';\n \t\t$objs=' ';\n \t\tif ($request->likes){\n \t\t\tforeach ($request->likes as $ing){\n \t\t\t\t$filter=$filter.\"filter contains(?ing\".$i.\",'\".$ing.\"') .\\n\";\n \t\t\t\t$labels=$labels.\"?obj\".$i.\" rdfs:label ?ing\".$i.\".\\n\";\n \t\t\t\t$objs=$objs.\" ?obj\".$i.\",\";\n \t\t\t\t$i=$i+1;\n \t\t\t}\n \t\t}\n \t\t$objs=substr($objs, 0, -1);\n \t\t$filterN=' ';\n \t\t$labelsN=' ';\n \t\t$objsN=' ';\n \t\tif ($request->dislikes){\n \t\t\tforeach ($request->dislikes as $ing){\n \t\t\t\t$filterN=$filterN.\"filter (!contains(?ing\".$i.\",'\".$ing.\"') ).\\n\";\n \t\t\t\t$labelsN=$labelsN.\" ?objN\".$i.\" rdfs:label ?ing\".$i.\".\\n\";\n \t\t\t\t$objsN=$objsN.\", ?obj\".$i;\n \t\t\t\t$i=$i+1;\n \t\t\t}\n \t\n \t\t\t$objsN=substr($objsN, 0, -1);\n \t\t}\n \t\t$foodcat=\"\";\n \t\tif ($request->catmeal!=\"None\")\n \t\t\t$foodcat =\"?cat1 cat: '\".$request->catmeal.\"'.\\n\";\n \t\t \n \t\t\t//run query\n \t\t\t$result1 = $sparql->query(\n \t\t\t\t\t\"SELECT distinct ?subjectName ?img ?links ?abstract ?subject\n\t\t\t\t\tWHERE {\n\t\t\t\t\t ?subject <http://linkedrecipes.org/schema/ingredient> \".$objs.$objsN.\".\\n\n\t\t\t\t\t ?subject <http://purl.org/dc/terms/title> ?subjectName.\\n\n\t\t\t\t\t\t ?subject <http://xmlns.com/foaf/0.1/isPrimaryTopicOf> ?links.\t\\n\n\t\t\t\t\t\t ?subject <http://xmlns.com/foaf/0.1/depiction> ?img.\\n\n\t\t\t\t\t\t ?subject <http://linkedrecipes.org/schema/category> ?cat1.\n\t\t\t\t\t\t ?subject <http://purl.org/dc/terms/description> ?abstract.\n\t\t\t\t\t \".$labels.$labelsN.\"\n\t\t\t\t\t \".$filter.$filterN.$foodcat.\"\n \t\n\t\t\t\t\t}\n\t\t\t\t\tLimit 16\"\n \t\t\t\t\t);\n \t\n \t\t\t \n\t\t\t// Setup some additional prefixes for DBpedia\n\t\t\\EasyRdf_Namespace::set('category', 'http://dbpedia.org/resource/Category:');\n\t\t\\EasyRdf_Namespace::set('dbpedia', 'http://dbpedia.org/resource/');\n\t\t\\EasyRdf_Namespace::set('dbo', 'http://dbpedia.org/ontology/');\n\t\t\\EasyRdf_Namespace::set('dbp', 'http://dbpedia.org/property/');\n\t\t\n\t\t//return $request->sings;\n\t\t\n\t\t$sparql = new \\EasyRdf_Sparql_Client('http://dbpedia.org/sparql');\n\t\t$filter=' ';\n\t\tif ($request->likes)\n\t\t\tforeach ($request->likes as $ing)\n\t\t\t\t$filter=$filter.\"filter contains(?inglist,'\".$ing.\"') .\\n\";\n\t\t$filterN=' ';\n\t\tif ($request->dislikes)\n\t\t\tforeach ($request->dislikes as $ing)\n\t\t\t\t$filterN=$filterN.\"filter (!contains(?inglist,'\".$ing.\"') ).\\n\";\n\t\t\n\t\t$foodcat=\"\";\n\t\tif ($request->catmeal!=\"None\")\n\t\t\t$foodcat =\"?cat1 cat: '\".$request->catmeal.\"'.\\n\";\n\t\t\t \n\t\t\t//run query\n\t\t\t$result2 = $sparql->query(\n\t\t\t\t\t\"SELECT distinct ?subject ?img ?links\n\t\t\t\t\tWHERE {\n\t\t\t\t\t\t ?subject rdf:type <http://dbpedia.org/ontology/Food>.\\n\n\t\t\t\t\t\t ?subject dbo:ingredientName ?inglist.\\n\n\t\t\t\t\t\t ?subject foaf:isPrimaryTopicOf ?links.\\n\n\t\t\t\t\t\t ?subject foaf:depiction ?img.\\n\n\t\t\t\t\t \".$filter.$filterN.\"\n\t\t\n\t\t\t\t\t}\n\t\t\t\t\tLimit 16\"\n\t\t\t\t\t);\n\n//\t\t\t\t$result=$result1;\n//\t\tdd($result);\n\t\t\treturn \\View::make(\"FoodistaShow\",compact('result1'), compact('result2'))\n\t\t\t//->with(\"name\", \"something\")\n\t\t\t->render();\n \n }", "title": "" } ]
3cb45832bb36603e5232fe0dc8dfc47c
generate a universal unique identifier
[ { "docid": "14812dd62f07332357484d4638ca87c1", "score": "0.0", "text": "protected function genUUID($data)\n {\n /*\n * 1, create a guid\n * check and append the node name to\n * guarantee the basic server unique\n */\n $prefix = NULL;\n if ( defined('SR_NODE_NAME') ) {\n $prefix = substr(md5(SR_NODE_NAME), 0, 4);\n } else {\n $prefix = sprintf(\"%04x\", mt_rand(0, 0xffff));\n }\n\n $tArr = explode(' ', microtime());\n $tsec = $tArr[1];\n $msec = $tArr[0];\n if ( ($sIdx = strpos($msec, '.')) !== false ) {\n $msec = substr($msec, $sIdx + 1);\n }\n\n return sprintf(\n \"%08x%08x%0s%04x\",\n $tsec,\n $msec,\n $prefix,\n mt_rand(0, 0xffff)\n );\n }", "title": "" } ]
[ { "docid": "a1efa2f22e71f3712011c9b287773547", "score": "0.9032417", "text": "public function generateUniqueIdentifier(): string;", "title": "" }, { "docid": "07b060473c207147110c3fe357416649", "score": "0.8733929", "text": "function getUniqueIdentifier() : string ;", "title": "" }, { "docid": "85999b59bc420662ead2158c257d1b1f", "score": "0.8644502", "text": "public function getUniqueIdentifier() : string {}", "title": "" }, { "docid": "85999b59bc420662ead2158c257d1b1f", "score": "0.8644502", "text": "public function getUniqueIdentifier() : string {}", "title": "" }, { "docid": "85999b59bc420662ead2158c257d1b1f", "score": "0.8644502", "text": "public function getUniqueIdentifier() : string {}", "title": "" }, { "docid": "a068e8bf69cb639ec8ba62d4ab5b91e9", "score": "0.8571908", "text": "private function _generateUniqueID(){\n\t\t//This will produce something like: 14d9bd2fec55ff\n\t\treturn uniqid(true);\n\t}", "title": "" }, { "docid": "d62f14cea01a1d1d7fc7c9b2aca11106", "score": "0.85552526", "text": "private function generate_unique_id(){\r\n\t\t$this->id = abs(crc32(serialize($this->infos)));\r\n\t\treturn $this->id;\r\n\t}", "title": "" }, { "docid": "585d13ac44715b0112f1d8f8ca332f75", "score": "0.84872603", "text": "public function generateNewUniqueIdentifier(): string\n {\n $identifier = null;\n do {\n try {\n $identifier = bin2hex(random_bytes(7));\n } catch (\\Exception $e) {\n }\n } while ($this->findByIdentifier($identifier));\n\n return $identifier;\n }", "title": "" }, { "docid": "8f568db4986cff7ef081654ca32f888e", "score": "0.8454946", "text": "private function genId()\n\t{\n\t\treturn oxUtilsObject::getInstance()->generateUId();\n\t}", "title": "" }, { "docid": "6b7dec28e4d5dec3cdb375fda0aee93c", "score": "0.8391737", "text": "private function generateId(): string\n {\n return md5(uniqid(__CLASS__, true));\n }", "title": "" }, { "docid": "aa17f3cce9f21bdbda3a329ef46c10ec", "score": "0.8357682", "text": "public static function createUniqueid(){\n return uniqid();\n }", "title": "" }, { "docid": "03d6cde1bfef20bd1603aec51efe7229", "score": "0.83456165", "text": "private static function makeUniqueId() {\r\n\t\tstatic $uniq = 0;\r\n\t\t$uniq += 1;\r\n\t\t\r\n\t\t$id = 'audioplayer2_' . $uniq . '_' . mt_rand(1,1000000);\r\n\t\t\r\n\t\treturn $id;\r\n\t}", "title": "" }, { "docid": "ce6c6c38cca56124ba16d0530667a849", "score": "0.83169687", "text": "public static /*.string.*/ function makeId() {\r\n// Note could also try this: return md5(uniqid(mt_rand(), true));\r\n\t\tlist($usec, $sec) = explode(\" \", (string) microtime());\r\n\t\treturn base_convert($sec, 10, 36) . base_convert((string) mt_rand(0, 35), 10, 36) . str_pad(base_convert(($usec * 1000000), 10, 36), 4, '_', STR_PAD_LEFT);\r\n\t}", "title": "" }, { "docid": "c7b67d47180d8ae751bebbc074619491", "score": "0.8254964", "text": "function generateNewUuid() {\n return uniqid(\"CSC490\");\n}", "title": "" }, { "docid": "b09feb83569d2f7caef46544e69071b8", "score": "0.8252538", "text": "protected function _generateId()\n {\n return strval(new Horde_Support_Randomid());\n }", "title": "" }, { "docid": "b375f7a20be47576aadc0404d62d22c7", "score": "0.8235774", "text": "protected function _create_id()\n {\n return uniqid();\n }", "title": "" }, { "docid": "eaa76385b2bd82fd31b583216860185c", "score": "0.823472", "text": "protected function generateId()\n {\n return '_' . bin2hex(openssl_random_pseudo_bytes(8));\n }", "title": "" }, { "docid": "da08998b72421318a5ddbe5216a2ffc3", "score": "0.81900036", "text": "function getUniId(){\n $str=time();\n return $str.str_pad(rand(0,10000),4,0);\n}", "title": "" }, { "docid": "9dc6532ccd0df76bb5b640f7027367d2", "score": "0.81640935", "text": "abstract public function generateId() : string;", "title": "" }, { "docid": "9c82aac71d893937a3fff9f8cedd0145", "score": "0.81369364", "text": "function brooks_get_unique_id() {\n return mt_rand(1000,9000) . '_' . mt_rand(1000,9999);\n}", "title": "" }, { "docid": "5a1eb8f1fb3279bb831993a91ae1c50d", "score": "0.81151277", "text": "public function createPaymentUniqueId()\n {\n return Random::getAlphanumericString(32);\n }", "title": "" }, { "docid": "6b7bb5371258b104268c93f14fba6493", "score": "0.809881", "text": "function createUniqueRandomID()\n\t{\n\t\treturn (int)(rand(99, 999999).date('U'));\n\t}", "title": "" }, { "docid": "ba2a5116f101b68e48b313a2d5a6bc97", "score": "0.8098284", "text": "public function generateUid()\n {\n return crc32(uniqid());\n }", "title": "" }, { "docid": "a9fef9a43210a27aa7811b29e7729e65", "score": "0.80976105", "text": "public function generateUID()\n {\n \tdo {\n \t\t$uid = sha1(microtime());\n \t} while ($this->getQuery()->where('uid', $uid)->count());\n\n \treturn $uid;\n }", "title": "" }, { "docid": "30d882d1cfe688fbfb782760aa725586", "score": "0.807936", "text": "protected function generateId()\n\t{\n\t\treturn hash('sha256', uniqid(mt_rand()));\n\t}", "title": "" }, { "docid": "0a17cf80000377e2d2e98f8c5b72e5d7", "score": "0.8065278", "text": "public static function unique_id(): string {\n\t\treturn md5(random_bytes(128));\n\t}", "title": "" }, { "docid": "9d6f7512cd3a13224678c4db51c37b7c", "score": "0.8056885", "text": "protected function generateId()\n {\n // @todo: evaluate the usage of ramsey/uuid\n return uniqid();\n }", "title": "" }, { "docid": "c0459271e9764a4dd9196de256a87273", "score": "0.8053822", "text": "public function uniqueId();", "title": "" }, { "docid": "60971be2f9c49b1082020d5746b27662", "score": "0.8052767", "text": "public function generate_multi_id() {\n\t\treturn uniqid( 'aweber_', true );\n\t}", "title": "" }, { "docid": "efb93412ba29e145fb17d807ca720692", "score": "0.8044159", "text": "function generate_unique_id(){\n $now = new DateTime();\n return $now->getTimestamp(); \n }", "title": "" }, { "docid": "8001a70c70dbfc78c270809855e9f41d", "score": "0.80312806", "text": "private function generateUniqueId(): string\n {\n return Uuid::uuid4()->toString();\n }", "title": "" }, { "docid": "45d387d3172d44c82332188865c2c838", "score": "0.8029615", "text": "public static function generateId()\n {\n return dechex(time()) . bin2hex(random_bytes(8));\n }", "title": "" }, { "docid": "c5b04c52367efcf666b0027268f7bc4a", "score": "0.80119836", "text": "public static function generateUniqueId()\n\t{\n\t\treturn uniqid();\n\t}", "title": "" }, { "docid": "d64e0bdf98af2f874ea058e976e9a528", "score": "0.8011099", "text": "public function get_uniqid();", "title": "" }, { "docid": "23a9f28a99f63dfb554d9b25f333b027", "score": "0.8005231", "text": "public function generateId();", "title": "" }, { "docid": "23a9f28a99f63dfb554d9b25f333b027", "score": "0.8005231", "text": "public function generateId();", "title": "" }, { "docid": "877bc49c0519c64063a9cb4d1c23eff1", "score": "0.7985538", "text": "protected function generateId()\n {\n return $this->stringToId( $this->storage->login );\n }", "title": "" }, { "docid": "daee5c5ead3ad49b23023150335de832", "score": "0.7972709", "text": "function make_uniqid($prefix = '') {\n $uniqid = uniqid('', true);\n $uniqid[14] = sprintf(\"%x\", mt_rand(0, 0xF));\n $uniqid = ($prefix ?: 'id_') . $uniqid;\n return $uniqid;\n}", "title": "" }, { "docid": "549d9312e1a4bbd0cee9f633d4ed1ddd", "score": "0.79704493", "text": "public function generateId()\n {\n return time() . '-' . str_random(10);\n }", "title": "" }, { "docid": "e61d9a8a27326eefeb04b6659f562ea6", "score": "0.79595906", "text": "public function unique_code()\n {\n $id = (String) mt_rand(100000000000, 99999999999999);\n return str_limit($id, 12, '');\n }", "title": "" }, { "docid": "2cb4cf56fad1c8a526e07b4bad7c7cca", "score": "0.7941321", "text": "function generate_id(){\n $id = base_convert(mt_rand(), 10, 36) . base_convert(date(\"U\"), 10, 36);\n return $id;\n}", "title": "" }, { "docid": "54653967d463e4e1e4352c12cde3eaf4", "score": "0.79351634", "text": "function generateUID(){\n\t\treturn rand(pow(10, 3), pow(10, 4)-1); //random 4 digit number\n\t}", "title": "" }, { "docid": "dfcaf87345856d6742113c0ba3e212bc", "score": "0.7931549", "text": "public function generate_unique_id() {\n\n\t\t\trequire_once( ABSPATH . 'wp-includes/class-phpass.php');\n\t\t\t$hasher = new PasswordHash( 8, false );\n\t\t\treturn md5( $hasher->get_random_bytes( 32 ) );\n\n\t\t}", "title": "" }, { "docid": "1c3601e8c0cd2a082688afc9e1ec7692", "score": "0.7930404", "text": "public function generateUID()\n\t{\n\t\t$this->uid = $this->genUuid();\n\t\t$this->uid = strtoupper($this->uid);\n\t}", "title": "" }, { "docid": "1afea1fcf370b008fc96924c7d272466", "score": "0.79285985", "text": "function _generateId()\n {\n static $idx = 1;\n\n if (!$this->getAttribute('id')) {\n $this->updateAttributes(array('id' => 'id_'.substr(md5(microtime() . $idx++), 0, 6)));\n }\n }", "title": "" }, { "docid": "ee724455fab90c63c13ba72fbf87355d", "score": "0.7915641", "text": "function newUID () {\n\t$chars = array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z');\n\n\t$m_str = $chars; \n\t$rnd=0;\n\t$r = '';\n\t$uid = array();\n\tfor ($i=0; $i<36; $i++) {\n\t\tif ($i==8 || $i==13 || $i==18 || $i==23) {\n\t\t\t$uid[$i] = '-';\n\t\t} elseif ($i==14) {\n\t\t\t$uid[$i] = '4';\n\t\t} else {\n\t\t\tif ($rnd <= 0x02) {\n\t\t\t\t$rnd = 0x2000000 + ((mt_rand(100000,9999999)*.0000001*0x1000000)|0);\n\t\t\t}\n\t\t\t$r = $rnd & 0xf;\n\t\t\t$rnd = $rnd >> 4;\n\t\t\t$uid[$i] = $m_str[($i == 19) ? ($r & 0x3) | 0x8 : $r];\n\t\t}\n\t}\n\treturn implode(\"\",$uid);\n}", "title": "" }, { "docid": "063bcaee2a3b20bbcb899e842ec5c511", "score": "0.7906413", "text": "protected function generateId() {\n return $this->stringToId($this->storage->login);\n }", "title": "" }, { "docid": "f2240985feca8f36385859008295a740", "score": "0.7899574", "text": "public function generateId()\n {\n return sprintf(\n '%08X-%04X-%04X-%02X%02X-%012X',\n mt_rand(),\n mt_rand(0, 65535),\n bindec(substr_replace(\n sprintf('%016b', mt_rand(0, 65535)), '0100', 11, 4)\n ),\n bindec(substr_replace(sprintf('%08b', mt_rand(0, 255)), '01', 5, 2)),\n mt_rand(0, 255),\n mt_rand()\n );\n }", "title": "" }, { "docid": "ad2d8c2b2a7d98be7804c0f3f223ccf0", "score": "0.78772104", "text": "private function generateUniqueId()\n {\n return Uuid::uuid4();\n }", "title": "" }, { "docid": "5a34c4c6a7d7b6ce7ac03690fc26156f", "score": "0.7858735", "text": "protected function generateIdByName(): string\n {\n return \"auto_id_\" . $this->name . \"_\" . $this->value;\n }", "title": "" }, { "docid": "0f6763abb9c8564c05b05fa7b3e963a2", "score": "0.7858095", "text": "protected static function generateId(): string\n {\n return bin2hex(random_bytes(10));\n }", "title": "" }, { "docid": "ed94d1a3f3ea96d32fb7ded4ed0ff552", "score": "0.78564024", "text": "protected function generateUId()\n {\n return md5(uniqid('', true) . '|' . microtime());\n }", "title": "" }, { "docid": "af34961ec79fbea0bb75cd2f43f0a853", "score": "0.7848523", "text": "public final function generateID() {\n\t\treturn str_replace(\"/\", \"_\", str_replace(\".\", \"_\", $this->path)).\"_\".($this->generate_id++);\n\t}", "title": "" }, { "docid": "1fe1ad7ac4fe341a055869f3e631ead7", "score": "0.7848013", "text": "Function my_UniqId()\n {\n mt_srand((double)microtime() * 1000000);\n return uniqid(mt_rand());\n }", "title": "" }, { "docid": "36976d838d07fdf2b968b6d0d6982efd", "score": "0.7818708", "text": "function reg_get_unique_id(){\n\tlist($usec, $sec) = explode(' ', microtime());\n\tmt_srand((float) $sec + ((float) $usec * 100000));\n\treturn md5(uniqid(mt_srand((float) $sec + ((float) $usec * 100000)), true));\n}", "title": "" }, { "docid": "379b52a5e8a6a2f2be827d4d10edce83", "score": "0.78067625", "text": "public function createReservationCode()\n {\n return uniqid($this->ID);\n }", "title": "" }, { "docid": "74e97bb606d98d8b593b6355ab5da6df", "score": "0.7792121", "text": "protected function generateId(): string\n {\n return Security::hex($this->idLength);\n }", "title": "" }, { "docid": "ae8bdae1694525c26dd547e0b93263e9", "score": "0.7791082", "text": "public static function generateMessageID()\n {\n return '<' . date('YmdHis') . '.'\n . substr(str_pad(base_convert(microtime(), 10, 36), 16, uniqid(mt_rand()), STR_PAD_LEFT), -16)\n . '@' . $_SERVER['SERVER_NAME'] . '>';\n }", "title": "" }, { "docid": "563368e56938fb1bf1a6acbfc162c8a6", "score": "0.7784553", "text": "function uniqid($prefix, $lcg)\n{\n return '';\n}", "title": "" }, { "docid": "de9cfd6b3863d2c8430e2f56b8ac7fc1", "score": "0.77816063", "text": "public static function generateId()\n {\n return uniqid(rand(1,999));\n }", "title": "" }, { "docid": "21052de14aa24d42565ae6e2529a6b60", "score": "0.7778981", "text": "function create_guid()\n {\n $guid = '';\n $namespace = rand(11111, 99999);\n $uid = uniqid('', true);\n $data = $namespace;\n $data .= $_SERVER['REQUEST_TIME'];\n $data .= $_SERVER['HTTP_USER_AGENT'];\n $data .= $_SERVER['REMOTE_ADDR'];\n $data .= $_SERVER['REMOTE_PORT'];\n $hash = strtoupper(hash('ripemd128', $uid . $guid . md5($data)));\n $guid = substr($hash, 0, 8) . '-' .\n substr($hash, 8, 4) . '-' .\n substr($hash, 12, 4) . '-' .\n substr($hash, 16, 4) . '-' .\n substr($hash, 20, 12);\n return $guid;\n }", "title": "" }, { "docid": "1c643507f0615e8a51f7c9e74d178d3e", "score": "0.7776661", "text": "function rnunid() {\n\t\treturn md5( uniqid() ); // 32 characters long\n\t\t//$unique = sha1( uniqid() ); // 40 characters long\n\t}", "title": "" }, { "docid": "5bfee10883921896f58bdea2c341f17e", "score": "0.7773421", "text": "public function getId(): string\n {\n return \\uniqid();\n }", "title": "" }, { "docid": "2add4b22fcbffba9a4fdfbcd53a85994", "score": "0.7769383", "text": "public function gen_uid() {\n\t\t$this->uid = Util::get_uid();\n\t}", "title": "" }, { "docid": "0b24f229dd09282e375e99f8586932e9", "score": "0.7750726", "text": "public function generateUniqueId()\n {\n return substr(uniqid(rand(), true), 0, 10);\n }", "title": "" }, { "docid": "746e6c4e4be3cf596f33d19ce3166ee9", "score": "0.77480245", "text": "function uniqid($prefix,$lcg)\n{\n\treturn '';\n}", "title": "" }, { "docid": "fde96007ce85d25c6a99c071f9821e67", "score": "0.773995", "text": "public static function get_uniqueidentifier(){\r\n try { \r\n if ( function_exists('uniqid') ) {\r\n return uniqid();\r\n } else {\r\n return NULL;\r\n } \r\n } catch (Exception $e) { \r\n msg_reporting::output_error($e->getMessage());\r\n } \r\n }", "title": "" }, { "docid": "998eee6df25d330326ec42b36d6f4a8f", "score": "0.7738085", "text": "protected function generate_transitional_id() {\n\t\treturn substr( md5( uniqid( '', true ) ), 0, 8 );\n\t}", "title": "" }, { "docid": "b1e1eb0f429389ed8504c875ff928109", "score": "0.77256197", "text": "protected static function generateToken()\n {\n return uniqid();\n }", "title": "" }, { "docid": "c6404ededb08dadf9d09c4c0519046d4", "score": "0.7723021", "text": "public static function getUniqueId() {\n\t\t$id = uniqid ();\n\t\t// $alpha = \"bcdfghjklmnopqrstvwxyz0123456789\";\n\t\t$alpha = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n\t\tfor($i = 0; $i < strlen ( $id ); $i ++) {\n\t\t\t//$binid .= $hexbin_arr[$id[$i]];\n\t\t\t$binid_p [$i] = str_pad ( decbin ( hexdec ( $id [$i] ) ), 4, '0', STR_PAD_LEFT );\n\t\t}\n\t\tshuffle ( $binid_p );\n\t\t$binid = implode ( '', $binid_p );\n\t\t$id_arr = explode ( ' ', chunk_split ( $binid, 5, ' ' ) );\n\t\t$fin_id = '';\n\t\tforeach ( $id_arr as $id_part ) {\n\t\t\tif (! ($id_part == '')) {\n\t\t\t\t$id_p = str_pad ( $id_part, 5, '0', STR_PAD_LEFT );\n\t\t\t\t$fin_id .= $alpha [bindec ( $id_p )];\n\t\t\t}\n\t\t}\n\t\treturn $fin_id;\n\t}", "title": "" }, { "docid": "929d11403904c49e142ee1d4b83811ae", "score": "0.7721116", "text": "function generaNumeroOrdenUnico() { \n $codigo = uniqid('INTER_');\n return $codigo; \n }", "title": "" }, { "docid": "415120abb8d4c7ed64306fe5b683f02d", "score": "0.76959753", "text": "final protected function generate_uid() {\n\t\treturn md5(uniqid(mt_rand(),true));\n\t}", "title": "" }, { "docid": "b3c4d16bacd3d35909147b83fea03848", "score": "0.76953745", "text": "protected function getIdempotentIdentifier(): string\n {\n // This is a fallback for backward compatibility.\n return uniqid('', true);\n }", "title": "" }, { "docid": "abfd4fd4d2ccece49cb2f93106509fdd", "score": "0.7641181", "text": "function guid(){\n $uuid= \"\" . rand(1,10000) . time() . rand(1,10000);\n return $uuid;\n }", "title": "" }, { "docid": "abfd4fd4d2ccece49cb2f93106509fdd", "score": "0.7641181", "text": "function guid(){\n $uuid= \"\" . rand(1,10000) . time() . rand(1,10000);\n return $uuid;\n }", "title": "" }, { "docid": "d2f23d466a1a0ba67938cea5b2b8bcb7", "score": "0.76269674", "text": "static public function uniqid() {\n // mUniqid()\n\n return str_ireplace('.', '', uniqid('', true));\n }", "title": "" }, { "docid": "9d289f6500490c5cc4f16cf7c8323248", "score": "0.76234156", "text": "protected function generateUUID()\n {\n return uniqid();\n }", "title": "" }, { "docid": "20bdef3ca419f6409ef3914771e1fd69", "score": "0.7612215", "text": "public function getUniqueIdentifier() {\n\t\t$formDefinition = $this->getRootForm();\n\t\t$uniqueIdentifier = sprintf('%s-%s', $formDefinition->getIdentifier(), $this->identifier);\n\t\t$uniqueIdentifier = preg_replace('/[^a-zA-Z0-9-_]/', '_', $uniqueIdentifier);\n\t\treturn lcfirst($uniqueIdentifier);\n\t}", "title": "" }, { "docid": "baa89a02ac598ca4727fb92d35016b45", "score": "0.76118046", "text": "public static function id(): string\n {\n return (string) Uuid::generate(4);\n }", "title": "" }, { "docid": "f7b53ff30557e6f39f946c179d5a24fc", "score": "0.7608268", "text": "protected function regenerateID()\n {\n return Str::random(32);\n }", "title": "" }, { "docid": "5fdd251158a5ed2814b5233341a1317a", "score": "0.7603971", "text": "function NewGuid()\n{ $s = strtoupper(md5(uniqid(rand(),true)));\n$guidText =\nsubstr($s,0,8) . '-' .\nsubstr($s,8,4) . '-' .\nsubstr($s,12,4). '-' .\nsubstr($s,16,4). '-' .\nsubstr($s,20);\nreturn $guidText;\n}", "title": "" }, { "docid": "5a20e7e576720389486dfa92ab9776a6", "score": "0.7600213", "text": "static private function createGuid()\n {\n $guid = \"\";\n // This was 16 before, which produced a string twice as\n // long as desired. I could change the schema instead\n // to accommodate a validation code twice as big, but\n // that is completely unnecessary and would break \n // the code of anyone upgrading from the 1.0 version.\n // Ridiculously unpasteable validation URLs are a \n // pet peeve of mine anyway.\n for ($i = 0; ($i < 8); $i++) {\n $guid .= sprintf(\"%02x\", mt_rand(0, 255));\n }\n return $guid;\n }", "title": "" }, { "docid": "bc170210fc99355994a8625eb830df70", "score": "0.75979215", "text": "protected function uniqueId()\n {\n\n return (string)time();\n }", "title": "" }, { "docid": "3cb862d08c6195aa18955f21184362cf", "score": "0.7597769", "text": "function generateKeyMicrotime () {\n $randStr = uniqid('GIORGI-');\n return $randStr;\n }", "title": "" }, { "docid": "ce7d5cf8ee08fc657dce93b3afce86dc", "score": "0.7580761", "text": "function guid(){\n mt_srand((double)microtime()*10000);// optional for php 4.2.0 and up.\n $charid = strtoupper(md5(uniqid(rand(), true)));\n $hyphen = chr(45);// “-”\n $uuid =\n substr($charid, 0, 8).$hyphen\n .substr($charid, 8, 4).$hyphen\n .substr($charid,12, 4);\n return $uuid;\n}", "title": "" }, { "docid": "29e5bca5ca05c422a5fa3462015e4069", "score": "0.7579823", "text": "public function uniqueId()\n {\n return \"hub-\".$this->bet->user->hub_id;\n }", "title": "" }, { "docid": "f380e99c7bbf73781717fba1e62560ae", "score": "0.75765014", "text": "protected static function generateToken() {\n return Uuid::generate();\n }", "title": "" }, { "docid": "c670a24d7aa478c2ced2fd277c5b4d6b", "score": "0.75758463", "text": "public function generateUniqueId()\n {\n return $this->nextUniqueId++;\n }", "title": "" }, { "docid": "f72e3f1fd602e6b3e6f08c8e4cd64a31", "score": "0.7574576", "text": "private function __genClientId() {\n return uniqid('mqttx_');\n }", "title": "" }, { "docid": "24ee8a283fcc7a04ae3cd8482d47c699", "score": "0.7570562", "text": "function getUniqueId() {\n\t\t\t// uniqid() prevents from simultanious access, within a microsecond.\n\t\t\treturn md5(uniqid(microtime()));\n\t\t}", "title": "" }, { "docid": "3df336e0f571bc2ed2b0d3adf2cba076", "score": "0.7560433", "text": "public function generateUniqueNumber()\n {\n return strtoupper(str_replace(\".\", \"\", uniqid(rand(), 1)));\n }", "title": "" }, { "docid": "553375b79ccdc7866596e00cf4f7e64c", "score": "0.75498277", "text": "function generateID_quick() {\n\t$id = str_replace('.', '', microtime(true));\n\n\t// Ensure that the id has a length of 14 chars\n\twhile(strlen($id)<14) $id .= 0;\n\n\t// Return id as a string. Don't convert the id to an integer\n\t// as 14 digits are too big for 32bit PHP versions.\n\treturn $id;\n\n}", "title": "" }, { "docid": "f7e9d30f008f518e8c9f057bcf1c6680", "score": "0.7549293", "text": "function gen_uuid() {\r\n\tif (function_exists ( 'com_create_guid' )) {\r\n\t\treturn com_create_guid ();\r\n\t} else {\r\n\t\tmt_srand ( ( double ) microtime () * 10000 ); //optional for php 4.2.0 and up.随便数播种,4.2.0以后不需要了。\r\n\t\t$charid = strtoupper ( md5 ( uniqid ( rand (), true ) ) ); //根据当前时间(微秒计)生成唯一id.\r\n\t\t$hyphen = chr ( 45 ); // \"-\"\r\n\t\t$uuid = '' . //chr(123)// \"{\"\r\n\t\t\t\tsubstr ( $charid, 0, 8 ) . $hyphen . substr ( $charid, 8, 4 ) . $hyphen . substr ( $charid, 12, 4 ) . $hyphen . substr ( $charid, 16, 4 ) . $hyphen . substr ( $charid, 20, 12 );\r\n\t\t//.chr(125);// \"}\"\r\n\t\treturn $uuid;\r\n\t}\r\n}", "title": "" }, { "docid": "159c4f0ecfb2c04d988b95fe27e0a374", "score": "0.7549233", "text": "public function generate_unique_id()\n {\n $this->unique_id = 'jnews_module_' . $this->get_post_id() . '_' . $this->manager->get_module_count() . '_' . uniqid();\n // need to increase module count\n $this->manager->increase_module_count();\n }", "title": "" }, { "docid": "77a997943f18e65bd4ef6a83cbdf2cf5", "score": "0.7544062", "text": "public function generateNewId()\n {\n return Uuid::uuid4();\n }", "title": "" }, { "docid": "3ebe683138d798a900562041e3b5be56", "score": "0.7541681", "text": "public function createId() : string\n {\n $uuid = $this->create();\n return $uuid->bytes;\n }", "title": "" }, { "docid": "ea9787ba449fa1f11d3bfacf3dc50911", "score": "0.75408334", "text": "function genSeqId() : string {\n\tif ( missing( 'hrtime' ) ) {\n\t\tlist( $us, $se ) = \n\t\t\t\\explode( ' ', \\microtime() );\n\t\t$t = $se . $us;\n\t} else {\n\t\t$t = ( string ) \\hrtime( true );\n\t}\n\t\n\treturn \n\t\\base_convert( $t, 10, 16 ) . \\genId();\n}", "title": "" }, { "docid": "5d21bb51f04ef922c23b18c717d35b92", "score": "0.75394905", "text": "public function getUniqueId(): string;", "title": "" }, { "docid": "5d21bb51f04ef922c23b18c717d35b92", "score": "0.75394905", "text": "public function getUniqueId(): string;", "title": "" }, { "docid": "68e4a2948078546b310599a6c2e9c28e", "score": "0.75342697", "text": "function generate_track_id()\n{\n // seed the better random number generator\n mt_srand((double)microtime() * 10000);\n // md5 a random string\n $char_id = strtoupper(md5(uniqid(rand(), true)));\n // define the hyphen character\n //$hyphen = chr(45);\n // create the guid\n //$guid = substr($char_id, 0, 8) . $hyphen . substr($char_id, 8, 4) . $hyphen . substr($char_id, 12, 4).$hyphen . substr($char_id, 16, 4) . $hyphen . substr($char_id, 20, 12);\n // return the guid here\n return $char_id;\n}", "title": "" }, { "docid": "02425f910d440ac4dd84b3a661d2e06a", "score": "0.75324607", "text": "function generate_guid() {\r\n\t$charid = strtoupper(md5(uniqid(mt_rand(), true)));\r\n\t$hyphen = chr(45);\r\n\t$uuid = chr(123)\r\n\t.substr($charid, 0, 8).$hyphen\r\n\t.substr($charid, 8, 4).$hyphen\r\n\t.substr($charid,12, 4).$hyphen\r\n\t.substr($charid,16, 4).$hyphen\r\n\t.substr($charid,20,12)\r\n\t.chr(125);\r\n\treturn $uuid;\r\n}", "title": "" } ]
2418e909dbfecd17f08d977ea2f7199e
Sets up the fixture, for example, opens a network connection. This method is called before a test is executed.
[ { "docid": "059f4785e3326807f23a8baa5904249e", "score": "0.0", "text": "protected function setUp() {\n $this->object = new Table;\n }", "title": "" } ]
[ { "docid": "aed5cd15bb4148fb00ebf31d3d7fadf8", "score": "0.7592144", "text": "protected function fixture_setup() {\r\n $this->service = SQLConnectionService::get_instance($this->configuration);\r\n test_data_setup($this->service);\r\n }", "title": "" }, { "docid": "ff0bc70fd50a3a3e3efadd9f9a187fbe", "score": "0.7169402", "text": "public function setUp() {\n\t\t$options = [\n\t\t\t'db' => [\n\t\t\t\t'adapter' => 'Connection',\n\t\t\t\t'connection' => $this->_connection,\n\t\t\t\t'fixtures' => $this->_fixtures\n\t\t\t]\n\t\t];\n\n\t\tFixtures::config($options);\n\t\tFixtures::save('db');\n\t}", "title": "" }, { "docid": "11b829d6c83d91cf47ed87ee85a61b88", "score": "0.69260496", "text": "protected function setUp()\n {\n $this->fixture = new Record();\n }", "title": "" }, { "docid": "c9ead9c4439fa776f50b763762926478", "score": "0.6909191", "text": "protected function setUp(): void\n {\n parent::setUp();\n\n $this->load();\n }", "title": "" }, { "docid": "a40f6e8581b825dc99762e59e258110e", "score": "0.68914413", "text": "protected function setUp()\n {\n\t global $sys_datacite_username, $sys_datacite_password, $sys_datacite_url ;\n\n\t $this->client = new DataCiteClient($sys_datacite_username, $sys_datacite_password);\n $this->client->setDataciteUrl($sys_datacite_url);\n }", "title": "" }, { "docid": "7d0c17f00e428f56ae4bb269f216bf96", "score": "0.6881708", "text": "protected function setUp()\n {\n $this->fixture = new Configuration();\n }", "title": "" }, { "docid": "cc05fe915c76a74d56ca7270604879a1", "score": "0.68143106", "text": "public function setUp() {\r\n // and doing it every test slows the tests down to a crawl\r\n $this->sharedFixture = new MovieLensDataSet(DATA_DIR);\r\n }", "title": "" }, { "docid": "90d215feb480608432c9596ded17b73e", "score": "0.6801411", "text": "public function setUp()\n {\n parent::setUp();\n $this->prepareForTests();\n }", "title": "" }, { "docid": "c09f0736b5a9062dcf0c16514d0e7d98", "score": "0.6752621", "text": "protected function setUp(): void\n {\n $servername = '18.222.31.30';\n $username = 'phpclient';\n $password = 'leftoverkillerphp';\n $dbname = 'leftover_killer';\n self::$RecipeModel = new GetRecipeDetails($servername, $username, $password, $dbname);\n }", "title": "" }, { "docid": "46327dd8139b4e02f5ab7b12536e5860", "score": "0.67525023", "text": "protected function setUp() {\n\n $this->client = new Client(['base_uri' => getenv('API_ADDR')]);\n $this->locIDs = $this->insertTestLocations();\n reuse_generateXML();\n }", "title": "" }, { "docid": "3cf93a3149c987974545d81ca2101980", "score": "0.6745424", "text": "public function setUp()\n {\n\n $this->db = Db::getActive();\n $this->response = Response::getActive();\n\n }", "title": "" }, { "docid": "e04dfa0440cfe68366968ae0c8e658da", "score": "0.673204", "text": "protected function setUp() {\n parent::setUp ();\n $this->storage = new Storage();\r\n $this->connectDB();\r\n $this->cleanDB();\r\n $this->createUser();\n $this->storage->connect($this->dbh);\n }", "title": "" }, { "docid": "1977ff6b814cb8abb7dacfbd910f4cf7", "score": "0.67129844", "text": "protected function setUp() {\r\n\t\tparent::setUp ();\r\n\t\t$this->storage = new Storage ( );\r\n\t\t$this->connectDB();\r\n\t\t$this->cleanDB ();\r\n\t\t$this->createUser ();\r\n\t\t$this->storage->connect ( $this->dbh );\n\t}", "title": "" }, { "docid": "b82748a2cd897d8b65f2ddd134ee40d7", "score": "0.6706576", "text": "public function setUp() {\n $this->fixture= new FreeTdsLookup($this->getClass()->getPackage()->getResourceAsStream('freetds.conf'));\n }", "title": "" }, { "docid": "6343c40d9c4dcf3fc67088e08f3b1086", "score": "0.67012876", "text": "public static function setUpBeforeClass(): void\r\n {\r\n self::$MemoryTestAsset = new MemoryTestAsset();\r\n\r\n self::$clients = self::$MemoryTestAsset->getClients();\r\n self::$ClientsStorage = self::$MemoryTestAsset->getClientsStorage();\r\n }", "title": "" }, { "docid": "f3b144baf27c06c129ffe4c3e8f379bf", "score": "0.6682984", "text": "public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}", "title": "" }, { "docid": "f3b144baf27c06c129ffe4c3e8f379bf", "score": "0.6682984", "text": "public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}", "title": "" }, { "docid": "f3b144baf27c06c129ffe4c3e8f379bf", "score": "0.6682984", "text": "public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}", "title": "" }, { "docid": "f3b144baf27c06c129ffe4c3e8f379bf", "score": "0.6682984", "text": "public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}", "title": "" }, { "docid": "f3b144baf27c06c129ffe4c3e8f379bf", "score": "0.6682984", "text": "public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}", "title": "" }, { "docid": "6b23699ddef6f5e5d1d4cbd5147edac2", "score": "0.6677766", "text": "protected function setUp()\n {\n parent::setUp();\n $config = new LocalConfiguration();\n $this->local = new Local($config);\n }", "title": "" }, { "docid": "82caa987eadd5e74b8526080a5224273", "score": "0.66769505", "text": "function setUp() {\n\t\t$this->originalIsRunningTest = self::$is_running_test;\n\t\tself::$is_running_test = true;\n\t\t\n\t\t// Remove password validation\n\t\t$this->originalMemberPasswordValidator = Member::password_validator();\n\t\t$this->originalRequirements = Requirements::backend();\n\t\tMember::set_password_validator(null);\n\t\tCookie::set_report_errors(false);\n\n\t\t$className = get_class($this);\n\t\t$fixtureFile = eval(\"return {$className}::\\$fixture_file;\");\n\t\t\n\t\t// Set up fixture\n\t\tif($fixtureFile) {\n\t\t\tif(substr(DB::getConn()->currentDatabase(),0,5) != 'tmpdb') {\n\t\t\t\t//echo \"Re-creating temp database... \";\n\t\t\t\tself::create_temp_db();\n\t\t\t\t//echo \"done.\\n\";\n\t\t\t}\n\n\t\t\t// This code is a bit misplaced; we want some way of the whole session being reinitialised...\n\t\t\tVersioned::reading_stage(null);\n\n\t\t\tsingleton('DataObject')->flushCache();\n\n\t\t\t$dbadmin = new DatabaseAdmin();\n\t\t\t$dbadmin->clearAllData();\n\t\t\t\n\t\t\t// We have to disable validation while we import the fixtures, as the order in\n\t\t\t// which they are imported doesnt guarantee valid relations until after the\n\t\t\t// import is complete.\n\t\t\t$validationenabled = DataObject::get_validation_enabled();\n\t\t\tDataObject::set_validation_enabled(false);\n\t\t\t$this->fixture = new YamlFixture($fixtureFile);\n\t\t\t$this->fixture->saveIntoDatabase();\n\t\t\tDataObject::set_validation_enabled($validationenabled);\n\t\t}\n\t\t\n\t\t// Set up email\n\t\t$this->originalMailer = Email::mailer();\n\t\t$this->mailer = new TestMailer();\n\t\tEmail::set_mailer($this->mailer);\n\t}", "title": "" }, { "docid": "045ca642c5eef13148eaf885beb139c3", "score": "0.66713774", "text": "protected function setUp() {\n\t\tparent::setUp();\n\n\t\t$this->object = new ControllerFixture([\n\t\t\t'module' => 'module',\n\t\t\t'controller' => 'controller',\n\t\t\t'action' => 'action',\n\t\t\t'args' => [100, 25]\n\t\t]);\n\n\t\t// Used by throwError()\n\t\tTiton::router()->initialize();\n\t}", "title": "" }, { "docid": "74a4f23521eaec0525ee0c06231b5aa6", "score": "0.66684914", "text": "protected function setUp(): void\n {\n \tparent::setUp();\n\n \t$this->authorize();\n\n \t$this->loadFixtures([\n \t\t'product'=>ProductFixture::class\n \t]);\n }", "title": "" }, { "docid": "f1e1837f53bced42276c7692e3af0046", "score": "0.6646735", "text": "protected function setUp()\n {\n $this->fixture = new NamespaceDescriptor();\n }", "title": "" }, { "docid": "24f987116c574e4677bd6c49ee03bd11", "score": "0.664446", "text": "protected function setUp(): void\n {\n $this->fixture = new TestSubjectDescriptor();\n }", "title": "" }, { "docid": "aa7dac7cdb55bb725a6e50604cd35a33", "score": "0.6644342", "text": "public function setUp()\n {\n $this->fixture = new Finder();\n }", "title": "" }, { "docid": "d60b065d7b5a812c32e9e4e1b7e4817b", "score": "0.66360325", "text": "function setUp() {\n\t\t$this->originalIsRunningTest = self::$is_running_test;\n\t\tself::$is_running_test = true;\n\t\t\n\t\t// i18n needs to be set to the defaults or tests fail\n\t\ti18n::set_locale(i18n::default_locale());\n\t\ti18n::set_date_format(null);\n\t\ti18n::set_time_format(null);\n\t\t\n\t\t// Remove password validation\n\t\t$this->originalMemberPasswordValidator = Member::password_validator();\n\t\t$this->originalRequirements = Requirements::backend();\n\t\tMember::set_password_validator(null);\n\t\tCookie::set_report_errors(false);\n\t\t\n\t\tif(class_exists('RootURLController')) RootURLController::reset();\n\t\tif(class_exists('Translatable')) Translatable::reset();\n\t\tVersioned::reset();\n\t\tDataObject::reset();\n\t\tif(class_exists('SiteTree')) SiteTree::reset();\n\t\tHierarchy::reset();\n\t\tif(Controller::has_curr()) Controller::curr()->setSession(new Session(array()));\n\t\t\n\t\t$this->originalTheme = SSViewer::current_theme();\n\t\t\n\t\tif(class_exists('SiteTree')) {\n\t\t\t// Save nested_urls state, so we can restore it later\n\t\t\t$this->originalNestedURLsState = SiteTree::nested_urls();\n\t\t}\n\n\t\t$className = get_class($this);\n\t\t$fixtureFile = eval(\"return {$className}::\\$fixture_file;\");\n\t\t$prefix = defined('SS_DATABASE_PREFIX') ? SS_DATABASE_PREFIX : 'ss_';\n\n\t\t// Set up fixture\n\t\tif($fixtureFile || $this->usesDatabase || !self::using_temp_db()) {\n\t\t\tif(substr(DB::getConn()->currentDatabase(), 0, strlen($prefix) + 5) != strtolower(sprintf('%stmpdb', $prefix))) {\n\t\t\t\t//echo \"Re-creating temp database... \";\n\t\t\t\tself::create_temp_db();\n\t\t\t\t//echo \"done.\\n\";\n\t\t\t}\n\n\t\t\tsingleton('DataObject')->flushCache();\n\t\t\t\n\t\t\tself::empty_temp_db();\n\t\t\t\n\t\t\tforeach($this->requireDefaultRecordsFrom as $className) {\n\t\t\t\t$instance = singleton($className);\n\t\t\t\tif (method_exists($instance, 'requireDefaultRecords')) $instance->requireDefaultRecords();\n\t\t\t\tif (method_exists($instance, 'augmentDefaultRecords')) $instance->augmentDefaultRecords();\n\t\t\t}\n\n\t\t\tif($fixtureFile) {\n\t\t\t\t$pathForClass = $this->getCurrentAbsolutePath();\n\t\t\t\t$fixtureFiles = (is_array($fixtureFile)) ? $fixtureFile : array($fixtureFile);\n\n\t\t\t\t$i = 0;\n\t\t\t\tforeach($fixtureFiles as $fixtureFilePath) {\n\t\t\t\t\t// Support fixture paths relative to the test class, rather than relative to webroot\n\t\t\t\t\t// String checking is faster than file_exists() calls.\n\t\t\t\t\t$isRelativeToFile = (strpos('/', $fixtureFilePath) === false || preg_match('/^\\.\\./', $fixtureFilePath));\n\t\t\t\t\tif($isRelativeToFile) {\n\t\t\t\t\t\t$resolvedPath = realpath($pathForClass . '/' . $fixtureFilePath);\n\t\t\t\t\t\tif($resolvedPath) $fixtureFilePath = $resolvedPath;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$fixture = new YamlFixture($fixtureFilePath);\n\t\t\t\t\t$fixture->saveIntoDatabase();\n\t\t\t\t\t$this->fixtures[] = $fixture;\n\n\t\t\t\t\t// backwards compatibility: Load first fixture into $this->fixture\n\t\t\t\t\tif($i == 0) $this->fixture = $fixture;\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->logInWithPermission(\"ADMIN\");\n\t\t}\n\t\t\n\t\t// Set up email\n\t\t$this->originalMailer = Email::mailer();\n\t\t$this->mailer = new TestMailer();\n\t\tEmail::set_mailer($this->mailer);\n\t\tEmail::send_all_emails_to(null);\n\t\t\n\t\t// Preserve memory settings\n\t\t$this->originalMemoryLimit = ini_get('memory_limit');\n\t}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66172016", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6616866", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6616866", "text": "protected function setUp() {}", "title": "" }, { "docid": "5dadbc0da92f2734cb156e0d14bc3a76", "score": "0.66167605", "text": "protected function setUp()\n {\n $this->request = new Request();\n $this->response = new Response();\n\n $this->request->load();\n $this->response->load();\n }", "title": "" }, { "docid": "5dadbc0da92f2734cb156e0d14bc3a76", "score": "0.66167605", "text": "protected function setUp()\n {\n $this->request = new Request();\n $this->response = new Response();\n\n $this->request->load();\n $this->response->load();\n }", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6616642", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6616642", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6616642", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6616642", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6616642", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6616642", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6616642", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6616642", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6616642", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6616642", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6616642", "text": "protected function setUp() {}", "title": "" } ]
04d82b943c7def2c112bd28f94f2cb1f
Checks whether the current user has capabilities to manage all options.
[ { "docid": "86e6433c2ec320d17bf032b67798ef5e", "score": "0.8067552", "text": "protected function check_manage_capability() {\n\t\treturn WPSEO_Capability_Utils::current_user_can( $this->get_manage_capability() );\n\t}", "title": "" } ]
[ { "docid": "61fe1baddeb5fb51716b7209cc92254c", "score": "0.76090235", "text": "public function check_capabilities() {\n\t\tif ( ! current_user_can( 'install_plugins' ) ) {\n\t\t\t// TODO: Error message.\n\t\t\treturn;\n\t\t}\n\t}", "title": "" }, { "docid": "91f50bdad0bdc34f740c2715a1977375", "score": "0.73523057", "text": "protected function userHasPermissions()\n {\n return current_user_can(apply_filters('gdpr/installer/permissions', 'manage_options'));\n }", "title": "" }, { "docid": "0244846b629bd24d964b769c931d612e", "score": "0.6983741", "text": "function _papi_current_user_is_allowed( $capabilities = array() ) {\n\t$capabilities = _papi_to_array( $capabilities );\n\tforeach ( _papi_to_array( $capabilities ) as $capability ) {\n\t\tif ( ! current_user_can( $capability ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}", "title": "" }, { "docid": "a4612ccc069524cf7d910d1d0486d830", "score": "0.68366134", "text": "public function check_capabilities();", "title": "" }, { "docid": "2b5dd2be51de1fb7b5ccb0a3c340273a", "score": "0.6827928", "text": "public static function current_user_can($capabilities, $needs_all = false) \n {\n $capabilities = is_array($capabilities) ? $capabilities : explode(',', $capabilities);\n \n foreach ($capabilities as $capability) \n {\n $user_can = current_user_can(trim(strtolower($capability)));\n \n if ($needs_all && !$user_can)\n { \n return false;\n }\n elseif (!$needs_all && $user_can)\n {\n return true;\n }\n }\n \n return $needs_all;\n }", "title": "" }, { "docid": "dcab6e1a379cc07ac70eb024da4e5575", "score": "0.67599255", "text": "public function has_capability() {\n\t\treturn is_user_logged_in();\n\t}", "title": "" }, { "docid": "e7596044a73fb74790fb807df5fc0139", "score": "0.6747216", "text": "function has_cap() {\r\n return has_capability($this->get_cap(), poasassignment_model::get_instance()->get_context());\r\n }", "title": "" }, { "docid": "0fa6aac31086b17e7efbe2e95eddce65", "score": "0.65640134", "text": "public static function wcap_check_user_can_manage_woocommerce() {\n // Check the user capabilities\n if ( ! current_user_can( 'manage_woocommerce' ) ) {\n wp_die( __( 'You do not have sufficient permissions to access this page.', 'woocommerce-ac' ) );\n }\n }", "title": "" }, { "docid": "ab5912606415bd85d03785d3f8463751", "score": "0.6479914", "text": "function has_lecture_caps( $user_id ) {\r\n $is_ok = true;\r\n \r\n //Treat super admins\r\n if( is_super_admin( $user_id ) ) {\r\n $this->add_caps( $user_id );\r\n }\r\n \r\n $user = new WP_User( $user_id );\r\n foreach( $this->caps as $c )\r\n if ( !$user->has_cap( $c ) )\r\n $is_ok = false;\r\n \r\n if( !get_option( 'bpsp_allow_only_admins' ) )\r\n if( !bp_group_is_admin() )\r\n $is_ok = false;\r\n \r\n return $is_ok;\r\n }", "title": "" }, { "docid": "56c0c938fce0f30407b2639c3de395f7", "score": "0.64656734", "text": "public function hasPerms()\n {\n $space = $this->getSpace();\n if($space)\n return $space->isAdmin();\n\n $user = Yii::$app->user;\n return $user->isAdmin();\n }", "title": "" }, { "docid": "f933ba75c16c84429e2e88f7261c5c27", "score": "0.64189494", "text": "private function is_user_authorized() {\n\n\t\t$is_user_authorized = current_user_can( 'manage_options' );\n\t\t$restriction = get_option( 'wp101_admin_restriction' );\n\n\t\tif ( ! empty( $restriction ) ) {\n\t\t\t$is_user_authorized = get_current_user_id() == $restriction;\n\t\t}\n\n\t\treturn apply_filters( 'wp101_is_user_authorized', $is_user_authorized, self::$instance );\n\t}", "title": "" }, { "docid": "be7a657a3b347b3c2439887c4fcc34b1", "score": "0.6344384", "text": "public function can_request() {\n\t\treturn current_user_can( 'jetpack_admin_page' );\n\t}", "title": "" }, { "docid": "80cd26cc11702bb989ef034bf324e1dd", "score": "0.63039476", "text": "public function can_request() {\n\t\treturn current_user_can( 'jetpack_manage_modules' );\n\t}", "title": "" }, { "docid": "eae30de5d98512e993bd31fb52640069", "score": "0.6234778", "text": "function has_capability($required = false) {\n if ($required) {\n require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));\n }\n return has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));\n }", "title": "" }, { "docid": "c6c08ea77091bd34e078712afb631869", "score": "0.6196897", "text": "public function user_can($capability) {\n \n if (isset($this->user_to_edit->caps[$capability])) {\n return true;\n }\n foreach ($this->user_to_edit->roles as $role) {\n if ($role===$capability) {\n return true;\n }\n if (!empty($this->roles[$role]['capabilities'][$capability])) {\n return true;\n }\n }\n \n return false; \n }", "title": "" }, { "docid": "e918d2397055704d1dab197d0178f6a4", "score": "0.6187486", "text": "function crb_user_is($user_id, $capability) {\n\tglobal $wpdb;\n\t$all_capabilities = get_user_meta($user_id, $wpdb->prefix . 'capabilities', true);\n\treturn isset($all_capabilities[$capability]);\n}", "title": "" }, { "docid": "b1ae8a1587b1228b714294daacfb6c82", "score": "0.6123889", "text": "public function HasAdminPrivileges()\n\t{\n\t\treturn ($this->adminPrivileges > 0);\n\t}", "title": "" }, { "docid": "6c22ea368f97ff71b8d583757d7481bb", "score": "0.611426", "text": "function current_user_can_purchase_addons() {\n\treturn current_user_can( Admin\\get_addon_capability() );\n}", "title": "" }, { "docid": "bcabea84f324ecd39da2b16e9931dd0f", "score": "0.61068827", "text": "public function authorize()\n {\n $user = $this->user();\n\n return $user->isAdmin() || $user->hasKey('get-choices') || $user->isEntrant();\n }", "title": "" }, { "docid": "7ca7ca9163f6b3c1a63b3dc71acb2328", "score": "0.6062044", "text": "public function show_theme_options() {\n\t\treturn current_user_can( 'edit_theme_options' );\n\t}", "title": "" }, { "docid": "2def7915ef95cc6bc797d0a5891df5ff", "score": "0.5987831", "text": "public function isAvailable()\n\t{\n\t\treturn !empty($this->getMenuItems());\n\t}", "title": "" }, { "docid": "7f4b40754b1ce305cfd0052f765d05f2", "score": "0.59773517", "text": "public function can_grade() {\n return has_capability('mod/euroaspire:grade', $this->get_context());\n }", "title": "" }, { "docid": "67a06811979cd5c4fcb437910129d313", "score": "0.59595466", "text": "public function check_requirements() {\n\t\t// bail early if pluginmeets requirements\n\t\tif ( $this->meets_requirements() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Add a dashboard notice.\n\t\tadd_action( 'all_admin_notices', array( $this, 'requirements_not_met_notice' ) );\n\n\t\t// Deactivate our plugin.\n\t\tadd_action( 'admin_init', array( $this, 'deactivate_me' ) );\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "f9dcec62d63a931fb0f1ec69a492ec22", "score": "0.59523594", "text": "public function has_capability($flag);", "title": "" }, { "docid": "f1571f272ff023e87e888e486699a8e7", "score": "0.59260803", "text": "public function authorize()\n {\n return $this->user()->can('manage-products');\n }", "title": "" }, { "docid": "a2ec621fcb7b0733776e2a083eaf46bc", "score": "0.5917342", "text": "public function is_admin_or_manager() {\n global $USER;\n if (is_siteadmin()) {\n return true;\n }\n\n $systemcontext = context_system::instance();\n // Checking two capabilities here.\n // As manager can manage the roles and manager the users too.\n if (has_capability('moodle/role:manage', $systemcontext) || has_capability('moodle/user:create', $systemcontext)) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "363077b098490caca5c42da200b292e6", "score": "0.591708", "text": "public function allow_admins(){\n\t\t$caps = parent::get_caps();;\n\t\t\n\t\t// give permission to administrator to change slider settings\n\t\tif( current_user_can('manage_options') ){\n\t\t\tglobal $wp_roles;\n\t\t\tforeach ( $caps as $cap ){\n\t\t\t\tif( !current_user_can($cap) ){\n\t\t\t\t\t$wp_roles->add_cap('administrator', $cap);\t\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t}\t\n\t}", "title": "" }, { "docid": "e47e5ab519229398287c594e0750a68c", "score": "0.5910873", "text": "public function can($capabilities): bool\n {\n return $this->capabilities->contains('*')\n || collect($capabilities)->every(function ($capability) {\n return $this->capabilities->contains($capability);\n });\n }", "title": "" }, { "docid": "553c2421ffa4899c1f1a721f23e34846", "score": "0.59062207", "text": "private function allowed() {\n\t\tif (array_key_exists($this->controller, $this->sections['auth']) &&\n\t\t\tin_array($this->method, $this->sections['auth'][$this->controller])) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// Allowed sections for special user types\n\t\tif (array_key_exists($_SESSION['user']['userType'], $this->sections) && \n\t\t\tarray_key_exists($this->controller, $this->sections[$_SESSION['user']['userType']]) &&\n\t\t\tin_array($this->method, $this->sections[$_SESSION['user']['userType']][$this->controller])) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t\t//die('Permissions validated...<br/>');\n\t}", "title": "" }, { "docid": "209d1157c5603e5db83273dfa53fb28a", "score": "0.5898684", "text": "function wpsc_is_store_admin() {\n\treturn current_user_can( apply_filters( 'wpsc_store_admin_capability', 'manage_options' ) );\n}", "title": "" }, { "docid": "8b3c96e77beece73f85de1002690787d", "score": "0.5886377", "text": "public function authorize()\n {\n return $this->user()->hasAdministrationGroup() || $this->user()->isAdministrator();\n }", "title": "" }, { "docid": "946909ec2949bfbf7597f3baf360cc33", "score": "0.5886052", "text": "function upstream_admin_permissions($capability = null)\n{\n\n /*\n * Set the return variable that can be overwritten after all checks\n */\n $return = false;\n\n /*\n * These guys can do whatever they want\n */\n if (upstream_project_owner_id() == upstream_current_user_id() ||\n current_user_can('upstream_manager') ||\n current_user_can('administrator')) {\n $return = true;\n }\n\n /*\n * If the user has the capability\n */\n if (isset($capability) && ! empty($capability)) {\n if (current_user_can($capability)) {\n $return = true;\n }\n }\n\n /*\n * If project status is closed, block all fields (except for status) from being edited/deleted\n */\n if ((isset($capability) && $capability != 'project_status_field') &&\n upstream_project_status_type() == 'closed') {\n $return = false;\n }\n\n return apply_filters('upstream_admin_permissions', $return);\n}", "title": "" }, { "docid": "37f73486224b697f21239ae6138a0dae", "score": "0.5885326", "text": "protected function can_manage()\n {\n return $this->_can_i('manage');\n }", "title": "" }, { "docid": "beaa9c5622fdd8de40f9d4ad16caf721", "score": "0.58737844", "text": "public function authorize()\n {\n return $this->user()->can('create', Option::class);\n }", "title": "" }, { "docid": "10b660de3bf21198f91a86d3d59eb54d", "score": "0.58691907", "text": "static function is_needed() : bool {\n\n return \\is_admin() ? true : false;\n\n }", "title": "" }, { "docid": "8782a846d28640aae288b29ac36bc82b", "score": "0.5852367", "text": "public function checkSanityOptions() {\n\t\tforeach ( $this->reqd_options as $reqd_option ) {\n\t\t\tif ( !in_array( $reqd_option, array_keys( $this->options ))) {\n\t\t\t\treturn false;\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "77a1156b6ba95b5c4d614d5bf7bf5a07", "score": "0.58336973", "text": "public function can_submit() {\n return has_capability('mod/euroaspire:submit', $this->get_context());\n }", "title": "" }, { "docid": "d055b7ee4dc1c0475015bbc23a2681aa", "score": "0.5831567", "text": "public function has_any_rights_in_module()\n {\n // Check for inactive auth system\n if (!$this->is_auth_active())\n {\n return true;\n } // if\n\n if (!is_array($this->m_paths))\n {\n return false;\n } // if\n\n return !!count($this->m_paths);\n }", "title": "" }, { "docid": "3ac0837ed332b485c517a08af83c8f14", "score": "0.5830605", "text": "function is_available() {\n\t\tif ( function_exists( 'is_checkout_pay_page' ) && is_checkout_pay_page() ) {\n\t\t\treturn parent::is_available();\n\t\t}\n\n\t\t$login_app_enabled = ( 'yes' === $this->enable_login_app );\n\t\t$standard_mode_ok = ( ! $login_app_enabled && ! empty( $this->reference_id ) );\n\t\t$login_app_mode_ok = ( $login_app_enabled && ! empty( $this->access_token ) );\n\n\t\treturn ( parent::is_available() && ( $standard_mode_ok || $login_app_mode_ok ) );\n\t}", "title": "" }, { "docid": "59c9b442588704f065ed87a3c1952a58", "score": "0.58116627", "text": "abstract protected function get_manage_capability();", "title": "" }, { "docid": "d29eedc42d87eefd99e17ab09d5ff0ff", "score": "0.58045506", "text": "protected function _isAllowed()\n\t{\n\t\treturn $this->_authorization->isAllowed('Bss_PushNotification::notification_manage');\n\t}", "title": "" }, { "docid": "22f69eee9487efaf86b341e1cb5fa7d3", "score": "0.57990277", "text": "public function can_user_aggregate() {\n\t\t/**\n\t\t * Minimum capability that a user must have to detach or sync an object.\n\t\t *\n\t\t * Defaults to 'edit_others_posts' to give editors and up access to\n\t\t * the capability.\n\t\t *\n\t\t * @param string Capability.\n\t\t */\n\t\t$permission_level = apply_filters( 'extendable-aggregator-sync-permission-level', 'edit_others_posts' );\n\n\t\treturn current_user_can( $permission_level );\n\t}", "title": "" }, { "docid": "b4c7acc6ba896a33223f825477c115d8", "score": "0.57951", "text": "public function manage(User $user)\n {\n return isset(PolicyService::getPermissions($user)['manage-job_applications']);\n }", "title": "" }, { "docid": "1d2cba60b9a6dc17607288db81560d7d", "score": "0.57897955", "text": "public function authorize()\n {\n return auth()->user()->can('allocate unit levels to class levels');\n }", "title": "" }, { "docid": "0f060da48d251aafa9b146ff632289b8", "score": "0.57865834", "text": "function wp_admin_access(){\n if((defined( 'DOING_AJAX' ) && DOING_AJAX) || (defined('IFRAME_REQUEST') && IFRAME_REQUEST))\n return;\n \n $val = vibe_get_option('wp_admin_access');\n $cap = apply_filters('wplms_admin_access_capabilities',array(1=>array('edit_posts'),2=>array('manage_options')));\n $flag = 1;\n if(!empty($val) && !empty($cap[$val])){\n foreach($cap[$val] as $value){\n if(!current_user_can($value)){ \n $flag=0;\n break;\n }\n }\n }\n if(empty($flag)){\n wp_redirect(home_url());\n exit;\n }\n }", "title": "" }, { "docid": "65b80d713de3bc6144b4d095e765ed8d", "score": "0.5779626", "text": "private function checkPerm(): bool\n {\n return UserCore::auth();\n }", "title": "" }, { "docid": "ed087347fa830f89d24808e8eb465fed", "score": "0.5776955", "text": "public function can_configure() : bool {\n return has_capability('moodle/course:configurecustomfields', $this->get_configuration_context());\n }", "title": "" }, { "docid": "77c54441510e85c21ea29fd21fd2f721", "score": "0.5774348", "text": "public function isAllowed($repack)\n {\n return $repack->checkPrivilege('addon_management');\n }", "title": "" }, { "docid": "75d15a4baf22bd4d6d1d7669ea02d6c7", "score": "0.57686", "text": "private function permission()\r\n\t\t{\r\n\r\n\t\t\tglobal $shortname;\r\n\r\n\t\t\t$cabs = et_get_option( $shortname . '_ddpl_user_role', false );\r\n\r\n\t\t\tif ( 'on' != et_get_option( $shortname . '_ddpl_user_check', false ) )\r\n\t\t\t{\r\n\r\n\t\t\t\tif ( ( false === $cabs || '' === $cabs ) && current_user_can( 'administrator' ) )\r\n\t\t\t\t\treturn true;\r\n\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\r\n\t\t\t\t\t$roles = explode( ',', esc_attr( str_replace( ' ', '', $cabs ) ) );\r\n\r\n\t\t\t\t\tforeach ( $roles as $role )\r\n\t\t\t\t\t{\r\n\r\n\t\t\t\t\t\tif ( '' == $role )\r\n\t\t\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t\t\tif ( current_user_can( $role ) )\r\n\t\t\t\t\t\t{\r\n\r\n\t\t\t\t\t\t\t$bool = true;\r\n\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t} // end if\r\n\t\t\t\t\t} // end foreach\r\n\r\n\t\t\t\t\tif ( isset( $bool ) )\r\n\t\t\t\t\t\treturn true;\r\n\r\n\t\t\t\t} // end else\r\n\t\t\t} // end if\r\n\r\n\t\t\treturn false;\r\n\r\n\t\t}", "title": "" }, { "docid": "c0d7f55da160e86c93c248ce9bfe199a", "score": "0.5768265", "text": "public function canGainAdminAccess(): bool\n {\n return !empty($_SESSION['adminId']);\n }", "title": "" }, { "docid": "1804c5c0a6b82cbd76ca17ec6678b43f", "score": "0.5752005", "text": "function isEnabled(){\n if(!$this->getConf('forusers') && $_SERVER['REMOTE_USER']) return false;\n return true;\n }", "title": "" }, { "docid": "d30976832120ef54acec97595d5c7134", "score": "0.5748589", "text": "public function hasMenuOptions()\n {\n return $this->app['extensions']->hasMenuOption();\n }", "title": "" }, { "docid": "0edfd4ac6c6bddcea5fac1bc90644015", "score": "0.5738769", "text": "function require_cap() {\r\n return require_capability($this->get_cap(), poasassignment_model::get_instance()->get_context());\r\n }", "title": "" }, { "docid": "4df731ccae9691ed5c67dae3caeb456a", "score": "0.57384306", "text": "public function isInstalled(){\r\n $this->load();\r\n return ( ! empty($this->options) );\r\n }", "title": "" }, { "docid": "1ed1ab1ba275ea82126ef1a3ad906fc0", "score": "0.57383895", "text": "function check_for_privileges(){\n\t\tglobal $config, $errors;\n\n if (false === $privilege = $this->data->get_privileges_of_user($this->auth[\"uname\"], $this->auth[\"udomain\"], \n array('SUPER','RESELLER', 'ADMIN','USER'), $errors)) return false;\n\n switch ($privilege){\n case 'SUPER':\n $this->auth[\"perm\"]=\"USER,ADMIN,RESELLER,SUPER\";\n\t break;\n\n case 'RESELLER':\n $this->auth[\"perm\"]=\"USER,ADMIN,RESELLER\";\n break;\n\n case 'ADMIN':\n $this->auth[\"perm\"]=\"USER,ADMIN\";\n break;\n case 'USER':\n $this->auth[\"perm\"]=\"USER\";\n break;\n\n }//switch\n\n\n\n }", "title": "" }, { "docid": "f5f8f19c8f277e1d64d54368abd304b8", "score": "0.57362574", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Amasty_Meta::config');\n }", "title": "" }, { "docid": "b08b2c5db298ff942d013ef57c7264bc", "score": "0.5734926", "text": "function is_purchasable() {\r\n\t\t// TODO: needs to check more criteria, currently only check if this course is required enrollment\r\n\t\treturn $this->required_enroll == 'yes';\r\n\t}", "title": "" }, { "docid": "2e77b43703007feafa110dd6580bfdc1", "score": "0.57153505", "text": "private function hasPrivilege(): bool\n {\n return false;\n }", "title": "" }, { "docid": "40811c781f6e8413ec37bc35a95683e3", "score": "0.57143867", "text": "protected function canSelectUser(): bool\n {\n if (!$this->isGranted('view_other_timesheet') || !$this->isGranted('view_other_reporting')) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "1285a3b5a58903233be3dd12581b68cc", "score": "0.57103586", "text": "public function checkAccess()\n {\n return $this->backendUser->isAdmin() || $this->backendUser->getTSConfigVal('options.clearVarnishCache');\n }", "title": "" }, { "docid": "b4e183c1b5a8cb7f6eba58303a2920e7", "score": "0.57073283", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed(self::ALLOWED_SM_VENDORS);\n }", "title": "" }, { "docid": "2f7c4ddfad0d626953dd5812e54b727a", "score": "0.57019496", "text": "public function authorize()\n {\n return $this->user()->can('create offer') || $this->user()->can('edit offer');\n }", "title": "" }, { "docid": "74d463daf2a32a8f434bec34dbd10a77", "score": "0.5701844", "text": "function has_ability_to_view() {\r\n if(!$this->has_satisfying_parameters())\r\n return false;\r\n return $this->has_cap();\r\n }", "title": "" }, { "docid": "1ff9af5598cf44a57f656e0ad1dbefa5", "score": "0.5686604", "text": "public function userHasAccess() {\n\n return $this->_wwof_permissions->userHasAccess();\n\n }", "title": "" }, { "docid": "5e1abbe5cd9e191be6364ab9a7229940", "score": "0.5686217", "text": "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')\n ->isAllowed('temando/configuration/wizard');\n }", "title": "" }, { "docid": "2c697dff3b9062aa1edde52d0186ce5b", "score": "0.56832266", "text": "public function is_admin() {\n\t\treturn current_user_can('administrator');\n\t}", "title": "" }, { "docid": "1847b58b6dcea10eab7e853821aea8f4", "score": "0.5674776", "text": "public function validate_admin() {\n if (!current_user_can( 'manage_options' )) {\n header('HTTP/1.0 403 Forbidden');\n $this->to_json_result(array(\n \"success\" => false,\n \"message\" => \"Unauthorized\"\n ));\n exit;\n }\n }", "title": "" }, { "docid": "b677efa111aa9d10ef0b0b320b540d2a", "score": "0.5673514", "text": "public function isOptIn(){\n $response = $this->getMerchant();\n return isset($response['merchant_preferences']['opt_in']) && $response['merchant_preferences']['opt_in'];\n }", "title": "" }, { "docid": "52625e40f838bd458e88be67f2a57a44", "score": "0.56691945", "text": "public static function permission_callback( \\WP_REST_Request $request ) {\n\t\t// return \\current_user_can( 'manage_options' ); // User ID is 0\n\t\treturn true;\n\t}", "title": "" }, { "docid": "dd25b58b75649269e0d14238d16f1e8f", "score": "0.56606764", "text": "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('bs_evaluation/setting');\n }", "title": "" }, { "docid": "b0e145907aeda2e183c8aaf531ce51d6", "score": "0.5656874", "text": "protected function is_supported() {\n\n\t\t$gateways = $this->get_tokenized_gateways();\n\n\t\t/**\n\t\t * Filter whether the user profile section should be displayed for this gateway plugin.\n\t\t *\n\t\t * @since 4.3.0\n\t\t * @param bool $display\n\t\t * @param \\SV_WC_Payment_Gateway_Plugin $plugin the gateway plugin instance\n\t\t */\n\t\treturn apply_filters( 'wc_payment_gateway_' . $this->get_plugin()->get_id() . '_display_user_profile', ! empty( $gateways ), $this->get_plugin() );\n\t}", "title": "" }, { "docid": "139c3e606ec02d2cbc8c9bb0e3bf6fdb", "score": "0.56545043", "text": "function user_can_submit($user)\r\n {\r\n // Make sure a user is loaded\r\n if (!$user->is_user_loaded()) return false;\r\n // Login the current user, and check capabilities\r\n if (!$user->login()) return false;\r\n return has_capability('mod/assignment:submit', get_context_instance(CONTEXT_MODULE, $this->cm->id));\r\n }", "title": "" }, { "docid": "bee748b282f5419161e5f6308fc3eb92", "score": "0.56527", "text": "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('bs_misc/subsubtask');\n }", "title": "" }, { "docid": "4954f3b83a74654d37b5b7eb6f949b50", "score": "0.5647044", "text": "public function authorize()\n {\n return \\site()->isManage(auth()->user());\n }", "title": "" }, { "docid": "6447edf68eebfee11125b81bd83d2008", "score": "0.5646556", "text": "public function test_check_can_manage_data_registry_without_cap_system() {\n $this->resetAfterTest();\n\n $user = $this->getDataGenerator()->create_user();\n $this->setUser($user);\n\n $this->expectException(required_capability_exception::class);\n api::check_can_manage_data_registry(\\context_system::instance()->id);\n }", "title": "" }, { "docid": "926c647f06c22671ab1094639b977caf", "score": "0.5642867", "text": "function permit_current_user() {\n return $this->user_is_authorized($this->current_user);\n }", "title": "" }, { "docid": "fe60382d3cfcbb94f6502aa56eac3968", "score": "0.56377333", "text": "protected function _isAllowed()\n {\n return $this->_helper()->isAllowed();\n }", "title": "" }, { "docid": "c1e4e50ce47cfbaf63ffccf105c34d21", "score": "0.5634445", "text": "public function authorize()\n {\n /** @var User $user */\n $user = $this->user();\n\n return $user->isAbleTo('payment-record.manage') || $user->club;\n }", "title": "" }, { "docid": "311b237322c7f244b740ea7154786218", "score": "0.5615723", "text": "function can_do_ajax () {\r\n\r\n\tif (!class_exists (BIMBLER_AJAX_CLASS)) {\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tif (!current_user_can ('manage_options')) {\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\treturn true;\r\n}", "title": "" }, { "docid": "78d0814861b892bee3535194f50ee6c9", "score": "0.5615463", "text": "public function test_check_can_manage_data_registry_without_cap_own_user() {\n $this->resetAfterTest();\n\n $user = $this->getDataGenerator()->create_user();\n $this->setUser($user);\n\n $this->expectException(required_capability_exception::class);\n api::check_can_manage_data_registry(\\context_user::instance($user->id)->id);\n }", "title": "" }, { "docid": "68292180ec3a7f79482fa50fee3222f4", "score": "0.5609318", "text": "public function isSystemAdmin()\n {\n $user = Auth::user();\n\n if ($user->user_role_id == 1) {\n\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "5793ce3adac952b36ecf74ad2dba0cd3", "score": "0.560421", "text": "public function capability_required($for = 'user') {\n\t\t$capability_required = ('user' == $for) ? 'read' : 'create_users';\n\t\treturn apply_filters('keyy_capability_required', $capability_required, $for);\n\t}", "title": "" }, { "docid": "f9ceeb8254f57757f630ca9401c7a11c", "score": "0.55983776", "text": "public function authorize()\n {\n return $this->user()->isManager();\n }", "title": "" }, { "docid": "ac1e16cf6dc75bd5f2bb9a5e3c3bfc5f", "score": "0.5592763", "text": "public function credentials_available() {\n\n\t\t$ok_to_continue = parent::credentials_available();\n\n\t\tif ( $ok_to_continue ) {\n\t\t\tif ( empty( wpcd_get_early_option( 'vpn_' . $this->get_provider_slug() . '_ipv4' ) ) ) {\n\t\t\t\t$ok_to_continue = false;\n\t\t\t}\n\t\t}\n\n\t\treturn $ok_to_continue;\n\n\t}", "title": "" }, { "docid": "1b8c29754ad99351d3541b2c751c6a5c", "score": "0.55926144", "text": "public function isAdmin()\n {\n $model = $this->loadUser($this->id);\n if(!$model) return false;\n\n return in_array(mb_strtolower($model->getKlan()), static::$_admins);\n }", "title": "" }, { "docid": "81bb1c4f609b73abb9cd9e5b604e7290", "score": "0.55886525", "text": "public function authorize()\n {\n // Проверка прав доступа\n return \\Gate::any([User::ABILITY_ADMIN, User::ABILITY_MANAGER]);\n }", "title": "" }, { "docid": "92a1f7448defe468a221c0b9ea0a569e", "score": "0.5584086", "text": "public function canManagePermissions()\n\t{\n\t\treturn false;\n\t}", "title": "" }, { "docid": "6b7366a3a0ce088aa7c68b9c733d4639", "score": "0.55757415", "text": "protected function can_manage_shortcuts()\n {\n return $this->_can_i('manage_shortcuts');\n }", "title": "" }, { "docid": "0d050863077c4760c83b031afb4825b7", "score": "0.55747396", "text": "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('bs_work/meda');\n }", "title": "" }, { "docid": "48a1e3b64bafb798805aac3b1ab30f4c", "score": "0.55745876", "text": "protected function passesAuthorization()\n {\n return $this->hasNestedMenu();\n }", "title": "" }, { "docid": "9042126c32ae007c71b89b1cdcb140fd", "score": "0.55657005", "text": "public function authorize()\n {\n /** @var User|null $user */\n $user = $this->user();\n\n return null !== $user && ($user->isShop() || $user->isUser() || $user->isAdmin());\n }", "title": "" }, { "docid": "05590fc9a3eaa9395069921dc992b629", "score": "0.55652976", "text": "public function authorize()\n {\n //Todo check is admin\n return $this->user() != null;\n }", "title": "" }, { "docid": "3a259787e0a70ea6e79a9b58bb35d957", "score": "0.5564584", "text": "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('system/config');\n }", "title": "" }, { "docid": "6e5ba6a4b07c0641a8ae65f4195d86bf", "score": "0.556339", "text": "function can_he_do_it($types,$user){\n\t\tif(!is_array($types)){\n\t\t\t$types = array($types);\n\t\t}\n\t\tforeach($types as $type){\n\t\t\tif($type < 1){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t$pool = DatabasePool::instance();\n\t\t\t$list = $pool->query('GET_PRIVILEGE',$user);\n\t\t\tDatabasePool::kill();\n\t\t\tif($list[0][0]{$type-1} === \"1\"){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "f0bffbb63fcf1701c1b86068b0421687", "score": "0.55604655", "text": "public function authorize()\n {\n return auth()->user()->can('admin_settings');\n }", "title": "" }, { "docid": "9067272ccc475ab86fd6b0166255c3cf", "score": "0.5558546", "text": "function canGrantAll()\n {\n $privilege_setting = atkconfig(\"auth_grantall_privilege\");\n\n if ($privilege_setting!=\"\")\n {\n global $g_securityManager;\n list($mod, $node, $priv) = explode(\".\", $privilege_setting);\n return $g_securityManager->allowed($mod.\".\".$node, $priv);\n }\n return false;\n }", "title": "" }, { "docid": "3fa3a741d4d18238163b5b61a720949a", "score": "0.55576485", "text": "function security()\n\t{\n\t\t//If the user can not manage options we will die on them\n\t\tif(!current_user_can($this->access_level))\n\t\t{\n\t\t\twp_die(__('Insufficient privileges to proceed.', $this->identifier));\n\t\t}\n\t}", "title": "" }, { "docid": "f0e47f932242c2117e1aaeaf08e1d5de", "score": "0.5545", "text": "public function test_check_can_manage_data_registry_without_cap_default() {\n $this->resetAfterTest();\n\n $user = $this->getDataGenerator()->create_user();\n $this->setUser($user);\n\n $this->expectException(required_capability_exception::class);\n api::check_can_manage_data_registry();\n }", "title": "" }, { "docid": "ab815163112de7babc8a5cf3a66e0060", "score": "0.55444217", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Webkul_Marketplace::product');\n }", "title": "" }, { "docid": "ab815163112de7babc8a5cf3a66e0060", "score": "0.55444217", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Webkul_Marketplace::product');\n }", "title": "" } ]
16b5fb7db43220d770559747d4f8efdf
Returns object as an html formatted string
[ { "docid": "e93981748361e8f2a3f658a1d4a68ce5", "score": "0.0", "text": "public static function to_html( array $print_array ) {\n /*\n array_map($print_array, function($o) {\n if(!($o instanceof word)) throw new Exception();\n });\n */\n shuffle($print_array);\n $out = \"<select class='browser-default'>\";\n foreach( $print_array as $row ) {\n $out .= sprintf(\"<option value='%s'>%s</option>\",$row['word_id'],$row['word_name']);\n }\n $out .= \"</select>\";\n return $out;\n }", "title": "" } ]
[ { "docid": "c4fe94d1edce071dc39bb86cdcc82819", "score": "0.76541024", "text": "public abstract function toHTML();", "title": "" }, { "docid": "2925c8f1be8f5951c07fd22cc8352b95", "score": "0.76131785", "text": "public function __toString()\n {\n return $this->saveHTML();\n }", "title": "" }, { "docid": "70bba988a9ce9349ae92d1be4b5c7457", "score": "0.7600099", "text": "public function __toString() {\r\n return $this->toHTML();\r\n }", "title": "" }, { "docid": "3fdc464e10a94d6b6f668fb939f3dfdb", "score": "0.75163823", "text": "public function __toString()\n {\n $this->formatOutput = TRUE;\n\n return $this->saveHTML();\n }", "title": "" }, { "docid": "b8f043b02029a48895560b3ff7ed9005", "score": "0.749309", "text": "public function __toString() {\n return $this->html();\n }", "title": "" }, { "docid": "270e60011c099a37c45626bbbb7739a0", "score": "0.74929327", "text": "function html()\n {\n $fields = self::get_public_properties($this);\n\n $html = '<div class=\"' . get_called_class() . '\">';\n foreach ($fields as $key => $value) {\n $html .= \"\\n\" . '<span class=\"' . $key . '\">' . $value . '</span>';\n }\n $html .= \"\\n</div>\";\n return $html;\n }", "title": "" }, { "docid": "7ca88a76aabf7949bf31842381b70c26", "score": "0.74846995", "text": "public function __toString()\n {\n return $this->html();\n }", "title": "" }, { "docid": "37dd8cc56ca169d16d7613cb2f51f4ec", "score": "0.7469358", "text": "public function __toString ()\n {\n return $this->to_html();\n }", "title": "" }, { "docid": "c7ca57ff1498b209a2c7129dd8ad58ee", "score": "0.74682564", "text": "public function __toString() {\n\t\treturn $this->html();\n\t}", "title": "" }, { "docid": "0373941ca0dbc04ac83482c2db329215", "score": "0.74348074", "text": "public function toHTML() {\n return $this->format(true);\n }", "title": "" }, { "docid": "d8ae3cdea7a85c9b8797dc0fa59b03f9", "score": "0.7433727", "text": "public function toHTML()\n {\n }", "title": "" }, { "docid": "039f6937d9f6dcaa687112dd0b3940c2", "score": "0.7426471", "text": "public function toHtml()\n\t{\n\t\tLog::info(sprintf('Converting %s object to HTML', $this->data['name']));\n\n\t\t$html = '<' . $this->data['tag'];\n\n\t\t//Check for an ID\n\t\tif ($this->id !== null && trim($this->id) !== '') {\n\t\t\t$html .= ' id=\"' . str_replace(' ', '_', $this->id) . '\"';\n\t\t}\n\n\t\t//Check the element for reqired attributes\n\t\t$this->validateAttributes();\n\t\t//Add any attributes\n\t\tforeach ($this->attributes as $key => $val) {\n\t\t\t$html .= ' ' . $key . '=\"' . $val . '\"';\n\t\t}\n\n\t\t$html .= '>';\n\n\t\t//Check for internal elements\n\t\tif (is_array($this->elements) && count($this->elements) > 0) {\n\t\t\t//Build the HTML\n\t\t\tforeach ($this->elements as $element) {\n\t\t\t\t//Check if the content is just a sub class\n\t\t\t\tif (is_object($element)) {\n\t\t\t\t\t$html .= $element->toHtml();\n\t\t\t\t} else {\n\t\t\t\t\t$html .= $element;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t//Check if the content is just a sub class\n\t\t\tif (is_object($this->content)) {\n\t\t\t\t$html .= $this->content->toHtml();\n\t\t\t} elseif (is_array($this->content)) {\n\t\t\t\tforeach ($this->content as $element) {\n\t\t\t\t\t//Check if the content is just a sub class\n\t\t\t\t\tif (is_object($element)) {\n\t\t\t\t\t\t$html .= $element->toHtml();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$html .= $element;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$html .= $this->content;\n\t\t\t}\n\t\t}\n\n\t\treturn $html . '</' . $this->data['tag'] . '>';\n\t}", "title": "" }, { "docid": "6a4aed75075495379e3cc9a44622a80a", "score": "0.7372875", "text": "public function __toString() {\n return $this->_buildHtml();\n }", "title": "" }, { "docid": "333264211f356a3754e0e0e0d0014061", "score": "0.7331694", "text": "public function toHtml()\r\n\t{\r\n\t\treturn $this->toString();\r\n\t}", "title": "" }, { "docid": "515416fa6554fea2fe8f41767a5a277e", "score": "0.73129624", "text": "public function __toString()\n {\n return $this->html;\n }", "title": "" }, { "docid": "fecebe37a1889f36b640308464c952a8", "score": "0.7232255", "text": "public function __toString()\n {\n return $this->toHtml();\n }", "title": "" }, { "docid": "52e61de8c22fea37023059411003d329", "score": "0.7231589", "text": "public function toMarkup();", "title": "" }, { "docid": "98a6a22b120ec9886d670c8809e52ee2", "score": "0.7224628", "text": "public function __toString()\n {\n try {\n $html = $this->render();\n } catch (\\Exception $exception) {\n trigger_error($exception, E_USER_WARNING);\n $html = '';\n }\n return $html;\n }", "title": "" }, { "docid": "ec923ee51983635735e1a8a2f9c38d66", "score": "0.7217559", "text": "final public function __toString(): string\n {\n return $this->saveHTML();\n }", "title": "" }, { "docid": "2030c4c541f663ea273dcd344faa9899", "score": "0.7211956", "text": "protected function toHtml()\n\t{\n\t\treturn $this->toText();\n\t}", "title": "" }, { "docid": "69ab1231c48a0b4ba349462da42400e9", "score": "0.7185672", "text": "public function __toString(): string {\n return $this->getHtml();\n }", "title": "" }, { "docid": "7ee5d1e6a524930f3fbbcf0f92c052ea", "score": "0.7181187", "text": "public function __toString() {\n $target = $this->get();\n if (!is_object($target))\n return \"—\";\n $html = (string) $target;\n return $html;\n }", "title": "" }, { "docid": "926307bb550e13f5a3e067f925b42eff", "score": "0.7174101", "text": "function __toString()\n\t{\n\t\treturn (string) new html($this);\n\t}", "title": "" }, { "docid": "a65164f1c08d9692f78d1f7225cd9ea5", "score": "0.713253", "text": "public function __toString() {\n\t\t\treturn $this->getTagHTML();\n\t\t}", "title": "" }, { "docid": "a45662a4ac181a44fe7c845e0c6cce3c", "score": "0.7101753", "text": "function HTMLifyObject($object) {\n\t\tdebug(\"Looking for HTML-worthy material in \\\"\".$object[\"id\"].\"\\\"\");\n\t\tswitch($object[\"type\"]) {\n\t\tcase \"Image\":\n\t\t\tdebug(\"Found an image: \\\"\".$object[\"src\"].\"\\\"\");\n\t\t\t$content = \"<img src=\\\"\".$object[\"src\"].\"\\\" alt=\\\"\".$object[\"alt_key\"].\"\\\">\";\n\t\t\tbreak;\n\t\tcase \"TextField\":\n\t\t\tdebug(\"Found text [...]\");\n\t\t\t$content = \"<pre>\".$object[\"texts\"].\"</pre>\";\n\t\t\tbreak;\n\t\t}\n\t\t$links = extractLinksFromObject($object);\n\t\tforeach($links as $link) {\n\t\t\t$content .= \"<a href=\\\"\".$link.\"\\\">Link</a>\";\n\t\t}\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "7c8b217b0594bfa3a54e106245df74e0", "score": "0.7101189", "text": "public function asHTML() {\n\t\treturn $this->generate_markup();\n\t}", "title": "" }, { "docid": "1ed4f782d9203f39d44cdd2237ec1bde", "score": "0.7100306", "text": "public function toHtml()\n {\n \treturn $this->to(self::RENDER_HTML);\n }", "title": "" }, { "docid": "e7e723cb9d54823a9b7d63b50aff722e", "score": "0.70951176", "text": "public function toHtml()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.70794296", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.70794296", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.70794296", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.70794296", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.70794296", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.70794296", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.70794296", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.70794296", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.70794296", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.70794296", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.70794296", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.70794296", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.70794296", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.70794296", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.70794296", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.70794296", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.70794296", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "1c61557ba5a0071dd239118d2d20e397", "score": "0.70794296", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "ee6ecdfb1d5483be0d67ead0a9717bca", "score": "0.7076399", "text": "public function __toString() {\n\t\ttry {\n\t\t\t$output = '' . $this->getHtml();\n\t\t} catch (Exception $e) {\n\t\t\t$output = $e->__toString();\n\t\t}\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "f986cbd588c51630cbbeb0f38474f69b", "score": "0.70516455", "text": "public function toHtml()\n {\n $html = $this->content_object_html;\n $html[] = $this->content_object_publication_form->toHtml();\n $html[] = '<div style=\"clear: both;\"></div>';\n \n return implode(PHP_EOL, $html);\n }", "title": "" }, { "docid": "228ae2bb922d30c0f096467d4a5649e4", "score": "0.7040982", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "f6a93098ddb00fd1f508de94f41f8f38", "score": "0.7029199", "text": "public function __toString()\n\t{\n\t\treturn $this->render();\n\t}", "title": "" }, { "docid": "f6a93098ddb00fd1f508de94f41f8f38", "score": "0.7029199", "text": "public function __toString()\n\t{\n\t\treturn $this->render();\n\t}", "title": "" }, { "docid": "f6a93098ddb00fd1f508de94f41f8f38", "score": "0.7029199", "text": "public function __toString()\n\t{\n\t\treturn $this->render();\n\t}", "title": "" }, { "docid": "f6a93098ddb00fd1f508de94f41f8f38", "score": "0.7029199", "text": "public function __toString()\n\t{\n\t\treturn $this->render();\n\t}", "title": "" }, { "docid": "f6a93098ddb00fd1f508de94f41f8f38", "score": "0.7029199", "text": "public function __toString()\n\t{\n\t\treturn $this->render();\n\t}", "title": "" }, { "docid": "f17c16c59ff9c1bb68c6214e007e0edb", "score": "0.7023541", "text": "public function __toString()\n {\n return $this->render();\n }", "title": "" }, { "docid": "91544d6324b033ae3da0e11fd0bd988d", "score": "0.7015136", "text": "public function __toString(){\n\t\treturn $this->render();\n\t}", "title": "" }, { "docid": "0948c7b0f07db4542c7b526cec823671", "score": "0.69758034", "text": "public function __tostring() {\n return $this->render();\n }", "title": "" }, { "docid": "921405006ca40657543666dce718f0dc", "score": "0.6943676", "text": "function __toString()\n {\n $content = $this->object->getContent();\n\n if ($content instanceof View) {\n return $content->render();\n }\n\n return '';\n }", "title": "" }, { "docid": "94bb1dbb57d9856d99baa9a00a099a80", "score": "0.692075", "text": "function toString() {\n\t\t$str = $this->showLabel ();\n\t\t$str .= $this->getStartHTML ();\n\t\t$str .= $this->showId ();\n\t\t$str .= $this->showPlaceHolder ();\n\t\t$str .= $this->showName ();\n\t\t$str .= $this->showValue ();\n\t\t$str .= $this->getEndHTML ();\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "b5c95663010d4fe405fb2767e0e430eb", "score": "0.691176", "text": "public function __toString()\n {\n $this->render();\n return '';\n }", "title": "" }, { "docid": "f05375727ac654a5314bf5cb3f2ef4ff", "score": "0.6866369", "text": "public function __toString()\n {\n return (string) $this->render();\n }", "title": "" }, { "docid": "f05375727ac654a5314bf5cb3f2ef4ff", "score": "0.6866369", "text": "public function __toString()\n {\n return (string) $this->render();\n }", "title": "" }, { "docid": "d1992ca1c8914a9dc4987c9304a4d047", "score": "0.68623006", "text": "protected function _toHtml()\n {\n return parent::_toHtml();\n }", "title": "" }, { "docid": "a83b4820cf902bcd18291a6a8149b9d1", "score": "0.6861619", "text": "public function html(){\n return $this->_slat($this->settings);\n }", "title": "" }, { "docid": "4eae6a73b587b7bc311eb7638dca37ef", "score": "0.68614787", "text": "public function toHTML(){\n //$html = \"\";\n //$html .= \"<span class='klasse'>\" . $this->klasse . \"</span>: <span class='bedrag'>\" . $this->tarief . \"</span>\" . ' ' . $this->opmerking . $this->oatGebruik;\n return genereerKlasseTariefHTML($this->klasse,$this->tarief) . \" \" . $this->opmerking . ' ' . $this->oatGebruiklabel . ' ' . $this->grondgebruik; //($this->normNaam ? \">>\" . $this->normNaam . \"<<\" : '') .\n }", "title": "" }, { "docid": "bf2df0121adb98aa03459e45a5e4c8d3", "score": "0.68516093", "text": "function buildHtml() {\n\t\t$this->_Engine->assign('textUtil', new utilityInflectorWrapper());\n\t\t$this->_Engine->assign('getMethods', $this->getGetMethods());\n\t\t$this->_Engine->assign('getMethodCount', count($this->getGetMethods()));\n\t\t$this->_Engine->assign('properties', $this->getProperties());\n\t\t$this->_Engine->assign('propertyValues', $this->getProperties(true));\n\t\t$this->_Engine->assign('propertyCount', count($this->getProperties()));\n\t\t$this->_Engine->assign('Action', $this->_Action);\n\t\t$this->_Engine->assign('ObjectName', $this->getReflectionObject()->getName());\n\t\treturn $this->_Engine->fetch($this->_Template);\n\t}", "title": "" }, { "docid": "519ad4cae2ef70da61d7cac01b6945e1", "score": "0.6834101", "text": "public function html() {\n\t\t// Collapse styles\n\t\t$params = $this->params;\n\t\t$style = $this->collapseStyles();\n\n\t\tif ( $style ) {\n\t\t\t$params['style'] = $style;\n\t\t}\n\n\t\tif ( is_object( $this->content ) ) {\n\t\t\treturn Html::rawElement( $this->tag, $params, $this->content );\n\t\t} else {\n\t\t\treturn Html::element( $this->tag, $params, $this->content );\n\t\t}\n\t}", "title": "" }, { "docid": "152ba2aaa6c069ed9d52ebc52a392f72", "score": "0.6832323", "text": "function __toString() {\n return $this->render();\n }", "title": "" }, { "docid": "c6e72a69baa51906aeb5f603aec7beb1", "score": "0.6821441", "text": "public function __toString() {\n\n //call the render method to construct the output\n return $this->render();\n\n }", "title": "" }, { "docid": "0af0e008693f2d70d1e6f523dbc35582", "score": "0.6808052", "text": "public function __toString()\r\n {\r\n return $this->end(true)->html;\r\n }", "title": "" }, { "docid": "35b08fdf37185a7cf071f8974e8e6a24", "score": "0.6795773", "text": "public function __toString() : string\n {\n return $this->render();\n }", "title": "" }, { "docid": "35b08fdf37185a7cf071f8974e8e6a24", "score": "0.6795773", "text": "public function __toString() : string\n {\n return $this->render();\n }", "title": "" }, { "docid": "67992dbc274e080002a276e11dce2ce1", "score": "0.6794288", "text": "public function __toString()\n {\n $html = $this->html;\n $this->html = '';\n $this->inputs = array();\n return $html;\n }", "title": "" }, { "docid": "f1682d1e19084a3304eb0a2e827c3307", "score": "0.6788025", "text": "private function html() {\n $output = $this->values;\n return $output;\n }", "title": "" }, { "docid": "d49571102ece8f763aa8ac901f7f35ae", "score": "0.6787616", "text": "abstract public function html();", "title": "" }, { "docid": "ed40ae1cc9d89770c0d55df0d0d3c8c2", "score": "0.67774487", "text": "public function toString()\n {\n return \"the HTML [{$this->source}]\";\n }", "title": "" }, { "docid": "867034b5cb411fc5a4b126c713a5a92a", "score": "0.6771635", "text": "final public function toHTML()\n\t{\n\t\treturn $this->useAdapter(__FUNCTION__, func_get_args());\n\t}", "title": "" }, { "docid": "c095e5f140ce6309c7b402a7747584e8", "score": "0.6752496", "text": "public function __toString()\n {\n try {\n $rs = ('wysiwyg' == $this->tag) ? $this->renderWysiwyg() : $this->render();\n } catch (\\Exception $e) {\n $rs = L10n::__('Generating Tag failed.');\n }\n \n return $rs;\n }", "title": "" }, { "docid": "3b49e1a5b9adfc930f039e22dd02f0a6", "score": "0.6750971", "text": "public function __toString(): string\n {\n return $this->render();\n }", "title": "" }, { "docid": "3b49e1a5b9adfc930f039e22dd02f0a6", "score": "0.6750971", "text": "public function __toString(): string\n {\n return $this->render();\n }", "title": "" }, { "docid": "3b49e1a5b9adfc930f039e22dd02f0a6", "score": "0.6750971", "text": "public function __toString(): string\n {\n return $this->render();\n }", "title": "" }, { "docid": "afcfee4952082b952773797ef5ccf5e1", "score": "0.67400086", "text": "public function __tostring() {\n\t\treturn (string)$this->render();\n\t}", "title": "" }, { "docid": "5026ecec1c7bafe6ce83a5314c50408b", "score": "0.6728755", "text": "public function toHtml()\n {\n return $this->getEngine()->fetch($this->template);\n }", "title": "" }, { "docid": "5dbfbc38704823195219dc99c151a52e", "score": "0.6705815", "text": "public function toHtml() {\n\t\techo '<link '.$this->getAttributes().'/>';\n\t}", "title": "" }, { "docid": "daf868c69cb4efb08b47f6a84295bf6e", "score": "0.67049414", "text": "public function __toString()\n {\n try {\n return (string) $this->render();\n } catch (Exception $e) {\n return '';\n }\n }", "title": "" }, { "docid": "4b43825af51227c6f0cf5c29e76706dc", "score": "0.6703566", "text": "public function toString(){\n $showCategory = '<a href=\"' . $this->category . '\">' . $this->plainTextCategory . '</a>' ;\n $showAutor = $this->author;\n $info = json_encode (array ($this->title, rawurlencode($this->url)));\n $thisObjectSerial = ($info);\n # Passing through javascript would probably be better than using GET values here.\n $showTitle = '<a href=\"articleText.php?article=' . rawurlencode($this->url) . '\">' . $this->title . '</a>';\n $articleDiv = '<div class=\"articleBox four columns\">' . $showTitle . \n '<br>' . $showAutor . '|' . $this->datePublished .\n '<br>'\n . '</div>';\n \n return $articleDiv;\n }", "title": "" }, { "docid": "982c70a56b33d95cadc957c9e407d32d", "score": "0.6676295", "text": "public function toString()\n\t{\n\t\tLog::info(sprintf('Converting %s object to string', $this->data['name']));\n\n\t\t$str = ucwords($this->data['name']) . ' element\\n\\r';\n\n\t\tif ($this->id !== NULL) {\n\t\t\t$str .= ' ID: ' . $this->id . '.\\n\\r';\n\t\t}\n\n\t\tif (count($this->elements) > 0) {\n\t\t\t$str .= ' Elements:\\n\\r';\n\t\t\tforeach ($this->elements as $element) {\n\t\t\t\tif (is_object($element)) {\n\t\t\t\t\t$str .= $element->toString();\n\t\t\t\t} else {\n\t\t\t\t\t$str .= $element;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$str .= '\\n\\r';\n\t\t}\n\n\t\tif ($this->content !== NULL || (is_array($this->content) && count($this->content) > 0)) {\n\t\t\t$str .= ' Content: ';\n\t\t\tif (is_array($this->content)){\n\t\t\t\tforeach ($this->content as $item) {\n\t\t\t\t\t$str .= '\\n\\r';\n\t\t\t\t\tif (is_object($item)) {\n\t\t\t\t\t\t$str .= $item->toString();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$str .= $item;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t} elseif (is_object($this->content)) {\n\t\t\t\t$str .= $this->content->toString();\n\t\t\t} else {\n\t\t\t\t$str .= $this->content;\n\t\t\t}\n\t\t\t$str .= '\\n\\r';\n\t\t}\n\n\t\tif (count($this->attributes) > 0) {\n\t\t\t$str .= ' Attributes: ';\n\t\t\tforeach ($this->attributes as $key => $val) {\n\t\t\t\t$str .= $key . '=' . (is_array($val) ? implode(', ', $val) : $val) . ', ';\n\t\t\t}\n\t\t\t$str = trim($str, ', ');\n\t\t}\n\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "b862b8d7f65bc99c83fac44998001641", "score": "0.6674999", "text": "public function __toString()\n\t{\n\t\ttry\n\t\t{\n\t\t\treturn $this->render();\n\t\t}\n\t\tcatch (\\Exception $e)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t}", "title": "" }, { "docid": "763a8a47779043503aeed3d009182539", "score": "0.66693664", "text": "public function __toString() {\n return (string) $this->getMarkup();\n }", "title": "" }, { "docid": "2cac97355676dae0ee56de55b404384c", "score": "0.6636094", "text": "public function toString()\n {\n ob_start();\n $this->create();\n return ob_get_clean();\n }", "title": "" }, { "docid": "2f2d987258b6369a8ab101c54137d0cb", "score": "0.66202927", "text": "public function toString() {\n\t\t$html = '';\n\t\tif ($this->_config ['published'] == '0') {\n\t\t\treturn;\n\t\t}\n\n\t\t/* override */\n\t\t$this->_attributes ['id'] = $this->_config ['slug'];\n\t\t$this->_attributes ['name'] = $this->_config ['slug'];\n\n\t\t/* allowsetbyget overide */\n\t\t$val = bfRequest::getVar ( $this->_config ['slug'], null, 'GET' );\n\t\tif ($val && $this->_config ['allowsetbyget'] == '1') {\n\t\t\t$this->_attributes ['value'] = $this->runFilters ( $val );\n\t\t}\n\n\t\t$attributesHTML = array ();\n\n\t\tforeach ( $this->_attributes as $k => $v ) {\n\t\t\tif ($v == \"\" && $this->_showBlankAttributes === true) {\n\t\t\t\t$attributesHTML [$k] = strtolower ( $k ) . '=\"' . $v . '\"';\n\t\t\t} else if ($v != \"\") {\n\t\t\t\t$attributesHTML [$k] = strtolower ( $k ) . '=\"' . $v . '\"';\n\t\t\t}\n\t\t}\n\n\t\tksort ( $attributesHTML );\n\n\t\t$attributesSpacedHTML = implode ( ' ', $attributesHTML );\n\n\t\t$html .= sprintf ( $this->_barehtml, $attributesSpacedHTML );\n\n\t\tif ($this->_config ['required'] == '1') {\n//\t\t\t$html .= '<span class=\"required\">*</span>';\n\t\t}\n\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "1d5c629764e55f7e39d0bc9d14625e3a", "score": "0.661533", "text": "public function __toString() {\n\t\ttry {return $this->render ();} \n\t\tcatch ( Exception $e ) {echo $e->getMessage ();return \"\";}\n\t}", "title": "" }, { "docid": "2df4ae5f445af49c05be0807743e5c36", "score": "0.65874344", "text": "function __toString()\n {\n $attrib = $this->getAllAttributes();\n $attrib['href'] = $this->getUrl();\n $title = $this->getTitle();\n $f = new T_Filter_Xhtml;\n $out = '<a';\n foreach ($attrib as $key => $val) {\n $out .= ' '.$key.'=\"'._transform($val,$f).'\"';\n }\n $out .= '>'._transform($title,$f).'</a>';\n return $out;\n }", "title": "" }, { "docid": "9e2ea963ea8e1abc69a772edde8cc8be", "score": "0.65870076", "text": "public function __toString()\n {\n try\n {\n return $this->render();\n }\n catch (\\Exception $e)\n {\n \\CB::exception($e);\n }\n }", "title": "" }, { "docid": "78e7c5bfe8001abb8e0dbafe0f369a85", "score": "0.65797305", "text": "public function __toString()\n {\n try {\n return $this->render();\n } catch (\\Exception $e) {\n return $this->str;\n }\n }", "title": "" }, { "docid": "8bd4ce5875fb8c6d4ff86c028166122d", "score": "0.65728253", "text": "public function __toString()\n {\n if ($this->_config['template']) {\n try {\n return $this->render();\n } catch (Exception $e) {\n return '';\n }\n }\n\n return '';\n }", "title": "" }, { "docid": "36e8dd79322158ca9600526ccd5b94dc", "score": "0.65653324", "text": "public function render()\n {\n return $this->__toString();\n }", "title": "" }, { "docid": "af7ba4535507f838e0dfe3a7d88488eb", "score": "0.6539821", "text": "public function __toString()\n {\n return $this->html( $this->getPeriod() );\n }", "title": "" }, { "docid": "b8f0b040c2503c51a80a72ea93ce92cf", "score": "0.65359384", "text": "function __toString() {\n return '<p>' . $this->name . '</p>';\n }", "title": "" }, { "docid": "6712818017fed4f3c1c13570b63db96a", "score": "0.6531407", "text": "public function __toString() {\n return sprintf(\"HtmlResponse{template_file=%s}\", $this->template_file);\n }", "title": "" }, { "docid": "2543151b719dca761b50b888f303612c", "score": "0.6530166", "text": "public function renderHtml()\n {\n return new HtmlString(\n $this->render()\n );\n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "61d063eb08022e324a51b9e0b225673f", "score": "0.0", "text": "public function store(Request $request)\n {\n $ono = $request->input(\"ono\");\n $adi = $request->input(\"adi\");\n $soyadi = $request->input(\"soyadi\");\n\n echo \"\".$adi.$soyadi.$ono;\n\n $ogr = new ogrenci;\n $ogr->adi = $adi;\n $ogr->soyadi = $soyadi;\n $ogr->save();\n return redirect(\"/ogrenci/\");\n\n }", "title": "" } ]
[ { "docid": "643f51843534c99b002271c413f71061", "score": "0.7149016", "text": "public function store()\n {\n $this->storage->set($this);\n\n }", "title": "" }, { "docid": "aba977442c12d8193d7ce12cb2a46e96", "score": "0.669261", "text": "public function store ()\n {\n $this->_update_login ();\n $this->_pre_store ();\n\n if ($this->exists ())\n {\n $this->_update ();\n }\n else\n {\n $this->_create ();\n }\n }", "title": "" }, { "docid": "75600e5d65c2156987ff7cb140e14a4b", "score": "0.6621582", "text": "public function store() {\n $fileService = $this->getFileService();\n $filename = $this->getCacheDirectory() . $this->generateCacheablefilename();\n $fileService->saveFile($filename, $this->resource->getContent());\n }", "title": "" }, { "docid": "98fadc36fd3a4194a25023de21dae9ff", "score": "0.6428514", "text": "public function save($resource);", "title": "" }, { "docid": "9181113e9ca478f57b376bb60189432a", "score": "0.639531", "text": "public function store()\n\t{\n\t\t//\n\t\t$inputs = Input::all();\n\t\t$validator = Validator::make($inputs , \\App\\Resource::$rules);\n\n\t\tif($validator->passes()){\n\t\t\t$destinationPath = 'pictures/'; // upload path\n\t\t\t$extension = Input::file('image')->getClientOriginalExtension(); // getting image extension\n\t\t\t$fileName = rand(11111,99999). '_' . time() . '.'.$extension; // renameing image\n\t\t\tImage::make(Input::file('image')->getRealPath())->resize(300, null,function($constrain){\n\t\t\t\t$constrain->aspectRatio();\n\t\t\t})->save($destinationPath . $fileName);\n\t\t\t// Input::file('image')->move($destinationPath, $fileName); // uploading file to given path\n\t\t\t$inputs['image'] = $fileName;\n\t\t\t\\App\\Resource::create($inputs);\n\t\t\treturn Redirect::to('/');\n\n\t\t}\n\n\t\treturn Redirect::back()\n\t\t\t->withInput(Input::all())\n\t\t\t->withErrors($validator);\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "bd7a2528e89d1c3f43656fa9d3a11bc3", "score": "0.63575023", "text": "public function store(StoreResourceRequest $request): JsonResponse\n {\n $resource = new Resource;\n $resource->fill($request->all());\n if ($request->has('url')) {\n $resource->url = $request->file('url')->store('articles', 'article');\n }\n $resource->saveOrFail();\n return $this->api_success([\n 'data' => new ResourceArticleResource($resource),\n 'message' => __('pages.responses.created'),\n 'code' => 201\n ], 201);\n }", "title": "" }, { "docid": "af1871e1a1f1d758082bcf4ebeab10eb", "score": "0.6356851", "text": "public function saveStorage()\n {\n $this->storage->save($this->getProduct());\n }", "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": "" }, { "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": "" } ]
7ad07ed5f6e4ba10e6534bdc14846cf7
Determine whether the user can update the product.
[ { "docid": "d3e02e7fdb5c81d183ed66b0a975140c", "score": "0.73082846", "text": "public function update(User $user, Product $product)\n {\n return $user->hasAccess(['update-product']) or $user->id == $product->user_id;\n }", "title": "" } ]
[ { "docid": "202c720b30c586ba8053de61daa06280", "score": "0.77560896", "text": "protected function can_update()\n {\n return (is_exist($this->permission)) ? $this->permission->update : 0;\n }", "title": "" }, { "docid": "ae16d2f14a0fa38db18a037385897a36", "score": "0.7644112", "text": "public function update(User $user, Product $product)\n {\n return $user->canUser('product_update');\n }", "title": "" }, { "docid": "3718cb4947638ddbbdffa16b83d2516c", "score": "0.7260192", "text": "public function getUserCanUpdate()\n {\n return $this->UserCanUpdate;\n }", "title": "" }, { "docid": "d2befa90f2900dbd3d5180a3ac3d6077", "score": "0.7245388", "text": "public function update()\n {\n return auth()->user()->can('edit harvest');\n }", "title": "" }, { "docid": "d0792f3126273cbdf456ca16388f6354", "score": "0.71834385", "text": "function canEdit() {\n\t\t\treturn (( $this->isSaveAllowed( ) && $this->getProduct( )->getId( ) ) ? true : false);\n\t\t}", "title": "" }, { "docid": "e5126701cd4c18ce0f0d5c0ff20c2a41", "score": "0.7104901", "text": "public function authorize()\n {\n return user()->hasPermissionTo('Marketplace::order.update');\n }", "title": "" }, { "docid": "5557025de555cda80216b3451ef947d6", "score": "0.7033046", "text": "public function updateIfAllowed()\n {\n // Is this the backend\n if ($this->store->isAdmin() == false) {\n return false;\n }\n\n // Is the backend-user logged-in\n if ($this->session->isLoggedIn() == false) {\n return false;\n }\n\n // Is the feed disabled?\n if ((bool)$this->helper->getStoreConfig('yireo/common/disabled')) {\n return false;\n }\n\n // Update the feed\n $this->checkUpdate();\n return true;\n }", "title": "" }, { "docid": "b5289b3f2f5c4687d5bf8d50cd99d1f7", "score": "0.7008309", "text": "public function authorize()\n {\n return $this->user()->can('update', $this->route('user'));\n }", "title": "" }, { "docid": "c02591010964a5fe2d6eb376ad913eab", "score": "0.6960809", "text": "protected function updateProduct() {\n\t\t\t$name = $this->dbc->real_escape_string( $_POST['name'] );\n\t\t\t$price = $this->dbc->real_escape_string( $_POST['price'] );\n\t\t\t$productID = $this->dbc->real_escape_string( $_GET['product_ID'] );\n\n\t\t\tif($_SESSION['user_access'] == 'admin') {\n\n\t\t\t$sql = \"UPDATE s_products\n\t\t\t\t\tSET product_name = '$name',\n\t\t\t\t\t\tproduct_price = '$price'\n\t\t\t\t\tWHERE product_ID = $productID\";\n\n\t\t\t} else {\n\t\t\t\tdie('You are not authorized to make changes.');\n\t\t\t\t\n\t\t\t}\n\n\t\t\t$this->dbc->query($sql);\n\n\t\t\tif ($this->dbc->affected_rows == 0) {\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b8c138dfbf0a96d5b19051c395e3e939", "score": "0.69570255", "text": "public function authorize()\n {\n //TODO check if the authenticated user actually has the authority to update a given resource.\n return true;\n }", "title": "" }, { "docid": "c6e28d478774bd6296c57fba8f5382cb", "score": "0.693002", "text": "public function a_product_can_be_updated()\n {\n $this->actingAs(User::factory()->create(), 'api');\n\n $product = $this->createProduct();\n\n $response = $this->json('PUT', \"/api/products/$product->id\", [\n 'name' => $product->name . '_updated',\n 'slug' => $product->slug . '_updated',\n 'description' => $product->description . '_updated',\n 'price' => $product->price + 10\n ]);\n\n $response->assertStatus(200)\n ->assertExactJson([\n 'id' => $product->id,\n 'name' => $product->name . '_updated',\n 'slug' => $product->slug . '_updated',\n 'description' => $product->description . '_updated',\n 'price' => $product->price + 10,\n 'created_at' => $product->created_at\n ]);\n\n $this->assertDatabaseHas('products', [\n 'id' => $product->id,\n 'name' => $product->name . '_updated',\n 'slug' => $product->slug . '_updated',\n 'description' => $product->description . '_updated',\n 'price' => $product->price + 10,\n 'created_at' => $product->created_at\n ]);\n }", "title": "" }, { "docid": "7108bcaab8b8cdf03d2132056a8284e5", "score": "0.6921541", "text": "public function update(Member $member)\n {\n return $member->checkPermissionAccess('product_edit');\n }", "title": "" }, { "docid": "8c16467acf91d07988c06c007a917db2", "score": "0.69030434", "text": "public function canUpdate() {\n return true;\n }", "title": "" }, { "docid": "6297a16314e33e84be40ff7bf18f80a4", "score": "0.68682647", "text": "public function authorize()\n {\n return true;\n return $this->user()->can('update', Baptism::class);\n }", "title": "" }, { "docid": "6d99e25084635c2e3e14accf482e0fb8", "score": "0.68679994", "text": "public function authorize()\n {\n return auth()->user()->can('update', $this->villa);\n }", "title": "" }, { "docid": "073af1ea8ef4efabfd748d202ac8d7bb", "score": "0.68244684", "text": "private function validateUpdate() {\n\t\t$this->context->checkPermission(\\Scrivo\\AccessController::WRITE_ACCESS);\n\t}", "title": "" }, { "docid": "c411e8427e66362fbff725f0f2a7a9b1", "score": "0.6814301", "text": "public function authorizePatch()\n {\n return $this->user()->can('navigation.update');\n }", "title": "" }, { "docid": "9dda7b4f88432bb186436cb6b8d7f2eb", "score": "0.6723113", "text": "public function authorize() {\n $this->application = $this->route('application');\n return $this->user()->can('update', $this->application);\n }", "title": "" }, { "docid": "1f5d34d0d7fcc23ad0e79bb7bba1d111", "score": "0.669989", "text": "public function authorize()\n {\n $user = $this->user();\n $entry = $this->entry;\n if (strtoupper($this->method()) === 'POST') {\n return true;\n } else {\n return $user->can('update', $entry);\n }\n }", "title": "" }, { "docid": "d9b48c3c51b77368280a9ff88415b464", "score": "0.6694237", "text": "public function authorize()\n {\n return $this->user()->can('update', $this->route('code'));\n }", "title": "" }, { "docid": "dab30eb056f8d73faa686f36d92abeae", "score": "0.66746897", "text": "public function authorize()\n {\n return $this->user()->can('updateProfile');\n }", "title": "" }, { "docid": "5398fdfe2853bf0c9a994a52665aba61", "score": "0.6674068", "text": "public function authorize() {\n\t\t$this->application = $this->route('application');\n\t\treturn $this->user()->can('update', $this->application);\n\t}", "title": "" }, { "docid": "d2c7d026d63c4c87f963abb5491600d3", "score": "0.6669185", "text": "public function authorize()\n {\n // only allow updates if the user is logged in\n return true;\n }", "title": "" }, { "docid": "b7b1738c1ef85abc69c4070f856e7444", "score": "0.66422606", "text": "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('catalog/products');\n }", "title": "" }, { "docid": "6157ad40ff0a76977f71888e33af47ed", "score": "0.6620503", "text": "public function authorize()\n {\n // only allow updates if the user is logged in\n // return backpack_auth()->check();\n return true;\n }", "title": "" }, { "docid": "adf28222e6da864bf3d27a0b8b2b401d", "score": "0.66124016", "text": "public function authorize() {\n\n $role = Role::find($this->route('role'));\n\n return $role && $this->user()->can('update', $role);\n }", "title": "" }, { "docid": "b84034edaab397615da37bc0d1b9a24c", "score": "0.6595325", "text": "public function update_product(User $user, Product $product)\n {\n $store = $user->store->id ?? false;\n \n return $store == $product->store_id;\n }", "title": "" }, { "docid": "75ab7db5850853e5daf9b4619a19e584", "score": "0.65825516", "text": "public function set_access_update()\n {\n if (!$this->can_update()) {\n return $this->showBackendAccessDenied();\n }\n }", "title": "" }, { "docid": "522089224c741c52707f6927a998eda5", "score": "0.65668404", "text": "public function update(User $user, ProductCategory $model)\n {\n return $user->hasPermissionTo('update productcategories');\n }", "title": "" }, { "docid": "bb3fec0fb380972b2242016cb5117b4c", "score": "0.65278536", "text": "public function update(Product $product, array $data): bool;", "title": "" }, { "docid": "9f7129e272f1595c4adfee24338bdd1d", "score": "0.65074027", "text": "private function should_update_premium()\n {\n }", "title": "" }, { "docid": "567902e36c59671293a0576bff3cd3ff", "score": "0.6507199", "text": "protected function check_update_permission($post)\n {\n }", "title": "" }, { "docid": "567902e36c59671293a0576bff3cd3ff", "score": "0.6507199", "text": "protected function check_update_permission($post)\n {\n }", "title": "" }, { "docid": "a9a0cc5d478fe87c441243d53d30b0d3", "score": "0.64829224", "text": "function is_update()\n {\n if ($this->return_result){\n return $this->op == 'UPDATE';\n }\n\n return $_SERVER['REQUEST_METHOD'] == 'PUT';\n }", "title": "" }, { "docid": "0d767f98bbd4e36c6ce160968af9b7d8", "score": "0.64765185", "text": "public function canCurrentUserSaveVersion()\n {\n return $this->canCurrentUserSaveRevision();\n }", "title": "" }, { "docid": "c5d801b1e241ff7bc6f347ca50ed3f6c", "score": "0.6470461", "text": "public function canFetchPaymentReviewUpdate()\n {\n return $this->isPaymentReview() && $this->getPayment()->canFetchTransactionInfo();\n }", "title": "" }, { "docid": "9cf7062eba5e301eed991dbfc61484f2", "score": "0.6466274", "text": "public function authorize()\n {\n\t\t// only allow updates if the user is logged in\n\t\treturn backpack_auth()->check();\n }", "title": "" }, { "docid": "ac7c5916f85d08e9add96a96539c964a", "score": "0.64654297", "text": "public function update(User $user, Update $update)\n {\n return $user->can('update_update');\n }", "title": "" }, { "docid": "8c7899256db5ff57e927644792f408d1", "score": "0.64584535", "text": "private function user_can_update_translations() {\n\t\tglobal $updraftplus;\n\t\t$wp_version = $updraftplus->get_wordpress_version();\n\t\t\n\t\tif (version_compare($wp_version, '4.9', '<')) {\n\t\t\tif (current_user_can('update_core') || current_user_can('update_plugins') || current_user_can('update_themes')) return true;\n\t\t} else {\n\t\t\tif (current_user_can('install_languages')) return true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "fd3d2c7c0aaaf02faae237bdd2c25e35", "score": "0.6449158", "text": "public function userCanUpdateData($data)\n {\n return $this->clusterCanUseModel($data);\n }", "title": "" }, { "docid": "20f472d27762c03832ae3f72665d769f", "score": "0.64412826", "text": "public function update(User $user, User $userResource): bool\n {\n return $user->can('update-users');\n }", "title": "" }, { "docid": "5fcc7ba03cbc045a35c20a0a77b89bad", "score": "0.64275354", "text": "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "title": "" }, { "docid": "5fcc7ba03cbc045a35c20a0a77b89bad", "score": "0.64275354", "text": "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "title": "" }, { "docid": "5fcc7ba03cbc045a35c20a0a77b89bad", "score": "0.64275354", "text": "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "title": "" }, { "docid": "5fcc7ba03cbc045a35c20a0a77b89bad", "score": "0.64275354", "text": "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "title": "" }, { "docid": "5fcc7ba03cbc045a35c20a0a77b89bad", "score": "0.64275354", "text": "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "title": "" }, { "docid": "56f748e61c4f347a2e3893e5f46211b6", "score": "0.64040834", "text": "public function update(User $user, ModelsProduct $modelsProduct)\n {\n //\n\n return $users->id === $products->user_id;\n }", "title": "" }, { "docid": "f3ce952228a205b6a79c530420016444", "score": "0.6395876", "text": "public function can_update($id_or_values, $data)\n {\n return true;\n }", "title": "" }, { "docid": "6616a3e5c86e7ddd64d15c7196b0f461", "score": "0.63952255", "text": "public function authorize()\n {\n $marEntry = MarEntry::find($this->route('mar'));\n return $this->user()->can('update', $marEntry);\n }", "title": "" }, { "docid": "884aff1d049fce2abd9d4ac7e3f37dfe", "score": "0.63790494", "text": "public function update(User $user)\n {\n return $user->hasPermission('role-update');\n }", "title": "" }, { "docid": "40c43363deb20bbdd3e69dac9bc288ec", "score": "0.6364968", "text": "public function authorize(): bool\n {\n return $this->user()->can('update_keywords');\n }", "title": "" }, { "docid": "f1571f272ff023e87e888e486699a8e7", "score": "0.63625264", "text": "public function authorize()\n {\n return $this->user()->can('manage-products');\n }", "title": "" }, { "docid": "49108fd00f7672d6921ce9aa8663a0bb", "score": "0.6351999", "text": "public function authorize()\n {\n $medication = Medication::find($this->route('medication'));\n return $this->user()->can('update', $medication);\n }", "title": "" }, { "docid": "dd42c63e349ab208f131a2d580c62295", "score": "0.6350689", "text": "function canUpdateItem() {\n\n if (!parent::canReadITILItem()) {\n return false;\n }\n\n $ticket = new Ticket();\n if ($ticket->getFromDB($this->fields['tickets_id'])\n && in_array($ticket->fields['status'], $ticket->getClosedStatusArray())) {\n return false;\n }\n\n if (($this->fields[\"users_id\"] != Session::getLoginUserID())\n && !Session::haveRight(self::$rightname, parent::UPDATEALL)) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "335ae3f31ab5b41f6ee5875bdcd44811", "score": "0.6326489", "text": "private function allowModify()\n { \n if($this->controllerVar['loggedUserRole'] <= 40 )\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }", "title": "" }, { "docid": "ef7c4858d8ac665d23f07b31ca1fc5aa", "score": "0.6325824", "text": "public static function canUpdateProfileInformation()\n {\n return static::enabled(static::updateProfileInformation());\n }", "title": "" }, { "docid": "7dc5ba4f66129deb94fcdcf0df35f0c4", "score": "0.63180405", "text": "public function authorize()\n {\n return auth()->user()->can('update', $this->route('classroom_discipline_user'));\n }", "title": "" }, { "docid": "16b3c569a7c1606e58c1fcc114aec10d", "score": "0.6310274", "text": "public function update(User $user): bool\n {\n return $user->canAny(['Update Content On Demand', 'Update Content Live Stream']);\n }", "title": "" }, { "docid": "b14dec5cafc682ee80c2bbb6c98c3e97", "score": "0.6297802", "text": "public function update(User $user, ProductParticulars $model)\n {\n return $user->hasPermissionTo('update allproductparticulars');\n }", "title": "" }, { "docid": "1e6c46c177f7b68ce6178bc28ce4a73b", "score": "0.62689984", "text": "public function update(User $user)\n {\n if ($user->can('update posts')) {\n return true;\n }\n }", "title": "" }, { "docid": "6d81e4c01723f435611502800cc92ca6", "score": "0.62354535", "text": "public function update() {\n $this->security_check();\n }", "title": "" }, { "docid": "df49e8b4644b4a73979db6066d631a6f", "score": "0.6234113", "text": "public function authorize()\n {\n $user = auth()->user();\n $lesson = Lesson::find($this->route('lesson'));\n $course = $lesson->course;\n return isset($user) ? $user->can('update', $course) : false;\n }", "title": "" }, { "docid": "917e0584b3686dcb829137014e678445", "score": "0.6234108", "text": "public function userCanUpdate(User $user = null) {\n $ok = $this->isUpdateable() && $this->userHasPermission('PLUGIN_TRACKER_FIELD_UPDATE', $user);\n return $ok;\n }", "title": "" }, { "docid": "d14f524b4bdb8f49e9673ee2d6357b64", "score": "0.6229028", "text": "public function canUpdateKount()\n {\n return !Mage::registry('kount_ens_update')\n && Mage::getStoreConfig('payment/gene_braintree_creditcard/kount_merchant_id')\n && Mage::getStoreConfig('payment/gene_braintree_creditcard/kount_api_key');\n }", "title": "" }, { "docid": "b49affda34efc8ea149192ea38f1cd54", "score": "0.6225242", "text": "public function canUpdate(User $user, User $other): bool\n {\n if ($user->getId() === $other->getId() ||\n $this->authorizationChecker->isGranted(User::ROLES[User::ROLE_SUPER_ADMIN])) {\n return true;\n }\n\n if ($this->authorizationChecker->isGranted(User::ROLES[User::ROLE_ADMIN]) &&\n !$other->hasOneRole(User::ROLE_SUPER_ADMIN | User::ROLE_ADMIN)) {\n return true;\n }\n\n if ($this->authorizationChecker->isGranted(User::ROLES[User::ROLE_PROJECT_MANAGER]) &&\n $other->getOriginalRoles() === User::ROLE_USER) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "85eaa6cbd3dc6005a6e762d93ed603e1", "score": "0.62244475", "text": "public function update(Authorizable $authorizable)\n {\n return $authorizable->role->permissions()->where('name', 'component:update')->exists();\n }", "title": "" }, { "docid": "376844043f0222ed7a2a8aa3623b474f", "score": "0.621497", "text": "public function authorize() {\n if ($this->getMethod() === 'PATCH') {\n return $this->user()->can('update', User::class);\n }\n\n return !auth()->check();\n }", "title": "" }, { "docid": "57c8434378a53fd6cf2bb9e44dccbd15", "score": "0.6206119", "text": "public function authorize()\n {\n // only allow updates if the user is logged in\n return auth()->check();\n }", "title": "" }, { "docid": "c0b4d829b1b0757ef8d894a0c8eae1a7", "score": "0.6198992", "text": "final public function canUpdateDoc()\n {\n deprecatedFunction();\n return $this->canEdit();\n }", "title": "" }, { "docid": "a1043da88128d0584fc5f18ced3f8c0c", "score": "0.6192343", "text": "public function isProductApprovalRequired()\n {\n return $this->scopeConfig->getValue('ced_vproducts/general/confirmation',\n 'store', $this->storeManager->getStore()->getId());\n }", "title": "" }, { "docid": "11290be36c1f103306c5b959e74e9797", "score": "0.6184138", "text": "protected function _isAllowed() {\n\t\t/** @var bool $result */\n\t\t$result = false;\n\t\tif (df_enabled(Df_Core_Feature::CMS_2)) {\n\t\t\tswitch($this->getRequest()->getActionName()) {\n\t\t\t\tcase 'new':\n\t\t\t\tcase 'save':\n\t\t\t\t\t$result = Df_Cms_Model_Config::s()->canCurrentUserSaveVersion();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'delete':\n\t\t\t\t\t$result = Df_Cms_Model_Config::s()->canCurrentUserDeleteVersion();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'massDeleteRevisions':\n\t\t\t\t\t$result = Df_Cms_Model_Config::s()->canCurrentUserDeleteRevision();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$result = df_mage()->admin()->session()->isAllowed('cms/page');\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "3b8b9772d482b81df841efe15d2ab95a", "score": "0.61813563", "text": "public function _isAllowed()\n {\n return $this->_authorization->isAllowed(self::ADMIN_RESOURCE_SAVE);\n }", "title": "" }, { "docid": "c35d64e364414093c2211107d6ba2cd7", "score": "0.61747813", "text": "public function authorize()\n {\n switch($this->method()) {\n case 'GET':\n return false;\n case 'POST':\n $user = User::findOrFail($this->id);\n return $this->user()->can('update', [User::class, $user]);\n case 'PUT':\n case 'PATCH': \n case 'DELETE':\n return false;\n default:\n break;\n }\n }", "title": "" }, { "docid": "19e3ed2f493c27435f6da211c7d44028", "score": "0.61482", "text": "public function authorize()\n {\n // only allow updates if the user is logged in\n return \\Auth::check();\n }", "title": "" }, { "docid": "19e3ed2f493c27435f6da211c7d44028", "score": "0.61482", "text": "public function authorize()\n {\n // only allow updates if the user is logged in\n return \\Auth::check();\n }", "title": "" }, { "docid": "cf27c1c8f3fe2cdc7657b1a891c09d2a", "score": "0.6138125", "text": "public function update(User $user)\n {\n return $user->can('edit-sub-job');\n }", "title": "" }, { "docid": "3402ca51c2264257860f0b4f198a4205", "score": "0.61183566", "text": "public function update(User $user, Post $post)\n {\n return $user->isSuperAdmin(); \n }", "title": "" }, { "docid": "c953f72310cdb772858a87f750d36293", "score": "0.611434", "text": "public function authorize()\n {\n $this->customer = (new FetchCustomer)\n ->actingAs($this->user())\n ->run([\n 'encoded_id' => $this->customer_id,\n ]);\n\n return $this->runningAs('object') || $this->user()->can('update', $this->customer);\n }", "title": "" }, { "docid": "415eef934ceeb0a61a30d68c37330c4b", "score": "0.61093944", "text": "public function update() {\n $this -> mCancel = FALSE;\n $this -> dbg('update');\n\n // 1. before post\n $this -> beforePost(FALSE);\n if ($this -> mCancel) {\n return FALSE;\n }\n\n // 2. Cancel if nothing has changed\n if (!$this -> hasChanged()) {\n $this -> dbg('nothing changed');\n return TRUE; // TODO: Decision: really return true?\n }\n\n // 3. check validity\n if (!$this -> isValid(FALSE)) {\n return FALSE;\n }\n\n // 4. update\n if (!$this -> doUpdate()) {\n $this -> mCancel = TRUE;\n return FALSE;\n }\n\n // 5. after post\n $this -> afterPost(FALSE);\n $this -> afterChange();\n return TRUE;\n }", "title": "" }, { "docid": "dadde9941a9c82ea4d8d246133c2f3a7", "score": "0.61082095", "text": "public function authorize() {\n\n return $this->user()->can('updateImage',$this->subreddit);\n }", "title": "" }, { "docid": "252c333ab7830af92f58b34dd6128b62", "score": "0.6092304", "text": "private function canModify()\n {\n //Checks roles allowed\n $roles = array(\n 'ROLE_MANAGER',\n 'ROLE_ADMIN',\n );\n\n foreach ($roles as $role) {\n if ($this->security->isGranted($role)) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "252c333ab7830af92f58b34dd6128b62", "score": "0.6092304", "text": "private function canModify()\n {\n //Checks roles allowed\n $roles = array(\n 'ROLE_MANAGER',\n 'ROLE_ADMIN',\n );\n\n foreach ($roles as $role) {\n if ($this->security->isGranted($role)) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "358a449ce6199d71cf93d524064ab4cd", "score": "0.6085318", "text": "public function isEntityProxyUpdateAllowed(): bool;", "title": "" }, { "docid": "62773712366f14550383209b9025d85b", "score": "0.6064743", "text": "public function authorize()\n {\n // only allow updates if the user is logged in\n return Auth::check();\n }", "title": "" }, { "docid": "ac3b3a019df28e1b6b5065c0839a12f8", "score": "0.60441846", "text": "public function authorize()\n {\n if (!$this->isRegister())\n return $this->user()->can('update', $this->route('user'));\n return true;\n }", "title": "" }, { "docid": "cb2df09b1101fc893a39828dd9ed2168", "score": "0.6042295", "text": "function validate_for_update($data)\n\t{\n\t\treturn false;\n\t}", "title": "" }, { "docid": "ff794c28a968dce69d0449efe84e5bcc", "score": "0.60408807", "text": "public function authorize()\n {\n /*$robot = Robot::find($this->route('robot'));\n if ($robot) {\n return $this->user()->can('update', $robot);\n } else {\n return true;\n }*/\n return true;\n }", "title": "" }, { "docid": "88d52d12a12dcf31db616e51553d1fa3", "score": "0.6040022", "text": "public function canCurrentUserSaveRevision()\n {\n return $this->_isAllowedAction('save_revision');\n }", "title": "" }, { "docid": "3c86a1af06ee7583e27b889e1e68e40c", "score": "0.60304993", "text": "function if_update_product($product_id, $product_categories) {\n $this->load->model('Model_admin');\n return $this->Model_admin->if_admin_update_product($product_id, \n $product_categories);\n }", "title": "" }, { "docid": "1da42db71e95f295f72078e0b855a83e", "score": "0.6026972", "text": "protected function validateUpdate()\r\n\t{\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "0846ca298907815e33b71a06327b8f6c", "score": "0.60254514", "text": "function isAllowModification() {\n\t\t\treturn $this->getConfig( )->isAllowModification( $this->getStore( ) );\n\t\t}", "title": "" }, { "docid": "d03ff05041570fe10489d9765781090b", "score": "0.6024343", "text": "public function publish(User $user, Product $product)\n {\n return $user->hasAccess(['publish-product']);\n }", "title": "" }, { "docid": "df9229b4c8b3de3f942d209d98f61669", "score": "0.6015403", "text": "public function update(User $user, Role $role)\n {\n //\n\n return $user->hasAnyPermission([ 'Edit' ,'View','Publish']);\n\n\n\n\n }", "title": "" }, { "docid": "caa6f45159b920532ff41906fd620954", "score": "0.5995848", "text": "public function authorize()\n {\n $personAddress = $this->findFromUrl('person_address');\n return $this->user()->can('update', $personAddress);\n }", "title": "" }, { "docid": "52958f1ed6acbebdbcb8be7030d2806e", "score": "0.59955496", "text": "public function update(User $user, Post $post)\n {\n return ($user->permissions($this->module)->contains('*') ||\n $user->permissions($this->module)->contains('update'))\n && ($user->id == $post->user_id || $post->user_id == 0)\n ? Response::allow()\n : Response::deny('This content is locked.');\n }", "title": "" }, { "docid": "d8663f8f7009e8506325f7d7cf1b4978", "score": "0.59896696", "text": "public function authorize() {\n\t\treturn Gate::allows('update-settings');\n\t}", "title": "" }, { "docid": "02d8bbc6e0fa489585c48c0da35d267c", "score": "0.5988638", "text": "public function update(User $user)\n {\n return $user->can('update_visitors');\n }", "title": "" }, { "docid": "c06ca9abaf56c75c7b9b7b0601c04c04", "score": "0.59845114", "text": "public function status(User $user, Product $product)\n {\n return $user->canUser('product_status');\n }", "title": "" }, { "docid": "ae875b2845969978f1b7817073ba4dd5", "score": "0.5978766", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Themevast_MegaMenu::save');\n }", "title": "" }, { "docid": "33f08a7631cd71dee854b1e0c24908cb", "score": "0.5978702", "text": "public function access() {\n\t\tif (\n\t\t\t!t3lib_extMgm::isLoaded('oelib') || !t3lib_extMgm::isLoaded('realty')\n\t\t) {\n\t\t\treturn FALSE;\n\t\t}\n\t\tif (!tx_oelib_db::existsTable('tx_realty_objects')\n\t\t\t|| !tx_oelib_db::existsTable('tx_realty_cities')\n\t\t\t|| !tx_oelib_db::existsTable('tx_realty_districts')\n\t\t\t|| !tx_oelib_db::existsTable('tx_realty_images')\n\t\t) {\n\t\t\treturn FALSE;\n\t\t}\n\n\t\ttry {\n\t\t\t$result = $this->needsToUpdateDistricts()\n\t\t\t\t|| $this->needsToUpdateImages() || $this->needsToUpdateStatus();\n\t\t} catch (tx_oelib_Exception_Database $exception) {\n\t\t\t$result = FALSE;\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" } ]
83156f21307d168dbf4564de2aa677d9
Function convert HTML tags etc on BBcode [b] and replace smiles and quotes
[ { "docid": "63034ff2c6ed8408484c1e04afbc6126", "score": "0.7475412", "text": "function htmltobbcode2($text)\n{\n\n\tif ($editor)\n\t{\n /**\n * Bold font\n */\n $text = str_replace(\"<b>\",\"[b]\",$text);\n $text = str_replace(\"</b>\",\"[/b]\",$text);\n /**\n * Italic font\n */\n $text = str_replace(\"<i>\",\"[i]\",$text);\n $text = str_replace(\"</i>\",\"[/i]\",$text);\n /**\n * Underline\n */\n $text = str_replace(\"<u>\",\"[u]\",$text);\n $text = str_replace(\"</u>\",\"[/u]\",$text);\n /**\n * Replace smiles\n */\n $text = str_replace(\"<img src=\\\"emoty/usmiech.gif\\\" title=\\\":) - u¶miech\\\">\",\":)\", $text);\n $text = str_replace(\"<img src=\\\"emoty/uoeee.gif\\\" title=\\\":/ - ¶miech\\\">\",\":/\", $text);\n $text = str_replace(\"<img src=\\\"emoty/smutny.gif\\\" title=\\\":( - smutny\\\">\",\":(\", $text);\n $text = str_replace(\"<img src=\\\"emoty/nerwus.gif\\\" title=\\\":[ - nerwus\\\">\",\":[\", $text);\n $text = str_replace(\"<img src=\\\"emoty/jezyk_oko.gif\\\" title=\\\";P - język oko\\\">\",\";P\", $text);\n $text = str_replace(\"<img src=\\\"emoty/jezyk.gif\\\" title=\\\":P - język\\\">\",\":P\", $text);\n $text = str_replace(\"<img src=\\\"emoty/kwadr.gif\\\" title=\\\":] - kwadrat\\\">\",\":]\", $text);\n $text = str_replace(\"<img src=\\\"emoty/ostr.gif\\\" title=\\\":> - ostry\\\">\",\":>\", $text);\n $text = str_replace(\"<img src=\\\"emoty/oczko.gif\\\" title=\\\";) - oczko\\\">\",\";)\", $text);\n $text = str_replace(\"<img src=\\\"emoty/buziak.gif\\\" title=\\\":* - buziak\\\">\",\":*\", $text);\n /**\n * Center text\n */\n $text = str_replace(\"<center>\", \"[center]\", $text);\n $text = str_replace(\"</center>\", \"[/center]\", $text);\n /**\n * Quote text\n */\n $text = str_replace(\"<br />Cytat:<br /><i>\", \"[quote]\", $text);\n $text = str_replace(\"&nbsp;</i>\", \"[/quote]\", $text);\n /*\n * Text Colors\n */\n $text = preg_replace('#\\<span style=\"color:([\\#a-f0-9A-F]*?)\"\\>(.*?)\\</span\\>#si', \"[color=\\\\1]\\\\2[/color]\", $text);\n /**\n * Delete HTML tags\n */\n $text = strip_tags($text);\n /**\n * Return converted text\n */\n\t}\n return $text;\n\t\n}", "title": "" } ]
[ { "docid": "b437e31da9d31eb92b53d732a22d073c", "score": "0.7881601", "text": "function bbcodetohtml2($text)\n{\n\n\n\t\n\t\n\t/**\n * Delete HTML tags from text\n */\n //$text = htmlspecialchars($text);\n\n /**\n * Replace bbcode tags\n */\n $arrBBon = array('[b]', '[i]', '[u]', '[center]', '[quote]');\n $arrBBoff = array('[/b]', '[/i]', '[/u]', '[/center]', '[/quote]');\n $arrHtmlon = array(\"<b>\", \"<i>\", \"<u>\", \"<center>\", \"<br />Cytat:<br /><i>\");\n $arrHtmloff = array(\"</b>\", \"</i>\", \"</u>\", \"</center>\", \"&nbsp;</i>\");\n $arrRegex = array(\"#\\[b\\](.*?)\\[\\/b\\]#si\", \"#\\[i\\](.*?)\\[\\/i\\]#si\", \"#\\[u\\](.*?)\\[\\/u\\]#si\", \"#\\[center\\]([^\\*]*?)\\[\\/center\\]#si\", \"#\\[quote\\](.*?)\\[\\/quote\\]#si\");\n for ($j = 0; $j < 5; $j++)\n {\n $intTest = preg_match_all($arrRegex[$j], $text, $arrText, PREG_PATTERN_ORDER);\n if ($intTest)\n {\n $i = 0;\n foreach($arrText[1] as $strText)\n {\n $text = str_replace($arrText[0][$i], $arrHtmlon[$j].$strText.$arrHtmloff[$j], $text);\n $i ++;\n }\n }\n $text = str_replace($arrBBon[$j], \"\", $text);\n $text = str_replace($arrBBoff[$j], \"\", $text);\n }\n /**\n * Change \\n on <br />\n */\n $text = nl2br($text);\n /**\n * Add smiles\n */\n $text = str_replace(\"<img src=\\\"emoty/usmiech.gif\\\" title=\\\":) - u¶miech\\\">\",\":)\", $text);\n $text = str_replace(\"<img src=\\\"emoty/uoeee.gif\\\" title=\\\":/ - ¶miech\\\">\",\":/\", $text);\n $text = str_replace(\"<img src=\\\"emoty/smutny.gif\\\" title=\\\":( - smutny\\\">\",\":(\", $text);\n $text = str_replace(\"<img src=\\\"emoty/nerwus.gif\\\" title=\\\":[ - nerwus\\\">\",\":[\", $text);\n $text = str_replace(\"<img src=\\\"emoty/jezyk_oko.gif\\\" title=\\\";P - język oko\\\">\",\";P\", $text);\n $text = str_replace(\"<img src=\\\"emoty/jezyk.gif\\\" title=\\\":P - język\\\">\",\":P\", $text);\n $text = str_replace(\"<img src=\\\"emoty/kwadr.gif\\\" title=\\\":] - kwadrat\\\">\",\":]\", $text);\n $text = str_replace(\"<img src=\\\"emoty/ostr.gif\\\" title=\\\":> - ostry\\\">\",\":>\", $text);\n $text = str_replace(\"<img src=\\\"emoty/oczko.gif\\\" title=\\\";) - oczko\\\">\",\";)\", $text);\n $text = str_replace(\"<img src=\\\"emoty/buziak.gif\\\" title=\\\":* - buziak\\\">\",\":*\", $text);\n $linkpatterns = array('#(http|https|ftp):\\/\\/[a-zA-Z0-9\\-.]+\\.[a-zA-Z]+(:[0-9]{1,5})?(\\/[^<\\n\\s]*)?#',\n '#([^\\/]{2})(www\\.[a-zA-Z0-9\\-.]+\\.[a-zA-Z]{1,4}(:[0-9]{1,5})?(\\/[^<\\n\\s]*)?)#');\n $linkchanges = array('<a href=\"\\0\" target=\"_blank\">\\0</a>',\n '\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>');\n //$text = preg_replace($linkpatterns, $linkchanges, $text);\n // Add \"climate\" to things written between asterisks (*text*)\n $text = preg_replace(\"#\\*[^\\*]*\\*#si\", ' <span style=\"color: #C0C0C0;\"> \\\\0 </span> ', $text);\n /*\n * Colors in text\n */\n $text = preg_replace(\"#\\[color=([\\#a-f0-9A-F]*?)\\](.*?)\\[/color\\]#si\", \"<span style=\\\"color:\\\\1\\\">\\\\2</span>\", $text);\n\n // s - to accept also newline characters\n /** $text = str_replace(\"&nbsp;</i>\", \"[/quote]\", $text);\n\n * Return converted text\n */\n\t\n return $text;\n\t\n\t\n}", "title": "" }, { "docid": "cf220983c084ac49fc4c08bca7c74745", "score": "0.7878636", "text": "function bbcode_to_html($bbtext){\r\n $bbtags = array(\r\n \"[b]\" => \"<span style='font-weight:bold;'>\", \"[/b]\" => \"</span>\",\r\n \"[i]\" => \"<span style='font-weight:bold;'>\", \"[/i]\" => \"</span>\",\r\n \"[u]\" => \"<span style='text-decoration:underline;'>\", \"[/u]\" => \"</span>\",\r\n );\r\n\r\n $bbtext = str_ireplace(array_keys($bbtags), array_values($bbtags), $bbtext);\r\n\r\n $bbextended = array(\r\n \"/\\[url](.*?)\\[\\/url]/i\" => \"<a href='http://$1' title='$1'>$1</a>\",\r\n \"/\\[url=(.*?)\\](.*?)\\[\\/url\\]/i\" => \"<a href='$1' title='$1'>$2</a>\",\r\n \"/\\[img](.*?)\\[\\/img]/i\" => \"<img src='$1' alt='$1'>\" );\r\n\r\n foreach($bbextended as $match=>$replacement){\r\n $bbtext = preg_replace($match, $replacement, $bbtext);\r\n }\r\n return $bbtext;\r\n}", "title": "" }, { "docid": "67b71ac97e0089078120d5f847f1920c", "score": "0.7534387", "text": "function bbcode2html($text) {\r\n $search = array( \r\n '/\\[b\\](.*?)\\[\\/b\\]/is', \r\n '/\\[i\\](.*?)\\[\\/i\\]/is', \r\n '/\\[u\\](.*?)\\[\\/u\\]/is', \r\n '/\\[img\\](https?.*?)\\[\\/img\\]/is', \r\n '/\\[url\\](https?.*?)\\[\\/url\\]/is', \r\n '/\\[url=(https?.*?)\\](.*?)\\[\\/url\\]/is' \r\n ); \r\n $replace = array( \r\n '<strong>$1</strong>', \r\n '<em>$1</em>', \r\n '<u>$1</u>', \r\n '<img src=\"$1\" />', \r\n '<a href=\"$1\">$1</a>', \r\n '<a href=\"$1\">$2</a>' \r\n ); \r\n return preg_replace($search, $replace, $text);\r\n}", "title": "" }, { "docid": "aaa38f3bfdbfb11d7c2529cde803bb66", "score": "0.7485142", "text": "function format_bbCode($t)\r\n// remplace les balises BBCode par des balises HTML\r\n{\r\n // barre horizontale\r\n $t=str_replace(\"[/]\", \"<hr width=\\\"100%\\\" size=\\\"1\\\" />\", $t);\r\n $t=str_replace(\"[hr]\", \"<hr width=\\\"100%\\\" size=\\\"1\\\" />\", $t);\r\n\r\n // gras\r\n $t=str_replace(\"[b]\", \"<strong>\", $t);\r\n $t=str_replace(\"[/b]\", \"</strong>\", $t);\r\n\r\n // italique\r\n $t=str_replace(\"[i]\", \"<em>\", $t);\r\n $t=str_replace(\"[/i]\", \"</em>\", $t);\r\n\r\n // soulignement\r\n $t=str_replace(\"[u]\", \"<u>\", $t);\r\n $t=str_replace(\"[/u]\", \"</u>\", $t);\r\n\r\n // alignement centré\r\n $t=str_replace(\"[center]\", \"<div style=\\\"text-align: center\\\">\", $t);\r\n $t=str_replace(\"[/center]\", \"</div>\", $t);\r\n\r\n // alignement à droite\r\n $t=str_replace(\"[right]\", \"<div style=\\\"text-align: right\\\">\", $t);\r\n $t=str_replace(\"[/right]\", \"</div>\", $t);\r\n\r\n // alignement justifié\r\n $t=str_replace(\"[justify]\", \"<div style=\\\"text-align: justify\\\">\", $t);\r\n $t=str_replace(\"[/justify]\", \"</div>\", $t);\r\n\r\n // couleur\r\n $t=str_replace(\"[/color]\", \"</span>\", $t);\r\n $regCouleur=\"/\\[color= ?(([[:alpha:]]+)|(#[[:digit:][:alpha:]]{6})) ?\\]/i\";\r\n $t=preg_replace($regCouleur, \"<span style=\\\"color: \\\\1\\\">\", $t);\r\n\r\n // taille des caractères\r\n $t=str_replace(\"[/size]\", \"</span>\", $t);\r\n $regCouleur=\"/\\[size= ?([[:digit:]]+) ?\\]/i\";\r\n $t=preg_replace($regCouleur, \"<span style=\\\"font-size: \\\\1px\\\">\", $t);\r\n\r\n // lien\r\n $regLienSimple=\"/\\[url\\] ?([^\\[]*) ?\\[\\/url\\]/i\";\r\n $regLienEtendu=\"/\\[url ?=([^\\[]*) ?] ?([^]]*) ?\\[\\/url\\]/i\";\r\n if (preg_match($regLienSimple, $t)) \r\n $t=preg_replace($regLienSimple, '<a href=\"\\\\1\">\\\\1</a>', $t);\r\n else $t=preg_replace($regLienEtendu, '<a href=\"\\\\1\" target=\"_blank\">\\\\2</a>', $t);\r\n\r\n return $t;\r\n}", "title": "" }, { "docid": "8607b59d34342fe292751bd26a1dc3eb", "score": "0.7461431", "text": "function BBCodeToHTML($text){\n\n\t$patterns[] = \"#&#\";\n\t$replacements[] = '&amp;';\n\n\t$patterns[] = \"#<#\";\n\t$replacements[] = '&lt;';\n\n\t$patterns[] = \"#>#\";\n\t$replacements[] = '&gt;';\n\n\t$patterns[] = \"# #si\";\n\t$replacements[] = '&nbsp;&nbsp;';\n\n\t$patterns[] = \"#\\t#si\";\n\t$replacements[] = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';\n\n\t$patterns[] = \"#\\[(\\/)indent\\]#si\";\n\t$replacements[] = '<$1blockquote>';\n\n\t$patterns[] = \"#\\[(sub|sup|strike|blockquote|b|i|u)\\]#si\";\n\t$replacements[] = '<$1>';\n\n\t$patterns[] = \"#\\[\\/(sub|sup|strike|blockquote|b|i|u)\\]#si\";\n\t$replacements[] = '</$1>';\n\n\t$patterns[] = \"#\\[font=(.*?)\\]#si\";\n\t$replacements[] = '<font face=\"$1\">';\n\n\t$patterns[] = \"#\\[color=(.*?)\\]#si\";\n\t$replacements[] = '<font color=\"$1\">';\n\n\t$patterns[] = \"#\\[size=(.*?)\\]#si\";\n\t$replacements[] = '<font size=\"$1\">';\n\n\t$patterns[] = \"#\\[highlight=(.*?)\\]#si\";\n\t$replacements[] = '<font style=\"background-color:$1\">';\n\n\t$patterns[] = \"#\\[\\/(font|color|size|highlight)\\]#si\";\n\t$replacements[] = '</font>';\n\n\t$patterns[] = \"#\\[center\\]#si\";\n\t$replacements[] = '<div align=\"center\">';\n\n\t$patterns[] = \"#\\[left\\]#si\";\n\t$replacements[] = '<div align=\"left\">';\n\n\t$patterns[] = \"#\\[right\\]#si\";\n\t$replacements[] = '<div align=\"right\">';\n\n\t$patterns[] = \"#\\[justify\\]#si\";\n\t$replacements[] = '<div align=\"justify\">';\n\n\t$patterns[] = \"#\\[\\/(center|left|right|justify)\\]#si\";\n\t$replacements[] = '</div>';\n\n\t$patterns[] = \"#\\[email=(.*?)\\]#si\";\n\t$replacements[] = '<a href=\"mailto:$1\">';\n\n\t$patterns[] = \"#\\[email\\](.*?)\\[\\/email\\]#si\";\n\t$replacements[] = '<a href=\"mailto:$1\">$1[/email]';\n\n\t$patterns[] = \"#\\[url=(.*?)\\]#si\";\n\t$replacements[] = '<a href=\"$1\">';\n\n\t$patterns[] = \"#\\[url\\](.*?)\\[\\/url\\]#si\";\n\t$replacements[] = '<a href=\"$1\">$1[/url]';\n\n\t$patterns[] = \"#\\[img\\](.*?)\\[\\/img\\]#si\";\n\t$replacements[] = '<img src=\"$1\">';\n\n\t$patterns[] = \"#\\[img=(.*?)\\]\\[\\/img\\]#si\";\n\t$replacements[] = '<img src=\"$1\">';\n\n\t$patterns[] = \"#\\n+(\\[list\\])#si\";\n\t$replacements[] = '[LIST]';\n\n\t$patterns[] = \"#\\n+(\\[list=1\\])#si\";\n\t$replacements[] = '[LIST=1]';\n\n\t$patterns[] = \"#\\n+(\\[\\/list\\])#si\";\n\t$replacements[] = '[/LIST]';\n\n\t$patterns[] = \"#\\[list\\]\\n+#si\";\n\t$replacements[] = '[LIST]';\n\n\t$patterns[] = \"#\\[list=1\\]\\n+#si\";\n\t$replacements[] = '[LIST=1]';\n\n\t$patterns[] = \"#\\[\\/list\\]\\n+#si\";\n\t$replacements[] = '[\\/LIST]';\n\n\t$patterns[] = \"#\\[hr\\]#si\";\n\t$replacements[] = '<hr>';\n\n\t$patterns[] = \"#\\[\\/(email|url)\\]#si\";\n\t$replacements[] = '</a>';\n\n\t$patterns[] = \"#\\[list=1\\]#si\";\n\t$replacements[] = '<ol>';\n\n\t$patterns[] = \"#\\[list\\]#si\";\n\t$replacements[] = '<ul>';\n\n\t$patterns[] = \"#\\[\\*\\]#si\";\n\t$replacements[] = '<li>';\n\n\t$patterns[] = \"#\\n#si\";\n\t$replacements[] = '<br>';\n\n\t$patterns[] = \"#<br[^>]*><li>#si\";\n\t$replacements[] = '<li>';\n\n\t$patterns[] = \"#<br[^>]*> <li>#si\";\n\t$replacements[] = '<li>';\n\n\t$patterns[] = \"#<br[^>]*><\\/li>#si\";\n\t$replacements[] = '</li>';\n\n\t$patterns[] = \"#\\[\\/list\\]#si\";\n\t$replacements[] = '</list>';\n\n\t$patterns[] = \"#\\[FLASH=(.*?),(.*?)\\](.*?)\\[\\/FLASH\\]#si\";\n\t$replacements[] = '<object width=\"$1\" height=\"$2\"><param name=\"movie\" value=\"$3\"></param><param name=\"wmode\" value=\"transparent\"></param><embed src=\"$3\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"$1\" height=\"$2\"></embed></object>';\n\n\t$text = preg_replace($patterns, $replacements, $text);\n\t\n\tif (preg_match(\"/<ol/si\",$text) || preg_match(\"/<ul/si\",$text)){\n\t\t$array=split(\"<\",$text);\n\t\t$output=\"\";\n\t\t$x=0;\n\t\tforeach($array as $line){\n\t\t\tif($x>0)$line=\"<\".$line;\n\t\t\tif(preg_match(\"/<ol/i\",$line)){\n\t\t\t\t$temp=\"</ol>\";\n\t\t\t}\n\t\t\telseif(preg_match(\"/<ul/i\",$line)){\n\t\t\t\t$temp=\"</ul>\";\n\t\t\t}\n\t\t\tif(preg_match(\"/<\\/list>/i\",$line)){\n\t\t\t\t$line=str_replace(\"</list>\",$temp,$line);\n\t\t\t}\n\t\t\t$output.=$line;\n\t\t\t$x++;\n\t\t}\n\t}\n\telse{\n\t\t$output=$text;\n\t}\n\n\treturn $output;\n}", "title": "" }, { "docid": "f2a85124c929c56522583e5b001075d3", "score": "0.7304387", "text": "public function ConvertBBCodeToHTML($argBBCodeText)\n {\n $bbtags = array\n (\n // Font and text\n '/(?<!\\\\\\\\)\\[h1(?::\\w+)?\\](.*?)\\[\\/h1(?::\\w+)?\\]/si' \n => '<h1>\\1</h1>', // Defines HTML headings\n '/(?<!\\\\\\\\)\\[h2(?::\\w+)?\\](.*?)\\[\\/h2(?::\\w+)?\\]/si' \n => '<h2>\\1</h2>', // Defines HTML headings\n '/(?<!\\\\\\\\)\\[h3(?::\\w+)?\\](.*?)\\[\\/h3(?::\\w+)?\\]/si' \n => '<h3>\\1</h3>', // Defines HTML headings\n '/(?<!\\\\\\\\)\\[h4(?::\\w+)?\\](.*?)\\[\\/h4(?::\\w+)?\\]/si' \n => '<h4>\\1</h4>', // Defines HTML headings\n '/(?<!\\\\\\\\)\\[h5(?::\\w+)?\\](.*?)\\[\\/h5(?::\\w+)?\\]/si' \n => '<h5>\\1</h5>', // Defines HTML headings\n '/(?<!\\\\\\\\)\\[h6(?::\\w+)?\\](.*?)\\[\\/h6(?::\\w+)?\\]/si' \n => '<h6>\\1</h6>', // Defines HTML headings\n\n '/(?<!\\\\\\\\)\\[bold(?::\\w+)?\\](.*?)\\[\\/bold(?::\\w+)?\\]/si' \n => '<span class=\"bold\">\\1</span>', // Defines bold text\n '/(?<!\\\\\\\\)\\[b(?::\\w+)?\\](.*?)\\[\\/b(?::\\w+)?\\]/si' \n => '<span class=\"bold\">\\1</span>', // Defines bold text\n '/(?<!\\\\\\\\)\\[italic(?::\\w+)?\\](.*?)\\[\\/italic(?::\\w+)?\\]/si' \n => '<span class=\"italic\">\\1</span>', // The browser displays an italic font style\n '/(?<!\\\\\\\\)\\[i(?::\\w+)?\\](.*?)\\[\\/i(?::\\w+)?\\]/si' \n => '<span class=\"italic\">\\1</span>', // The browser displays an italic font style\n '/(?<!\\\\\\\\)\\[underline(?::\\w+)?\\](.*?)\\[\\/underline(?::\\w+)?\\]/si' \n => '<span class=\"underline\">\\1</span>', //Defines a line below the text\n '/(?<!\\\\\\\\)\\[u(?::\\w+)?\\](.*?)\\[\\/u(?::\\w+)?\\]/si' \n => '<span class=\"underline\">\\1</span>', //Defines a line below the text\n '/(?<!\\\\\\\\)\\[s(?::\\w+)?\\](.*?)\\[\\/s(?::\\w+)?\\]/si' \n => '<span class=\"strikethrough\">\\1</span>', // Strikethrough\n '/(?<!\\\\\\\\)\\[sup(?::\\w+)?\\](.*?)\\[\\/sup(?::\\w+)?\\]/si' \n => '<sup>\\1</sup>', // Superscript\n '/(?<!\\\\\\\\)\\[sub(?::\\w+)?\\](.*?)\\[\\/sub(?::\\w+)?\\]/si' \n => '<sub>\\1</sub>', // Subscript\n \n '/(?<!\\\\\\\\)\\[left(?::\\w+)?\\](.*?)\\[\\/left(?::\\w+)?\\]/si' \n => '<div class=\"left\">\\1</div>', // Aligns the text to the left\n '/(?<!\\\\\\\\)\\[right(?::\\w+)?\\](.*?)\\[\\/right(?::\\w+)?\\]/si' \n => '<div class=\"right\">\\1</div>', // Aligns the text to the right\n '/(?<!\\\\\\\\)\\[center(?::\\w+)?\\](.*?)\\[\\/center(?::\\w+)?\\]/si' \n => '<div class=\"center\">\\1</div>', // Centers the text\n '/(?<!\\\\\\\\)\\[justify(?::\\w+)?\\](.*?)\\[\\/justify(?::\\w+)?\\]/si' \n => '<div class=\"justify\">\\1</div>', // Stretches the lines so that each line has equal width\n \n // Font Names\n '/(?<!\\\\\\\\)\\[font(?::\\w+)?=Arial\\](.*?)\\[\\/font(?::\\w+)?\\]/si'\n => \"<span class=\\\"arial\\\">\\\\1</span>\", // Arial\n '/(?<!\\\\\\\\)\\[font(?::\\w+)?=Georgia\\](.*?)\\[\\/font(?::\\w+)?\\]/si'\n => \"<span class=\\\"georgia\\\">\\\\1</span>\", // Georgia\n '/(?<!\\\\\\\\)\\[font(?::\\w+)?=Impact\\](.*?)\\[\\/font(?::\\w+)?\\]/si'\n => \"<span class=\\\"impact\\\">\\\\1</span>\", // Impact\n '/(?<!\\\\\\\\)\\[font(?::\\w+)?=Symbol\\](.*?)\\[\\/font(?::\\w+)?\\]/si'\n => \"<span class=\\\"symbol\\\">\\\\1</span>\", // Symbol\n '/(?<!\\\\\\\\)\\[font(?::\\w+)?=Tahoma\\](.*?)\\[\\/font(?::\\w+)?\\]/si'\n => \"<span class=\\\"tahoma\\\">\\\\1</span>\", // Tahoma\n '/(?<!\\\\\\\\)\\[font(?::\\w+)?=Times New Roman\\](.*?)\\[\\/font(?::\\w+)?\\]/si'\n => \"<span class=\\\"tnr\\\">\\\\1</span>\", // Times New Roman\n '/(?<!\\\\\\\\)\\[font(?::\\w+)?=Verdana\\](.*?)\\[\\/font(?::\\w+)?\\]/si'\n => \"<span class=\\\"verdana\\\">\\\\1</span>\", // Verdana\n '/(?<!\\\\\\\\)\\[font(?::\\w+)?=Webdings\\](.*?)\\[\\/font(?::\\w+)?\\]/si'\n => \"<span class=\\\"webdings\\\">\\\\1</span>\", // Webdings\n // Font Colors\n '/(?<!\\\\\\\\)\\[color(?::\\w+)?=Black\\](.*?)\\[\\/color(?::\\w+)?\\]/si' \n => \"<span class=\\\"black\\\">\\\\1</span>\", // Black\n '/(?<!\\\\\\\\)\\[color(?::\\w+)?=DarkBlue\\](.*?)\\[\\/color(?::\\w+)?\\]/si' \n => \"<span class=\\\"darkblue\\\">\\\\1</span>\", // DarkBlue\n '/(?<!\\\\\\\\)\\[color(?::\\w+)?=Blue\\](.*?)\\[\\/color(?::\\w+)?\\]/si' \n => \"<span class=\\\"blue\\\">\\\\1</span>\", // Blue\n '/(?<!\\\\\\\\)\\[color(?::\\w+)?=DarkRed\\](.*?)\\[\\/color(?::\\w+)?\\]/si' \n => \"<span class=\\\"darkred\\\">\\\\1</span>\", // DarkRed\n '/(?<!\\\\\\\\)\\[color(?::\\w+)?=Red\\](.*?)\\[\\/color(?::\\w+)?\\]/si' \n => \"<span class=\\\"red\\\">\\\\1</span>\", // Red\n '/(?<!\\\\\\\\)\\[color(?::\\w+)?=Brown\\](.*?)\\[\\/color(?::\\w+)?\\]/si' \n => \"<span class=\\\"brown\\\">\\\\1</span>\", // Brown\n '/(?<!\\\\\\\\)\\[color(?::\\w+)?=Orange\\](.*?)\\[\\/color(?::\\w+)?\\]/si' \n => \"<span class=\\\"orange\\\">\\\\1</span>\", // Orange\n '/(?<!\\\\\\\\)\\[color(?::\\w+)?=Olive\\](.*?)\\[\\/color(?::\\w+)?\\]/si' \n => \"<span class=\\\"olive\\\">\\\\1</span>\", // Olive\n '/(?<!\\\\\\\\)\\[color(?::\\w+)?=Green\\](.*?)\\[\\/color(?::\\w+)?\\]/si' \n => \"<span class=\\\"green\\\">\\\\1</span>\", // Green\n '/(?<!\\\\\\\\)\\[color(?::\\w+)?=Yellow\\](.*?)\\[\\/color(?::\\w+)?\\]/si' \n => \"<span class=\\\"yellow\\\">\\\\1</span>\", // Yellow\n '/(?<!\\\\\\\\)\\[color(?::\\w+)?=Indigo\\](.*?)\\[\\/color(?::\\w+)?\\]/si' \n => \"<span class=\\\"indigo\\\">\\\\1</span>\", // Indigo\n '/(?<!\\\\\\\\)\\[color(?::\\w+)?=Violet\\](.*?)\\[\\/color(?::\\w+)?\\]/si' \n => \"<span class=\\\"violet\\\">\\\\1</span>\", // Violet\n '/(?<!\\\\\\\\)\\[color(?::\\w+)?=Cyan\\](.*?)\\[\\/color(?::\\w+)?\\]/si' \n => \"<span class=\\\"cyan\\\">\\\\1</span>\", // Cyan\n '/(?<!\\\\\\\\)\\[color(?::\\w+)?=White\\](.*?)\\[\\/color(?::\\w+)?\\]/si' \n => \"<span class=\\\"white\\\">\\\\1</span>\", // White\n // Font Sizes\n '/(?<!\\\\\\\\)\\[size(?::\\w+)?=7\\](.*?)\\[\\/size(?::\\w+)?\\]/si'\n => \"<span class=\\\"tiny\\\">\\\\1</span>\", // Tiny\n '/(?<!\\\\\\\\)\\[size(?::\\w+)?=9\\](.*?)\\[\\/size(?::\\w+)?\\]/si'\n => \"<span class=\\\"small\\\">\\\\1</span>\", // Small\n '/(?<!\\\\\\\\)\\[size(?::\\w+)?=12\\](.*?)\\[\\/size(?::\\w+)?\\]/si'\n => \"<span class=\\\"normal\\\">\\\\1</span>\", // Normal\n '/(?<!\\\\\\\\)\\[size(?::\\w+)?=18\\](.*?)\\[\\/size(?::\\w+)?\\]/si'\n => \"<span class=\\\"medium\\\">\\\\1</span>\", // Medium\n '/(?<!\\\\\\\\)\\[size(?::\\w+)?=24\\](.*?)\\[\\/size(?::\\w+)?\\]/si'\n => \"<span class=\\\"large\\\">\\\\1</span>\", // Large\n '/(?<!\\\\\\\\)\\[size(?::\\w+)?=30\\](.*?)\\[\\/size(?::\\w+)?\\]/si'\n => \"<span class=\\\"huge\\\">\\\\1</span>\", // Huge\n\n /* We only use code for <pre></pre> tags\n * We don't want to allow preformatted text otherwise\n '/(?<!\\\\\\\\)\\[preformatted(?::\\w+)?\\](.*?)\\[\\/preformatted(?::\\w+)?\\]/si' \n => \"<pre>\\\\1</pre>\", // Defines preformatted text\n '/(?<!\\\\\\\\)\\[pre(?::\\w+)?\\](.*?)\\[\\/pre(?::\\w+)?\\]/si' \n => \"<pre>\\\\1</pre>\", // Defines preformatted text\n */ \n \n // List\n '/\\[\\*(?::\\w+)?\\]\\s*([^\\[]*)/si' \n => '<li class=\"ng_list_item\">\\1</li>', // List\n '/\\[list(?::\\w+)?\\](.*?)\\[\\/list(?::\\w+)?\\]/si' \n => '<ul class=\"ng_list\">\\1</ul>', // Defines an unordered list\n '/\\[list(?::\\w+)?\\](.*?)\\[\\/list:u(?::\\w+)?\\]/s' \n => '<ul class=\"ng_list\">\\1</ul>', // Defines an unordered list\n '/\\[list(?::\\w+)?\\](.*?)\\[\\/list:o(?::\\w+)?\\]/s' \n => '<ol class=\"ng_list\" style=\"list-style-type:decimal;\">\\1</ol>', // Defines an ordered list\n '/\\[list=1(?::\\w+)?\\](.*?)\\[\\/list(?::\\w+)?\\]/si' \n => '<ol class=\"list_by_1\">\\1</ol>', // Defines an ordered list sort by \"1\"\n '/\\[list=i(?::\\w+)?\\](.*?)\\[\\/list(?::\\w+)?\\]/s' \n => '<ol class=\"list_by_i\">\\1</ol>', // Defines an ordered list sort by \"i\"\n '/\\[list=I(?::\\w+)?\\](.*?)\\[\\/list(?::\\w+)?\\]/s' \n => '<ol class=\"list_by_I\">\\1</ol>', // Defines an ordered list sort by \"I\"\n '/\\[list=a(?::\\w+)?\\](.*?)\\[\\/list(?::\\w+)?\\]/s' \n => '<ol class=\"list_by_a\">\\1</ol>', // Defines an ordered list sort by \"a\"\n '/\\[list=A(?::\\w+)?\\](.*?)\\[\\/list(?::\\w+)?\\]/s' \n => '<ol class=\"list_by_A\">\\1</ol>', // Defines an ordered list sort by \"A\"\n '/\\[list=(?::\\w+)?\\](.*?)\\[\\/list(?::\\w+)?\\]/si' \n => '<ol class=\"list_by_1\">\\1</ol>', // Defines a malformed ordered list sort by \"1\" \n /*\n // Url\n '/(?<!\\\\\\\\)\\[url(?::\\w+)?\\](.*?)\\[\\/url(?::\\w+)?\\]/si' \n => '<a href=\"\\1\" target=\"_blank\" class=\"bb-url\">\\1</a>', // URL\n '/(?<!\\\\\\\\)\\[url(?::\\w+)?=(.*?)?\\](.*?)\\[\\/url(?::\\w+)?\\]/si' \n => '<a href=\"\\1\" target=\"_blank\" class=\"bb-url\">\\2</a>', // URL with text\n */\n // Email\n '/(?<!\\\\\\\\)\\[email(?::\\w+)?=(.*?)\\](.*?)\\[\\/email(?::\\w+)?\\]/si' \n => '<a href=\"mailto:\\1\" class=\"bb-email\">\\2</a>', // Send e-mail\n \n // Image\n '/(?<!\\\\\\\\)\\[img=left(?::\\w+)?\\](.*?)\\[\\/img(?::\\w+)?\\]/si' \n => '<img src=\"\\1\" align=\"left\" alt=\"\\1\" class=\"img=left\" />', // Insert image left\n '/(?<!\\\\\\\\)\\[img(?::\\w+)?\\](.*?)\\[\\/img(?::\\w+)?\\]/si' \n => '<img src=\"\\1\" alt=\"\\1\" class=\"image\" />', // Insert image\n '/(?<!\\\\\\\\)\\[img=right(?::\\w+)?\\](.*?)\\[\\/img(?::\\w+)?\\]/si' \n => '<img src=\"\\1\" align=\"right\" alt=\"\\1\" class=\"img=right\" />', // Insert image right\n '/(?<!\\\\\\\\)\\[img=(?::\\w+)?\\](.*?)\\[\\/img(?::\\w+)?\\]/si' \n => '<img src=\"\\1\" alt=\"\\1\" class=\"image\" />', // Insert image (malformed input)\n \n \n // Youtube\n // TODO: more possible youtube url forms\n '/(?<!\\\\\\\\)\\[you_tube(?::\\w+)?\\].*?(?:v=)?([^?&[]+)(&[^[]*)?\\[\\/you_tube(?::\\w+)?\\]/si' \n => '<embed width=\"420\" height=\"345\" src=\"http://www.youtube.com/v/\\1\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\">', // Embed youtube videos\n \n // Spoiler\n '/(?<!\\\\\\\\)\\[spoiler(?::\\w+)?\\](.*?)\\[\\/spoiler(?::\\w+)?\\]/si' \n => \"<div class=\\\"spoiler\\\"><input name=\\\"spoiler_button\\\" class=\\\"button\\\" type=\\\"button\\\" value=\\\"Εμφάνιση Spoiler\\\"></div><div class=\\\"content\\\"><div class=\\\"text\\\">\\\\1</div></div>\", // Spoiler\n \n /* Gpower2: We don't want to support moving text\n // Moving text\n '/(?<!\\\\\\\\)\\[move(?::\\w+)?\\](.*?)\\[\\/move(?::\\w+)?\\]/si' \n => \"<marquee behavior=\\\"scroll\\\" direction=\\\"left\\\" scrollamount=\\\"10\\\">\\\\1</marquee>\", // Scrolling text\n */\n \n // Line break\n '/(?<!\\\\\\\\)\\[break(?::\\w+)?\\]/si' => '<br />', // Defines a single line break\n '/(?<!\\\\\\\\)\\[br(?::\\w+)?\\]/si' => '<br />', // Defines a single line break\n '/(?<!\\\\\\\\)\\[newline(?::\\w+)?\\]/si' => '<br />', // Defines a single line break\n );\n \n // Replace HTML characters to avoid javascript run\n $finalString = str_replace(array('<', '>'), array('&lt;', '&gt;'), $argBBCodeText);\n \n // Parse links\n $url_regex = '/(?:(?<!(\\[\\/url\\]|\\[\\/url=))(\\s|^))'; // No [url]-tag in front and is start of string\n $url_regex.= '('; // Start capturing URL\n $url_regex.= '(https?|ftps?|ircs?):\\/\\/'; // Protocol\n $url_regex.= '[\\w\\d\\.\\/#\\_\\-\\?:=]+'; // Any non-space character\n $url_regex.= ')'; // Stop capturing URL\n $url_regex.= '(?:(?<![.,;!?:\\\"\\'()-])(\\/|\\[|\\s|\\.?$))/i'; // Doesn't end with punctuation and is end of string\n $finalString = preg_replace($url_regex,\"$2[url=$3]$3[/url]$5\", $finalString);\n\n $url_regex_w = '/(?:(?<!(\\[\\/url\\]|\\[\\/url=))(\\s|^))';\n $url_regex_w.= '(';\n $url_regex_w.= 'www.';\n $url_regex_w.= '[\\w\\d\\.\\/#\\_\\-\\?:=]+';\n $url_regex_w.= ')';\n $url_regex_w.= '(?:(?<![.,;!?:\\\"\\'()-])(\\/|\\[|\\s|\\.?$))/i';\n $finalString = preg_replace($url_regex_w,\"$2[url=$3]$3[/url]$5\", $finalString);\n\n $find = array(\n \"/\\[url\\=(.+?)\\](.+?)\\[\\/url\\]/is\",\n \"/\\[url\\](.+?)\\[\\/url\\]/is\"\n );\n\n $replace = array(\n \"<a href=\\\"$1\\\" target=\\\"_blank\\\" class=\\\"bb-url\\\">$2</a>\",\n \"<a href=\\\"$1\\\" target=\\\"_blank\\\" class=\\\"bb-url\\\">$1</a>\"\n );\n\n $finalString = preg_replace($find, $replace, $finalString);\n \n // Code\n /*\n * Original code that crashed(!!) Apache\n $finalString = preg_replace('#\\[code\\](((?R)|.)*?)\\[\\/code\\]#se', \n '\"<div class=\\\"code\\\"><div class=\\\"code_title\\\">Code:</div><div class=\\\"code_text\\\"><code>\" . $this->disableBBCodeTags(\"$1\") . \"</code></div></div>\"', \n $argBBCodeText);\n \n // New code that doesn't crash Apache\n $finalString = preg_replace('#\\[code\\](.*?)\\[\\/code\\]#ise', \n '\"<div class=\\\"code\\\"><div class=\\\"code_title\\\">Code:</div><div class=\\\"code_text\\\"><code>\" . $this->disableBBCodeTags(\"$1\") . \"</code></div></div>\"', \n $argBBCodeText);\n */\n // New code (V2) that doesn't crash Apache\n $finalString = preg_replace('#\\[code\\](((?R)|).*?)\\[\\/code\\]#ise', \n '\"<div class=\\\"code\\\"><div class=\\\"code_title\\\">Code:</div><div class=\\\"code_text\\\"><code>\" . $this->disableBBCodeTags(\"$1\") . \"</code></div></div>\"', \n $finalString);\n \n // Quote\n /*\n * Old quote tag\n $finalString = str_replace('[quote]', \n '<blockquote><div class=\"quote\"><div class=\"quote_title\">Quote:</div><div class=\"quote_text\">', \n $finalString);\n $finalString = preg_replace('#\\[quote=(\"|\"|\\'|)(.*)\\\\1\\]#seU', \n '\"<blockquote><div class=\\\"quote\\\"><div class=\\\"quote_title\\\">Quote By: \" . str_replace(array(\\'[\\', \\'\\\\\"\\'), array(\\'[\\', \\'\"\\'), \\'$2\\') . \"</div><div class=\\\"quote_text\\\">\"', \n $finalString); \n $finalString = preg_replace('#\\[\\/quote\\]\\s*#', \n '</div></div></blockquote>', \n $finalString);\n */\n \n // New quote tag\n // Remove the new line after quotes\n $finalString = str_replace(\"[/quote]\\r\\n\", '[/quote]', $finalString);\n\n $pattern = '/\\[quote\\=\\\"(.+?)\\\"\\](.+?)\\[\\/quote\\]/is';\n $replace = \"<blockquote><div class=\\\"quote\\\"><div class=\\\"quote_title\\\">Quote By: $1</div><div class=\\\"quote_text\\\">$2</div></div></blockquote>\";\n\n while(preg_match($pattern, $finalString))\n {\n $finalString = preg_replace($pattern, $replace, $finalString);\n }\n\n $pattern = '/\\[quote\\](.+?)\\[\\/quote\\]/is';\n $replace = \"<blockquote><div class=\\\"quote\\\"><div class=\\\"quote_title\\\">Quote:</div><div class=\\\"quote_text\\\">$1</div></div></blockquote>\";\n\n while(preg_match($pattern, $finalString))\n {\n $finalString = preg_replace($pattern, $replace, $finalString);\n }\n \n // Stop lists having a big gap at the top\n $finalString = str_replace(\"[ul]\\r\\n\", '[ul]', $finalString);\n \n // stop there being a big gap between list items\n $finalString = str_replace('</li><br />', '</li>', $finalString);\n\n // stop there being a big gap after a list is finished\n $finalString = str_replace('</ul><br />', '</ul>', $finalString);\n \n $finalString = preg_replace(array_keys($bbtags), array_values($bbtags), $finalString);\n \n // put back the bbcode parenthesis\n $finalString = $this->enableBBCodeTags($finalString);\n // Gpower2: we should return valid HTML here\n return nl2br($finalString);\n }", "title": "" }, { "docid": "4b31a033045978d7a87512196320c233", "score": "0.7246673", "text": "public static function bbcode($text){\r\n\t\t$text = trim($text);\r\n\t\tif(!function_exists('__codeEscape')){\r\n\t\t\tfunction __codeEscape($str){\r\n\t\t\t\tglobal $text;\r\n\t\t\t\t$text = strip_tags($text);\r\n\t\t\t\t$code = $str[1];\r\n\t\t\t\t$code = htmlspecialchars($code);\r\n\t\t\t\t$code = str_replace('[', '&#91;', $code);\r\n\t\t\t\t$code = str_replace(']', '&#93;', $code);\r\n\t\t\t\treturn '<pre class=\"code\"><code>'.$code.'</code></pre>';\r\n\t\t\t}\r\n\t\t}\r\n\t\t$text = preg_replace_callback('/\\[code\\](.*?)\\[\\/code\\]/ms', \"__codeEscape\", $text);\r\n\t\t$tags = array(\r\n\t\t\t\t\t array(\r\n\t\t\t\t\t\t\t '/\\[b\\](.*?)\\[\\/b\\]/ms'\r\n\t\t\t\t\t\t\t, '/\\[i\\](.*?)\\[\\/i\\]/ms'\r\n\t\t\t\t\t\t\t, '/\\[u\\](.*?)\\[\\/u\\]/ms'\r\n\t\t\t\t\t\t\t, '/\\[img\\](.*?)\\[\\/img\\]/ms'\r\n\t\t\t\t\t\t\t, '/\\[email\\](.*?)\\[\\/email\\]/ms'\r\n\t\t\t\t\t\t\t, '/\\[url\\=\"?(.*?)\"?\\](.*?)\\[\\/url\\]/ms'\r\n\t\t\t\t\t\t\t, '/\\[size\\=\"?(.*?)\"?\\](.*?)\\[\\/size\\]/ms'\r\n\t\t\t\t\t\t\t, '/\\[color\\=\"?(.*?)\"?\\](.*?)\\[\\/color\\]/ms'\r\n\t\t\t\t\t\t\t, '/\\[quote](.*?)\\[\\/quote\\]/ms'\r\n\t\t\t\t\t\t\t, '/\\[list\\=(.*?)\\](.*?)\\[\\/list\\]/ms'\r\n\t\t\t\t\t\t\t, '/\\[list\\](.*?)\\[\\/list\\]/ms'\r\n\t\t\t\t\t\t\t, '/\\[\\*\\]\\s?(.*?)\\n/ms'\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t, array(\r\n\t\t\t\t\t\t\t '<strong>\\1</strong>'\r\n\t\t\t\t\t\t\t, '<em>\\1</em>'\r\n\t\t\t\t\t\t\t, '<u>\\1</u>'\r\n\t\t\t\t\t\t\t, '<img src=\"\\1\" alt=\"\\1\" />'\r\n\t\t\t\t\t\t\t, '<a href=\"mailto:\\1\">\\1</a>'\r\n\t\t\t\t\t\t\t, '<a href=\"\\1\">\\2</a>'\r\n\t\t\t\t\t\t\t, '<span style=\"font-size:\\1%\">\\2</span>'\r\n\t\t\t\t\t\t\t, '<span style=\"color:\\1\">\\2</span>'\r\n\t\t\t\t\t\t\t, '<blockquote>\\1</blockquote>'\r\n\t\t\t\t\t\t\t, '<ol start=\"\\1\">\\2</ol>'\r\n\t\t\t\t\t\t\t, '<ul>\\1</ul>'\r\n\t\t\t\t\t\t\t, '<li>\\1</li>'\r\n\t\t\t\t\t\t)\r\n\t\t\t\t);\r\n\t\t$text = preg_replace($tags[0], $tags[1], $text);\r\n\t\t$text = nl2br($text);\r\n\t\t\r\n\t\tif(!function_exists('__removeTagBr')){\r\n\t\t\tfunction __removeTagBr($str){\r\n\t\t\t\t$str[0] = str_replace(\"<br />\", '', $str[0]);\r\n\t\t\t\treturn str_replace(\"<br>\", '', $str[0]);\r\n\t\t\t}\r\n\t\t}\t\r\n\t\t$text = preg_replace_callback('/<pre class=\"code\">(.*?)<\\/pre>/ms', \"__removeTagBr\", $text);\r\n\t\t$text = preg_replace_callback('/<ul>(.*?)<\\/ul>/ms', \"__removeTagBr\", $text);\r\n\t\treturn $text;\r\n\t}", "title": "" }, { "docid": "af23bd349723e17c1c681f52f384f704", "score": "0.7167727", "text": "function parse_bbcode($text, $xhtml = true)\n{\n\t/* \tCan customize the html tags with CSS classes, can also make new bbcode tags as needed*/\n\t$tags = array(\n\t\t'#\\[b\\](.*?)\\[/b\\]#si' => ($xhtml ? '<strong>\\\\1</strong>' : '<b>\\\\1</b>'),\n\t\t'#\\[i\\](.*?)\\[/i\\]#si' => ($xhtml ? '<em>\\\\1</em>' : '<i>\\\\1</i>'),\n\t\t'#\\[u\\](.*?)\\[/u\\]#si' => ($xhtml ? '<span style=\"text-decoration: underline;\">\\\\1</span>' : '<u>\\\\1</u>'),\n\t\t'#\\[s\\](.*?)\\[/s\\]#si' => ($xhtml ? '<strike>\\\\1</strike>' : '<s>\\\\1</s>'),\n\t\t'#\\[color=(.*?)\\](.*?)\\[/color\\]#si' => ($xhtml ? '<span style=\"color: \\\\1;\">\\\\2</span>' : '<font color=\"\\\\1\">\\\\2</font>'),\n\t\t'#\\[img\\](.*?)\\[/img\\]#si' => ($xhtml ? '<img src=\"\\\\1\" />' : '<img src=\"\\\\1\" >'),\n\t\t'#\\[url=(.*?)\\](.*?)\\[/url\\]#si' => '<a href=\"\\\\1\" title=\"\\\\2\">\\\\2</a>',\n\t\t'#\\[email\\](.*?)\\[/email\\]#si' => '<a href=\"mailto:\\\\1\" title=\"Email \\\\1\">\\\\1</a>',\n\t\t'#\\[code\\](.*?)\\[/code\\]#si' => '<code>\\\\1</code>',\n\t\t'#\\[youtube\\](.*?)\\[/youtube\\]#si' => '<iframe style=\"border: 1px solid #000000;\" id=\"ytplayer\" type=\"text/html\" width=\"534\" height=\"401\" src=\"//www.youtube-nocookie.com/embed/\\\\1\" frameborder=\"0\"/></iframe>',\n\t\t//'#\\[align=(.*?)\\](.*?)\\[/align\\]#si' => ($xhtml ? '<div style=\"text-align: \\\\1;\">\\\\2</div>' : '<div align=\"\\\\1\">\\\\2</div>'),\n\t\t'#\\[br\\]#si' => ($xhtml ? '<br />' : '<br>'),\n '#\\[h1\\](.*?)\\[/h1]#si' => ($xhtml ? '<h2>\\\\1</h2>' : '<h2>\\\\1</h2>'),\n '#\\[h2\\](.*?)\\[/h2]#si' => ($xhtml ? '<h3>\\\\1</h3>' : '<h3>\\\\1</h3>'),\n '#\\[h3\\](.*?)\\[/h3]#si' => ($xhtml ? '<h4>\\\\1</h4>' : '<h4>\\\\1</h4>'),\n '#\\[ul\\](.*?)\\[/ul]#si' => ($xhtml ? '<ul>\\\\1</ul>' : '<ul>\\\\1</ul>'),\n '#\\[ol\\](.*?)\\[/ol]#si' => ($xhtml ? '<ol>\\\\1</ol>' : '<ol>\\\\1</ol>'),\n '#\\[li\\](.*?)\\[/li]#si' => ($xhtml ? '<li>\\\\1</li>' : '<li>\\\\1</li>'),\n '#\\[center\\](.*?)\\[/center]#si' => '<center>\\\\1</center>',\n '#\\[style=\"(.*?)\"\\](.*?)\\[/style\\]#si' => '<span style=\"\\\\1\" >\\\\2</span>',\n '#\\[style=\\'(.*?)\\'\\](.*?)\\[/style\\]#si' => '<span style=\"\\\\1\" >\\\\2</span>',\n\t);\n\t\n\t/* \tIt is optimal to have smilies as complex as possible but not retardedly complex. \n\t\tThis is so that the [CODE] tags won't display smilies. \n\t\t\n\t\tCan also use BBCode as smilies if you want to instead of doing the smilies array.\n\t\tI will make this optional in version 2.0.\n\t\t\n\t*/\t// TODO: Configure smilies\n\t/*$smilies = array(\n\t\t':-)' => '<img src=\"images/smile/smiley.png\" border=\"0\" alt=\"Smile\" title=\"Smile\" />',\n\t\t':-(' => '<img src=\"images/smile/sad.png\" border=\"0\" alt=\"Sad\" title=\"Sad\" />',\n\t\t':-D' => '<img src=\"images/smile/happy.png\" border=\"0\" alt=\"Big Grin\" title=\"Big Grin\" />',\n\t\t';;' => '<img src=\"images/smile/cry.png\" border=\"0\" alt=\"Cry\" title=\"Cry\" />',\n\t\t':-s' => '<img src=\"images/smile/conf.png\" border=\"0\" alt=\"Confused\" title=\"Confused\" />',\n\t\t':-|' => '<img src=\"images/smile/neutral.png\" border=\"0\" alt=\"Meh\" title=\"Meh\" />',\n\t\t':-x' => '<img src=\"images/smile/kiss.png\" border=\"0\" alt=\"Smooches\" title=\"Smooches\" />',\n\t\t';-)' => '<img src=\"images/smile/wink.png\" border=\"0\" alt=\"Wink\" title=\"Wink\" />',\n\t\t':-*' => '<img src=\"images/smile/blush.png\" border=\"0\" alt=\"Blush\" title=\"Blush\" />',\n\t\t':-3' => '<img src=\"images/smile/kitty.png\" border=\"0\" alt=\"Kitty\" title=\"Kitty\" />',\n\t\t'8-|' => '<img src=\"images/smile/eek.png\" border=\"0\" alt=\"Eek\" title=\"Eek\" />',\n\t\t':-@' => '<img src=\"images/smile/fat.png\" border=\"0\" alt=\"Lazy\" title=\"Lazy\" />',\n\t\t':-z' => '<img src=\"images/smile/sleep.png\" border=\"0\" alt=\"Sleep\" title=\"Sleep\" />'\n\t\t// etc\n\t);*/\n\t\n\t/* foreach will look at each word to see if it contains the pre-req's for bbcode or smilies */\n\tforeach ($tags AS $search => $replace)\n\t{\n\t\t$text = preg_replace($search, $replace, $text);\n\t}\n\t\n\t/*foreach ($smilies AS $search => $replace)\n\t{\n\t\t$text = str_replace($search, $replace, $text);\n\t}\n */ \n\t// this returns the completed result\n \n\treturn $text;\n}", "title": "" }, { "docid": "c4e35f4529c9384390ec34a43ce1a05e", "score": "0.7159279", "text": "function bbcode($string){\n\t\n\t$string = preg_replace(\"/(\\[)([a-zA-Z0-9:\\/. _?=&+#|\\-\\\"']+)(\\/?])/e\", \"'\\\\1'.bbcode_pre('\\\\2').'\\\\3'\", $string);\n\t\n\t$string = bbcode_linebreak($string,true);\n\t\n\t$patterns = array();\n\t\n\t$replacements = array();\n\n /* \n\t* BBCODE para URL y URL compuesta\n\t* [url] % [/url] \n\t* [url=\"$1\"] % [/url]\n\t*/\n\t\n\t$patterns[] = \"/(\\[(url|URL)])([a-zA-Z0-9:\\/. _?=&+#|\\-]+)(\\[\\/?(url|URL)])/e\";\n\t\n\t$replacements[] = \"'&lt;a href=\\\"\\\\3\\\" target=\\\"_blank\\\"&gt;\\\\3&lt;/a&gt;'\";\n\t\n\t$patterns[] = \"/(\\[(url|URL)=\\\"([a-zA-Z0-9:\\/. _?=&+#|\\-]+)\\\"])([a-zA-Z0-9:\\/. _?=&+#|\\-\\\"\\]\\[';]+)(\\[\\/?(url|URL)])/e\";\n\t\n\t$replacements[] = \"'&lt;a href=\\\"\\\\3\\\" target=\\\"_blank\\\"&gt;'.no_backslash('\\\\4').'&lt;/a&gt;'\";\t\n\n /* \n\t* BBCODE para imagenes\n\t* [img] % [/img] \n\t*/\n\t \n\t$patterns[] = \"/(\\[(img|IMG)])([a-zA-Z0-9:\\/. _?=&+#|\\-]+)(\\[\\/?(img|IMG)])/e\";\n\t\n\t$replacements[] = \"''.bbcode_is_image('\\\\3').''\";\n\t\n\n /*\n \t* BBCODE para Formato\n */\n\t\n\t$format = \"b|i|s|u\";\n\t\n\t$patterns[] = \"/(\\[)([$format])(])/e\";\n\t$replacements[] = \"'&lt;'.strtolower('\\\\2').'&gt;'\";\n\t \n\t$patterns[] = \"/(\\[)(\\/[$format])(])/e\";\n\t$replacements[] = \"'&lt;'.strtolower('\\\\2').'&gt;'\";\n\t\n\t\n\t$string = preg_replace($patterns, $replacements, $string);\n\t\n\treturn htmlspecialchars_decode($string);\n\n}", "title": "" }, { "docid": "6b903dd3ed5b4ca041945ff7bb06082f", "score": "0.71284264", "text": "function _parseBBCode_tag($match){\nglobal $_lang;\n\n //identifikovani typu, vyhodnoceni\n $type=preg_replace('|^\\[(.*?)\\](.+)|s', '$1', $match[0], 1);\n $match[1]=trim(str_replace('[', '&#91;', $match[1]));\n $output=$match[1];\n\n switch($type){\n\n case 'b':\n $output='<strong>'.$match[1].'</strong>';\n break;\n \n case 'i':\n $output='<em>'.$match[1].'</em>';\n break;\n \n case 'u':\n $output='<u>'.$match[1].'</u>';\n break;\n\n case 'q':\n $output='&quot;'.$match[1].'&quot;';\n break;\n \n case 'img':\n if(_isSafeUrl($match[1])){$output='<img src=\"'.$match[1].'\" alt=\"img\" />';}\n break;\n \n case 'code':\n $output='<span class=\"pre\">'.$match[1].'</span>';\n break;\n \n case 'url':\n if(mb_substr($match[1], 0, 7)!=\"http://\"){$match[1]=\"http://\".$match[1];}\n if(_isSafeUrl($match[1])){$output='<a href=\"'.$match[1].'\" target=\"_blank\" rel=\"nofollow\">'._cutStr(mb_substr($match[1], 7), 48).'</a>';}\n break;\n\n }\n\nreturn $output;\n}", "title": "" }, { "docid": "23bed432f60d13b1f43256d75b7ad5ec", "score": "0.71249676", "text": "function BBCode($text) {\n\t\n\t\t//$text = nl2br($text);\n\t\t$text = str_replace(\"\\n\",\"<br />\",$text);\n\t\t\n\t\t\n\t\t//escape\n\t\t$text = str_replace(\"&egrave;\",\"è\",$text);\n\t\t$text = str_replace(\"&agrave;\",\"à\",$text);\n\t\t$text = str_replace(\"&quot;\",\"\\\"\",$text);\n\t\t$text = str_replace(\"&ugrave;\",\"ù\",$text);\n\t\t$text = str_replace(\"&Igrave;\",\"ì\",$text);\n\t\t$text = str_replace(\"&nbsp;\",\" \",$text);\n\t\t$text = str_replace(\"&euro;\",\"€\",$text);\t\t\t\t\n\t\n\t\t/* Smile */\n\t\t$text = str_replace(\":)\", \"<img alt=\\\":)\\\" src=\\\"img/01.jpg\\\">\", $text);\n\t\t$text = str_replace(\":D\", \"<img alt=\\\":D\\\" src=\\\"img/02.jpg\\\">\", $text);\n\t\t$text = str_replace(\";)\", \"<img alt=\\\";)\\\" src=\\\"img/03.jpg\\\" >\", $text);\n\t\t$text = str_replace(\"^_^\", \"<img alt=\\\"^_^\\\" src=\\\"img/04.gif\\\">\", $text);\n\t\t$text = str_replace(\":(\", \"<img alt=\\\":(\\\" src=\\\"img/06.gif\\\">\", $text);\n\t\t$text = str_replace(\"<<bira>>\", \"<img alt=\\\"bira\\\" src=\\\"img/bira.gif\\\">\", $text);\n\t\t$text = str_replace(\"<<king>>\", \"<img alt=\\\"king\\\" src=\\\"img/king.gif\\\">\", $text);\n\t\t$text = str_replace(\"<<figo>>\", \"<img alt=\\\"figo\\\" src=\\\"img/figo.gif\\\">\", $text);\n\t\t\n\t\t/* BBcode */\n\t\t$text = str_replace(\"[img]\", \"<img src=\\\"\", $text);\n\t\t$text = str_replace(\"[/img]\", \"\\\"><!-- immagine -->\", $text);\n\t\t$text = str_replace(\"[b]\", \"<b>\", $text);\n\t\t$text = str_replace(\"[/b]\", \"</b>\", $text);\n\t\t$text = str_replace(\"[i]\", \"<i>\", $text);\n\t\t$text = str_replace(\"[/i]\", \"</i>\", $text);\n\t\t$text = str_replace(\"[u]\", \"<u>\", $text);\n\t\t$text = str_replace(\"[/u]\", \"</u>\", $text);\n\t\t$text = str_replace(\"[center]\", \"<center>\", $text);\n\t\t$text = str_replace(\"[/center]\", \"</center>\", $text);\n\t\t\n\t\t//Link BBcode\n \t\t$search = array(\n \t\t\t\t\t\"/\\\\[url\\\\](.*?)\\\\[\\\\/url\\\\]/is\", \n \t\t\t\t\t\"/\\\\[url\\\\=(.*?)\\\\](.*?)\\\\[\\\\/url\\\\]/is\", \n \t\t\t\t\t\"/\\\\[youtube\\\\](.*?)\\\\[\\\\/youtube\\\\]/is\"\n \t\t\t\t);\n \t\t\t\t\n \t$replace = array(\n \t\t\t\t\"<a target=\\\"_blank\\\" href=\\\"$1\\\">$1</a>\", \n \t\t\t\t\"<a target=\\\"_blank\\\" href=\\\"$1\\\">$2</a>\", \n \t\t\t\t\"<br /><iframe title=\\\"YouTube video player\\\" width=\\\"480\\\" height=\\\"390\\\" src=\\\"http://www.youtube.com/embed/$1\\\" frameborder=\\\"0\\\" allowfullscreen></iframe>\"\n\t\t\t\t);\n\t\t\t\t\n \t//if(preg_match(\"#(?:http://)?(?:www.)?youtube.(?:com|it)/(?:watch?v=|v/)(.{11})#i\", $text, $parte)) {\n \t//\t$id_code_yt = $parte[1];\n \t//}\n \t\n \t\t$text = preg_replace ($search, $replace, $text);\n\n\t\treturn $text;\n\t}", "title": "" }, { "docid": "741d7aec04575aedca146b57f5f3fb12", "score": "0.70937616", "text": "function strip_phpbb2_tags( $text )\n{\n global $qsf;\n\n // The [html] BBCode tag is not supported by phpbb2 or Quicksilver Forums, so just strip those off and leave the contents.\n $text = preg_replace( '/\\[html\\](.+?)\\[\\/html\\]/si', '\\\\1', $text );\n\n /* Convert email tags.\n * phpBB2 does not have an email tag option in their post menu, but it supports manually entering them.\n */\n $text = preg_replace( '/\\[email\\](.+?)\\[\\/email\\]/si', '[email]\\\\1[/email]', $text );\n $text = preg_replace( '/\\[email=(.+?)\\](.*?)\\[\\/email\\]/si', '[email=\\\\1]\\\\2[/email]', $text );\n\n // Convert URL tags....\n $text = preg_replace( '/\\[url=(.*?)\\](.*?)\\[\\/url\\]/si', '[url]\\\\1[/url]', $text );\n $text = preg_replace( '/\\[url\\](.*?)\\[\\/url\\]/si', '[url]\\\\1[/url]', $text );\n\n /* Convert image tags.\n * We'll even be nice and fix malformed ones in posts.\n */\n $text = preg_replace( '/\\[img=(.*?)\\](.*?)\\[\\/img\\]/si', '[img]\\\\1[/img]', $text );\n $text = preg_replace( '/\\[img(.*?)\\](.*?)\\[\\/img(.*?)\\]/si', '[img]\\\\2[/img]', $text );\n\n // Convert color tags....\n $text = preg_replace( '/\\[color=(.*?):(.*?)\\](.*?)\\[\\/color(.*?)\\]/si', '[color=\\\\1]\\\\3[/color]', $text );\n\n // Font size tags....\n $text = preg_replace( '/\\[size=7:(.*?)\\](.*?)\\[\\/size:(.*?)\\]/si', '[size=1]\\\\2[/size]', $text );\n $text = preg_replace( '/\\[size=9:(.*?)\\](.*?)\\[\\/size:(.*?)\\]/si', '[size=2]\\\\2[/size]', $text );\n $text = preg_replace( '/\\[size=12:(.*?)\\](.*?)\\[\\/size:(.*?)\\]/si', '\\\\2', $text );\n $text = preg_replace( '/\\[size=18:(.*?)\\](.*?)\\[\\/size:(.*?)\\]/si', '[size=5]\\\\2[/size]', $text );\n $text = preg_replace( '/\\[size=24:(.*?)\\](.*?)\\[\\/size:(.*?)\\]/si', '[size=7]\\\\2[/size]', $text );\n $text = preg_replace( '/\\[size=(.+?):(.*?)\\](.*?)\\[\\/size:(.*?)\\]/si', '\\\\3', $text );\n\n // Fix the text formatting tags....\n $text = preg_replace( '/\\[s\\](.*?)\\[\\/s\\]/si', '[s]\\\\2[/s]', $text ); // <- Not actually supported\n $text = preg_replace( '/\\[b:(.*?)\\](.*?)\\[\\/b:(.*?)\\]/si', '[b]\\\\2[/b]', $text );\n $text = preg_replace( '/\\[i:(.*?)\\](.*?)\\[\\/i:(.*?)\\]/si', '[i]\\\\2[/i]', $text );\n $text = preg_replace( '/\\[u:(.*?)\\](.*?)\\[\\/u:(.*?)\\]/si', '[u]\\\\2[/u]', $text );\n\n // Reconfigure code tags....\n $text = preg_replace( '/\\[code:(.*?)\\]/si', '[code]', $text );\n $text = preg_replace( '/\\[\\/code:(.*?)\\]/si', '[/code]', $text );\n\n // Reconfigure quote tags....\n $text = preg_replace( '/\\[quote:(.*?)\\]/si', '[quote]', $text );\n $text = preg_replace( '/\\[\\/quote:(.*?)\\]/si', '[/quote]', $text );\n\n // Now fix the generic junk that's left over....\n $text = str_replace( \"&nbsp;\", \" \", $text );\n $text = str_replace( \"&gt;\", \">\", $text );\n $text = str_replace( \"&lt;\", \"<\", $text );\n $text = str_replace( \"&amp;\", \"&\", $text );\n $text = str_replace( \"&quot;\", \"\\\"\", $text );\n $text = str_replace( \"&#33;\", \"!\", $text );\n $text = str_replace( \"&#033;\", \"!\", $text );\n $text = str_replace( \"&#34;\", \"\\\"\", $text );\n $text = str_replace( \"&#36;\", \"$\", $text );\n $text = str_replace( \"&#036;\", \"$\", $text );\n $text = str_replace( \"&#37;\", \"\\%\", $text );\n $text = str_replace( \"&#39;\", \"'\", $text );\n $text = str_replace( \"&#039;\", \"'\", $text );\n $text = str_replace( \"&#40;\", \"(\", $text );\n $text = str_replace( \"&#41;\", \")\", $text );\n $text = str_replace( \"&#58;\", \":\", $text );\n $text = str_replace( \"&#59;\", \";\", $text );\n $text = str_replace( \"&#60;\", \"<\", $text );\n $text = str_replace( \"&#62;\", \">\", $text );\n $text = str_replace( \"&#064;\", \"@\", $text );\n $text = str_replace( \"&#64;\", \"@\", $text );\n $text = str_replace( \"&#91;\", \"[\", $text );\n $text = str_replace( \"&#092;\", \"\\\\\", $text );\n $text = str_replace( \"&#92;\", \"\\\\\", $text );\n $text = str_replace( \"&#92\", \"\\\\\", $text );\n $text = str_replace( \"&#93;\", \"]\", $text );\n $text = str_replace( \"&#95;\", \"\\_\", $text );\n $text = str_replace( \"&#124;\", \"|\", $text );\n\n return $text;\n}", "title": "" }, { "docid": "e8601bdf37db8175c3e4c309f3cf97a0", "score": "0.70811695", "text": "function TransformToBBCode($string) {\n\t$tags = array(\n\t\t'[center]{$1}[/center]' => '<center>$1</center>',\n\t\t'[b]{$1}[/b]' => '<b>$1</b>',\n\t\t'[img]{$1}[/img]' => '<a href=\"$1\" target=\"_BLANK\"><img src=\"$1\" alt=\"image\" style=\"width: 100%\"></a>',\n\t\t'[link]{$1}[/link]' => '<a href=\"$1\">$1</a>',\n\t\t'[link={$1}]{$2}[/link]' => '<a href=\"$1\" target=\"_BLANK\">$2</a>',\n\t\t'[url={$1}]{$2}[/url]' => '<a href=\"$1\" target=\"_BLANK\">$2</a>',\n\t\t'[color={$1}]{$2}[/color]' => '<font color=\"$1\">$2</font>',\n\t\t'[*]{$1}[/*]' => '<li>$1</li>',\n\t\t'[youtube]{$1}[/youtube]' => '<div class=\"youtube\"><div class=\"aspectratio\"><iframe src=\"//www.youtube.com/embed/$1\" frameborder=\"0\" allowfullscreen></iframe></div></div>',\n\t);\n\n\tforeach ($tags as $tag => $value) {\n\t\t$code = preg_replace('/placeholder([0-9]+)/', '(.*?)', preg_quote(preg_replace('/\\{\\$([0-9]+)\\}/', 'placeholder$1', $tag), '/'));\n\t\t$string = preg_replace('/'.$code.'/i', $value, $string);\n\t\tif (strpos($string, \"<a href=\") !== false) {\n\t\t\tif (strpos($string, \"http\") === false) {\n\t\t\t\t$string = substr_replace($string, \"//\", 9, 0);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $string;\n}", "title": "" }, { "docid": "cc479e84802c7764eebb742d42d74272", "score": "0.707777", "text": "function translateBBCode( $sText, $disallowembeds ) {\r\n\t$bbreplace = array (\r\n\t\t'/(\\[[Bb]\\])(.+)(\\[\\/[Bb]\\])/',\r\n\t\t'/(\\[[Ii]\\])(.+)(\\[\\/[Ii]\\])/',\r\n\t\t'/(\\[url\\])(.+)(\\[\\/url\\])/',\r\n\t\t'/(\\[url=)(.+)(\\])(.+)(\\[\\/url\\])/',\r\n\t\t'/(\\[imgurl=)(.+)(\\])(.+)(\\[\\/imgurl\\])/',\r\n\t\t'/(\\[img\\])(.+)(\\[\\/img\\])/',\r\n\t\t'/(\\[img=)(.+)(\\])(.+)(\\[\\/img\\])/',\r\n\t\t'/(\\[code\\])(.+)(\\[\\/code\\])/',\r\n\t\t'/(\\[quote\\])(.+)(\\[\\/quote\\])/'\r\n\t);\r\n\t$bbreplacements = array (\r\n\t\t'<b class=\"bbcode_b\">\\\\2</b>',\r\n\t\t'<em class=\"bbcode_em\">\\\\2</em>',\r\n\t\t'<a class=\"bbcode_a\" target=\"_BLANK\" href=\"\\\\2\">\\\\2</a>',\r\n\t\t'<a class=\"bbcode_a\" target=\"_BLANK\" href=\"\\\\2\">\\\\4</a>',\r\n\t\t'<a class=\"bbcode_a imglink\" target=\"_BLANK\" href=\"\\\\2\">\\\\4</a>',\r\n\t\t'<a class=\"imglink\" href=\"\\\\2\" target=\"_BLANK\"><img class=\"bbcode_img\" src=\"\\\\2\" border=\"0\" /></a>',\r\n\t\t'<a class=\"imglink\" href=\"\\\\2\" target=\"_BLANK\"><img class=\"bbcode_img\" src=\"\\\\4\" border=\"0\" /></a>',\r\n\t\t'<pre class=\"bbcode_code\">\\\\2</pre>',\r\n\t\t'<block class=\"bbcode_quote>\\\\2</block>'\r\n\t);\r\n\r\n\t$sRetText = preg_replace( $bbreplace, $bbreplacements, $sText );\r\n\r\n\tif ( !$disallowembeds ) {\r\n\t\t$sRetText = translateBBvids_ToEmbeds( $sRetText );\r\n\t} else {\r\n\t\t$sRetText = translateBBvids_ToLinks( $sRetText );\r\n\t}\r\n\r\n\t$sRetText = str_ireplace( \"[code]\", '<pre class=\"bbcode_code\">', $sRetText );\r\n\t$sRetText = str_ireplace( \"[/code]\", '</pre>', $sRetText );\r\n\r\n\t$sRetText = str_ireplace( \"[quote]\", '<block class=\"bbcode_quote\">', $sRetText );\r\n\t$sRetText = str_ireplace( \"[/quote]\", '</block>', $sRetText );\r\n\r\n\treturn $sRetText;\r\n}", "title": "" }, { "docid": "f541ab2bbc14e87953c83e1385df6780", "score": "0.7061051", "text": "function bbc_to_html($text, $compat_mode = false)\n{\n\tglobal $modSettings;\n\n\tif (!$compat_mode)\n\t\treturn $text;\n\n\t// Turn line breaks back into br's.\n\t$text = strtr($text, array(\"\\r\" => '', \"\\n\" => '<br />'));\n\n\t// Prevent conversion of all bbcode inside these bbcodes.\n\t// @todo Tie in with bbc permissions ?\n\tforeach (array('code', 'php', 'nobbc') as $code)\n\t{\n\t\tif (strpos($text, '['. $code) !== false)\n\t\t{\n\t\t\t$parts = preg_split('~(\\[/' . $code . '\\]|\\[' . $code . '(?:=[^\\]]+)?\\])~i', $text, -1, PREG_SPLIT_DELIM_CAPTURE);\n\n\t\t\t// Only mess with stuff inside tags.\n\t\t\tfor ($i = 0, $n = count($parts); $i < $n; $i++)\n\t\t\t{\n\t\t\t\t// Value of 2 means we're inside the tag.\n\t\t\t\tif ($i % 4 == 2)\n\t\t\t\t\t$parts[$i] = strtr($parts[$i], array('[' => '&#91;', ']' => '&#93;', \"'\" => \"'\"));\n\t\t\t}\n\t\t\t// Put our humpty dumpty message back together again.\n\t\t\t$text = implode('', $parts);\n\t\t}\n\t}\n\n\t// What tags do we allow?\n\t$allowed_tags = array('b', 'u', 'i', 's', 'hr', 'list', 'li', 'font', 'size', 'color', 'img', 'left', 'center', 'right', 'url', 'email', 'ftp', 'sub', 'sup');\n\n\t$text = parse_bbc($text, true, '', $allowed_tags);\n\n\t// Fix for having a line break then a thingy.\n\t$text = strtr($text, array('<br /><div' => '<div', \"\\n\" => '', \"\\r\" => ''));\n\n\t// Note that IE doesn't understand spans really - make them something \"legacy\"\n\t$working_html = array(\n\t\t'~<del>(.+?)</del>~i' => '<strike>$1</strike>',\n\t\t'~<span\\sclass=\"bbc_u\">(.+?)</span>~i' => '<u>$1</u>',\n\t\t'~<span\\sstyle=\"color:\\s*([#\\d\\w]+);\" class=\"bbc_color\">(.+?)</span>~i' => '<font color=\"$1\">$2</font>',\n\t\t'~<span\\sstyle=\"font-family:\\s*([#\\d\\w\\s]+);\" class=\"bbc_font\">(.+?)</span>~i' => '<font face=\"$1\">$2</font>',\n\t\t'~<div\\sstyle=\"text-align:\\s*(left|right);\">(.+?)</div>~i' => '<p align=\"$1\">$2</p>',\n\t);\n\t$text = preg_replace(array_keys($working_html), array_values($working_html), $text);\n\n\t// Parse unique ID's and disable javascript into the smileys - using the double space.\n\t$i = 1;\n\t$text = preg_replace('~(?:\\s|&nbsp;)?<(img\\ssrc=\"' . preg_quote($modSettings['smileys_url'], '~') . '/[^<>]+?/([^<>]+?)\"\\s*)[^<>]*?class=\"smiley\" />~e', '\\'<\\' . ' . 'stripslashes(\\'$1\\') . \\'alt=\"\" title=\"\" onresizestart=\"return false;\" id=\"smiley_\\' . ' . \"\\$\" . 'i++ . \\'_$2\" style=\"padding: 0 3px 0 3px;\" />\\'', $text);\n\n\treturn $text;\n}", "title": "" }, { "docid": "7b4f63ef91531eb2237c6fa32a7a2f42", "score": "0.7047358", "text": "public function bbcode2html($text)\n {\n $search = array(\n '/\\[b\\](.*?)\\[\\/b\\]/is',\n '/\\[i\\](.*?)\\[\\/i\\]/is',\n '/\\[u\\](.*?)\\[\\/u\\]/is',\n '/\\[img\\](https?.*?)\\[\\/img\\]/is',\n '/\\[url\\](https?.*?)\\[\\/url\\]/is',\n '/\\[url=(https?.*?)\\](.*?)\\[\\/url\\]/is',\n );\n $replace = array(\n '<strong>$1</strong>',\n '<em>$1</em>',\n '<u>$1</u>',\n '<img src=\"$1\" />',\n '<a href=\"$1\">$1</a>',\n '<a href=\"$1\">$2</a>'\n );\n return preg_replace($search, $replace, $text);\n }", "title": "" }, { "docid": "4621183fdd10af9016d2b8a178762c94", "score": "0.7041477", "text": "public function convertBBCodeToHTML($text) {\n\n // BBcode array\n $find = array(\n '~\\[b\\](.*?)\\[/b\\]~s',\n '~\\[i\\](.*?)\\[/i\\]~s',\n '~\\[u\\](.*?)\\[/u\\]~s',\n '~\\[quote\\](.*?)\\[/quote\\]~s',\n '~\\[size=(.*?)\\](.*?)\\[/size\\]~s',\n '~\\[color=(.*?)\\](.*?)\\[/color\\]~s',\n '~\\[url\\]((?:ftp|https?)://.*?)\\[/url\\]~s',\n '~\\[img\\](https?://.*?\\.(?:jpg|jpeg|gif|png|bmp))\\[/img\\]~s'\n );\n\n // HTML tags to replace BBcode\n $replace = array(\n '<strong>$1</strong>',\n '<em>$1</em>',\n '<span style=\"text-decoration:underline;\">$1</span>',\n '<pre>$1</pre>',\n '<span style=\"font-size:$1px;\">$2</span>',\n '<span style=\"color:$1;\">$2</span>',\n '<a href=\"$1\">$1</a>',\n '<img src=\"$1\" alt=\"\" />'\n );\n\n // Replacing the BBcodes with corresponding HTML tags\n return preg_replace($find,$replace,nl2br($text));\n }", "title": "" }, { "docid": "0f17f00c2daeb144ad02328f6f90ce4a", "score": "0.70178974", "text": "function html_to_tags($fudml)\n{\n\tif (defined('plugins')) {\n\t\tlist($fudml) = plugin_call_hook('HTML2BBCODE', array($fudml));\n\t}\n\n\t// PHP code blocks.\n\twhile (preg_match('!<span name=\"php\">(.*?)</span>!is', $fudml, $res)) {\n\t\t$tmp = trim(html_entity_decode(strip_tags(str_replace('<br />', \"\\n\", $res[1]))));\n\t\t$m = md5($tmp);\n\t\t$php[$m] = $tmp;\n\t\t$fudml = str_replace($res[0], \"[php]\\n\". $m .\"\\n[/php]\", $fudml);\n\t}\n\n\t// Wikipedia tags.\n\twhile (preg_match('!<a href=\"http://(?:([A-ZA-z]+)?\\.)?wikipedia.com/wiki/([^\"]+)\"( target=\"_blank\")? name=\"WikiPediaLink\">(.*?)</a>!s', $fudml, $res)) {\n\t\tif (count($res) == 5) {\n\t\t\t$fudml = str_replace($res[0], '[wikipedia='. $res[1] .']'. $res[2] .'[/wikipedia]', $fudml);\n\t\t} else {\n\t\t\t$fudml = str_replace($res[0], '[wikipedia]'. $res[2] .'[/wikipedia]', $fudml);\n\t\t}\n\t}\n\n\t// Quote tags.\n\tif (strpos($fudml, '<cite>') !== false) {\n $fudml = str_replace(array('<cite>','</cite><blockquote>','</blockquote>'), array('[quote title=', ']', '[/quote]'), $fudml);\n\t}\n\t// Old bad quote tags.\n\tif (preg_match('!class=\"quote\"!', $fudml)) { \n\t\t$fudml = preg_replace('!<table border=\"0\" align=\"center\" width=\"90%\" cellpadding=\"3\" cellspacing=\"1\">(<tbody>)?<tr><td class=\"SmallText\"><b>!', '[quote title=', $fudml);\n\t\t$fudml = preg_replace('!</b></td></tr><tr><td class=\"quote\">(<br>)?!', ']', $fudml);\n\t\t$fudml = preg_replace('!(<br>)?</td></tr>(</tbody>)?</table>!', '[/quote]', $fudml);\n\t}\n\n\t/* Spoiler tags. */\t\n\tif (preg_match('!<div class=\"dashed\" style=\"padding: 3px;\" align=\"center\"( width=\"100%\")?><a href=\"javascript://\" OnClick=\"javascript: layerVis\\(\\'.*?\\', 1\\);\">.*?</a><div align=\"left\" id=\"(.*?)\" style=\"display: none;\">!is', $fudml)) {\n\t\t$fudml = preg_replace('!\\<div class\\=\"dashed\" style\\=\"padding: 3px;\" align\\=\"center\"( width\\=\"100%\")?\\>\\<a href\\=\"javascript://\" OnClick\\=\"javascript: layerVis\\(\\'.*?\\', 1\\);\">(.*?)\\</a\\>\\<div align\\=\"left\" id\\=\".*?\" style\\=\"display: none;\"\\>!is', '[spoiler=\\2]', $fudml);\n\t\t$fudml = str_replace('</div></div>', '[/spoiler]', $fudml);\n\t}\n\t/* Old bad spoiler format. */\n\tif (preg_match('!<div class=\"dashed\" style=\"padding: 3px;\" align=\"center\" width=\"100%\"><a href=\"javascript://\" OnClick=\"javascript: layerVis\\(\\'.*?\\', 1\\);\">.*?</a><div align=\"left\" id=\"(.*?)\" style=\"visibility: hidden;\">!is', $fudml)) {\n\t\t$fudml = preg_replace('!\\<div class\\=\"dashed\" style\\=\"padding: 3px;\" align\\=\"center\" width\\=\"100%\"\\>\\<a href\\=\"javascript://\" OnClick\\=\"javascript: layerVis\\(\\'.*?\\', 1\\);\">(.*?)\\</a\\>\\<div align\\=\"left\" id\\=\".*?\" style\\=\"visibility: hidden;\"\\>!is', '[spoiler=\\1]', $fudml);\n\t\t$fudml = str_replace('</div></div>', '[/spoiler]', $fudml);\n\t}\n\n\t// Color, font and size tags.\n\t$fudml = str_replace('<font face=', '<font font=', $fudml);\n\tforeach (array('color', 'font', 'size') as $v) {\n\t\twhile (preg_match('!<font '. $v .'=\".+?\">.*?</font>!is', $fudml, $m)) {\n\t\t\t$fudml = preg_replace('!<font '. $v .'=\"(.+?)\">(.*?)</font>!is', '['. $v .'=\\1]\\2[/'. $v .']', $fudml);\n\t\t}\n\t}\n\n\t// Acronym tags.\n\twhile (preg_match('!<acronym title=\".+?\">.*?</acronym>!is', $fudml)) {\n\t\t$fudml = preg_replace('!<acronym title=\"(.+?)\">(.*?)</acronym>!is', '[acronym=\\1]\\2[/acronym]', $fudml);\n\t}\n\n\t// List tags.\n\twhile (preg_match('!<(o|u)l type=\".+?\">.*?</\\\\1l>!is', $fudml)) {\n\t\t$fudml = preg_replace('!<(o|u)l type=\"(.+?)\">(.*?)</\\\\1l>!is', '[list type=\\2]\\3[/list]', $fudml);\n\t}\n\n\t$fudml = str_replace(\n\tarray(\n\t\t'<b>', '</b>', '<i>', '</i>', '<u>', '</u>', '<s>', '</s>', '<sub>', '</sub>', '<sup>', '</sup>', '<del>', '</del>',\n\t\t'<div class=\"pre\"><pre>', '</pre></div>', '<div align=\"center\">', '<div align=\"left\">', '<div align=\"right\">', '</div>',\n\t\t'<ul>', '</ul>', '<span name=\"notag\">', '</span>', '<li>', '&#64;', '&#58;&#47;&#47;', '<br />', '<pre>', '</pre>','<hr>',\n\t\t'<h1>', '</h1>', '<h2>', '</h2>', '<h3>', '</h3>', '<h4>', '</h4>'\n\t),\n\tarray(\n\t\t'[b]', '[/b]', '[i]', '[/i]', '[u]', '[/u]', '[s]', '[/s]', '[sub]', '[/sub]', '[sup]', '[/sup]', '[del]', '[/del]', \n\t\t'[code]', '[/code]', '[align=center]', '[align=left]', '[align=right]', '[/align]', '[list]', '[/list]',\n\t\t'[notag]', '[/notag]', '[*]', '@', '://', '', '[pre]', '[/pre]','[hr]',\n\t\t'[h1]', '[/h1]', '[h2]', '[/h2]', '[h3]', '[/h3]', '[h4]', '[/h4]'\n\t),\n\t$fudml);\n\n\twhile (preg_match('!<img src=\"(.*?)\" border=\"?0\"? alt=\"\\\\1\" ?/?>!is', $fudml)) {\n $fudml = preg_replace('!<img src=\"(.*?)\" border=\"?0\"? alt=\"\\\\1\" ?/?>!is', '[img]\\1[/img]', $fudml);\n\t}\n\twhile (preg_match('!<img class=\"(r|l)\" src=\"(.*?)\" border=\"?0\"? alt=\"\\\\2\" ?/?>!is', $fudml)) {\n $fudml = preg_replace('!<img class=\"(r|l)\" src=\"(.*?)\" border=\"?0\"? alt=\"\\\\2\" ?/?>!is', '[img\\1]\\2[/img\\1]', $fudml);\n\t}\n\twhile (preg_match('!<a href=\"mailto:(.+?)\"( target=\"_blank\")?>\\\\1</a>!is', $fudml)) {\n\t\t$fudml = preg_replace('!<a href=\"mailto:(.+?)\"( target=\"_blank\")?>\\\\1</a>!is', '[email]\\1[/email]', $fudml);\n\t}\n\twhile (preg_match('!<a href=\"(.+?)\"( target=\"_blank\")?>\\\\1</a>!is', $fudml)) {\n\t\t$fudml = preg_replace('!<a href=\"(.+?)\"( target=\"_blank\")?>\\\\1</a>!is', '[url]\\1[/url]', $fudml);\n\t}\n\n\tif (strpos($fudml, '<img src=\"') !== false) {\n $fudml = preg_replace('!<img src=\"(.*?)\" border=\"?0\"? alt=\"(.*?)\" ?/?>!is', '[img=\\1]\\2[/img]', $fudml);\n\t}\n\tif (strpos($fudml, '<img class=\"') !== false) {\n $fudml = preg_replace('!<img class=\"(r|l)\" src=\"(.*?)\" border=\"?0\"? alt=\"(.*?)\" ?/?>!is', '[img\\1=\\2]\\3[/img\\1]', $fudml);\n\t}\n\tif (strpos($fudml, '<a href=\"mailto:') !== false) {\n\t\t$fudml = preg_replace('!<a href=\"mailto:(.+?)\"( target=\"_blank\")?>(.+?)</a>!is', '[email=\\1]\\3[/email]', $fudml);\n\t}\n\tif (strpos($fudml, '<a href=\"') !== false) {\n\t\t$fudml = preg_replace('!<a href=\"(.+?)\"( target=\"_blank\")?>(.+?)</a>!is', '[url=\\1]\\3[/url]', $fudml);\n\t}\n\n\tif (isset($php)) {\n\t\t$fudml = str_replace(array_keys($php), array_values($php), $fudml);\n\t}\n\n\t/* Un-htmlspecialchars. */\n\treturn reverse_fmt($fudml);\n}", "title": "" }, { "docid": "ebe29e207bb4b1de60eba82301c62e08", "score": "0.7016302", "text": "function BBCode($text, $dead_links = false) {\n // ----------------------------------------\n // $text = <string>\n // $dead_links = <boolean> Return \"dead\" links with data-href attribute\n // ----------------------------------------\n // RETURNS: <string> text converted from BBCode to HTML tags format\n // ----------------------------------------\n // Special characters\n $text = str_replace(\"\\\"\", \"&quot;\", $text);\n //$text = str_replace(\"\\'\", \"&#39;\", $text);\n \n // Lists\n $text = str_replace(\"[/list][br]\", \"[/list]\", $text);\n $text = str_replace(\"[br][/list]\", \"[/list]\", $text);\n \n $n = preg_match_all(\"/\\[list\\](.*?)\\[\\/list\\]/i\", $text, $found);\n if($n > 0) {\n foreach(array_keys($found[1]) as $num) {\n $list = $found[1][$num];\n $style_list = \"</p>\\n<ul class='bbcode'>\\n\\t<li>\".str_replace(\"[br]\", \"</li>\\n\\t<li>\", $list).\"</li>\\n</ul>\\n<p class='bbcode'>\";\n \n $style_list = str_replace(\"<li>-\", \"<li style='list-style:none'>-\", $style_list);\n $text = str_replace($found[0][$num], $style_list, $text);\n };\n };\n // Other styles\n $bbcode = [\n \"/\\\\\\\\\\[/\" => \"&#91;\", // \"[\"\n \"/\\\\\\\\\\]/\" => \"&#93;\", // \"]\"\n\t\t\t\"/\\[br\\]/i\" => \"<br>\", // line break\n \n // Banner\n \"/\\[banner(.*?)\\[url(.*?)\\[img=(.*?)\\]\\[\\/url\\](.*?)\\[\\/banner\\]/i\" => \"[banner$1[url$2<figure class='img' style='background-image:url(\\\"$3\\\")'></figure>[/url]<p class='bbcode'>$4</p>[/banner]\", // banner link image\n \"/\\[banner(.*?)\\[img=(.*?)\\](.*?)\\[\\/banner\\]/i\" => \"[banner$1<div class='figure' style='background-image:url(\\\"$2\\\")'></div><p class='bbcode'>$3</p>[/banner]\", // banner image\n \"/\\[\\/banner\\]<br>/i\" => \"[/banner]\", // enter fix 1\n \"/\\[banner\\|r\\](.*?)\\[\\/banner\\]/i\" => \"</p><div class='banner text_right'>$1</div><p class='bbcode'>\", // banner|r\n \"/\\[banner\\|l\\](.*?)\\[\\/banner\\]/i\" => \"</p><div class='banner text_left'>$1</div><p class='bbcode'>\", // banner|l\n \"/\\[banner\\](.*?)\\[\\/banner\\]/i\" => \"</p><div class='banner'>$1</div><p class='bbcode'>\", // banner\n \n // Button\n \"/\\[\\/button\\]\\[button(.*?)\\]/i\" => \"\", // join touching buttons (unify size -> first)\n \"/\\[\\/button\\]<br>/i\" => \"[/button]\", // enter fix 1\n \"/<br>\\[button(.*?)\\]/i\" => \"[button$1]\", // enter fix 2 \n \"/\\[button\\|(.*?)\\](.*?)\\[\\/button\\]/i\" => \"</p><div class='button size_$1'>$2</div><p class='bbcode'>\", // sized button\n \"/\\[button\\](.*?)\\[\\/button\\]/i\" => \"</p><div class='button'>$1</div><p class='bbcode'>\", // button\n \n // ====== 'Enter' fixes ======\n \"/\\[hr\\]<br>/i\" => \"[hr]\", // enter fix\n \"/\\[\\/center\\]<br>/i\" => \"[/center]\", // enter fix\n \n // ====== Main Styles ======\n // Images\n \"/\\[img=(.*?)\\]/i\" => \"<img src='$1'>\", // image\n \n // Complex\n \"/\\[url\\|i=(.*?)\\](.*?)\\[\\/url\\]/i\" => \"<a class='internal' data-href='$1'>$2</a>\", // forced internal links\n \"/\\[url\\|e=(.*?)\\](.*?)\\[\\/url\\]/i\" => \"<a href='$1' target='_blank'>$2</a>\", // forced external links\n \"/\\[url=http:\\/\\/(.*?)\\](.*?)\\[\\/url\\]/i\" => \"<a href='http://$1' target='_blank'>$2</a>\", // auto external links\n \"/\\[url=https:\\/\\/(.*?)\\](.*?)\\[\\/url\\]/i\" => \"<a href='https://$1' target='_blank'>$2</a>\", // auto external links\n \"/\\[url=(.*?)\\](.*?)\\[\\/url\\]/i\" => \"<a class='internal' data-href='$1'>$2</a>\", // std links\n \"/\\[email=(.*?)\\](.*?)\\[\\/email\\]/i\" => \"<a href=\\\"mailto:$1\\\">$2</a>\", // mailto\n \"/\\[tel=(.*?)\\](.*?)\\[\\/tel\\]/i\" => \"<a href=\\\"tel:$1\\\">$2</a>\", // tel\n \"/\\[color=(.*?)\\](.*?)\\[\\/color\\]/i\" => \"<span class='color_$1'>$2</span>\", // color\n \"/\\[size=(.*?)\\](.*?)\\[\\/size\\]/i\" => \"<span class='size_$1'>$2</span>\", // size\n \"/\\[\\*\\]/i\" => \"&bull;\", // bullet character\n \"/\\[hr\\]/i\" => \"</p><div class='bbcode hr'><hr></div><p class='bbcode'>\", // horizintal line\n // Simple\n \"/\\[b\\](.*?)\\[\\/b\\]/i\" => \"<b>$1</b>\", // bold\n \"/\\[i\\](.*?)\\[\\/i\\]/i\" => \"<i>$1</i>\", // italic\n \"/\\[u\\](.*?)\\[\\/u\\]/i\" => \"<u>$1</u>\", // unerline\n \"/\\[sup\\](.*?)\\[\\/sup\\]/i\" => \"<sup>$1</sup>\", // superscript\n \"/\\[sub\\](.*?)\\[\\/sub\\]/i\" => \"<sub>$1</sub>\", // subscript\n \"/\\[center\\](.*?)\\[\\/center\\]/i\" => \"</p><p class='bbcode' style='text-align:center'>$1</p><p class='bbcode'>\", // center\n \n \"/ +/\" => \" \", // multiple spaces\n \"/ (.?) /\" => \" $1&nbsp;\", // widow letters fix\n ];\n foreach($bbcode as $find => $replace){ $text = preg_replace($find, $replace, $text); };\n if($dead_links) { $text = preg_replace(\"/<a href='(.*?)'>/i\", \"<a class='bbcode' data-href='$1'>\", $text); }\n return $text;\n }", "title": "" }, { "docid": "b5bb0781839890eaec8e1ce276890f15", "score": "0.6973833", "text": "function bbcode($Text,$preserve_nl = false, $tryoembed = true) {\n\n\t$a = get_app();\n\n\t// Move all spaces out of the tags \n\t// ....Uhm why?\n\t// This is basically doing a trim() on the stuff in between tags, but it messes up \n\t// carefully crafted bbcode and especially other pre-formatted code. \n\t// Commenting out until we come up with a use case where it's needed. Then let's try and\n\t// special case rather than a heavy-handed approach like this. \n\n//\t$Text = preg_replace(\"/\\[(\\w*)\\](\\s*)/ism\", '$2[$1]', $Text);\n//\t$Text = preg_replace(\"/(\\s*)\\[\\/(\\w*)\\]/ism\", '[/$2]$1', $Text);\n\n\t// Hide all [noparse] contained bbtags by spacefying them\n\tif (strpos($Text,'[noparse]') !== false) {\n\t\t$Text = preg_replace_callback(\"/\\[noparse\\](.*?)\\[\\/noparse\\]/ism\", 'bb_spacefy',$Text);\n\t}\n\tif (strpos($Text,'[nobb]') !== false) {\n\t\t$Text = preg_replace_callback(\"/\\[nobb\\](.*?)\\[\\/nobb\\]/ism\", 'bb_spacefy',$Text);\n\t}\n\tif (strpos($Text,'[pre]') !== false) {\n\t\t$Text = preg_replace_callback(\"/\\[pre\\](.*?)\\[\\/pre\\]/ism\", 'bb_spacefy',$Text);\n\t}\n\n\n\n\t// If we find any event code, turn it into an event.\n\t// After we're finished processing the bbcode we'll\n\t// replace all of the event code with a reformatted version.\n\n\t$ev = bbtoevent($Text);\n\n\t// process [observer] tags before we do anything else because we might\n\t// be stripping away stuff that then doesn't need to be worked on anymore\n\n\t$observer = $a->get_observer();\n\tif ((strpos($Text,'[/observer]') !== false) || (strpos($Text,'[/rpost]') !== false)) {\n\t\tif ($observer) {\n\t\t\t$Text = preg_replace(\"/\\[observer\\=1\\](.*?)\\[\\/observer\\]/ism\", '$1', $Text);\n\t\t\t$Text = preg_replace(\"/\\[observer\\=0\\].*?\\[\\/observer\\]/ism\", '', $Text);\n\t\t\t$Text = preg_replace_callback(\"/\\[rpost(=(.*?))?\\](.*?)\\[\\/rpost\\]/ism\", 'rpost_callback', $Text);\n\t\t} else {\n\t\t\t$Text = preg_replace(\"/\\[observer\\=1\\].*?\\[\\/observer\\]/ism\", '', $Text);\n\t\t\t$Text = preg_replace(\"/\\[observer\\=0\\](.*?)\\[\\/observer\\]/ism\", '$1', $Text);\n\t\t\t$Text = preg_replace(\"/\\[rpost(=.*?)?\\](.*?)\\[\\/rpost\\]/ism\", '', $Text);\n\t\t}\n }\n\n\t$channel = $a->get_channel();\n\tif (strpos($Text,'[/channel]') !== false) {\n\t\tif ($channel) {\n\t\t\t$Text = preg_replace(\"/\\[channel\\=1\\](.*?)\\[\\/channel\\]/ism\", '$1', $Text);\n\t\t\t$Text = preg_replace(\"/\\[channel\\=0\\].*?\\[\\/channel\\]/ism\", '', $Text);\n\t\t} else {\n\t\t\t$Text = preg_replace(\"/\\[channel\\=1\\].*?\\[\\/channel\\]/ism\", '', $Text);\n\t\t\t$Text = preg_replace(\"/\\[channel\\=0\\](.*?)\\[\\/channel\\]/ism\", '$1', $Text);\n\t\t}\n }\n\n\n\t$x = bb_extract_images($Text);\n\t$Text = $x['body'];\n\t$saved_images = $x['images'];\n\n\t$Text = str_replace(array('[baseurl]','[sitename]'),array(z_root(),get_config('system','sitename')),$Text);\n\n\t\n\t// Replace any html brackets with HTML Entities to prevent executing HTML or script\n\t// Don't use strip_tags here because it breaks [url] search by replacing & with amp\n\n\t$Text = str_replace(\"<\", \"&lt;\", $Text);\n\t$Text = str_replace(\">\", \"&gt;\", $Text);\n\n\t\n\t// Convert new line chars to html <br /> tags\n\n\t// nlbr seems to be hopelessly messed up\n\t//\t$Text = nl2br($Text);\n\n\t// We'll emulate it.\n\n\t$Text = str_replace(\"\\r\\n\",\"\\n\", $Text);\n\t$Text = str_replace(array(\"\\r\",\"\\n\"), array('<br />','<br />'), $Text);\n\n\tif($preserve_nl)\n\t\t$Text = str_replace(array(\"\\n\",\"\\r\"), array('',''),$Text);\n\n\n\t$Text = str_replace(array(\"\\t\",\" \"),array(\"&nbsp;&nbsp;&nbsp;&nbsp;\",\"&nbsp;&nbsp;\"),$Text);\n\n\t// Set up the parameters for a URL search string\n\t$URLSearchString = \"^\\[\\]\";\n\t// Set up the parameters for a MAIL search string\n\t$MAILSearchString = $URLSearchString;\n\n\t// replace [observer.baseurl]\n\tif ($observer) {\n\t\t$s1 = '<span class=\"bb_observer\" title=\"' . t('Different viewers will see this text differently') . '\">';\n\t\t$s2 = '</span>';\n\t\t$obsBaseURL = $observer['xchan_connurl'];\n\t\t$obsBaseURL = preg_replace(\"/\\/poco\\/.*$/\", '', $obsBaseURL);\n\t\t$Text = str_replace('[observer.baseurl]', $obsBaseURL, $Text);\n\t\t$Text = str_replace('[observer.url]',$observer['xchan_url'], $Text);\n\t\t$Text = str_replace('[observer.name]',$s1 . $observer['xchan_name'] . $s2, $Text);\n\t\t$Text = str_replace('[observer.address]',$s1 . $observer['xchan_addr'] . $s2, $Text);\n\t\t$Text = str_replace('[observer.webname]',$s1 . substr($observer['xchan_addr'],0,strpos($observer['xchan_addr'],'@')) . $s2, $Text);\n\t\t$Text = str_replace('[observer.photo]',$s1 . '[zmg]'.$observer['xchan_photo_l'].'[/zmg]' . $s2, $Text);\t\t\t\t\n\t} else {\n\t\t$Text = str_replace('[observer.baseurl]', '', $Text);\n\t\t$Text = str_replace('[observer.url]','', $Text);\n\t\t$Text = str_replace('[observer.name]','', $Text);\n\t\t$Text = str_replace('[observer.address]','', $Text);\n\t\t$Text = str_replace('[observer.webname]','',$Text);\n\t\t$Text = str_replace('[observer.photo]','', $Text);\t\t\n\t}\n\n\n\n\n\n\t// Perform URL Search\n\n\t$urlchars = '[a-zA-Z0-9\\:\\/\\-\\?\\&\\;\\.\\=\\@\\_\\~\\#\\%\\$\\!\\+\\,\\@]';\n\n\tif (strpos($Text,'http') !== false) {\n\t\t$Text = preg_replace(\"/([^\\]\\='\".'\"'.\"\\/]|^|\\#\\^)(https?\\:\\/\\/$urlchars+)/ism\", '$1<a href=\"$2\" >$2</a>', $Text);\n\t}\n\n\tif (strpos($Text,'[/qr]') !== false) {\n\t\t$Text = preg_replace_callback(\"/\\[qr\\](.*?)\\[\\/qr\\]/ism\",\"bb_qr\",$Text);\t\n\t}\n\n\n\tif (strpos($Text,'[/share]') !== false) {\n\t\t$Text = preg_replace_callback(\"/\\[share(.*?)\\](.*?)\\[\\/share\\]/ism\",\"bb_ShareAttributes\",$Text);\t\n\t}\n\tif($tryoembed) {\n\t\tif (strpos($Text,'[/url]') !== false) {\n\t\t\t$Text = preg_replace_callback(\"/\\[url\\]([$URLSearchString]*)\\[\\/url\\]/ism\",'tryoembed',$Text);\n\t\t}\n\t }\n\tif (strpos($Text,'[/url]') !== false) {\n\t $Text = preg_replace(\"/\\#\\^\\[url\\]([$URLSearchString]*)\\[\\/url\\]/ism\", '<span class=\"bookmark-identifier\">#^</span><a class=\"bookmark\" href=\"$1\" >$1</a>', $Text);\n\t\t$Text = preg_replace(\"/\\#\\^\\[url\\=([$URLSearchString]*)\\](.*?)\\[\\/url\\]/ism\", '<span class=\"bookmark-identifier\">#^</span><a class=\"bookmark\" href=\"$1\" >$2</a>', $Text);\n\t\t$Text = preg_replace(\"/\\[url\\]([$URLSearchString]*)\\[\\/url\\]/ism\", '<a href=\"$1\" >$1</a>', $Text);\n\t\t$Text = preg_replace(\"/\\[url\\=([$URLSearchString]*)\\](.*?)\\[\\/url\\]/ism\", '<a href=\"$1\" >$2</a>', $Text);\n }\n\tif (strpos($Text,'[/zrl]') !== false) {\n\t $Text = preg_replace(\"/\\#\\^\\[zrl\\]([$URLSearchString]*)\\[\\/zrl\\]/ism\", '<span class=\"bookmark-identifier\">#^</span><a class=\"zrl bookmark\" href=\"$1\" >$1</a>', $Text);\n\t\t$Text = preg_replace(\"/\\#\\^\\[zrl\\=([$URLSearchString]*)\\](.*?)\\[\\/zrl\\]/ism\", '<span class=\"bookmark-identifier\">#^</span><a class=\"zrl bookmark\" href=\"$1\" >$2</a>', $Text);\t\n\t\t$Text = preg_replace(\"/\\[zrl\\]([$URLSearchString]*)\\[\\/zrl\\]/ism\", '<a class=\"zrl\" href=\"$1\" >$1</a>', $Text);\n\t\t$Text = preg_replace(\"/\\[zrl\\=([$URLSearchString]*)\\](.*?)\\[\\/zrl\\]/ism\", '<a class=\"zrl\" href=\"$1\" >$2</a>', $Text);\n }\n\t// Perform MAIL Search\n\tif (strpos($Text,'[/mail]') !== false) {\t\n\t\t$Text = preg_replace(\"/\\[mail\\]([$MAILSearchString]*)\\[\\/mail\\]/\", '<a href=\"mailto:$1\">$1</a>', $Text);\n\t\t$Text = preg_replace(\"/\\[mail\\=([$MAILSearchString]*)\\](.*?)\\[\\/mail\\]/\", '<a href=\"mailto:$1\">$2</a>', $Text);\n\t}\n\n\t// leave open the posibility of [map=something]\n\t// this is replaced in prepare_body() which has knowledge of the item location\n\n\tif (strpos($Text,'[/map]') !== false) {\t\n\t\t$Text = preg_replace_callback(\"/\\[map\\](.*?)\\[\\/map\\]/ism\",'bb_map_location',$Text);\n\t}\n\n\tif (strpos($Text,'[map=') !== false) {\t\n\t\t$Text = preg_replace_callback(\"/\\[map=(.*?)\\]/ism\",'bb_map_coords',$Text);\n\t}\n\n\tif (strpos($Text,'[map]') !== false) {\t\n\t\t$Text = preg_replace(\"/\\[map\\]/\", '<div class=\"map\"></div>', $Text);\n\t}\n\n\t// Check for bold text\n\tif (strpos($Text,'[b]') !== false) {\t\n\t\t$Text = preg_replace(\"(\\[b\\](.*?)\\[\\/b\\])ism\",'<strong>$1</strong>',$Text);\n\t}\n\t// Check for Italics text\n\tif (strpos($Text,'[i]') !== false) {\t\t\n\t\t$Text = preg_replace(\"(\\[i\\](.*?)\\[\\/i\\])ism\",'<em>$1</em>',$Text);\n\t}\n\t// Check for Underline text\n\tif (strpos($Text,'[u]') !== false) {\t\n\t\t$Text = preg_replace(\"(\\[u\\](.*?)\\[\\/u\\])ism\",'<u>$1</u>',$Text);\n\t}\n\t// Check for strike-through text\n\tif (strpos($Text,'[s]') !== false) {\n\t\t$Text = preg_replace(\"(\\[s\\](.*?)\\[\\/s\\])ism\",'<strike>$1</strike>',$Text);\n\t}\n\t// Check for over-line text\n\tif (strpos($Text,'[o]') !== false) {\t\n\t\t$Text = preg_replace(\"(\\[o\\](.*?)\\[\\/o\\])ism\",'<span class=\"overline\">$1</span>',$Text);\n\t}\n\tif (strpos($Text,'[sup]') !== false) {\t\n\t\t$Text = preg_replace(\"(\\[sup\\](.*?)\\[\\/sup\\])ism\",'<sup>$1</sup>',$Text);\n\t}\n\tif (strpos($Text,'[sub]') !== false) {\t\n\t\t$Text = preg_replace(\"(\\[sub\\](.*?)\\[\\/sub\\])ism\",'<sub>$1</sub>',$Text);\n\t}\n\t\n\t// Check for colored text\n\tif (strpos($Text,'[/color]') !== false) {\t\n\t\t$Text = preg_replace(\"(\\[color=(.*?)\\](.*?)\\[\\/color\\])ism\",\"<span style=\\\"color: $1;\\\">$2</span>\",$Text);\n\t}\n\t// Check for sized text\n\t\t// [size=50] --> font-size: 50px (with the unit).\n\tif (strpos($Text,'[/size]') !== false) {\t\t\n\t\t$Text = preg_replace(\"(\\[size=(\\d*?)\\](.*?)\\[\\/size\\])ism\",\"<span style=\\\"font-size: $1px;\\\">$2</span>\",$Text);\n\t\t$Text = preg_replace(\"(\\[size=(.*?)\\](.*?)\\[\\/size\\])ism\",\"<span style=\\\"font-size: $1;\\\">$2</span>\",$Text);\n\t}\n\t// Check for h1\n\tif (strpos($Text,'[h1]') !== false) {\n\t\t$Text = preg_replace(\"(\\[h1\\](.*?)\\[\\/h1\\])ism\",'<h1>$1</h1>',$Text);\n\t}\n\t// Check for h2\n\tif (strpos($Text,'[h2]') !== false) {\n\t\t$Text = preg_replace(\"(\\[h2\\](.*?)\\[\\/h2\\])ism\",'<h2>$1</h2>',$Text);\n\t}\n\t// Check for h3\n\tif (strpos($Text,'[h3]') !== false) {\n\t\t$Text = preg_replace(\"(\\[h3\\](.*?)\\[\\/h3\\])ism\",'<h3>$1</h3>',$Text);\n\t}\n\t// Check for h4\n\tif (strpos($Text,'[h4]') !== false) {\n\t\t$Text = preg_replace(\"(\\[h4\\](.*?)\\[\\/h4\\])ism\",'<h4>$1</h4>',$Text);\n\t}\n\t// Check for h5\n\tif (strpos($Text,'[h5]') !== false) {\n\t\t$Text = preg_replace(\"(\\[h5\\](.*?)\\[\\/h5\\])ism\",'<h5>$1</h5>',$Text);\n\t}\n\t// Check for h6\n\tif (strpos($Text,'[h6]') !== false) {\n\t\t$Text = preg_replace(\"(\\[h6\\](.*?)\\[\\/h6\\])ism\",'<h6>$1</h6>',$Text);\n\t}\n\t// Check for table of content without params\n\tif (strpos($Text,'[toc]') !== false) {\n\t\t$Text = preg_replace(\"/\\[toc\\]/ism\",'<ul id=\"toc\"></ul>',$Text);\t\t\n\t}\n\t// Check for table of content with params\n\tif (strpos($Text,'[toc') !== false) {\n\t\t$Text = preg_replace(\"/\\[toc([^\\]]+?)\\]/ism\",'<ul$1></ul>',$Text);\n\t\t\n\t}\n\t// Check for centered text\n\tif (strpos($Text,'[/center]') !== false) {\t\n\t$Text = preg_replace(\"(\\[center\\](.*?)\\[\\/center\\])ism\",\"<div style=\\\"text-align:center;\\\">$1</div>\",$Text);\n\t}\n\t// Check for list text\n\t$Text = str_replace(\"[*]\", \"<li>\", $Text);\n\n \t// handle nested lists\n\t$endlessloop = 0;\n\n\twhile ((((strpos($Text, \"[/list]\") !== false) && (strpos($Text, \"[list\") !== false)) ||\n\t\t ((strpos($Text, \"[/ol]\") !== false) && (strpos($Text, \"[ol]\") !== false)) || \n\t\t ((strpos($Text, \"[/ul]\") !== false) && (strpos($Text, \"[ul]\") !== false)) || \n\t\t ((strpos($Text, \"[/li]\") !== false) && (strpos($Text, \"[li]\") !== false))) && (++$endlessloop < 20)) {\n\t\t$Text = preg_replace(\"/\\[list\\](.*?)\\[\\/list\\]/ism\", '<ul class=\"listbullet\" style=\"list-style-type: circle;\">$1</ul>' ,$Text);\n\t\t$Text = preg_replace(\"/\\[list=\\](.*?)\\[\\/list\\]/ism\", '<ul class=\"listnone\" style=\"list-style-type: none;\">$1</ul>' ,$Text);\n\t\t$Text = preg_replace(\"/\\[list=1\\](.*?)\\[\\/list\\]/ism\", '<ul class=\"listdecimal\" style=\"list-style-type: decimal;\">$1</ul>' ,$Text);\n\t\t$Text = preg_replace(\"/\\[list=((?-i)i)\\](.*?)\\[\\/list\\]/ism\",'<ul class=\"listlowerroman\" style=\"list-style-type: lower-roman;\">$2</ul>' ,$Text);\n\t\t$Text = preg_replace(\"/\\[list=((?-i)I)\\](.*?)\\[\\/list\\]/ism\", '<ul class=\"listupperroman\" style=\"list-style-type: upper-roman;\">$2</ul>' ,$Text);\n\t\t$Text = preg_replace(\"/\\[list=((?-i)a)\\](.*?)\\[\\/list\\]/ism\", '<ul class=\"listloweralpha\" style=\"list-style-type: lower-alpha;\">$2</ul>' ,$Text);\n\t\t$Text = preg_replace(\"/\\[list=((?-i)A)\\](.*?)\\[\\/list\\]/ism\", '<ul class=\"listupperalpha\" style=\"list-style-type: upper-alpha;\">$2</ul>' ,$Text);\n\t\t$Text = preg_replace(\"/\\[ul\\](.*?)\\[\\/ul\\]/ism\", '<ul class=\"listbullet\" style=\"list-style-type: circle;\">$1</ul>' ,$Text);\n\t\t$Text = preg_replace(\"/\\[ol\\](.*?)\\[\\/ol\\]/ism\", '<ul class=\"listdecimal\" style=\"list-style-type: decimal;\">$1</ul>' ,$Text);\n\t\t$Text = preg_replace(\"/\\[li\\](.*?)\\[\\/li\\]/ism\", '<li>$1</li>' ,$Text);\n\t}\n\tif (strpos($Text,'[th]') !== false) {\t\n\t\t$Text = preg_replace(\"/\\[th\\](.*?)\\[\\/th\\]/sm\", '<th>$1</th>' ,$Text);\n\t}\n\tif (strpos($Text,'[td]') !== false) {\n\t\t$Text = preg_replace(\"/\\[td\\](.*?)\\[\\/td\\]/sm\", '<td>$1</td>' ,$Text);\n\t}\n\tif (strpos($Text,'[tr]') !== false) {\t\n\t\t$Text = preg_replace(\"/\\[tr\\](.*?)\\[\\/tr\\]/sm\", '<tr>$1</tr>' ,$Text);\n\t}\n\tif (strpos($Text,'[/table]') !== false) {\t\n\t\t$Text = preg_replace(\"/\\[table\\](.*?)\\[\\/table\\]/sm\", '<table>$1</table>' ,$Text);\n\t\t$Text = preg_replace(\"/\\[table border=1\\](.*?)\\[\\/table\\]/sm\", '<table border=\"1\" >$1</table>' ,$Text);\n\t\t$Text = preg_replace(\"/\\[table border=0\\](.*?)\\[\\/table\\]/sm\", '<table border=\"0\" >$1</table>' ,$Text);\n\t}\n\t$Text = str_replace('</tr><br /><tr>',\"</tr>\\n<tr>\",$Text);\n\t$Text = str_replace('[hr]','<hr />', $Text);\n\n\t// This is actually executed in prepare_body()\n\n\t$Text = str_replace('[nosmile]','',$Text);\n\n\t// Check for font change text\n\tif (strpos($Text,'[/font]') !== false) {\t\n\t\t$Text = preg_replace(\"/\\[font=(.*?)\\](.*?)\\[\\/font\\]/sm\",\"<span style=\\\"font-family: $1;\\\">$2</span>\",$Text);\n\t}\n\t// Declare the format for [code] layout\n\n\t$CodeLayout = '<code>$1</code>';\n\t// Check for [code] text\n\tif (strpos($Text,'[code]') !== false) {\t\n\t\t$Text = preg_replace(\"/\\[code\\](.*?)\\[\\/code\\]/ism\",\"$CodeLayout\", $Text);\n\t}\n\t// Declare the format for [spoiler] layout\n\t$SpoilerLayout = '<blockquote class=\"spoiler\">$1</blockquote>';\n\n\t// Check for [spoiler] text\n\t// handle nested quotes\n\t$endlessloop = 0;\n\twhile ((strpos($Text, \"[/spoiler]\") !== false) and (strpos($Text, \"[spoiler]\") !== false) and (++$endlessloop < 20))\n\t\t$Text = preg_replace(\"/\\[spoiler\\](.*?)\\[\\/spoiler\\]/ism\",\"$SpoilerLayout\", $Text);\n\n\t// Check for [spoiler=Author] text\n\n\t$t_wrote = t('$1 spoiler');\n\n\t// handle nested quotes\n\t$endlessloop = 0;\n\twhile ((strpos($Text, \"[/spoiler]\")!== false) and (strpos($Text, \"[spoiler=\") !== false) and (++$endlessloop < 20))\n\t\t$Text = preg_replace(\"/\\[spoiler=[\\\"\\']*(.*?)[\\\"\\']*\\](.*?)\\[\\/spoiler\\]/ism\",\n\t\t\t\"<br /><strong class=\".'\"spoiler\"'.\">\" . $t_wrote . \"</strong><blockquote class=\".'\"spoiler\"'.\">$2</blockquote>\",\n\t\t\t$Text);\n\n\n\t$endlessloop = 0;\n\twhile ((strpos($Text, \"[/open]\")!== false) and (strpos($Text, \"[open=\") !== false) and (++$endlessloop < 20)) {\n\t\t$rnd = mt_rand();\n\t\t$Text = preg_replace(\"/\\[open=(.*?)\\](.*?)\\[\\/open\\]/ism\",\n\t\t\t\"<br /><div onclick=\\\"openClose('opendiv-\" . $rnd . \"');return false;\\\" class=\\\"fakelink\\\">$1</div><div id=\\\"opendiv-\" . $rnd . \"\\\" style=\\\"display: none;\\\">$2</div>\",\n\t\t\t$Text);\n\t}\n\n\n\n\t// Declare the format for [quote] layout\n\t$QuoteLayout = '<blockquote>$1</blockquote>';\n\n\t// Check for [quote] text\n\t// handle nested quotes\n\t$endlessloop = 0;\n\twhile ((strpos($Text, \"[/quote]\") !== false) and (strpos($Text, \"[quote]\") !== false) and (++$endlessloop < 20))\n\t\t$Text = preg_replace(\"/\\[quote\\](.*?)\\[\\/quote\\]/ism\",\"$QuoteLayout\", $Text);\n\n\t// Check for [quote=Author] text\n\n\t$t_wrote = t('$1 wrote:');\n\n\t// handle nested quotes\n\t$endlessloop = 0;\n\twhile ((strpos($Text, \"[/quote]\")!== false) and (strpos($Text, \"[quote=\") !== false) and (++$endlessloop < 20))\n\t\t$Text = preg_replace(\"/\\[quote=[\\\"\\']*(.*?)[\\\"\\']*\\](.*?)\\[\\/quote\\]/ism\",\n\t\t\t\"<br /><strong class=\".'\"author\"'.\">\" . $t_wrote . \"</strong><blockquote>$2</blockquote>\",\n\t\t\t$Text);\n\n\t// Images\n\t// [img]pathtoimage[/img]\n\tif (strpos($Text,'[/img]') !== false) {\n\t\t$Text = preg_replace(\"/\\[img\\](.*?)\\[\\/img\\]/ism\", '<img style=\"max-width=100%;\" src=\"$1\" alt=\"' . t('Image/photo') . '\" />', $Text);\n\t}\n\tif (strpos($Text,'[/zmg]') !== false) {\n\t\t$Text = preg_replace(\"/\\[zmg\\](.*?)\\[\\/zmg\\]/ism\", '<img class=\"zrl\" style=\"max-width=100%;\" src=\"$1\" alt=\"' . t('Image/photo') . '\" />', $Text);\n\t}\n\n\t// [img float={left, right}]pathtoimage[/img]\n\tif (strpos($Text,'[/img]') !== false) {\n\t\t$Text = preg_replace(\"/\\[img float=left\\](.*?)\\[\\/img\\]/ism\", '<img style=\"max-width=100%;\" src=\"$1\" style=\"float: left;\" alt=\"' . t('Image/photo') . '\" />', $Text);\n\t}\n\tif (strpos($Text,'[/img]') !== false) {\n\t\t$Text = preg_replace(\"/\\[img float=right\\](.*?)\\[\\/img\\]/ism\", '<img style=\"max-width=100%;\" src=\"$1\" style=\"float: right;\" alt=\"' . t('Image/photo') . '\" />', $Text);\n\t}\n\tif (strpos($Text,'[/zmg]') !== false) {\n\t\t$Text = preg_replace(\"/\\[zmg float=left\\](.*?)\\[\\/zmg\\]/ism\", '<img style=\"max-width=100%;\" class=\"zrl\" src=\"$1\" style=\"float: left;\" alt=\"' . t('Image/photo') . '\" />', $Text);\n\t}\n\tif (strpos($Text,'[/zmg]') !== false) {\n\t\t$Text = preg_replace(\"/\\[zmg float=right\\](.*?)\\[\\/zmg\\]/ism\", '<img style=\"max-width=100%;\" class=\"zrl\" src=\"$1\" style=\"float: right;\" alt=\"' . t('Image/photo') . '\" />', $Text);\n\t}\n\n\t// [img=widthxheight]pathtoimage[/img]\n\tif (strpos($Text,'[/img]') !== false) {\n\t\t$Text = preg_replace(\"/\\[img\\=([0-9]*)x([0-9]*)\\](.*?)\\[\\/img\\]/ism\", '<img src=\"$3\" style=\"width: 100%; max-width: $1px;\" alt=\"' . t('Image/photo') . '\" />', $Text);\n\t}\n\tif (strpos($Text,'[/zmg]') !== false) {\n\t\t$Text = preg_replace(\"/\\[zmg\\=([0-9]*)x([0-9]*)\\](.*?)\\[\\/zmg\\]/ism\", '<img class=\"zrl\" src=\"$3\" style=\"width: 100%; max-width: $1px;\" alt=\"' . t('Image/photo') . '\" />', $Text);\n\t}\n\n\t// [img=widthxheight float={left, right}]pathtoimage[/img]\n\tif (strpos($Text,'[/img]') !== false) {\n\t\t$Text = preg_replace(\"/\\[img\\=([0-9]*)x([0-9]*) float=left\\](.*?)\\[\\/img\\]/ism\", '<img src=\"$3\" style=\"width: 100%; max-width: $1px; float: left;\" alt=\"' . t('Image/photo') . '\" />', $Text);\n\t}\n\tif (strpos($Text,'[/img]') !== false) {\n\t\t$Text = preg_replace(\"/\\[img\\=([0-9]*)x([0-9]*) float=right\\](.*?)\\[\\/img\\]/ism\", '<img src=\"$3\" style=\"width: 100%; max-width: $1px; float: right;\" alt=\"' . t('Image/photo') . '\" />', $Text);\n\t}\n\tif (strpos($Text,'[/zmg]') !== false) {\n\t\t$Text = preg_replace(\"/\\[zmg\\=([0-9]*)x([0-9]*) float=left\\](.*?)\\[\\/zmg\\]/ism\", '<img class=\"zrl\" src=\"$3\" style=\"width: 100%; max-width: $1px; float: left;\" alt=\"' . t('Image/photo') . '\" />', $Text);\n\t}\n\tif (strpos($Text,'[/zmg]') !== false) {\n\t\t$Text = preg_replace(\"/\\[zmg\\=([0-9]*)x([0-9]*) float=right\\](.*?)\\[\\/zmg\\]/ism\", '<img class=\"zrl\" src=\"$3\" style=\"width: 100%; max-width: $1px; float: right;\" alt=\"' . t('Image/photo') . '\" />', $Text);\n\t}\n\n\t// style (sanitized)\n\tif (strpos($Text,'[/style]') !== false) {\n\t\t$Text = preg_replace_callback(\"(\\[style=(.*?)\\](.*?)\\[\\/style\\])ism\", \"bb_sanitize_style\", $Text);\n\t}\n\n\t// crypt\n\tif (strpos($Text,'[/crypt]') !== false) {\t\n\t\t$x = random_string();\n\t\t$Text = preg_replace(\"/\\[crypt\\](.*?)\\[\\/crypt\\]/ism\",'<br/><div id=\"' . $x . '\"><img src=\"' .$a->get_baseurl() . '/images/lock_icon.gif\" onclick=\"red_decrypt(\\'rot13\\',\\'\\',\\'$1\\',\\'#' . $x . '\\');\" alt=\"' . t('Encrypted content') . '\" title=\"' . t('Encrypted content') . '\" /><br /></div>', $Text);\n\t\t$Text = preg_replace_callback(\"/\\[crypt (.*?)\\](.*?)\\[\\/crypt\\]/ism\", 'bb_parse_crypt', $Text);\n\t}\n\n\tif(strpos($Text,'[/app]') !== false) {\n\t\t$Text = preg_replace_callback(\"/\\[app\\](.*?)\\[\\/app\\]/ism\",'bb_parse_app', $Text);\n\t}\n\n\tif(strpos($Text,'[/element]') !== false) {\n\t\t$Text = preg_replace_callback(\"/\\[element\\](.*?)\\[\\/element\\]/ism\",'bb_parse_element', $Text);\n\t}\n\n\n\t// html5 video and audio\n\tif (strpos($Text,'[/video]') !== false) {\t\n\t\t$Text = preg_replace_callback(\"/\\[video\\](.*?\\.(ogg|ogv|oga|ogm|webm|mp4|mpeg|mpg))\\[\\/video\\]/ism\", 'tryzrlvideo', $Text);\n\t}\n\tif (strpos($Text,'[/audio]') !== false) {\t\t\n\t\t$Text = preg_replace_callback(\"/\\[audio\\](.*?\\.(ogg|ogv|oga|ogm|webm|mp4|mp3|opus))\\[\\/audio\\]/ism\", 'tryzrlaudio', $Text);\n\t}\n\tif (strpos($Text,'[/zvideo]') !== false) {\t\n\t\t$Text = preg_replace_callback(\"/\\[zvideo\\](.*?\\.(ogg|ogv|oga|ogm|webm|mp4|mpeg|mpg))\\[\\/zvideo\\]/ism\", 'tryzrlvideo', $Text);\n\t}\n\tif (strpos($Text,'[/zaudio]') !== false) {\t\t\n\t\t$Text = preg_replace_callback(\"/\\[zaudio\\](.*?\\.(ogg|ogv|oga|ogm|webm|mp4|mp3|opus))\\[\\/zaudio\\]/ism\", 'tryzrlaudio', $Text);\n\t}\n\n\t// Try to Oembed\n\tif ($tryoembed) {\n\n\t\tif (strpos($Text,'[/video]') !== false) {\t\t\t\n\t\t\t$Text = preg_replace_callback(\"/\\[video\\](.*?)\\[\\/video\\]/ism\", 'tryoembed', $Text);\n\t\t}\n\t\tif (strpos($Text,'[/audio]') !== false) {\n\t\t\t$Text = preg_replace_callback(\"/\\[audio\\](.*?)\\[\\/audio\\]/ism\", 'tryoembed', $Text);\n\t\t}\n\n\t\tif (strpos($Text,'[/zvideo]') !== false) {\t\t\t\n\t\t\t$Text = preg_replace_callback(\"/\\[zvideo\\](.*?)\\[\\/zvideo\\]/ism\", 'tryoembed', $Text);\n\t\t}\n\t\tif (strpos($Text,'[/zaudio]') !== false) {\n\t\t\t$Text = preg_replace_callback(\"/\\[zaudio\\](.*?)\\[\\/zaudio\\]/ism\", 'tryoembed', $Text);\n\t\t}\n\t}\n\n\t// if video couldn't be embedded, link to it instead.\n\tif (strpos($Text,'[/video]') !== false) {\n\t\t$Text = preg_replace(\"/\\[video\\](.*?)\\[\\/video\\]/\", '<a href=\"$1\">$1</a>', $Text);\n\t}\n\tif (strpos($Text,'[/audio]') !== false) {\n\t\t$Text = preg_replace(\"/\\[audio\\](.*?)\\[\\/audio\\]/\", '<a href=\"$1\">$1</a>', $Text);\n\t}\n\n\tif (strpos($Text,'[/zvideo]') !== false) {\n\t\t$Text = preg_replace(\"/\\[zvideo\\](.*?)\\[\\/zvideo\\]/\", '<a class=\"zid\" href=\"$1\">$1</a>', $Text);\n\t}\n\tif (strpos($Text,'[/zaudio]') !== false) {\n\t\t$Text = preg_replace(\"/\\[zaudio\\](.*?)\\[\\/zaudio\\]/\", '<a class=\"zid\" href=\"$1\">$1</a>', $Text);\n\t}\n\n\n\n\n\tif ($tryoembed){\n\t\tif (strpos($Text,'[/iframe]') !== false) {\n\t\t\t$Text = preg_replace_callback(\"/\\[iframe\\](.*?)\\[\\/iframe\\]/ism\", 'bbiframe', $Text);\n\t\t}\n\t}\n\telse {\n\t\tif (strpos($Text,'[/iframe]') !== false) {\n\t\t\t$Text = preg_replace(\"/\\[iframe\\](.*?)\\[\\/iframe\\]/ism\", '<a href=\"$1\">$1</a>', $Text);\n\t\t}\n\t}\n\t// Youtube extensions\n\tif (strpos($Text,'[youtube]') !== false) {\n\t\tif ($tryoembed) {\n\t\t\t$Text = preg_replace_callback(\"/\\[youtube\\](https?:\\/\\/www.youtube.com\\/watch\\?v\\=.*?)\\[\\/youtube\\]/ism\", 'tryoembed', $Text);\t\t\n\t\t\t$Text = preg_replace_callback(\"/\\[youtube\\](www.youtube.com\\/watch\\?v\\=.*?)\\[\\/youtube\\]/ism\", 'tryoembed', $Text);\t\t\n\t\t\t$Text = preg_replace_callback(\"/\\[youtube\\](https?:\\/\\/youtu.be\\/.*?)\\[\\/youtube\\]/ism\",'tryoembed',$Text); \n\t\t}\n\t\t\t$Text = preg_replace(\"/\\[youtube\\]https?:\\/\\/www.youtube.com\\/watch\\?v\\=(.*?)\\[\\/youtube\\]/ism\",'[youtube]$1[/youtube]',$Text); \n\t\t\t$Text = preg_replace(\"/\\[youtube\\]https?:\\/\\/www.youtube.com\\/embed\\/(.*?)\\[\\/youtube\\]/ism\",'[youtube]$1[/youtube]',$Text); \n\t\t\t$Text = preg_replace(\"/\\[youtube\\]https?:\\/\\/youtu.be\\/(.*?)\\[\\/youtube\\]/ism\",'[youtube]$1[/youtube]',$Text);\n\n\t\tif ($tryoembed)\n\t\t\t$Text = preg_replace(\"/\\[youtube\\]([A-Za-z0-9\\-_=]+)(.*?)\\[\\/youtube\\]/ism\", '<iframe width=\"' . $a->videowidth . '\" height=\"' . $a->videoheight . '\" src=\"http://www.youtube.com/embed/$1\" frameborder=\"0\" ></iframe>', $Text);\n\t\telse \n\t\t\t$Text = preg_replace(\"/\\[youtube\\]([A-Za-z0-9\\-_=]+)(.*?)\\[\\/youtube\\]/ism\", \"http://www.youtube.com/watch?v=$1\", $Text);\n\t}\n\tif (strpos($Text,'[vimeo]') !== false) {\n\t\tif ($tryoembed) {\n\t\t\t$Text = preg_replace_callback(\"/\\[vimeo\\](https?:\\/\\/player.vimeo.com\\/video\\/[0-9]+).*?\\[\\/vimeo\\]/ism\",'tryoembed',$Text); \n\t\t\t$Text = preg_replace_callback(\"/\\[vimeo\\](https?:\\/\\/vimeo.com\\/[0-9]+).*?\\[\\/vimeo\\]/ism\",'tryoembed',$Text); \n\t\t}\n\n\t\t$Text = preg_replace(\"/\\[vimeo\\]https?:\\/\\/player.vimeo.com\\/video\\/([0-9]+)(.*?)\\[\\/vimeo\\]/ism\",'[vimeo]$1[/vimeo]',$Text); \n\t\t$Text = preg_replace(\"/\\[vimeo\\]https?:\\/\\/vimeo.com\\/([0-9]+)(.*?)\\[\\/vimeo\\]/ism\",'[vimeo]$1[/vimeo]',$Text);\n\n\t\tif ($tryoembed)\n\t\t\t$Text = preg_replace(\"/\\[vimeo\\]([0-9]+)(.*?)\\[\\/vimeo\\]/ism\", '<iframe width=\"' . $a->videowidth . '\" height=\"' . $a->videoheight . '\" src=\"http://player.vimeo.com/video/$1\" frameborder=\"0\" ></iframe>', $Text);\n\t\telse\n\t\t\t$Text = preg_replace(\"/\\[vimeo\\]([0-9]+)(.*?)\\[\\/vimeo\\]/ism\", \"http://vimeo.com/$1\", $Text);\n\t}\n\n\t// oembed tag\n\t$Text = oembed_bbcode2html($Text);\n\n\t// Avoid triple linefeeds through oembed\n\t$Text = str_replace(\"<br style='clear:left'></span><br /><br />\", \"<br style='clear:left'></span><br />\", $Text);\n\n\t// If we found an event earlier, strip out all the event code and replace with a reformatted version.\n\t// Replace the event-start section with the entire formatted event. The other bbcode is stripped.\n\t// Summary (e.g. title) is required, earlier revisions only required description (in addition to \n\t// start which is always required). Allow desc with a missing summary for compatibility.\n\n\tif((x($ev,'desc') || x($ev,'summary')) && x($ev,'start')) {\n\t\t$sub = format_event_html($ev);\n\n\t\t$Text = preg_replace(\"/\\[event\\-summary\\](.*?)\\[\\/event\\-summary\\]/ism\",'',$Text);\n\t\t$Text = preg_replace(\"/\\[event\\-description\\](.*?)\\[\\/event\\-description\\]/ism\",'',$Text);\n\t\t$Text = preg_replace(\"/\\[event\\-start\\](.*?)\\[\\/event\\-start\\]/ism\",$sub,$Text); \n\t\t$Text = preg_replace(\"/\\[event\\-finish\\](.*?)\\[\\/event\\-finish\\]/ism\",'',$Text);\n\t\t$Text = preg_replace(\"/\\[event\\-location\\](.*?)\\[\\/event\\-location\\]/ism\",'',$Text);\n\t\t$Text = preg_replace(\"/\\[event\\-adjust\\](.*?)\\[\\/event\\-adjust\\]/ism\",'',$Text);\n\t}\n\n\t// Unhide all [noparse] contained bbtags unspacefying them \n\t// and triming the [noparse] tag.\n\tif (strpos($Text,'[noparse]') !== false) {\n\t\t$Text = preg_replace_callback(\"/\\[noparse\\](.*?)\\[\\/noparse\\]/ism\", 'bb_unspacefy_and_trim',$Text);\n\t}\n\tif (strpos($Text,'[nobb]') !== false) {\n\t\t$Text = preg_replace_callback(\"/\\[nobb\\](.*?)\\[\\/nobb\\]/ism\", 'bb_unspacefy_and_trim',$Text);\n\t}\n\tif (strpos($Text,'[pre]') !== false) {\n\t\t$Text = preg_replace_callback(\"/\\[pre\\](.*?)\\[\\/pre\\]/ism\", 'bb_unspacefy_and_trim',$Text);\n\t}\n\n\t$Text = preg_replace('/\\[\\&amp\\;([#a-z0-9]+)\\;\\]/','&$1;',$Text);\n\n\t// fix any escaped ampersands that may have been converted into links\n\t$Text = preg_replace(\"/\\<(.*?)(src|href)=(.*?)\\&amp\\;(.*?)\\>/ism\",'<$1$2=$3&$4>',$Text);\n\n\t$Text = preg_replace(\"/\\<(.*?)(src|href)=\\\"[^zhfm#](.*?)\\>/ism\",'<$1$2=\"\">',$Text);\n\n\t$Text = bb_replace_images($Text,$saved_images);\n\n\tcall_hooks('bbcode',$Text);\n\n\treturn $Text;\n}", "title": "" }, { "docid": "84ceeebabf90a6d1f83310b06f2e90e7", "score": "0.6961294", "text": "function bbcode($str){\n \n // The array of regex patterns to look for\n $format_search = array(\n '#\\[b\\](.*?)\\[/b\\]#is', // Bold ([b]text[/b]\n '#\\[i\\](.*?)\\[/i\\]#is', // Italics ([i]text[/i]\n '#\\[u\\](.*?)\\[/u\\]#is', // Underline ([u]text[/u])\n '#\\[s\\](.*?)\\[/s\\]#is', // Strikethrough ([s]text[/s])\n '#\\[quote\\](.*?)\\[/quote\\]#is', // Quote ([quote]text[/quote])\n '/\\[quote\\=(.*?)\\](.*?)\\[\\/quote\\]/is', // Quote ([quote]text[/quote])\n '#\\[php\\](.*?)\\[/php\\]#is', // php ([php]text[/php])\n '#\\[code\\](.*?)\\[/code\\]#is', // Monospaced code [code]text[/code])\n '#\\[youtube\\](.*?)\\[/youtube\\]#is', // Monospaced youtube [youtube]text[/youtube])\n '#\\[size=([1-9]|1[0-9]|20)\\](.*?)\\[/size\\]#is', // Font size 1-20px [size=20]text[/size])\n '#\\[color=\\#?([A-F0-9]{3}|[A-F0-9]{6})\\](.*?)\\[/color\\]#is', // Font color ([color=#00F]text[/color])\n '#\\[url=((?:ftp|https?)://.*?)\\](.*?)\\[/url\\]#i', // Hyperlink with descriptive text ([url=http://url]text[/url])\n '#\\[url\\]((?:ftp|https?)://.*?)\\[/url\\]#i', // Hyperlink ([url]http://url[/url])\n '#\\[img\\](https?://.*?\\.(?:jpg|jpeg|gif|png|bmp))\\[/img\\]#i' // Image ([img]http://url_to_image[/img])\n );\n // The matching array of strings to replace matches with\n $format_replace = array(\n '<strong>$1</strong>',\n '<em>$1</em>',\n '<span style=\"text-decoration: underline;\">$1</span>',\n '<span style=\"text-decoration: line-through;\">$1</span>',\n '<div class=\"bbcode_quote\" align=\"left\"><i>$1</i></div>',\n '<div class=\"bbcode_quote\" align=\"left\"><strong>Quote by:</strong> $1<i>$2</i></div>',\n '<div class=\"bbcode_code_desc\" align=\"left\">Php:</div><div class=\"bbcode_code\">$1</div>', \n\t '<div class=\"bbcode_code_desc\" align=\"left\">Kod:</div><div class=\"bbcode_code\">$1</div>',\n\t '<iframe width=\"420\" height=\"315\" src=\"http://www.youtube.com/embed/$1\" frameborder=\"0\" allowfullscreen></iframe>',\n '<span style=\"font-size: $1px;\">$2</span>',\n '<span style=\"color: #$1;\">$2</span>',\n '<a href=\"$1\">$2</a>',\n '<a href=\"$1\">$1</a>',\n '<img src=\"$1\" alt=\"\" />'\n );\n // Perform the actual conversion\n $str = preg_replace($format_search, $format_replace, $str);\n // Convert line breaks in the <br /> tag\n $str = nl2br($str);\n return $str;\n}", "title": "" }, { "docid": "a017bede6c35c71852c422241adcb7fd", "score": "0.6955474", "text": "function bbcode_process_to_plain_text($text, $bbcode_uid = '', $lang)\n{\n // First, add a colon before bbcode_uid since all bbcode_uid identifiers are always preceded by a colon\n $bbcode_uid = ':' . $bbcode_uid;\n\n // Next, remove slashes\n $text = html_entity_decode(trim(stripslashes($text)));\n\n // Before we start with bbcode removal, convert html links or email addresses to plain text\n $text = preg_replace('/<!-- w --><a class=\"postlink\" href=\"http:\\/\\/(.*?)\">(.*?)<\\/a><!-- w -->/', '\\\\1', $text);\n $text = preg_replace('/<!-- m --><a class=\"postlink\" href=\"http:\\/\\/(.*?)\">(.*?)<\\/a><!-- m -->/', '\\\\1', $text);\n $text = preg_replace('/<!-- e --><a href=\"mailto:(.*?)\">(.*?)<\\/a><!-- e -->/', '\\\\1', $text);\n $text = preg_replace('/<!-- s(.*?) --><img src=\"(.*?)\" alt=\"(.*?)\" title=\"(.*?)\" \\/><!-- s(.*?) -->/', '[\\\\4]', $text);\n\n // Now, we define the plain text markers used for [ quote ] and [ code ] blocks, list items, and [ img ] open and close tags\n $newline = \"\\r\\n\";\n $q1 = $newline . '>>>>>>>>>>>>>>>>>>>>>>' . $newline; // quote or code opening marker\n $q2 = $newline . '<<<<<<<<<<<<<<<<<<<<<<' . $newline; $newline; // quote or code closing marker\n $l1 = $newline . ' (*) '; // list item marker\n $img1 = '[' . $lang['IMAGE_AT'] . ': '; // img opening marker\n $img2 = ' ]'; // img closing marker\n\n // Next, replace open and close quote tags with plain text versions\n $text = preg_replace('/\\[quote=\\\"(.*?)\\\"' . $bbcode_uid . '\\]/', $newline . '\\\\1 '. $lang['WROTE'].':'.$q1, $text);\n $text = preg_replace('/\\[quote' . $bbcode_uid . '\\]/', $newline . $lang['QUOTE'].':'.$q1, $text);\n $text = preg_replace('/\\[\\/quote' . $bbcode_uid . '\\]/', $q2, $text);\n\n // And now, replace code tags with plain text versions\n $text = preg_replace('/\\[code' . $bbcode_uid . '\\]/', $newline . $lang['CODE'].':'.$q1, $text);\n $text = preg_replace('/\\[\\/code' . $bbcode_uid . '\\]/', $q2, $text);\n\n // Now, replace any open or close brackets that have been converted by phpbb into [ or ] (e.g if nested inside of code tags)\n $text = preg_replace('/&#91;/', '[', $text);\n $text = preg_replace('/&#93;/', ']', $text);\n\n // Next, change list item bbcode ([*]) into simple asterisks (note: does not process list numbers or letters)\n $text = preg_replace('/\\[\\*' . $bbcode_uid . '\\]/', $l1, $text);\n\n // Now, process image and url bbcode (get rid of aliases and insert the actual image or url address; put images inside of square prackets).\n $text = preg_replace('/\\[img' . $bbcode_uid . '\\](.*?)\\[\\/img' . $bbcode_uid . '\\]/', $img1 .'\\\\1' . $img2, $text);\n $text = preg_replace('/\\[url=(.*?)' . $bbcode_uid . '\\](.*?)\\[\\/url' . $bbcode_uid . '\\]/', '\\\\1', $text);\n $text = preg_replace('/\\[url' . $bbcode_uid . '\\](.*?)\\[\\/url' . $bbcode_uid . '\\]/', '\\\\1', $text);\n\n // Now, remove all bracketed expressions with bbcode_uid identifier in them\n $text = preg_replace('/\\[([^[]*?)' . $bbcode_uid . '([^]]*?)\\]/', '', $text);\n\n // And finally, change multiple blank lines into one blank line\n $text = preg_replace('/(\\\\r\\\\n){3,}/s', $newline.$newline, $text);\n\n return $text;\n}", "title": "" }, { "docid": "a248f8d2b744f29edb406b0424649a86", "score": "0.69107836", "text": "Function bbcode($str){\n\t\t// Makes < and > page friendly\n\t\t//$str=str_replace(\"&\",\"&amp;\",$str);\n\t\t$str=str_replace(\"<\",\"&lt;\",$str);\n\t\t$str=str_replace(\">\",\"&gt;\",$str);\n\t\t\n\t\t// Link inside tags new window\n\t\t$str = preg_replace(\"#\\[url\\](.*?)?(.*?)\\[/url\\]#si\", \"<A HREF=\\\"\\\\1\\\\2\\\" TARGET=\\\"_blank\\\">\\\\1\\\\2</A>\", $str);\n\t\t\n\t\t// Link inside first tag new window\n\t\t$str = preg_replace(\"#\\[url=(.*?)?(.*?)\\](.*?)\\[/url\\]#si\", \"<A HREF=\\\"\\\\2\\\" TARGET=\\\"_blank\\\">\\\\3</A>\", $str);\n\t\t\n\t\t// Link inside tags\n\t\t$str = preg_replace(\"#\\[url2\\](.*?)?(.*?)\\[/url2\\]#si\", \"<A HREF=\\\"\\\\1\\\\2\\\">\\\\1\\\\2</A>\", $str);\n\t\t\n\t\t// Link inside first tag\n\t\t$str = preg_replace(\"#\\[url2=(.*?)?(.*?)\\](.*?)\\[/url2\\]#si\", \"<A HREF=\\\"\\\\2\\\">\\\\3</A>\", $str);\n\t\t\n\t\t// Automatic links if no url tags used\n\t\t$str = preg_replace_callback(\"#([\\n ])([a-z]+?)://([a-z0-9\\-\\.,\\?!%\\*_\\#:;~\\\\&$@\\/=\\+]+)#si\", \"bbcode_autolink\", $str);\n\t\t$str = preg_replace(\"#([\\n ])www\\.([a-z0-9\\-]+)\\.([a-z0-9\\-.\\~]+)((?:/[a-z0-9\\-\\.,\\?!%\\*_\\#:;~\\\\&$@\\/=\\+]*)?)#i\", \" <a href=\\\"http://www.\\\\2.\\\\3\\\\4\\\" target=\\\"_blank\\\">www.\\\\2.\\\\3\\\\4</a>\", $str);\n\t\t$str = preg_replace(\"#([\\n ])([a-z0-9\\-_.]+?)@([\\w\\-]+\\.([\\w\\-\\.]+\\.)?[\\w]+)#i\", \"\\\\1<a href=\\\"mailto: \\\\2@\\\\3\\\">\\\\2_(at)_\\\\3</a>\", $str);\n\t\t\n\t\t// PHP Code\n\t\t$str = preg_replace(\"#\\[php\\](.*?)\\[/php]#si\", \"<div class=\\\"codetop\\\"><u><strong>&lt?PHP:</strong></u></div><div class=\\\"codemain\\\">\\\\1</div>\", $str);\n\t\t\n\t\t// Bold\n\t\t$str = preg_replace(\"#\\[b\\](.*?)\\[/b\\]#si\", \"<strong>\\\\1</strong>\", $str);\n\t\t\n\t\t// Italics\n\t\t$str = preg_replace(\"#\\[i\\](.*?)\\[/i\\]#si\", \"<em>\\\\1</em>\", $str);\n\t\t\n\t\t// Underline\n\t\t$str = preg_replace(\"#\\[u\\](.*?)\\[/u\\]#si\", \"<u>\\\\1</u>\", $str);\n\t\t\n\t\t// Alig text\n\t\t$str = preg_replace(\"#\\[align=(left|center|right)\\](.*?)\\[/align\\]#si\", \"<div align=\\\"\\\\1\\\">\\\\2</div>\", $str); \n\t\t\n\t\t// Font Color\n\t\t$str = preg_replace(\"#\\[color=(.*?)\\](.*?)\\[/color\\]#si\", \"<span style=\\\"color:\\\\1\\\">\\\\2</span>\", $str);\n\t\t\n\t\t// Font Size\n\t\t$str = preg_replace(\"#\\[size=(.*?)\\](.*?)\\[/size\\]#si\", \"<span style=\\\"font-size:\\\\1\\\">\\\\2</span>\", $str);\n\t\t\n\t\t// Image\n\t\t$str = preg_replace(\"#\\[img\\](.*?)\\[/img\\]#si\", \"<img src=\\\"\\\\1\\\" border=\\\"0\\\" alt=\\\"\\\" />\", $str);\n\t\t\n\t\t// Uploaded image\n\t\t$str = preg_replace(\"#\\[ftp_img\\](.*?)\\[/ftp_img\\]#si\", \"<img src=\\\"img/\\\\1\\\" border=\\\"0\\\" alt=\\\"\\\" />\", $str);\n\t\t\n\t\t// HR Line\n\t\t$str = preg_replace(\"#\\[hr=(\\d{1,2}|100)\\]#si\", \"<hr class=\\\"linia\\\" width=\\\"\\\\1%\\\" />\", $str);\n\t\t\n\t\t// Code\n\t\t$str = preg_replace(\"#\\[code\\](.*?)\\[/code]#si\", \"<div class=\\\"codetop\\\"><u><strong>Code:</strong></u></div><div class=\\\"codemain\\\">\\\\1</div>\", $str);\n\t\t\n\t\t// Code, Provide Author\n\t\t$str = preg_replace(\"#\\[code=(.*?)\\](.*?)\\[/code]#si\", \"<div class=\\\"codetop\\\"><u><strong>Code \\\\1:</strong></u></div><div class=\\\"codemain\\\">\\\\2</div>\", $str);\n\t\t\n\t\t// Quote\n\t\t$str = preg_replace(\"#\\[quote\\](.*?)\\[/quote]#si\", \"<div class=\\\"quotetop\\\"><u><strong>Quote:</strong></u></div><div class=\\\"quotemain\\\">\\\\1</div>\", $str);\n\t\t\n\t\t// Quote, Provide Author\n\t\t$str = preg_replace(\"#\\[quote=(.*?)\\](.*?)\\[/quote]#si\", \"<div class=\\\"quotetop\\\"><u><strong>Quote \\\\1:</strong></u></div><div class=\\\"quotemain\\\">\\\\2</div>\", $str);\n\t\t\n\t\t// Email\n\t\t$str = preg_replace(\"#\\[email\\]([a-z0-9\\-_.]+?)@([\\w\\-]+\\.([\\w\\-\\.]+\\.)?[\\w]+)\\[/email\\]#i\", \"<a href=\\\"mailto:\\\\1@\\\\2\\\">\\\\1@\\\\2</a>\", $str);\n\t\t\n\t\t// Email, Provide Author\n\t\t$str = preg_replace(\"#\\[email=([a-z0-9\\-_.]+?)@([\\w\\-]+\\.([\\w\\-\\.]+\\.)?[\\w]+)?(.*?)\\](.*?)\\[/email\\]#i\", \"<a href=\\\"mailto:\\\\1@\\\\2\\\">\\\\5</a>\", $str);\n\t\t\n\t\t// YouTube\n\t\t$str = preg_replace(\"#\\[youtube\\]http://(?:www\\.)?youtube.com/v/([0-9A-Za-z-_]{11})[^[]*\\[/youtube\\]#si\", \"<object width=\\\"425\\\" height=\\\"350\\\"><param name=\\\"movie\\\" value=\\\"http://www.youtube.com/v/\\\\1\\\"></param><param name=\\\"wmode\\\" value=\\\"transparent\\\"></param><embed src=\\\"http://www.youtube.com/v/\\\\1\\\" type=\\\"application/x-shockwave-flash\\\" wmode=\\\"transparent\\\" width=\\\"425\\\" height=\\\"350\\\"></embed></object>\", $str);\n\t\t$str = preg_replace(\"#\\[youtube\\]http://(?:www\\.)?youtube.com/watch\\?v=([0-9A-Za-z-_]{11})[^[]*\\[/youtube\\]#si\", \"<object width=\\\"425\\\" height=\\\"350\\\"><param name=\\\"movie\\\" value=\\\"http://www.youtube.com/v/\\\\1\\\"></param><param name=\\\"wmode\\\" value=\\\"transparent\\\"></param><embed src=\\\"http://www.youtube.com/v/\\\\1\\\" type=\\\"application/x-shockwave-flash\\\" wmode=\\\"transparent\\\" width=\\\"425\\\" height=\\\"350\\\"></embed></object>\", $str);\n\t\t\n\t\t// Google Video\n\t\t$str = preg_replace(\"#\\[gvideo\\]http://video.google.[A-Za-z0-9.]{2,5}/videoplay\\?docid=([0-9A-Za-z-_]*)[^[]*\\[/gvideo\\]#si\", \"<object width=\\\"425\\\" height=\\\"350\\\"><param name=\\\"movie\\\" value=\\\"http://video.google.com/googleplayer.swf\\?docId=\\\\1\\\"></param><param name=\\\"wmode\\\" value=\\\"transparent\\\"></param><embed src=\\\"http://video.google.com/googleplayer.swf\\?docId=\\\\1\\\" type=\\\"application/x-shockwave-flash\\\" allowScriptAccess=\\\"sameDomain\\\" quality=\\\"best\\\" bgcolor=\\\"#ffffff\\\" scale=\\\"noScale\\\" salign=\\\"TL\\\" FlashVars=\\\"playerMode=embedded\\\" wmode=\\\"transparent\\\" width=\\\"425\\\" height=\\\"350\\\"></embed></object>\", $str);\n\t\t\n\t\t// change \\n to <br />\n\t\t$str = nl2br($str);\n\t\t\n\t\t// return bbdecoded string\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "91e5f72885facbabc64aba76a84b250f", "score": "0.6840584", "text": "function bbCode2XML(&$a_content)\n\t{\n\t\t$a_content = eregi_replace(\"\\[com\\]\",\"<Comment>\",$a_content);\n\t\t$a_content = eregi_replace(\"\\[\\/com\\]\",\"</Comment>\",$a_content);\n\t\t$a_content = eregi_replace(\"\\[emp]\",\"<Emph>\",$a_content);\n\t\t$a_content = eregi_replace(\"\\[\\/emp\\]\",\"</Emph>\",$a_content);\n\t\t$a_content = eregi_replace(\"\\[str]\",\"<Strong>\",$a_content);\n\t\t$a_content = eregi_replace(\"\\[\\/str\\]\",\"</Strong>\",$a_content);\n\t}", "title": "" }, { "docid": "55541f7831b32a88b1df699913028be6", "score": "0.6807704", "text": "function html_to_bbc($text)\n{\n\tglobal $modSettings, $smcFunc, $scripturl, $context;\n\n\t// Replace newlines with spaces, as that's how browsers usually interpret them.\n\t$text = preg_replace(\"~\\s*[\\r\\n]+\\s*~\", ' ', $text);\n\n\t// Though some of us love paragraphs, the parser will do better with breaks.\n\t$text = preg_replace('~</p>\\s*?<p~i', '</p><br /><p', $text);\n\t$text = preg_replace('~</p>\\s*(?!<)~i', '</p><br />', $text);\n\n\t// Safari/webkit wraps lines in Wysiwyg in <div>'s.\n\tif (isBrowser('webkit'))\n\t\t$text = preg_replace(array('~<div(?:\\s(?:[^<>]*?))?' . '>~i', '</div>'), array('<br />', ''), $text);\n\n\t// If there's a trailing break get rid of it - Firefox tends to add one.\n\t$text = preg_replace('~<br\\s?/?' . '>$~i', '', $text);\n\n\t// Remove any formatting within code tags.\n\tif (strpos($text, '[code') !== false)\n\t{\n\t\t$text = preg_replace('~<br\\s?/?' . '>~i', '#smf_br_spec_grudge_cool!#', $text);\n\t\t$parts = preg_split('~(\\[/code\\]|\\[code(?:=[^\\]]+)?\\])~i', $text, -1, PREG_SPLIT_DELIM_CAPTURE);\n\n\t\t// Only mess with stuff outside [code] tags.\n\t\tfor ($i = 0, $n = count($parts); $i < $n; $i++)\n\t\t{\n\t\t\t// Value of 2 means we're inside the tag.\n\t\t\tif ($i % 4 == 2)\n\t\t\t\t$parts[$i] = strip_tags($parts[$i]);\n\t\t}\n\n\t\t$text = strtr(implode('', $parts), array('#smf_br_spec_grudge_cool!#' => '<br />'));\n\t}\n\n\t// Remove scripts, style and comment blocks.\n\t$text = preg_replace('~<script[^>]*[^/]?' . '>.*?</script>~i', '', $text);\n\t$text = preg_replace('~<style[^>]*[^/]?' . '>.*?</style>~i', '', $text);\n\t$text = preg_replace('~\\\\<\\\\!--.*?-->~i', '', $text);\n\t$text = preg_replace('~\\\\<\\\\!\\\\[CDATA\\\\[.*?\\\\]\\\\]\\\\>~i', '', $text);\n\n\t// Do the smileys ultra first!\n\tpreg_match_all('~<img\\s+[^<>]*?id=\"*smiley_\\d+_([^<>]+?)[\\s\"/>]\\s*[^<>]*?/*>(?:\\s)?~i', $text, $matches);\n\tif (!empty($matches[0]))\n\t{\n\t\t// Easy if it's not custom.\n\t\tif (empty($modSettings['smiley_enable']))\n\t\t{\n\t\t\t$smileysfrom = array('>:D', ':D', '::)', '>:(', ':)', ';)', ';D', ':(', ':o', '8)', ':P', '???', ':-[', ':-X', ':-*', ':\\'(', ':-\\\\', '^-^', 'O0', 'C:-)', '0:)');\n\t\t\t$smileysto = array('evil.gif', 'cheesy.gif', 'rolleyes.gif', 'angry.gif', 'smiley.gif', 'wink.gif', 'grin.gif', 'sad.gif', 'shocked.gif', 'cool.gif', 'tongue.gif', 'huh.gif', 'embarrassed.gif', 'lipsrsealed.gif', 'kiss.gif', 'cry.gif', 'undecided.gif', 'azn.gif', 'afro.gif', 'police.gif', 'angel.gif');\n\n\t\t\tforeach ($matches[1] as $k => $file)\n\t\t\t{\n\t\t\t\t$found = array_search($file, $smileysto);\n\t\t\t\t// Note the weirdness here is to stop double spaces between smileys.\n\t\t\t\tif ($found)\n\t\t\t\t\t$matches[1][$k] = '-[]-smf_smily_start#|#' . htmlspecialchars($smileysfrom[$found]) . '-[]-smf_smily_end#|#';\n\t\t\t\telse\n\t\t\t\t\t$matches[1][$k] = '';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Load all the smileys.\n\t\t\t$names = array();\n\t\t\tforeach ($matches[1] as $file)\n\t\t\t\t$names[] = $file;\n\t\t\t$names = array_unique($names);\n\n\t\t\tif (!empty($names))\n\t\t\t{\n\t\t\t\t$request = $smcFunc['db_query']('', '\n\t\t\t\t\tSELECT code, filename\n\t\t\t\t\tFROM {db_prefix}smileys\n\t\t\t\t\tWHERE filename IN ({array_string:smiley_filenames})',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'smiley_filenames' => $names,\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t$mappings = array();\n\t\t\t\twhile ($row = $smcFunc['db_fetch_assoc']($request))\n\t\t\t\t\t$mappings[$row['filename']] = htmlspecialchars($row['code']);\n\t\t\t\t$smcFunc['db_free_result']($request);\n\n\t\t\t\tforeach ($matches[1] as $k => $file)\n\t\t\t\t\tif (isset($mappings[$file]))\n\t\t\t\t\t\t$matches[1][$k] = '-[]-smf_smily_start#|#' . $mappings[$file] . '-[]-smf_smily_end#|#';\n\t\t\t}\n\t\t}\n\n\t\t// Replace the tags!\n\t\t$text = str_replace($matches[0], $matches[1], $text);\n\n\t\t// Now sort out spaces\n\t\t$text = str_replace(array('-[]-smf_smily_end#|#-[]-smf_smily_start#|#', '-[]-smf_smily_end#|#', '-[]-smf_smily_start#|#'), ' ', $text);\n\t}\n\n\t// Only try to buy more time if the client didn't quit.\n\tif (connection_aborted() && $context['server']['is_apache'])\n\t\t@apache_reset_timeout();\n\n\t$parts = preg_split('~(<[A-Za-z]+\\s*[^<>]*?style=\"?[^<>\"]+\"?[^<>]*?(?:/?)>|</[A-Za-z]+>)~', $text, -1, PREG_SPLIT_DELIM_CAPTURE);\n\t$replacement = '';\n\t$stack = array();\n\n\tforeach ($parts as $part)\n\t{\n\t\tif (preg_match('~(<([A-Za-z]+)\\s*[^<>]*?)style=\"?([^<>\"]+)\"?([^<>]*?(/?)>)~', $part, $matches) === 1)\n\t\t{\n\t\t\t// If it's being closed instantly, we can't deal with it...yet.\n\t\t\tif ($matches[5] === '/')\n\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Get an array of styles that apply to this element. (The strtr is there to combat HTML generated by Word.)\n\t\t\t\t$styles = explode(';', strtr($matches[3], array('&quot;' => '')));\n\t\t\t\t$curElement = $matches[2];\n\t\t\t\t$precedingStyle = $matches[1];\n\t\t\t\t$afterStyle = $matches[4];\n\t\t\t\t$curCloseTags = '';\n\t\t\t\t$extra_attr = '';\n\n\t\t\t\tforeach ($styles as $type_value_pair)\n\t\t\t\t{\n\t\t\t\t\t// Remove spaces and convert uppercase letters.\n\t\t\t\t\t$clean_type_value_pair = strtolower(strtr(trim($type_value_pair), '=', ':'));\n\n\t\t\t\t\t// Something like 'font-weight: bold' is expected here.\n\t\t\t\t\tif (strpos($clean_type_value_pair, ':') === false)\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t// Capture the elements of a single style item (e.g. 'font-weight' and 'bold').\n\t\t\t\t\tlist ($style_type, $style_value) = explode(':', $type_value_pair);\n\n\t\t\t\t\t$style_value = trim($style_value);\n\n\t\t\t\t\tswitch (trim($style_type))\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 'font-weight':\n\t\t\t\t\t\t\tif ($style_value === 'bold')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$curCloseTags .= '[/b]';\n\t\t\t\t\t\t\t\t$replacement .= '[b]';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'text-decoration':\n\t\t\t\t\t\t\tif ($style_value == 'underline')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$curCloseTags .= '[/u]';\n\t\t\t\t\t\t\t\t$replacement .= '[u]';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telseif ($style_value == 'line-through')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$curCloseTags .= '[/s]';\n\t\t\t\t\t\t\t\t$replacement .= '[s]';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'text-align':\n\t\t\t\t\t\t\tif ($style_value == 'left')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$curCloseTags .= '[/left]';\n\t\t\t\t\t\t\t\t$replacement .= '[left]';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telseif ($style_value == 'center')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$curCloseTags .= '[/center]';\n\t\t\t\t\t\t\t\t$replacement .= '[center]';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telseif ($style_value == 'right')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$curCloseTags .= '[/right]';\n\t\t\t\t\t\t\t\t$replacement .= '[right]';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'font-style':\n\t\t\t\t\t\t\tif ($style_value == 'italic')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$curCloseTags .= '[/i]';\n\t\t\t\t\t\t\t\t$replacement .= '[i]';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'color':\n\t\t\t\t\t\t\t$curCloseTags .= '[/color]';\n\t\t\t\t\t\t\t$replacement .= '[color=' . $style_value . ']';\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'font-size':\n\t\t\t\t\t\t\t// Sometimes people put decimals where decimals should not be.\n\t\t\t\t\t\t\tif (preg_match('~(\\d)+\\.\\d+(p[xt])~i', $style_value, $dec_matches) === 1)\n\t\t\t\t\t\t\t\t$style_value = $dec_matches[1] . $dec_matches[2];\n\n\t\t\t\t\t\t\t$curCloseTags .= '[/size]';\n\t\t\t\t\t\t\t$replacement .= '[size=' . $style_value . ']';\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'font-family':\n\t\t\t\t\t\t\t// Only get the first freaking font if there's a list!\n\t\t\t\t\t\t\tif (strpos($style_value, ',') !== false)\n\t\t\t\t\t\t\t\t$style_value = substr($style_value, 0, strpos($style_value, ','));\n\n\t\t\t\t\t\t\t$curCloseTags .= '[/font]';\n\t\t\t\t\t\t\t$replacement .= '[font=' . strtr($style_value, array(\"'\" => '')) . ']';\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t// This is a hack for images with dimensions embedded.\n\t\t\t\t\t\tcase 'width':\n\t\t\t\t\t\tcase 'height':\n\t\t\t\t\t\t\tif (preg_match('~[1-9]\\d*~i', $style_value, $dimension) === 1)\n\t\t\t\t\t\t\t\t$extra_attr .= ' ' . $style_type . '=\"' . $dimension[0] . '\"';\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'list-style-type':\n\t\t\t\t\t\t\tif (preg_match('~none|disc|circle|square|decimal|decimal-leading-zero|lower-roman|upper-roman|lower-alpha|upper-alpha|lower-greek|lower-latin|upper-latin|hebrew|armenian|georgian|cjk-ideographic|hiragana|katakana|hiragana-iroha|katakana-iroha~i', $style_value, $listType) === 1)\n\t\t\t\t\t\t\t\t$extra_attr .= ' listtype=\"' . $listType[0] . '\"';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Preserve some tags stripping the styling.\n\t\t\t\tif (in_array($matches[2], array('a', 'font', 'td')))\n\t\t\t\t{\n\t\t\t\t\t$replacement .= $precedingStyle . $afterStyle;\n\t\t\t\t\t$curCloseTags = '</' . $matches[2] . '>' . $curCloseTags;\n\t\t\t\t}\n\n\t\t\t\t// If there's something that still needs closing, push it to the stack.\n\t\t\t\tif (!empty($curCloseTags))\n\t\t\t\t\tarray_push($stack, array(\n\t\t\t\t\t\t\t'element' => strtolower($curElement),\n\t\t\t\t\t\t\t'closeTags' => $curCloseTags\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\telseif (!empty($extra_attr))\n\t\t\t\t\t$replacement .= $precedingStyle . $extra_attr . $afterStyle;\n\t\t\t}\n\t\t}\n\n\t\telseif (preg_match('~</([A-Za-z]+)>~', $part, $matches) === 1)\n\t\t{\n\t\t\t// Is this the element that we've been waiting for to be closed?\n\t\t\tif (!empty($stack) && strtolower($matches[1]) === $stack[count($stack) - 1]['element'])\n\t\t\t{\n\t\t\t\t$byebyeTag = array_pop($stack);\n\t\t\t\t$replacement .= $byebyeTag['closeTags'];\n\t\t\t}\n\n\t\t\t// Must've been something else.\n\t\t\telse\n\t\t\t\t$replacement .= $part;\n\t\t}\n\t\t// In all other cases, just add the part to the replacement.\n\t\telse\n\t\t\t$replacement .= $part;\n\t}\n\n\t// Now put back the replacement in the text.\n\t$text = $replacement;\n\n\t// We are not finished yet, request more time.\n\tif (connection_aborted() && $context['server']['is_apache'])\n\t\t@apache_reset_timeout();\n\n\t// Let's pull out any legacy alignments.\n\twhile (preg_match('~<([A-Za-z]+)\\s+[^<>]*?(align=\"*(left|center|right)\"*)[^<>]*?(/?)>~i', $text, $matches) === 1)\n\t{\n\t\t// Find the position in the text of this tag over again.\n\t\t$start_pos = strpos($text, $matches[0]);\n\t\tif ($start_pos === false)\n\t\t\tbreak;\n\n\t\t// End tag?\n\t\tif ($matches[4] != '/' && strpos($text, '</' . $matches[1] . '>', $start_pos) !== false)\n\t\t{\n\t\t\t$end_length = strlen('</' . $matches[1] . '>');\n\t\t\t$end_pos = strpos($text, '</' . $matches[1] . '>', $start_pos);\n\n\t\t\t// Remove the align from that tag so it's never checked again.\n\t\t\t$tag = substr($text, $start_pos, strlen($matches[0]));\n\t\t\t$content = substr($text, $start_pos + strlen($matches[0]), $end_pos - $start_pos - strlen($matches[0]));\n\t\t\t$tag = str_replace($matches[2], '', $tag);\n\n\t\t\t// Put the tags back into the body.\n\t\t\t$text = substr($text, 0, $start_pos) . $tag . '[' . $matches[3] . ']' . $content . '[/' . $matches[3] . ']' . substr($text, $end_pos);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Just get rid of this evil tag.\n\t\t\t$text = substr($text, 0, $start_pos) . substr($text, $start_pos + strlen($matches[0]));\n\t\t}\n\t}\n\n\t// Let's do some special stuff for fonts - cause we all love fonts.\n\twhile (preg_match('~<font\\s+([^<>]*)>~i', $text, $matches) === 1)\n\t{\n\t\t// Find the position of this again.\n\t\t$start_pos = strpos($text, $matches[0]);\n\t\t$end_pos = false;\n\t\tif ($start_pos === false)\n\t\t\tbreak;\n\n\t\t// This must have an end tag - and we must find the right one.\n\t\t$lower_text = strtolower($text);\n\n\t\t$start_pos_test = $start_pos + 4;\n\t\t// How many starting tags must we find closing ones for first?\n\t\t$start_font_tag_stack = 0;\n\t\twhile ($start_pos_test < strlen($text))\n\t\t{\n\t\t\t// Where is the next starting font?\n\t\t\t$next_start_pos = strpos($lower_text, '<font', $start_pos_test);\n\t\t\t$next_end_pos = strpos($lower_text, '</font>', $start_pos_test);\n\n\t\t\t// Did we past another starting tag before an end one?\n\t\t\tif ($next_start_pos !== false && $next_start_pos < $next_end_pos)\n\t\t\t{\n\t\t\t\t$start_font_tag_stack++;\n\t\t\t\t$start_pos_test = $next_start_pos + 4;\n\t\t\t}\n\t\t\t// Otherwise we have an end tag but not the right one?\n\t\t\telseif ($start_font_tag_stack)\n\t\t\t{\n\t\t\t\t$start_font_tag_stack--;\n\t\t\t\t$start_pos_test = $next_end_pos + 4;\n\t\t\t}\n\t\t\t// Otherwise we're there!\n\t\t\telse\n\t\t\t{\n\t\t\t\t$end_pos = $next_end_pos;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif ($end_pos === false)\n\t\t\tbreak;\n\n\t\t// Now work out what the attributes are.\n\t\t$attribs = fetchTagAttributes($matches[1]);\n\t\t$tags = array();\n\t\t$sizes_equivalence = array(1 => '8pt', '10pt', '12pt', '14pt', '18pt', '24pt', '36pt');\n\t\tforeach ($attribs as $s => $v)\n\t\t{\n\t\t\tif ($s == 'size')\n\t\t\t{\n\t\t\t\t// Cast before empty chech because casting a string results in a 0 and we don't have zeros in the array! ;)\n\t\t\t\t$v = (int) trim($v);\n\t\t\t\t$v = empty($v) ? 1 : $v;\n\t\t\t\t$tags[] = array('[size=' . $sizes_equivalence[$v] . ']', '[/size]');\n\t\t\t}\n\t\t\telseif ($s == 'face')\n\t\t\t\t$tags[] = array('[font=' . trim(strtolower($v)) . ']', '[/font]');\n\t\t\telseif ($s == 'color')\n\t\t\t\t$tags[] = array('[color=' . trim(strtolower($v)) . ']', '[/color]');\n\t\t}\n\n\t\t// As before add in our tags.\n\t\t$before = $after = '';\n\t\tforeach ($tags as $tag)\n\t\t{\n\t\t\t$before .= $tag[0];\n\t\t\tif (isset($tag[1]))\n\t\t\t\t$after = $tag[1] . $after;\n\t\t}\n\n\t\t// Remove the tag so it's never checked again.\n\t\t$content = substr($text, $start_pos + strlen($matches[0]), $end_pos - $start_pos - strlen($matches[0]));\n\n\t\t// Put the tags back into the body.\n\t\t$text = substr($text, 0, $start_pos) . $before . $content . $after . substr($text, $end_pos + 7);\n\t}\n\n\t// Almost there, just a little more time.\n\tif (connection_aborted() && $context['server']['is_apache'])\n\t\t@apache_reset_timeout();\n\n\tif (count($parts = preg_split('~<(/?)(li|ol|ul)([^>]*)>~i', $text, null, PREG_SPLIT_DELIM_CAPTURE)) > 1)\n\t{\n\t\t// A toggle that dermines whether we're directly under a <ol> or <ul>.\n\t\t$inList = false;\n\n\t\t// Keep track of the number of nested list levels.\n\t\t$listDepth = 0;\n\n\t\t// Map what we can expect from the HTML to what is supported by SMF.\n\t\t$listTypeMapping = array(\n\t\t\t'1' => 'decimal',\n\t\t\t'A' => 'upper-alpha',\n\t\t\t'a' => 'lower-alpha',\n\t\t\t'I' => 'upper-roman',\n\t\t\t'i' => 'lower-roman',\n\t\t\t'disc' => 'disc',\n\t\t\t'square' => 'square',\n\t\t\t'circle' => 'circle',\n\t\t);\n\n\t\t// $i: text, $i + 1: '/', $i + 2: tag, $i + 3: tail.\n\t\tfor ($i = 0, $numParts = count($parts) - 1; $i < $numParts; $i += 4)\n\t\t{\n\t\t\t$tag = strtolower($parts[$i + 2]);\n\t\t\t$isOpeningTag = $parts[$i + 1] === '';\n\n\t\t\tif ($isOpeningTag)\n\t\t\t{\n\t\t\t\tswitch ($tag)\n\t\t\t\t{\n\t\t\t\t\tcase 'ol':\n\t\t\t\t\tcase 'ul':\n\n\t\t\t\t\t\t// We have a problem, we're already in a list.\n\t\t\t\t\t\tif ($inList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Inject a list opener, we'll deal with the ol/ul next loop.\n\t\t\t\t\t\t\tarray_splice($parts, $i, 0, array(\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\tstr_repeat(\"\\t\", $listDepth) . '[li]',\n\t\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t$numParts = count($parts) - 1;\n\n\t\t\t\t\t\t\t// The inlist status changes a bit.\n\t\t\t\t\t\t\t$inList = false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Just starting a new list.\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$inList = true;\n\n\t\t\t\t\t\t\tif ($tag === 'ol')\n\t\t\t\t\t\t\t\t$listType = 'decimal';\n\t\t\t\t\t\t\telseif (preg_match('~type=\"?(' . implode('|', array_keys($listTypeMapping)) . ')\"?~', $parts[$i + 3], $match) === 1)\n\t\t\t\t\t\t\t\t$listType = $listTypeMapping[$match[1]];\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t$listType = null;\n\n\t\t\t\t\t\t\t$listDepth++;\n\n\t\t\t\t\t\t\t$parts[$i + 2] = '[list' . ($listType === null ? '' : ' type=' . $listType) . ']' . \"\\n\";\n\t\t\t\t\t\t\t$parts[$i + 3] = '';\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'li':\n\n\t\t\t\t\t\t// This is how it should be: a list item inside the list.\n\t\t\t\t\t\tif ($inList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$parts[$i + 2] = str_repeat(\"\\t\", $listDepth) . '[li]';\n\t\t\t\t\t\t\t$parts[$i + 3] = '';\n\n\t\t\t\t\t\t\t// Within a list item, it's almost as if you're outside.\n\t\t\t\t\t\t\t$inList = false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// The li is no direct child of a list.\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// We are apparently in a list item.\n\t\t\t\t\t\t\tif ($listDepth > 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$parts[$i + 2] = '[/li]' . \"\\n\" . str_repeat(\"\\t\", $listDepth) . '[li]';\n\t\t\t\t\t\t\t\t$parts[$i + 3] = '';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// We're not even near a list.\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Quickly create a list with an item.\n\t\t\t\t\t\t\t\t$listDepth++;\n\n\t\t\t\t\t\t\t\t$parts[$i + 2] = '[list]' . \"\\n\\t\" . '[li]';\n\t\t\t\t\t\t\t\t$parts[$i + 3] = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Handle all the closing tags.\n\t\t\telse\n\t\t\t{\n\t\t\t\tswitch ($tag)\n\t\t\t\t{\n\t\t\t\t\tcase 'ol':\n\t\t\t\t\tcase 'ul':\n\n\t\t\t\t\t\t// As we expected it, closing the list while we're in it.\n\t\t\t\t\t\tif ($inList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$inList = false;\n\n\t\t\t\t\t\t\t$listDepth--;\n\n\t\t\t\t\t\t\t$parts[$i + 1] = '';\n\t\t\t\t\t\t\t$parts[$i + 2] = str_repeat(\"\\t\", $listDepth) . '[/list]';\n\t\t\t\t\t\t\t$parts[$i + 3] = '';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// We're in a list item.\n\t\t\t\t\t\t\tif ($listDepth > 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Inject closure for this list item first.\n\t\t\t\t\t\t\t\t// The content of $parts[$i] is left as is!\n\t\t\t\t\t\t\t\tarray_splice($parts, $i + 1, 0, array(\n\t\t\t\t\t\t\t\t\t'',\t\t\t\t// $i + 1\n\t\t\t\t\t\t\t\t\t'[/li]' . \"\\n\",\t// $i + 2\n\t\t\t\t\t\t\t\t\t'',\t\t\t\t// $i + 3\n\t\t\t\t\t\t\t\t\t'',\t\t\t\t// $i + 4\n\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t\t$numParts = count($parts) - 1;\n\n\t\t\t\t\t\t\t\t// Now that we've closed the li, we're in list space.\n\t\t\t\t\t\t\t\t$inList = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// We're not even in a list, ignore\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$parts[$i + 1] = '';\n\t\t\t\t\t\t\t\t$parts[$i + 2] = '';\n\t\t\t\t\t\t\t\t$parts[$i + 3] = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'li':\n\n\t\t\t\t\t\tif ($inList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// There's no use for a </li> after <ol> or <ul>, ignore.\n\t\t\t\t\t\t\t$parts[$i + 1] = '';\n\t\t\t\t\t\t\t$parts[$i + 2] = '';\n\t\t\t\t\t\t\t$parts[$i + 3] = '';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Remove the trailing breaks from the list item.\n\t\t\t\t\t\t\t$parts[$i] = preg_replace('~\\s*<br\\s*' . '/?' . '>\\s*$~', '', $parts[$i]);\n\t\t\t\t\t\t\t$parts[$i + 1] = '';\n\t\t\t\t\t\t\t$parts[$i + 2] = '[/li]' . \"\\n\";\n\t\t\t\t\t\t\t$parts[$i + 3] = '';\n\n\t\t\t\t\t\t\t// And we're back in the [list] space.\n\t\t\t\t\t\t\t$inList = true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If we're in the [list] space, no content is allowed.\n\t\t\tif ($inList && trim(preg_replace('~\\s*<br\\s*' . '/?' . '>\\s*~', '', $parts[$i + 4])) !== '')\n\t\t\t{\n\t\t\t\t// Fix it by injecting an extra list item.\n\t\t\t\tarray_splice($parts, $i + 4, 0, array(\n\t\t\t\t\t'', // No content.\n\t\t\t\t\t'', // Opening tag.\n\t\t\t\t\t'li', // It's a <li>.\n\t\t\t\t\t'', // No tail.\n\t\t\t\t));\n\t\t\t\t$numParts = count($parts) - 1;\n\t\t\t}\n\t\t}\n\n\t\t$text = implode('', $parts);\n\n\t\tif ($inList)\n\t\t{\n\t\t\t$listDepth--;\n\t\t\t$text .= str_repeat(\"\\t\", $listDepth) . '[/list]';\n\t\t}\n\n\t\tfor ($i = $listDepth; $i > 0; $i--)\n\t\t\t$text .= '[/li]' . \"\\n\" . str_repeat(\"\\t\", $i - 1) . '[/list]';\n\n\t}\n\n\t// I love my own image...\n\twhile (preg_match('~<img\\s+([^<>]*)/*>~i', $text, $matches) === 1)\n\t{\n\t\t// Find the position of the image.\n\t\t$start_pos = strpos($text, $matches[0]);\n\t\tif ($start_pos === false)\n\t\t\tbreak;\n\t\t$end_pos = $start_pos + strlen($matches[0]);\n\n\t\t$params = '';\n\t\t$had_params = array();\n\t\t$src = '';\n\n\t\t$attrs = fetchTagAttributes($matches[1]);\n\t\tforeach ($attrs as $attrib => $value)\n\t\t{\n\t\t\tif (in_array($attrib, array('width', 'height')))\n\t\t\t\t$params .= ' ' . $attrib . '=' . (int) $value;\n\t\t\telseif ($attrib == 'alt' && trim($value) != '')\n\t\t\t\t$params .= ' alt=' . trim($value);\n\t\t\telseif ($attrib == 'src')\n\t\t\t\t$src = trim($value);\n\t\t}\n\n\t\t$tag = '';\n\t\tif (!empty($src))\n\t\t{\n\t\t\t// Attempt to fix the path in case it's not present.\n\t\t\tif (preg_match('~^https?://~i', $src) === 0 && is_array($parsedURL = parse_url($scripturl)) && isset($parsedURL['host']))\n\t\t\t{\n\t\t\t\t$baseURL = (isset($parsedURL['scheme']) ? $parsedURL['scheme'] : 'http') . '://' . $parsedURL['host'] . (empty($parsedURL['port']) ? '' : ':' . $parsedURL['port']);\n\n\t\t\t\tif (substr($src, 0, 1) === '/')\n\t\t\t\t\t$src = $baseURL . $src;\n\t\t\t\telse\n\t\t\t\t\t$src = $baseURL . (empty($parsedURL['path']) ? '/' : preg_replace('~/(?:index\\\\.php)?$~', '', $parsedURL['path'])) . '/' . $src;\n\t\t\t}\n\n\t\t\t$tag = '[img' . $params . ']' . $src . '[/img]';\n\t\t}\n\n\t\t// Replace the tag\n\t\t$text = substr($text, 0, $start_pos) . $tag . substr($text, $end_pos);\n\t}\n\n\t// The final bits are the easy ones - tags which map to tags which map to tags - etc etc.\n\t$tags = array(\n\t\t'~<b(\\s(.)*?)*?' . '>~i' => '[b]',\n\t\t'~</b>~i' => '[/b]',\n\t\t'~<i(\\s(.)*?)*?' . '>~i' => '[i]',\n\t\t'~</i>~i' => '[/i]',\n\t\t'~<u(\\s(.)*?)*?' . '>~i' => '[u]',\n\t\t'~</u>~i' => '[/u]',\n\t\t'~<strong(\\s(.)*?)*?' . '>~i' => '[b]',\n\t\t'~</strong>~i' => '[/b]',\n\t\t'~<em(\\s(.)*?)*?' . '>~i' => '[i]',\n\t\t'~</em>~i' => '[/i]',\n\t\t'~<s(\\s(.)*?)*?' . '>~i' => \"[s]\",\n\t\t'~</s>~i' => \"[/s]\",\n\t\t'~<strike(\\s(.)*?)*?' . '>~i' => '[s]',\n\t\t'~</strike>~i' => '[/s]',\n\t\t'~<del(\\s(.)*?)*?' . '>~i' => '[s]',\n\t\t'~</del>~i' => '[/s]',\n\t\t'~<center(\\s(.)*?)*?' . '>~i' => '[center]',\n\t\t'~</center>~i' => '[/center]',\n\t\t'~<pre(\\s(.)*?)*?' . '>~i' => '[pre]',\n\t\t'~</pre>~i' => '[/pre]',\n\t\t'~<sub(\\s(.)*?)*?' . '>~i' => '[sub]',\n\t\t'~</sub>~i' => '[/sub]',\n\t\t'~<sup(\\s(.)*?)*?' . '>~i' => '[sup]',\n\t\t'~</sup>~i' => '[/sup]',\n\t\t'~<tt(\\s(.)*?)*?' . '>~i' => '[tt]',\n\t\t'~</tt>~i' => '[/tt]',\n\t\t'~<table(\\s(.)*?)*?' . '>~i' => '[table]',\n\t\t'~</table>~i' => '[/table]',\n\t\t'~<tr(\\s(.)*?)*?' . '>~i' => '[tr]',\n\t\t'~</tr>~i' => '[/tr]',\n\t\t'~<(td|th)\\s[^<>]*?colspan=\"?(\\d{1,2})\"?.*?' . '>~ie' => 'str_repeat(\\'[td][/td]\\', $2 - 1) . \\'[td]\\'',\n\t\t'~<(td|th)(\\s(.)*?)*?' . '>~i' => '[td]',\n\t\t'~</(td|th)>~i' => '[/td]',\n\t\t'~<br(?:\\s[^<>]*?)?' . '>~i' => \"\\n\",\n\t\t'~<hr[^<>]*>(\\n)?~i' => \"[hr]\\n$1\",\n\t\t'~(\\n)?\\\\[hr\\\\]~i' => \"\\n[hr]\",\n\t\t'~^\\n\\\\[hr\\\\]~i' => \"[hr]\",\n\t\t'~<blockquote(\\s(.)*?)*?' . '>~i' => \"&lt;blockquote&gt;\",\n\t\t'~</blockquote>~i' => \"&lt;/blockquote&gt;\",\n\t\t'~<ins(\\s(.)*?)*?' . '>~i' => \"&lt;ins&gt;\",\n\t\t'~</ins>~i' => \"&lt;/ins&gt;\",\n\t);\n\t$text = preg_replace(array_keys($tags), array_values($tags), $text);\n\n\t// Please give us just a little more time.\n\tif (connection_aborted() && $context['server']['is_apache'])\n\t\t@apache_reset_timeout();\n\n\t// What about URL's - the pain in the ass of the tag world.\n\twhile (preg_match('~<a\\s+([^<>]*)>([^<>]*)</a>~i', $text, $matches) === 1)\n\t{\n\t\t// Find the position of the URL.\n\t\t$start_pos = strpos($text, $matches[0]);\n\t\tif ($start_pos === false)\n\t\t\tbreak;\n\t\t$end_pos = $start_pos + strlen($matches[0]);\n\n\t\t$tag_type = 'url';\n\t\t$href = '';\n\n\t\t$attrs = fetchTagAttributes($matches[1]);\n\t\tforeach ($attrs as $attrib => $value)\n\t\t{\n\t\t\tif ($attrib == 'href')\n\t\t\t{\n\t\t\t\t$href = trim($value);\n\n\t\t\t\t// Are we dealing with an FTP link?\n\t\t\t\tif (preg_match('~^ftps?://~', $href) === 1)\n\t\t\t\t\t$tag_type = 'ftp';\n\n\t\t\t\t// Or is this a link to an email address?\n\t\t\t\telseif (substr($href, 0, 7) == 'mailto:')\n\t\t\t\t{\n\t\t\t\t\t$tag_type = 'email';\n\t\t\t\t\t$href = substr($href, 7);\n\t\t\t\t}\n\n\t\t\t\t// No http(s), so attempt to fix this potential relative URL.\n\t\t\t\telseif (preg_match('~^https?://~i', $href) === 0 && is_array($parsedURL = parse_url($scripturl)) && isset($parsedURL['host']))\n\t\t\t\t{\n\t\t\t\t\t$baseURL = (isset($parsedURL['scheme']) ? $parsedURL['scheme'] : 'http') . '://' . $parsedURL['host'] . (empty($parsedURL['port']) ? '' : ':' . $parsedURL['port']);\n\n\t\t\t\t\tif (substr($href, 0, 1) === '/')\n\t\t\t\t\t\t$href = $baseURL . $href;\n\t\t\t\t\telse\n\t\t\t\t\t\t$href = $baseURL . (empty($parsedURL['path']) ? '/' : preg_replace('~/(?:index\\\\.php)?$~', '', $parsedURL['path'])) . '/' . $href;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// External URL?\n\t\t\tif ($attrib == 'target' && $tag_type == 'url')\n\t\t\t{\n\t\t\t\tif (trim($value) == '_blank')\n\t\t\t\t\t$tag_type == 'iurl';\n\t\t\t}\n\t\t}\n\n\t\t$tag = '';\n\t\tif ($href != '')\n\t\t{\n\t\t\tif ($matches[2] == $href)\n\t\t\t\t$tag = '[' . $tag_type . ']' . $href . '[/' . $tag_type . ']';\n\t\t\telse\n\t\t\t\t$tag = '[' . $tag_type . '=' . $href . ']' . $matches[2] . '[/' . $tag_type . ']';\n\t\t}\n\n\t\t// Replace the tag\n\t\t$text = substr($text, 0, $start_pos) . $tag . substr($text, $end_pos);\n\t}\n\n\t$text = strip_tags($text);\n\n\t// Some tags often end up as just dummy tags - remove those.\n\t$text = preg_replace('~\\[[bisu]\\]\\s*\\[/[bisu]\\]~', '', $text);\n\n\t// Fix up entities.\n\t$text = preg_replace('~&#38;~i', '&#38;#38;', $text);\n\n\t$text = legalise_bbc($text);\n\n\treturn $text;\n}", "title": "" }, { "docid": "6c40e5a68401c8b92ba75b54c4e47865", "score": "0.670453", "text": "public function convertBBCodetoHTML($p_txt)\n\t\t{\n\t\t\t$b_remplacement = true;\n\t\t\t\n\t\t\twhile($b_remplacement)\n\t\t\t{\n\t\t\t\t$b_remplacement = false;\n\t\t\t\t$s_oldtxt = $p_txt;\n\t\t\t\t$p_txt = preg_replace('`\\[BBTITRE\\]([^\\[]*)\\[/BBTITRE\\]`i','<b><u><font class=\"bbtitre\">\\\\1</font></u></b>',$p_txt);\n\t\t\t\t$p_txt = preg_replace('`\\[EMAIL\\]([^\\[]*)\\[/EMAIL\\]`i','<a href=\"mailto:\\\\1\">\\\\1</a>',$p_txt);\n\t\t\t\t$p_txt = preg_replace('`\\[b\\]([^\\[]*)\\[/b\\]`i','<b>\\\\1</b>',$p_txt);\n\t\t\t\t$p_txt = preg_replace('`\\[i\\]([^\\[]*)\\[/i\\]`i','<i>\\\\1</i>',$p_txt);\n\t\t\t\t$p_txt = preg_replace('`\\[u\\]([^\\[]*)\\[/u\\]`i','<u>\\\\1</u>',$p_txt);\n\t\t\t\t$p_txt = preg_replace('`\\[s\\]([^\\[]*)\\[/s\\]`i','<s>\\\\1</s>',$p_txt);\n\t\t\t\t$p_txt = preg_replace('`\\[br\\]`','<br>',$p_txt);\n\t\t\t\t$p_txt = preg_replace('`\\[center\\]([^\\[]*)\\[/center\\]`','<div style=\"text-align: center;\">\\\\1</div>',$p_txt);\n\t\t\t\t$p_txt = preg_replace('`\\[left\\]([^\\[]*)\\[/left\\]`i','<div style=\"text-align: left;\">\\\\1</div>',$p_txt);\n\t\t\t\t$p_txt = preg_replace('`\\[right\\]([^\\[]*)\\[/right\\]`i','<div style=\"text-align: right;\">\\\\1</div>',$p_txt);\n\t\t\t\t$p_txt = preg_replace('`\\[img\\]([^\\[]*)\\[/img\\]`i','<img src=\"\\\\1\" />',$p_txt);\n\t\t\t\t$p_txt = preg_replace('`\\[color=([^[]*)\\]([^[]*)\\[/color\\]`i','<font color=\"\\\\1\">\\\\2</font>',$p_txt);\n\t\t\t\t$p_txt = preg_replace('`\\[bg=([^[]*)\\]([^[]*)\\[/bg\\]`i','<font style=\"background-color: \\\\1;\">\\\\2</font>',$p_txt);\n\t\t\t\t$p_txt = preg_replace('`\\[size=([^[]*)\\]([^[]*)\\[/size\\]`i','<font size=\"\\\\1\">\\\\2</font>',$p_txt);\n\t\t\t\t$p_txt = preg_replace('`\\[font=([^[]*)\\]([^[]*)\\[/font\\]`i','<font face=\"\\\\1\">\\\\2</font>',$p_txt);\n\t\t\t\t\n\t\t\t\tif ($s_oldtxt != $p_txt)\n\t\t\t\t{\n\t\t\t\t\t$b_remplacement=true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $p_txt;\n\t\t}", "title": "" }, { "docid": "762d429c54903cfd3ce667ca72232cef", "score": "0.6677676", "text": "function strip_invision_tags( $text )\n{\n // The [html] BBCode tag is not supported by Quicksilver Forums, so when the horrid mess is encountered in Invisionboard.....\n $text = preg_replace( \"#<!--html-->(.*?)<!--html3-->#\", \"HTML BLOCK REMOVED\", $text );\n\n // Convert emoticons....\n $text = preg_replace( \"#<!--emo&(.+?)-->.+?<!--endemo-->#\", \"\\\\1\" , $text );\n\n /* Convert image tags.\n * We'll even be nice and fix malformed ones in posts.\n */\n $text = preg_replace( \"#<img src=[\\\"'](\\S+?)['\\\"].+?\".\">#\", \"[img]\\\\1[/img]\", $text );\n $text = preg_replace( '/\\[img=(.*?)\\](.*?)\\[\\/img\\]/si', '[img]\\\\1[/img]', $text );\n\n // Convert email tags....\n $text = preg_replace( \"#<a href=[\\\"']mailto:(.+?)['\\\"]>(.+?)</a>#\", \"[email=\\\\1]\\\\2[/email]\", $text );\n\n // Convert URLs....\n $text = preg_replace( \"#<a href=[\\\"'](.+?)['\\\"] target=[\\\"'](.+?)['\\\"]>(.+?)</a>#\", \"[url=\\\\1]\\\\3[/url]\", $text );\n\n // Convert color tags....\n $text = preg_replace( \"#<span style=[\\'']color:(.+?)[\\'']>(.+?)</span>#\", \"[color=\\\\1]\\\\2[/color]\", $text );\n\n // Font tags are not desired, so they will be summarily parsed out....\n $text = preg_replace( \"#<font(.+?)>#\", \"\", $text );\n $text = str_replace ( \"</font>\", \"\", $text );\n\n // Span tags at this point are also not desired.\n $text = preg_replace( \"#<span(.+?)>#\", \"\", $text );\n $text = str_replace ( \"</span>\", \"\", $text );\n\n // Reconfigure code tags.\n $text = preg_replace( \"#<!--c1-->(.+?)<!--ec1--><br>#\", '[code]', $text );\n $text = preg_replace( \"#<!--c1-->(.+?)<!--ec1-->#\", '[code]', $text );\n $text = preg_replace( \"#<!--c2-->(.+?)<!--ec2-->#\", '[/code]', $text );\n\n // Reconfigure SQL tags\n $text = preg_replace( \"#<!--sql-->(.+?)<!--sql1-->#\", '[code]', $text );\n $text = preg_replace( \"#<!--sql2-->(.+?)<!--sql3-->#\", '[/code]', $text );\n\n // Strip flash movies and let people know about it.\n $text = preg_replace( \"'<!--Flash[^>]*?>.*?<!--End Flash-->'si\", \"Flash image stripped during conversion.\", $text );\n\n // Reconfigure quote tags.\n $text = preg_replace( \"#<!--QuoteBegin-(.+?)<!--QuoteEBegin-->#\", \"[quote]\", $text );\n $text = preg_replace( \"#<!--QuoteEnd-->(.+?)<!--QuoteEEnd-->#\", \"[/quote]\", $text );\n\n // Fix the text formatting tags....\n $text = preg_replace( \"#<i>(.+?)</i>#is\", \"[i]\\\\1[/i]\", $text );\n $text = preg_replace( \"#<b>(.+?)</b>#is\", \"[b]\\\\1[/b]\", $text );\n $text = preg_replace( \"#<s>(.+?)</s>#is\", \"[s]\\\\1[/s]\", $text );\n $text = preg_replace( \"#<u>(.+?)</u>#is\", \"[u]\\\\1[/u]\", $text );\n $text = str_replace( \"<br>\", \"\\n\", $text );\n\n // Fix random junk in the post code....\n $text = str_replace( \"&nbsp;\", \" \", $text );\n $text = str_replace( \"&gt;\", \">\", $text );\n $text = str_replace( \"&lt;\", \"<\", $text );\n $text = str_replace( \"&amp;\", \"&\", $text );\n $text = str_replace( \"&quot;\", \"\\\"\", $text );\n $text = str_replace( \"&#33;\", \"!\", $text );\n $text = str_replace( \"&#033;\", \"!\", $text );\n $text = str_replace( \"&#34;\", \"\\\"\", $text );\n $text = str_replace( \"&#36;\", \"$\", $text );\n $text = str_replace( \"&#036;\", \"$\", $text );\n $text = str_replace( \"&#37;\", \"\\%\", $text );\n $text = str_replace( \"&#39;\", \"'\", $text );\n $text = str_replace( \"&#039;\", \"'\", $text );\n $text = str_replace( \"&#40;\", \"(\", $text );\n $text = str_replace( \"&#41;\", \")\", $text );\n $text = str_replace( \"&#58;\", \":\", $text );\n $text = str_replace( \"&#59;\", \";\", $text );\n $text = str_replace( \"&#60;\", \"<\", $text );\n $text = str_replace( \"&#62;\", \">\", $text );\n $text = str_replace( \"&#064;\", \"@\", $text );\n $text = str_replace( \"&#64;\", \"@\", $text );\n $text = str_replace( \"&#91;\", \"[\", $text );\n $text = str_replace( \"&#092;\", \"\\\\\", $text );\n $text = str_replace( \"&#92;\", \"\\\\\", $text );\n $text = str_replace( \"&#92\", \"\\\\\", $text );\n $text = str_replace( \"&#93;\", \"]\", $text );\n $text = str_replace( \"&#95;\", \"\\_\", $text );\n $text = str_replace( \"&#124;\", \"|\", $text );\n\n // And lastly, prep for database insertion.\n $text = addslashes( $text );\n return $text;\n}", "title": "" }, { "docid": "73fa74c27f8f86098762a2786b264578", "score": "0.6674904", "text": "function bbcode_specialchars($text)\n\t{\n\t\t$str_from = array('<', '>', '[', ']', '.', ':');\n\t\t$str_to = array('&lt;', '&gt;', '&#91;', '&#93;', '&#46;', '&#58;');\n\n\t\treturn str_replace($str_from, $str_to, $text);\n\t}", "title": "" }, { "docid": "559c11fc387d0b7a99dc815248ff6922", "score": "0.6647688", "text": "function parse_bbcode($str, $clear = 0, $bbcode_to_parse = NULL)\n{\n if ( ! is_array($bbcode_to_parse))\n {\n if (FALSE === ($bbcode_to_parse = _get_bbcode_to_parse_array()))\n {\n return FALSE;\n } \n }\n \n // fetch our replacments\n \n $bbcode_replacements = _get_bbcode_replacements();\n \n if($bbcode_to_parse!='' && $bbcode_replacements!=''):\n\t\t\n\t\t/* Pass url */\n\t\t$str = preg_replace_callback(\"/\\[url\\](.*?)\\[\\/url\\]/is\",\"_pass_url\",$str);\t\n\t\t/* pass image */\n\t\t$str = preg_replace_callback(\"/\\[img\\](.*?)\\[\\/img\\]/is\",\"_pass_image\",$str);\n\t\t/* pass youtube */\n\t\t$str = preg_replace_callback(\"/\\[youtube\\](.*?)\\[\\/youtube\\]/is\",\"_pass_youtube\",$str);\n\t\t$str = preg_replace ($bbcode_to_parse, $bbcode_replacements, $str); \n \n endif;\n \n/*\n foreach ($bbcode_to_parse as $key => $val)\n { \n for ($i = 1; $i <= $bbcode_to_parse[$key][2]; $i++) // loop for imbricated tags\n {\t \n $str = preg_replace($key, $bbcode_to_parse[$key][$clear], $str);\n }\n }\n*/\n \n return $str;\n}", "title": "" }, { "docid": "10c19fbb554872c6e17f33fc8bdb8e0b", "score": "0.6605293", "text": "function strip_ipb21_tags( $text )\n{\n // The [html] BBCode tag is not supported by Quicksilver Forums, so when the horrid mess is encountered in Invisionboard.....\n $text = preg_replace( \"#<!--html-->(.+?)<!--html1-->#\", \"\", $text );\n $text = preg_replace( \"#<!--html2-->(.+?)<!--html3-->#\", \"\", $text );\n\n // Convert emoticons....\n $text = preg_replace( \"#emoid=[\\\"]:(\\S+?):[\\\"]#\", \"\\\\1\", $text );\n $text = preg_replace( \"#<img src=[\\\"']style_emoticons/(.*?)/>#\", \"\", $text );\n\n // Convert font tags. Man are these UGLY.\n $text = preg_replace( \"#<!--fonto:(.+?)-->(.+?)<!--/fonto-->#\", \"[font=\\\\1]\", $text );\n $text = str_replace( \"<!--fontc--></span><!--/fontc-->\", \"[/font]\", $text );\n\n // Convert size tags, also very ugly.\n $text = preg_replace( \"#<!--sizeo:(.+?)-->.+?<!--/sizeo-->#\", \"[size=\\\\1]\", $text );\n $text = preg_replace( \"#<!--sizec-->.+?<!--/sizec-->#\", \"[/size]\", $text );\n\n /* Convert image tags.\n * We'll even be nice and fix malformed ones in posts.\n */\n $text = preg_replace( \"#<img src=[\\\"'](\\S+?)['\\\"].+?\".\">#\", \"[img]\\\\1[/img]\", $text );\n $text = preg_replace( '/\\[img=(.*?)\\](.*?)\\[\\/img\\]/si', '[img]\\\\1[/img]', $text );\n\n // Convert email tags....\n $text = preg_replace( \"#<a href=[\\\"']mailto:(.+?)['\\\"]>(.+?)</a>#\", \"[email=\\\\1]\\\\2[/email]\", $text );\n\n // Convert URLs....\n $text = preg_replace( \"#<a href=[\\\"'](.+?)['\\\"] target=[\\\"'](.+?)['\\\"]>(.+?)</a>#\", \"[url=\\\\1]\\\\3[/url]\", $text );\n\n // Convert color tags....\n $text = preg_replace( \"#<!--coloro:(.+?)-->(.+?)<!--/coloro-->#\", \"[color=\\\\1]\", $text );\n $text = str_replace( \"<!--colorc--></span><!--/colorc-->\", \"[/color]\", $text );\n\n // List tags are not supported in QSF.\n $text = preg_replace( '/\\[list=(.*?)\\](.*?)\\[\\/list\\]/si', '\\\\2', $text );\n $text = str_replace( \"[list]\", \"\", $text );\n $text = str_replace( \"[/list]\", \"\", $text );\n $text = str_replace( \"[*]\", \"\", $text );\n\n // Indent tags are not supported in QSF.\n $text = str_replace( \"[indent]\", \"\", $text );\n $text = str_replace( \"[/indent]\", \"\", $text );\n\n // Font tags are not desired, so they will be summarily parsed out....\n $text = preg_replace( \"#<font(.+?)>#\", \"\", $text );\n $text = str_replace ( \"</font>\", \"\", $text );\n\n // Span tags at this point are also not desired.\n $text = preg_replace( \"#<span(.+?)>#\", \"\", $text );\n $text = str_replace ( \"</span>\", \"\", $text );\n\n // Reconfigure code tags.\n $text = preg_replace( \"#<!--c1-->(.+?)<!--ec1--><br />#\", '[code]', $text );\n $text = preg_replace( \"#<!--c1-->(.+?)<!--ec1-->#\", '[code]', $text );\n $text = preg_replace( \"#<!--c2-->(.+?)<!--ec2-->#\", '[/code]', $text );\n\n // Reconfigure SQL tags\n $text = preg_replace( \"#<!--sql-->(.+?)<!--sql1-->#\", \"[code]\", $text );\n $text = preg_replace( \"#<!--sql2-->(.+?)<!--sql3-->#\", \"[/code]\", $text );\n\n // Strip flash movies and let people know about it.\n $text = preg_replace( \"#<!--Flash (.+?)-->.+?<!--End Flash-->#e\", \"Flash image stripped during conversion.\", $text );\n\n // Reconfigure quote tags.\n $text = preg_replace( \"#<!--quoteo-->(.+?)<!--quotec-->#\", \"[quote]\", $text );\n $text = preg_replace( \"#<!--quoteo-{1,2}([^>]+?)\\+([^>]+?)-->(.+?)<!--quotec-->#\" , \"[quote=\\\\1,\\\\2]\" , $text );\n $text = preg_replace( \"#<!--quoteo-{1,2}([^>]+?)\\+-->(.+?)<!--quotec-->#\" , \"[quote=\\\\1]\" , $text );\n $text = preg_replace( \"#<!--QuoteEnd-->(.+?)<!--QuoteEEnd-->#\", \"[/quote]\", $text );\n\n // Fix the text formatting tags....\n $text = preg_replace( \"#<i>(.+?)</i>#is\", \"[i]\\\\1[/i]\", $text );\n $text = preg_replace( \"#<b>(.+?)</b>#is\", \"[b]\\\\1[/b]\", $text );\n $text = preg_replace( \"#<s>(.+?)</s>#is\", \"[s]\\\\1[/s]\", $text );\n $text = preg_replace( \"#<strike>(.+?)</strike>#is\", \"[s]\\\\1[/s]\", $text );\n $text = preg_replace( \"#<u>(.+?)</u>#is\", \"[u]\\\\1[/u]\", $text );\n $text = preg_replace( \"#<blockquote>(.+?)</blockquote>#is\", \"\\\\1\", $text );\n $text = preg_replace( \"#<div align=(.+?)>(.+?)</div>#is\", \"\\\\2\", $text );\n $text = str_replace( \"<br>\", \"\\n\", $text );\n $text = str_replace( \"<br />\", \"\\n\", $text );\n\n // Fix random junk in the post code....\n $text = str_replace( \"&nbsp;\", \" \", $text );\n $text = str_replace( \"&gt;\", \">\", $text );\n $text = str_replace( \"&lt;\", \"<\", $text );\n $text = str_replace( \"&amp;\", \"&\", $text );\n $text = str_replace( \"&quot;\", \"\\\"\", $text );\n $text = str_replace( \"&#33;\", \"!\", $text );\n $text = str_replace( \"&#033;\", \"!\", $text );\n $text = str_replace( \"&#34;\", \"\\\"\", $text );\n $text = str_replace( \"&#36;\", \"$\", $text );\n $text = str_replace( \"&#036;\", \"$\", $text );\n $text = str_replace( \"&#37;\", \"\\%\", $text );\n $text = str_replace( \"&#39;\", \"'\", $text );\n $text = str_replace( \"&#039;\", \"'\", $text );\n $text = str_replace( \"&#40;\", \"(\", $text );\n $text = str_replace( \"&#41;\", \")\", $text );\n $text = str_replace( \"&#58;\", \":\", $text );\n $text = str_replace( \"&#59;\", \";\", $text );\n $text = str_replace( \"&#60;\", \"<\", $text );\n $text = str_replace( \"&#62;\", \">\", $text );\n $text = str_replace( \"&#064;\", \"@\", $text );\n $text = str_replace( \"&#64;\", \"@\", $text );\n $text = str_replace( \"&#91;\", \"[\", $text );\n $text = str_replace( \"&#092;\", \"\\\\\", $text );\n $text = str_replace( \"&#92;\", \"\\\\\", $text );\n $text = str_replace( \"&#92\", \"\\\\\", $text );\n $text = str_replace( \"&#93;\", \"]\", $text );\n $text = str_replace( \"&#95;\", \"\\_\", $text );\n $text = str_replace( \"&#124;\", \"|\", $text );\n\n return $text;\n}", "title": "" }, { "docid": "986c6c4f90c9a0945e7ffad9bc11b341", "score": "0.66042995", "text": "protected function _sanitizeBbCode($string, $bbCodeUid = null, $strip = false)\n\t{\n\t\t// TODO: We can likely simplify the sanitization of the XML markup with: html_entity_decode(strip_tags($xml), ENT_QUOTES, 'UTF-8');\n\n\t\t$start = substr($string, 0, 3);\n\t\tif ($start != '<r>' && $start != '<t>')\n\t\t{\n\t\t\t// treat this as legacy content\n\t\t\treturn parent::_sanitizeBbCode($string, $bbCodeUid, $strip);\n\t\t}\n\n\t\t// 3.2 style content\n\t\t$this->_strip32BbCode = $strip;\n\n\t\t// should be wrapped in <r>...</r> or <t>...</t>\n\t\t$end = substr($string, -4);\n\t\tif ($end == '</r>' || $end == '</t>')\n\t\t{\n\t\t\t$string = substr($string, 3, -4);\n\t\t}\n\n\t\t$string = preg_replace('#<br\\s*/?>(\\r?\\n)*#i', \"\\n\", $string);\n\n\t\tdo\n\t\t{\n\t\t\t$oldString = $string;\n\t\t\t$string = preg_replace_callback(\n\t\t\t\t'#<([A-Z0-9_]+)(\\s+[^>]*)?>(<s>.*</e>)</\\\\1>#sU',\n\t\t\t\tarray($this, '_sanitize32RegexReplace'),\n\t\t\t\t$string\n\t\t\t);\n\t\t}\n\t\twhile ($oldString != $string);\n\n\t\t// <LI> tags don't have a matching <e> part\n\t\tdo\n\t\t{\n\t\t\t$oldString = $string;\n\t\t\t$string = preg_replace(\n\t\t\t\t'#<([A-Z0-9_]+)(\\s+[^>]*)?><s>(.*)</s>(.*)</\\\\1>#sU',\n\t\t\t\t$strip ? '$4' : '$3$4',\n\t\t\t\t$string\n\t\t\t);\n\t\t}\n\t\twhile ($oldString != $string);\n\n\t\t// covers any remaining bits and emoticons\n\t\tdo\n\t\t{\n\t\t\t$oldString = $string;\n\t\t\t$string = preg_replace(\n\t\t\t\t'#<([A-Z0-9_]+|s|e|r|t)(\\s+[^>]*)?>(.*)</\\\\1>#sU',\n\t\t\t\t'$3',\n\t\t\t\t$string\n\t\t\t);\n\t\t}\n\t\twhile ($oldString != $string);\n\n\t\t$string = preg_replace('#<!--.*-->#siU', '', $string);\n\t\t$string = str_replace('[/*]', '', $string);\n\t\t$string = $this->_convertToUtf8($string, true);\n\n\t\tdo\n\t\t{\n\t\t\t$previousString = $string;\n\n\t\t\t// Handles quotes with arguments\n\t\t\t$string = preg_replace(\n\t\t\t\t'#\\[quote=(?:\"|)(.+)(?:\"|)(?:\\s?(?:post_id|time|user_id)=[^\\]]+|)\\]#siU',\n\t\t\t\t'[quote=\"$1\"]',\n\t\t\t\t$string\n\t\t\t);\n\n\t\t\t// don't handle converting [attachment] tags - just strip them\n\t\t\t$string = preg_replace(\n\t\t\t\t'#\\[attachment=[^]]+\\].*\\[/attachment\\]#siU',\n\t\t\t\t'',\n\t\t\t\t$string\n\t\t\t);\n\n\t\t\t// size tags need mapping\n\t\t\t$string = preg_replace_callback(\n\t\t\t\t'#\\[(size)=\"?([^\\]]*)\"?\\](.*)\\[/size\\]#siU',\n\t\t\t\tarray($this, '_handleBbCodeSizeCallback'),\n\t\t\t\t$string\n\t\t\t);\n\n\t\t\t// align tags need mapping\n\t\t\t$string = preg_replace(\n\t\t\t\t'#\\[align=\"?(left|center|right)\"?\\](.*)\\[/align\\]#siU',\n\t\t\t\t'[$1]$3[/$1]',\n\t\t\t\t$string\n\t\t\t);\n\t\t}\n\t\twhile ($string != $previousString);\n\n\t\t$this->_strip32BbCode = false;\n\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "cf0cbc9df6b9756306e733d2aad99a4b", "score": "0.6599736", "text": "function bbdecode($message) {\r\n\tglobal $prefix;\t\t\t\t\r\n\t\t// Undo [code]\r\n\t\t$message = preg_replace(\"#<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font size=-1>Code:</font><HR></TD></TR><TR><TD><FONT SIZE=-1><PRE>(.*?)</PRE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE><!-- BBCode End -->#s\", \"[code]\\\\1[/code]\", $message);\r\n\t\t\t\t\r\n\t\t// Undo [quote]\t\t\t\t\t\t\r\n\t\t$message = preg_replace(\"#<!-- BBCode Quote Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font size=-1>Quote:</font><HR></TD></TR><TR><TD><FONT SIZE=-1><BLOCKQUOTE>(.*?)</BLOCKQUOTE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE><!-- BBCode Quote End -->#s\", \"[quote]\\\\1[/quote]\", $message);\r\n\t\t\r\n\t\t// Undo [b] and [i]\r\n\t\t$message = preg_replace(\"#<!-- BBCode Start --><B>(.*?)</B><!-- BBCode End -->#s\", \"[b]\\\\1[/b]\", $message);\r\n\t\t$message = preg_replace(\"#<!-- BBCode Start --><I>(.*?)</I><!-- BBCode End -->#s\", \"[i]\\\\1[/i]\", $message);\r\n\t\t\r\n\t\t// Undo [url] (both forms)\r\n\t\t$message = preg_replace(\"#<!-- BBCode Start --><A HREF=\\\"http://(.*?)\\\" TARGET=\\\"_blank\\\">(.*?)</A><!-- BBCode End -->#s\", \"[url=\\\\1]\\\\2[/url]\", $message);\r\n\t\t\r\n\t\t// Undo [email]\r\n\t\t$message = preg_replace(\"#<!-- BBCode Start --><A HREF=\\\"mailto:(.*?)\\\">(.*?)</A><!-- BBCode End -->#s\", \"[email]\\\\1[/email]\", $message);\r\n\t\t\r\n\t\t// Undo [img]\r\n\t\t$message = preg_replace(\"#<!-- BBCode Start --><IMG SRC=\\\"(.*?)\\\"><!-- BBCode End -->#s\", \"[img]\\\\1[/img]\", $message);\r\n\t\t\r\n\t\t// Undo lists (unordered/ordered)\r\n\t\r\n\t\t// unordered list code..\r\n\t\t$matchCount = preg_match_all(\"#<!-- BBCode ulist Start --><UL>(.*?)</UL><!-- BBCode ulist End -->#s\", $message, $matches);\r\n\t\r\n\t\tfor ($i = 0; $i < $matchCount; $i++)\r\n\t\t{\r\n\t\t\t$currMatchTextBefore = preg_quote($matches[1][$i]);\r\n\t\t\t$currMatchTextAfter = preg_replace(\"#<LI>#s\", \"[*]\", $matches[1][$i]);\r\n\t\t\r\n\t\t\t$message = preg_replace(\"#<!-- BBCode ulist Start --><UL>$currMatchTextBefore</UL><!-- BBCode ulist End -->#s\", \"[list]\" . $currMatchTextAfter . \"[/list]\", $message);\r\n\t\t}\r\n\t\t\r\n\t\t// ordered list code..\r\n\t\t$matchCount = preg_match_all(\"#<!-- BBCode olist Start --><OL TYPE=([A1])>(.*?)</OL><!-- BBCode olist End -->#si\", $message, $matches);\r\n\t\t\r\n\t\tfor ($i = 0; $i < $matchCount; $i++)\r\n\t\t{\r\n\t\t\t$currMatchTextBefore = preg_quote($matches[2][$i]);\r\n\t\t\t$currMatchTextAfter = preg_replace(\"#<LI>#s\", \"[*]\", $matches[2][$i]);\r\n\t\t\t\r\n\t\t\t$message = preg_replace(\"#<!-- BBCode olist Start --><OL TYPE=([A1])>$currMatchTextBefore</OL><!-- BBCode olist End -->#si\", \"[list=\\\\1]\" . $currMatchTextAfter . \"[/list]\", $message);\r\n\t\t}\t\r\n\t\t\r\n\t\treturn($message);\r\n}", "title": "" }, { "docid": "b3b03e031559eff52316467dd5ec54b5", "score": "0.6575707", "text": "protected function _replaceText( $txt )\n\t{\n\t\t/* Convert old indent tags over */\n\t\tif ( stristr( $txt, '[code]' ) )\n\t\t{\n\t\t\t$txt = str_ireplace( '[code]', '[code=auto:0]', $txt );\n\t\t}\n\t\t//print 'x'; exit();\n\t\t$txt = preg_replace_callback( '#(\\[code\\].*\\[/code\\])#is', array( $this, '_cleanCodeBoxes' ), $txt );\n\t\t\n\t\t$this->_bbcode['bbcode_useoption'] = true;\n\t\t$this->_bbcode['bbcode_optional_option'] = true;\n\t\t\n\t\t$_tags = $this->_retrieveTags();\n\t\t\n\t\tforeach( $_tags as $_tag )\n\t\t{\n\t\t\t// -----------------------------------------\n\t\t\t// Infinite loop catcher\n\t\t\t// -----------------------------------------\n\t\t\t\n\t\t\t$_iteration = 0;\n\t\t\t\n\t\t\t// -----------------------------------------\n\t\t\t// Start building open/close tag\n\t\t\t// -----------------------------------------\n\t\t\t\n\t\t\t$open_tag = '[' . $_tag;\n\t\t\t$close_tag = '[/' . $_tag . ']';\n\t\t\t\n\t\t\t// -----------------------------------------\n\t\t\t// Doz I can haz opin tag? Loopy loo\n\t\t\t// -----------------------------------------\n\t\t\t\n\t\t\twhile ( ( $this->cur_pos = stripos( $txt, $open_tag, $this->cur_pos ) ) !== false )\n\t\t\t{\n\t\t\t\t// -----------------------------------------\n\t\t\t\t// Stop infinite loops\n\t\t\t\t// -----------------------------------------\n\t\t\t\t\n\t\t\t\tif ( $_iteration > $this->settings['max_bbcodes_per_post'] )\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$_iteration ++;\n\t\t\t\t\n\t\t\t\t$open_length = strlen( $open_tag );\n\t\t\t\t\n\t\t\t\t// -----------------------------------------\n\t\t\t\t// Extract the option (like surgery)\n\t\t\t\t// -----------------------------------------\n\t\t\t\t\n\t\t\t\t$_option = '';\n\t\t\t\t\n\t\t\t\tif ( $this->_bbcode['bbcode_useoption'] )\n\t\t\t\t{\n\t\t\t\t\t// -----------------------------------------\n\t\t\t\t\t// Is option optional?\n\t\t\t\t\t// -----------------------------------------\n\t\t\t\t\t\n\t\t\t\t\tif ( $this->_bbcode['bbcode_optional_option'] )\n\t\t\t\t\t{\n\t\t\t\t\t\t// -----------------------------------------\n\t\t\t\t\t\t// Does we haz it?\n\t\t\t\t\t\t// -----------------------------------------\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( substr( $txt, $this->cur_pos + strlen( $open_tag ), 1 ) == '=' )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$open_length += 1;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// -----------------------------------------\n\t\t\t\t\t\t\t// This is here to try to capture urls with\n\t\t\t\t\t\t\t// [ and ] in them, only works if enclosed in quotes\n\t\t\t\t\t\t\t// -----------------------------------------\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$cur_content = '';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( substr( $txt, $this->cur_pos + $open_length, 6 ) == '&quot;' )\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 * Skip the bbocde if there is more than 2\n\t\t\t\t\t\t\t\t * quotes. Bug #21161\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\tif ( strlen( substr( $txt, $this->cur_pos, stripos( $txt, ']', $this->cur_pos ) - $this->cur_pos ) ) < 1 or ( substr_count( $txt, '&quot;', $this->cur_pos, strlen( substr( $txt, $this->cur_pos, stripos( $txt, ']', $this->cur_pos ) - $this->cur_pos ) ) ) ) > 2 )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->cur_pos = strpos( $txt, ']', $this->cur_pos ) ? strpos( $txt, ']', $this->cur_pos ) : $this->cur_pos + 1;\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$end_pos = stripos( $txt, '&quot;', $this->cur_pos + $open_length + 1 ) ? stripos( $txt, '&quot;', $this->cur_pos + $open_length + 1 ) : strpos( $txt, ']', $this->cur_pos + $open_length + 1 );\n\t\t\t\t\t\t\t\t$cur_content = substr( $txt, $this->cur_pos + $open_length + 6, ( $end_pos - ( $this->cur_pos + $open_length + 6 ) ) );\n\t\t\t\t\t\t\t\t$new_content = str_replace( '[', '%5B', str_replace( ']', '%5D', $cur_content ) );\n\t\t\t\t\t\t\t\t$txt = substr_replace( $txt, $new_content, $this->cur_pos + $open_length + 6, ( $end_pos - ( $this->cur_pos + $open_length + 6 ) ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ( substr( $txt, $this->cur_pos + $open_length, 5 ) == \"&#39;\" )\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 * Skip the bbocde if there is mroe than 2\n\t\t\t\t\t\t\t\t * quotes. Bug #21161\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\tif ( strlen( substr( $txt, $this->cur_pos, stripos( $txt, ']', $this->cur_pos ) - $this->cur_pos ) ) < 1 or ( substr_count( $txt, '&#39;', $this->cur_pos, strlen( substr( $txt, $this->cur_pos, stripos( $txt, ']', $this->cur_pos ) - $this->cur_pos ) ) ) ) > 2 )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->cur_pos = strpos( $txt, ']', $this->cur_pos ) ? strpos( $txt, ']', $this->cur_pos ) : $this->cur_pos + 1;\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$end_pos = stripos( $txt, '&#39;', $this->cur_pos + $open_length + 1 ) ? stripos( $txt, '&#39;', $this->cur_pos + $open_length + 1 ) : strpos( $txt, ']', $this->cur_pos + $open_length + 1 );\n\t\t\t\t\t\t\t\t$cur_content = substr( $txt, $this->cur_pos + $open_length + 5, ( $end_pos - ( $this->cur_pos + $open_length + 5 ) ) );\n\t\t\t\t\t\t\t\t$new_content = str_replace( '[', '%5B', str_replace( ']', '%5D', $cur_content ) );\n\t\t\t\t\t\t\t\t$txt = substr_replace( $txt, $new_content, $this->cur_pos + $open_length + 5, ( $end_pos - ( $this->cur_pos + $open_length + 5 ) ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// -----------------------------------------\n\t\t\t\t\t\t\t// Need this because HTML on converts the\n\t\t\t\t\t\t\t// entities back to quote/apos\n\t\t\t\t\t\t\t// -----------------------------------------\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\telse if ( substr( $txt, $this->cur_pos + $open_length, 1 ) == '\"' )\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 * Skip the bbocde if there is mroe than 2\n\t\t\t\t\t\t\t\t * quotes. Bug #21161\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\tif ( strlen( substr( $txt, $this->cur_pos, stripos( $txt, ']', $this->cur_pos ) - $this->cur_pos ) ) < 1 or ( substr_count( $txt, '\"', $this->cur_pos, strlen( substr( $txt, $this->cur_pos, stripos( $txt, ']', $this->cur_pos ) - $this->cur_pos ) ) ) ) > 2 )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->cur_pos = strpos( $txt, ']', $this->cur_pos ) ? strpos( $txt, ']', $this->cur_pos ) : $this->cur_pos + 1;\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$end_pos = stripos( $txt, '\"', $this->cur_pos + $open_length + 1 ) ? stripos( $txt, '\"', $this->cur_pos + $open_length + 1 ) : strpos( $txt, ']', $this->cur_pos + $open_length + 1 );\n\t\t\t\t\t\t\t\t$cur_content = substr( $txt, $this->cur_pos + $open_length + 1, ( $end_pos - ( $this->cur_pos + $open_length + 1 ) ) );\n\t\t\t\t\t\t\t\t$new_content = str_replace( '[', '%5B', str_replace( ']', '%5D', $cur_content ) );\n\t\t\t\t\t\t\t\t$txt = substr_replace( $txt, $new_content, $this->cur_pos + $open_length + 1, ( $end_pos - ( $this->cur_pos + $open_length + 1 ) ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ( substr( $txt, $this->cur_pos + $open_length, 1 ) == \"'\" )\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 * Skip the bbocde if there is mroe than 2\n\t\t\t\t\t\t\t\t * quotes. Bug #21161\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\tif ( strlen( substr( $txt, $this->cur_pos, stripos( $txt, ']', $this->cur_pos ) - $this->cur_pos ) ) < 1 or ( substr_count( $txt, \"'\", $this->cur_pos, strlen( substr( $txt, $this->cur_pos, stripos( $txt, ']', $this->cur_pos ) - $this->cur_pos ) ) ) ) > 2 )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->cur_pos = strpos( $txt, ']', $this->cur_pos ) ? strpos( $txt, ']', $this->cur_pos ) : $this->cur_pos + 1;\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$end_pos = stripos( $txt, \"'\", $this->cur_pos + $open_length + 1 ) ? stripos( $txt, \"'\", $this->cur_pos + $open_length + 1 ) : strpos( $txt, ']', $this->cur_pos + $open_length + 1 );\n\t\t\t\t\t\t\t\t$cur_content = substr( $txt, $this->cur_pos + $open_length + 1, ( $end_pos - ( $this->cur_pos + $open_length + 1 ) ) );\n\t\t\t\t\t\t\t\t$new_content = str_replace( '[', '%5B', str_replace( ']', '%5D', $cur_content ) );\n\t\t\t\t\t\t\t\t$txt = substr_replace( $txt, $new_content, $this->cur_pos + $open_length + 1, ( $end_pos - ( $this->cur_pos + $open_length + 1 ) ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$_option = substr( $txt, $this->cur_pos + $open_length, ( strpos( $txt, ']', $this->cur_pos ) - ( $this->cur_pos + $open_length ) ) );\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\t// If not, [u] != [url] (for example)\n\t\t\t\t\t\t// -----------------------------------------\n\t\t\t\t\t\t\n\t\t\t\t\t\telse if ( ( strpos( $txt, ']', $this->cur_pos ) - ( $this->cur_pos + $open_length ) ) !== 0 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->cur_pos = strpos( $txt, ']', $this->cur_pos ) ? strpos( $txt, ']', $this->cur_pos ) : $this->cur_pos + 1;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// -----------------------------------------\n\t\t\t\t\t// No? Then just grab it\n\t\t\t\t\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$open_length += 1;\n\t\t\t\t\t\t$_option = substr( $txt, $this->cur_pos + $open_length, ( strpos( $txt, ']', $this->cur_pos ) - ( $this->cur_pos + $open_length ) ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// -----------------------------------------\n\t\t\t\t// [img] != [i] (for example)\n\t\t\t\t// -----------------------------------------\n\t\t\t\t\n\t\t\t\telse if ( ( strpos( $txt, ']', $this->cur_pos ) - ( $this->cur_pos + $open_length ) ) !== 0 )\n\t\t\t\t{\n\t\t\t\t\t$this->cur_pos = strpos( $txt, ']', $this->cur_pos ) ? strpos( $txt, ']', $this->cur_pos ) : $this->cur_pos + 1;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// -----------------------------------------\n\t\t\t\t// Grab the new position to jump to\n\t\t\t\t// -----------------------------------------\n\t\t\t\t\n\t\t\t\t$new_pos = strpos( $txt, ']', $this->cur_pos ) ? strpos( $txt, ']', $this->cur_pos ) : $this->cur_pos + 1;\n\t\t\t\t\n\t\t\t\t// -----------------------------------------\n\t\t\t\t// No closing tag\n\t\t\t\t// -----------------------------------------\n\t\t\t\t\n\t\t\t\tif ( stripos( $txt, $close_tag, $new_pos ) === false )\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// -----------------------------------------\n\t\t\t\t// Grab the content\n\t\t\t\t// -----------------------------------------\n\t\t\t\t\n\t\t\t\t$_content = substr( $txt, ( $this->cur_pos + $open_length + strlen( $_option ) + 1 ), ( ( stripos( $txt, $close_tag, $this->cur_pos + $open_length + strlen( $_option ) + 1 ) ) - ( $this->cur_pos + $open_length + strlen( $_option ) + 1 ) ) );\n\t\t\t\t\n\t\t\t\t// -----------------------------------------\n\t\t\t\t// If this is a single tag, that's it\n\t\t\t\t// @link:\n\t\t\t\t// http://forums.invisionpower.com/index.php?autocom=tracker&showissue=11909\n\t\t\t\t// -----------------------------------------\n\t\t\t\t\n\t\t\t\tif ( $_content or $_content === '0' )\n\t\t\t\t{\n\t\t\t\t\tif ( $this->_buildOutput( $_content, $_option ? $_option : $_content ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$txt = substr_replace( $txt, $this->_buildOutput( $_content, $_option ? $_option : $_content ), $this->cur_pos, ( stripos( $txt, $close_tag, $this->cur_pos ) + strlen( $close_tag ) - $this->cur_pos ) );\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$txt = substr_replace( $txt, '', $this->cur_pos, ( stripos( $txt, $close_tag, $this->cur_pos ) + strlen( $close_tag ) - $this->cur_pos ) );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// -----------------------------------------\n\t\t\t\t// And reset current position to end of open tag\n\t\t\t\t// -----------------------------------------\n\t\t\t\t\n\t\t\t\t$this->cur_pos = stripos( $txt, $open_tag ) ? stripos( $txt, $open_tag ) : $this->cur_pos + 1; // $new_pos;\n\t\t\t\t\n\t\t\t\tif ( $this->cur_pos > strlen( $txt ) )\n\t\t\t\t{\n\t\t\t\t\t// -----------------------------------------\n\t\t\t\t\t// Need to reset for next \"tag\"\n\t\t\t\t\t// -----------------------------------------\n\t\t\t\t\t\n\t\t\t\t\t$this->cur_pos = 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $txt;\n\t}", "title": "" }, { "docid": "9f8db76073bbd75b76b286e5d3a0ec08", "score": "0.6493551", "text": "private function enableBBCodeTags($argText)\n {\n $search = array('&#91;', '&#93;');\n $replace = array('[', ']');\n return str_replace($search, $replace, $argText);\n }", "title": "" }, { "docid": "541981561689c821baba96be8b25d5c2", "score": "0.6484936", "text": "function oembed_html2bbcode($text) {\n\t// start parser only if 'oembed' is in text\n\tif (strpos($text, \"oembed\")){\n\t\t\n\t\t// convert non ascii chars to html entities\n\t\t$html_text = mb_convert_encoding($text, 'HTML-ENTITIES', mb_detect_encoding($text));\n\t\t\n\t\t// If it doesn't parse at all, just return the text.\n\t\t$dom = @DOMDocument::loadHTML($html_text);\n\t\tif(! $dom)\n\t\t\treturn $text;\n\t\t$xpath = new DOMXPath($dom);\n\t\t$attr = \"oembed\";\n\t\t\n\t\t$xattr = oe_build_xpath(\"class\",\"oembed\");\n\t\t$entries = $xpath->query(\"//span[$xattr]\");\n\n\t\t$xattr = \"@rel='oembed'\";//oe_build_xpath(\"rel\",\"oembed\");\n\t\tforeach($entries as $e) {\n\t\t\t$href = $xpath->evaluate(\"a[$xattr]/@href\", $e)->item(0)->nodeValue;\n\t\t\tif(!is_null($href)) $e->parentNode->replaceChild(new DOMText(\"[embed]\".$href.\"[/embed]\"), $e);\n\t\t}\n\t\treturn oe_get_inner_html( $dom->getElementsByTagName(\"body\")->item(0) );\n\t} else {\n\t\treturn $text;\n\t} \n}", "title": "" }, { "docid": "456597e8ec8c34df1c687859bd17b68c", "score": "0.64768326", "text": "function prepare_bbcodes()\n\t{\n\t\t// Add newline at the end and in front of each quote block to prevent parsing errors (urls, smilies, etc.)\n\t\tif (strpos($this->message, '[quote') !== false)\n\t\t{\n\t\t\t$this->message = str_replace(\"\\r\\n\", \"\\n\", $this->message);\n\n\t\t\t// We strip newlines and spaces after and before quotes in quotes (trimming)\n\t\t\t$this->message = preg_replace(array('#\\[quote(=&quot;.*?&quot;)?\\]([\\s|\\n]+)#ius', '#([\\s|\\n]+)\\[\\/quote\\]#ius'), array(\"[quote\\\\1]\", \"[/quote]\"), $this->message);\n\n\t\t\t// Now we add exactly one newline\n\t\t\t$this->message = preg_replace(array('#\\[quote(=&quot;.*?&quot;)?\\]#is', '#\\[\\/quote\\]#is'), array(\"[quote\\\\1]\\n\", \"\\n[/quote]\"), $this->message);\n\t\t}\n\n\t\t// Add other checks which needs to be placed before actually parsing anything (be it bbcodes, smilies, urls...)\n\t}", "title": "" }, { "docid": "8d02275feb40c46ed290bcbaa93f2538", "score": "0.64358807", "text": "public function testTagChain()\n {\n $repl = new BBCodeReplace('b', '<b>', '</b>', 'inline', array());\n $this->dumper->addHandler($repl);\n $str = '[b][b][b]Test[/b][/b][/b]';\n $result = $this->parser->parse($str);\n $parsed = $this->dumper->dump($result);\n \n $this->assertEquals('<b>[b][b]Test[/b][/b]</b>', $parsed, 'The inner tags are parsed while they should not be');\n }", "title": "" }, { "docid": "3573747f92ad1b912c67a0af98fb31d8", "score": "0.63703287", "text": "function mc_cleanBBInput($data) {\n global $SETTINGS;\n if ($SETTINGS->enableBBCode == 'yes') {\n $find = array(\n '[img] ',\n ' [/img]',\n '[url] ',\n ' [/url]',\n '[email] ',\n ' [/email]',\n '[IMG] ',\n ' [/IMG]',\n '[URL] ',\n ' [/URL]',\n '[EMAIL] ',\n ' [/EMAIL]'\n );\n $repl = array(\n '[img]',\n '[/img]',\n '[url]',\n '[/url]',\n '[email]',\n '[/email]',\n '[IMG]',\n '[/IMG]',\n '[URL]',\n '[/URL]',\n '[EMAIL]',\n '[/EMAIL]'\n );\n $data = str_replace($find, $repl, $data);\n }\n return $data;\n}", "title": "" }, { "docid": "06cdc0b94950c1fea6e6948450658689", "score": "0.6362716", "text": "public function StripBBCodeTags($argText) \n { \n $pattern = '|[[\\/\\!]*?[^\\[\\]]*?]|si';\n $replace = '';\n return preg_replace($pattern, $replace, $argText);\n }", "title": "" }, { "docid": "3f00a8a4c4bc630337e0caa30294ac15", "score": "0.63530535", "text": "function legalise_bbc($text)\n{\n\tglobal $modSettings;\n\n\t// Don't care about the texts that are too short.\n\tif (strlen($text) < 3)\n\t\treturn $text;\n\n\t// We are going to cycle through the BBC and keep track of tags as they arise - in order. If get to a block level tag we're going to make sure it's not in a non-block level tag!\n\t// This will keep the order of tags that are open.\n\t$current_tags = array();\n\n\t// This will quickly let us see if the tag is active.\n\t$active_tags = array();\n\n\t// A list of tags that's disabled by the admin.\n\t$disabled = empty($modSettings['disabledBBC']) ? array() : array_flip(explode(',', strtolower($modSettings['disabledBBC'])));\n\n\t// Add flash if it's disabled as embedded tag.\n\tif (empty($modSettings['enableEmbeddedFlash']))\n\t\t$disabled['flash'] = true;\n\n\t// Get a list of all the tags that are not disabled.\n\t$all_tags = parse_bbc(false);\n\t$valid_tags = array();\n\t$self_closing_tags = array();\n\tforeach ($all_tags as $tag)\n\t{\n\t\tif (!isset($disabled[$tag['tag']]))\n\t\t\t$valid_tags[$tag['tag']] = !empty($tag['block_level']);\n\t\tif (isset($tag['type']) && $tag['type'] == 'closed')\n\t\t\t$self_closing_tags[] = $tag['tag'];\n\t}\n\n\t// Don't worry if we're in a code/nobbc.\n\t$in_code_nobbc = false;\n\n\t// Right - we're going to start by going through the whole lot to make sure we don't have align stuff crossed as this happens load and is stupid!\n\t$align_tags = array('left', 'center', 'right', 'pre');\n\n\t// Remove those align tags that are not valid.\n\t$align_tags = array_intersect($align_tags, array_keys($valid_tags));\n\n\t// These keep track of where we are!\n\tif (!empty($align_tags) && count($matches = preg_split('~(\\\\[/?(?:' . implode('|', $align_tags) . ')\\\\])~', $text, -1, PREG_SPLIT_DELIM_CAPTURE)) > 1)\n\t{\n\t\t// The first one is never a tag.\n\t\t$isTag = false;\n\n\t\t// By default we're not inside a tag too.\n\t\t$insideTag = null;\n\n\t\tforeach ($matches as $i => $match)\n\t\t{\n\t\t\t// We're only interested in tags, not text.\n\t\t\tif ($isTag)\n\t\t\t{\n\t\t\t\t$isClosingTag = substr($match, 1, 1) === '/';\n\t\t\t\t$tagName = substr($match, $isClosingTag ? 2 : 1, -1);\n\n\t\t\t\t// We're closing the exact same tag that we opened.\n\t\t\t\tif ($isClosingTag && $insideTag === $tagName)\n\t\t\t\t\t$insideTag = null;\n\n\t\t\t\t// We're opening a tag and we're not yet inside one either\n\t\t\t\telseif (!$isClosingTag && $insideTag === null)\n\t\t\t\t\t$insideTag = $tagName;\n\n\t\t\t\t// In all other cases, this tag must be invalid\n\t\t\t\telse\n\t\t\t\t\tunset($matches[$i]);\n\t\t\t}\n\n\t\t\t// The next one is gonna be the other one.\n\t\t\t$isTag = !$isTag;\n\t\t}\n\n\t\t// We're still inside a tag and had no chance for closure?\n\t\tif ($insideTag !== null)\n\t\t\t$matches[] = '[/' . $insideTag . ']';\n\n\t\t// And a complete text string again.\n\t\t$text = implode('', $matches);\n\t}\n\n\t// Quickly remove any tags which are back to back.\n\t$backToBackPattern = '~\\\\[(' . implode('|', array_diff(array_keys($valid_tags), array('td', 'anchor'))) . ')[^<>\\\\[\\\\]]*\\\\]\\s*\\\\[/\\\\1\\\\]~';\n\t$lastlen = 0;\n\twhile (strlen($text) !== $lastlen)\n\t\t$lastlen = strlen($text = preg_replace($backToBackPattern, '', $text));\n\n\t// Need to sort the tags my name length.\n\tuksort($valid_tags, 'sort_array_length');\n\n\t// These inline tags can compete with each other regarding style.\n\t$competing_tags = array(\n\t\t'color',\n\t\t'size',\n\t);\n\n\t// In case things changed above set these back to normal.\n\t$in_code_nobbc = false;\n\t$new_text_offset = 0;\n\n\t// These keep track of where we are!\n\tif (count($parts = preg_split(sprintf('~(\\\\[)(/?)(%1$s)((?:[\\\\s=][^\\\\]\\\\[]*)?\\\\])~', implode('|', array_keys($valid_tags))), $text, -1, PREG_SPLIT_DELIM_CAPTURE)) > 1)\n\t{\n\t\t// Start with just text.\n\t\t$isTag = false;\n\n\t\t// Start outside [nobbc] or [code] blocks.\n\t\t$inCode = false;\n\t\t$inNoBbc = false;\n\n\t\t// A buffer containing all opened inline elements.\n\t\t$inlineElements = array();\n\n\t\t// A buffer containing all opened block elements.\n\t\t$blockElements = array();\n\n\t\t// A buffer containing the opened inline elements that might compete.\n\t\t$competingElements = array();\n\n\t\t// $i: text, $i + 1: '[', $i + 2: '/', $i + 3: tag, $i + 4: tag tail.\n\t\tfor ($i = 0, $n = count($parts) - 1; $i < $n; $i += 5)\n\t\t{\n\t\t\t$tag = $parts[$i + 3];\n\t\t\t$isOpeningTag = $parts[$i + 2] === '';\n\t\t\t$isClosingTag = $parts[$i + 2] === '/';\n\t\t\t$isBlockLevelTag = isset($valid_tags[$tag]) && $valid_tags[$tag] && !in_array($tag, $self_closing_tags);\n\t\t\t$isCompetingTag = in_array($tag, $competing_tags);\n\n\t\t\t// Check if this might be one of those cleaned out tags.\n\t\t\tif ($tag === '')\n\t\t\t\tcontinue;\n\n\t\t\t// Special case: inside [code] blocks any code is left untouched.\n\t\t\telseif ($tag === 'code')\n\t\t\t{\n\t\t\t\t// We're inside a code block and closing it.\n\t\t\t\tif ($inCode && $isClosingTag)\n\t\t\t\t{\n\t\t\t\t\t$inCode = false;\n\n\t\t\t\t\t// Reopen tags that were closed before the code block.\n\t\t\t\t\tif (!empty($inlineElements))\n\t\t\t\t\t\t$parts[$i + 4] .= '[' . implode('][', array_keys($inlineElements)) . ']';\n\t\t\t\t}\n\n\t\t\t\t// We're outside a coding and nobbc block and opening it.\n\t\t\t\telseif (!$inCode && !$inNoBbc && $isOpeningTag)\n\t\t\t\t{\n\t\t\t\t\t// If there are still inline elements left open, close them now.\n\t\t\t\t\tif (!empty($inlineElements))\n\t\t\t\t\t{\n\t\t\t\t\t\t$parts[$i] .= '[/' . implode('][/', array_reverse($inlineElements)) . ']';\n\t\t\t\t\t\t//$inlineElements = array();\n\t\t\t\t\t}\n\n\t\t\t\t\t$inCode = true;\n\t\t\t\t}\n\n\t\t\t\t// Nothing further to do.\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Special case: inside [nobbc] blocks any BBC is left untouched.\n\t\t\telseif ($tag === 'nobbc')\n\t\t\t{\n\t\t\t\t// We're inside a nobbc block and closing it.\n\t\t\t\tif ($inNoBbc && $isClosingTag)\n\t\t\t\t{\n\t\t\t\t\t$inNoBbc = false;\n\n\t\t\t\t\t// Some inline elements might've been closed that need reopening.\n\t\t\t\t\tif (!empty($inlineElements))\n\t\t\t\t\t\t$parts[$i + 4] .= '[' . implode('][', array_keys($inlineElements)) . ']';\n\t\t\t\t}\n\n\t\t\t\t// We're outside a nobbc and coding block and opening it.\n\t\t\t\telseif (!$inNoBbc && !$inCode && $isOpeningTag)\n\t\t\t\t{\n\t\t\t\t\t// Can't have inline elements still opened.\n\t\t\t\t\tif (!empty($inlineElements))\n\t\t\t\t\t{\n\t\t\t\t\t\t$parts[$i] .= '[/' . implode('][/', array_reverse($inlineElements)) . ']';\n\t\t\t\t\t\t//$inlineElements = array();\n\t\t\t\t\t}\n\n\t\t\t\t\t$inNoBbc = true;\n\t\t\t\t}\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// So, we're inside one of the special blocks: ignore any tag.\n\t\t\telseif ($inCode || $inNoBbc)\n\t\t\t\tcontinue;\n\n\t\t\t// We're dealing with an opening tag.\n\t\t\tif ($isOpeningTag)\n\t\t\t{\n\t\t\t\t// Everyting inside the square brackets of the opening tag.\n\t\t\t\t$elementContent = $parts[$i + 3] . substr($parts[$i + 4], 0, -1);\n\n\t\t\t\t// A block level opening tag.\n\t\t\t\tif ($isBlockLevelTag)\n\t\t\t\t{\n\t\t\t\t\t// Are there inline elements still open?\n\t\t\t\t\tif (!empty($inlineElements))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Close all the inline tags, a block tag is coming...\n\t\t\t\t\t\t$parts[$i] .= '[/' . implode('][/', array_reverse($inlineElements)) . ']';\n\n\t\t\t\t\t\t// Now open them again, we're inside the block tag now.\n\t\t\t\t\t\t$parts[$i + 5] = '[' . implode('][', array_keys($inlineElements)) . ']' . $parts[$i + 5];\n\t\t\t\t\t}\n\n\t\t\t\t\t$blockElements[] = $tag;\n\t\t\t\t}\n\n\t\t\t\t// Inline opening tag.\n\t\t\t\telseif (!in_array($tag, $self_closing_tags))\n\t\t\t\t{\n\t\t\t\t\t// Can't have two opening elements with the same contents!\n\t\t\t\t\tif (isset($inlineElements[$elementContent]))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Get rid of this tag.\n\t\t\t\t\t\t$parts[$i + 1] = $parts[$i + 2] = $parts[$i + 3] = $parts[$i + 4] = '';\n\n\t\t\t\t\t\t// Now try to find the corresponding closing tag.\n\t\t\t\t\t\t$curLevel = 1;\n\t\t\t\t\t\tfor ($j = $i + 5, $m = count($parts) - 1; $j < $m; $j += 5)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Find the tags with the same tagname\n\t\t\t\t\t\t\tif ($parts[$j + 3] === $tag)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// If it's an opening tag, increase the level.\n\t\t\t\t\t\t\t\tif ($parts[$j + 2] === '')\n\t\t\t\t\t\t\t\t\t$curLevel++;\n\n\t\t\t\t\t\t\t\t// A closing tag, decrease the level.\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$curLevel--;\n\n\t\t\t\t\t\t\t\t\t// Gotcha! Clean out this closing tag gone rogue.\n\t\t\t\t\t\t\t\t\tif ($curLevel === 0)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$parts[$j + 1] = $parts[$j + 2] = $parts[$j + 3] = $parts[$j + 4] = '';\n\t\t\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t\t// Otherwise, add this one to the list.\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($isCompetingTag)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (!isset($competingElements[$tag]))\n\t\t\t\t\t\t\t\t$competingElements[$tag] = array();\n\n\t\t\t\t\t\t\t$competingElements[$tag][] = $parts[$i + 4];\n\n\t\t\t\t\t\t\tif (count($competingElements[$tag]) > 1)\n\t\t\t\t\t\t\t\t$parts[$i] .= '[/' . $tag . ']';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$inlineElements[$elementContent] = $tag;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Closing tag.\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Closing the block tag.\n\t\t\t\tif ($isBlockLevelTag)\n\t\t\t\t{\n\t\t\t\t\t// Close the elements that should've been closed by closing this tag.\n\t\t\t\t\tif (!empty($blockElements))\n\t\t\t\t\t{\n\t\t\t\t\t\t$addClosingTags = array();\n\t\t\t\t\t\twhile ($element = array_pop($blockElements))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($element === $tag)\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t// Still a block tag was open not equal to this tag.\n\t\t\t\t\t\t\t$addClosingTags[] = $element['type'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!empty($addClosingTags))\n\t\t\t\t\t\t\t$parts[$i + 1] = '[/' . implode('][/', array_reverse($addClosingTags)) . ']' . $parts[$i + 1];\n\n\t\t\t\t\t\t// Apparently the closing tag was not found on the stack.\n\t\t\t\t\t\tif (!is_string($element) || $element !== $tag)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Get rid of this particular closing tag, it was never opened.\n\t\t\t\t\t\t\t$parts[$i + 1] = substr($parts[$i + 1], 0, -1);\n\t\t\t\t\t\t\t$parts[$i + 2] = $parts[$i + 3] = $parts[$i + 4] = '';\n\t\t\t\t\t\t\tcontinue;\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{\n\t\t\t\t\t\t// Get rid of this closing tag!\n\t\t\t\t\t\t$parts[$i + 1] = $parts[$i + 2] = $parts[$i + 3] = $parts[$i + 4] = '';\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Inline elements are still left opened?\n\t\t\t\t\tif (!empty($inlineElements))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Close them first..\n\t\t\t\t\t\t$parts[$i] .= '[/' . implode('][/', array_reverse($inlineElements)) . ']';\n\n\t\t\t\t\t\t// Then reopen them.\n\t\t\t\t\t\t$parts[$i + 5] = '[' . implode('][', array_keys($inlineElements)) . ']' . $parts[$i + 5];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Inline tag.\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Are we expecting this tag to end?\n\t\t\t\t\tif (in_array($tag, $inlineElements))\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach (array_reverse($inlineElements, true) as $tagContentToBeClosed => $tagToBeClosed)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Closing it one way or the other.\n\t\t\t\t\t\t\tunset($inlineElements[$tagContentToBeClosed]);\n\n\t\t\t\t\t\t\t// Was this the tag we were looking for?\n\t\t\t\t\t\t\tif ($tagToBeClosed === $tag)\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t// Nope, close it and look further!\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t$parts[$i] .= '[/' . $tagToBeClosed . ']';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($isCompetingTag && !empty($competingElements[$tag]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tarray_pop($competingElements[$tag]);\n\n\t\t\t\t\t\t\tif (count($competingElements[$tag]) > 0)\n\t\t\t\t\t\t\t\t$parts[$i + 5] = '[' . $tag . $competingElements[$tag][count($competingElements[$tag]) - 1] . $parts[$i + 5];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Unexpected closing tag, ex-ter-mi-nate.\n\t\t\t\t\telse\n\t\t\t\t\t\t$parts[$i + 1] = $parts[$i + 2] = $parts[$i + 3] = $parts[$i + 4] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Close the code tags.\n\t\tif ($inCode)\n\t\t\t$parts[$i] .= '[/code]';\n\n\t\t// The same for nobbc tags.\n\t\telseif ($inNoBbc)\n\t\t\t$parts[$i] .= '[/nobbc]';\n\n\t\t// Still inline tags left unclosed? Close them now, better late than never.\n\t\telseif (!empty($inlineElements))\n\t\t\t$parts[$i] .= '[/' . implode('][/', array_reverse($inlineElements)) . ']';\n\n\t\t// Now close the block elements.\n\t\tif (!empty($blockElements))\n\t\t\t$parts[$i] .= '[/' . implode('][/', array_reverse($blockElements)) . ']';\n\n\t\t$text = implode('', $parts);\n\t}\n\n\t// Final clean up of back to back tags.\n\t$lastlen = 0;\n\twhile (strlen($text) !== $lastlen)\n\t\t$lastlen = strlen($text = preg_replace($backToBackPattern, '', $text));\n\n\treturn $text;\n}", "title": "" }, { "docid": "536da648d24edf6da85510e86235aed7", "score": "0.6348618", "text": "function bbcode_quote($in)\n\t{\n\t\tglobal $config, $user;\n\n\t\t$in = str_replace(\"\\r\\n\", \"\\n\", str_replace('\\\"', '\"', trim($in)));\n\n\t\tif (!$in)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\t$tok = ']';\n\t\t$out = '[';\n\n\t\t$in = substr($in, 1);\n\t\t$close_tags = $error_ary = array();\n\t\t$buffer = '';\n\n\t\tdo\n\t\t{\n\t\t\t$pos = strlen($in);\n\t\t\tfor ($i = 0, $tok_len = strlen($tok); $i < $tok_len; ++$i)\n\t\t\t{\n\t\t\t\t$tmp_pos = strpos($in, $tok[$i]);\n\t\t\t\tif ($tmp_pos !== false && $tmp_pos < $pos)\n\t\t\t\t{\n\t\t\t\t\t$pos = $tmp_pos;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$buffer .= substr($in, 0, $pos);\n\t\t\t$tok = $in[$pos];\n\t\t\t$in = substr($in, $pos + 1);\n\n\t\t\tif ($tok == ']')\n\t\t\t{\n\t\t\t\tif ($buffer == '/quote' && sizeof($close_tags))\n\t\t\t\t{\n\t\t\t\t\t// we have found a closing tag\n\t\t\t\t\t$out .= array_pop($close_tags) . ']';\n\t\t\t\t\t$tok = '[';\n\t\t\t\t\t$buffer = '';\n\n\t\t\t\t\t// Add space at the end of the closing tag if not happened before to allow following urls/smilies to be parsed correctly\n\t\t\t\t\tif (!$in || $in[0] !== ' ')\n\t\t\t\t\t{\n\t\t\t\t\t\t$out .= ' ';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (preg_match('#^quote(?:=&quot;(.*?)&quot;)?$#is', $buffer, $m))\n\t\t\t\t{\n\t\t\t\t\t$this->parsed_items['quote']++;\n\n\t\t\t\t\t// the buffer holds a valid opening tag\n\t\t\t\t\tif ($config['max_quote_depth'] && sizeof($close_tags) >= $config['max_quote_depth'])\n\t\t\t\t\t{\n\t\t\t\t\t\t// there are too many nested quotes\n\t\t\t\t\t\t$error_ary['quote_depth'] = sprintf($user->lang['QUOTE_DEPTH_EXCEEDED'], $config['max_quote_depth']);\n\n\t\t\t\t\t\t$out .= $buffer . $tok;\n\t\t\t\t\t\t$tok = '[]';\n\t\t\t\t\t\t$buffer = '';\n\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tarray_push($close_tags, '/quote:' . $this->bbcode_uid);\n\n\t\t\t\t\tif (isset($m[1]) && $m[1])\n\t\t\t\t\t{\n\t\t\t\t\t\t$username = preg_replace('#\\[(?!b|i|u|color|url|email|/b|/i|/u|/color|/url|/email)#iU', '&#91;$1', $m[1]);\n\t\t\t\t\t\t$end_tags = array();\n\t\t\t\t\t\t$error = false;\n\n\t\t\t\t\t\tpreg_match_all('#\\[((?:/)?(?:[a-z]+))#i', $username, $tags);\n\t\t\t\t\t\tforeach ($tags[1] as $tag)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($tag[0] != '/')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$end_tags[] = '/' . $tag;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$end_tag = array_pop($end_tags);\n\t\t\t\t\t\t\t\t$error = ($end_tag != $tag) ? true : false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($error)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$username = str_replace('[', '&#91;', str_replace(']', '&#93;', $m[1]));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$out .= 'quote=&quot;' . $username . '&quot;:' . $this->bbcode_uid . ']';\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$out .= 'quote:' . $this->bbcode_uid . ']';\n\t\t\t\t\t}\n\n\t\t\t\t\t$tok = '[';\n\t\t\t\t\t$buffer = '';\n\t\t\t\t}\n\t\t\t\telse if (preg_match('#^quote=&quot;(.*?)#is', $buffer, $m))\n\t\t\t\t{\n\t\t\t\t\t// the buffer holds an invalid opening tag\n\t\t\t\t\t$buffer .= ']';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$out .= $buffer . $tok;\n\t\t\t\t\t$tok = '[]';\n\t\t\t\t\t$buffer = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n/**\n*\t\t\t\tOld quote code working fine, but having errors listed in bug #3572\n*\n*\t\t\t\t$out .= $buffer . $tok;\n*\t\t\t\t$tok = ($tok == '[') ? ']' : '[]';\n*\t\t\t\t$buffer = '';\n*/\n\n\t\t\t\t$out .= $buffer . $tok;\n\n\t\t\t\tif ($tok == '[')\n\t\t\t\t{\n\t\t\t\t\t// Search the text for the next tok... if an ending quote comes first, then change tok to []\n\t\t\t\t\t$pos1 = strpos($in, '[/quote');\n\t\t\t\t\t$pos2 = strpos($in, ']');\n\n\t\t\t\t\tif ($pos1 !== false && ($pos2 === false || $pos1 < $pos2))\n\t\t\t\t\t{\n\t\t\t\t\t\t$tok = '[]';\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$tok = ']';\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$tok = '[]';\n\t\t\t\t}\n\t\t\t\t$buffer = '';\n\t\t\t}\n\t\t}\n\t\twhile ($in);\n\n\t\tif (sizeof($close_tags))\n\t\t{\n\t\t\t$out .= '[' . implode('][', $close_tags) . ']';\n\t\t}\n\n\t\tforeach ($error_ary as $error_msg)\n\t\t{\n\t\t\t$this->warn_msg[] = $error_msg;\n\t\t}\n\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "56b1ab8b48dc269e97953a156f2274d1", "score": "0.6344686", "text": "protected function _replaceText( $txt )\n\t{\n\t\t$_tags = $this->_retrieveTags();\n\n\t\tforeach( $_tags as $_tag )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Infinite loop catcher\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$_iteration\t= 0;\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Start building open tag\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$open_tag = '[' . $_tag . '=';\n\t\n\t\t\t//-----------------------------------------\n\t\t\t// Doz I can haz opin tag? Loopy loo\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\twhile( ( $this->cur_pos = stripos( $txt, $open_tag, $this->cur_pos ) ) !== false )\n\t\t\t{\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Stop infinite loops\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\tif( $_iteration > $this->settings['max_bbcodes_per_post'] )\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$_iteration++;\n\t\t\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Grab the new position to jump to\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$new_pos = strpos( $txt, ']', $this->cur_pos ) ? strpos( $txt, ']', $this->cur_pos ) : $this->cur_pos + 1;\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Extract the option (like surgery)\n\t\t\t\t//-----------------------------------------\n\t\n\t\t\t\t$_content\t= '';\n\t\t\t\t$_option\t= substr( $txt, $this->cur_pos + strlen($open_tag), (strpos( $txt, ']', $this->cur_pos ) - ($this->cur_pos + strlen($open_tag))) );\n\t\t\t\t$_length\t= strlen( $_option );\n\n\t\t\t\t/* @link http://community.invisionpower.com/tracker/issue-24470-bbcodemember-not-working-when-in-the-name/ */\n\t\t\t\t\n\t\t\t\tif( substr( $_option, 0, 1 ) == \"'\" OR substr( $_option, 0, 1 ) == '\"' )\n\t\t\t\t{\n\t\t\t\t\t$_option\t= substr( $_option, 1 );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif( substr( $_option, 0, 5 ) == \"&#39;\" )\n\t\t\t\t{\n\t\t\t\t\t$_option\t= substr( $_option, 5 );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif( substr( $_option, 0, 6 ) == \"&quot;\" )\n\t\t\t\t{\n\t\t\t\t\t$_option\t= substr( $_option, 6 );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif( substr( $_option, -1 ) == \"'\" OR substr( $_option, -1 ) == '\"' )\n\t\t\t\t{\n\t\t\t\t\t$_option\t= substr( $_option, 0, -1 );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif( substr( $_option, -5, 5 ) == \"&#39;\" )\n\t\t\t\t{\n\t\t\t\t\t$_option\t= substr( $_option, 0, -5 );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif( substr( $_option, -6, 6 ) == \"&quot;\" )\n\t\t\t\t{\n\t\t\t\t\t$_option\t= substr( $_option, 0, -6 );\n\t\t\t\t}\n\n\t\t\t\t$existing\t= $this->cache->getCache( '_tmp_bbcode_members', false );\n\t\t\t\t$existing\t= is_array($existing) ? $existing : array();\n\t\n\t\t\t\tif ( ! isset($existing[ $_option ]) )\n\t\t\t\t{\n\t\t\t\t\t$existing[ $_option ] = IPSMember::load( $_option, 'core', 'displayname' );\n\t\t\t\t\t$this->cache->updateCacheWithoutSaving( '_tmp_bbcode_members', $existing );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif( $existing[ $_option ]['members_display_name'] )\n\t\t\t\t{\n\t\t\t\t\t$_content = $this->_buildOutput( $existing[ $_option ] );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$_content = $_option;\n\t\t\t\t}\n\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// If this is a single tag, that's it\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\tif( $_content )\n\t\t\t\t{\n\t\t\t\t\t$txt\t= substr_replace( $txt, $_content, $this->cur_pos, (strlen($open_tag) + $_length + 1) );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$txt\t= substr_replace( $txt, '', $this->cur_pos, (strlen($open_tag) + $_length + 1) );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// And reset current position to end of open tag\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$this->cur_pos = stripos( $txt, $open_tag ) ? stripos( $txt, $open_tag ) : $this->cur_pos + 1; //$new_pos;\n\t\t\t\t\n\t\t\t\tif( $this->cur_pos > strlen($txt) )\n\t\t\t\t{\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Need to reset for next \"tag\"\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\n\t\t\t\t\t$this->cur_pos\t= 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $txt;\n\t}", "title": "" }, { "docid": "2c05fb12c1c57e4afa287a993ceff609", "score": "0.6306136", "text": "function preparsecode_unhtml_callback($matches)\n{\n\treturn '[html]' . strtr(htmlspecialchars($matches[1], ENT_QUOTES, 'UTF-8'), array('\\\\&quot;' => '&quot;', '&amp;#13;' => '<br />', '&amp;#32;' => ' ', '&amp;#91;' => '[', '&amp;#93;' => ']')) . '[/html]';\n}", "title": "" }, { "docid": "6a7d0b43f4fc5b5c346c9852689eb1ac", "score": "0.6296352", "text": "private function disableBBCodeTags($argText)\n { \n $search = array('[', ']');\n $replace = array('&#91;', '&#93;');\n return str_replace($search, $replace, $argText);\n }", "title": "" }, { "docid": "2047f8c80f2a3a23fb5502d02d7b6e3a", "score": "0.6283086", "text": "protected function _replaceText( $txt )\n\t{\n\t\t$_tags = $this->_retrieveTags();\n\n\t\tforeach( $_tags as $_tag )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Infinite loop catcher\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$_iteration\t= 0;\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Start building open tag\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$open_tag = '[' . $_tag . '=';\n\t\n\t\t\t//-----------------------------------------\n\t\t\t// Doz I can haz opin tag? Loopy loo\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\twhile( ( $this->cur_pos = stripos( $txt, $open_tag, $this->cur_pos ) ) !== false )\n\t\t\t{\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Stop infinite loops\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\tif( $_iteration > $this->settings['max_bbcodes_per_post'] )\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$_iteration++;\n\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Grab the new position to jump to\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$new_pos = strpos( $txt, ']', $this->cur_pos ) ? strpos( $txt, ']', $this->cur_pos ) : $this->cur_pos + 1;\n\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Extract the option (like surgery)\n\t\t\t\t//-----------------------------------------\n\t\n\t\t\t\t$_content\t= '';\n\t\t\t\t$_option\t= substr( $txt, $this->cur_pos + strlen($open_tag), (strpos( $txt, ']', $this->cur_pos ) - ($this->cur_pos + strlen($open_tag))) );\n\t\n\t\t\t\t$close_tag\t= '[/' . $_tag . ']';\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Protect against XSS\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$_option\t= IPSText::getTextClass('bbcode')->xssHtmlClean($_option);\n\t\t\t\t\n\t\t\t\t/* Make sure it's clean */\n\t\t\t\t$test = str_replace( array( '\"', \"'\", '&quot;', '&#39;' ), \"\", $_option );\n\t\t\t\t$test1 = IPSText::alphanumericalClean( $test, '.+ ' );\n\t\t\t\t\n\t\t\t\tif ( $test1 != $test )\n\t\t\t\t{\n\t\t\t\t\t$_option = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// No closing tag\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\tif ( $_option !== false AND stripos( $txt, $close_tag, $new_pos ) !== false )\n\t\t\t\t{\n\t\t\t\t\t$_content\t= substr( $txt, ($this->cur_pos + strlen($open_tag) + strlen($_option) + 1), (stripos( $txt, $close_tag, $this->cur_pos ) - ($this->cur_pos + strlen($open_tag) + strlen($_option) + 1)) );\n\t\t\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// If this is a single tag, that's it\n\t\t\t\t\t//-----------------------------------------\n\n\t\t\t\t\tif( preg_match( '/\\S/', $_content ) ) /* Make sure we don't miss this, if there's only a 0 for the content. Bug #21610 */\n\t\t\t\t\t{\n\t\t\t\t\t\t$txt\t\t= substr_replace( $txt, $this->_buildOutput( $_option, $_content ), $this->cur_pos, (stripos( $txt, $close_tag, $this->cur_pos ) + strlen($close_tag) - $this->cur_pos) );\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$txt\t\t= substr_replace( $txt, '', $this->cur_pos, (stripos( $txt, $close_tag, $this->cur_pos ) + strlen($close_tag) - $this->cur_pos) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// And reset current position to end of open tag\n\t\t\t\t//-----------------------------------------\n\n\t\t\t\t$this->cur_pos = stripos( $txt, $open_tag ) ? stripos( $txt, $open_tag ) : $this->cur_pos + 1; //$new_pos;\n\n\t\t\t\tif( $this->cur_pos > strlen($txt) )\n\t\t\t\t{\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Need to reset for next \"tag\"\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\n\t\t\t\t\t$this->cur_pos\t= 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $txt;\n\t}", "title": "" }, { "docid": "fed8cce20bd883bb47db9af6101a8d81", "score": "0.6270687", "text": "function parseBBCodes($value, $p_ID, $force_lower = 'default', $bb_strip = FALSE)\n\t{\n\t\tglobal $postID;\n\t\t$postID = $p_ID;\n\n\n\t\tif (strlen($value) <= 6) return $value; // Don't waste time on trivia!\n\t\tif ($force_lower == 'default') $force_lower = TRUE;\t// Set the default behaviour if not overridden\n\t\t$code_stack = array();\t\t\t\t// Stack for unprocessed bbcodes and text\n\t\t$unmatch_stack = array();\t\t\t\t// Stack for unmatched bbcodes\n\t\t$result = '';\t\t\t\t\t\t\t// Accumulates fully processed text\n\t\t$stacktext = '';\t\t\t\t\t\t// Accumulates text which might be subject to one or more bbcodes\n\t\t$nopro = FALSE;\t\t\t\t\t\t// Blocks processing within [code]...[/code] tags\n\n\t\t$strip_array = array();\n\t\tif (!is_bool($bb_strip))\n\t\t{\n\t\t\t$strip_array = explode(',',$bb_strip);\n\t\t}\n\t\t$pattern = '#^\\[(/?)([A-Za-z_]+)(\\d*)([=:]?)(.*?)]$#i';\t// Pattern to split up bbcodes\n\t\t// $matches[0] - same as the input text\n\t\t// $matches[1] - '/' for a closing tag. Otherwise empty string\n\t\t// $matches[2] - the bbcode word\n\t\t// $matches[3] - any digits immediately following the bbcode word\n\t\t// $matches[4] - '=' or ':' according to the separator used\n\t\t// $matches[5] - any parameter\n\n\t\t$content = preg_split('#(\\[(?:\\w|/\\w).*?\\])#mis', $value, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE );\n\n\t\tforeach ($content as $cont)\n\t\t{ // Each chunk is either a bbcode or a piece of text\n\t\t\t$is_proc = FALSE;\n\t\t\twhile (!$is_proc)\n\t\t\t{\n\t\t\t\t$oddtext = '';\n\t\t\t\tif ($cont[0] == '[')\n\t\t\t\t{ // We've got a bbcode - split it up and process it\n\t\t\t\t\t$match_count = preg_match($pattern,$cont,$matches);\n\t\t\t\t\t$bbparam = (isset($matches[5])) ? $matches[5] : '';\n\t\t\t\t\t$bbword = (isset($matches[2])) ? $matches[2] : '';\n\t\t\t\t\tif($cont[1] != '/')\n\t\t\t\t\t{ \n\t\t\t\t\t\t$bbstart = $cont;\n\t\t\t\t\t\t$bbsep = varset($matches[4]);\n\t\t\t\t\t}\n\t\t\t\t\tif ($force_lower) $bbword = strtolower($bbword);\n\t\t\t\t\tif ($nopro && ($bbword == 'code') && ($matches[1] == '/')) $nopro = FALSE;\t\t// End of code block\n\t\t\t\t\tif (($bbword) && ($bbword == trim($bbword)) && !$nopro)\n\t\t\t\t\t{ // Got a code to process here\n\t\t\t\t\t\tif (($bb_strip === TRUE) || in_array($bbword,$strip_array))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$is_proc = TRUE;\t\t// Just discard this bbcode\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\tif ($matches[1] == '/')\n\t\t\t\t\t\t\t{ // Closing code to process\n\t\t\t\t\t\t\t\t$found = FALSE;\n\t\t\t\t\t\t\t\t$i = 0;\n\t\t\t\t\t\t\t\twhile ($i < count($code_stack))\n\t\t\t\t\t\t\t\t{ // See if code is anywhere on the stack.\n\t\t\t\t\t\t\t\t\tif (($code_stack[$i]['type'] == 'bbcode') && ($code_stack[$i]['code'] == $bbword) && ($code_stack[0]['numbers'] == $matches[3]))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$found = TRUE;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($found)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$found = FALSE; // Use as 'done' variable now\n\t\t\t\t\t\t\t\t\t// Code is on stack - $i has index number. Process text, discard unmatched open codes, process 'our' code\n\t\t\t\t\t\t\t\t\twhile ($i > 0) { $unmatch_stack[] = array_shift($code_stack); $i--; } // Get required code to top of stack\n\n\t\t\t\t\t\t\t\t\t// Pull it off using array_shift - this keeps it as a zero-based array, newest first.\n\t\t\t\t\t\t\t\t\twhile (!$found && (count($code_stack) != 0))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tswitch ($code_stack[0]['type'])\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcase 'text' :\n\t\t\t\t\t\t\t\t\t\t\t\t$stacktext = $code_stack[0]['code'].$stacktext; // Need to insert text at front\n\t\t\t\t\t\t\t\t\t\t\t\tarray_shift($code_stack);\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\tcase 'bbcode' :\n\t\t\t\t\t\t\t\t\t\t\t\tif (($code_stack[0]['code'] == $bbword) && ($code_stack[0]['numbers'] == $matches[3]))\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$stacktext = $this->proc_bbcode($bbword,$code_stack[0]['param'],$stacktext,$bbparam, $bbsep, $bbstart.$stacktext.$cont);\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray_shift($code_stack);\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Intentionally don't terminate here - may be some text we can clean up\n\t\t\t\t\t\t\t\t\t\t\t\t\t$bbword=''; // Necessary to make sure we don't double process if several instances on stack\n\t\t\t\t\t\t\t\t\t\t\t\t\twhile (count($unmatch_stack) != 0) { array_unshift($code_stack,array_pop($unmatch_stack)); }\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\telse\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$found = TRUE; // Terminate on unmatched bbcode\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\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (count($code_stack) == 0)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$result .= $stacktext;\n\t\t\t\t\t\t\t\t\t\t\t$stacktext = '';\n\t\t\t\t\t\t\t\t\t\t\t$found = TRUE;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$is_proc = TRUE;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{ // Opening code to process\n\t\t\t\t\t\t\t\t// If its a single code, we can process it now. Otherwise just stack the value\n\t\t\t\t\t\t\t\tif (array_key_exists('_'.$bbword,$this->bbLocation))\n\t\t\t\t\t\t\t\t{ // Single code to process\n\t\t\t\t\t\t\t\t\tif (count($code_stack) == 0)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$result .= $this->proc_bbcode('_'.$bbword,$bbparam);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$stacktext .= $this->proc_bbcode('_'.$bbword,$bbparam);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$is_proc = TRUE;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telseif (array_key_exists($bbword,$this->bbLocation))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($stacktext != '')\n\t\t\t\t\t\t\t\t\t{ // Stack the text we've accumulated so far\n\t\t\t\t\t\t\t\t\t\tarray_unshift($code_stack,array('type' => 'text','code' => $stacktext));\n\t\t\t\t\t\t\t\t\t\t$stacktext = '';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tarray_unshift($code_stack,array('type' => 'bbcode','code' => $bbword, 'numbers'=> $matches[3], 'param'=>$bbparam));\n\t\t\t\t\t\t\t\t\tif ($bbword == 'code') $nopro = TRUE;\n\t\t\t\t\t\t\t\t\t$is_proc = TRUE;\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\t// Next lines could be deleted - but gives better rejection of 'stray' opening brackets\n\t\t\t\t\tif ((!$is_proc) && (($temp = strrpos($cont,\"[\")) !== 0))\n\t\t\t\t\t{\n\t\t\t\t\t\t$oddtext = substr($cont,0,$temp);\n\t\t\t\t\t\t$cont = substr($cont,$temp);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!$is_proc)\n\t\t\t\t{ // We've got some text between bbcodes (or possibly text in front of a bbcode)\n\t\t\t\t\tif ($oddtext == '') { $oddtext = $cont; $is_proc = TRUE; }\n\t\t\t\t\tif (count($code_stack) == 0)\n\t\t\t\t\t{ // Can just add text to answer\n\t\t\t\t\t\t$result .= $oddtext;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{ // Add to accumulator at this level\n\t\t\t\t\t\t$stacktext .= $oddtext;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Basically done - just tidy up now\n\t\t// If there's still anything on the stack, we need to process it\n\t\twhile (count($code_stack) != 0)\n\t\t{\n\t\t\tswitch ($code_stack[0]['type'])\n\t\t\t{\n\t\t\t\tcase 'text' :\n\t\t\t\t\t$stacktext = $code_stack[0]['code'].$stacktext; // Need to insert text at front\n\t\t\t\t\tarray_shift($code_stack);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'bbcode' :\n\t\t\t\t\t$stacktext = '['.$code_stack[0]['code'].']'.$stacktext; // To discard unmatched codes, delete this line\n\t\t\t\t\tarray_shift($code_stack); \t\t// Just discard any unmatched bbcodes\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t$result .= $stacktext;\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "517b6915566cf45792c36d837bbfc37d", "score": "0.6202141", "text": "protected function _replaceText( $txt )\n\t{\n\t\t$_tags = $this->_retrieveTags();\n\n\t\tforeach( $_tags as $_tag )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Infinite loop catcher\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$_iteration\t= 0;\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Start building open/close tag\n\t\t\t//-----------------------------------------\n\n\t\t\t$open_tag\t= '[' . $_tag;\n\t\t\t$close_tag\t= '[/' . $_tag . ']';\n\n\t\t\t//-----------------------------------------\n\t\t\t// Doz I can haz opin tag? Loopy loo\n\t\t\t//-----------------------------------------\n\n\t\t\twhile( ( $this->cur_pos = stripos( $txt, $open_tag, $this->cur_pos ) ) !== false )\n\t\t\t{\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Stop infinite loops\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\tif( $_iteration > $this->settings['max_bbcodes_per_post'] )\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$_iteration++;\n\t\t\t\t\t\t\n\t\t\t\t$open_length = strlen($open_tag);\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Extract the option (like surgery)\n\t\t\t\t//-----------------------------------------\n\n\t\t\t\t$_option\t= '';\n\t\t\t\t\n\t\t\t\tif( $this->_bbcode['bbcode_useoption'] )\n\t\t\t\t{\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Is option optional?\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t\tif( $this->_bbcode['bbcode_optional_option'] )\n\t\t\t\t\t{\n\t\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\t// Does we haz it?\n\t\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t\t\tif( substr( $txt, $this->cur_pos + strlen($open_tag), 1 ) == '=' )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$open_length\t+= 1;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\t\t// This is here to try to capture urls with\n\t\t\t\t\t\t\t// [ and ] in them, only works if enclosed in quotes\n\t\t\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$cur_content\t= '';\n\n\t\t\t\t\t\t\tif( substr( $txt, $this->cur_pos + $open_length, 6 ) == '&quot;' )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* Skip the bbocde if there is more than 2 quotes. Bug #21161 */\n\t\t\t\t\t\t\t\tif( strlen( substr( $txt, $this->cur_pos, stripos( $txt, ']', $this->cur_pos ) - $this->cur_pos ) ) < 1 OR ( substr_count( $txt, '&quot;', $this->cur_pos, strlen( substr( $txt, $this->cur_pos, stripos( $txt, ']', $this->cur_pos ) - $this->cur_pos ) ) ) ) > 2 )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->cur_pos = strpos( $txt, ']', $this->cur_pos ) ? strpos( $txt, ']', $this->cur_pos ) : $this->cur_pos + 1;\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$end_pos\t\t= stripos( $txt, '&quot;', $this->cur_pos + $open_length + 1 ) ? stripos( $txt, '&quot;', $this->cur_pos + $open_length + 1 ) : strpos( $txt, ']', $this->cur_pos + $open_length + 1 );\n\t\t\t\t\t\t\t\t$cur_content\t= substr( $txt, $this->cur_pos + $open_length + 6, ($end_pos - ($this->cur_pos + $open_length + 6 ) ) );\n\t\t\t\t\t\t\t\t$new_content\t= str_replace( '[', '%5B', str_replace( ']', '%5D', $cur_content ) );\n\t\t\t\t\t\t\t\t$txt\t\t\t= substr_replace( $txt, $new_content, $this->cur_pos + $open_length + 6, ($end_pos - ($this->cur_pos + $open_length + 6 ) ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if( substr( $txt, $this->cur_pos + $open_length, 5 ) == \"&#39;\" )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* Skip the bbocde if there is mroe than 2 quotes. Bug #21161 */\n\t\t\t\t\t\t\t\tif( strlen( substr( $txt, $this->cur_pos, stripos( $txt, ']', $this->cur_pos ) - $this->cur_pos ) ) < 1 OR ( substr_count( $txt, '&#39;', $this->cur_pos, strlen( substr( $txt, $this->cur_pos, stripos( $txt, ']', $this->cur_pos ) - $this->cur_pos ) ) ) ) > 2 )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->cur_pos = strpos( $txt, ']', $this->cur_pos ) ? strpos( $txt, ']', $this->cur_pos ) : $this->cur_pos + 1;\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$end_pos\t\t= stripos( $txt, '&#39;', $this->cur_pos + $open_length + 1 ) ? stripos( $txt, '&#39;', $this->cur_pos + $open_length + 1 ) : strpos( $txt, ']', $this->cur_pos + $open_length + 1 );\n\t\t\t\t\t\t\t\t$cur_content\t= substr( $txt, $this->cur_pos + $open_length + 5, ($end_pos - ($this->cur_pos + $open_length + 5 )) );\n\t\t\t\t\t\t\t\t$new_content\t= str_replace( '[', '%5B', str_replace( ']', '%5D', $cur_content ) );\n\t\t\t\t\t\t\t\t$txt\t\t\t= substr_replace( $txt, $new_content, $this->cur_pos + $open_length + 5, ($end_pos - ($this->cur_pos + $open_length + 5 ) ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\t\t// Need this because HTML on converts the\n\t\t\t\t\t\t\t// entities back to quote/apos\n\t\t\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\telse if( substr( $txt, $this->cur_pos + $open_length, 1 ) == '\"' )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* Skip the bbocde if there is mroe than 2 quotes. Bug #21161 */\n\t\t\t\t\t\t\t\tif( strlen( substr( $txt, $this->cur_pos, stripos( $txt, ']', $this->cur_pos ) - $this->cur_pos ) ) < 1 OR ( substr_count( $txt, '\"', $this->cur_pos, strlen( substr( $txt, $this->cur_pos, stripos( $txt, ']', $this->cur_pos ) - $this->cur_pos ) ) ) ) > 2 )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->cur_pos = strpos( $txt, ']', $this->cur_pos ) ? strpos( $txt, ']', $this->cur_pos ) : $this->cur_pos + 1;\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$end_pos\t\t= stripos( $txt, '\"', $this->cur_pos + $open_length + 1 ) ? stripos( $txt, '\"', $this->cur_pos + $open_length + 1 ) : strpos( $txt, ']', $this->cur_pos + $open_length + 1 );\n\t\t\t\t\t\t\t\t$cur_content\t= substr( $txt, $this->cur_pos + $open_length + 1, ($end_pos - ($this->cur_pos + $open_length + 1 ) ) );\n\t\t\t\t\t\t\t\t$new_content\t= str_replace( '[', '%5B', str_replace( ']', '%5D', $cur_content ) );\n\t\t\t\t\t\t\t\t$txt\t\t\t= substr_replace( $txt, $new_content, $this->cur_pos + $open_length + 1, ($end_pos - ($this->cur_pos + $open_length + 1 ) ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if( substr( $txt, $this->cur_pos + $open_length, 1 ) == \"'\" )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* Skip the bbocde if there is mroe than 2 quotes. Bug #21161 */\n\t\t\t\t\t\t\t\tif( strlen( substr( $txt, $this->cur_pos, stripos( $txt, ']', $this->cur_pos ) - $this->cur_pos ) ) < 1 OR ( substr_count( $txt, \"'\", $this->cur_pos, strlen( substr( $txt, $this->cur_pos, stripos( $txt, ']', $this->cur_pos ) - $this->cur_pos ) ) ) ) > 2 )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->cur_pos = strpos( $txt, ']', $this->cur_pos ) ? strpos( $txt, ']', $this->cur_pos ) : $this->cur_pos + 1;\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$end_pos\t\t= stripos( $txt, \"'\", $this->cur_pos + $open_length + 1 ) ? stripos( $txt, \"'\", $this->cur_pos + $open_length + 1 ) : strpos( $txt, ']', $this->cur_pos + $open_length + 1 );\n\t\t\t\t\t\t\t\t$cur_content\t= substr( $txt, $this->cur_pos + $open_length + 1, ($end_pos - ($this->cur_pos + $open_length + 1 )) );\n\t\t\t\t\t\t\t\t$new_content\t= str_replace( '[', '%5B', str_replace( ']', '%5D', $cur_content ) );\n\t\t\t\t\t\t\t\t$txt\t\t\t= substr_replace( $txt, $new_content, $this->cur_pos + $open_length + 1, ($end_pos - ($this->cur_pos + $open_length + 1 ) ) );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$_option\t\t= substr( $txt, $this->cur_pos + $open_length, (strpos( $txt, ']', $this->cur_pos ) - ($this->cur_pos + $open_length)) );\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\t// If not, [u] != [url] (for example)\n\t\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t\t\telse if( (strpos( $txt, ']', $this->cur_pos ) - ( $this->cur_pos + $open_length )) !== 0 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->cur_pos = strpos( $txt, ']', $this->cur_pos ) ? strpos( $txt, ']', $this->cur_pos ) : $this->cur_pos + 1;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// No? Then just grab it\n\t\t\t\t\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$open_length\t+= 1;\n\t\t\t\t\t\t$_option\t\t= substr( $txt, $this->cur_pos + $open_length, (strpos( $txt, ']', $this->cur_pos ) - ($this->cur_pos + $open_length)) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// [img] != [i] (for example)\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\telse if( (strpos( $txt, ']', $this->cur_pos ) - ( $this->cur_pos + $open_length )) !== 0 )\n\t\t\t\t{\n\t\t\t\t\t$this->cur_pos = strpos( $txt, ']', $this->cur_pos ) ? strpos( $txt, ']', $this->cur_pos ) : $this->cur_pos + 1;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Grab the new position to jump to\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$new_pos = strpos( $txt, ']', $this->cur_pos ) ? strpos( $txt, ']', $this->cur_pos ) : $this->cur_pos + 1;\n\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// No closing tag\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\tif( stripos( $txt, $close_tag, $new_pos ) === false )\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Grab the content\n\t\t\t\t//-----------------------------------------\n\n\t\t\t\t$_content\t= substr( $txt, ($this->cur_pos + $open_length + strlen($_option) + 1), ( ( stripos( $txt, $close_tag, $this->cur_pos + $open_length + strlen($_option) + 1 ) ) - ($this->cur_pos + $open_length + strlen($_option) + 1)) );\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// If this is a single tag, that's it\n\t\t\t\t// @link: http://forums.invisionpower.com/index.php?autocom=tracker&showissue=11909\n\t\t\t\t//-----------------------------------------\n\n\t\t\t\tif( $_content OR $_content === '0' )\n\t\t\t\t{\n\t\t\t\t\tif( $this->_buildOutput( $_content, $_option ? $_option : $_content ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$txt\t\t= substr_replace( $txt, $this->_buildOutput( $_content, $_option ? $_option : $_content ), $this->cur_pos, (stripos( $txt, $close_tag, $this->cur_pos ) + strlen($close_tag) - $this->cur_pos) );\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$txt\t\t= substr_replace( $txt, '', $this->cur_pos, (stripos( $txt, $close_tag, $this->cur_pos ) + strlen($close_tag) - $this->cur_pos) );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// And reset current position to end of open tag\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$this->cur_pos = stripos( $txt, $open_tag ) ? stripos( $txt, $open_tag ) : $this->cur_pos + 1; //$new_pos;\n\n\t\t\t\tif( $this->cur_pos > strlen($txt) )\n\t\t\t\t{\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Need to reset for next \"tag\"\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\n\t\t\t\t\t$this->cur_pos\t= 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $txt;\n\t}", "title": "" }, { "docid": "bc7c3a6052926977db3c6cd882c34f1d", "score": "0.61518073", "text": "function clear_bbcode($str)\n{\n return parse_bbcode($str, 1);\n}", "title": "" }, { "docid": "0f784b8d192b285219e65971c76d45e7", "score": "0.61313653", "text": "protected function _custom_tidy_string(){\n \t\t\n \t\t$inline_tags = array('a','span','b','i','u','strong','em','big','small',\n \t 'tt','var','code','xmp','cite','pre','abbr','acronym','address','q','samp',\n \t 'sub','sup'); \n \t \n\t \t$this->_str = stripslashes($this->_str);\n\n\t\t# \n\t\t#\tClean empty inline tags\n\t\t#\n\t\t$repl = 0;\n\t\tforeach($inline_tags as $tag){ \n \n $this->_str = preg_replace(\"/<($tag)[^>]*>[\\s]*([(&nbsp;)]*)[\\s]*<\\/($tag)>/i\",\"\\\\2\", $this->_str, -1, $count);\n $repl += $count;\n\n $this->_str = preg_replace(\"/<\\/($tag)[^>]*>[\\s]*([(&nbsp;)]*)[\\s]*<($tag)>/i\",\"\\\\2\", $this -> _str,-1,$count);\n $repl += $count;\n } \n\n\t \t//close dirty tags, ie the opened tag that isnt closed or the closed tag that isnt open\n\t \t$this->_closeRemoveDirtyTags();\n \t}", "title": "" }, { "docid": "5b992d2c701ea00b92979cb7ab1f1752", "score": "0.6121247", "text": "function strip_bbcode_quick($message) {\r\n\t\r\n\t//this is vBulletin way (we still use the fast and dirty one)\r\n\t//return strip_bbcode($message, true /* strip quote */, true /* fast & dirty */);\r\n\t\r\n\t//this is another way which can get more benefit (a little bit slower)\r\n\tglobal $vbulletin;\r\n\trequire_once(DIR . '/includes/class_bbcode_alt.php');\r\n\t$plaintext_parser = new vB_BbCodeParser_PlainText($vbulletin, fetch_tag_list());\r\n\t$plaintext_parser->set_parsing_language($vbulletin->userinfo['languageid']);\r\n\t$message = $plaintext_parser->parse($message, 'privatemessage');\r\n\t\r\n\treturn $message;\r\n}", "title": "" }, { "docid": "05ad3612c9cb85b109042584bc2cc7bc", "score": "0.612092", "text": "function bbDecode($string, $naam)\n{\n global $xpTable;\n\n $string = htmlEncode($string);\n\n $string = str_ireplace(\"[b]\", \"<b>\", $string);\n $string = str_ireplace(\"[/b]\", \"</b>\", $string);\n $string = str_ireplace(\"[i]\", \"<i>\", $string);\n $string = str_ireplace(\"[/i]\", \"</i>\", $string);\n $string = str_ireplace(\"[d]\", \"<s>\", $string);\n $string = str_ireplace(\"[/d]\", \"</s>\", $string);\n\n $string = str_ireplace(\"[htab]\", \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\", $string);\n $string = str_ireplace(\"[tab]\", \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\", $string);\n\n $string = str_ireplace(\"[6]\", \"<div class='profiel_6'>\", $string);\n $string = str_ireplace(\"[/6]\", \"</div>\", $string);\n $string = str_ireplace(\"[5]\", \"<div class='profiel_5'>\", $string);\n $string = str_ireplace(\"[/5]\", \"</div>\", $string);\n\n // Target calculator\n while (stripos($string, \"[doel\") !== false) {\n $array_tag = bbGetTag($string, \"doel\");\n $array_tag[\"parameter\"] = ucwords(strtolower($array_tag[\"parameter\"]));\n\n $xpTarget = $xpTable[$array_tag[\"content\"]];\n $lvlTarget = $array_tag[\"content\"];\n $stats = getStats($naam);\n\n $xpNow = $stats ? $stats[$array_tag[\"parameter\"]][\"exp\"] : 0;\n $lvlNow = $stats ? $stats[$array_tag[\"parameter\"]][\"level\"] : 0;\n\n if (!$lvlTarget) {\n $lvlTarget = \"Max\";\n }\n\n $xpToGo = $xpTarget - $xpNow;\n if ($xpToGo < 0) {\n $xpToGo = 0;\n }\n\n $xpPercent = 100 / $xpTarget * $xpNow;\n if ($xpPercent > 100) {\n $xpPercent = 100;\n }\n if ($xpPercent < 0) {\n $xpPercent = 0;\n }\n\n $addString = \"</div>\n\t\t<table class='profiel_table_doel' style='border-collapse:collapse'>\n\t\t\t<tr style='heigth:20px'>\n\t\t\t\t<td>\" . $array_tag[\"parameter\"] . \"</td>\n\t\t\t\t<td rowspan='2'>\" . number_format($xpPercent, 2, \",\", \".\") . \"%</td></tr>\n\t\t\t<tr style='heigth:20px'>\n\t\t\t\t<td class='bbcode_doel' style='border-left-width:1px; border-right-width:1px; padding-left:2px; padding-right:2px'>$lvlNow</td>\n\t\t\t\t<td class='bbcode_doel' style='width:\" . $xpPercent * 2 . \"px; background-color:green'></td>\n\t\t\t\t<td class='bbcode_doel' style='width:\" . (100 - $xpPercent) * 2 . \"px; background-color:red'></td>\n\t\t\t\t<td class='bbcode_doel' style='border-left-width:1px; padding-left:2px; padding-right:2px'>$lvlTarget</td>\n\t\t\t</tr>\n\t\t\t<tr style='heigth:20px'>\n\t\t\t\t<td colspan='5'>\" . number_format($xpToGo, 0, \",\", \".\") . \" XP left - \" . number_format($xpTarget, 0, \",\", \".\") . \" XP doel</td>\n\t\t\t</tr>\n\t\t</table><div class='profiel_p'>\";\n\n $string = substr_replace($string, $addString, $array_tag[\"position\"], $array_tag[\"length\"]);\n }\n\n // Hidden\n\n // URL\n while (stripos($string, \"[link\") !== false) {\n $array_tag = bbGetTag($string, \"link\");\n\n if (stripos($array_tag[\"parameter\"], \"/\") !== false) {\n $string = substr_replace($string, \"<a target='_blank' href='\" . $array_tag[\"parameter\"] . \"'>\" . $array_tag[\"content\"] . \"</a>\", $array_tag[\"position\"], $array_tag[\"length\"]);\n } else {\n $string = substr_replace($string, \"<a target='_blank' href='/toxic/account/leden/bestanden/\" . str_replace(\" \", \"_\", $naam) . \"/\" . $array_tag[\"parameter\"] . \"'>\" . $array_tag[\"content\"] . \"</a>\", $array_tag[\"position\"], $array_tag[\"length\"]);\n }\n }\n\n // Image\n while (stripos($string, \"[afbeelding\") !== false) {\n $array_tag = bbGetTag($string, \"afbeelding\");\n\n if (stripos($array_tag[\"content\"], \"/\") !== false) {\n $string = substr_replace($string, \"<img src='\" . $array_tag[\"content\"] . \"' />\", $array_tag[\"position\"], $array_tag[\"length\"]);\n } else {\n $string = substr_replace($string, \"<img src='bestanden/\" . str_replace(\" \", \"_\", $naam) . \"/\" . $array_tag[\"content\"] . \"' />\", $array_tag[\"position\"], $array_tag[\"length\"]);\n }\n }\n\n // Verwijder empty tags\n $string = str_ireplace(\"<div class='profiel_h1'></div>\", \"\", $string);\n $string = str_ireplace(\"<div class='profiel_h2'></div>\", \"\", $string);\n $string = str_ireplace(\"<div class='profiel_p'></div>\", \"\", $string);\n\n // Misc\n $string = str_ireplace(\"</div><div class='profiel_p'>\", \"\", $string);\n\n return $string;\n}", "title": "" }, { "docid": "ad1d9d2e4e78af72f1f25dabc88afc31", "score": "0.61141616", "text": "function noBBCode($text) {\n // ----------------------------------------\n // $text = <string>\n // ----------------------------------------\n // RETURNS: <string> pure text without BBCode tags\n // ----------------------------------------\n $bbcode = [\n \"/\\[br\\]/i\" => \" \", // line break\n \"/\\[url=(.*?)](.*?)\\[\\/url\\]/i\" => \"$2\", // external links\n \"/\\[email=(.*?)\\](.*?)\\[\\/email\\]/i\" => \"$2\", // mailto\n \"/\\[tel=(.*?)\\](.*?)\\[\\/tel\\]/i\" => \"$2\", // tel\n \"/\\[color=(.*?)\\](.*?)\\[\\/color\\]/i\" => \"$2\", // color\n \"/\\[size=(.*?)\\](.*?)\\[\\/size\\]/i\" => \"$2\", // size\n \"/\\[center\\](.*?)\\[\\/center\\]/i\" => \"$1\", // center\n \"/\\[list\\](.*?)\\[\\/list\\]/i\" => \"$1\", // list\n \"/\\[\\*\\]/i\" => \"*\", // bullet character\n \"/\\[(...?)\\]/i\" => \"\", // index tag open\n \"/\\[\\/(...?)\\]/i\" => \"\", // index tag close\n \"/\\[(.?)\\]/i\" => \"\", // simple tag open\n \"/\\[\\/(.?)\\]/i\" => \"\", // simple tag close\n \"/ /i\" => \" \", // double spaces\n ];\n foreach($bbcode as $find => $replace){ $text = preg_replace($find, $replace, $text); };\n return $text;\n }", "title": "" }, { "docid": "217de1f0f0de80172959f911bcad28e0", "score": "0.6093338", "text": "function p2mixi_sanitize_html ( $text ) {\n\t$ret = $text;\n\t$ret = preg_replace(\n\t\tarray(\n\t\t// Remove invisible content\n\t\t\t'@<head[^>]*?>.*?</head>@siu',\n\t\t\t'@<style[^>]*?>.*?</style>@siu',\n\t\t\t'@<script[^>]*?.*?</script>@siu',\n\t\t\t'@<object[^>]*?.*?</object>@siu',\n\t\t\t'@<embed[^>]*?.*?</embed>@siu',\n\t\t\t'@<applet[^>]*?.*?</applet>@siu',\n\t\t\t'@<noframes[^>]*?.*?</noframes>@siu',\n\t\t\t'@<noscript[^>]*?.*?</noscript>@siu',\n\t\t\t'@<noembed[^>]*?.*?</noembed>@siu',\n\t\t// Add line breaks before and after blocks\n\t\t\t'@</?((address)|(blockquote)|(center)|(del))@iu',\n\t\t\t'@</?((div)|(h[1-9])|(ins)|(isindex)|(p)|(pre))@iu',\n\t\t\t'@</?((dir)|(dl)|(dt)|(dd)|(li)|(menu)|(ol)|(ul))@iu',\n\t\t\t'@</?((table)|(th)|(td)|(caption))@iu',\n\t\t\t'@</?((form)|(button)|(fieldset)|(legend)|(input))@iu',\n\t\t\t'@</?((label)|(select)|(optgroup)|(option)|(textarea))@iu',\n\t\t\t'@</?((frameset)|(frame)|(iframe))@iu',\n\t\t// convert br to line break\n\t\t\t'@<br */?>@i',\n\t\t),\n\t\tarray(\n\t\t\t' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',\n\t\t\t\"\\n\\$0\", \"\\n\\$0\", \"\\n\\$0\", \"\\n\\$0\", \"\\n\\$0\", \"\\n\\$0\",\n\t\t\t\"\\n\\$0\",\n\t\t\t\"\\n\",\n\t\t),\n\t\t$ret );\n\t$ret = strip_tags( $ret );\n\t// &nbsp; -> &amp;nbsp; etc.\n\t$ret = htmlspecialchars( $ret, ENT_QUOTES, \"utf-8\" );\n\treturn $ret;\n}", "title": "" }, { "docid": "b6e73f6aafd986f2b750a0dc7549b3a1", "score": "0.6093022", "text": "function quickbb(){\n\techo \"<center><table border=0 cellpadding=0 cellspacing=2><tr>\";\n\techo \"<tr>\";\n\techo \"<td width=22><a href=\\\"javascript:Smilies('[b] [/b]')\\\"><img src=/images/bbcode/bbcode_bold.gif border=0 alt='Bold'></a></td>\";\n\techo \"<td width=22><a href=\\\"javascript:Smilies('[i] [/i]')\\\"><img src=/images/bbcode/bbcode_italic.gif border=0 alt='Italic'></a></td>\";\n\techo \"<td width=22><a href=\\\"javascript:Smilies('[u] [/u]')\\\"><img src=/images/bbcode/bbcode_underline.gif border=0 alt='Underline'></a></td></tr>\";\n\techo \"<tr><td width=22><a href=\\\"javascript:Smilies('[center] [/center]')\\\"><img src=/images/bbcode/bbcode_center.gif border=0 alt='Center'></a></td>\";\n\techo \"<td width=22><a href=\\\"javascript:Smilies('[url] [/url]')\\\"><img src=/images/bbcode/bbcode_url.gif border=0 alt='Url'></a></td>\";\n\techo \"<td width=22><a href=\\\"javascript:Smilies('[img] [/img]')\\\"><img src=/images/bbcode/bbcode_image.gif border=0 alt='Img'></a></td>\";\n\techo \"</tr></table>\";\n}", "title": "" }, { "docid": "31257028f395512c7aa7794dd729ce7c", "score": "0.606787", "text": "function parse_bb_code($bbtext) {\n require_once(CLASS_PATH.'class.bbcodeparser.php');\n \n $parser = new bbcodeparser();\n $htmltext = $parser->parse($bbtext);\n\n unset($parser);\n return $htmltext;\n }", "title": "" }, { "docid": "528b72c8e32064ce228052e6912e6569", "score": "0.6049132", "text": "function TextileThis($str) {\n\t # in case we call ourselves at some point:\n\t $save_repl = $this->repl;\n\t $save_links = $this->links;\n\n\t\t# quick translator for abbreviated block names\n\t\t# to their tag\n\t\t$macros = array('bq' => 'blockquote');\n\t\t\n\t\t# an array to hold any portions of the text to be preserved\n\t\t# without further processing by Textile\n\t $this->repl = array();\n\t\n\t\t# strip out extra newline characters. we're only matching for \\n herein\n\t\t#$str = preg_replace('!(?:\\015?\\012|\\015)!',\"\\n\", $str);\n\t\n\t\t# optionally remove trailing spaces\n\t\tif ($this->trim_spaces)\n\t\t\t$str = preg_replace(\"/ +$/m\", '', $str);\n\t\n\t\t# preserve contents of the '==', 'pre', 'blockcode' sections\n\t\t$str = preg_replace_callback(\"/(^|\\n\\n)==(.+?)==($|\\n\\n)/s\",\n\t\t\t\t array(&$this, '_replace_block'), $str);\n\t\n\t\tif (!$this->disable_html) {\n\t\t\t# preserve style, script tag contents\n\t\t\t$str = preg_replace_callback('/(<(style|script)(?:>| .+?'.'>).*?<\\/\\2>)/s',array(&$this, '_replace_simple'), $str);\n\t\n\t\t\t# preserve HTML comments\n\t\t\t$str = preg_replace_callback('/(<!--.+?-->)/s',array(&$this, '_replace_simple'),$str);\n\t\n\t\t\t# preserve pre block contents, encode contents by default\n\t\t\t$pre_start = count($this->repl);\n\t\t\t$str = preg_replace_callback('/(<pre(?: [^>]*)?'.'>)(.+?)(<\\/pre>)/s',\n\t\t\t\t\t array(&$this, '_replace_pre'), $str);\n\t\t\t# fix code tags within pre blocks we just saved.\n\t\t\tfor ($i = $pre_start; $i < count($this->repl); $i++) {\n\t\t\t\t$this->repl[$i] = preg_replace('/&lt;(\\/?)code(.*?)&gt;/s','<\\\\1code\\\\2>', $this->repl[$i]);\n\t\t\t}\n\t\n\t\t\t# preserve code blocks by default, encode contents\n\t\t\t$str = preg_replace_callback('/(<code(?: [^>]+)?'.'>)(.+?)(<\\/code>)/s',\n\t\t\t\t\t array(&$this, '_replace_pre'), $str);\n\t\n\t\t\t# encode blockcode tag (an XHTML 2 tag) and encode it's\n\t\t\t# content by default\n\t\t\t$str = preg_replace_callback('/(<blockcode(?: [^>]+)?'.'>)(.+?)(<\\/blockcode>)/s',\n\t\t\t\t\t array(&$this, '_replace_pre'), $str);\n\n\t\t\t# preserve span tag contents\n\t\t\tif ($this->css['class_caps']) {\n\t\t\t\t$str = preg_replace_callback('/(<span class=\"'.$this->css['class_caps'].'\">)(.+?)(<\\/span>)/s',\n\t\t\t\t\t array(&$this, '_replace_pre_oneline'), $str);\n\t\t\t}\n\t\n\t\t\t# preserve PHPish, ASPish code\n\t\t\t$str = preg_replace_callback('/(<([\\?\\%]).*?(\\2)>)/s',array(&$this, '_replace_simple'), $str);\n\t\t}\n\t\n\t\t# pass through and remove links that follow this format\n\t\t# [id_without_spaces (optional title text)]url\n\t\t# lines like this are stripped from the content, and can be\n\t\t# referred to using the \"link text\":id_without_spaces syntax\n\t\t$this->links = array();\n\t\t$str = preg_replace_callback('/(?:\\n|^) [ ]* \\[ ([^ ]+?) [ ]*? (?:\\( (.+?) \\) )? \\] ((?:(?:ftp|https?|telnet|nntp):\\/\\/|\\/)[^ ]+?) [ ]* (\\n|$)/mx',\n\t\t\t\t array(&$this, '_save_link'), $str);\n\t\n\t\t# eliminate starting/ending blank lines\n\t\t$str = preg_replace('/^\\n+/s', '', $str);\n\t\t$str = preg_replace('/\\n+$/s', '', $str);\n\t\n\t\t# split up text into paragraph blocks, capturing newlines too\n\t\t$paras = preg_split('/(\\n{2,})/', $str, -1, PREG_SPLIT_DELIM_CAPTURE);\n\t\t//my ($block, $bqlang, $filter, $class, $sticky, @lines,\n\t\t//\t$style, $stickybuff, $lang, $clear);\n\t\n\t\t$out = '';\n\t\n\t\tforeach ($paras as $para) {\n\t\t\tif (preg_match('/^\\n+$/s', $para)) {\n\t\t\t\tif ($sticky && isset($stickybuff)) {\n\t\t\t\t\t$stickybuff .= $para;\n\t\t\t\t} else {\n\t\t\t\t\t$out .= $para;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif ($sticky) {\n\t\t\t\t$sticky++;\n\t\t\t} else {\n\t\t\t\tunset ($block, $class, $lang);\n\t\t\t\t$style = '';\n\t\t\t}\n\t\n\t\t\tunset ($id, $cite, $align, $padleft, $padright, $lines, $buffer);\n\t\t\t$sigre = '/^(h[1-6]|p|bq|bc|fn\\d+)\n\t\t\t\t\t\t ((?:'.$this->clstyfiltre.'*|'.$this->halignre.')*)\n\t\t\t\t\t\t (\\.\\.?)\n\t\t\t\t\t\t (?: : (\\d+|'.$this->urlre.'))?\\ /x';\n\t\t\t$xxre = '/^\n\t\t\t\t\t\t(?:'.$this->halignre.'|'.$this->clstypadre.'*)*\n\t\t\t\t\t\t[\\*\\#]\n\t\t\t\t\t\t(?:'.$this->halignre.'|'.$this->clstypadre.'*)*\n\t\t\t\t\t\\ /x';\n\t\t\tif (preg_match($sigre, $para, $matches)) {\n\t\t\t\t$para = substr($para, strlen($matches[0]));\n\t\t\t\tif ($sticky) {\n\t\t\t\t\tif ($block == 'bc') {\n\t\t\t\t\t\t# close our blockcode section\n\t\t\t\t\t\t$out = preg_replace('/\\n\\n$/s','',$out);\n\t\t\t\t\t\t$out .= $this->_blockcode_close.\"\\n\\n\";\n\t\t\t\t\t} elseif ($block == 'bq') {\n\t\t\t\t\t\t$out = preg_replace('/\\n\\n$/', '', $out);\n\t\t\t\t\t\t$out .= '</blockquote>'.\"\\n\\n\";\n\t\t\t\t\t} elseif ($block == 'table') {\n\t\t\t\t\t\t$table_out = $this->format_table(array('text' => $stickybuff));\n\t\t\t\t\t\tif (!isset($table_out))\n\t\t\t\t\t\t\t$table_out = '';\n\t\t\t\t\t\t$out .= $table_out;\n\t\t\t\t\t\tunset($stickybuff);\n\t\t\t\t\t} elseif ($block == 'dl') {\n\t\t\t\t\t\t$dl_out = $this->format_deflist(array('text' => $stickybuff));\n\t\t\t\t\t\tif (!isset($dl_out))\n\t\t\t\t\t\t\t$dl_out = '';\n\t\t\t\t\t\t$out .= $dl_out;\n\t\t\t\t\t\tunset($stickybuff);\n\t\t\t\t\t}\n\t\t\t\t\t$sticky = 0;\n\t\t\t\t}\n\t\t\t\t# block macros: h[1-6](class)., bq(class)., bc(class)., p(class).\n\t\t\t\t# echo \"paragraph: [[$para]]\\n\\tblock: $1\\n\\tparams: $2\\n\\tcite: $4\";\n\t\t\t\t$block = $matches[1];\n\t\t\t\t$params = $matches[2];\n\t\t\t\t$cite = $matches[4];\n\t\t\t\tif ($matches[3] == '..') {\n\t\t\t\t\t$sticky = 1;\n\t\t\t\t} else {\n\t\t\t\t\t$sticky = 0;\n\t\t\t\t\tunset ($class, $bqlang, $lang, $filter);\n\t\t\t\t\t$style = '';\n\t\t\t\t}\n\t\t\t\tif (preg_match('/^h([1-6])$/', $block, $matches)) {\n\t\t\t\t\tif ($this->head_offset > 0) {\n\t\t\t\t\t\t$block = 'h' . ($matches[1] + $this->head_offset);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (preg_match('/('.$this->halignre.'+)/', $params, $matches)) {\n\t\t\t\t\t$align = $matches[1];\n\t\t\t\t\t$params = preg_replace('/'.$this->halignre.'+/x','',$params, 1);\n\t\t\t\t}\n\t\t\t\tif (isset($params)) {\n\t\t\t\t\tif (preg_match('/\\|(.+)\\|/', $params, $matches)) {\n\t\t\t\t\t\t$filter = $matches[1];\n\t\t\t\t\t\t$params = preg_replace('/\\|.+?\\|/','',$params, 1);\n\t\t\t\t\t}\n\t\t\t\t\tif (preg_match('/{([^}]+)}/', $params, $matches)) {\n\t\t\t\t\t\t$style = $matches[1];\n\t\t\t\t\t\t$style = preg_replace('/\\n/', ' ', $style);\n\t\t\t\t\t\t$params = preg_replace('/{[^}]+}/', '', $params);\n\t\t\t\t\t}\n\t\t\t\t\tif (preg_match('/\\(([A-Za-z0-9_\\-\\ ]+?)(?:\\#(.+?))?\\)/', $params, $matches) or\n\t\t\t\t\t\tpreg_match('/\\(([A-Za-z0-9_\\-\\ ]+?)?(?:\\#(.+?))\\)/',$params, $matches)) {\n\t\t\t\t\t\tif ($matches[1] or $matches[2]) {\n\t\t\t\t\t\t\t$class = $matches[1];\n\t\t\t\t\t\t\t$id = $matches[2];\n\t\t\t\t\t\t\tif ($class) {\n\t\t\t\t\t\t\t\t$params = preg_replace('/\\([A-Za-z0-9_\\-\\ ]+?(#.*?)?\\)/', '', $params);\n\t\t\t\t\t\t\t} elseif ($id) {\n\t\t\t\t\t\t\t\t$params = preg_replace('/\\(#.+?\\)/', '', $params);\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\tif (preg_match('/(\\(+)/', $params, $matches)) {\n\t\t\t\t\t\t$padleft = strlen($matches[1]);\n\t\t\t\t\t\t$params = preg_replace('/\\(+/', '', $params, 1);\n\t\t\t\t\t}\n\t\t\t\t\tif (preg_match('/(\\)+)/', $params, $matches)) {\n\t\t\t\t\t\t$padright = strlen($matches[1]);\n\t\t\t\t\t\t$params = preg_replace('/\\)+/', '', $params, 1);\n\t\t\t\t\t}\n\t\t\t\t\tif (preg_match('/\\[(.+?)\\]/', $params, $matches)) {\n\t\t\t\t\t\t$lang = $matches[1];\n\t\t\t\t\t\tif ($block == 'bc') {\n\t\t\t\t\t\t\t$bqlang = $lang;\n\t\t\t\t\t\t\tunset($lang);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$params = preg_replace('/\\[.+?\\]/', '', $params, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t#warn \"settings:\\n\\tblock: $block\\n\\tpadleft: $padleft\\n\\tpadright: $padright\\n\\tclass: $class\\n\\tstyle: $style\\n\\tid: $id\\n\\tfilter: $filter\\n\\talign: $align\\n\\tlang: $lang\\n\\tsticky: $sticky\";\n\t\t\t} elseif (preg_match('/^<textile#(\\d+)>$/', $para, $matches)) {\n\t\t\t\t$buffer = $this->repl[$matches[1]-1];\n\t\t\t} elseif (preg_match('/^clear([<>]+)?\\.$/', $para, $matches)) {\n\t\t\t\tif ($matches[1] == '<') {\n\t\t\t\t\t$clear = 'left';\n\t\t\t\t} elseif ($matches[1] == '>') {\n\t\t\t\t\t$clear = 'right';\n\t\t\t\t} else {\n\t\t\t\t\t$clear = 'both';\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t} elseif ($sticky && (isset($stickybuff)) &&\n\t\t\t\t\t (($block == 'table') or ($block == 'dl'))) {\n\t\t\t\t$stickybuff .= $para;\n\t\t\t\tcontinue;\n\t\t\t} elseif (preg_match($xxre, $para)) {\n\t\t\t\t# '*', '#' prefix means a list\n\t\t\t\t$buffer = $this->format_list(array('text' => $para));\n\t\t\t} elseif (preg_match('/^(?:table(?:'.$this->tblalignre.'|'.$this->clstypadre.'*)*\n\t\t\t\t\t\t\t\t (\\.\\.?)\\s+)?\n\t\t\t\t\t\t\t\t (?:_|'.$this->alignre.'|'.$this->clstypadre.'*)*\\|/sx', $para, $matches)) {\n\t\t\t\t# handle wiki-style tables\n\t\t\t\tif (isset($matches[1]) && ($matches[1] == '..')) {\n\t\t\t\t\t$block = 'table';\n\t\t\t\t\t$stickybuff = $para;\n\t\t\t\t\t$sticky = 1;\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\t$buffer = $this->format_table(array('text' => $para));\n\t\t\t\t}\n\t\t\t} elseif (preg_match('/^(?:dl(?:'.$this->clstyre.')*(\\.\\.?)\\s+)/x', $para, $matches)) {\n\t\t\t\t# handle definition lists\n\t\t\t\tif (isset($matches[1]) && ($matches[1] == '..')) {\n\t\t\t\t\t$block = 'dl';\n\t\t\t\t\t$stickybuff = $para;\n\t\t\t\t\t$sticky = 1;\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\t$buffer = $this->format_deflist(array('text' => $para));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset($buffer)) {\n\t\t\t\t$out .= $buffer;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$lines = preg_split('/\\n/', $para);\n\t\t\tif (!count($lines))\n\t\t\t\tcontinue;\n\t\n\t\t\t$block or $block = 'p';\n\n\t\t\t$buffer = '';\n\t\t\t$pre = '';\n\t\t\t$post = '';\n\t\n\t\t\tif ($block == 'bc') {\n\t\t\t\tif ($sticky <= 1) {\n\t\t\t\t\t$pre .= $this->_blockcode_open;\n\t\t\t\t\t$pre = preg_replace('/>$/', '', $pre, 1);\n\t\t\t\t\tif ($bqlang)\n\t\t\t\t\t\t$pre .= \" language=\\\"$bqlang\\\"\";\n\t\t\t\t\tif ($align) {\n\t\t\t\t\t\t$alignment = _halign($align);\n\t\t\t\t\t\tif ($this->css_mode) {\n\t\t\t\t\t\t\tif (($padleft or $padright) &&\n\t\t\t\t\t\t\t\t(($alignment == 'left') || ($alignment == 'right'))) {\n\t\t\t\t\t\t\t\t$style .= ';float:'.$alignment;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$style .= ';text-align:'.$alignment;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$class .= ' '.$this->css[\"class_align_$alignment\"] or $alignment;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ($alignment)\n\t\t\t\t\t\t\t\t$pre .= \" align=\\\"$alignment\\\"\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ($padleft)\n\t\t\t\t\t\t$style .= \";padding-left:$padleft\".'em';\n\t\t\t\t\tif ($padright)\n\t\t\t\t\t\t$style .= \";padding-right:$padright\".'em';\n\t\t\t\t\tif ($clear)\n\t\t\t\t\t\t$style .= \";clear:$clear\";\n\t\t\t\t\tif ($class) {\n\t\t\t\t\t\t$class = preg_replace('/^ /', '', $class, 1);\n\t\t\t\t\t\t$pre .= \" class=\\\"$class\\\"\";\n\t\t\t\t\t}\n\t\t\t\t\tif ($id)\n\t\t\t\t\t\t$pre .= \" id=\\\"$id\\\"\";\n\t\t\t\t\tif ($style) {\n\t\t\t\t\t\t$style = preg_replace('/^;/', '', $style, 1);\n\t\t\t\t\t\t$pre .= \" style=\\\"$style\\\"\";\n\t\t\t\t\t}\n\t\t\t\t\tif ($lang)\n\t\t\t\t\t\t$pre .= \" lang=\\\"$lang\\\"\";\n\t\t\t\t\t$pre .= '>';\n\t\t\t\t\tunset ($lang, $bqlang, $clear);\n\t\t\t\t}\n\t\t\t\t$para = preg_replace_callback(\"/(?:^|(?<=[\\s>])|([{[]))\n\t\t\t\t\t\t ==(.+?)==\n\t\t\t\t\t\t (?:$|([\\]}])|(?=[[:punct:]]{1,2}|\\s))/sx\",\n\t\t\t\t\t\t array(&$this, '_replace_inline_block'), $para);\n\t\t\t\t$buffer .= $this->encode_html_basic($para, 1);\n\t\t\t\t$buffer = preg_replace('/&lt;textile#(\\d+)&gt;/', '<textile#\\\\1>/', $buffer);\n\t\t\t\tif ($sticky == 0)\n\t\t\t\t\t$post .= $this->_blockcode_close;\n\t\t\t\t$out .= $pre . $buffer . $post;\n\t\t\t\tcontinue;\n\t\t\t} elseif ($block == 'bq') {\n\t\t\t\tif ($sticky <= 1) {\n\t\t\t\t\t$pre .= '<blockquote';\n\t\t\t\t\tif ($align) {\n\t\t\t\t\t\t$alignment = _halign($align);\n\t\t\t\t\t\tif ($this->css_mode) {\n\t\t\t\t\t\t\tif (($padleft or $padright) &&\n\t\t\t\t\t\t\t\t(($alignment == 'left') || ($alignment == 'right'))) {\n\t\t\t\t\t\t\t\t$style .= ';float:'.$alignment;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$style .= ';text-align:'.$alignment;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$class .= ' '.$this->css[\"class_align_$alignment\"] or $alignment;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ($alignment)\n\t\t\t\t\t\t\t\t$pre .= \" align=\\\"$alignment\\\"\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ($padleft)\n\t\t\t\t\t\t$style .= \";padding-left:$padleft\".'em';\n\t\t\t\t\tif ($padright)\n\t\t\t\t\t\t$style .= \";padding-right:$padright\".'em';\n\t\t\t\t\tif ($clear)\n\t\t\t\t\t\t$style .= \";clear:$clear\";\n\t\t\t\t\tif ($class) {\n\t\t\t\t\t\t$class = preg_replace('/^ /', '', $class);\n\t\t\t\t\t\t$pre .= \" class=\\\"$class\\\"\";\n\t\t\t\t\t}\n\t\t\t\t\tif ($id)\n\t\t\t\t\t\t$pre .= \" id=\\\"$id\\\"\";\n\t\t\t\t\tif ($style) {\n\t\t\t\t\t\t$style = preg_replace('/^;/','',$style);\n\t\t\t\t\t\t$pre .= \" style=\\\"$style\\\"\";\n\t\t\t\t\t}\n\t\t\t\t\tif ($lang)\n\t\t\t\t\t\t$pre .= \" lang=\\\"$lang\\\"\";\n\t\t\t\t\tif (isset($cite))\n\t\t\t\t\t\t$pre .= ' cite=\"' . $this->format_url(array('url' => $cite)) . '\"';\n\t\t\t\t\t$pre .= '>';\n\t\t\t\t\tunset($clear);\n\t\t\t\t}\n\t\t\t\t$pre .= '<p>';\n\t\t\t} elseif (preg_match('/fn(\\d+)/', $block, $matches)) {\n\t\t\t\t$fnum = $matches[1];\n\t\t\t\t$pre .= '<p';\n\t\t\t\tif (array_key_exists('class_footnote', $this->css))\n\t\t\t\t\t$class .= ' '.$this->css['class_footnote'];\n\t\t\t\tif ($align) {\n\t\t\t\t\t$alignment = _halign($align);\n\t\t\t\t\tif ($this->css_mode) {\n\t\t\t\t\t\tif (($padleft or $padright) &&\n\t\t\t\t\t\t\t(($alignment == 'left') || ($alignment == 'right'))) {\n\t\t\t\t\t\t\t$style .= ';float:'.$alignment;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$style .= ';text-align:'.$alignment;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$class .= ($this->css[\"class_align_$alignment\"] or $alignment);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$pre .= \" align=\\\"$alignment\\\"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($padleft)\n\t\t\t\t\t$style .= \";padding-left:$padleft\".'em';\n\t\t\t\tif ($padright)\n\t\t\t\t\t$style .= \";padding-right:$padright\".'em';\n\t\t\t\tif ($clear)\n\t\t\t\t\t$style .= \";clear:$clear\";\n\t\t\t\tif ($class) {\n\t\t\t\t\t$class = preg_replace('/^ /', '', $class);\n\t\t\t\t\t$pre .= \" class=\\\"$class\\\"\";\n\t\t\t\t}\n\t\t\t\t$pre .= ' id=\"'.($this->css['id_footnote_prefix'] ? $this->css['id_footnote_prefix'] : 'fn').$fnum.'\"';\n\t\t\t\tif ($style) {\n\t\t\t\t\t$style = preg_replace('/^;/', '', $style);\n\t\t\t\t\t$pre .= \" style=\\\"$style\\\"\";\n\t\t\t\t}\n\t\t\t\tif ($lang)\n\t\t\t\t\t$pre .= \" lang=\\\"$lang\\\"\";\n\t\t\t\t$pre .= '>';\n\t\t\t\t$pre .= '<sup>'.$fnum.'</sup> ';\n\t\t\t\t# we can close like a regular paragraph tag now\n\t\t\t\t$block = 'p';\n\t\t\t\tunset($clear);\n\t\t\t} else {\n\t\t\t\t$pre .= '<' . ($macros[$block] ? $macros[$block] : $block);\n\t\t\t\tif ($align) {\n\t\t\t\t\t$alignment = _halign($align);\n\t\t\t\t\tif ($this->css_mode) {\n\t\t\t\t\t\tif (($padleft or $padright) &&\n\t\t\t\t\t\t\t(($alignment == 'left') or ($alignment == 'right'))) {\n\t\t\t\t\t\t\t$style .= ';float:'.$alignment;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$style .= ';text-align:'.$alignment;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$class .= ' '.$this->css[\"class_align_$alignment\"] or $alignment;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$pre .= \" align=\\\"$alignment\\\"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($padleft)\n\t\t\t\t\t$style .= \";padding-left:$padleft\".'em';\n\t\t\t\tif ($padright)\n\t\t\t\t\t$style .= \";padding-right:$padright\".'em';\n\t\t\t\tif ($clear)\n\t\t\t\t\t$style .= \";clear:$clear\";\n\t\t\t\tif ($class) {\n\t\t\t\t\t$class = preg_replace('/^ /', '', $class);\n\t\t\t\t\t$pre .= \" class=\\\"$class\\\"\";\n\t\t\t\t}\n\t\t\t\tif ($id)\n\t\t\t\t\t$pre .= \" id=\\\"$id\\\"\";\n\t\t\t\tif ($style) {\n\t\t\t\t\t$style = preg_replace('/^;/', '', $style);\n\t\t\t\t\t$pre .= \" style=\\\"$style\\\"\";\n\t\t\t\t}\n\t\t\t\tif ($lang)\n\t\t\t\t\t$pre .= \" lang=\\\"$lang\\\"\";\n\t\t\t\tif (isset($cite) && ($block == 'bq'))\n\t\t\t\t\t$pre .= ' cite=\"' . $this->format_url(array('url' => $cite)) . '\"';\n\t\t\t\t$pre .= '>';\n\t\t\t\tunset($clear);\n\t\t\t}\n\t\n\t\t\t$buffer = $this->format_paragraph(array('text' => $para));\n\t\n\t\t\tif ($block == 'bq') {\n\t\t\t\tif (!preg_match('/<p[ >]/', $buffer))\n\t\t\t\t\t$post .= '</p>';\n\t\t\t\tif ($sticky == 0)\n\t\t\t\t\t$post .= '</blockquote>';\n\t\t\t} else {\n\t\t\t\t$post .= '</' . $block . '>';\n\t\t\t}\n\t\n\t\t\tif (preg_match('/'.$this->blocktags.'/x', $buffer)) {\n\t\t\t\t$buffer = preg_replace('/^\\n\\n/s', '', $buffer);\n\t\t\t\t$out .= $buffer;\n\t\t\t} else {\n\t\t\t\tif (isset($filter))\n\t\t\t\t\t$buffer = $this->format_block(array('text' => \"|$filter|\".$buffer, 'inline' => 1));\n\t\t\t\t$out .= $pre . $buffer . $post;\n\t\t\t}\n\t\t}\n\t\n\t\tif ($sticky) {\n\t\t\tif ($block == 'bc') {\n\t\t\t\t# close our blockcode section\n\t\t\t\t$out .= $this->_blockcode_close;\n\t\t\t} elseif ($block == 'bq') {\n\t\t\t\t$out .= '</blockquote>';\n\t\t\t} elseif (($block == 'table') && ($stickybuff)) {\n\t\t\t\t$table_out = $this->format_table(array('text' => $stickybuff));\n\t\t\t\tif (isset($table_out))\n\t\t\t\t\t$out .= $table_out;\n\t\t\t} elseif (($block == 'dl') && ($stickybuff)) {\n\t\t\t\t$dl_out = $this->format_deflist(array('text' => $stickybuff));\n\t\t\t\tif (isset($dl_out))\n\t\t\t\t\t$out .= $dl_out;\n\t\t\t}\n\t\t}\n\t\n\t\t# cleanup-- restore preserved blocks\n\t\twhile ($i = count($this->repl)) {\n\t\t\t$rep = array_pop($this->repl);\n\t\t\t$out = preg_replace(\"/(?:<|&lt;)textile#$i(?:>|&gt;)/\", $rep, $out, 1);\n\t\t}\n\t\n\t\t# scan for br, hr tags that are not closed and close them\n\t\t# only for xhtml! just the common ones -- don't fret over input\n\t\t# and the like.\n\t\tif (preg_match('/^xhtml/i', $this->flavor))\n\t\t\t$out = preg_replace('/(<(?:img|br|hr)[^>]*?(?<!\\/))>/','\\\\1 />', $out);\n\n\t $this->repl = $save_repl;\n $this->links = $save_links;\n\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "ac3878209f724ec8ed5d10ce003de034", "score": "0.60454386", "text": "protected function _replaceText( $txt )\n\t{\n\t\t$_tags = $this->_retrieveTags();\n\n\t\tforeach( $_tags as $_tag )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Start building open/close tag\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$open_tag\t= '[' . $_tag . ']';\n\t\t\t$close_tag\t= '[/' . $_tag . ']';\n\n\t\t\t//-----------------------------------------\n\t\t\t// Infinite loop catcher\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$_iteration\t= 0;\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Doz I can haz opin tag? Loopy loo\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\twhile( ( $this->cur_pos = stripos( $txt, $open_tag, $this->cur_pos ) ) !== false )\n\t\t\t{\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Stop infinite loops\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\tif( $_iteration > $this->settings['max_bbcodes_per_post'] )\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$_iteration++;\n\t\t\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Grab the new position to jump to\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$new_pos = strpos( $txt, ']', $this->cur_pos ) ? strpos( $txt, ']', $this->cur_pos ) : $this->cur_pos + 1;\n\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// No closing tag\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\tif( stripos( $txt, $close_tag, $new_pos ) === false )\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Grab the content\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$_content\t= substr( $txt, ($this->cur_pos + strlen($open_tag)), (stripos( $txt, $close_tag, $this->cur_pos ) - ($this->cur_pos + strlen($open_tag))) );\n\t\t\t\t\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// If this is a single tag, that's it\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\tif( $_content )\n\t\t\t\t{\n\t\t\t\t\t/* Trying to sneak in another URL to auto parse? */\n\t\t\t\t\tpreg_match_all( '#http(s)?://#i', $_content, $_match );\n\t\t\t\t\t\n\t\t\t\t\tif ( count( $_match[0] ) > 1 )\n\t\t\t\t\t{\n\t\t\t\t\t\t/* Make safe */\n\t\t\t\t\t\t$txt = preg_replace( \"#(http|https|news|ftp)://#i\", \"\\\\1&#58;//\", $txt );\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn $txt;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t$txt\t\t= substr_replace( $txt, $this->_buildOutput( $_content ), $this->cur_pos, (stripos( $txt, $close_tag, $this->cur_pos ) + strlen($close_tag) - $this->cur_pos) );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$txt\t\t= substr_replace( $txt, '', $this->cur_pos, (stripos( $txt, $close_tag, $this->cur_pos ) + strlen($close_tag) - $this->cur_pos) );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// And reset current position to end of open tag\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$this->cur_pos = stripos( $txt, $open_tag ) ? stripos( $txt, $open_tag ) : $this->cur_pos + 1; //$new_pos;\n\t\t\t\t\n\t\t\t\tif( $this->cur_pos > strlen($txt) )\n\t\t\t\t{\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Need to reset for next \"tag\"\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\n\t\t\t\t\t$this->cur_pos\t= 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $txt;\n\t}", "title": "" }, { "docid": "2e4b35424ceaa0f262e265cd4264c5bd", "score": "0.6025751", "text": "function BBCode($Text) {\n\t\t$Text = nl2br($Text);\n\t\t\n\t\t// Set up the parameters for a URL search string\n\t\t$URLSearchString = \" a-zA-Z0-9\\:\\/\\-\\?\\&\\.\\=\\_\\~\\#\\'\";\n\t\t// Set up the parameters for a MAIL search string\n\t\t$MAILSearchString = $URLSearchString . \" a-zA-Z0-9\\.@\";\n\t\t\n\t\t// Perform URL Search\n\t\t$Text = preg_replace(\"/\\[url\\]([$URLSearchString]*)\\[\\/url\\]/\", '<a href=\"$1\" target=\"_blank\">$1</a>', $Text);\n\t\t$Text = preg_replace(\"(\\[url\\=([$URLSearchString]*)\\](.+?)\\[/url\\])\", '<a href=\"$1\" target=\"_blank\">$2</a>', $Text);\n\t\t//Automatically link all www\n\t\t$Text = preg_replace(\"#(^|[\\n ])([\\w]+?://[\\w\\#$%&~/.\\-;:=,?@\\[\\]+]*)#is\", \"\\\\1<a href=\\\"\\\\2\\\" target=\\\"_blank\\\">\\\\2</a>\", $Text);\n\t\t//And all ftp\n\t\t$Text = preg_replace(\"#(^|[\\n ])((www|ftp)\\.[\\w\\#$%&~/.\\-;:=,?@\\[\\]+]*)#is\", \"\\\\1<a href=\\\"http://\\\\2\\\" target=\\\"_blank\\\">\\\\2</a>\", $Text);\n\t\t//And all emails are now mailto\n\t\t$Text = preg_replace(\"#(^|[\\n ])([a-z0-9&\\-_.]+?)@([\\w\\-]+\\.([\\w\\-\\.]+\\.)*[\\w]+)#i\", \"\\\\1<a href=\\\"mailto:\\\\2@\\\\3\\\">\\\\2@\\\\3</a>\", $Text);\n\t\t\n\t\t// Perform MAIL Search\n\t\t$Text = preg_replace(\"(\\[mail\\]([$MAILSearchString]*)\\[/mail\\])\", '<a href=\"mailto:$1\">$1</a>', $Text);\n\t\t$Text = preg_replace(\"/\\[mail\\=([$MAILSearchString]*)\\](.+?)\\[\\/mail\\]/\", '<a href=\"mailto:$1\">$2</a>', $Text);\n\t\t\n\t\t// Check for bold text\n\t\t$Text = preg_replace(\"(\\[b\\](.+?)\\[\\/b])is\",'<span class=\"bold\">$1</span>',$Text);\n\t\t\n\t\t// Declare the format for [quote] layout\n\t\t$QuoteLayout = '<div class=\"well well-small\">\n\t\t\t\t\t\t\t<blockquote style=\"margin-bottom:0px;\">\n\t\t\t\t\t\t\t\t<p>$2</p>\n\t\t\t\t\t\t\t\t<small>$1</small>\n\t\t\t\t\t\t\t</blockquote>\n\t\t\t\t\t\t</div>';\n\t\t\t\t \n\t\t// Check for [quote] text (a few times, for multiquotes)\n\t\t$Text = preg_replace(\"/\\[quote=(.+?)\\](.+?)\\[\\/quote\\]/is\",\"$QuoteLayout\", $Text);\t\t\t \n\t\t$Text = preg_replace(\"/\\[quote=(.+?)\\](.+?)\\[\\/quote\\]/is\",\"$QuoteLayout\", $Text);\n\t\t$Text = preg_replace(\"/\\[quote=(.+?)\\](.+?)\\[\\/quote\\]/is\",\"$QuoteLayout\", $Text);\n\t\t$Text = preg_replace(\"/\\[quote=(.+?)\\](.+?)\\[\\/quote\\]/is\",\"$QuoteLayout\", $Text);\n\t\t$Text = preg_replace(\"/\\[quote=(.+?)\\](.+?)\\[\\/quote\\]/is\",\"$QuoteLayout\", $Text);\n\t\t$Text = preg_replace(\"/\\[quote=(.+?)\\](.+?)\\[\\/quote\\]/is\",\"$QuoteLayout\", $Text);\n\t\t\n\t\t// Check for post edits\n\t\t$Text = preg_replace(\"(\\[edit\\](.+?)\\[\\/edit])is\",'<span style=\"font-size: 10px\" class=\"italics\">$1</span>',$Text);\n\t\t\n\t\t// Smilies!\n\t\t$Text = str_replace(\":)\", \"<img src=\\\"images/smilies/smile.png\\\" />\", $Text);\n\t\t$Text = str_replace(\"(:\", \"<img src=\\\"images/smilies/smile.png\\\" />\", $Text);\n\t\t$Text = str_replace(\"[:\", \"<img src=\\\"images/smilies/smile.png\\\" />\", $Text);\n\t\t$Text = str_replace(\":(\", \"<img src=\\\"images/smilies/sad.png\\\" />\", $Text);\n\t\t$Text = str_replace(\"):\", \"<img src=\\\"images/smilies/sad.png\\\" />\", $Text);\n\t\t$Text = str_replace(\"=[\", \"<img src=\\\"images/smilies/sad.png\\\" />\", $Text);\n\t\t$Text = str_replace(\":D\", \"<img src=\\\"images/smilies/big_smile.png\\\" />\", $Text);\n\t\t$Text = str_replace(\":d\", \"<img src=\\\"images/smilies/big_smile.png\\\" />\", $Text);\n\t\t$Text = str_replace(\"=d\", \"<img src=\\\"images/smilies/big_smile.png\\\" />\", $Text);\n\t\t$Text = str_replace(\"=D\", \"<img src=\\\"images/smilies/big_smile.png\\\" />\", $Text);\n\t\t$Text = str_replace(\":G\", \"<img src=\\\"images/smilies/big_smile.png\\\" />\", $Text);\n\t\t$Text = str_replace(\":cool:\", \"<img src=\\\"images/smilies/cool.png\\\" />\", $Text);\n\t\t$Text = str_replace(\"8)\", \"<img src=\\\"images/smilies/cool.png\\\" />\", $Text);\n\t\t$Text = str_replace(\":8\", \"<img src=\\\"images/smilies/cool.png\\\" />\", $Text);\n\t\t$Text = str_replace(\":\\\\\", \"<img src=\\\"images/smilies/hmm.png\\\" />\", $Text);\n\t\t$Text = str_replace(\":lol:\", \"<img src=\\\"images/smilies/lol.png\\\" />\", $Text);\n\t\t$Text = str_replace(\":mad:\", \"<img src=\\\"images/smilies/mad.png\\\" />\", $Text);\n\t\t$Text = str_replace(\":@\", \"<img src=\\\"images/smilies/mad.png\\\" />\", $Text);\n\t\t$Text = str_replace(\"=@\", \"<img src=\\\"images/smilies/mad.png\\\" />\", $Text);\n\t\t$Text = str_replace(\":#\", \"<img src=\\\"images/smilies/mad.png\\\" />\", $Text);\n\t\t$Text = str_replace(\":|\", \"<img src=\\\"images/smilies/neutral.png\\\" />\", $Text);\n\t\t$Text = str_replace(\"-.-\", \"<img src=\\\"images/smilies/neutral.png\\\" />\", $Text);\n\t\t$Text = str_replace(\":rolleyes:\", \"<img src=\\\"images/smilies/roll.png\\\" />\", $Text);\n\t\t$Text = str_replace(\":-[\", \"<img src=\\\"images/smilies/smile_blush.png\\\" />\", $Text);\n\t\t$Text = str_replace(\":'(\", \"<img src=\\\"images/smilies/smile_cry.png\\\" />\", $Text);\n\t\t$Text = str_replace(\"]':\", \"<img src=\\\"images/smilies/smile_cry.png\\\" />\", $Text);\n\t\t$Text = str_replace(\":kiss:\", \"<img src=\\\"images/smilies/smile_kiss.png\\\" />\", $Text);\n\t\t$Text = str_replace(\":*)\", \"<img src=\\\"images/smilies/smile_kiss.png\\\" />\", $Text);\n\t\t$Text = str_replace(\"(Y)\", \"<img src=\\\"images/smilies/smile_thumbup.png\\\" />\", $Text);\n\t\t$Text = str_replace(\"(y)\", \"<img src=\\\"images/smilies/smile_thumbup.png\\\" />\", $Text);\n\t\t$Text = str_replace(\":thumbsup:\", \"<img src=\\\"images/smilies/smile_thumbup.png\\\" />\", $Text);\n\t\t$Text = str_replace(\":worried:\", \"<img src=\\\"images/smilies/smile_worried.png\\\" />\", $Text);\n\t\t$Text = str_replace(\":-!\", \"<img src=\\\"images/smilies/smile_worried.png\\\" />\", $Text);\n\t\t$Text = str_replace(\":zipped:\", \"<img src=\\\"images/smilies/smile_zipped.png\\\" />\", $Text);\n\t\t$Text = str_replace(\":-X\", \"<img src=\\\"images/smilies/smile_zipped.png\\\" />\", $Text);\n\t\t$Text = str_replace(\":P\", \"<img src=\\\"images/smilies/tongue.png\\\" />\", $Text);\n\t\t$Text = str_replace(\":p\", \"<img src=\\\"images/smilies/tongue.png\\\" />\", $Text);\n\t\t$Text = str_replace(\"=p\", \"<img src=\\\"images/smilies/tongue.png\\\" />\", $Text);\n\t\t$Text = str_replace(\"=P\", \"<img src=\\\"images/smilies/tongue.png\\\" />\", $Text);\n\t\t$Text = str_replace(\";)\", \"<img src=\\\"images/smilies/wink.png\\\" />\", $Text);\n\t\t$Text = str_replace(\"[;\", \"<img src=\\\"images/smilies/wink.png\\\" />\", $Text);\n\t\t$Text = str_replace(\":o\", \"<img src=\\\"images/smilies/yikes.png\\\" />\", $Text);\n\t\t$Text = str_replace(\":O\", \"<img src=\\\"images/smilies/yikes.png\\\" />\", $Text);\n\t\t$Text = str_replace(\"=O\", \"<img src=\\\"images/smilies/yikes.png\\\" />\", $Text);\n\t\t$Text = str_replace(\"=o\", \"<img src=\\\"images/smilies/yikes.png\\\" />\", $Text);\n\t\t$Text = str_replace(\":yikes:\", \"<img src=\\\"images/smilies/yikes.png\\\" />\", $Text);\n\t\t\n\t\t// Check for Italics text\n\t\t$Text = preg_replace(\"(\\[i\\](.+?)\\[\\/i\\])is\",'<span class=\"italics\">$1</span>',$Text);\n\t\t\n\t\t// Check for Underline text\n\t\t$Text = preg_replace(\"(\\[u\\](.+?)\\[\\/u\\])is\",'<span class=\"underline\">$1</span>',$Text);\n\t\t\n\t\t// Check for strike-through text\n\t\t$Text = preg_replace(\"(\\[s\\](.+?)\\[\\/s\\])is\",'<span class=\"strikethrough\">$1</span>',$Text);\n\t\t\n\t\t// Check for over-line text\n\t\t$Text = preg_replace(\"(\\[o\\](.+?)\\[\\/o\\])is\",'<span class=\"overline\">$1</span>',$Text);\n\t\t\n\t\t// Check for colored text\n\t\t$Text = preg_replace(\"(\\[color=(.+?)\\](.+?)\\[\\/color\\])is\",\"<span style=\\\"color: $1\\\">$2</span>\",$Text);\n\t\t\n\t\t// Check for sized text\n\t\t$Text = preg_replace(\"(\\[size=(.+?)\\](.+?)\\[\\/size\\])is\",\"<span style=\\\"font-size: $1px\\\">$2</span>\",$Text);\n\t\t\n\t\t// Check for list text\n\t\t$Text = preg_replace(\"/\\[list\\](.+?)\\[\\/list\\]/is\", '<ul class=\"listbullet\">$1</ul>' ,$Text);\n\t\t$Text = preg_replace(\"/\\[list=1\\](.+?)\\[\\/list\\]/is\", '<ul class=\"listdecimal\">$1</ul>' ,$Text);\n\t\t$Text = preg_replace(\"/\\[list=i\\](.+?)\\[\\/list\\]/s\", '<ul class=\"listlowerroman\">$1</ul>' ,$Text);\n\t\t$Text = preg_replace(\"/\\[list=I\\](.+?)\\[\\/list\\]/s\", '<ul class=\"listupperroman\">$1</ul>' ,$Text);\n\t\t$Text = preg_replace(\"/\\[list=a\\](.+?)\\[\\/list\\]/s\", '<ul class=\"listloweralpha\">$1</ul>' ,$Text);\n\t\t$Text = preg_replace(\"/\\[list=A\\](.+?)\\[\\/list\\]/s\", '<ul class=\"listupperalpha\">$1</ul>' ,$Text);\n\t\t$Text = str_replace(\"[*]\", \"<li>\", $Text);\n\t\t\n\t\t// Check for font change text\n\t\t$Text = preg_replace(\"(\\[font=(.+?)\\](.+?)\\[\\/font\\])\",\"<span style=\\\"font-family: $1;\\\">$2</span>\",$Text);\n\t\t\n\t\t// Declare the format for [code] layout\n\t\t$CodeLayout = '<table width=\"90%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td class=\"quotecodeheader\"> Code:</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td class=\"codebody\">$1</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t </table>';\n\t\t// Check for [code] text\n\t\t$Text = preg_replace(\"/\\[code\\](.+?)\\[\\/code\\]/is\",\"$CodeLayout\", $Text);\n\t\t\n\t\t// Images\n\t\t// [img]pathtoimage[/img]\n\t\t$Text = preg_replace(\"/\\[img\\](.+?)\\[\\/img\\]/\", '<img src=\"$1\">', $Text);\n\t\t\n\t\t// [img=widthxheight]image source[/img]\n\t\t$Text = preg_replace(\"/\\[img\\=([0-9]*)x([0-9]*)\\](.+?)\\[\\/img\\]/\", '<img src=\"$3\" height=\"$2\" width=\"$1\">', $Text);\n\t\t\n\t\treturn $Text;\n\t}", "title": "" }, { "docid": "aa1d3d4d5d1789472a4d1d076d36d3e4", "score": "0.6024697", "text": "protected function _replaceText( $txt )\n\t{\n\t\t$_tags = $this->_retrieveTags();\n\n\t\tforeach( $_tags as $_tag )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Infinite loop catcher\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$_iteration\t= 0;\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Start building open tag\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$open_tag = '[' . $_tag . ']';\n\t\n\t\t\t//-----------------------------------------\n\t\t\t// Doz I can haz opin tag? Loopy loo\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\twhile( ( $this->cur_pos = stripos( $txt, $open_tag, $this->cur_pos ) ) !== false )\n\t\t\t{\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Stop infinite loops\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\tif( $_iteration > $this->settings['max_bbcodes_per_post'] )\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$_iteration++;\n\t\t\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Grab the new position to jump to\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$new_pos = strpos( $txt, ']', $this->cur_pos ) ? strpos( $txt, ']', $this->cur_pos ) : $this->cur_pos + 1;\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Grab content\n\t\t\t\t//-----------------------------------------\n\n\t\t\t\t$close_tag\t= '[/' . $_tag . ']';\n\t\t\t\t$_content\t= substr( $txt, ($this->cur_pos + strlen($open_tag) ), (stripos( $txt, $close_tag, $this->cur_pos ) - ($this->cur_pos + strlen($open_tag))) );\n\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// If this is a single tag, that's it\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\tif( $_content )\n\t\t\t\t{\n\t\t\t\t\t$txt\t\t= substr_replace( $txt, $this->_buildOutput( $_content ), $this->cur_pos, (stripos( $txt, $close_tag, $this->cur_pos ) + strlen($close_tag) - $this->cur_pos) );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$txt\t\t= substr_replace( $txt, '', $this->cur_pos, (stripos( $txt, $close_tag, $this->cur_pos ) + strlen($close_tag) - $this->cur_pos) );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// And reset current position to end of open tag\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$this->cur_pos = stripos( $txt, $open_tag ) ? stripos( $txt, $open_tag ) : $this->cur_pos + 1; //$new_pos;\n\t\t\t\t\n\t\t\t\tif( $this->cur_pos > strlen($txt) )\n\t\t\t\t{\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Need to reset for next \"tag\"\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\n\t\t\t\t\t$this->cur_pos\t= 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $txt;\n\t}", "title": "" }, { "docid": "456aa016f92fb2b6c004d81a9a077650", "score": "0.60199815", "text": "function bj_clean_string($string,$allowed_html=array()) {\r\n\tglobal $bj;\r\n\tif(get_magic_quotes_gpc())\r\n\t\t$string = stripslashes($string);\r\n\t$content = str_replace(\r\n\t\tarray(\r\n\t\t\t\"<\",\r\n\t\t\t\">\",\r\n\t\t\t\"\\\"\",\r\n\t\t\t\"'\",\r\n\t\t\t\"&\"),\r\n\t\tarray(\r\n\t\t\t\"&#60;\",\r\n\t\t\t\"&#62;\",\r\n\t\t\t\"&#34;\",\r\n\t\t\t\"&#39;\",\r\n\t\t\t\"&#38;\"),\r\n\t\t$content);\r\n\t$string = bj_kses($string,$allowed_html);\r\n\t$string = $bj->db->escape($string);\r\n\treturn run_actions('clean_string',$string);\r\n}", "title": "" }, { "docid": "ead14dd6f6100f6e8f5bbd85c70a267a", "score": "0.5991084", "text": "protected function _replaceText( $txt )\n\t{\n\t\t$_tags = $this->_retrieveTags();\n\n\t\tforeach( $_tags as $_tag )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Infinite loop catcher\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$_iteration\t= 0;\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Start building open/close tag\n\t\t\t//-----------------------------------------\n\n\t\t\t$open_tag\t= '[' . $_tag;\n\t\t\t$close_tag\t= '[/' . $_tag . ']';\n\n\t\t\t//-----------------------------------------\n\t\t\t// Doz I can haz opin tag? Loopy loo\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\twhile( ( $this->cur_pos = stripos( $txt, $open_tag, $this->cur_pos ) ) !== false )\n\t\t\t{\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Stop infinite loops\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\tif( $_iteration > $this->settings['max_bbcodes_per_post'] )\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$_iteration++;\n\t\t\t\t\t\t\n\t\t\t\t$open_length = strlen($open_tag);\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Extract the option (like surgery)\n\t\t\t\t//-----------------------------------------\n\n\t\t\t\t$_option\t= '';\n\t\t\t\t\n\t\t\t\tif( $this->_bbcode['bbcode_useoption'] )\n\t\t\t\t{\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Is option optional?\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t\tif( $this->_bbcode['bbcode_optional_option'] )\n\t\t\t\t\t{\n\t\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\t// Does we haz it?\n\t\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( substr( $txt, $this->cur_pos + strlen($open_tag), 1 ) == '=' )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$open_length\t+= 1;\n\t\t\t\t\t\t\t$_option\t\t= substr( $txt, $this->cur_pos + $open_length, (strpos( $txt, ']', $this->cur_pos ) - ($this->cur_pos + $open_length)) );\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\t// If not, [u] != [url] (for example)\n\t\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t\t\telse if( (strpos( $txt, ']', $this->cur_pos ) - ( $this->cur_pos + $open_length )) !== 0 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->cur_pos = strpos( $txt, ']', $this->cur_pos );\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// No? Then just grab it\n\t\t\t\t\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$open_length\t+= 1;\n\t\t\t\t\t\t$_option\t\t= substr( $txt, $this->cur_pos + $open_length, (strpos( $txt, ']', $this->cur_pos ) - ($this->cur_pos + $open_length)) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// [img] != [i] (for example)\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\telse if( (strpos( $txt, ']', $this->cur_pos ) - ( $this->cur_pos + $open_length )) !== 0 )\n\t\t\t\t{\n\t\t\t\t\t$this->cur_pos = strpos( $txt, ']', $this->cur_pos ) ? strpos( $txt, ']', $this->cur_pos ) : $this->cur_pos + 1;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Grab the new position to jump to\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$new_pos = strpos( $txt, ']', $this->cur_pos ) ? strpos( $txt, ']', $this->cur_pos ) : $this->cur_pos + 1;\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// No closing tag\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\tif( stripos( $txt, $close_tag, $new_pos ) === false )\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Grab the content\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$_content\t= substr( $txt, ($this->cur_pos + $open_length + strlen($_option) + 1), (stripos( $txt, $close_tag, $this->cur_pos ) - ($this->cur_pos + $open_length + strlen($_option) + 1)) );\n\t\t\t\t\n\t\t\t\tif ( strpos( $_content, \"<a \" ) !== false )\n\t\t\t\t{\n\t\t\t\t\t$_content = preg_replace( '/\\<a href=[\\'\\\"](.+?)[\\\"\\'].*\\>(.+?)\\<\\/a\\>/i', \"\\\\1\", $_content );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* Make sure we've not embedded [media] */\n\t\t\t\tif ( stristr( $_content, '[media]' ) )\n\t\t\t\t{\n\t\t\t\t\treturn $txt;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// If this is a single tag, that's it\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\tif( $_content )\n\t\t\t\t{\n\t\t\t\t\t$txt = substr_replace( $txt, $this->_buildOutput( $_content, $_option ), $this->cur_pos, (stripos( $txt, $close_tag, $this->cur_pos ) + strlen($close_tag) - $this->cur_pos) );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$txt = substr_replace( $txt, '', $this->cur_pos, (stripos( $txt, $close_tag, $this->cur_pos ) + strlen($close_tag) - $this->cur_pos) );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// And reset current position to end of open tag\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$this->cur_pos = stripos( $txt, $open_tag ) ? stripos( $txt, $open_tag ) : $this->cur_pos + 1; //$new_pos;\n\n\t\t\t\tif( $this->cur_pos > strlen($txt) )\n\t\t\t\t{\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Need to reset for next \"tag\"\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\n\t\t\t\t\t$this->cur_pos\t= 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $txt;\n\t}", "title": "" }, { "docid": "e0ab651adb0d7dda6aadb1e80719ffe4", "score": "0.5989887", "text": "public static function parse($data)\n {\n $matches[\"/\\[b\\](.*?)\\[\\/b\\]/is\"] = function($match) {\n return Html::b($match[1]);\n };\n\n // Replace [sup]...[/sup] with <sup>...</sup>\n $matches[\"/\\[sup\\](.*?)\\[\\/sup\\]/is\"] = function($match) {\n return Html::sup($match[1]);\n };\n\n // Replace [sub]...[/sub] with <sub>...</sub>\n $matches[\"/\\[sub\\](.*?)\\[\\/sub\\]/is\"] = function($match) {\n return Html::sub($match[1]);\n };\n\n // Replace [i]...[/i] with <em>...</em>\n $matches[\"/\\[i\\](.*?)\\[\\/i\\]/is\"] = function($match) {\n return Html::em($match[1]);\n };\n\n // Replace [code]...[/code] with <pre><code>...</code></pre>\n $matches[\"/\\[code\\](.*?)\\[\\/code\\]/is\"] = function($match) {\n return Html::code($match[1]);\n };\n\n // Replace [quote]...[/quote] with <blockquote><p>...</p></blockquote>\n $matches[\"/\\[quote\\](.*?)\\[\\/quote\\]/is\"] = function($match) {\n return Html::quote($match[1]);\n };\n\n // Replace [quote=\"person\"]...[/quote] with <blockquote><p>...</p></blockquote>\n $matches[\"/\\[quote=\\\"([^\\\"]+)\\\"\\](.*?)\\[\\/quote\\]/is\"] = function($match) {\n return $match[1] . ' wrote: ' . Html::quote($match[2]);\n };\n\n // Replace [size=30]...[/size] with <span style=\"font-size:30%\">...</span>\n $matches[\"/\\[size=(\\d+)\\](.*?)\\[\\/size\\]/is\"] = function($match) {\n return Html::span($match[2], array('style' => 'font-size: ' . $match[1] . '%;'));\n };\n\n // Replace [s] with <del>\n $matches[\"/\\[s\\](.*?)\\[\\/s\\]/is\"] = function($match) {\n return Html::del($match[1]);\n };\n\n // Replace [u]...[/u] with <span style=\"text-decoration:underline;\">...</span>\n $matches[\"/\\[u\\](.*?)\\[\\/u\\]/is\"] = function($match) {\n return Html::span($match[1], array('style' => 'text-decoration: underline;'));\n };\n\n // Replace [center]...[/center] with <div style=\"text-align:center;\">...</div>\n $matches[\"/\\[center\\](.*?)\\[\\/center\\]/is\"] = function($match) {\n return Html::span($match[1], array('style' => 'display: block; text-align: center;'));\n };\n\n // Replace [color=somecolor]...[/color] with <span style=\"color:somecolor\">...</span>\n $matches[\"/\\[color=([#a-z0-9]+)\\](.*?)\\[\\/color\\]/is\"] = function($match) {\n return Html::span($match[2], array('style' => 'color: ' . $match[1] . ';'));\n };\n\n // Replace [email]...[/email] with <a href=\"mailto:...\">...</a>\n $matches[\"/\\[email\\](.*?)\\[\\/email\\]/is\"] = function($match) {\n return Html::mailto($match[1], $match[1]);\n };\n\n // Replace [[email protected]]An e-mail link[/email] with <a href=\"mailto:[email protected]\">An e-mail link</a>\n $matches[\"/\\[email=(.*?)\\](.*?)\\[\\/email\\]/is\"] = function($match) {\n return Html::mailto($match[1], $match[2]);\n };\n\n // Replace [url]...[/url] with <a href=\"...\">...</a>\n $matches[\"/\\[url\\](.*?)\\[\\/url\\]/is\"] = function($match) {\n return Html::link($match[1], $match[1], array('target' => '_blank'));\n };\n\n // Replace [url=http://www.google.com/]A link to google[/url] with <a href=\"http://www.google.com/\">A link to google</a>\n $matches[\"/\\[url=(.*?)\\](.*?)\\[\\/url\\]/is\"] = function($match) {\n return Html::link($match[1], $match[2], array('target' => '_blank'));\n };\n\n // Replace [img]...[/img] with <img src=\"...\"/>\n $matches[\"/\\[img\\](.*?)\\[\\/img\\]/is\"] = function($match) {\n return Html::image($match[1]);\n };\n\n // Replace [list]...[/list] with <ul><li>...</li></ul>\n $matches[\"/\\[list\\](.*?)\\[\\/list\\]/is\"] = function($match) {\n preg_match_all(\"/\\[\\*\\]([^\\[\\*\\]]*)/is\", $match[1], $items);\n return Html::ul(preg_replace(\"/[\\n\\r?]$/\", null, $items[1]));\n };\n\n // Replace [list=1|a]...[/list] with <ul|ol><li>...</li></ul|ol>\n $matches[\"/\\[list=(1|a)\\](.*?)\\[\\/list\\]/is\"] = function($match) {\n if($match[1] === 'a') {\n $attr = array('style' => 'list-style-type: lower-alpha');\n }\n preg_match_all(\"/\\[\\*\\]([^\\[\\*\\]]*)/is\", $match[2], $items);\n return Html::ol(preg_replace(\"/[\\n\\r?]$/\", null, $items[1]), $attr);\n };\n\n // Replace [youtube]...[/youtube] with <iframe src=\"...\"></iframe>\n $matches[\"/\\[youtube\\](?:http?:\\/\\/)?(?:www\\.)?youtu(?:\\.be\\/|be\\.com\\/watch\\?v=)([A-Z0-9\\-_]+)(?:&(.*?))?\\[\\/youtube\\]/i\"] = function($match) {\n return Html::iframe('http://www.youtube.com/embed/' . $match[1], array(\n 'class' => 'youtube-player',\n 'type' => 'text/html',\n 'width' => 640,\n 'height' => 385,\n 'frameborder' => 0\n ));\n };\n // Replace everything that has been found\n foreach($matches as $key => $val) {\n $data = preg_replace_callback($key, $val, $data);\n }\n\n return nl2br(repl('&lt;', '<' , repl('&gt;', '>', repl('&quot;=\"', '', repl('&quot;', \"'\", $data)))));\n }", "title": "" }, { "docid": "592abc30398515e93e562100082fb790", "score": "0.59386224", "text": "public static function bbcode($content)\n {\n return self::getCreator()->create('raw', [\\MUtil_Lazy::call('\\MUtil_Markup::render', $content, 'Bbcode', 'Html')]);\n }", "title": "" }, { "docid": "df576dab90b4c1ba9c02c55ad12c5cfb", "score": "0.59289074", "text": "private function CutCodeAndHtml()\n {\n $this->string = preg_replace_callback('#\\[php\\](.*)\\[\\/php\\]#simU', array($this, 'cutcode'), $this->string);\n \n // cuts out html blocks\n if($this->allow_html)\n \t$string = preg_replace_callback('#\\[html\\](.*)\\[\\/html\\]#simU', array($this,'cuthtml'), $this->string);\n }", "title": "" }, { "docid": "4eab184b8480af419335018f0d31dfd6", "score": "0.5926101", "text": "public static function filter_in($txt) {\n\t\tglobal $a_home;\n\t\t\n\t\t// Strip HTML, convert newlines, and encode\n\t\t$txt = nl2br(htmlentities(trim($txt),ENT_QUOTES,'UTF-8'));\n\t\t\n\t\t// Convert BBCode to secure HTML\n\t\t$bb1 = array('/\\[b\\](.*?)\\[\\/b\\]/is','/\\[i\\](.*?)\\[\\/i\\]/is','/\\[u\\](.*?)\\[\\/u\\]/is','/\\[url\\=(.*?)\\](.*?)\\[\\/url\\]/is','/\\[url\\](.*?)\\[\\/url\\]/is','/\\[align\\=(left|center|right)\\](.*?)\\[\\/align\\]/is','/\\[img\\](.*?)\\[\\/img\\]/is','/\\[mail\\=(.*?)\\](.*?)\\[\\/mail\\]/is','/\\[mail\\](.*?)\\[\\/mail\\]/is','/\\[font\\=(.*?)\\](.*?)\\[\\/font\\]/is','/\\[size\\=(.*?)\\](.*?)\\[\\/size\\]/is','/\\[color\\=(.*?)\\](.*?)\\[\\/color\\]/is','/\\[codearea\\](.*?)\\[\\/codearea\\]/is','/\\[code\\](.*?)\\[\\/code\\]/is','/\\[p\\](.*?)\\[\\/p\\]/is');\n\t\t$bb2 = array('<strong>$1</strong>','<em>$1</em>','<u>$1</u>','<a href=\"$1\" rel=\"nofollow\" target=\"_blank\">$2</a>','<a href=\"$1\" rel=\"nofollow\" target=\"_blank\">$1</a>','<div style=\"text-align: $1;\">$2</div>','<img src=\"$1\" alt=\"\">','<a href=\"mailto:$1\">$2</a>','<a href=\"mailto:$1\">$1</a>','<span style=\"font-family:$1\">$2</span>','<span style=\"font-size:$1\">$2</span>','<span style=\"color:$1\">$2</span>','<textarea class=\"code_container\" rows=\"30\" cols=\"70\">$1</textarea>','<pre class=\"code\">$1</pre>','<p>$1</p>');\n\t\t$txt = preg_replace($bb1,$bb2,$txt);\n\t\t\n\t\t// Unify Emoji\n\t\tinclude_once 'emoji.php';\n\t\t$txt = emoji_docomo_to_unified($txt); // DoCoMo devices\n\t\t$txt = emoji_kddi_to_unified($txt); // KDDI & Au devices\n\t\t$txt = emoji_softbank_to_unified($txt); // Softbank & Apple devices\n\t\t$txt = emoji_google_to_unified($txt); // Google Android devices\n\t\t\n\t\treturn $txt;\n\t}", "title": "" }, { "docid": "7dd8a20e47b8e8b650db0ff3f2ece1c1", "score": "0.59089345", "text": "function html( $text ) {\n//\treturn preg_replace( '/['.CR.']?['.NL.']/', BR.NL, htmlspecialchars($text) ); //htmlentities\n\treturn preg_replace( '/['.CR.']?['.NL.']/', BR.NL, htmlspecialchars($text, ENT_HTML5, null, true) ); //htmlentities\n}", "title": "" }, { "docid": "c17b8534722735f556c1424422dbb461", "score": "0.589717", "text": "function tagreplace($replace) {\n global $db, $debugging, $cfg, $pathvars, $environment, $ausgaben, $defaults, $specialvars, $dataloop, $hidedata, $mapping, $LB_IMG_counter;\n\n // cariage return + linefeed fix\n if ( $specialvars[\"newbrmode\"] != True ) {\n $sear = array(\"\\r\\n[TA\", \"\\r\\n[RO\", \"\\r\\n[CO\", \"/H1]\\r\\n\", \"/H2]\\r\\n\", \"/H3]\\r\\n\", \"/H4]\\r\\n\", \"/H5]\\r\\n\", \"/H6]\\r\\n[\", \"/HR]\\r\\n\", \"AB]\\r\\n\", \"OW]\\r\\n\", \"OL]\\r\\n\", \"IV]\\r\\n\",);\n $repl = array(\"[TA\", \"[RO\", \"[CO\", \"/H1]\", \"/H2]\", \"/H3]\", \"/H4]\", \"/H5]\", \"/H6]\", \"/HR]\", \"AB]\", \"OW]\", \"OL]\", \"IV]\",);\n $replace = str_replace($sear,$repl,$replace);\n }\n\n $preg = \"|\\[\\/[!A-Z0-9]{1,6}\\]|\";\n $selection_counter = 0;\n $imgb_counter = 0;\n while ( preg_match($preg, $replace, $match ) ) {\n\n $closetag = $match[0];\n if ( strstr($replace, $closetag) ) {\n\n // wo beginnt der closetag\n $closetagbeg = strpos($replace,$closetag);\n\n // wie sieht der opentag aus\n $opentag = str_replace(array(\"/\",\"]\"),array(\"\",\"\"),$closetag);\n\n // wie lang ist der opentag\n $opentaglen = strlen($opentag);\n\n // nur hier kann der opentag sein\n $haystack = substr($replace,0,$closetagbeg);\n\n // fehlenden open tag abfangen\n if ( (strpos($haystack,$opentag.\"]\") === false) && (strpos($haystack,$opentag.\"=\") === false) ) {\n if ( !isset($defaults[\"tag\"][\"error\"]) ) {\n $error = \" <font color=\\\"#FF0000\\\">\".$opentag.\"]?</font> \";\n } else {\n $error = $defaults[\"tag\"][\"error\"].$opentag.\"]\".$defaults[\"tag\"][\"/error\"];\n }\n $replace = $haystack.$error.substr($replace,$closetagbeg+$opentaglen+2);\n continue;\n }\n\n // wie lautet der tagwert\n $tagwertbeg = strlen($haystack) - (strpos(strrev($haystack), strrev($opentag)) + strlen($opentag)) + $opentaglen + 1;\n $tagoriginal = substr($replace,$tagwertbeg,$closetagbeg-$tagwertbeg);\n $tagwert = $tagoriginal;\n\n // parameter?\n $sign = substr($replace,$tagwertbeg-1,1);\n // opentag komplettieren\n $opentag = $opentag.$sign; \n \n // kompletten tag mit tagwert ersetzen\n switch ($closetag) {\n //\n // Block Elemente\n // H1-6 | P | PRE | DIV | LIST | HR | TAB, ROW, COL | CENTER\n //\n case \"[/H1]\": \n case \"[/H2]\":\n case \"[/H3]\": \n case \"[/H4]\":\n case \"[/H5]\":\n case \"[/H6]\":\n $replace = tagreplace_h($replace, $opentag, $tagoriginal, $closetag, $sign);\n break;\n case \"[/P]\":\n if ( $specialvars[\"newbrmode\"] == True ) $tagwert = nlreplace($tagwert);\n if ( $sign == \"]\" ) {\n $ausgabewert = \"<p>\".$tagwert.\"</p>\";\n $replace = str_replace($opentag.$tagoriginal.$closetag,$ausgabewert,$replace);\n } else {\n $tagwerte = explode(\"]\",$tagwert,2);\n $pwerte = explode(\";\",$tagwerte[0]);\n $extrawerte = explode(\":\",$pwerte[0]);\n if ( isset($extrawerte[1]) ) $pwerte[0] = $extrawerte[1];\n if ( $extrawerte[0] == \"id\" ) {\n $art = \"id\";\n } else {\n $art = \"class\";\n }\n $attrib = null;\n if ( isset($pwerte[0]) ) {\n $attrib = \" \".$art.\"=\\\"\".$pwerte[0].\"\\\"\";\n }\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<p\".$attrib.\">\".$tagwerte[1].\"</p>\",$replace);\n }\n break;\n case \"[/PRE]\":\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<pre>\".$tagwert.\"</pre>\",$replace);\n break;\n case \"[/DIV]\":\n if ( $specialvars[\"newbrmode\"] == True && strpos( $specialvars[\"newbrblock\"], \"DIV\") === false ) $tagwert = nlreplace($tagwert);\n if ( $sign == \"]\" ) {\n $ausgabewert = \"<div>\".$tagwert.\"</div>\";\n $replace = str_replace($opentag.$tagoriginal.$closetag,$ausgabewert,$replace);\n } else {\n $tagwerte = explode(\"]\",$tagwert,2);\n $divwerte = explode(\";\",$tagwerte[0]);\n $extrawerte = explode(\":\",$divwerte[0]);\n if ( isset($extrawerte[1]) ) $divwerte[0] = $extrawerte[1];\n if ( $extrawerte[0] == \"id\" ) {\n $art = \"id\";\n } else {\n $art = \"class\";\n }\n $attrib = null;\n if ( isset($divwerte[0]) ) {\n $attrib = \" \".$art.\"=\\\"\".$divwerte[0].\"\\\"\";\n }\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<div\".$attrib.\">\".$tagwerte[1].\"</div>\",$replace);\n }\n break;\n case \"[/LIST]\":\n if ( $sign == \"]\" ) {\n $tagwerte = explode(\"[*]\",$tagwert);\n $ausgabewert = \"<ul>\";\n while ( list ($key, $punkt) = each($tagwerte)) {\n if ( $specialvars[\"newbrmode\"] == True ) $punkt = nlreplace($punkt);\n $ausgabewert .= \"<li><span>\".$punkt.\"</span></li>\";\n }\n $ausgabewert .= \"</ul>\";\n $replace = str_replace($opentag.$tagoriginal.$closetag,$ausgabewert,$replace);\n } else {\n $tagrestbeg = strpos($tagwert,\"]\");\n $listart = substr($tagwert,0,$tagrestbeg);\n $tagrest = substr($tagwert,$tagrestbeg+1);\n $tagwerte = explode(\"[*]\",$tagrest);\n if ( $listart == 1 ) {\n $ausgabewert = \"<ol>\";\n while ( list ($key, $punkt) = each($tagwerte)) {\n if ( $specialvars[\"newbrmode\"] == True ) $punkt = nlreplace($punkt);\n $ausgabewert .= \"<li><span>\".$punkt.\"</span></li>\";\n }\n $ausgabewert .= \"</ol>\";\n } elseif ( $listart == \"DEF\" ) {\n $ausgabewert = \"<dl>\";\n while ( list ($key, $punkt) = each($tagwerte)) {\n if ( $specialvars[\"newbrmode\"] == True ) $punkt = nlreplace($punkt);\n if ( $key % 2 != 0 ) {\n $ausgabewert .= \"<dd>\".$punkt.\"</dd>\";\n } else {\n $ausgabewert .= \"<dt>\".$punkt.\"</dt>\";\n }\n }\n $ausgabewert .= \"</dl>\";\n } else {\n if ( strlen($listart) > 1 ) {\n $ausgabewert = \"<ul type=\\\"\".$listart.\"\\\">\";\n } else {\n $ausgabewert = \"<ol type=\\\"\".$listart.\"\\\">\";\n }\n while ( list ($key, $punkt) = each($tagwerte)) {\n if ( $specialvars[\"newbrmode\"] == True ) $punkt = nlreplace($punkt);\n $ausgabewert .= \"<li><span>\".$punkt.\"</span></li>\";\n }\n if ( strlen($listart) > 1 ) {\n $ausgabewert .= \"</ul>\";\n } else {\n $ausgabewert .= \"</ol>\";\n }\n }\n $replace = str_replace($opentag.$tagoriginal.$closetag,$ausgabewert,$replace);\n }\n break;\n case \"[/HR]\":\n if ( !isset($defaults[\"tag\"][\"hr\"]) ) {\n $defaults[\"tag\"][\"hr\"] = \"<hr />\";\n $defaults[\"tag\"][\"/hr\"] = null;\n }\n if ( $sign == \"]\" ) {\n $replace = str_replace($opentag.$tagoriginal.$closetag,$defaults[\"tag\"][\"hr\"].$tagwert.$defaults[\"tag\"][\"/hr\"],$replace);\n } else {\n $tagwerte = explode(\"]\",$tagwert,2);\n $attrib = \" class=\\\"\".$tagwerte[0].\"\\\">\";\n $tagwithclass = str_replace(\">\", $attrib, $defaults[\"tag\"][\"hr\"]);\n $replace = str_replace($opentag.$tagoriginal.$closetag,$tagwithclass.$tagwerte[1].$defaults[\"tag\"][\"/hr\"],$replace);\n }\n break;\n case \"[/TAB]\":\n if ( $specialvars[\"newbrmode\"] == True ) $tagwert = str_replace(\"\\r\\n\",\"\",$tagwert);\n if ( $sign == \"]\" ) {\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<table cellspacing=\\\"0\\\" cellpadding=\\\"1\\\">\".$tagwert.\"</table>\",$replace);\n } else {\n $tagwerte = explode(\"]\",$tagwert,2);\n $tabwerte = explode(\";\",$tagwerte[0]);\n if ( $tabwerte[0] == \"l\" ) {\n $align = \" align=\\\"left\\\"\";\n } elseif ( $tabwerte[0] == \"m\" ) {\n $align = \" align=\\\"center\\\"\";\n } elseif ( $tabwerte[0] == \"r\" ) {\n $align = \" align=\\\"right\\\"\";\n } else {\n $align = null;\n }\n if ( isset($tabwerte[1]) ) {\n $width = \" width=\\\"\".$tabwerte[1].\"\\\"\";\n }\n $border = null;\n if ( !empty($tabwerte[2]) ) $border = \" border=\\\"\".$tabwerte[2].\"\\\"\";\n if ( isset($tabwerte[3]) ) {\n $cellspacing = \" cellspacing=\\\"\".$tabwerte[3].\"\\\"\";\n } else {\n $cellspacing = \" cellspacing=\\\"0\\\"\";\n }\n if ( isset($tabwerte[4]) ) { \n $cellpadding = \" cellpadding=\\\"\".$tabwerte[4].\"\\\"\";\n } else {\n $cellpadding = \" cellpadding=\\\"1\\\"\";\n }\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<table\".$cellspacing.$cellpadding.$width.$align.$border.\">\".$tagwerte[1].\"</table>\",$replace);\n $replace = tagreplace($replace);\n }\n break;\n case \"[/TABCSV]\":\n if ( $sign != \"]\" ) {\n $tagwerte = explode(\"]\",$tagwert,2);\n $tabwerte = explode(\";\",$tagwerte[0]);\n switch ( $tabwerte[4] ) {\n case \"o\":\n $va = \" valign=\\\"top\\\"\";\n break;\n case \"u\":\n $va = \" valign=\\\"bottom\\\"\";\n break;\n case \"m\":\n $va = \" valign=\\\"middle\\\"\";\n break;\n default:\n $va = null;\n }\n if ( isset($tabwerte[5]) ) {\n $wochentag = array(\"So,&nbsp;\",\n \"Mo,&nbsp;\",\n \"Di,&nbsp;\",\n \"Mi,&nbsp;\",\n \"Do,&nbsp;\",\n \"Fr,&nbsp;\",\n \"Sa,&nbsp;\");\n }\n if ( isset($tabwerte[6]) ) {\n $vortext = array(\"\");\n }\n // csv-datei\n if ( isset($specialvars[\"subdir\"]) ) {\n $pfad = str_replace( $specialvars[\"subdir\"].\"/\", \"\", $tabwerte[0] );\n } else {\n $pfad = $tabwerte[0];\n }\n $file_path = explode(\"/\",$pfad);\n $extension = $cfg[\"file\"][\"filetyp\"][$file_path[2]];\n $directory = $cfg[\"file\"][\"fileopt\"][$extension][\"path\"];\n $file_name = $extension.\"_\".$file_path[3].\".\".$file_path[2];\n if ( file_exists($directory.$file_name) ) {\n $table = null;\n $handle = fopen ($directory.$file_name,\"r\");\n // enthaelt die erste zeile spaltenueberschriften\n if ( isset($tabwerte[3]) ) {\n $cell_tag1 = \"<th scope=\\\"col\\\">\"; $cell_tag2 = \"</th>\\n\";\n $row_tag1 = \"<thead>\\n<tr>\"; $row_tag2 = \"</tr>\\n</thead>\";\n } else {\n $cell_tag1 = \"<td\".$va.\">\"; $cell_tag2 = \"</td>\\n\";\n $row_tag1 = \"<tr>\"; $row_tag2 = \"</tr>\\n\";\n }\n $thead = null;\n // beim ersten Durchlauf der Schleife werden die Vortexte eingelesen, also brauchen\n // wir dafuer ein Flag. (Man koennte auch aus der while eine for-schleife machen)\n $firstln = \"1\";\n while ( ($data = fgetcsv ($handle, 1500, \";\")) !== FALSE ) {\n $row = null;\n $wieviele = sizeof($data);\n if ( isset($firstln) ) $vortext = $data;\n for ($i = 0; $i < $wieviele; $i++ ) {\n $value = $data[$i];\n // tabwert 5 = datumspruefung an\n if ( isset($tabwerte[5]) ) {\n // wir pruefen, ob die zelle ein Datum enthaelt\n if ( strtotime ($value) == TRUE ) {\n $beginn = strtotime ($value);\n $jetzt = time ();\n if ( $beginn + 86400 < $jetzt) {\n // wenn der beginn heute ist (jetzt und den ganzen tag), setzen wir skip\n // wenn $skip mit irgendwas gefuellt ist, wird die Zeile uebersprungen\n $skip = 1;\n } else {\n // jetzt setzen wir noch den deutschen Wochentag vors Datum\n $value = $wochentag[date (\"w\", $beginn)].date (\"d.m.Y\", $beginn);\n // Hier kommt noch ein undokumentierter \"Spezialhack\"\n // Wenn der Parameter 5 groesser 1 ist, wird geschaut, ob nach dem Datum\n // gleich noch ein Datum kommt. Wenn ja, wird das als \"von-bis\" in eine\n // Zelle gesetzt.\n if ( $tabwerte[5] > 1 ) {\n $i++;\n if ( strtotime ($data[$i]) == TRUE ) {\n $ende = strtotime ($data[$i]);\n $tbeginn = $wochentag[date (\"w\", $beginn)].date (\"d.m.Y\", $beginn);\n $tende = $wochentag[date (\"w\", $ende)].date (\"d.m.Y\", $ende);\n $value = $tbeginn.\"<br />bis<br />\".$tende;\n $tbeginn = \"\"; $ende = \"\"; $tende = \"\";\n }\n }\n }\n }\n }\n // noch Teil des Spezialhacks: ignorieren.\n if ( isset($firstln) && $tabwerte[5] >1 && $i >= $tabwerte[5]-1 ) {\n if ($i == $tabwerte[5]-1 ) $i++;\n $value = $data[$i];\n }\n if ( !isset($tabwerte[6]) ) {\n $row .= $cell_tag1.$value.$cell_tag2;\n } else {\n // tabwert 6 = don't screw my design-Modus\n if ( isset($firstln) ) {\n // Die Ueberschrift geben wir bis zum angegebenen Wert ganz normal aus,\n // der Rest wird ignoriert.\n if ( $i <= $tabwerte[6] && isset($tabwerte[3]) ) {\n $row .= $cell_tag1.$value.$cell_tag2;\n }\n } else {\n if ( $i < $tabwerte[6] ) {\n // bis zum Wert, der im tabwert 6 angegeben ist, wird ganz normal ausgegeben.\n $row .= $cell_tag1.$value.$cell_tag2;\n }\n if ( $i == $tabwerte[6] ) {\n // Beim Wert, der in tabwert 6 angegeben ist, oeffnen wir die Zelle\n // und setzen einen Zeilenwechsel.\n if ( isset($tabwerte[7]) ) {\n $row .= $cell_tag1.\"<\".$tabwerte[7].\">\".$value.\"</\".$tabwerte[7].\"><br />\";\n } else {\n $row .= $cell_tag1.$value.\"<br />\";\n }\n }\n if ( $i > $tabwerte[6] ) {\n // Die Werte, die nach tabwert 6 kommen, werden bis zum vorletzten Wert\n // (falls vorhanden) mit Vortext ausgegeben und dann der Wert und ein br\n if ( isset($vortext[$i]) ) {\n $row .= $vortext[$i].\": \";\n }\n if ( $i < $wieviele-1 ) {\n $row .= $value.\"<br />\";\n } else {\n // der letzte Wert schliesst die Zelle ab\n $row .= $value.$cell_tag2;\n }\n }\n }\n }\n }\n if ( !$skip == FALSE ) { $row = null; $skip = null; }\n if ( isset($row) ) $table .= $row_tag1.$row.$row_tag2;\n if ( strstr($cell_tag1,\"<th\") ) {\n $thead = $table;\n $table = null;\n $cell_tag1 = \"<td\".$va.\">\"; $cell_tag2 = \"</td>\\n\";\n $row_tag1 = \"<tr>\"; $row_tag2 = \"</tr>\\n\";\n }\n $firstln = null;\n }\n // summary\n if ( isset($tagwerte[1]) ) {\n $summary = \" summary=\\\"\".$tagwerte[1].\"\\\"\";\n } else {\n $summary = null;\n }\n // breite\n if ( isset($tabwerte[1]) ) {\n $width = \" width=\\\"\".$tabwerte[1].\"%\\\"\";\n } else {\n $width = null;\n }\n // border\n if ( isset($tabwerte[2]) ) {\n $border = \" border=\\\"\".$tabwerte[2].\"\\\"\";\n } else {\n $border = null;\n }\n if ( isset($table) ) $table = \"<table\".$border.$width.$summary.\">\\n\".$thead.\"<tbody>\\n\".$table.\"</tbody>\\n</table>\\n\";\n } else {\n $table = null;\n }\n $replace = str_replace($opentag.$tagoriginal.$closetag,$table,$replace);\n } else {\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"\",$replace);\n }\n break;\n case \"[/ROW]\":\n if ( $specialvars[\"newbrmode\"] == True ) $tagwert = str_replace(\"\\r\\n\",\"\",$tagwert);\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<tr>\".$tagwert.\"</tr>\",$replace);\n break;\n case \"[/TH]\":\n if ( $specialvars[\"newbrmode\"] == True ) $tagwert = nlreplace($tagwert);\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<th valign=\\\"top\\\">\".$tagwert.\"</th>\",$replace);\n break;\n case \"[/COL]\":\n if ( $specialvars[\"newbrmode\"] == True ) $tagwert = nlreplace($tagwert);\n if ( $sign == \"]\" ) {\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<td valign=\\\"top\\\">\".$tagwert.\"</td>\",$replace);\n } else {\n $tagwerte = explode(\"]\",$tagwert,2);\n $colwerte = explode(\";\",$tagwerte[0]);\n if ( $colwerte[0] == \"l\" ) {\n $align = \" align=\\\"left\\\"\";\n } elseif ( $colwerte[0] == \"m\" ) {\n $align = \" align=\\\"center\\\"\";\n } elseif ( $colwerte[0] == \"r\" ) {\n $align = \" align=\\\"right\\\"\";\n } else {\n $align = null;\n }\n if ( isset($colwerte[1]) ) {\n $width = \" width=\\\"\".$colwerte[1].\"\\\"\";\n } else {\n $width = null;\n }\n if ( isset($colwerte[2]) ) {\n if ( $colwerte[2] == \"o\" ) {\n $valign = \" valign=\\\"top\\\"\";\n } elseif ( $colwerte[2] == \"m\" ) {\n $valign = \" valign=\\\"middle\\\"\";\n } elseif ( $colwerte[2] == \"u\" ) {\n $valign = \" valign=\\\"bottom\\\"\";\n } elseif ( $colwerte[2] == \"g\" ) {\n $valign = \" valign=\\\"baseline\\\"\";\n }\n } else {\n $valign = \" valign=\\\"top\\\"\";\n }\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<td\".$align.$width.$valign.\">\".$tagwerte[1].\"</td>\",$replace);\n }\n break;\n case \"[/CENTER]\":\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<center>\".$tagwert.\"</center>\",$replace);\n break;\n //\n // Inline Elemente\n // BR | IMG | LINK | -span-\n //\n case \"[/BR]\":\n if ( $sign == \"]\" ) {\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<br />\",$replace);\n } else {\n $tagwerte = explode(\"]\",$tagwert,2);\n $brwerte = explode(\";\",$tagwerte[0]);\n if ( $brwerte[0] == \"a\" ) {\n $clear = \"clear=\\\"all\\\"\";\n $style_clear = \"style=\\\"clear:both;\\\"\";\n } elseif ( $brwerte[0] == \"l\" ) {\n $clear = \"clear=\\\"left\\\"\";\n $style_clear = \"style=\\\"clear:left;\\\"\";\n } elseif ( $brwerte[0] == \"r\" ) {\n $clear = \"clear=\\\"right\\\"\";\n $style_clear = \"style=\\\"clear:right;\\\"\";\n } else {\n $clear = null;\n $style_clear = null;\n }\n if ( $specialvars[\"w3c\"] == \"strict\" ) {\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<br \".$style_clear.\"/>\",$replace);\n } else {\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<br \".$clear.\"/>\",$replace);\n }\n }\n break;\n case \"[/IMG]\":\n $replace = tagreplace_img($replace, $opentag, $tagoriginal, $closetag, $sign);\n break;\n case \"[/LINK]\":\n $replace = tagreplace_link($replace, $opentag, $tagoriginal, $closetag, $sign);\n break;\n //\n // Inline Elemente - Logische Auszeichnungen\n // AKR | EM | STRONG | CODE | CITE | -q-\n //\n case \"[/ACR]\":\n if ( $sign == \"]\" ) {\n $ausgabewert = \"<acronym>\".$tagwert.\"</acronym>\";\n $replace = str_replace($opentag.$tagoriginal.$closetag,$ausgabewert,$replace);\n } else {\n $tagwerte = explode(\"]\",$tagwert,2);\n $acrwerte = explode(\";\",$tagwerte[0]);\n $attrib = null;\n if ( isset($acrwerte[0]) ) {\n $attrib = \" title=\\\"\".$acrwerte[0].\"\\\"\";\n }\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<acronym\".$attrib.\">\".$tagwerte[1].\"</acronym>\",$replace);\n }\n break;\n case \"[/EM]\":\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<em>\".$tagwert.\"</em>\",$replace);\n break;\n case \"[/STRONG]\":\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<strong>\".$tagwert.\"</strong>\",$replace);\n break;\n case \"[/CODE]\":\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<code>\".$tagwert.\"</code>\",$replace);\n break;\n case \"[/CITE]\":\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<blockquote>\".$tagwert.\"</blockquote>\",$replace);\n break;\n //\n // Inline Elemente - Physische Auszeichnungen\n // B | I | TT | U | S, ST | BIG | SMALL | SUB | SUP\n //\n case \"[/B]\":\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<b>\".$tagwert.\"</b>\",$replace);\n break;\n case \"[/I]\":\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<i>\".$tagwert.\"</i>\",$replace);\n break;\n case \"[/TT]\":\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<tt>\".$tagwert.\"</tt>\",$replace);\n break;\n case \"[/U]\":\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<u>\".$tagwert.\"</u>\",$replace);\n break;\n case \"[/S]\":\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<s>\".$tagwert.\"</s>\",$replace);\n break;\n case \"[/ST]\":\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<strike>\".$tagwert.\"</strike>\",$replace);\n break;\n case \"[/BIG]\":\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<big>\".$tagwert.\"</big>\",$replace);\n break;\n case \"[/SMALL]\":\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<small>\".$tagwert.\"</small>\",$replace);\n break;\n case \"[/SUB]\":\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<sub>\".$tagwert.\"</sub>\",$replace);\n break;\n case \"[/SUP]\":\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<sup>\".$tagwert.\"</sup>\",$replace);\n break;\n //\n // eWeBuKi Spezial\n // E | ! | ANK | EMAIL | HS |HL | IMGB | IN | M0 | M1 | M2 | QUOTE | SP | UP | PREV | NEXT\n //\n case \"[/E]\":\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<pre>\".$tagwert.\"</pre>\",$replace);\n break;\n case \"[/!]\":\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<!--\".$tagwert.\"-->\",$replace);\n break;\n case \"[/ANK]\":\n if ( $sign == \"]\" ) {\n $ausgabewert = \"<a name=\\\"\".$tagwert.\"\\\"></a>\";\n $replace = str_replace($opentag.$tagoriginal.$closetag,$ausgabewert,$replace);\n } else {\n $tagwerte = explode(\"]\",$tagwert,2);\n $ausgabewert = \"<a name=\\\"\".$tagwerte[0].\"\\\">\".$tagwerte[1].\"</a>\";\n $replace = str_replace($opentag.$tagoriginal.$closetag,$ausgabewert,$replace);\n }\n break;\n case \"[/EMAIL]\":\n if ( $sign == \"]\" ) {\n $ausgabewert = \"<a href=\\\"mailto:\".$tagwert.\"\\\">\".$tagwert.\"</a>\";\n $replace = str_replace($opentag.$tagoriginal.$closetag,$ausgabewert,$replace);\n } else {\n $tagwerte = explode(\"]\",$tagwert,2);\n if ( !isset($tagwerte[1]) ) {\n $beschriftung = $tagwerte[0];\n } else {\n $beschriftung = $tagwerte[1];\n }\n $ausgabewert = \"<a href=\\\"mailto:\".$tagwerte[0].\"\\\">\".$beschriftung.\"</a>\";\n $replace = str_replace($opentag.$tagoriginal.$closetag,$ausgabewert,$replace);\n }\n break;\n case \"[/HS]\":\n $replace = str_replace($opentag.$tagoriginal.$closetag,$tagwert,$replace);\n break;\n case \"[/HL]\":\n if ( !isset($defaults[\"tag\"][\"hl\"]) ) {\n $defaults[\"tag\"][\"hl\"] = \"<hr />\";\n $defaults[\"tag\"][\"/hl\"] = null;\n }\n $replace = str_replace($opentag.$tagoriginal.$closetag,$defaults[\"tag\"][\"hl\"].$tagwert.$defaults[\"tag\"][\"/hl\"],$replace);\n break;\n case \"[/IMGB]\":\n $imgb_counter ++;\n if ( !isset($defaults[\"tag\"][\"img_link\"] ) ) $defaults[\"tag\"][\"img_link\"] = \"<a href=\\\"##imglnk##\\\">\";\n if ( !isset($defaults[\"tag\"][\"img_link_lb\"]) ) $defaults[\"tag\"][\"img_link_lb\"] = \"<a href=\\\"##imglnk##\\\" title=\\\"##beschriftung##\\\" ##lightbox## >\";\n if ( !isset($defaults[\"tag\"][\"/img_link\"]) ) $defaults[\"tag\"][\"/img_link\"] = \"</a>\";\n $repl = array(\"imgurl\",\"imglnk\",\"beschriftung\", \"funder\",\"fdesc\",\"lightbox\");\n\n $tagwerte = explode(\"]\",$tagwert,2);\n $imgwerte = explode(\";\",$tagwerte[0]);\n $extrawerte = explode(\":\",$imgwerte[1]);\n if ( isset($extrawerte[1]) ) $imgwerte[1] = $extrawerte[1];\n $ausgaben[\"align\"] = null; $lspace = null; $rspace = null; $ausgaben[\"imgstyle\"] = null;$ausgaben[\"float\"] = null;$ausgaben[\"class\"] = null;\n // \"id\" or \"class\" wird im template gesetzt (!#ausgaben_imgstyle)\n if ( $imgwerte[1] == \"r\" ) {\n $ausgaben[\"align\"] = \"right\";\n $ausgaben[\"float\"] = \"float:right;\";\n $ausgaben[\"class\"] = \"imgb-right\";\n if ( !isset($imgwerte[6]) ) {\n $lspace = \"10\";\n } else {\n $lspace = $imgwerte[6];\n }\n $rspace = \"0\";\n } elseif ( $imgwerte[1] == \"l\" ) {\n $ausgaben[\"align\"] = \"left\";\n $ausgaben[\"float\"] = \"float:left;\";\n $ausgaben[\"class\"] = \"imgb-left\";\n $lspace = \"0\";\n if ( !isset($imgwerte[6]) ) {\n $rspace = \"10\";\n } else {\n $rspace = $imgwerte[6];\n }\n } elseif ( isset($imgwerte[1]) ) {\n $ausgaben[\"imgstyle\"] = $imgwerte[1];\n }\n if ( isset($imgwerte[2]) ) {\n if ( $imgwerte[2] == \"0\" ) {\n $ausgaben[\"border\"] = \"border-width:0;\";\n } elseif ( $imgwerte[2] > 0 ) {\n $ausgaben[\"border\"] = \"border-width:\".$imgwerte[2].\";\";\n }\n } else {\n $ausgaben[\"border\"] = null;\n }\n if ( !isset($imgwerte[3]) ) $imgwerte[3] = null;\n if ($imgwerte[3] == \"l\" ) {\n $lightbox = \"rel=\\\"lightbox[b\".$imgb_counter.\"]\\\"\";\n }\n if ( !isset($imgwerte[4]) ) {\n $tspace = \"0\";\n } else {\n $tspace = $imgwerte[4];\n }\n if ( !isset($imgwerte[5]) ) {\n $bspace = \"0\";\n } else {\n $bspace = $imgwerte[5];\n }\n if ( !isset($tagwerte[1]) ) {\n $beschriftung = $imgwerte[0];\n } else {\n $beschriftung = $tagwerte[1];\n }\n // weitere informationen aus datenbank holen\n if ( preg_match(\"/^\\//\",$tagwerte[0]) ) {\n $img_path = explode(\"/\",str_replace($cfg[\"file\"][\"base\"][\"maindir\"],\"\",$tagwerte[0]) );\n if ( is_numeric($img_path[3]) ) {\n $fid = $img_path[3];\n } else {\n $fid = substr($tagwerte[0],0,strpos($tagwerte[0],\";\"));\n $fid = strrchr($fid,\"_\");\n $fid = substr( $fid , 1 , strpos($fid,\".\") - 1 );\n }\n $sql = \"SELECT *\n FROM site_file\n WHERE fid=\".$fid;\n $result = $db -> query($sql);\n $data = $db -> fetch_array($result,1);\n $funder = $data[\"funder\"];\n $fdesc = $data[\"fdesc\"];\n } else {\n $funder = $beschriftung;\n $fdesc = $beschriftung;\n }\n\n $ausgaben[\"linka\"] = null;\n $ausgaben[\"linkb\"] = null;\n if ( strpos($imgwerte[0],\"/\") === false ) {\n $imgfile = $pathvars[\"fileroot\"].\"images/\".$environment[\"design\"].\"/\".$imgwerte[0];\n if ( file_exists($imgfile) ) {\n $imgsize = getimagesize($imgfile);\n $ausgaben[\"imgsize\"] = \" \".$imgsize[3];\n $ausgaben[\"imgurl\"] = $pathvars[\"images\"].$imgwerte[0];\n }\n } else {\n $imgurl = $imgwerte[0];\n if ( strpos($imgurl,\"http\") === false ) {\n if ( strpos($imgwerte[0],$cfg[\"file\"][\"base\"][\"pic\"][\"root\"]) === false ) {\n $opt = explode(\"/\",str_replace($pathvars[\"subdir\"],\"\",$imgurl));\n $imgfile = $cfg[\"file\"][\"base\"][\"maindir\"]\n .$cfg[\"file\"][\"base\"][\"pic\"][\"root\"]\n .$cfg[\"file\"][\"base\"][\"pic\"][$opt[4]]\n .\"img_\".$opt[3].\".\".$opt[2];\n } elseif ( strpos($imgurl,$cfg[\"file\"][\"base\"][\"webdir\"]) !== false ) {\n $imgfile = $cfg[\"file\"][\"base\"][\"maindir\"].str_replace($cfg[\"file\"][\"base\"][\"webdir\"],\"\",$imgurl);\n } else {\n $imgfile = $pathvars[\"fileroot\"].$imgwerte[0];\n }\n if ( file_exists($imgfile) ) {\n $imgsize = getimagesize($imgfile);\n $ausgaben[\"tabwidth\"] = $imgsize[0];\n $ausgaben[\"imgsize\"] = \" \".$imgsize[3];\n } else {\n $ausgaben[\"tabwidth\"] = null;\n $ausgaben[\"imgsize\"] = null;\n }\n if ( isset($imgwerte[7]) ) {\n $bilderstrecke = \",\".$imgwerte[7];\n } else {\n $bilderstrecke = null;\n }\n if ( isset($imgwerte[3]) ) {\n if ( strpos($imgurl,$cfg[\"file\"][\"base\"][\"pic\"][\"root\"]) === false ) {\n $opt = explode(\"/\",str_replace($pathvars[\"subdir\"],\"\",$imgurl));\n $imgid = $opt[3];\n } else {\n #$opt = split(\"[_.]\",$imgurl); // deprecated\n $opt = preg_split(\"[_.]\",$imgurl);\n $imgid = $opt[1];\n }\n if ( substr( $pathvars[\"requested\"], 0, 1 ) == '/') $path = substr( $pathvars[\"requested\"], 1 );\n $path = dirname($pathvars[\"requested\"]);\n if ( substr( $path, -1 ) != '/') $path = $path.\"/\";\n $imglnk = $path.basename($pathvars[\"requested\"],\".html\").\"/view,\".$imgwerte[3].\",\".$imgid.$bilderstrecke.\".html\";\n if ( $imgwerte[3] == \"l\" ) {\n $imglnk = preg_replace(\"/\\/(tn|s|m)\\//\",\"/b/\",$imgurl);\n $ausgaben[\"linka\"] = $defaults[\"tag\"][\"img_link_lb\"];\n } else {\n $ausgaben[\"linka\"] = $defaults[\"tag\"][\"img_link\"];\n }\n foreach ( $repl as $value ) {\n if ( !isset($$value) ) $$value = null;\n $ausgaben[\"linka\"] = str_replace(\"##\".$value.\"##\",$$value,$ausgaben[\"linka\"]);\n }\n $ausgaben[\"linkb\"] = $defaults[\"tag\"][\"/img_link\"];\n\n } else {\n $ausgaben[\"linka\"] = null;\n $ausgaben[\"linkb\"] = null;\n }\n }\n $ausgaben[\"imgurl\"] = $imgurl;\n }\n $ausgaben[\"alt\"] = $beschriftung;\n $ausgaben[\"beschriftung\"] = $beschriftung;\n $ausgaben[\"funder\"] = $funder;\n $ausgaben[\"fdesc\"] = $fdesc;\n $ausgaben[\"tspace\"] = $tspace;\n $ausgaben[\"lspace\"] = $lspace;\n $ausgaben[\"rspace\"] = $rspace;\n $ausgaben[\"bspace\"] = $bspace;\n $ausgabewert = str_replace(chr(13).chr(10),\"\",parser(\"imgb\", \"\"));\n $replace = str_replace($opentag.$tagoriginal.$closetag,$ausgabewert,$replace);\n break;\n case \"[/SEL]\":\n $selection_counter ++;\n $tag_value = explode(\"]\",$tagwert,2);\n $tag_param = explode(\";\",$tag_value[0]);\n $tag_extra = explode(\":\",$tag_param[3]);\n $tag_special = explode(\":\",$tag_param[0]);\n\n if ( !preg_match(\"/[0-9]+/\", $tag_param[0]) ) {\n $sel = \"selection not ready\";\n $replace = str_replace($opentag.$tagoriginal.$closetag,$sel,$replace);\n } else {\n $path = dirname($pathvars[\"requested\"]);\n if ( substr( $path, -1 ) != '/') $path = $path.\"/\";\n $link = $path.basename($pathvars[\"requested\"],\".html\").\"/view,\".$tag_param[1].\",#,\".$tag_param[0].\",\".$tag_param[2].\".html\"; #/view,groesse,bild,selektion,thumbs\n\n if ( !isset($defaults[\"tag\"][\"sel\"]) ) $defaults[\"tag\"][\"sel\"] = \"<div style=\\\"position:relative\\\" class=\\\"selection_teaser\\\">##no_image####youtube_div##\\n<b>##title## ##youtube_link##</b>\\n##no_image_end##<div>\\n<ul>\\n\";\n if ( !isset($defaults[\"tag\"][\"*sel\"]) ) $defaults[\"tag\"][\"*sel\"] = \"<li class=\\\"thumbs\\\"##style##>\\n<a href=\\\"##link##\\\" ##lb##class=\\\"pic\\\" title=\\\"##fdesc##\\\"><img src=\\\"##tn##\\\" alt=\\\"##funder##\\\" title=\\\"##funder##\\\"/></a>\\n</li>\\n\";\n if ( !isset($defaults[\"tag\"][\"/sel\"]) ) $defaults[\"tag\"][\"/sel\"] = \"</ul>\\n</div>\\n<span##display##>g(compilation_info)(##count## g(compilation_pics))</span>\\n</div>\";\n if ( strstr($tag_param[0],\":\") ) {\n $sel_pics = null;\n foreach ( $tag_special as $pics ) {\n if ( isset($pics) ) {\n if ( $pics == \"\" ) continue;\n }\n ( isset($sel_pics) ) ? $trenner = \" ,\" : $trenner = null;\n $sel_pics .= $trenner.$pics;\n }\n if ( !isset($sel_pics) ) $sel_pics = 0;\n $sql = \"SELECT * FROM site_file WHERE fid in (\".$sel_pics.\")\";\n $sel_pics1 = explode(\":\",$tag_param[0]);\n $i = 0;\n foreach ( $sel_pics1 as $key => $value ) {\n $i++;\n $tmp_sort[$value] = $i;\n }\n\n $result = $db -> query($sql);\n $files = array();\n $sortarray = array();\n while ( $data = $db -> fetch_array($result,1) ) {\n $sortarray[] = $tmp_sort[$data[\"fid\"]];\n $files[] = array(\n \"fid\" => $data[\"fid\"],\n \"sort\" => $counter,\n \"ffart\" => $data[\"ffart\"],\n \"ffname\" => $data[\"ffname\"],\n \"funder\" => $data[\"funder\"],\n \"fdesc\" => $data[\"fdesc\"]\n );\n }\n if ( count($files) > 0 ) {\n array_multisort( $sortarray, $files);\n }\n } else {\n $sql = \"SELECT *\n FROM site_file\n WHERE fhit LIKE '%#p\".$tag_param[0].\"%'\";\n $result = $db -> query($sql);\n $files = array();\n while ( $data = $db -> fetch_array($result,1) ) {\n preg_match(\"/#p\".$tag_param[0].\"[,]*([0-9]*)#/i\",$data[\"fhit\"],$match);\n $files[$match[1]] = array(\n \"fid\" => $data[\"fid\"],\n \"sort\" => $match[1],\n \"ffart\" => $data[\"ffart\"],\n \"ffname\" => $data[\"ffname\"],\n \"funder\" => $data[\"funder\"],\n \"fdesc\" => $data[\"fdesc\"]\n );\n }\n ksort($files);\n $sort = array();\n foreach ($files as $key => $row) {\n $sort[$key] = $row['sort'];\n }\n array_multisort($sort, $files);\n\n }\n\n $sel = str_replace(\"##title##\",$tag_value[1],$defaults[\"tag\"][\"sel\"]);\n\n // wenn video-parameter vorhanden dann marken ersetzen\n if ( isset($tag_param[5]) ) {\n if ( $tag_param[5] != \"\" ) {\n $sel = str_replace(\"##youtube_div##\",\"<div class=\\\"new_box new_space_inside\\\" style=\\\"background: #EEF3FB;height:212px;width:250px;display:none\\\" id=\\\"\".$tag_param[0].\"_video\\\">\n [OBJECT=http://www.youtube.com/v/\".$tag_param[5].\"&hl=de_DE&fs=1&;250;192;application/x-shockwave-flash]\n [PARAM=movie]http://www.youtube.com/v/\".$tag_param[5].\"&hl=de_DE&fs=1&[/PARAM]\n [PARAM=wmode]transparent[/PARAM]\n [/OBJECT]\n <span style=\\\"float:right\\\"><b><a onclick=\\\"Element.setStyle('\".$tag_param[0].\"_video', 'display:none');\\\">Schliessen</a></b></span></div>\",$sel);\n $sel = str_replace(\"##youtube_link##\",\"<a onclick=\\\"Element.setStyle('\".$tag_param[0].\"_video', 'display:block;position:absolute;left:-1px;top:-228px');\\\">Video</a>\",$sel);\n } else {\n $sel = str_replace(\"##youtube_div##\",\"\",$sel);\n $sel = str_replace(\"##youtube_link##\",\"\",$sel);\n }\n } else {\n $sel = str_replace(\"##youtube_div##\",\"\",$sel);\n $sel = str_replace(\"##youtube_link##\",\"\",$sel);\n }\n\n $lb_helper = null;\n $file_counter = 0;\n foreach ( $files as $row ) {\n $file_counter ++;\n\n if ( $cfg[\"file\"][\"base\"][\"realname\"] == True ) {\n $img = $cfg[\"file\"][\"base\"][\"webdir\"]\n .$row[\"ffart\"].\"/\"\n .$row[\"fid\"].\"/\"\n .$tag_param[1].\"/\"\n .$row[\"ffname\"];\n $tn =$cfg[\"file\"][\"base\"][\"webdir\"]\n .$row[\"ffart\"].\"/\"\n .$row[\"fid\"].\"/\"\n .\"tn/\"\n .$row[\"ffname\"];\n } else {\n $img = $cfg[\"file\"][\"base\"][\"webdir\"]\n .$cfg[\"file\"][\"base\"][\"pic\"][\"root\"]\n .$cfg[\"file\"][\"base\"][\"pic\"][$tag_param[1]]\n .\"img_\".$row[\"fid\"].\".\".$row[\"ffart\"];\n $tn = $cfg[\"file\"][\"base\"][\"webdir\"]\n .$cfg[\"file\"][\"base\"][\"pic\"][\"root\"]\n .$cfg[\"file\"][\"base\"][\"pic\"][\"tn\"]\n .\"tn_\".$row[\"fid\"].\".\".$row[\"ffart\"];\n }\n\n $style = null;\n if ( !isset($tag_param[4]) ) $tag_param[4] = null;\n\n if ( !in_array( $row[\"fid\"], $tag_extra ) && $tag_param[3] != \"a\" ) {\n if ( $tag_param[4] == \"l\" ) {\n $style = \" style=\\\"display:none;\\\"\";\n } else {\n continue;\n }\n }\n\n if ( $tag_param[4] == \"l\" ) {\n $changed = $img;\n $lb = \"rel=\\\"lightbox[group_\".$selection_counter.\"]\\\" \";\n } else {\n $changed = str_replace( \"#\", $row[\"fid\"], $link);\n $lb = null;\n }\n\n if ( !isset($tag_param[3]) && $tag_param[4] == \"l\" && $file_counter == 1 ){\n $tn1 = $img;\n continue;\n }\n\n $s = array(\"##link##\", \"##lb##\", \"##tn##\", \"##img##\", \"##funder##\", \"##fdesc##\",\"##style##\");\n $r = array($changed, $lb, $tn, $img, $row[\"funder\"], $row[\"fdesc\"],$style);\n $sel .= str_replace($s,$r,$defaults[\"tag\"][\"*sel\"]);\n }\n\n if ( !isset($tag_param[3]) && $tag_param[4] == \"l\" ) {\n $ArrayReplace = array(count($files),\" style=\\\"display:none\\\"\");\n } else {\n $ArrayReplace = array(count($files),\"\");\n }\n\n $sel .= str_replace(array(\"##count##\",\"##display##\"),$ArrayReplace,$defaults[\"tag\"][\"/sel\"]);\n\n if ( !isset($tag_param[3]) ) {\n if ( $tag_param[4] == \"l\" ) {\n $sel = str_replace(\"##no_image##\",\"<a href=\\\"\".$tn1.\"\\\" \".$lb.\">\",$sel);\n $sel = str_replace(\"##no_image_end##\",\"</a>\",$sel);\n } else {\n $changed = str_replace( \"#\", $files[0][\"fid\"], $link);\n $sel = \"<a href=\\\"\".$changed.\"\\\">\".$tag_value[1].\"</a>\";\n }\n } else {\n $sel = str_replace(\"##no_image##\",\"\",$sel);\n $sel = str_replace(\"##no_image_end##\",\"\",$sel);\n }\n $replace = str_replace($opentag.$tagoriginal.$closetag,$sel,$replace);\n }\n case \"[/IN]\":\n if ( !isset($defaults[\"tag\"][\"in\"]) ) {\n $defaults[\"tag\"][\"in\"] = \"<em>\";\n $defaults[\"tag\"][\"/in\"] = \"</em>\";\n }\n $replace = str_replace($opentag.$tagoriginal.$closetag,$defaults[\"tag\"][\"in\"].$tagwert.$defaults[\"tag\"][\"/in\"],$replace);\n case \"[/M0]\":\n if ( $sign == \"]\" ) {\n $m0 = $ausgaben[\"M0\"];\n $replace = str_replace($opentag.$tagoriginal.$closetag,$m0,$replace);\n } else {\n $tagwerte = explode(\"]\",$tagwert,2);\n $m0werte = explode(\";\",$tagwerte[0]);\n if ( $m0werte[0] == \"l\" ) {\n $m0 = $ausgaben[\"L0\"];\n } else {\n $m0 = $ausgaben[\"M0\"];\n }\n $replace = str_replace($opentag.$tagoriginal.$closetag,$m0,$replace);\n }\n break;\n case \"[/M1]\":\n if ( $sign == \"]\" ) {\n if ( !isset($tagwert) ) {\n $label = \" .. \";\n } else {\n $label = $tagwert;\n }\n if ( isset($ausgaben[\"M1\"]) ) {\n $trenner = $defaults[\"split\"][\"m1\"];\n } else {\n $trenner = null;\n }\n $m1 = \"<a class=\\\"menu_punkte\\\" href=\\\"\".$ausgaben[\"UP\"].\"\\\">\".$label.\"</a>\".$trenner.$ausgaben[\"M1\"];\n $replace = str_replace($opentag.$tagoriginal.$closetag,$m1,$replace);\n } else {\n $tagwerte = explode(\"]\",$tagwert,2);\n $m1werte = explode(\";\",$tagwerte[0]);\n if ( !isset($tagwerte[1]) ) {\n $label = \" .. \";\n } else {\n $label = $tagwerte[1];\n }\n if ( $m1werte[0] == \"l\" ) {\n $m1 = null;\n if ( @$m1werte[1] == \"b\" ) {\n $m1 = $defaults[\"split\"][\"l1\"].\"<a class=\\\"menu_punkte\\\" href=\\\"\".$ausgaben[\"UP\"].\"\\\">\".$label.\"</a><br />\";\n }\n $m1 .= $ausgaben[\"L1\"];\n } else {\n $m1 = null;\n if ( @$m1werte[1] == \"b\" ) {\n if ( isset($ausgaben[\"M1\"]) ) {\n $trenner = $defaults[\"split\"][\"m1\"];\n } else {\n $trenner = \"\";\n }\n $m1 = \"<a class=\\\"menu_punkte\\\" href=\\\"\".$ausgaben[\"UP\"].\"\\\">\".$label.\"</a>\".$trenner;\n }\n $m1 .= $ausgaben[\"M1\"];\n }\n $replace = str_replace($opentag.$tagoriginal.$closetag,$m1,$replace);\n }\n break;\n case \"[/M2]\":\n if ( $sign == \"]\" ) {\n if ( !isset($tagwert) ) {\n $label = \" .. \";\n } else {\n $label = $tagwert;\n }\n if ( isset($ausgaben[\"M2\"]) ) {\n $trenner = $defaults[\"split\"][\"m2\"];\n } else {\n $trenner = null;\n }\n $m2 = \"<a class=\\\"menu_punkte\\\" href=\\\"\".$ausgaben[\"UP\"].\"\\\">\".$label.\"</a>\".$trenner.$ausgaben[\"M2\"];\n $replace = str_replace($opentag.$tagoriginal.$closetag,$m2,$replace);\n } else {\n $tagwerte = explode(\"]\",$tagwert,2);\n $m2werte = explode(\";\",$tagwerte[0]);\n if ( !isset($tagwerte[1]) ) {\n $label = \" .. \";\n } else {\n $label = $tagwerte[1];\n }\n $m2 = null;\n if ( $m2werte[0] == \"l\" ) {\n if ( @$m2werte[1] == \"b\" ) {\n $m2 = $defaults[\"split\"][\"l2\"].\"<a class=\\\"menu_punkte\\\" href=\\\"\".$ausgaben[\"UP\"].\"\\\">\".$label.\"</a><br />\";\n }\n $m2 .= $ausgaben[\"L2\"];\n } else {\n if ( $m2werte[1] == \"b\" ) {\n if ( isset($ausgaben[\"M2\"]) ) {\n $trenner = $defaults[\"split\"][\"m2\"];\n } else {\n $trenner = null;\n }\n $m2 = \"<a class=\\\"menu_punkte\\\" href=\\\"\".$ausgaben[\"UP\"].\"\\\">\".$label.\"</a>\".$trenner;\n }\n $m2 .= $ausgaben[\"M2\"];\n }\n $replace = str_replace($opentag.$tagoriginal.$closetag,$m2,$replace);\n }\n break;\n case \"[/M3]\":\n $replace = str_replace($opentag.$tagoriginal.$closetag,$ausgaben[\"M3\"],$replace);\n break;\n case \"[/UP]\":\n if ( !isset($tagwert) ) {\n $label = \" .. \";\n } else {\n $label = $tagwert;\n }\n $up = \"<a class=\\\"menu_punkte\\\" href=\\\"\".$ausgaben[\"UP\"].\"\\\">\".$label.\"</a>\";\n $replace = str_replace($opentag.$tagoriginal.$closetag,$up,$replace);\n break;\n case \"[/PREV]\":\n $replace = str_replace($opentag.$tagoriginal.$closetag,$ausgaben[\"prev\"],$replace);\n break;\n case \"[/NEXT]\":\n $replace = str_replace($opentag.$tagoriginal.$closetag,$ausgaben[\"next\"],$replace);\n break;\n case \"[/QUOTE]\":\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"&quot;\".$tagwert.\"&quot;\",$replace);\n break;\n case \"[/SP]\":\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"&nbsp;\",$replace);\n break;\n case \"[/BLOG]\":\n\n if ( $environment[\"ebene\"] == \"/wizard\" && $environment[\"kategorie\"] == \"show\" ) {\n $kat = tname2path($environment[\"parameter\"][2]);\n } else {\n if ( !isset($environment[\"ebene\"]) ) {\n $kat = \"/\".$environment[\"kategorie\"];\n } else {\n $kat = $environment[\"ebene\"].\"/\".$environment[\"kategorie\"];\n }\n }\n $tagwerte = explode(\"]\",$tagwert,2);\n $url = $tagwerte[0];\n\n // erstellen der tags die angezeigt werden\n if ( is_array($cfg[\"bloged\"][\"blogs\"][$url][\"tags\"]) ) {\n foreach ( $cfg[\"bloged\"][\"blogs\"][$url][\"tags\"] as $key => $value) {\n $tags[$key] = $value;\n }\n }\n\n require_once $pathvars[\"moduleroot\"].\"libraries/function_menu_convert.inc.php\";\n require_once $pathvars[\"moduleroot\"].\"libraries/function_show_blog.inc.php\";\n\n if ( !isset($environment[\"parameter\"][2]) || $environment[\"ebene\"] == \"/wizard\" ) {\n $dataloop[\"list\"] = show_blog($url,$tags,$cfg[\"auth\"][\"ghost\"][\"contented\"],$cfg[\"bloged\"][\"blogs\"][$url][\"rows\"],$kat);\n } else {\n $all = show_blog($url,$tags,$cfg[\"auth\"][\"ghost\"][\"contented\"],$cfg[\"bloged\"][\"blogs\"][$url][\"rows\"],$kat);\n unset($hidedata[\"new\"]);\n $hidedata[\"all\"][\"inhalt\"] = $all[1][\"all\"];\n }\n\n if ( isset($cfg[\"bloged\"][\"blogs\"][$url][\"category\"]) ) {\n $replace = str_replace($opentag.$tagoriginal.$closetag,parser($mapping[\"main\"],\"\"),$replace);\n } else {\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"not allowed\",$replace);\n }\n break;\n case \"[/OBJECT]\":\n $tagwerte = explode(\"]\",$tagwert,2);\n $objectwerte = explode(\";\",$tagwerte[0]);\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<object type=\\\"\".$objectwerte[3].\"\\\" data=\\\"\".$objectwerte[0].\"\\\" width=\\\"\".$objectwerte[1].\"\\\" height=\\\"\".$objectwerte[2].\"\\\">\".$tagwerte[1].\"</object>\",$replace);\n break;\n case \"[/PARAM]\":\n $tagwerte = explode(\"]\",$tagwert,2);\n $replace = str_replace($opentag.$tagoriginal.$closetag,\"<param name=\\\"\".$tagwerte[0].\"\\\" value=\\\"\".$tagwerte[1].\"\\\"></param>\",$replace);\n break;\n case \"[/YT]\":\n // para0 = ausrichtung, para1 = breite, para2 = hoehe,\n // para3 = datenschutz aus, para4 = showinfo on, para5 = video tipps\n $tagwerte = explode(\"]\",$tagwert,2);\n $ytwerte = explode(\";\",$tagwerte[0]);\n $src = \"//www.youtube-nocookie.com/embed/\".$tagwerte[1].\"?autohide=1\";\n $class = null;\n $style = null;\n if ( isset($ytwerte[0]) ) $class = \" class=\\\"\".$ytwerte[0].\"\\\"\";\n if ( $ytwerte[0] == \"l\") { $style = \" style=\\\"float:left\\\"\"; $class = \"\"; }\n if ( $ytwerte[0] == \"r\") { $style = \" style=\\\"float:right\\\"\"; $class = \"\"; }\n if ( $ytwerte[3] == \"-1\") $src = \"//www.youtube.com/embed/\".$tagwerte[1].\"?autohide=1\";\n if ( !isset($ytwerte[4]) ) $src .= \"&showinfo=0\";\n if ( $ytwerte[4] == \"-1\") $src .= \"&showinfo=1\";\n if ( $ytwerte[5] != \"-1\") $src .= \"&rel=0\";\n $yt = null;\n if ( isset($ytwerte[0]) ) $yt = \"<div\".$class.$style.\">\\n\";\n $yt .= \"<iframe width=\\\"\".$ytwerte[1].\"\\\" height=\\\"\".$ytwerte[2].\"\\\" src=\\\"\".$src.\"\\\" frameborder=\\\"0\\\" allowfullscreen></iframe>\\n\";\n if ( isset($ytwerte[0]) ) $yt .= \"</div>\\n\";\n $replace = str_replace($opentag.$tagoriginal.$closetag,$yt,$replace);\n break;\n case \"[/OYT]\":\n // para1 = ausrichtung, para2 = weite, para3 = hoehe, para4 = 2klick, para5 = youtube info anzeigen\n $tagwerte = explode(\"]\",$tagwert,2);\n $ytwerte = explode(\";\",$tagwerte[0]);\n if ( !isset($ytwerte[4]) ) $ytwerte[4] = null;\n $ytalign = \"left\";\n $ytinfo = \"&showinfo=0\";\n if ( $ytwerte[0] == \"r\") $ytalign = \"right\";\n if ( $ytwerte[4] == \"-1\") $ytinfo = \"&showinfo=1\";\n $src = \"//www.youtube.com/embed/\".$tagwerte[1];\n $yt = \"<div class=\\\"youtube\\\" style=\\\"float:\".$ytalign.\";width:\".$ytwerte[1].\"\\\">\";\n if ( !isset($ausgaben[\"yt_counter\"]) ) $ausgaben[\"yt_counter\"] = null;;\n $ausgaben[\"yt_counter\"]++;\n $ausgaben[\"yt_width\"] = $ytwerte[1];\n $ausgaben[\"yt_height\"] = $ytwerte[2];\n $ausgaben[\"yt_align\"] = $ytalign;\n $ausgaben[\"yt_id\"] = $tagwerte[1];\n $yt .= parser(\"youtube_head\",'');\n $yt .= \"<iframe width=\\\"100%\\\" height=\\\"\".$ytwerte[2].\"\\\" src=\\\"\".$src.\"?autohide=1&wmode=opaque\".$ytinfo.\"\\\" frameborder=\\\"0\\\" allowfullscreen></iframe>\";\n $yt .= \"</div>\";\n if ( $ytwerte[3] == -1 && @!$_COOKIE[\"youtube_access\"]) {\n $yt = parser(\"youtube\",'');\n }\n $replace = str_replace($opentag.$tagoriginal.$closetag,$yt,$replace);\n break;\n case \"[/VIDEO]\":\n $tagwerte = explode(\"]\",$tagwert,2);\n $ytwerte = explode(\";\",$tagwerte[0]);\n $video = \"<video controls width=\\\"\".$ytwerte[0].\"\\\" height=\\\"\".$ytwerte[1].\"\\\"\";\n $video .= \"<source src=\\\"\".$tagwerte[1].\"\\\"></source>\";\n $video .= \"<object><embed width=\\\"\".$ytwerte[0].\"\\\" height=\\\"\".$ytwerte[1].\"\\\" src=\\\"\".$tagwerte[1].\"\\\" type= \\\"application/x-shockwave-flash\\\" allowfullscreen=\\\"false\\\" allowscriptaccess=\\\"always\\\" /></object>\";\n $video .= \"</video>\";\n $replace = str_replace($opentag.$tagoriginal.$closetag,$video,$replace);\n break;\n default:\n $extra_tag = str_replace(array(\"/\",\"]\",\"[\"),array(\"\",\"\",\"\"),$closetag);\n if ( $defaults[\"extra_tags\"][$extra_tag] != \"\" ) {\n if ( file_exists($pathvars[\"moduleroot\"].$defaults[\"extra_tags\"][$extra_tag]) ) {\n include $pathvars[\"moduleroot\"].$defaults[\"extra_tags\"][$extra_tag];\n break;\n }\n }\n // unbekannte tags verstecken\n $replace = str_replace($closetag,\"[##\".substr($closetag,1),$replace);\n }\n }\n }\n // unbekannte tags wiederherstellen\n $replace = str_replace(\"[##/\",\"[/\",$replace);\n\n return $replace;\n }", "title": "" }, { "docid": "63d0cb1d93d737128327836db1c168b9", "score": "0.5890638", "text": "function XMLEncode($text, $breaks=false) {\n $text = htmlspecialchars($text);\n if ($breaks) {\n $text = str_replace(\"\\n\", '<br/>', $text);\n }\n return $text;\n}", "title": "" }, { "docid": "ac55cb687caf02abbcacca7e06bec50c", "score": "0.5863113", "text": "function textToHtml($temp)\n{\n\n\t$temp = preg_replace(\"/'''(('?[^\\n'])*)'''/\", \"<strong>\\\\1</strong>\", $temp);\n\n $temp = preg_replace(\"/([^*]{2}|)\\n/\",\"\\\\1<br />\", $temp);\n\n $temp = preg_replace(\"/''(('?[^\\n'])*)''/\", \"<em>\\\\1</em>\", $temp);\n\n//$temp = preg_replace(\"/\\*\\*(.*?)\\*\\*/\", \"<blockquote>\\\\1</blockquote>\", $temp);\n //$temp = str_replace(\"----\", \"<hr />\", $temp);\n\n $temp = preg_replace(\"/(([^[]|^)(http)+(s)?:(\\/\\/)|([^\\[\\/]|^)(www\\.))((\\w|\\.|\\-|_)+)(\\/)?(\\S+)?/i\", \"\\\\2\\\\6<a href=\\\"http\\\\4://\\\\7\\\\8\\\\10\\\\11\\\" title=\\\"\\\\0\\\">\\\\7\\\\8</a>\", $temp);\n\t//[\n\t$temp = preg_replace(\"/\\[(http[s]?:\\/\\/)([-a-z0-9_]{2,}\\.[-a-z0-9.]{2,}[-a-z0-9\\/&\\?=.;~_%]*) (.+?)\\]/i\",\n\t\"<a href=\\\"\\\\1\\\\2\\\" title=\\\"\\\\1\\\\2\\\">\\\\3</a>\", $temp);\n\n\t$temp = preg_replace(\"/\\[www\\.([-a-z0-9.]{2,}[-a-z0-9\\/&\\?=.~_%]*) (.+?)\\]/i\",\n\t\"<a href=\\\"http://www.\\\\1\\\" title=\\\"www.\\\\1\\\">\\\\2</a>\", $temp);\n\n\n\treturn $temp;\n\n}", "title": "" }, { "docid": "8352822a5fdce21f8443317505816e92", "score": "0.58576417", "text": "function _parsePost($input, $smileys=true, $bbcode=true, $nl2br=true){\n\n$output=$input;\n\n//vyhodnoceni BBCode\nif(_bbcode and $bbcode){\n $output=_parseBBCode($output);\n}\n\n//vyhodnoceni smajlu\nif(_smileys and $smileys){\n $output=preg_replace('/\\*(\\d{1,3})\\*/s', '<img src=\\''._indexroot.'templates/'._template.'/images/smileys/$1.gif\\' alt=\\'$1\\' class=\\'post-smiley\\' />', $output, 32);\n}\n\n//prevedeni novych radku\nif($nl2br){\n $output=nl2br($output);\n}\n\n//navrat vystupu\nreturn $output;\n\n}", "title": "" }, { "docid": "4d9241943217b406d8259fbbef627cb7", "score": "0.58505493", "text": "function blossom_recipe_escape_text_tags( $text ) {\r\n return (string) str_replace( array( \"\\r\", \"\\n\" ), '', strip_tags( $text ) );\r\n}", "title": "" }, { "docid": "aeb8a96d449c669d5d226469170e5cc2", "score": "0.58425003", "text": "function fusion_builder_fix_shortcodes( $content ) {\n\t$replace_tags_from_to = array(\n\t\t'<p>[' => '[',\n\t\t']</p>' => ']',\n\t\t']<br />' => ']',\n\t\t\"<br />\\n[\" => '[',\n\t);\n\n\treturn strtr( $content, $replace_tags_from_to );\n}", "title": "" }, { "docid": "0303ddf4d50421ae716990fa7f38610d", "score": "0.5842367", "text": "function bb_spacefy($st) {\n $whole_match = $st[0];\n $captured = $st[1];\n $spacefied = preg_replace(\"/\\[(.*?)\\]/\", \"[ $1 ]\", $captured);\n $new_str = str_replace($captured, $spacefied, $whole_match);\n return $new_str;\n}", "title": "" }, { "docid": "ac2b7af083ec16a4915ffc4293b22f10", "score": "0.5835611", "text": "protected function _replaceText( $txt )\n\t{\n\t\t$_tags = $this->_retrieveTags();\n\t\t\n\t\t/* Convert old indent tags over */\n\t\tif ( stristr( $txt, '[indent]' ) )\n\t\t{\n\t\t\t$txt = str_ireplace( '[indent]', '[indent=1]', $txt );\n\t\t}\n\t\t\n\t\tforeach( $_tags as $_tag )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Infinite loop catcher\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$_iteration\t= 0;\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Start building open tag\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$open_tag = '[' . $_tag . '=';\n\t\n\t\t\t//-----------------------------------------\n\t\t\t// Doz I can haz opin tag? Loopy loo\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\twhile( ( $this->cur_pos = stripos( $txt, $open_tag, $this->cur_pos ) ) !== false )\n\t\t\t{\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Stop infinite loops\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\tif( $_iteration > $this->settings['max_bbcodes_per_post'] )\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$_iteration++;\n\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Grab the new position to jump to\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$new_pos = strpos( $txt, ']', $this->cur_pos ) ? strpos( $txt, ']', $this->cur_pos ) : $this->cur_pos + 1;\n\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Extract the option (like surgery)\n\t\t\t\t//-----------------------------------------\n\t\n\t\t\t\t$_content\t= '';\n\t\t\t\t$_option\t= substr( $txt, $this->cur_pos + strlen($open_tag), (strpos( $txt, ']', $this->cur_pos ) - ($this->cur_pos + strlen($open_tag))) );\n\t\n\t\t\t\t$close_tag\t= '[/' . $_tag . ']';\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Protect against XSS\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$_option = intval($_option);\n\t\t\t\t$_option = ( $_option ) ? $_option : 1;\n\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// No closing tag\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\tif ( $_option !== false AND stripos( $txt, $close_tag, $new_pos ) !== false )\n\t\t\t\t{\n\t\t\t\t\t$_content\t= substr( $txt, ($this->cur_pos + strlen($open_tag) + strlen($_option) + 1), (stripos( $txt, $close_tag, $this->cur_pos ) - ($this->cur_pos + strlen($open_tag) + strlen($_option) + 1)) );\n\t\t\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// If this is a single tag, that's it\n\t\t\t\t\t//-----------------------------------------\n\n\t\t\t\t\tif( preg_match( '/\\S/', $_content ) ) /* Make sure we don't miss this, if there's only a 0 for the content. Bug #21610 */\n\t\t\t\t\t{\n\t\t\t\t\t\t$txt = substr_replace( $txt, $this->_buildOutput( $_option, $_content ), $this->cur_pos, (stripos( $txt, $close_tag, $this->cur_pos ) + strlen($close_tag) - $this->cur_pos) );\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$txt = substr_replace( $txt, '', $this->cur_pos, (stripos( $txt, $close_tag, $this->cur_pos ) + strlen($close_tag) - $this->cur_pos) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// And reset current position to end of open tag\n\t\t\t\t//-----------------------------------------\n\n\t\t\t\t$this->cur_pos = stripos( $txt, $open_tag ) ? stripos( $txt, $open_tag ) : $this->cur_pos + 1; //$new_pos;\n\n\t\t\t\tif( $this->cur_pos > strlen($txt) )\n\t\t\t\t{\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Need to reset for next \"tag\"\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\n\t\t\t\t\t$this->cur_pos\t= 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $txt;\n\t}", "title": "" }, { "docid": "6ae7b1efd56b717c737665e45ccbcc17", "score": "0.5835565", "text": "function dangopress_esc_callback($matches)\n {\n $tag_open = $matches[1];\n $content = $matches[2];\n $tag_close = $matches[3];\n\n //$content = htmlspecialchars($content, ENT_NOQUOTES, get_bloginfo('charset'));\n $content = esc_html($content);\n $tag_open = preg_replace('/<pre>[\\n\\s]*<code>/', '<pre class=\"prettyprint\"><code>', $tag_open);\n\n return $tag_open . $content . $tag_close;\n}", "title": "" }, { "docid": "d7e6dc4d6e9411f44c61569c052a3fd4", "score": "0.5819555", "text": "function nestedTextTags($input)\n{\n $str = \"\";\n if (is_array($input))\n $str = \"<$input[1]>\" . $input[2] . \"</$input[1]>\";\n else\n $str = $input;\n return preg_replace_callback(\"/\\[([bisu])\\](.*?)\\[\\/\\\\1\\]/i\", 'nestedTextTags', $str);\n}", "title": "" }, { "docid": "d7e6dc4d6e9411f44c61569c052a3fd4", "score": "0.5819555", "text": "function nestedTextTags($input)\n{\n $str = \"\";\n if (is_array($input))\n $str = \"<$input[1]>\" . $input[2] . \"</$input[1]>\";\n else\n $str = $input;\n return preg_replace_callback(\"/\\[([bisu])\\](.*?)\\[\\/\\\\1\\]/i\", 'nestedTextTags', $str);\n}", "title": "" }, { "docid": "00aafb76aeee8dd10294f5098bdd8aa8", "score": "0.5816324", "text": "function convert_tags($t=\"\")\n\t{\n\t\t# IPB 2.1+ Kernel\n\t\t//$t = preg_replace( \"/{?\\\\\\$this->ipsclass->base_url}?/\" , \"{ipb.script_url}\" , $t );\n\t\t//$t = preg_replace( \"/{?\\\\\\$this->ipsclass->session_id}?/\" , \"{ipb.session_id}\" , $t );\n\t\t//$t = preg_replace( \"#\\\\\\$this->ipsclass->(member|vars|skin|lang|input)#i\" , \"ipb.\\\\1\", $t );\n\t\t\n\t\t//----------------------------------------\n\t\t// Make some tags safe..\n\t\t//----------------------------------------\n\t\t\n\t\t$t = preg_replace( \"/\\{ipb\\.vars\\[(['\\\"])?(sql_driver|sql_host|sql_database|sql_pass|sql_user|sql_port|sql_tbl_prefix|smtp_host|smtp_port|smtp_user|smtp_pass|html_dir|base_dir|upload_dir)(['\\\"])?\\]\\}/\", \"\" , $t );\n\t\t\t\t\n\t\treturn $t;\n\t}", "title": "" }, { "docid": "56de23974dc0c5c7cd7de628597205c4", "score": "0.57864475", "text": "function ag_fix_shortcodes($content){ \r\n\t\t$array = array (\r\n\t\t\t'<p>[' => '[', \r\n\t\t\t']</p>' => ']', \r\n\t\t\t']<br />' => ']'\r\n\t\t);\r\n\t\t$content = strtr($content, $array);\r\n\t\treturn $content;\r\n\t}", "title": "" }, { "docid": "3946154cb8922d201e736bdfd3fee16d", "score": "0.5783745", "text": "public function brownTags(){\n//that I have found\n$tag[]='abl';\t$tagHelp[]='pre-qualifier\tquite, rather';\n$tag[]='abn';\t$tagHelp[]='pre-quantifier\thalf, all';\n$tag[]='abx';\t$tagHelp[]='pre-quantifier\tboth';\n$tag[]='ap';\t$tagHelp[]='post-determiner\tmany, several, next';\n$tag[]='at'; $tagHelp[]='article\ta, the, no';\n$tag[]='be';\t$tagHelp[]='be';\t \n$tag[]='bed';\t$tagHelp[]='were';\t \n$tag[]='bedz';$tagHelp[]='was';\t\n$tag[]='bedz*';$tagHelp[]='was';\t\n$tag[]='beg'; $tagHelp[]='being';\t \n$tag[]='bem'; \n$tag[]='bem*';\n$tag[]='ben';\n$tag[]='ber';\n$tag[]='ber*';\n$tag[]='bez';\n$tag[]='bez*';\n$tag[]='cc';\n$tag[]='cd';\n$tag[]='cd$';\n$tag[]='cs';\n$tag[]='do';\n$tag[]='do*';\n$tag[]='do+ppss';\n$tag[]='dod';\n$tag[]='dod*';\n$tag[]='doz';\n$tag[]='doz*';\n$tag[]='dt';\n$tag[]='dt$';\n$tag[]='dt+bez';\n$tag[]='dt+md';\n$tag[]='dti';\n$tag[]='dts';\n$tag[]='dts+bez';\n$tag[]='dtx';\n$tag[]='ex';\n$tag[]='ex+bez';\n$tag[]='ex+hvd';\n$tag[]='ex+hvz';\n$tag[]='ex-md';\n$tag[]='fw'; //foreign word (hyphenated before regular tag)\n$tag[]='fw-jj'; //foreign word (hyphenated before regular tag)\n$tag[]='hl';\t//word occurring in headline (hyphenated after regular tag)\t \n$tag[]='hv';\t//have\t \n$tag[]='hvd';\t//had (past tense)\t \n$tag[]='hvg';\t//having\t \n$tag[]='hvn';\t//had (past participle)\t \n$tag[]='hvz';\t//has\n$tag[]='in';\t//preposition\n$tag[]='jj';\t//adjective\t unmeritorious, political, periodic,\n$tag[]='jjr';\t//comparative adjective\t \n$tag[]='jjs';\t//semantically superlative adjective\tchief, top\n$tag[]='jjt';\t//morphologically superlative adjective\tbiggest\n$tag[]='md';\t//modal auxiliary\tcan, should, will\n$tag[]='nn';\t//singular or mass noun\t \n$tag[]='nn$';\t//possessive singular noun\t \n$tag[]='nns';\t//plural noun\t \n$tag[]='np';\t//proper noun or part of name phrase\t \n$tag[]='np$';\t//possessive proper noun\t \n$tag[]='nps';\t//plural proper noun\t \n$tag[]='nps$';\t//possessive plural proper noun\t \n$tag[]='nr';\t//adverbial noun\thome, today, west\n$tag[]='od';//\tordinal numeral\tfirst, 2nd\n$tag[]='pn';//\tnominal pronoun\teverybody, nothing\n$tag[]='pn$';\t//possessive nominal pronoun\t \n$tag[]='pp$';\t//possessive personal pronoun\tmy, our\n$tag[]='pp$$';\t//second (nominal) possessive pronoun\tmine, ours\n$tag[]='ppl';\t//singular reflexive/intensive personal pronoun\tmyself\n$tag[]='ppls';//\tplural reflexive/intensive personal pronoun\tourselves\n$tag[]='ppo';//\tobjective personal pronoun\tme, him, it, them\n$tag[]='pps';//\t3rd. singular nominative pronoun\the, she, it, one\n$tag[]='ppss';//\tother nominative personal pronoun\tI, we, they, you\n$tag[]='ql';//\tqualifier\tvery, fairly\n$tag[]='qlp';//\tpost-qualifier\tenough, indeed\n$tag[]='rb';\t//adverb\t \n$tag[]='rbr';\t//comparative adverb\t \n$tag[]='rbt';\t//superlative adverb\t \n$tag[]='rn';\t//nominal adverb\there then, indoors\t \n$tag[]='rp';//\tadverb/particle\tabout, off, up\n$tag[]='tl';//\tword occurring in title (hyphenated after\t \n \t//regular tag)\t \n$tag[]='to';//\tinfinitive marker to\n$tag[]='uh';\t//interjection, exclamation\t \n$tag[]='vb';\t//verb, base form\t \n$tag[]='vbd';\t//verb, past tense\t \n$tag[]='vbg';\t//verb, present participle/gerund\t \n$tag[]='vbn';\t//verb, past participle\t \n$tag[]='vbz';\t//verb, 3rd. singular present\n$tag[]='wdt';\t//wh- determiner\twhat, which\n$tag[]='wp$';\t//possessive wh- pronoun\twhose\n$tag[]='wpo';\t//objective wh- pronoun\twhom, which, that\n$tag[]='wps';\t//nominative wh- pronoun\twho, which, that\n$tag[]='wql';\t//wh- qualifier\thow\n$tag[]='wrb';\t//wh- adverb\thow, where, when\nreturn $tag;\n}", "title": "" }, { "docid": "eda3c3ff39703e3f98fbcf1ec130de53", "score": "0.577992", "text": "function news_parse(&$message)\r\n{\r\n global $user, $eqdkp, $SID, $pm, $eqdkp_hooks, $conf_plus, $bbcode, $eqdkp_root_path;\r\n \r\n // Security: Do not allow html Tags and javascript\r\n\r\n if ($user->lang['ENCODING'] == 'EUC-KR'){\r\n $message = htmlspecialchars(strip_tags($message), ENT_QUOTES);\r\n }else{\r\n $message = htmlentities(strip_tags($message), ENT_QUOTES);\r\n }\r\n \r\n // Video Links\r\n $message = $bbcode->EmbeddedVideo($message);\r\n\t //$message = nl2br($message);\r\n\t \r\n\t // Perform BB Code\r\n $message = $bbcode->toHTML($message, false);\r\n \r\n // Emotion Code\r\n $bbcode->SetSmiliePath($eqdkp_root_path.'libraries/jquery/images/editor/icons');\r\n \r\n // BB Code Plugin Hook\r\n $patterns = array();\r\n $replacements = array();\r\n $count = sizeof($patterns);\r\n if ( @is_object($pm) )\r\n {\r\n $plugin_news = $pm->do_hooks('news_parse');\r\n if(!empty($plugin_news))\r\n {\r\n foreach ( $plugin_news as $news_array )\r\n {\r\n if(!empty($news_array) && is_array($news_array))\r\n {\r\n foreach ( $news_array as $find_replace )\r\n {\r\n if ( (isset($find_replace['patterns'])) && (isset($find_replace['replacements'])) )\r\n {\r\n $count++;\r\n $patterns[$count] = $find_replace['patterns'];\r\n $replacements[$count] = $find_replace['replacements'];\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n $message = preg_replace($patterns, $replacements, $message);\r\n $message = $bbcode->MyEmoticons($message);\r\n return $message;\r\n}", "title": "" }, { "docid": "11685dc38dd43e0db0a39075b394fdbd", "score": "0.57741916", "text": "function placetags($html)\n\t{\n\t$content = preg_replace('/(<h1[^>]*>).*?<\\/h1>/i', '$1#h1content#</h1>', $html);\n\t$content = preg_replace('/(<h2[^>]*>).*?<\\/h2>/i', '$1#h2content#</h2>', $content);\n\t$content = preg_replace('/(<h3[^>]*>).*?<\\/h3>/i', '$1#h3content#</h3>', $content);\n\t$content = preg_replace('/(<h4[^>]*>).*?<\\/h4>/i', '$1#h4content#</h4>', $content);\n\t$content = preg_replace('/(<h5[^>]*>).*?<\\/h5>/i', '$1#h5content#</h5>', $content);\n $content = preg_replace('/(<h6[^>]*>).*?<\\/h6>/i', '$1#h6content#</h6>', $content);\n\t\n\t$content = preg_replace('/(<p[^>]*>).*?<\\/p>/i', '$1#paracontent#</p>', $content);\n\t\n\t$content = preg_replace('/(<blockquote[^>]*>).*?<\\/blockquote>/i', '$1#blockquotecontent#</blockquote>', $content);\n\t\n $content = cut_li($content, 'li');\n\t\n\t$content = cut_pre($content, 'pre');\n\t\n\t$content = cut_general($content, 'form');\n\t\n\t//$content = preg_replace('/(<pre[^>]*>).*?<\\/pre>/i', '$1#precontent#</pre>', $content);\n\t//$content = preg_replace('/(<form[^>]*>).*?<\\/form>/i', '$1#formcontent#</form>', $content);\n\t\n\t\n\t$content = preg_replace('/(<th[^>]*>).*?<\\/th>/i', '$1#thcontent#</th>', $content);\n $content = preg_replace('/(<td[^>]*>).*?<\\/td>/i', '$1#tdcontent#</td>', $content);\n\t\n\t\n\t\n\t$content = preg_replace('/(<option[^>]*>).*?<\\/option>/i', '$1#optioncontent#</option>', $content);\n\t\n $content = preg_replace('/(<label[^>]*>).*?<\\/label>/i', '$1#labelcontent#</label>', $content);\n\n\tinclude_once(\"testing.php\");\n\t$content_result = test_heading($content,\"h1\");\n\tif($content_result == false)\n\t{\n\techo \"<br>Testing : H1 tag found without replacement<br>\";\n\t}\n\telse\n\t{\n\techo \"<br>Testing Successful for h1\";\n\t}\n\t\n\t$content_result = test_heading($content,\"h2\");\n\tif($content_result == false)\n\t{\n\techo \"<br>Testing : H2 tag found without replacement<br>\";\n\t}\n\telse\n\t{\n\techo \"<br>Testing Successful for h2\";\n\t}\n\n\t\n\t$content_result = test_heading($content,\"h3\");\n\tif($content_result == false)\n\t{\n\techo \"<br>Testing : H3 tag found without replacement<br>\";\n\t}\n\telse\n\t{\n\techo \"<br>Testing Successful for h3\";\n\t}\n\t\n\t\n\t$content_result = test_heading($content,\"h4\");\n\tif($content_result == false)\n\t{\n\techo \"<br>Testing : H4 tag found without replacement<br>\";\n\t}\n\telse\n\t{\n\techo \"<br>Testing Successful for h4\";\n\t}\n\t\n\t\n\t$content_result = test_heading($content,\"h5\");\n\tif($content_result == false)\n\t{\n\techo \"<br>Testing : H5 tag found without replacement<br>\";\n\t}\n\telse\n\t{\n\techo \"<br>Testing Successful for h5\";\n\t}\n\t\n\t$content_result = test_heading($content,\"h6\");\n\tif($content_result == false)\n\t{\n\techo \"<br>Testing : H6 tag found without replacement<br>\";\n\t}\n\telse\n\t{\n\techo \"<br>Testing Successful for h6\";\n\t}\n\n\t$content_result = test_paragraph($content,\"p\");\n\tif($content_result == false)\n\t{\n\techo \"<br>Testing : P tag found without replacement<br>\";\n\t}\n\telse\n\t{\n\techo \"<br>Testing Successful for P\";\n\t}\n\t\n\t$content_result = test_general($content,\"blockquote\");\n\tif($content_result == false)\n\t{\n\techo \"<br>Testing : Blockquote tag found without replacement<br>\";\n\t}\n\telse\n\t{\n\techo \"<br>Testing Successful for Blockquote\";\n\t}\n\t\n\t/* As of now we are not testing for LI \n\t\n\t$content_result = test_general($content,\"li\");\n\tif($content_result == false)\n\t{\n\techo \"<br>Testing : Li tag found without replacement<br>\";\n\t}\n\telse\n\t{\t\n\techo \"<br>Testing Successful for Li\";\n\t} \n\t\n\t //END */\n\t\n\t$content_result = test_general($content,\"td\");\n\tif($content_result == false)\n\t{\n\techo \"<br>Testing : td tag found without replacement<br>\";\n\t}\n\telse\n\t{\n\techo \"<br>Testing Successful for td\";\n\t} \n\t\n\t$content_result = test_general($content,\"th\");\n\tif($content_result == false)\n\t{\n\techo \"<br>Testing : TH tag found without replacement<br>\";\n\t}\n\telse\n\t{\n\techo \"<br>Testing Successful for TH\";\n\t} \n\t\n\t$content_result = test_general($content,\"option\");\n\tif($content_result == false)\n\t{\n\techo \"<br>Testing : Option tag found without replacement<br>\";\n\t}\n\telse\n\t{\n\techo \"<br>Testing Successful for Option\";\n\t}\n\t\n\t$content_result = test_general($content,\"label\");\n\tif($content_result == false)\n\t{\n\techo \"<br>Testing : Label tag found without replacement<br>\";\n\t}\n\telse\n\t{\n\techo \"<br>Testing Successful for label\";\n\t} \n\t\n\t\n\t$content_result = test_general($content,\"form\");\n\tif($content_result == false)\n\t{\n\techo \"<br>Testing : Form tag found without replacement<br>\";\n\t}\n\telse\n\t{\n\techo \"<br>Testing Successful for form\";\n\t}\n\t\n\t$content_result = test_general($content,\"pre\");\n\tif($content_result == false)\n\t{\n\techo \"<br>Testing : Pre tag found without replacement<br>\";\n\t}\n\telse\n\t{\n\techo \"<br>Testing Successful for pre\";\n\t}\n \n\t \n\t echo $content;\n\t}", "title": "" }, { "docid": "e2606770fb82dcb261964152416a06fb", "score": "0.5762122", "text": "function preparsecode_html_callback($matches)\n{\n\treturn '[html]' . strtr(un_htmlspecialchars($matches[1]), array(\"\\n\" => '&#13;', ' ' => ' &#32;', '[' => '&#91;', ']' => '&#93;')) . '[/html]';\n}", "title": "" }, { "docid": "fe1fed7e7227e7324bf5f3666d892299", "score": "0.5752132", "text": "function highlightHTML($s) {\n $s = preg_replace(\"|<([^/?]*)\\s(.*)>|isU\", \"[1]<[2]\\\\1[/2] [5]\\\\2[/5]>[/1]\", $s);\n $s = preg_replace(\"|</(.*)>|isU\", \"[1]</[2]\\\\1[/2]>[/1]\", $s);\n $s = preg_replace(\"|<\\?(.*)\\?>|isU\", \"[3]<?\\\\1?>[/3]\", $s);\n $s = preg_replace(\"|\\=\\\"(.*)\\\"|isU\", \"[6]=[/6][4]\\\"\\\\1\\\"[/4]\", $s);\n $s = htmlspecialchars($s);\n\n $replace = array(1 => '0000FF', 2 => '0000FF', 3 => '800000', 4 => '800080', 5 => '009900', 6 => '0000FF');\n foreach($replace as $k => $v){\n $s = preg_replace(\"|\\[\".$k.\"\\](.*)\\[/\".$k.\"\\]|isU\", \"<font color=\\\"\".$v.\"\\\">\\\\1</font>\", $s);\n }\n return '<small class=\"codeType\">HTML</small>'.$s;\n }", "title": "" }, { "docid": "2e1da25afb0d24314b85d9160fe5ba6c", "score": "0.5716501", "text": "function clean_inside_tags($txt,$tags){\n\t \t\tpreg_match_all(\"/<([^>]+)>/i\",$tags,$allTags,PREG_PATTERN_ORDER);\n\t\t\tforeach ($allTags[1] as $tag){\n\t\t\t\t$txt = preg_replace(\"/<\".$tag.\"[^>]*>/i\",\"<\".$tag.\">\",$txt);\n\t\t\t}\n\t\t\treturn $txt;\n\t\t}", "title": "" }, { "docid": "dcc9383e778620b68347fcb4ba0da88c", "score": "0.57096833", "text": "function bbcode_init()\n\t{\n\t\tstatic $rowset;\n\n\t\t// This array holds all bbcode data. BBCodes will be processed in this\n\t\t// order, so it is important to keep [code] in first position and\n\t\t// [quote] in second position.\n\t\t$this->bbcodes = array(\n\t\t\t'code'\t\t\t=> array('bbcode_id' => 8,\t'regexp' => array('#\\[code(?:=([a-z]+))?\\](.+\\[/code\\])#ise' => \"\\$this->bbcode_code('\\$1', '\\$2')\")),\n\t\t\t'quote'\t\t\t=> array('bbcode_id' => 0,\t'regexp' => array('#\\[quote(?:=&quot;(.*?)&quot;)?\\](.+)\\[/quote\\]#ise' => \"\\$this->bbcode_quote('\\$0')\")),\n\t\t\t'attachment'\t=> array('bbcode_id' => 12,\t'regexp' => array('#\\[attachment=([0-9]+)\\](.*?)\\[/attachment\\]#ise' => \"\\$this->bbcode_attachment('\\$1', '\\$2')\")),\n\t\t\t'b'\t\t\t\t=> array('bbcode_id' => 1,\t'regexp' => array('#\\[b\\](.*?)\\[/b\\]#ise' => \"\\$this->bbcode_strong('\\$1')\")),\n\t\t\t'i'\t\t\t\t=> array('bbcode_id' => 2,\t'regexp' => array('#\\[i\\](.*?)\\[/i\\]#ise' => \"\\$this->bbcode_italic('\\$1')\")),\n\t\t\t'url'\t\t\t=> array('bbcode_id' => 3,\t'regexp' => array('#\\[url(=(.*))?\\](.*)\\[/url\\]#iUe' => \"\\$this->validate_url('\\$2', '\\$3')\")),\n\t\t\t'img'\t\t\t=> array('bbcode_id' => 4,\t'regexp' => array('#\\[img\\](https?://)([a-z0-9\\-\\.,\\?!%\\*_:;~\\\\&$@/=\\+]+)\\[/img\\]#ie' => \"\\$this->bbcode_img('\\$1\\$2')\")),\n\t\t\t'size'\t\t\t=> array('bbcode_id' => 5,\t'regexp' => array('#\\[size=([\\-\\+]?[1-2]?[0-9])\\](.*?)\\[/size\\]#ise' => \"\\$this->bbcode_size('\\$1', '\\$2')\")),\n\t\t\t'color'\t\t\t=> array('bbcode_id' => 6,\t'regexp' => array('!\\[color=(#[0-9A-Fa-f]{6}|[a-z\\-]+)\\](.*?)\\[/color\\]!ise' => \"\\$this->bbcode_color('\\$1', '\\$2')\")),\n\t\t\t'u'\t\t\t\t=> array('bbcode_id' => 7,\t'regexp' => array('#\\[u\\](.*?)\\[/u\\]#ise' => \"\\$this->bbcode_underline('\\$1')\")),\n\t\t\t'list'\t\t\t=> array('bbcode_id' => 9,\t'regexp' => array('#\\[list(=[a-z|0-9|(?:disc|circle|square))]+)?\\].*\\[/list\\]#ise' => \"\\$this->bbcode_parse_list('\\$0')\")),\n\t\t\t'email'\t\t\t=> array('bbcode_id' => 10,\t'regexp' => array('#\\[email=?(.*?)?\\](.*?)\\[/email\\]#ise' => \"\\$this->validate_email('\\$1', '\\$2')\")),\n\t\t\t'flash'\t\t\t=> array('bbcode_id' => 11,\t'regexp' => array('#\\[flash=([0-9]+),([0-9]+)\\](.*?)\\[/flash\\]#ie' => \"\\$this->bbcode_flash('\\$1', '\\$2', '\\$3')\"))\n\t\t);\n\n\t\t// Zero the parsed items array\n\t\t$this->parsed_items = array();\n\n\t\tforeach ($this->bbcodes as $tag => $bbcode_data)\n\t\t{\n\t\t\t$this->parsed_items[$tag] = 0;\n\t\t}\n\n\t\tif (!is_array($rowset))\n\t\t{\n\t\t\tglobal $db;\n\t\t\t$rowset = array();\n\n\t\t\t$sql = 'SELECT *\n\t\t\t\tFROM ' . BBCODES_TABLE;\n\t\t\t$result = $db->sql_query($sql);\n\n\t\t\twhile ($row = $db->sql_fetchrow($result))\n\t\t\t{\n\t\t\t\t$rowset[] = $row;\n\t\t\t}\n\t\t\t$db->sql_freeresult($result);\n\t\t}\n\n\t\tforeach ($rowset as $row)\n\t\t{\n\t\t\t$this->bbcodes[$row['bbcode_tag']] = array(\n\t\t\t\t'bbcode_id'\t=> (int) $row['bbcode_id'],\n\t\t\t\t'regexp'\t=> array($row['first_pass_match'] => str_replace('$uid', $this->bbcode_uid, $row['first_pass_replace']))\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "ee4eadb9183ee8c99307db8b631a55aa", "score": "0.56866086", "text": "function clean_html ( $value ) {\n $value = htmlspecialchars ( $value, ENT_QUOTES );\n $value = strtr ( $value, array (\n '(' => '&#40;',\n ')' => '&#41;'\n ) );\n return $value;\n}", "title": "" }, { "docid": "888079ba18c026b5dc22aabf64124ef6", "score": "0.5682165", "text": "function strip_html_tags( $text )\n{\n $text = preg_replace(\n array(\n // Remove invisible content\n '@<head[^>]*?>.*?</head>@siu',\n '@<style[^>]*?>.*?</style>@siu',\n '@<script[^>]*?.*?</script>@siu',\n '@<object[^>]*?.*?</object>@siu',\n '@<embed[^>]*?.*?</embed>@siu',\n '@<applet[^>]*?.*?</applet>@siu',\n '@<noframes[^>]*?.*?</noframes>@siu',\n '@<noscript[^>]*?.*?</noscript>@siu',\n '@<noembed[^>]*?.*?</noembed>@siu',\n // Add line breaks before and after blocks\n '@</?((address)|(blockquote)|(center)|(del))@iu',\n '@</?((div)|(h[1-9])|(ins)|(isindex)|(p)|(pre))@iu',\n '@</?((dir)|(dl)|(dt)|(dd)|(li)|(menu)|(ol)|(ul))@iu',\n '@</?((table)|(th)|(td)|(caption))@iu',\n '@</?((form)|(button)|(fieldset)|(legend)|(input))@iu',\n '@</?((label)|(select)|(optgroup)|(option)|(textarea))@iu',\n '@</?((frameset)|(frame)|(iframe))@iu',\n ),\n array(\n ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',\n \"\\n\\$0\", \"\\n\\$0\", \"\\n\\$0\", \"\\n\\$0\", \"\\n\\$0\", \"\\n\\$0\",\n \"\\n\\$0\", \"\\n\\$0\",\n ),\n $text );\n return strip_tags( $text );\n}", "title": "" }, { "docid": "d926addbd75e2631ef935106bd427e52", "score": "0.5674651", "text": "function phorum_mod_bbcode_geshi_format($messages)\n{\n $PHORUM = $GLOBALS['PHORUM'];\n\n // Regexps for matching code block start and end tags. The start tag is\n // not fully qualified here. This is only used for a first tokenizing\n // pass over the message body.\n static $start = '\\[(?:code|syntax)[\\s=][^\\]]+\\]';\n static $end = '\\[\\/(?:code|syntax)\\]';\n\n foreach ($messages as $id => $message)\n {\n // Skip formatting if bbcode formatting was disabled for the post\n // (this is a feature of the BBcode module that we should honor).\n if (!empty($PHORUM[\"mod_bbcode\"][\"allow_disable_per_post\"]) &&\n !empty($message['meta']['disable_bbcode'])) {\n continue;\n }\n\n // Skipping this message if there is no body or a body\n // without a syntax tag in it.\n if (!isset($message['body']) ||\n !preg_match('!\\[(?:syntax|code)!', $message['body'])) continue;\n\n // Split into tokens.\n $tokens = preg_split(\n \"/($start|$end)/\", $message['body'], -1,\n PREG_SPLIT_DELIM_CAPTURE\n );\n\n // Process the tokens to find the syntax blocks.\n $newbody = '';\n $blocks = array();\n $block_idx = 0;\n $block_id = NULL;\n $block_tag = NULL;\n foreach ($tokens as $token)\n {\n // Not in a syntax block.\n if ($block_id === NULL)\n {\n // See if we have a valid syntax starting block.\n if (preg_match('/\\[(code|syntax)[\\s=]([^\\]]+)\\]/', $token, $t))\n {\n // Clean up quoting and spacing.\n $options = str_replace(\n array('&quot;', '\"', \"'\"),\n '', trim($t[2])\n );\n\n // We can have multiple options.\n $options = preg_split('/\\s+/', $options);\n\n // The first option always represents the language.\n $lang = strtolower(array_shift($options));\n\n // Check if the language name is valid.\n if (preg_match('/^[\\w_-]+$/', $lang))\n {\n // Check if the language exists.\n $lang_file = GESHI_LANG_PATH.'/'.$lang.'.php';\n if (file_exists($lang_file))\n {\n // Valid block start found.\n // Initialize a new syntax block.\n $block_idx ++;\n $block_id = md5(microtime() .':'. $block_idx);\n $temp_tag = \"[bbcode_syntax $block_id]\";\n $block_tag = $t[1];\n $newbody .= $temp_tag;\n $blocks[$block_id] = array(\n '', // block code storage\n $lang, // the requested language\n $temp_tag, // the temporary replacement tag\n $options // additional options in the bbcode\n );\n continue;\n }\n }\n }\n\n // No start of block found. Add the token to the new body.\n $newbody .= $token;\n }\n // In a syntax block.\n else\n {\n // End of block found.\n if ($token == '[/'.$block_tag.']')\n {\n $block_id = NULL;\n continue;\n }\n\n // No end of block found. Add the token to the syntax block\n $blocks[$block_id][0] .= $token;\n }\n }\n\n $messages[$id]['body'] = $newbody;\n $messages[$id]['bbcode_geshi'] = $blocks;\n }\n\n return $messages;\n}", "title": "" }, { "docid": "29dd3f4e422ddf7b0fbdcc4f023022be", "score": "0.56735027", "text": "function zen_clean_html($clean_it, $extraTags = '') {\n if (!is_array($extraTags)) $extraTags = array($extraTags);\n\n $clean_it = preg_replace('/\\r/', ' ', $clean_it);\n $clean_it = preg_replace('/\\t/', ' ', $clean_it);\n $clean_it = preg_replace('/\\n/', ' ', $clean_it);\n\n $clean_it= nl2br($clean_it);\n\n// update breaks with a space for text displays in all listings with descriptions\n while (strstr($clean_it, '<br>')) $clean_it = str_replace('<br>', ' ', $clean_it);\n while (strstr($clean_it, '<br />')) $clean_it = str_replace('<br />', ' ', $clean_it);\n while (strstr($clean_it, '<br/>')) $clean_it = str_replace('<br/>', ' ', $clean_it);\n while (strstr($clean_it, '<p>')) $clean_it = str_replace('<p>', ' ', $clean_it);\n while (strstr($clean_it, '</p>')) $clean_it = str_replace('</p>', ' ', $clean_it);\n\n// temporary fix more for reviews than anything else\n while (strstr($clean_it, '<span class=\"smallText\">')) $clean_it = str_replace('<span class=\"smallText\">', ' ', $clean_it);\n while (strstr($clean_it, '</span>')) $clean_it = str_replace('</span>', ' ', $clean_it);\n\n// clean general and specific tags:\n $taglist = array('strong','b','u','i','em');\n $taglist = array_merge($taglist, (is_array($extraTags) ? $extraTags : array($extraTags)));\n foreach ($taglist as $tofind) {\n if ($tofind != '') $clean_it = preg_replace(\"/<[\\/\\!]*?\" . $tofind . \"[^<>]*?>/si\", ' ', $clean_it);\n }\n\n// remove any double-spaces created by cleanups:\n while (strstr($clean_it, ' ')) $clean_it = str_replace(' ', ' ', $clean_it);\n\n// remove other html code to prevent problems on display of text\n $clean_it = strip_tags($clean_it);\n return $clean_it;\n}", "title": "" }, { "docid": "4936d5db3634b7d4cee8154fe0c602bc", "score": "0.56729656", "text": "function WriteHTML($html,$bi=true)\n {\n $bi = $this->bi;\n if ($bi)\n $html=strip_tags($html,\"<a><img><p><br><font><tr><blockquote><h1><h2><h3><h4><pre><red><blue><ul><li><hr><b><i><u><strong><em>\"); \n else\n $html=strip_tags($html,\"<a><img><p><br><font><tr><blockquote><h1><h2><h3><h4><pre><red><blue><ul><li><hr>\"); \n $html=str_replace(\"\\n\",'',$html); //replace carriage returns with spaces\n\t$html = str_replace(\"\\r\",'',$html);\n // debug\n if ($this->debug) { echo $html; exit; }\n\n $html = str_replace('&trade;','™',$html);\n $html = str_replace('&copy;','©',$html);\n $html = str_replace('&euro;','€',$html);\n\n $a=preg_split('/<(.*)>/U',$html,-1,PREG_SPLIT_DELIM_CAPTURE);\n $skip=false;\n foreach($a as $i=>$e)\n { \n if (!$skip) {\n if($this->HREF)\n $e=str_replace(\"\\n\",\"\",str_replace(\"\\r\",\"\",$e));\n if($i%2==0)\n {\n // new line\n if($this->PRE)\n $e=str_replace(\"\\r\",\"\\n\",$e);\n else\n $e=str_replace(\"\\r\",\"\",$e);\n //Text\n if($this->HREF) {\n $this->PutLink($this->HREF,$e);\n $skip=true;\n } else \n $this->Write(5,stripslashes(my_html_entity_decode($e)));\n } else {\n //Tag\n\t\t\t$f= trim($e);\n if (substr($f, 0, 1) == \"/\") {\n $this->CloseTag(strtoupper(substr($f,strpos($f,'/')+1)));\n\t\t\t }\n else {\n //Extract attributes\n $a2=explode(' ',$e);\n $tag=strtoupper(array_shift($a2));\n $attr=array();\n foreach($a2 as $v) {\n if(preg_match('/([^=]*)=[\"\\']?([^\"\\']*)/',$v,$a3))\n $attr[strtoupper($a3[1])]=$a3[2];\n }\n $this->OpenTag($tag,$attr);\n }\n }\n } else {\n $this->HREF='';\n $skip=false;\n }\n }\n }", "title": "" }, { "docid": "17f942aa8e5ca93bf7eae41a8e5539fc", "score": "0.5656894", "text": "function _htmlStrUndo($input, $double=false){\n$output=str_replace(array(\"&lt;\", \"&gt;\", \"&quot;\", \"&#39;\", \"&amp;\"), array(\"<\", \">\", \"\\\"\", \"'\", \"&\"), $input);\nif($double){$output=_htmlStrUndo($output);}\nreturn $output;\n}", "title": "" }, { "docid": "79204f0f2fb52af676bd17c69c1c9c7a", "score": "0.5649769", "text": "function lib4ridora_replace_to_bibtex($value) {\n\n $caps_value = $value;\n return strtr($caps_value, [\n // HTML elements.\n '<sub>' => '\\textsubscript{',\n '</sub>' => '}',\n '<sup>' => '\\textsuperscript{',\n '</sup>' => '}',\n '<em>' => '\\emph{',\n '</em>' => '}',\n '<i>' => '\\emph{',\n '</i>' => '}',\n\n // Entities.\n '&Alpha;' => '$Α$',\n '&Beta;' => '$Β$',\n '&Gamma;' => '$\\Gamma$',\n '&Delta;' => '$\\Delta$',\n '&Epsilon;' => '$Ε$',\n '&Zeta;' => '$Ζ$',\n '&Eta;' => '$Η$',\n '&Theta;' => '$\\Theta$',\n '&Iota;' => '$Ι$',\n '&Kappa;' => '$Κ$',\n '&Lambda;' => '$\\Lambda$',\n '&Mu;' => '$Μ$',\n '&Nu;' => '$Ν$',\n '&Xi;' => '$Xi$',\n '&Omicron;' => '$Ο$',\n '&Pi;' => '$\\Pi$',\n '&Rho;' => '$Ρ$',\n '&Sigma;' => '$\\Sigma$',\n '&Tau;' => '$Τ$',\n '&Upsilon;' => '$\\Upsilon$',\n '&Phi;' => '$\\Phi$',\n '&Chi;' => '$Χ$',\n '&Psi;' => '$\\Psi$',\n '&Omega;' => '$\\Omega$',\n '&alpha;' => '$\\alpha$',\n '&beta;' => '$\\beta$',\n '&gamma;' => '$\\gamma$',\n '&delta;' => '$\\delta$',\n '&epsilon;' => '$\\epsilon$',\n '&zeta;' => '$\\zeta$',\n '&eta;' => '$\\eta$',\n '&theta;' => '$\\theta$',\n '&iota;' => '$\\iota$',\n '&kappa;' => '$\\kappa$',\n '&lambda;' => '$\\lambda$',\n '&mu;' => '$\\mu$',\n '&nu;' => '$\\nu$',\n '&xi;' => '$\\xi$',\n '&omicron;' => '$o$',\n '&pi;' => '$\\pi$',\n '&rho;' => '$\\rho$',\n '&sigmaf;' => '$\\varsigma$',\n '&sigma;' => '$\\sigma$',\n '&tau;' => '$\\tau$',\n '&upsilon;' => '$\\upsilon$',\n '&phi;' => '$\\phi$',\n '&chi;' => '$\\chi$',\n '&psi;' => '$\\psi$',\n '&omega;' => '$\\omega$',\n '&thetasym;' => '$\\vartheta$',\n '&upsih;' => '$\\Upsilon$',\n '&#913;' => '$Α$',\n '&#914;' => '$Β$',\n '&#915;' => '$\\Gamma$',\n '&#916;' => '$\\Delta$',\n '&#917;' => '$Ε$',\n '&#918;' => '$Ζ$',\n '&#919;' => '$Η$',\n '&#920;' => '$\\Theta$',\n '&#921;' => '$Ι$',\n '&#922;' => '$Κ$',\n '&#923;' => '$\\Lambda$',\n '&#924;' => '$Μ$',\n '&#925;' => '$Ν$',\n '&#926;' => '$Xi$',\n '&#927;' => '$Ο$',\n '&#928;' => '$\\Pi$',\n '&#929;' => '$Ρ$',\n '&#931;' => '$\\Sigma$',\n '&#932;' => '$Τ$',\n '&#933;' => '$\\Upsilon$',\n '&#934;' => '$\\Phi$',\n '&#935;' => '$Χ$',\n '&#936;' => '$\\Psi$',\n '&#937;' => '$\\Omega$',\n '&#945;' => '$\\alpha$',\n '&#946;' => '$\\beta$',\n '&#947;' => '$\\gamma$',\n '&#948;' => '$\\delta$',\n '&#949;' => '$\\epsilon$',\n '&#950;' => '$\\zeta$',\n '&#951;' => '$\\eta$',\n '&#952;' => '$\\theta$',\n '&#953;' => '$\\iota$',\n '&#954;' => '$\\kappa$',\n '&#955;' => '$\\lambda$',\n '&#956;' => '$\\mu$',\n '&#957;' => '$\\nu$',\n '&#958;' => '$\\xi$',\n '&#959;' => '$o$',\n '&#960;' => '$\\pi$',\n '&#961;' => '$\\rho$',\n '&#962;' => '$\\varsigma$',\n '&#963;' => '$\\sigma$',\n '&#964;' => '$\\tau$',\n '&#965;' => '$\\upsilon$',\n '&#966;' => '$\\phi$',\n '&#967;' => '$\\chi$',\n '&#968;' => '$\\psi$',\n '&#969;' => '$\\omega$',\n '&#977;' => '$\\vartheta$',\n '&#978;' => '$\\Upsilon$',\n '&#x391;' => '$Α$',\n '&#x392;' => '$Β$',\n '&#x393;' => '$\\Gamma$',\n '&#x394;' => '$\\Delta$',\n '&#x395;' => '$Ε$',\n '&#x396;' => '$Ζ$',\n '&#x397;' => '$Η$',\n '&#x398;' => '$\\Theta$',\n '&#x399;' => '$Ι$',\n '&#x39A;' => '$Κ$',\n '&#x39B;' => '$\\Lambda$',\n '&#x39C;' => '$Μ$',\n '&#x39D;' => '$Ν$',\n '&#x39E;' => '$Xi$',\n '&#x39F;' => '$Ο$',\n '&#x3A0;' => '$\\Pi$',\n '&#x3A1;' => '$Ρ$',\n '&#x3A3;' => '$\\Sigma$',\n '&#x3A4;' => '$Τ$',\n '&#x3A5;' => '$\\Upsilon$',\n '&#x3A6;' => '$\\Phi$',\n '&#x3A7;' => '$Χ$',\n '&#x3A8;' => '$\\Psi$',\n '&#x3A9;' => '$\\Omega$',\n '&#x3B1;' => '$\\alpha$',\n '&#x3B2;' => '$\\beta$',\n '&#x3B3;' => '$\\gamma$',\n '&#x3B4;' => '$\\delta$',\n '&#x3B5;' => '$\\epsilon$',\n '&#x3B6;' => '$\\zeta$',\n '&#x3B7;' => '$\\eta$',\n '&#x3B8;' => '$\\theta$',\n '&#x3B9;' => '$\\iota$',\n '&#x3BA;' => '$\\kappa$',\n '&#x3BB;' => '$\\lambda$',\n '&#x3BC;' => '$\\mu$',\n '&#x3BD;' => '$\\nu$',\n '&#x3BE;' => '$\\xi$',\n '&#x3BF;' => '$o$',\n '&#x3C0;' => '$\\pi$',\n '&#x3C1;' => '$\\rho$',\n '&#x3C2;' => '$\\varsigma$',\n '&#x3C3;' => '$\\sigma$',\n '&#x3C4;' => '$\\tau$',\n '&#x3C5;' => '$\\upsilon$',\n '&#x3C6;' => '$\\phi$',\n '&#x3C7;' => '$\\chi$',\n '&#x3C8;' => '$\\psi$',\n '&#x3C9;' => '$\\omega$',\n '&#x3D1;' => '$\\vartheta$',\n '&#x3D2;' => '$\\Upsilon$',\n '&larr;' => '$\\leftarrow$',\n '&uarr;' => '$\\uparrow$',\n '&rarr;' => '$\\rightarrow$',\n '&darr;' => '$\\downarrow$',\n '&harr;' => '$\\leftrightarrow$',\n '&lArr;' => '$\\Leftarrow$',\n '&uArr;' => '$\\Uparrow$',\n '&rArr;' => '$\\Rightarrow$',\n '&dArr;' => '$\\Downarrow$',\n '&hArr;' => '$\\Leftrightarrow$',\n '&forall;' => '$\\forall$',\n '&part;' => '$\\partial$',\n '&exist;' => '$\\exists$',\n '&empty;' => '$\\emptyset$',\n '&nabla;' => '$\\nabla$',\n '&isin;' => '$\\in$',\n '&notin;' => '$\\notin$',\n '&ni;' => '$\\ni$',\n '&prod;' => '$\\prod$',\n '&sum;' => '$\\sum$',\n '&minus;' => '\\textminus',\n '&lowast;' => '$\\ast$',\n '&radic;' => '$\\surd$',\n '&prop;' => '$\\propto$',\n '&infin;' => '$\\infty$',\n '&and;' => '$\\wedge$',\n '&or;' => '$\\vee$',\n '&cap;' => '$\\cap$',\n '&cup;' => '$\\cup$',\n '&int;' => '$\\int$',\n '&sim;' => '$\\sim$',\n '&cong;' => '$\\approxeq$',\n '&asymp;' => '$\\approx$',\n '&ne;' => '$\\neq$',\n '&equiv;' => '$\\equiv$',\n '&le;' => '$\\leq$',\n '&ge;' => '$\\geq$',\n '&sub;' => '$\\subset$',\n '&sup;' => '$\\supset$',\n '&nsub;' => '$\\nsubset$',\n '&sube;' => '$\\subseteq$',\n '&supe;' => '$\\supseteq$',\n '&oplus;' => '$\\oplus$',\n '&otimes;' => '$\\otimes$',\n '&#8592;' => '$\\leftarrow$',\n '&#8593;' => '$\\uparrow$',\n '&#8594;' => '$\\rightarrow$',\n '&#8595;' => '$\\downarrow$',\n '&#8596;' => '$\\leftrightarrow$',\n '&#8656;' => '$\\Leftarrow$',\n '&#8657;' => '$\\Uparrow$',\n '&#8658;' => '$\\Rightarrow$',\n '&#8659;' => '$\\Downarrow$',\n '&#8660;' => '$\\Leftrightarrow$',\n '&#8704;' => '$\\forall$',\n '&#8706;' => '$\\partial$',\n '&#8707;' => '$\\exists$',\n '&#8709;' => '$\\emptyset$',\n '&#8711;' => '$\\nabla$',\n '&#8712;' => '$\\in$',\n '&#8713;' => '$\\notin$',\n '&#8715;' => '$\\ni$',\n '&#8719;' => '$\\prod$',\n '&#8721;' => '$\\sum$',\n '&#8722;' => '\\textminus',\n '&#8727;' => '$\\ast$',\n '&#8730;' => '$\\surd$',\n '&#8733;' => '$\\propto$',\n '&#8734;' => '$\\infty$',\n '&#8743;' => '$\\wedge$',\n '&#8744;' => '$\\vee$',\n '&#8745;' => '$\\cap$',\n '&#8746;' => '$\\cup$',\n '&#8747;' => '$\\int$',\n '&#8764;' => '$\\sim$',\n '&#8773;' => '$\\approxeq$',\n '&#8776;' => '$\\approx$',\n '&#8800;' => '$\\neq$',\n '&#8801;' => '$\\equiv$',\n '&#8804;' => '$\\leq$',\n '&#8805;' => '$\\geq$',\n '&#8834;' => '$\\subset$',\n '&#8835;' => '$\\supset$',\n '&#8836;' => '$\\nsubset$',\n '&#8838;' => '$\\subseteq$',\n '&#8839;' => '$\\supseteq$',\n '&#8853;' => '$\\oplus$',\n '&#8855;' => '$\\otimes$',\n '&#x2190;' => '$\\leftarrow$',\n '&#x2191;' => '$\\uparrow$',\n '&#x2192;' => '$\\rightarrow$',\n '&#x2193;' => '$\\downarrow$',\n '&#x2194;' => '$\\leftrightarrow$',\n '&#x21D0;' => '$\\Leftarrow$',\n '&#x21D1;' => '$\\Uparrow$',\n '&#x21D2;' => '$\\Rightarrow$',\n '&#x21D3;' => '$\\Downarrow$',\n '&#x21D4;' => '$\\Leftrightarrow$',\n '&#x2200;' => '$\\forall$',\n '&#x2202;' => '$\\partial$',\n '&#x2203;' => '$\\exists$',\n '&#x2205;' => '$\\emptyset$',\n '&#x2207;' => '$\\nabla$',\n '&#x2208;' => '$\\in$',\n '&#x2209;' => '$\\notin$',\n '&#x220B;' => '$\\ni$',\n '&#x220F;' => '$\\prod$',\n '&#x2211;' => '$\\sum$',\n '&#x2212;' => '\\textminus',\n '&#x2217;' => '$\\ast$',\n '&#x221A;' => '$\\surd$',\n '&#x221D;' => '$\\propto$',\n '&#x221E;' => '$\\infty$',\n '&#x2227;' => '$\\wedge$',\n '&#x2228;' => '$\\vee$',\n '&#x2229;' => '$\\cap$',\n '&#x222A;' => '$\\cup$',\n '&#x222B;' => '$\\int$',\n '&#x223C;' => '$\\sim$',\n '&#x2245;' => '$\\approxeq$',\n '&#x2248;' => '$\\approx$',\n '&#x2260;' => '$\\neq$',\n '&#x2261;' => '$\\equiv$',\n '&#x2264;' => '$\\leq$',\n '&#x2265;' => '$\\geq$',\n '&#x2282;' => '$\\subset$',\n '&#x2283;' => '$\\supset$',\n '&#x2284;' => '$\\nsubset$',\n '&#x2286;' => '$\\subseteq$',\n '&#x2287;' => '$\\supseteq$',\n '&#x2295;' => '$\\oplus$',\n '&#x2297;' => '$\\otimes$',\n '&Aacute;' => \"\\'{A}\",\n '&aacute;' => \"\\'{a}\",\n '&Agrave;' => '\\`{A}',\n '&agrave;' => '\\`{a}',\n '&Acirc;' => '\\^{A}',\n '&acirc;' => '\\^{a}',\n '&Auml;' => '\\\"{A}',\n '&auml;' => '\\\"{a}',\n '&Atilde;' => '\\~{A}',\n '&atilde;' => '\\~{a}',\n '&Aring;' => '\\°{A}',\n '&aring;' => '\\°{a}',\n '&Aelig;' => '\\AE',\n '&aelig;' => '\\ae',\n '&Ccedil;' => '\\c{C}',\n '&ccedil;' => '\\c{c}',\n '&Eth;' => '\\DH',\n '&eth;' => '\\dh',\n '&Eacute;' => \"\\'{E}\",\n '&eacute;' => \"\\'{e}\",\n '&Egrave;' => '\\`{E}',\n '&egrave;' => '\\`{e}',\n '&Ecirc;' => '\\^{E}',\n '&ecirc;' => '\\^{e}',\n '&Euml;' => '\\\"{E}',\n '&euml;' => '\\\"{e}',\n '&Iacute;' => \"\\'{I}\",\n '&iacute;' => \"\\'{i}\",\n '&Igrave;' => '\\`{I}',\n '&igrave;' => '\\`{i}',\n '&Icirc;' => '\\^{I}',\n '&icirc;' => '\\^{i}',\n '&Iuml;' => '\\\"{I}',\n '&iuml;' => '\\\"{e}',\n '&Ntilde;' => '\\~{N}',\n '&ntilde;' => '\\~{n}',\n '&Oacute;' => \"\\'{O}\",\n '&oacute;' => \"\\'{o}\",\n '&Ograve;' => '\\`{O}',\n '&ograve;' => '\\`{o}',\n '&Ocirc;' => '\\^{O}',\n '&ocirc;' => '\\^{o}',\n '&Ouml;' => '\\\"{O}',\n '&ouml;' => '\\\"{o}',\n '&Otilde;' => '\\~{O}',\n '&otilde;' => '\\~{o}',\n '&Oslash;' => '\\O',\n '&oslash;' => '\\o',\n '&szlig;' => '\\ss',\n '&Uacute;' => \"\\'{U}\",\n '&uacute;' => \"\\'{u}\",\n '&Ugrave;' => '\\`{U}',\n '&ugrave;' => '\\`{u}',\n '&Ucirc;' => '\\^{U}',\n '&ucirc;' => '\\^{u}',\n '&Uuml;' => '\\\"{U}',\n '&uuml;' => '\\\"{u}',\n '&Yacute;' => \"\\'{Y}\",\n '&yacute;' => \"\\'{y}\",\n '&yuml;' => '\\\"{y}',\n\n // Special cases.\n '&' => '\\&',\n '%' => '\\%',\n '$' => '\\$',\n '#' => '\\#',\n '_' => '\\_',\n '{' => '\\{',\n '}' => '\\}',\n '~' => '\\textasciitilde',\n '^' => '\\textasciicircum',\n '\\\\' => '\\textslash',\n '\"' => '{\"}',\n\n // Capitals.\n 'A' => '{A}',\n 'B' => '{B}',\n 'C' => '{C}',\n 'D' => '{D}',\n 'E' => '{E}',\n 'F' => '{F}',\n 'G' => '{G}',\n 'H' => '{H}',\n 'I' => '{I}',\n 'J' => '{J}',\n 'K' => '{K}',\n 'L' => '{L}',\n 'M' => '{M}',\n 'N' => '{N}',\n 'O' => '{O}',\n 'P' => '{P}',\n 'Q' => '{Q}',\n 'R' => '{R}',\n 'S' => '{S}',\n 'T' => '{T}',\n 'U' => '{U}',\n 'V' => '{V}',\n 'W' => '{W}',\n 'X' => '{X}',\n 'Y' => '{Y}',\n 'Z' => '{Z}',\n ]);\n}", "title": "" }, { "docid": "0749ead47aab761e2be4a7b482416375", "score": "0.564841", "text": "function parse_html($str) {\r\n// \t$str = htmlspecialchars_decode($str);\r\n// \t$str = htmlentities($str);\r\n// \t$str = html_entity_decode($str);\r\n// \t$str = str_replace('<', '&lt;', $str);\r\n// $str = str_replace('>', '&gt;', $str);\r\n// \t$str = str_replace(array(\"&gt;\", \"&lt;\", \"&quot;\", \"&amp;\"), array(\">\", \"<\", \"\\\"\", \"&\"), $str);\r\n $str = htmlspecialchars(parse_text($str));\r\n\treturn $str;\r\n}", "title": "" }, { "docid": "c3a38d2eda8926971538c9ab1e0d96cc", "score": "0.564687", "text": "function _kill_html($post) {\n //print (\"DEBUG! kill_html was used\");\n $post = ereg_replace(\"<\",\"&lt;\",$post);\n $post = ereg_replace(\">\",\"&gt;\",$post);\n $post = ereg_replace(\"((ftp://)|(http://))(([[:alnum:]]|[[:punct:]])*)\",\n \"<a href='\\\\0' target='_blank'>\\\\0</a>\",\n $post);\n $post = nl2br($post);\n\n return $post;\n }", "title": "" }, { "docid": "fdea1f765d20014fd72f45749d5dcf81", "score": "0.5632944", "text": "function netoyer4HTML($texte){\n\t\t$texte = str_replace(\"&\", \"&amp;\", $texte);\n\t\t$texte = str_replace(array(\"<\",\">\",\"\\t\"), array(\"&lsaquo;\",\"&rsaquo;\",\"&nbsp;&nbsp;&nbsp;\"), $texte);\n\t\treturn $texte;\n\t}", "title": "" }, { "docid": "f9297f82053b7ed4c7dbed24f6091220", "score": "0.56272644", "text": "function markupToHtml($text) {\n global $meta;\n\n // escape HTML characters\n\n $text = str_replace('&', '&amp;', $text);\n $text = str_replace('<', '&lt;', $text);\n $text = str_replace('>', '&gt;', $text);\n $text = str_replace(\"\\n\", '<br>', $text);\n $text = str_replace(\"\\r\", '', $text);\n\n // parse **fetter Text** und __kursiver Text__\n\n $text = preg_replace('/(^|\\.| |<br>)\\*\\*(.+?)\\*\\*( |\\.|,|:|;|!|\\?|\\.|<br>|$)/m', '${1}<b>${2}</b>${3}', $text);\n $text = preg_replace('/(^|\\.| |<br>)__(.+?)__( |\\.|,|:|;|!|\\?|\\.|<br>|$)/m', '${1}<i>${2}</i>${3}', $text);\n\n // parse headings\n\n $text = preg_replace('/(^|<br>)####(.+?)<br>/m', '${1}<h1>${2}</h1>', $text);\n $text = preg_replace('/(^|<br>)###(.+?)<br>/m', '${1}<h2>${2}</h2>', $text);\n $text = preg_replace('/(^|<br>)##(.+?)<br>/m', '${1}<h3>${2}</h3>', $text);\n\n // parse links\n\n $text = preg_replace('/{{a:(.+?)&gt;&gt;(.+?)}}/m', '<a href=\"${1}\">${2}</a>', $text);\n\n // parse meta elements\n\n $patterns = array(\n '{{meta:date}}',\n '{{meta:time}}',\n\n '{{meta:pageName}}',\n '{{meta:pageSubtitle}}',\n '{{meta:googleMaps}}',\n '{{meta:webmasterMail}}',\n '{{meta:webmasterAdress}}',\n\n '{{meta:currentRound}}',\n '{{meta:availableCards}}',\n '{{meta:perUser}}',\n '{{meta:preis}}',\n '{{meta:zahlungsFrist}}',\n '{{meta:kontoinhaber}}',\n '{{meta:iban}}');\n $replacements = array(\n '<span class=\"date\">' . date('d.m.Y') . '</span>',\n '<span class=\"time\">' . date('H:i') . '</span>',\n\n '<span class=\"pageName\">' . $meta['pageName'] . '</span>',\n '<span class=\"pageSubtitle\">' . $meta['pageSubtitle'] . '</span>',\n '<span class=\"googleMaps\">' . $meta['googleMaps'] . '</span>',\n '<span class=\"webmasterMail\">' . $meta['webmasterMail'] . '</span>',\n '<span class=\"webmasterAdress\">' . $meta['webmasterAdress'] . '</span>',\n\n '<span class=\"currentRound\">' . $meta['currentRound'] . '</span>',\n '<span class=\"availableCards\">' . $meta['availableCards'] . '</span>',\n '<span class=\"perUser\">' . ($meta['perUser'] ? 'Pro Nutzer' : 'Insgesamt') . '</span>',\n '<span class=\"preis\">' . $meta['preis'] . '</span>',\n '<span class=\"zahlungsFrist\">' . $meta['zahlungsFrist'] . '</span>',\n '<span class=\"kontoinhaber\">' . $meta['kontoinhaber'] . '</span>',\n '<span class=\"iban\">' . $meta['iban'] . '</span>');\n $text = str_replace($patterns, $replacements, $text);\n\n // parse lists\n\n $text = preg_replace('~(<br>|^)@@<br>(.+?)<br>@@(<br>|$)~', '${1}<ul><br>${2}</ul>${3}', $text);\n $text = preg_replace('~(?!<ul>.*?)(<br>\\*.+?)(?=<br>\\* |<\\/ul>)~', '<li>${1}</li>', $text);\n $text = preg_replace('~<li><br>\\* ~', '<li>', $text);\n\n // parse tables\n\n $text = preg_replace('~(<br>|^)\\+\\+\\+\\+<br>(.+?)<br>\\+\\+\\+\\+(<br>|$)~', '${1}<table><br>${2}</table>${3}', $text);\n\n $text = preg_replace('~(?!<table>.*?)(<br>\\+\\+.+?)<br>\\+\\+(?=<br>\\+\\+<br>|<\\/table>)~', '<tr>${1}</tr>', $text);\n $text = str_replace('<tr><br>++', '<tr>', $text);\n\n $text = preg_replace('~(?!<tr>.*?)(<br>\\$.*?)(?=<br>\\$ |<\\/tr>)~', '<td>$1</td>', $text);\n $text = str_replace('<td><br>$ ', '<td>', $text);\n\n // remove redundant empty lines\n\n $text = preg_replace('~(<br>)*<(h1|h2|h3|ul|ol|table)>~', '<${2}>', $text);\n $text = preg_replace('~</(h1|h2|h3|ul|ol|table)>(<br>)*~', '</${1}>', $text);\n\n return $text;\n}", "title": "" }, { "docid": "80507136d2d8df75ea348a118d57ac10", "score": "0.56272256", "text": "function clean_feed($input) \n{\n\t$original = array(\"<\", \">\", \"&\", '\"', \"'\", \"<br/>\", \"<br>\");\n\t$replaced = array(\"&lt;\", \"&gt;\", \"&amp;\", \"&quot;\",\"&apos;\", \"\", \"\");\n\t$newinput = str_replace($original, $replaced, $input);\n\t\n\treturn $newinput;\n}", "title": "" }, { "docid": "da81f392bac0d8eb42c2bd004482edd8", "score": "0.56221783", "text": "function _htmlStr($input){\nreturn str_replace(array(\"&\", \"<\", \">\", \"\\\"\", \"'\"), array(\"&amp;\", \"&lt;\", \"&gt;\", \"&quot;\", \"&#39;\"), $input);\n}", "title": "" }, { "docid": "f8eaf56644e1a86fdb98efdff1407877", "score": "0.5621759", "text": "function clean_evil_tags( $t )\n {\n \t$t = preg_replace( \"/javascript/i\" , \"j&#097;v&#097;script\", $t );\n\t\t$t = preg_replace( \"/alert/i\" , \"&#097;lert\" , $t );\n\t\t$t = preg_replace( \"/about:/i\" , \"&#097;bout:\" , $t );\n\t\t$t = preg_replace( \"/onmouseover/i\", \"&#111;nmouseover\" , $t );\n\t\t$t = preg_replace( \"/onclick/i\" , \"&#111;nclick\" , $t );\n\t\t$t = preg_replace( \"/onload/i\" , \"&#111;nload\" , $t );\n\t\t$t = preg_replace( \"/onsubmit/i\" , \"&#111;nsubmit\" , $t );\n\t\t$t = preg_replace( \"/<body/i\" , \"&lt;body\" , $t );\n\t\t$t = preg_replace( \"/<html/i\" , \"&lt;html\" , $t );\n\t\t$t = preg_replace( \"/document\\./i\" , \"&#100;ocument.\" , $t );\n\t\t\n\t\treturn $t;\n }", "title": "" } ]
fb0e2362c584222bb280e3ff9759e130
Convert the current DOMElement and all its children into a serialized XML string
[ { "docid": "c319fc424e88404ebb407542837cf3d6", "score": "0.6703204", "text": "public function nodeSerialize ()\n {\n //open the element with the element name\n /** @todo Element namespace */\n $nodeSerialize = '<' . $this->nodeName;\n \n /* check for namespace definitions on the element...\n * ------------------------------------------------------------------------------------------------------ */\n if (\n /* there isn't a DOM API for reading the namespaces defined on an element,\n * so we have to query the element with XPath. we exclude XML's default namespace 'xml' */\n /** @todo How does a different default namespace affect this? */\n ($namespaces = $this->ownerDocument->xquery->query( 'namespace::*[local-name() != \"xml\"]', $this ))\n && ($namespaces->length > 0)\n \n ) foreach ($namespaces as $namespace) {\n //namespaces are serialized as \"!ns uri\"\n $nodeSerialize .= ' !' . $namespace->localName . ' ' . $namespace->nodeValue;\n }\n \n /* check for attributes...\n * ------------------------------------------------------------------------------------------------------ */\n /* when an attribute has no value, the closing angle-bracket of the element does not require a space\n * beforehand -- e.g. `<input @disabled>`. when an attribute has a value, there has to be a space between\n * it and the closing angle-bracket e.g. `<a @href # >` */\n if ($this->hasAttributes()) for (\n /* this requirement means we need to be aware which is the last attribute,\n * so we loop using an old-style counter */\n $i = 0; $i < $this->attributes->length; $i++\n ) {\n //serializing the attribute node doesn't tell us if it had a value or not...\n $nodeSerialize .= ' ' . $this->attributes->item( $i )->nodeSerialize ();\n /* here we check for the last attribute and if it has a value and add a final space,\n * this isn't necessary if the element has content as that will add a space too */\n if ( $i == $this->attributes->length - 1\n && !$this->hasChildNodes()\n && !empty( $this->attributes->item( $i )->value )\n ) $nodeSerialize .= ' ';\n }\n \n /* element content...\n * ----------------------------------------------------------------------------------------------------- */\n if ($this->hasChildNodes()) {\n \n $nodeSerialize .= ' : ';\n \n foreach ($this->childNodes as $child) if (!empty(\n trim( $text = $child->nodeSerialize() )\n )) $nodeSerialize .= \"$text\";\n }\n \n //close the element\n return $nodeSerialize . '>';\n }", "title": "" } ]
[ { "docid": "beba8326af00e49799285f9a3ff9b875", "score": "0.6731233", "text": "public function __toString()\n {\n return $this->m_root->saveXML();\n }", "title": "" }, { "docid": "0dc72b0c8e9fc774dbd231312f3341ba", "score": "0.6725885", "text": "public function __toString()\n {\n if ($this->m_node->hasChildNodes() && $this->m_node->childNodes->length == 1 && ($this->m_node->firstChild->nodeType == XML_TEXT_NODE || $this->m_node->firstChild->nodeType == XML_CDATA_SECTION_NODE))\n {\n $result = $this->m_node->firstChild->nodeValue;\n }\n else\n {\n $result = $this->m_root->saveXML($this->m_node);\n }\n\n return $result;\n }", "title": "" }, { "docid": "66eae99f8d01425a56d7e9698b491f2d", "score": "0.6544638", "text": "function toString( ) {\n\t\t$retstr\t.= \"<\" . $this->tagname;\n\t\t// Checking all Attributes\n\t\t$attrlist\t= $this->attributes;\n\t\tif ( is_array( $attrlist ) ) {\n\t\t\twhile ( list( $k, $attr ) = each( $attrlist ) ) {\n\t\t\t\t$retstr\t.= \" \" . $k .\"=\\\"\". $attr . \"\\\"\";\n\t\t\t}\n\t\t}\n\t\t$elem = $this->children;\n\t\tif ( is_array( $elem ) && ( count ($elem) > 0 )) {\n\t\t\t// Children are present -> closing the Opening tag\n\t\t\t$retstr\t.= \">\";\n\t\t\treset( $elem );\n\t\t\twhile ( list( $k, $node ) = each( $elem ) ) {\n\t\t\t\t$node = PDOM_Globalize($node);\n\t\t\t\tif ($node->type == XML_ELEMENT_NODE) \n\t\t\t\t\t$retstr .=\"\\n\\t\";\n\t\t\t\t$retstr .= $node->toString();\n\t\t\t}\n\t\t\t$retstr\t.= \"</\" . $this->tagname . \">\";\n\t\t}\n\t\telse if ($this->content != '' ) {\n\t\t\t// No children are present - but content is\n\t\t\t$retstr\t.= \">\";\n\t\t\t$retstr .= $this->content;\n\t\t\t$retstr\t.= \"</\" . $this->tagname . \">\";\n\t\t}\n\t\telse if ( $this->needsClosing ) {\n\t\t\t$retstr\t.= \">\";\n\t\t\t$retstr\t.= \"</\" . $this->tagname . \">\";\n\t\t} else {\n\t\t\t// No children are present - closing the Opening tag\n\t\t\t$retstr .= \"/>\";\n\t\t}\n\t\t$retstr .= \"\\n\";\n\treturn $retstr;\n\t}", "title": "" }, { "docid": "a822a51799ca3b06b1954aaf6cab0569", "score": "0.6450221", "text": "public function toXml($includeRoot = true)\n {\n if ($includeRoot) {\n return $this->getElement()->ownerDocument->saveXML($this->getElement());\n } else {\n $s = array();\n foreach ($this->childNodes as $c) {\n $s[] = $this->getElement()->ownerDocument->saveXML($c);\n }\n return join(\"\", $s);\n }\n }", "title": "" }, { "docid": "3f3c0761f9b4b7ee4960e725dbce7440", "score": "0.6416628", "text": "public function serialize(DOMDocument $document);", "title": "" }, { "docid": "14d9faa05b875e48305197612d873dbe", "score": "0.63359636", "text": "public function toXML();", "title": "" }, { "docid": "14d9faa05b875e48305197612d873dbe", "score": "0.63359636", "text": "public function toXML();", "title": "" }, { "docid": "c10f2fe2cfa8fafda714b1cc2e72c514", "score": "0.6309903", "text": "public function __toString() {\n\t\treturn $this->getDocument ()->saveXML ();\n\t}", "title": "" }, { "docid": "8b6cb6f53e246a92c199279d71546dfd", "score": "0.6307833", "text": "public function toString() \n {\n return $this->_altoDom->saveXml();\n }", "title": "" }, { "docid": "a06d687d208f32eda6eb7a39e7712d5a", "score": "0.6304689", "text": "public function __toString()\n {\n $output = '';\n\n if ($this->count()) {\n foreach ($this->storage as $offset => $tag) {\n if ($tag instanceof Element) {\n $output .= $tag->render();\n }\n }\n }\n\n return $output;\n }", "title": "" }, { "docid": "87f922955af6bcc7d95946f8335dd15c", "score": "0.62756884", "text": "public function __toString()\n\t{\n\t\treturn $this->saveXML();\n\t}", "title": "" }, { "docid": "ab36f5376a27b19c9d8c3ca124de635d", "score": "0.62665343", "text": "function toXML() {\n\t\treturn $this->toString();\n\t}", "title": "" }, { "docid": "d3fea7ebbe5325f24c94914cd145e3e5", "score": "0.62623805", "text": "public function toXml()\n {\n return parent::toXml();\n }", "title": "" }, { "docid": "32f562d4d795a66fcc4bb2dc0554b144", "score": "0.6252329", "text": "public function __toString() {\n return $this->saveXML();\n }", "title": "" }, { "docid": "0e0ff2086e463b13781d6f171dadb55f", "score": "0.6219247", "text": "public function __toString(): string\n {\n return $this->getRoot()->nodeToString();\n }", "title": "" }, { "docid": "36ec71d6f6552dc3a7c8b58ac65f2f51", "score": "0.6209057", "text": "public function __toString()\n {\n return $this->saveXML();\n }", "title": "" }, { "docid": "6b86ebdec093ec0a955d9e1c1cd772bc", "score": "0.62048954", "text": "protected function _toHtml()\n {\n $html = empty($this->children) ? '' : trim($this->getChildHtml('', true, true));\n if ($this->dependsOnChildren && empty($html)) {\n return '';\n }\n if ($this->_isInvisible()) {\n return $html;\n }\n $id = $this->hasElementId() ? sprintf(' id=\"%s\"', $this->getElementId()) : '';\n $class = $this->hasElementClass() ? sprintf(' class=\"%s\"', $this->getElementClass()) : '';\n $otherParams = $this->hasOtherParams() ? ' '.$this->getOtherParams() : '';\n\n return sprintf('<%1$s%2$s%3$s%4$s>%5$s</%1$s>', $this->getElementTagName(), $id, $class, $otherParams, $html);\n }", "title": "" }, { "docid": "e1b320b2555d8488a4c3f93cc99b6ec5", "score": "0.6201927", "text": "public function __toString () {\n \t\treturn $this->saveXML();\n \t}", "title": "" }, { "docid": "d1fae2183975f40dbb49cce12cd55c06", "score": "0.619075", "text": "public function toXml();", "title": "" }, { "docid": "d1fae2183975f40dbb49cce12cd55c06", "score": "0.619075", "text": "public function toXml();", "title": "" }, { "docid": "a93aa2fa40da947d1255808f123d4ea4", "score": "0.6163674", "text": "public function toXMLString()\n {\n $xml = $this->toXML();\n return $xml->asXML();\n }", "title": "" }, { "docid": "4e679c5b806ee6b225a67c288f74078d", "score": "0.60966307", "text": "public function __toString()\n {\n return $this->xmlWriter->outputMemory(false);\n }", "title": "" }, { "docid": "9e3efc21ed46d2e67c5092414ea26b50", "score": "0.60638356", "text": "public function toArray() {\n \n // If any of the children are non-empty text nodes, then we're dealing\n // with something like \"The <em>rain</em> in Spain...\", which we want\n // to return as a string.\n \n foreach ($this->childNodes as $c) {\n if ($c->nodeType == XML_TEXT_NODE) {\n if (trim($c->wholeText) != '') {\n return $this->toXml(false);\n }\n }\n }\n\n // Get a list of all the children that are element nodes. (As opposed to,\n // say, text nodes.)\n \n $children = array(); \n\n foreach ($this->childNodes as $c) {\n if ($c->nodeType == XML_ELEMENT_NODE) {\n $children[] = $c;\n }\n }\n \n if ($children) {\n\n // If the children include element nodes, apply toArray() to the them\n // recursively, and return an array.\n \n $a = array();\n foreach ($children as $c) {\n \n $tmp = new self($c);\n $v = $tmp->toArray();\n \n // The following code assumes that the children will have the same \"form\"--if one is\n // a string, then the others will too. In other words, the following sort of XML\n // will lead to unpredictable results:\n //\n // <row>\n // <person>Mike</person>\n // <person><name>Clem</name></person>\n // </row>\n //\n // You can have all \"string\" values, or all \"array\" values, but you can't have both.\n \n if (is_array($v)) {\n \n // If $v is an array, then $tmp was an element with children,\n // and we should merge in the attribute array. (The\n // alternative is that $v is a string, in which case\n // there will be no attributes to merge.)\n $v = array_merge($tmp->attributeToArray(), $v);\n \n if (!array_key_exists($c->tagName, $a)) {\n // First time we've seen this tagName--create array\n $a[$c->tagName] = array($v);\n } else {\n // Second or subsequent time we've seen this tagName--append to existing array\n $a[$c->tagName][] = $v;\n }\n\n } else {\n \n if (!array_key_exists($c->tagName, $a)) {\n // First time we've seen this tagName--value is string\n $a[$c->tagName] = $v;\n } else if (!is_array($a[$c->tagName])) {\n // Second time we've seen this tagName--convert value to array\n $a[$c->tagName] = array($a[$c->tagName], $v);\n } else {\n // Third or subsequent time we've seen this tagName--append to array\n $a[$c->tagName][] = $v;\n }\n \n }\n \n }\n return $a;\n \n } else {\n\n // If there are no element nodes, return a string.\n \n return isset($this->firstChild->wholeText) ? trim($this->firstChild->wholeText) : \"\";\n \n }\n\n }", "title": "" }, { "docid": "2b40d960797bb858d8de492fbe237f39", "score": "0.6060999", "text": "public function asXML()\n {\n $result = null;\n\n if ($this->m_node->isSameNode($this->m_node))\n {\n $result = $this->m_root->saveXML();\n }\n else\n {\n $result = $this->m_root->saveXML($this->m_node);\n }\n\n return $result;\n }", "title": "" }, { "docid": "bac31d04183d2a916c0c988282dfed84", "score": "0.6060813", "text": "public function to_xml()\n {\n return (string) $this;\n }", "title": "" }, { "docid": "9ee53e3b55325962765954cd82d33f86", "score": "0.60502875", "text": "public function __toString()\n {\n return $this->xml;\n }", "title": "" }, { "docid": "46083e340fc5ce02d8a40be163b78404", "score": "0.6042301", "text": "public function __toString()\n {\n $tree = '';\n $this->treeIdSet = false;\n\n if ( $this->options->displayRootNode )\n {\n $idPart = $this->options->xmlId ? \" id=\\\"{$this->options->xmlId}\\\"\" : '';\n $tree .= \"<ul{$idPart}>\\n\";\n $tree .= \"<li>{$this->root}</li>\\n\";\n $this->treeIdSet = true;\n }\n $tree .= $this->doChildren( $this->root );\n if ( $this->options->displayRootNode )\n {\n $tree .= \"</ul>\\n\";\n }\n return $tree;\n }", "title": "" }, { "docid": "7d276dbca41e5493a93922cc2556f1c1", "score": "0.6033914", "text": "public function toXml()\n {\n $this->rewind();\n $xml = \"<Collection model=\\\"$this->model\\\">\\n\";\n \n do {\n \n $obj = $this->current();\n $xml .= $obj->toXml();\n \n } while ($this->next());\n \n $xml .= \"</Collection>\";\n \n return $xml;\n }", "title": "" }, { "docid": "6f70c6e2b6dd7dcb07e4ef38756f1b63", "score": "0.6028767", "text": "function dumpToString() {\r\n\t\treturn $this->doc->saveXML();\r\n\t}", "title": "" }, { "docid": "1664e90fba0b25a207b52e56c8f48759", "score": "0.5983066", "text": "protected function serialize() {\n\t\t\t$this->writer = new XMLWriter;\n\n\t\t\t$this->writer->openMemory();\n\t\t\t$this->writer->setIndent(true);\n\t\t\t$this->writer->setIndentString($this->config->indent_string);\n\n\t\t\t# -- has to be UTF-8\n\t\t\t$this->writer->startDocument($this->config->document_version, 'UTF-8');\n\n\t\t\tif($this->assertElementName($this->root)) {\n\t\t\t\t$this->writer->startElement($this->root);\n\t\t\t}\n\n\t\t\tif(!empty($this->data[self::ATTRIBUTES])) {\n\t\t\t\t$this->parseAttributes($this->data[self::ATTRIBUTES]);\n\n\t\t\t\tunset($this->data[self::ATTRIBUTES]);\n\t\t\t}\n\n\t\t\t$this->rotate($this->data);\n\n\t\t\t$this->writer->endElement();\n\t\t\t$this->writer->endDocument();\n\n\t\t\treturn $this->writer->outputMemory();\n\t\t}", "title": "" }, { "docid": "cba397982f40f99082ac5a00cc7fbea7", "score": "0.5981767", "text": "public function __toString()\n {\n return $this->traverse($this->root);\n }", "title": "" }, { "docid": "208aba855ff2015a827af4653b1e2a1f", "score": "0.5972886", "text": "public function __toString() {\n return (!is_null($this->doc) ? $this->doc->saveXML() : \"\"); \n }", "title": "" }, { "docid": "996f048da5b37f88579a568d2bf37b10", "score": "0.59569716", "text": "public function __toString():string\n\t {\n\t\treturn $this->doc->saveXML();\n\t }", "title": "" }, { "docid": "d74b2d7a3dc46ff1136e0ea95387b7f2", "score": "0.595389", "text": "public function toXML(){\n\t\t//todo\n\t}", "title": "" }, { "docid": "81c1c37c21ef214a8466fec4f98d4c4e", "score": "0.59508383", "text": "function toString( ) {\n\t\tswitch($this->type) {\n\t\t\tcase XML_TEXT_NODE:\n\t\t\t\t$retstr \t.= $this->content;\n\t\t\t\tbreak;\n\t\t\tcase XML_ENTITY_REF_NODE:\n\t\t\t\t$retstr\t\t.= \"&\" . $this->name . \";\";\n\t\t\t\tbreak;\n\t\t\tcase XML_COMMENT_NODE:\n\t\t\t\t$retstr\t\t.= \"<!-- \" . $this->content . \" -->\";\n\t\t\t\tbreak;\n\t\t\tcase XML_PI_NODE:\n\t\t\t\t$retstr\t\t.= \"<?\" . $this->name . \" \" . $this->content . \" ?>\";\n\t\t\t\tbreak;\n\t\t}\n\n\treturn $retstr;\n\t}", "title": "" }, { "docid": "0e4f010f61dc1eaf3868329f2e83d6c2", "score": "0.5930575", "text": "public function outerXML()\n\t{\n\t\t$dom = dom_import_simplexml($this);\n\t\treturn $dom->ownerDocument->saveXML($dom);\n\t}", "title": "" }, { "docid": "a215c489e5c57c6ad7f58a436bae51e9", "score": "0.59074897", "text": "function saveXML() {\n return htmlspecialchars($this->nodeValue);\n }", "title": "" }, { "docid": "dc668849693a45ff2b959b38206967ba", "score": "0.59002984", "text": "public function toStringInXMLFormat()\n {\n try {\n $attribs = array(); // keep attributs as an array so merging them would be faster than using immutable strings\n $array = $this->toArray(true, true);\n \n foreach ($array as $key => $value) {\n try {\n array_push($attribs, $key . '=\"' . $value . '\"');\n } catch(Exception $exp) {\n // pass incase failed to convert a value to string\n }\n }\n \n return '<' . get_class($this) . ' ' . implode(' ', $attribs) . '>';\n } catch(Exception $exp) {\n return '';\n }\n }", "title": "" }, { "docid": "1bc548a90ed4ee1fb836d5882f273580", "score": "0.58685446", "text": "public function __toString() {\n\t\treturn $this->xml_definition->asXML();\n\t}", "title": "" }, { "docid": "fe03b1f13c0c78a53f3ae111a4b0d185", "score": "0.5836552", "text": "public static function innerXML(\\DOMNode $node): string\n {\n $xml = '';\n\n // 子ノードを取得してXML文字列を連結する\n foreach ($node->childNodes as $child) {\n $xml .= $node->ownerDocument->saveXML($child);\n }\n\n return $xml;\n }", "title": "" }, { "docid": "823b6c051567b803fd0638c324d6a09f", "score": "0.5814456", "text": "public function toXmlObject()\n {\n if ($this->_renderer) {\n return $this->_renderer->render($this);\n } else {\n return $this->getDefaultXml();\n }\n }", "title": "" }, { "docid": "7af2b4a7175b27c134b158de9e80fad2", "score": "0.5808315", "text": "public function toXML() {\n $res = fopen('php://temp', 'w+');\n $this->write($res);\n fseek($res, 0);\n $str = stream_get_contents($res);\n fclose($res);\n return $str;\n }", "title": "" }, { "docid": "7af2b4a7175b27c134b158de9e80fad2", "score": "0.5808315", "text": "public function toXML() {\n $res = fopen('php://temp', 'w+');\n $this->write($res);\n fseek($res, 0);\n $str = stream_get_contents($res);\n fclose($res);\n return $str;\n }", "title": "" }, { "docid": "66773077a509eadcf1ff2c8920cfe53f", "score": "0.58070016", "text": "function get_inner_html($node) \n { \n $innerHTML= ''; \n $children = $node->childNodes; \n foreach ($children as $child) \n { \n $innerHTML .= $child->ownerDocument->saveXML($child); \n } \n return $innerHTML; \n }", "title": "" }, { "docid": "ea76ed0f4c0d8fe7bf758f5fbba886bb", "score": "0.5790709", "text": "public function saveXML() {\n\t\treturn $this->ownerDocument->saveXML($this);\n\t}", "title": "" }, { "docid": "a788a700e31185171ca0133b65d9ec74", "score": "0.5772778", "text": "public function getAsJsonString(){\n \n return json_encode( $this->getXmlElement() );\n \n }", "title": "" }, { "docid": "938ba937fc49bd6203b4a26128f6bd34", "score": "0.57636285", "text": "public function toString() {\n $this->xpath = null;\n $sRet = null;\n foreach ($this->domNodeList as $node) {\n $sRet = $node->nodeValue;\n break;\n }\n return $sRet;\n }", "title": "" }, { "docid": "9f7dbc326cc743c801016375cef66dd5", "score": "0.5750618", "text": "function get_inner_html($node) {\n $innerHTML = '';\n $children = $node->childNodes;\n foreach ($children as $child) {\n $innerHTML .= $child->ownerDocument->saveXML($child);\n }\n return $innerHTML;\n}", "title": "" }, { "docid": "ce9536ab6a95fad3de2ede7683bf3eca", "score": "0.5749235", "text": "public function asXml();", "title": "" }, { "docid": "5b97da41a8acf3e90aeb0823f4b05989", "score": "0.5743402", "text": "public function asXmlString($options = null) {\n return $this->getDomDocument()->saveXML($this->element, $options);\n }", "title": "" }, { "docid": "2c906fa9ed46075aaa220b44cb6de514", "score": "0.5720488", "text": "public function __toString()\n {\n return librdf_node_to_string($this->node);\n }", "title": "" }, { "docid": "fa34d036a0479bbd26df5eb54c410115", "score": "0.5709281", "text": "public function toXML(string $root): string;", "title": "" }, { "docid": "1b9b2b23316ac054209506387e088f91", "score": "0.5705193", "text": "public function serialize()\n\t{\n\t\treturn $this->serialize($this->attributes);\n\t}", "title": "" }, { "docid": "780e270d1c12fbf9a455f4dc9d51cfe0", "score": "0.5676576", "text": "public function asXML()\n {\n $this->generateXml();\n return $this->xml->asXML();\n }", "title": "" }, { "docid": "ccfc5c604e7834a7580ff9de6c3c33af", "score": "0.56764966", "text": "protected function _toHtml()\n {\n return '<div id=\"'.$this->getElement()->getId().'\">'.parent::_toHtml().'</div>';\n }", "title": "" }, { "docid": "a88150fe9dd7b8fb73b7d8166b05a135", "score": "0.56627107", "text": "protected function xmlEncode()\n {\n $this->writer = new XmlWriter();\n $this->writer->openMemory();\n $this->writer->startDocument('1.0', 'UTF-8');\n $this->writer->startElement(\\strtolower(denamespace(($this->model))));\n $this->write($this->toArray());\n $this->writer->endElement();\n $this->writer->endDocument();\n $xml = $this->writer->outputMemory(true);\n\n if (@$this->options['skip_instruct'] == true)\n {\n $xml = \\preg_replace('/<\\?xml version.*?\\?>/', '', $xml);\n }\n\n return $xml;\n }", "title": "" }, { "docid": "682b30dc0f994a538d8a4f7bb18a5cf5", "score": "0.56592816", "text": "function ToXMLString(\n )\n {\n /* method ToXMLString */\n }", "title": "" }, { "docid": "d1d23cbbed563e6e2ce2d612e99c4fe5", "score": "0.5622617", "text": "public function dump()\n {\n $this->_domDocument->formatOutput = true;\n echo $this->_domDocument->saveXML();\n }", "title": "" }, { "docid": "8d6d31a6ac86a6eef442bba640ad6308", "score": "0.5615347", "text": "public function getXml()\n {\n return $this->toXmlObject()->asNiceXml();\n }", "title": "" }, { "docid": "41fd8ba8e44407edc72a144c9c968f95", "score": "0.55916065", "text": "public function toXml() {\r\n return call_user_func_array(array('XmlComponent', 'fromArray'), func_get_args());\r\n }", "title": "" }, { "docid": "a697a33eaf9ea8f634f589a212efda6c", "score": "0.559088", "text": "final protected function renderXmlTvElement(XmlSerializable $element): string\n {\n $doc = new DOMDocument();\n $this->buildXmlTvElement($doc, $element->xmlSerialize());\n return $doc->saveXML($doc->firstChild);\n }", "title": "" }, { "docid": "d671a3994d20bb6de48fc478592551e6", "score": "0.55905426", "text": "private function _serialize()\n {\n $this->setIndent(true);\n $this->setIndentString(' ');\n $this->startDocument('1.0', 'UTF-8');\n $this->_namespaces = array();\n $this->_tagStack = array();\n $this->_state = array();\n $this->_type = 'Tag';\n $this->_expectedDepth = 0;\n $this->_lastkey = array();\n $lastdepth = 0;\n foreach ($this->_iter = new \\RecursiveIteratorIterator(\n new \\RecursiveArrayIterator($this->_array),\n \\RecursiveIteratorIterator::SELF_FIRST) as $key => $values) {\n $depth = $this->_iter->getDepth();\n while ($depth < $this->_expectedDepth) {\n // finished with this tag\n $this->_finish($key, $values);\n $lastdepth--;\n }\n\n if (isset($this->_lastkey[$depth]) && $key != $this->_lastkey[$depth]) {\n while ($lastdepth > $depth) {\n $this->_finish($key, $values);\n $lastdepth--;\n }\n }\n\n $this->_lastkey[$depth] = $key;\n foreach ($this->_lastkey as $d => &$k) {\n if ($d > $depth) {\n $k = false;\n }\n }\n\n $this->_lastkey = array_filter($this->_lastkey, array('Pyrus\\XMLWriter', '_filter'));\n $lastdepth = $depth;\n if ($this->_type !== 'Attribs') {\n if ($key === '_content') {\n $this->text($values);\n continue;\n }\n\n if ($key === 'attribs') {\n // attributes are 1 depth higher\n $this->_pushState();\n $this->_expectedDepth = $this->_iter->getDepth() + 1;\n $this->_type = 'Attribs';\n // cycle to first attribute\n continue;\n }\n }\n\n $next = '_handle' . $this->_type;\n while ($next = $this->{$next}($key, $values));\n }\n\n while ($lastdepth) {\n $this->_finish($key, $values);\n $lastdepth--;\n }\n\n $this->endDocument();\n return $this->flush();\n }", "title": "" }, { "docid": "897bfd82892daada02b01a5e69312a1d", "score": "0.55596447", "text": "public function __toString()\n {\n $nodes = $this->data->xpath('./child::*');\n if (count($nodes) == 1) {\n return $nodes[0]->asXML();\n } elseif (count($nodes) > 1) {\n throw new \\RuntimeException('recordData contains more than one node!');\n }\n\n return $this->data->text();\n }", "title": "" }, { "docid": "13c6937e2d9de3d25ec39fae69272711", "score": "0.5548192", "text": "public function serialize()\r\n {\r\n $data = $this->toArray();\r\n\r\n return serialize($data);\r\n }", "title": "" }, { "docid": "6642c8e9b0ee415f6b6614ad15ac3cfd", "score": "0.55282235", "text": "public function __toString()\n {\n $text = \"<{$this->_type}\";\n if (count($this->_attributes)) {\n $text .= ' ' . Common::getAttributeList($this->_attributes);\n }\n if ($this->_isEmpty) {\n return $text . ' />';\n } else {\n $text .= '>' . implode('', $this->_content);\n return $text . \"</{$this->_type}>\" . PHP_EOL;\n }\n }", "title": "" }, { "docid": "826872cf5fea5ea61b00b82500c0ba14", "score": "0.55271614", "text": "public function innerHTML()\n\t{\n\t\t$dom = dom_import_simplexml($this);\n\t\t$doc = $dom->ownerDocument;\n\n\t\t$html = '';\n\t\tforeach ($dom->childNodes as $child)\n\t\t{\n\t\t\t$html .= ($child instanceof DOMText) ? $child->textContent : $doc->saveXML($child);\n\t\t}\n\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "613481a39770bce97a6d6f3fd238f27c", "score": "0.5522607", "text": "function toXML() {\n\t\t$value = $this->valueToXML();\n\n\t\t$xml = '';\n\t\tif( is_null( $value ) || strlen($value) == 0 )\n\t\t{\n\t\t\t$xml .= '<'.$this->name.$this->__renderAttrs().'/>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$xml .= '<'.$this->name.$this->__renderAttrs().'>';\n\t\t\t$xml .= $value;\n\t\t\t$xml .= '</'.$this->name.'>';\n\t\t}\n\t\treturn $xml;\n\t}", "title": "" }, { "docid": "13725c4f1f0df5e7024c82ca3c117973", "score": "0.5516214", "text": "public function toEzXml( DOMDocument $document, DOMElement $root );", "title": "" }, { "docid": "cdab02b38ace075ae045a997dfc2cc06", "score": "0.5508145", "text": "public function serialize() // -> string [\\SplDoublyLinkedList]\n\t{\n\t\treturn serialize($this->first);\n\t}", "title": "" }, { "docid": "a687d68e4b5664b6ab8090edb1b9349a", "score": "0.54949677", "text": "public function serialize() {\r\n return serialize($this->_dataContainer);\r\n }", "title": "" }, { "docid": "b215b07a337d5fce7510c9590534ba7a", "score": "0.54849225", "text": "private static function dom_serialize($dom_document)\n\t{\n\t\t$body_node = $dom_document->getElementsByTagName('body')->item(0);\n\t\t$body_content = '';\n\t\n\t\tforeach ($body_node->getElementsByTagName('script') as $node)\n\t\t{\n\t\t\tText::_escape_cdata_element($dom_document, $node);\n\t\t}\n\n\t\tforeach ($body_node->getElementsByTagName('style') as $node)\n\t\t{\n\t\t\tText::_escape_cdata_element($dom_document, $node, '/*', '*/');\n\t\t}\n\t\n\t\tforeach ($body_node->childNodes as $child_node)\n\t\t{\n\t\t\t$body_content .= $dom_document->saveXML($child_node);\n\t\t}\n\n\t\treturn preg_replace('|<([^> ]*)/>|i', '<$1 />', $body_content);\n\t}", "title": "" }, { "docid": "154ada034fefabe873e5d25ea5063446", "score": "0.54830664", "text": "public function saveXml()\n {\n return $this->dom->saveXml();\n }", "title": "" }, { "docid": "50d82e1f0e70db4b9075f3c3e0a09fc2", "score": "0.5473842", "text": "public function __toString(){\n\t\treset($this->contents);\n\t\t$first = FALSE;\t\t//\n\t\tif(self::$outputting){\n\t\t\tself::$indent++;\n\t\t}else{\n\t\t\t$first = self::$outputting = TRUE;\n\t\t}\n\n\t\t$attribs = \"\";\n\t\t$attrib_format = \" %s=\".self::$quote.\"%s\".self::$quote;\n\t\tforeach($this->attributes as $key=>$value){\n\t\t\tif($value === true) {\n\t\t\t\t$attribs .= \" \" . $key;\n\t\t\t}\n\t\t\telse if ($value === false) {\n\t\t\t}\n\t\t\telse if(is_numeric($key)){\n\t\t\t\t$attribs .= \" \" . $value;\n\t\t\t}else{\n\t\t\t\t$attribs .= sprintf($attrib_format, $key, $value);\n\t\t\t}\n\t\t}\n\n\t\t$args = array($this->tag, $attribs, \"\", $this->tag);\n\n\t\t$nl = self::$nl_char;\n\t\t$t = self::$indent_char;\n\t\tif($this->display == self::DISPLAY_INLINE){\n\t\t\tself::$nl_char = \" \";\n\t\t\tself::$indent_char = \"\";\n\t\t}\n\n\t\tif(count($this->contents)==0 && $this->empty == self::PAIRED){\n\t\t\t$this->contents[] = $this->empty;\n\t\t}\n\n\n\t\t$out = \"\";\n\t\tif(empty($this->tag)){\n\t\t\t//if an empty tag, no tag wrtappers or attributes\n\t\t\t//$out = \"\";\n\t\t\tforeach($this->contents as $content){\n\t\t\t\tif($content instanceof OTagObject){\n\t\t\t\t\tself::$indent--;\n\t\t\t\t\t$out .= self::_nl(self::$indent+1).$content->__toString();\n\t\t\t\t\tself::$indent++;\n\t\t\t\t}else{\n\t\t\t\t\t$out .= self::_nl(self::$indent).$content;\n\t\t\t\t}\n\t\t\t}\n\t\t}elseif(count($this->contents)==0){\n\t\t\t//if an empty tag\n\t\t\t$out = vsprintf(self::EMPTY_FORMAT,array($this->tag,$attribs));\n\t\t}elseif(count($this->contents) == 1 && !(current($this->contents) instanceof OTagObject)){\n\t\t\t//if contains a single item and contents not an OTag, don't nl indent contents'\n\t\t\t$args[2] = current($this->contents);\n\t\t\t$out = vsprintf(self::FORMAT, $args);\n\t\t}else{\n\t\t\t//if contains multiple contents or content is a OTag\n\t\t\t$args[2] = \"\";\n\t\t\tforeach($this->contents as $content){\n\t\t\t\tif($content instanceof OTagObject){\n\t\t\t\t\t$args[2] .= self::_nl(self::$indent+1).$content->__toString();\n\t\t\t\t}else{\n\t\t\t\t\t$args[2] .= self::_nl(self::$indent+1).$content;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$args[2] .= self::_nl(self::$indent);\n\t\t\tif($this->display == self::DISPLAY_INLINE){\n\t\t\t\t$args[2]=trim($args[2]);\n\t\t\t}\n\t\t\t$out = \tvsprintf(self::FORMAT, $args);\n\t\t}\n\t\tif($this->display == self::DISPLAY_INLINE){\n\t\t\tself::$nl_char = $nl;\n\t\t\tself::$indent_char = $t;\n\t\t}\n\n\t\tif($first){\n\t\t\tself::$outputting = FALSE;\n\t\t}else{\n\t\t\tself::$indent--;\n\t\t}\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "f127de5f7ed2abe682e46e97bd34e3e9", "score": "0.5465015", "text": "function serialize() {\n\t\t$output = \"\";\n\t\t$output .= $this->preamble();\n\t\t$output .= $this->outputalbums();\n\t\t$output .= $this->postamble();\n\t\t// header(\"Content-type: text/xml\");\n\t//\theader(\"Content-type: application/XML+xml\");\n\t\t// fix copyright symbols\n\t\tpreg_replace (\"/\\©/\", \"&#xA9\", $output);\n\t\tpreg_replace (\"/\\&copy;/\", \"&#xA9\", $output);\n\t\treturn ( utf8_encode ($output) );\n\t}", "title": "" }, { "docid": "7d155062302a6adf5a37cf0082d81d27", "score": "0.54591537", "text": "public function asDOM()\n\t{\n\t\treturn dom_import_simplexml($this);\n\t}", "title": "" }, { "docid": "7b5dc579ae4d87ef4a0e4f31742e4953", "score": "0.54582435", "text": "public function serialize()\n\t{\n\t\treturn serialize($this);\n\t}", "title": "" }, { "docid": "342118f0cff877cfd35140f7e2d5c950", "score": "0.5454076", "text": "public function toSerialize()\n {\n return serialize($this);\n }", "title": "" }, { "docid": "c8101dd01bd5d161d2ce34996266d6f0", "score": "0.54325813", "text": "public function serialize() {\n\n $str = \"BEGIN:\" . $this->name . \"\\r\\n\";\n\n /**\n * Gives a component a 'score' for sorting purposes.\n *\n * This is solely used by the childrenSort method.\n *\n * A higher score means the item will be lower in the list.\n * To avoid score collisions, each \"score category\" has a reasonable\n * space to accomodate elements. The $key is added to the $score to\n * preserve the original relative order of elements.\n *\n * @param int $key\n * @param array $array\n * @return int\n */\n $sortScore = function($key, $array) {\n\n if ($array[$key] instanceof Component) {\n\n // We want to encode VTIMEZONE first, this is a personal\n // preference.\n if ($array[$key]->name === 'VTIMEZONE') {\n $score=300000000;\n return $score+$key;\n } else {\n $score=400000000;\n return $score+$key;\n }\n } else {\n // Properties get encoded first\n // VCARD version 4.0 wants the VERSION property to appear first\n if ($array[$key] instanceof Property) {\n if ($array[$key]->name === 'VERSION') {\n $score=100000000;\n return $score+$key;\n } else {\n // All other properties\n $score=200000000;\n return $score+$key;\n }\n }\n }\n\n };\n\n $tmp = $this->children;\n uksort($this->children, function($a, $b) use ($sortScore, $tmp) {\n\n $sA = $sortScore($a, $tmp);\n $sB = $sortScore($b, $tmp);\n\n if ($sA === $sB) return 0;\n\n return ($sA < $sB) ? -1 : 1;\n\n });\n\n foreach($this->children as $child) $str.=$child->serialize();\n $str.= \"END:\" . $this->name . \"\\r\\n\";\n\n return $str;\n\n }", "title": "" }, { "docid": "4c389781a657a0edcdfc937d044cd5f1", "score": "0.54111433", "text": "public function serialize()\n {\n return serialize($this->toArray());\n }", "title": "" }, { "docid": "4c389781a657a0edcdfc937d044cd5f1", "score": "0.54111433", "text": "public function serialize()\n {\n return serialize($this->toArray());\n }", "title": "" }, { "docid": "bf16df907e4d8da49e92579c6e7cbc24", "score": "0.5404403", "text": "final public function __toString() {\n\n return serialize($this->toArray());\n }", "title": "" }, { "docid": "25232f46278cc341c312b7b0ff3980a1", "score": "0.5398856", "text": "public function toXML() {\n return $this->value;\n }", "title": "" }, { "docid": "c25bfd1d587349882c2bb0bf26882137", "score": "0.5389626", "text": "protected function getAsXmlAtributosRepresentacionXml()\n { \n\n $string_xml =\"\\t\\t\\t<nombre>\".$this->_nombre.\"</nombre>\\n\";\n $string_xml.=\"\\t\\t\\t<descuento>\".$this->_descuento.\"</descuento>\\n\";\n $string_xml.=\"\\t\\t\\t<integracion_disponible>\".$this->_integracion_disponible.\"</integracion_disponible>\\n\";\n $string_xml.= $this->_CanalIntegracion->getAsXml();\n return $string_xml;\n }", "title": "" }, { "docid": "fe03e4dc21b627cfaebae8be1c8dd0d2", "score": "0.5372258", "text": "function makeThisXMLtoArray(DOMNode $oDomNode = null) {\n\tif (is_null ( $oDomNode ) && ! $this->hasChildNodes ()) {\n\t\treturn array ();\n\t}\n\t$oDomNode = (is_null ( $oDomNode )) ? $this->documentElement : $oDomNode;\n\t$arResult = array ();\n\tif (! $oDomNode->hasChildNodes ()) {\n\t\t$arResult [$oDomNode->nodeName] = $oDomNode->nodeValue;\n\t} else {\n\t\tforeach ( $oDomNode->childNodes as $oChildNode ) {\n\t\t\t// how many of these child nodes do we have?\n\t\t\t$oChildNodeList = $oDomNode->getElementsByTagName ( $oChildNode->nodeName ); // count = 0\n\t\t\t$iChildCount = 0;\n\t\t\t// there are x number of childs in this node that have the same tag name\n\t\t\t// however, we are only interested in the # of siblings with the same tag name\n\t\t\tforeach ( $oChildNodeList as $oNode ) {\n\t\t\t\tif ($oNode->parentNode->isSameNode ( $oChildNode->parentNode )) {\n\t\t\t\t\t$iChildCount ++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$mValue = makeThisXMLtoArray ( $oChildNode );\n\t\t\t$mValue = is_array ( $mValue ) ? $mValue [$oChildNode->nodeName] : $mValue;\n\t\t\t$sKey = ($oChildNode->nodeName {0} == '#') ? 0 : $oChildNode->nodeName;\n\t\t\t// this will give us a clue as to what the result structure should be\n\t\t\t// how many of thse child nodes do we have?\n\t\t\t\n\n\t\t\tif ($iChildCount == 1) { // only one child � make associative array\n\t\t\t\t$arResult [$sKey] = $mValue;\n\t\t\t} elseif ($iChildCount > 1) { // more than one child like this � make numeric array\n\t\t\t\t$arResult [$sKey] [] = $mValue;\n\t\t\t} elseif ($iChildCount == 0) { // no child records found, this is DOMText or DOMCDataSection\n\t\t\t\t$arResult [$sKey] = $mValue;\n\t\t\t}\n\t\t}\n\t\t// if the child is bar, the result will be array(bar)\n\t\t// make the result just �bar�\n\t\tif (count ( $arResult ) == 1 && isset ( $arResult [0] ) && ! is_array ( $arResult [0] )) {\n\t\t\t$arResult = $arResult [0];\n\t\t}\n\t\t$arResult = array ($oDomNode->nodeName => $arResult );\n\t}\n\t// get our attributes if we have any\n\tif ($oDomNode->hasAttributes ()) {\n\t\tforeach ( $oDomNode->attributes as $sAttrName => $oAttrNode ) {\n\t\t\t// retain namespace prefixes\n\t\t\t$arResult [\"@{$oAttrNode->nodeName}\"] = $oAttrNode->nodeValue;\n\t\t}\n\t}\n\treturn $arResult;\n}", "title": "" }, { "docid": "0af74f15f11e8f387386b161988becda", "score": "0.5336252", "text": "protected function nodeToString(string $indent = ''): string\n {\n $str = $indent . \"--{$this->getName()}--\\n\";\n $str .= $this->listenersToString($indent . ' ');\n\n foreach ($this->getChildren() as $child)\n {\n $str .= $child->nodeToString($indent . ' ');\n }\n\n return $str;\n }", "title": "" }, { "docid": "e33fa7d7f306be21aa5b38f78d339443", "score": "0.5321837", "text": "protected function _xmlToArray(Varien_Simplexml_Element $element)\n {\n if (!$element->hasChildren()) {\n return (string) $element;\n }\n\n $result = array();\n foreach ($element->children() as $_name => $_child) {\n if (isset($result[$_name])) {\n if (!is_array($result[$_name]) || !isset($result[$_name]['__list'])) {\n $result[$_name] = array($result[$_name]);\n $result[$_name]['__list'] = true;\n }\n $result[$_name][] = $this->_xmlToArray($_child);\n } else {\n $result[$_name] = $this->_xmlToArray($_child);\n }\n }\n\n // Remove temp __list mark\n array_walk($result, function (&$node) {\n if (is_array($node)) {\n unset($node['__list']);\n }\n });\n\n return $result;\n }", "title": "" }, { "docid": "6cde23d1efefa959e2e0138479eede36", "score": "0.5318008", "text": "protected function __wakeup()\n {\n $this->m_node = new DOMDocument('1.0', 'utf-8');\n $this->m_node->formatOutput = true;\n $this->m_root = $this->m_node;\n\n self::$m_serializeRoot = $this->m_node;\n self::fromArray($this->m_node, $this->m_serialData);\n\n // cleanup after unserialization\n self::$m_serializeRoot = NULL;\n $this->m_serialData = NULL;\n }", "title": "" }, { "docid": "ff15431f069f94b9b12fea51ee929c8d", "score": "0.5310773", "text": "protected function nodeXml($node) {\n return $node->ownerDocument->saveXML($node);\n }", "title": "" }, { "docid": "08ff458a4dec50e74c42f7642b189945", "score": "0.5309349", "text": "function asString(){\r\n \t$s = '<job_chain' . $this->attributes(). '>';\r\n \tif ($this->file_order_source != null)\t$s .= $this->file_order_source->asString();\r\n \tif ($this->file_order_sink != null)\t$s .= $this->file_order_sink->asString();\r\n \tif ($this->job_chain_nodes != null)$s .= $this->job_chain_nodes->asString();\r\n $s .= '</job_chain>';\r\n\r\n return $s;\r\n \r\n }", "title": "" }, { "docid": "a1b5b2c2d6646d63dec55ef07876c9b0", "score": "0.5309229", "text": "public function asDNBXml();", "title": "" }, { "docid": "cbf10be723c454bcbfa39daa41f4e7f0", "score": "0.5304276", "text": "public function serialize() {\n\t\treturn serialize($this->data);\n\t}", "title": "" }, { "docid": "4425740a0b923d69c65bb7bbcdac0bcd", "score": "0.530225", "text": "public function getXml() {\n return $this->_getXml();\n }", "title": "" }, { "docid": "fca58c9b9c4df173545221de94e27806", "score": "0.5298653", "text": "public function serialize(){\n return $this->returnString(parent::serialize());\n }", "title": "" }, { "docid": "c932506b37abe006f1ca881830b381f8", "score": "0.52853596", "text": "public final function __toString() {\n\t\t\treturn (string) serialize($this->unbox());\n\t\t}", "title": "" }, { "docid": "cc8e9c989c2c09a50f1367463dfc13c6", "score": "0.52807695", "text": "public function getXML()\n\t{\n\t\t$xml = simplexml_load_string(\"<?xml version='1.0' encoding='utf-8'?><rajaxXML />\");\n\t\tforeach ($this->data as $entry) {\n\t\t\t$row = $xml->addChild('row');\n\t\t\tforeach($entry as $key => $value) {\n\t\t\t\t$row->addChild($key, $value);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $xml->asXML();\n\t}", "title": "" }, { "docid": "cc8b5b16ec281b33346c2f5fb57393b9", "score": "0.527513", "text": "public function getXML() {\n return $this->simpleXMLElement;\n }", "title": "" }, { "docid": "a2a24f8d3fdcc43a96abe4cabec4056a", "score": "0.52744097", "text": "function toXMLNode() {\n\t\t$dom = new DOMDocument();\n\t\t$element = $dom->createElement(\"user\");\n\t\t\n\t\tforeach ($this->getXMLSerializableFields() as $attribute) {\n\t\t\t// AR I want to change date format for XML to Y/m/d\n\t\t\tif (trim($this->$attribute) != \"\") $element->setAttribute($attribute, $this->serializeAttribute($attribute));\n\t\t}\n\t\t\n\t\treturn $element;\n\t}", "title": "" }, { "docid": "7f342ee405494b93153d21d31f993cb3", "score": "0.52740544", "text": "function dom_reconstruct(DOMElement $node){\n\t$dom = new DOMDocument(); \n\t$dom->appendChild($dom->importNode($node, true)); \n\n\treturn $dom->saveHTML(); \n}", "title": "" }, { "docid": "a26da0e5188c8a86342e67f46c8999f0", "score": "0.5263264", "text": "public function toXML( )\n {\n \n $xml = \"<result><code>$this->code</code><data>\";\n foreach( $this->_data as $quote ) {\n $xml .= $quote->toXML();\n }\n $xml .= \"</data></result>\";\n return $xml;\n }", "title": "" }, { "docid": "ea938fcfeb15223307175067d6244066", "score": "0.5261515", "text": "public function serialize()\n\t{\n\t\treturn serialize($this->getAttributes());\n\t}", "title": "" } ]
0394297b8b6612bba9a1f74698ccdc60
Setup the module output.
[ { "docid": "742208d3a271cb2f21fcdc616e80e0de", "score": "0.0", "text": "public function setup() {\n\n\t\tadd_filter( 'udb_ms_admin_bar_saved_menu', array( self::get_instance(), 'ms_get_saved_menu' ) );\n\t\tremove_action( 'admin_bar_menu', array( Admin_Bar_Output::get_instance(), 'menu_output' ), 1010 );\n\t\tadd_action( 'admin_bar_menu', array( self::get_instance(), 'menu_output' ), 1015 );\n\n\t}", "title": "" } ]
[ { "docid": "dc6b637ba805dbbed91082ef57f921c9", "score": "0.6551438", "text": "public function setUp() {\n $this->_object = new Stdout();\n $this->_object->setConfig();\n }", "title": "" }, { "docid": "fe3366585162732d5b6f1d550d21af05", "score": "0.6072327", "text": "protected function _postConstruct()\n {\n parent::_postConstruct();\n \n // stdout and stderr\n $this->_stdout = fopen('php://stdout', 'w');\n $this->_stderr = fopen('php://stderr', 'w');\n \n // set the recognized options\n $options = $this->_getOptionSettings();\n $this->_getopt = Solar::factory('Solar_Getopt');\n $this->_getopt->setOptions($options);\n \n // follow-on setup\n $this->_setup();\n }", "title": "" }, { "docid": "881bf398f4717707606cb7f68e9818ba", "score": "0.58920085", "text": "public function output_filter()\n\t{\n\t\tglobal $output;\n\t\t$this->output = &$output;\n\n\t\t$this->frontend = new Frontend();\n\t\t$this->module = $this->frontend->run();\n\n\t\tif (strstr($this->output, \"#fixemodule\")) {\n\t\t\t$this->output = $this->replace_placeholders($this->output);\n\t\t}\n\t}", "title": "" }, { "docid": "aa8c518bc6a3bef0ada4d4dac4c17199", "score": "0.586896", "text": "public function initRawOutput()\n {\n // Disable layout ((if any)\n $this->disableLayout();\n\n // Set view rendering off\n $this->_helper->viewRenderer->setNoRender(true);\n\n $this->useHtmlView = false;\n $this->useRawOutput = true;\n }", "title": "" }, { "docid": "8c98c487bc494e83d15d7b0c6abbd01e", "score": "0.5810885", "text": "public function setOutput()\n\t{\n\t\t$this->createBuilder();\n\t\t$this->builder->setOutput();\n\t}", "title": "" }, { "docid": "587da07f52fade59760dc9f651958094", "score": "0.5795736", "text": "private function setup()\r\n\t{ }", "title": "" }, { "docid": "ae63d64468e29aeb08ee3704f0b0a0fc", "score": "0.5790802", "text": "public function manifest()\n {\n $this->enableStaticTplCache();\n\n $this->view->hex_bg_color = $this->config->values['module.setting']['hex.background_color'];\n $this->view->orientation = $this->config->values['module.setting']['orientation_mode'];\n\n $this->jsonOutput();\n }", "title": "" }, { "docid": "2e342d2b48a3675d99d62f15ec948831", "score": "0.57711375", "text": "private function setupPage ()\n {\n $output = '<!DOCTYPE html><html lang=\"en\"><head>';\n $output .= $this->setCharacterEncoding();\n $output .= $this->setPageTitle();\n $output .= $this->setBasePath();\n $output .= $this->fixHTML5();\n $output .= $this->registerCustomResources();\n $output .= '</head><body>';\n echo $output;\n }", "title": "" }, { "docid": "90d640199ba58a5755d487326586cfdd", "score": "0.57700855", "text": "private function setupPage ()\n {\n $output = '<!DOCTYPE html><html lang=\"en\"><head>';\n $output .= $this->setCharacterEncoding();\n $output .= $this->setPageTitle();\n $output .= $this->setBasePath();\n $output .= $this->registerResource('css', $this->cssResource);\n $output .= $this->registerResource('js', $this->jsResource);\n $output .= $this->fixHTML5();\n $output .= '</head><body>';\n echo $output;\n }", "title": "" }, { "docid": "1af6fe27360e3e143bd130dfb1c3aaa7", "score": "0.57649434", "text": "function main()\r\n {\r\n $this->setOutput();\r\n }", "title": "" }, { "docid": "f55a1d151cf77103069432a4881929bb", "score": "0.5696715", "text": "abstract public function setup();", "title": "" }, { "docid": "f55a1d151cf77103069432a4881929bb", "score": "0.5696715", "text": "abstract public function setup();", "title": "" }, { "docid": "f55a1d151cf77103069432a4881929bb", "score": "0.5696715", "text": "abstract public function setup();", "title": "" }, { "docid": "f55a1d151cf77103069432a4881929bb", "score": "0.5696715", "text": "abstract public function setup();", "title": "" }, { "docid": "4c375196b91e0aa2c7af38955caf33cd", "score": "0.5680947", "text": "public function setup() {\n global $CFG;\n\n // Set plugin as enabled in config for this module type.\n set_config('turnitinapiurl', 'http://www.example.com', 'plagiarism_turnitinsim');\n set_config('turnitinapikey', 1234, 'plagiarism_turnitinsim');\n set_config('turnitinenablelogging', 0, 'plagiarism_turnitinsim');\n\n $CFG->mtrace_wrapper = 'plagiarism_turnitinsim_mtrace';\n }", "title": "" }, { "docid": "7ae1528b5642ad1e54bbb9f9f0a7c693", "score": "0.5680903", "text": "abstract function setup();", "title": "" }, { "docid": "57fa5e97be029f3a4fd4a7cfce491a31", "score": "0.564574", "text": "public function setup();", "title": "" }, { "docid": "57fa5e97be029f3a4fd4a7cfce491a31", "score": "0.564574", "text": "public function setup();", "title": "" }, { "docid": "9f5930c5ed0ca0feaabe279932717ec4", "score": "0.56432587", "text": "function output_boot() {\n // Handle view extensions\n register_hook('view', 'prepend', '__output_view_extension_handler');\n register_hook('view', 'extend', '__output_view_extension_handler');\n}", "title": "" }, { "docid": "4ead4e72548bb17b73061e896aa6aa4e", "score": "0.5632355", "text": "public function get_moduleinfo_output() {\n\n global $CFG, $DB, $OUTPUT;\n require_once($CFG->libdir . '/filelib.php');\n\n $result = '';\n\n // Now build HTML\n if (! empty ($this->data->module_code)) {\n \t$result .= html_writer::start_tag('p', array('class'=>'module_specific'));\n \t$result .= html_writer::tag('span', get_string( 'module_code', 'block_module_info' ).': ',\n \t\t\tarray('class'=>'module_info_title'));\n \t$result .= html_writer::tag('strong', $this->data->module_code);\n \t$result .= html_writer::end_tag('p');\n }\n if (! empty ($this->data->module_level)) {\n \t$result .= html_writer::start_tag('p', array('class'=>'module_specific'));\n \t$result .= html_writer::tag('span', get_string( 'module_level', 'block_module_info' ).': ',\n \t\t\tarray('class'=>'module_info_title'));\n \t$result .= html_writer::tag('strong', $this->data->module_level);\n \t$result .= html_writer::end_tag('p');\n }\n if (! empty ($this->data->module_credit)) {\n \t$result .= html_writer::start_tag('p', array('class'=>'module_specific'));\n \t$result .= html_writer::tag('span', get_string( 'module_credit', 'block_module_info' ).': ',\n \t\t\tarray('class'=>'module_info_title'));\n \t$result .= html_writer::tag('strong', $this->data->module_credit);\n \t$result .= html_writer::end_tag('p');\n }\n if (! empty ($this->data->module_semester)) {\n \t$result .= html_writer::start_tag('p', array('class'=>'module_specific'));\n \t$result .= html_writer::tag('span', get_string( 'module_semester', 'block_module_info' ).': ',\n \t\t\tarray('class'=>'module_info_title'));\n \t$result .= html_writer::tag('strong', $this->data->module_semester);\n \t$result .= html_writer::end_tag('p');\n }\n\n // If by this stage result is still empty then display a warning.\n if(empty($result)) {\n $result .= html_writer::tag('p', get_string( 'missing_module', 'block_module_info'), array('class'=>'missing_module'));\n }\n\n return $result;\n\n }", "title": "" }, { "docid": "a043c4f1febf85d84f529d47b8f9d5d6", "score": "0.56318766", "text": "public function setup()\n {\n }", "title": "" }, { "docid": "a043c4f1febf85d84f529d47b8f9d5d6", "score": "0.56318766", "text": "public function setup()\n {\n }", "title": "" }, { "docid": "a043c4f1febf85d84f529d47b8f9d5d6", "score": "0.56318766", "text": "public function setup()\n {\n }", "title": "" }, { "docid": "a043c4f1febf85d84f529d47b8f9d5d6", "score": "0.56318766", "text": "public function setup()\n {\n }", "title": "" }, { "docid": "812931ba70c077bbebc985f351c25056", "score": "0.56161124", "text": "function display(){\n\n\t\t\tview::$output = $this->output;\n\n\t\t}", "title": "" }, { "docid": "6b5a9b6d0f15435e54afbda3cbf5e74a", "score": "0.5610671", "text": "protected function setUp(): void\n {\n \\Magento\\Test\\Profiler\\OutputBambooTestFilter::resetCollectedData();\n\n /**\n * @link http://php.net/manual/en/wrappers.php.php\n */\n $this->_output = new \\Magento\\TestFramework\\Profiler\\OutputBamboo(\n [\n 'filePath' => 'php://filter/write=dataCollectorFilter/resource=php://memory',\n 'metrics' => ['sample metric (ms)' => ['profiler_key_for_sample_metric']],\n ]\n );\n }", "title": "" }, { "docid": "f55a198453d4229389901a4a6915a5b5", "score": "0.5604234", "text": "public function setup()\n {\n $config['plugins'] = array($this->_class);\n $this->_markdown = Solar::factory('Solar_Markdown', $config);\n \n // build the plugin\n $config['markdown'] = $this->_markdown;\n $this->_plugin = Solar::factory($this->_class, $config);\n \n }", "title": "" }, { "docid": "c99860ccb390fa73da5405e7be195246", "score": "0.5602121", "text": "function setup()\r\n {\r\n $this->logger = Logger::getLogger( CART_CONVERTER );\r\n //$this->logger->debug(\"main controller setup \" + current_time( \"timestamp\" ) );\r\n $this->cartController = CartController::getInstance();\r\n \r\n // create options panel\r\n $cartOptions = new CartOptionsController();\r\n $cartOptions->init();\r\n\r\n // init cron\r\n $cron = new CronController();\r\n\r\n // init report\r\n $report = new ReportController();\r\n\r\n do_action( 'cart_converter_setup_action' );\r\n }", "title": "" }, { "docid": "c260c508755eb5666446435a5cc3bf70", "score": "0.559428", "text": "public static function _init()\n\t{\n\t\tself::$dirs = array(\n\t\t\t'output' => \\Config::get('formloader.output_path').'output',\n\t\t\t'forms' => \\Config::get('formloader.output_path').'forms'\n\t\t);\n\t\tself::$headers['attributes'] = <<<HEAD\n<?php\n/**\n * Formloader: Auto Generated Form Configuration\n * --- Please do not edit this file directly... your changes will be overridden! ---\n */\nHEAD;\n\t\t$date = date('Y/m/d H:i:s');\n\t\tself::$headers['items'] = <<<HEAD\n<?php\n/**\n * Formloader: Updated by Formloader Module - $date\n * --- You may edit the below, changes will not be lost, just appended---\n */\nHEAD;\n\t}", "title": "" }, { "docid": "48377c788320bc9cbe0536393664e2ac", "score": "0.557801", "text": "protected function compatibilitySetup(OutputInterface $output)\n {\n $this->actorSuffix = 'Guy';\n\n $this->logDir = 'tests/_log';\n $this->helperDir = 'tests/_helpers';\n\n $this->createGlobalConfig();\n $output->writeln(\"File codeception.yml created <- global configuration\");\n\n $this->createDirs();\n\n $this->createUnitSuite('Code');\n $output->writeln(\"tests/unit created <- unit tests\");\n $output->writeln(\"tests/unit.suite.yml written <- unit tests suite configuration\");\n $this->createServiceSuite('Service');\n $output->writeln(\"tests/service created <- service tests\");\n $output->writeln(\"tests/service.suite.yml written <- service tests suite configuration\");\n $this->createUiSuite('UI');\n $output->writeln(\"tests/ui created <- ui tests\");\n $output->writeln(\"tests/ui.suite.yml written <- ui tests suite configuration\");\n\n if (file_exists('.gitignore')) {\n file_put_contents('tests/_log/.gitignore', '');\n file_put_contents('.gitignore', file_get_contents('.gitignore') . \"\\ntests/_log/*\");\n $output->writeln(\"tests/_log was added to .gitignore\");\n }\n\n }", "title": "" }, { "docid": "370f4c5664f161bcc31ad6273c8c499a", "score": "0.55734694", "text": "abstract protected function setup();", "title": "" }, { "docid": "0daddd8a7500a92bf6013d223395a268", "score": "0.5572177", "text": "public function setup() {}", "title": "" }, { "docid": "fcafc5114c51275463b1138b8e2bf49d", "score": "0.556924", "text": "protected function connectOutput()\n {\n $this->output_handle = fopen($this->output_filepath, 'w');\n }", "title": "" }, { "docid": "e2329a25e62e3100d9db7597f4de49a2", "score": "0.55473775", "text": "function setup() {}", "title": "" }, { "docid": "2bb2b16256f83a09f6c04e477383517f", "score": "0.5545055", "text": "protected function onConstruct()\n {\n $this\n ->option('-t --to <directory>', 'Output directory')\n ->option('-o --overwrite', 'Overwrite if target file exists', 'boolval', false)\n ->usage(\n '<bold> phint export</end> -t . Exports to current dir<eol/>' .\n '<bold> phint e</end> <comment>--to ~/myphint</end> Exports to ~/myphint dir<eol/>'\n );\n }", "title": "" }, { "docid": "b71e6bae6acc07ab82569352bc57f5aa", "score": "0.55402535", "text": "public function setup()\n {\n parent::setup();\n }", "title": "" }, { "docid": "0951bd53cfbf2485ff719984350702ad", "score": "0.5532725", "text": "public function setup(){\n\t\tparent::setup();\n\t\t//Do stuff...\n\t}", "title": "" }, { "docid": "6e8be49102eb7e0bb1134443fde78833", "score": "0.55228734", "text": "protected function setup(){\n }", "title": "" }, { "docid": "a349842f273567824a0be2be1807f6d1", "score": "0.5517568", "text": "abstract protected function setup_info();", "title": "" }, { "docid": "36bcf5cc537a8bce3da647abb88f7c11", "score": "0.5512879", "text": "function display()\n {\n\n view::$output = $this->output;\n }", "title": "" }, { "docid": "a700cb22154d33771721d8a2d25dc326", "score": "0.55054444", "text": "function display()\n {\n view::$output = $this->output;\n }", "title": "" }, { "docid": "adc9320dc09f1879f0890e333fed1a33", "score": "0.5494541", "text": "public function setup()\n {\n $this->_config = array(\n 'adapters' => array(\n array(\n 'adapter' => 'Solar_Log_Adapter_File',\n 'events' => 'debug',\n 'file' => Solar_File::tmp('test_solar_log_adapter_multi.debug.log'),\n 'format' => '%e %m',\n ),\n array(\n 'adapter' => 'Solar_Log_Adapter_File',\n 'events' => 'info, notice',\n 'file' => Solar_File::tmp('test_solar_log_adapter_multi.other.log'),\n 'format' => '%e %m',\n ),\n ),\n );\n \n parent::setup();\n @unlink($this->_config['adapters'][0]['file']);\n @unlink($this->_config['adapters'][1]['file']);\n }", "title": "" }, { "docid": "5a254bdff8c524869430200b8cd7b7b8", "score": "0.54913706", "text": "public function output() {\n }", "title": "" }, { "docid": "2cd3b8283a23ff8685f943eac76243c6", "score": "0.54911524", "text": "public function getOutput()\n {\n $this->output = $output;\n }", "title": "" }, { "docid": "87ef5ddec2bd728188c30c3cec6b6a70", "score": "0.5489809", "text": "public function output() {}", "title": "" }, { "docid": "d33dbe5c19d2048962ba831e7e95dec6", "score": "0.54847896", "text": "private function export() {\r\n $this->app->setTemplateData(array(\"content\" => $this->content, \"content-title\" => \"Oudermisbehandeling\", \"content-sub-title\" => $this->title, \"title\" => \"Ecareplan ~ Oudermisbehandeling - \" . $this->title, \"headscript\" => $this->script));\r\n }", "title": "" }, { "docid": "50e4a4ddf71b8a517aefd796e2b59cfa", "score": "0.548419", "text": "public function pandocSetup()\n {\n $this->pandocOptions = [\n \"data-dir\" => \"app\",\n \"wrap\" => \"none\",\n \"from\" => \"mediawiki\",\n \"to\" => $this->format\n ];\n if (! empty($this->luafilter)) {\n $this->pandocOptions[\"lua-filter\"] = $this->luafilter;\n }\n\n if (! empty($this->template)) {\n $this->pandocOptions[\"template\"] = $this->template;\n }\n $this->message(\"pandoc: \" . json_encode($this->pandocOptions));\n $jsonFile = $this->output . \"tree.json\";\n if (file_exists($jsonFile)) {\n $tree = json_decode(file_get_contents($jsonFile), true); \n $this->outputTree = [];\n $dirTree = $tree[0]['contents'];\n foreach ($dirTree as $dir ) {\n $d = [];\n if (!empty($dir['contents'])) {\n foreach ($dir['contents'] as $r) {\n $d[$r['name']] = true;\n }\n }\n $this->outputTree[$dir['name']] = $d;\n }\n echo json_encode($this->outputTree);\n }\n }", "title": "" }, { "docid": "46afd1a4bfc0bcd4e17631993d90f0b6", "score": "0.5479058", "text": "protected function initializeOutputCompression() {}", "title": "" }, { "docid": "4b35567d91a62d246209e0183ab8d3c4", "score": "0.54651606", "text": "public function setup() {\n\t}", "title": "" }, { "docid": "6d75acdd215fd0de8d4e188a858a4b86", "score": "0.54513186", "text": "function xh_finalModules()\r\n\t{\r\n\t}", "title": "" }, { "docid": "1650b05da0cee27a4e42da03c821da00", "score": "0.544988", "text": "public function setup()\n {\t\t\n }", "title": "" }, { "docid": "1650b05da0cee27a4e42da03c821da00", "score": "0.544988", "text": "public function setup()\n {\t\t\n }", "title": "" }, { "docid": "b49ffe32e9a867d8191ec5f7cf44dd3d", "score": "0.5437545", "text": "protected function setUp(): void\n {\n $this -> outputConnector = new DummyPrintConnector();\n $this -> printer = new Printer($this -> outputConnector);\n }", "title": "" }, { "docid": "32a5ac32abaacc5fdc6d07c9b8d0a9f3", "score": "0.54315406", "text": "protected function createModuleInfo()\n {\n return new Core_ModuleInfo(\n \"SASS Compiler\",\n \"Automatically compiles SASS files\",\n \"Flynsarmy\" );\n }", "title": "" }, { "docid": "f884f1762bf4e371260754213e74ed0c", "score": "0.5428245", "text": "private function generateConfig()\n {\n if ('' == $this->config->getName()) {\n throw new \\InvalidArgumentException('No module name given');\n }\n $target = sprintf(\n '%s/app/code/%s/%s/%s/etc/config.xml',\n $this->config->getPath(),\n $this->config->getCodePool(),\n $this->config->getNamespace(),\n $this->config->getName() \n );\n \n $this->renderFile($this->skeletonDir, 'config.xml', $target, array(\n 'config' => $this->config,\n ));\n \n \n $target = sprintf(\n '%s/app/etc/modules/%s_%s.xml',\n $this->config->getPath(),\n $this->config->getNamespace(),\n $this->config->getName() \n );\n \n $this->renderFile($this->skeletonDir, 'Module.xml', $target, array(\n 'config' => $this->config,\n )); \n }", "title": "" }, { "docid": "3cd60f23ec6a65efa927a31c0e59f28f", "score": "0.5427368", "text": "public function setup()\n\t{\n\t\t// we don't do anything here in the base class\n\t}", "title": "" }, { "docid": "b07faa5c7736a7bcaa13bb8db3d3c88a", "score": "0.54229313", "text": "function displayTools()\n\t{\n\t\t$this->checkDisplayMode();\n\n\t\t// output\n\t\tilUtil::sendInfo();\n\n\t\t// use property forms and add the settings type switch\n\t\t$ctrl_structure_form = $this->initControlStructureForm();\n\t\t$settings_type_form = $this->initSettingsTypeForm();\n\t\t$mp_ns_form = $this->initTreeImplementationForm();\n\n\t\t$this->tpl->setVariable(\"SETUP_CONTENT\",\n\t\t\t$ctrl_structure_form->getHTML() . \"<br />\" .\n\t\t\t$settings_type_form->getHTML().'<br />'.\n\t\t\t$mp_ns_form->getHTML());\n\n\t}", "title": "" }, { "docid": "be539815f1d224e2e869b7b95ae62f0c", "score": "0.5415103", "text": "public function init()\n {\n $this->processInput();\n $this->outputFile();\n }", "title": "" }, { "docid": "3d9bf27112c356667737b9d2f86867c0", "score": "0.5413372", "text": "public function __construct()\n {\n $this->_out = new ConsoleOutput();\n parent::__construct();\n }", "title": "" }, { "docid": "7fa6cd9570a233957c9459b8217dc4a8", "score": "0.541179", "text": "public function create()\n {\n $this->setContent();\n // create config file\n $file = $this->generator->formatConfigPath() .\n ModulesInterface::CONFIG_FILENAME . PhpInterface::PHP_EXT;\n $isCreated = FileManager::createFile($file, $this->sourceCode, true);\n if ($isCreated) {\n Console::out($file . PhpInterface::SPACE . Console::CREATED, Console::COLOR_GREEN);\n }\n }", "title": "" }, { "docid": "9df4978482a325a4886ad511eede9ec1", "score": "0.54076487", "text": "public function setUp() {\n $this->runner= new Runner();\n $this->out= $this->runner->setOut(new class() extends MemoryOutputStream {\n public function getBytes() { return $this->bytes(); }\n });\n $this->err= $this->runner->setErr(new class() extends MemoryOutputStream {\n public function getBytes() { return $this->bytes(); }\n });\n }", "title": "" }, { "docid": "9c4a75accdd482863835cc7f0fb5543c", "score": "0.5406572", "text": "public function initializeOutputCompression() {}", "title": "" }, { "docid": "ae63d318303bfe865d8ce21b2a105fba", "score": "0.53465486", "text": "protected function getModuleHeadline() {}", "title": "" }, { "docid": "1e3710983374575bb4b1f3efc8d56a8d", "score": "0.5343045", "text": "public function init() {\n $this->generate();\n }", "title": "" }, { "docid": "0204a3d10f00290952f95710f4173f3e", "score": "0.5342229", "text": "function setup() {\n // show setup page\n }", "title": "" }, { "docid": "843d19d67d93edd4b7971ab4cfd62cce", "score": "0.5338243", "text": "public function setup (){\n\t\techo \"\\n\";\n\t\techo \"Setting up: `\".$this->installedComponents[0]->name.\"`\\n\";\n\t\techo \"version: `\".$this->installedComponents[0]->version.\"`\\n\";\n\t\t//$installed[0]->version_normalized;\n\t\t\n\t\t\n\t\t#var_dump(\"xyz\");\n\t\techo \"-----------------------------------------\\n\";\n\t\t\n\t\t$searchDir = realpath($this->vendorDir . '/../..');\n\t\tif( file_exists($searchDir.\"/configuration.ini\") ){\n\t\t\techo \"found a previous `configuration.ini` ( \".$searchDir.\"/configuration.ini\".\" ) \\n\";\t\n\t\t\t\n\t\t\t$app = $this->readConfiguration($searchDir.\"/configuration.ini\" );\n\t\t\t$coreComponent = $this->getComponentVersion($this->installedComponents);\n\t\t\t\n\t\t\techo \"\\nsettings\\n\";\n\t\t\t//print_r($app->settings['conn']);\n\t\t\t\n\t\t\t//print_r();\n\t\t\t\n\t\t\t/* create the $this->pdo instance */\n\t\t\t$this->createPDO($app->configuration->role->conn);\n\t\t\t\n\t\t\t\n\t\t\t#echo \"\\npaths\\n\";\n\t\t\t#print_r($app->paths);\n\t\t\t#echo \"\\ncoreComponent\\n\";\n\t\t\t#print_r($coreComponent);\n\t\t\t\n\t\t\t#echo \"need to add config-parse code here..\\n\";\n\t\t\t////////////////////////////////////////////////////\n\t\t\t$this->createdb($this->pdo);\n\t\t\t\n\t\t\t//echo \"\\n\\nFINISHED!!\\n\\n\";\n\t\t\t\n\t\t}else{\n\t\t\techo \"\\n No configuration found, starting setup.\\n\";\n\t\t\t$public_html = $this->public_html();\n\t\t\t$tempFolder = $this->tempFolder();\n\t\t\t\n\t\t\t/* create the $this->pdo instance from requested credentials */\n\t\t\t$dbCredentials = $this->dbCredentials();\n\t\t\t\n\t\t\t////////////////////////////////////////////////////\n\t\t\t$this->pdo;\n\t\t\techo \"\\n\\nUNFINISHED!!\\n\\n\";\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\techo \"\\n\";\n\t}", "title": "" }, { "docid": "22a987a2503eefc47a1cc1ab09d93a55", "score": "0.53373265", "text": "public function setup()\n {\n }", "title": "" }, { "docid": "22a987a2503eefc47a1cc1ab09d93a55", "score": "0.53373265", "text": "public function setup()\n {\n }", "title": "" }, { "docid": "820b1c906594821c02e9f98c5172477e", "score": "0.5334238", "text": "public function setup(){\n parent::setup();\n //Do stuff...\n }", "title": "" }, { "docid": "020313df455ac79ae99007f7e0f46f1f", "score": "0.5333541", "text": "public function output()\n {\n // TODO: Implement output() method.\n }", "title": "" }, { "docid": "5d57ec1e1492397d9a6e627a8433fcef", "score": "0.5332636", "text": "protected function renderUserSetup() {}", "title": "" }, { "docid": "49d2eb43d0fe6ad153c646e29396f6e7", "score": "0.53313184", "text": "public function setOutput(OutputInterface $output)\n {\n $this->output = $output;\n $this->pluginManager->setOutput($output);\n $this->themeManager->setOutput($output);\n $this->composer->setOutput($output);\n }", "title": "" }, { "docid": "c6a26d6e85a4204964bf05c394ea8a2a", "score": "0.5326728", "text": "public function initPage( OutputPage $out ) {\n\t\tparent::initPage( $out );\n\n\t\t$out->addModules( 'skins.nimbus.menu' );\n\t}", "title": "" }, { "docid": "3c63521af7a792e0076fb6297c49674e", "score": "0.53093517", "text": "public function setup()\n {\n // $this->totalSteps = $this->startNumber;\n $this->times = array();\n $this->totalSteps = 1;\n }", "title": "" }, { "docid": "bf08fceed160327fb48fbae04acfc091", "score": "0.53033775", "text": "public function _construct()\r\n {\r\n $this->moduleHelper->setModuleName(self::MODULE_NAME_CONFIG_PATH);\r\n }", "title": "" }, { "docid": "bdf8f23677973f493f553aca0a4e5f3b", "score": "0.5302563", "text": "function output() {\n \n }", "title": "" }, { "docid": "b3db370b959595908c19c2d21824aa9d", "score": "0.52940756", "text": "protected function setUp()\n\t{\n\t\t$module = new stdClass;\n\t\t$this->object = $module;\n\t}", "title": "" }, { "docid": "b3db370b959595908c19c2d21824aa9d", "score": "0.52940756", "text": "protected function setUp()\n\t{\n\t\t$module = new stdClass;\n\t\t$this->object = $module;\n\t}", "title": "" }, { "docid": "384c463fee9e7593e6fd6da324575e81", "score": "0.5291389", "text": "private function writeSetup(): void\n {\n $record = 0x00A1; // Record identifier\n $length = 0x0022; // Number of bytes to follow\n\n $iPaperSize = $this->phpSheet->getPageSetup()->getPaperSize(); // Paper size\n $iScale = $this->phpSheet->getPageSetup()->getScale() ?: 100; // Print scaling factor\n\n $iPageStart = 0x01; // Starting page number\n $iFitWidth = (int) $this->phpSheet->getPageSetup()->getFitToWidth(); // Fit to number of pages wide\n $iFitHeight = (int) $this->phpSheet->getPageSetup()->getFitToHeight(); // Fit to number of pages high\n $iRes = 0x0258; // Print resolution\n $iVRes = 0x0258; // Vertical print resolution\n\n $numHdr = $this->phpSheet->getPageMargins()->getHeader(); // Header Margin\n\n $numFtr = $this->phpSheet->getPageMargins()->getFooter(); // Footer Margin\n $iCopies = 0x01; // Number of copies\n\n // Order of printing pages\n $fLeftToRight = $this->phpSheet->getPageSetup()->getPageOrder() === PageSetup::PAGEORDER_DOWN_THEN_OVER\n ? 0x0 : 0x1;\n // Page orientation\n $fLandscape = ($this->phpSheet->getPageSetup()->getOrientation() == PageSetup::ORIENTATION_LANDSCAPE)\n ? 0x0 : 0x1;\n\n $fNoPls = 0x0; // Setup not read from printer\n $fNoColor = 0x0; // Print black and white\n $fDraft = 0x0; // Print draft quality\n $fNotes = 0x0; // Print notes\n $fNoOrient = 0x0; // Orientation not set\n $fUsePage = 0x0; // Use custom starting page\n\n $grbit = $fLeftToRight;\n $grbit |= $fLandscape << 1;\n $grbit |= $fNoPls << 2;\n $grbit |= $fNoColor << 3;\n $grbit |= $fDraft << 4;\n $grbit |= $fNotes << 5;\n $grbit |= $fNoOrient << 6;\n $grbit |= $fUsePage << 7;\n\n $numHdr = pack('d', $numHdr);\n $numFtr = pack('d', $numFtr);\n if (self::getByteOrder()) { // if it's Big Endian\n $numHdr = strrev($numHdr);\n $numFtr = strrev($numFtr);\n }\n\n $header = pack('vv', $record, $length);\n $data1 = pack('vvvvvvvv', $iPaperSize, $iScale, $iPageStart, $iFitWidth, $iFitHeight, $grbit, $iRes, $iVRes);\n $data2 = $numHdr . $numFtr;\n $data3 = pack('v', $iCopies);\n $this->append($header . $data1 . $data2 . $data3);\n }", "title": "" }, { "docid": "7c637dafac8d1c8432443dbb3673ea93", "score": "0.52867496", "text": "public function setOutput($output)\n {\n $this->_output = $output;\n }", "title": "" }, { "docid": "843468fb85e25d901276dfc0f8ab0d6c", "score": "0.5284998", "text": "function setOutput($output)\r\n\t{\r\n\t\t$this->output = $output;\r\n\t}", "title": "" }, { "docid": "e1d3f24fafac479395f5016cfcefb86b", "score": "0.52829945", "text": "protected function setUp() {\n $this->object = new SymfonyConsoleDisplay;\n }", "title": "" }, { "docid": "2b3b4e94b3807f7a9e18712458c97007", "score": "0.52764714", "text": "public function init()\n\t{\n\t\t// you may place code here to customize the module or the application\n parent::init();\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t'info.models.*',\n\t\t\t'info.components.*',\n\t\t));\n\t}", "title": "" }, { "docid": "096c685de5359c61060c2d4a90bf3085", "score": "0.52740616", "text": "protected function displayConfigHeader() {\n\t\t}", "title": "" }, { "docid": "cffadffbb30965b755386681681c669f", "score": "0.5270091", "text": "public function setUp() {\n $this->transformation = new Modulate();\n }", "title": "" }, { "docid": "bd2c6aef3026ed5dc88471a46ff1dc70", "score": "0.5268078", "text": "public function setup() {\n\t\tadd_action( 'plugins_loaded', array( $this, 'manually_load_api' ), 100 );\n\t\tadd_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );\n\t\tadd_filter( 'plugin_row_meta', array( $this, 'filter_plugin_row_meta' ), 10, 4 );\n\t\tadd_action( 'admin_notices', array( $this, 'permalink_warning' ) );\n\t\tadd_action( 'admin_init', array( $this, 'flush_rewrites' ), 10000 );\n\t}", "title": "" }, { "docid": "b5da53912667ad0e76716d3f75d14645", "score": "0.52585244", "text": "public function init()\n {\n // you may place code here to customize the module or the application\n }", "title": "" }, { "docid": "2ad482ee7ddbea12430b440825a88fc6", "score": "0.52560854", "text": "public function initialize(){\n \n $this\n ->loadLibraries()\n ->loadFrontendApp();\n\n return\n $this->printNamespaceDeclarations() . \"\\n\" .\n $this->declareConfig();\n \n }", "title": "" }, { "docid": "2e5ab8b46d6871e6dce73a87572a7dae", "score": "0.52501273", "text": "public function init () {\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array( //'sitemap.models.*',\n\t\t 'sitemap.extensions.sitemap.*',\n\t\t));\n\t}", "title": "" }, { "docid": "31bfca98917523e251e674a492024390", "score": "0.5249028", "text": "function xh_initModules()\r\n\t{\r\n\t}", "title": "" }, { "docid": "3809d596a18d84541aa0cda734f1480b", "score": "0.5245565", "text": "private function output() {\n \n Quantum\\Output::smartyRender();\n \n }", "title": "" }, { "docid": "d61f8a9833facf31659b16eac9c65afa", "score": "0.5242361", "text": "function __construct(){\n\t\t\n\t\tWPT2()->RegisterModule($this->name, $this->version, $this->author, $this->description, $this->error);\n\n\t\tif($this->helpfile){\n\t\t\tWPT2()->LoadHelp(get_class($this));\n\t\t}\n\n\t}", "title": "" }, { "docid": "eca7f9137686b80f2629904d4f4ff866", "score": "0.5235534", "text": "public function output()\n {\n if (isset($this->label)) {\n $this->label->output();\n }\n parent::output(Element::OUTPUT_COMPONENT);\n }", "title": "" }, { "docid": "2fe4153323481de3e23814dcb9e16e23", "score": "0.5235445", "text": "function setup() {\n\n $this->log(\"--- Setup jelix16 starts\");\n $allModulesDir = $this->parameters->getAllModulesDirs();\n $allPluginsDir = $this->parameters->getAllPluginsDirs();\n $allModules = $this->parameters->getAllSingleModuleDirs();\n\n $appDir = $this->parameters->getAppDir();\n if (!$appDir) {\n throw new \\Exception(\"No application directory is set in JelixParameters\");\n }\n\n $this->readProjectXml();\n $ini = $this->loadLocalConfigFile();\n $configDir = $this->parameters->getVarConfigDir();\n if (!file_exists($configDir)) {\n throw new ReaderException(\"The var/config directory of the jelix application cannot be found. Indicate its path into the composer.json of the application, into an extra/jelix/var-config-dir parameter\");\n }\n $vendorPath = $this->getFinalPath('./');\n\n // retrieve the current modulesPath value\n $modulesPath = $this->getCurrentModulesPath($configDir, $ini, $vendorPath);\n if (count($allModulesDir)) {\n // add all declared modules directories\n foreach($allModulesDir as $path) {\n $modulesPath[] = $this->getFinalPath($path);\n }\n }\n $modulesPath = implode(',', array_unique($modulesPath));\n if ($ini->getValue('modulesPath') != $modulesPath) {\n $ini->setValue('modulesPath', $modulesPath);\n $this->log('New modulesPath: '.$modulesPath);\n }\n\n // retrieve the current pluginsPath value\n $pluginsPath = $this->getCurrentPluginsPath($configDir, $ini, $vendorPath);\n if (count($allPluginsDir)) {\n // add all declared plugins directories\n foreach($allPluginsDir as $path) {\n $pluginsPath[] = $this->getFinalPath($path);\n }\n }\n $pluginsPath = implode(',', array_unique($pluginsPath));\n if ($ini->getValue('pluginsPath') != $pluginsPath) {\n $ini->setValue('pluginsPath', $pluginsPath);\n $this->log('New pluginsPath: '.$pluginsPath);\n }\n\n $modulePathToRemove = array();\n foreach($ini->getValues('modules') as $key => $val) {\n if (preg_match(\"/\\\\.path$/\", $key) && strpos($val, $vendorPath) === 0) {\n $modulePathToRemove[$key] = $val;\n }\n }\n\n if (count($allModules)) {\n // declare path of single modules\n foreach($allModules as $path) {\n $path = $this->fs->normalizePath($path);\n $moduleName = basename($path);\n\n $path = $this->getFinalPath($path);\n $this->log(\"setup path to module $moduleName\");\n if ($ini->getValue($moduleName.'.path', 'modules') != $path) {\n $ini->setValue($moduleName.'.path', $path, 'modules');\n }\n\n if (isset($modulePathToRemove[$moduleName.'.path'])) {\n unset($modulePathToRemove[$moduleName.'.path']);\n }\n }\n }\n\n // erase all \"<module>.path\" keys of modules that are not inside a package anymore\n foreach ($modulePathToRemove as $key => $path) {\n $ini->removeValue($key, 'modules');\n $this->log(\"remove path to module $key\");\n }\n\n $this->setupModuleAccess($ini);\n\n $ini->save();\n foreach($this->entryPoints as $epIni) {\n $epIni->save();\n }\n $this->log(\"Setup jelix16 ends\");\n }", "title": "" }, { "docid": "a2acd895efe834796eaf760aafbd8532", "score": "0.52247787", "text": "protected function setUp()\n {\n \tob_start ();\n \t\n \t$this->object = new slurm ();\n \t$this->object->setListeOptions ( $this->getListeOption () );\n }", "title": "" }, { "docid": "901b631f12af90280b410488cf7ace49", "score": "0.52227235", "text": "public function actionGenerateModuleConfig()\n {\n $detectedModules = $this->actionDetectModules();\n\n $modules = Module::model()->findAll(new CDbCriteria(array(\n 'order' => 'name',\n 'condition' => 'enabled = true',\n )));\n $config = array();\n foreach ($modules as $module) {\n if (!isset($detectedModules[$module->name])) continue;\n $config[$module->name] = array(\n 'class' => $detectedModules[$module->name]\n );\n }\n $str = \"<?php\\nreturn \" . var_export($config, true) . \"\\n?>\";\n file_put_contents(Yii::getPathOfAlias('runtime.cache') . '/modules.php', $str);\n }", "title": "" }, { "docid": "05f7e7e4245ef2978898a0803f241a36", "score": "0.5221597", "text": "protected function outputSpecificStep() {}", "title": "" }, { "docid": "863548d08f496d844afc558449a968c0", "score": "0.5221255", "text": "protected function _postConfig()\n {\n parent::_postConfig();\n if (empty($this->_config['output'])) {\n $mode = (PHP_SAPI == 'cli') ? 'text' \n : 'html';\n $this->_config['output'] = $mode;\n }\n }", "title": "" }, { "docid": "73727469f03294ced57ea50f3bc88e97", "score": "0.5218911", "text": "public function setup()\n\t{\n\t\t$this->xPanel->setModel('App\\Models\\HomeSection');\n\t\t$this->xPanel->setRoute(config('larapen.admin.route_prefix', 'admin') . '/homepage');\n\t\t$this->xPanel->setEntityNameStrings(trans('admin::messages.homepage section'), trans('admin::messages.homepage sections'));\n\t\t$this->xPanel->denyAccess(['create', 'delete']);\n\t\t$this->xPanel->allowAccess(['reorder']);\n\t\t$this->xPanel->enableReorder('name', 1);\n\t\tif (!request()->input('order')) {\n\t\t\t$this->xPanel->orderBy('lft', 'ASC');\n\t\t}\n\t\t\n\t\t$this->xPanel->addButtonFromModelFunction('top', 'reset_homepage_reorder', 'resetHomepageReOrderBtn', 'end');\n\t\t$this->xPanel->addButtonFromModelFunction('top', 'reset_homepage_settings', 'resetHomepageSettingsBtn', 'end');\n\t\t$this->xPanel->removeButton('update');\n\t\t$this->xPanel->addButtonFromModelFunction('line', 'configure', 'configureBtn', 'beginning');\n\t\t\n\t\t/*\n\t\t|--------------------------------------------------------------------------\n\t\t| COLUMNS AND FIELDS\n\t\t|--------------------------------------------------------------------------\n\t\t*/\n\t\t// COLUMNS\n\t\t$this->xPanel->addColumn([\n\t\t\t'name' => 'name',\n\t\t\t'label' => trans(\"admin::messages.Section\"),\n\t\t\t'type' => 'model_function',\n\t\t\t'function_name' => 'getNameHtml',\n\t\t]);\n\t\t$this->xPanel->addColumn([\n\t\t\t'name' => 'active',\n\t\t\t'label' => trans(\"admin::messages.Active\"),\n\t\t\t'type' => 'model_function',\n\t\t\t'function_name' => 'getActiveHtml',\n\t\t]);\n\t\t\n\t\t// FIELDS\n\t\t// ...\n\t}", "title": "" }, { "docid": "09eb9541c78b6fcc3469d43e90a4e841", "score": "0.5213936", "text": "private static function setup()\n {\n $files = ['Routes', 'Setup', 'Response'];\n $folder = static::$root.'Setup'.'/';\n\n self::call($files, $folder);\n\n $files = ['Database', 'Panel', 'Security', 'Maintenance', 'Loggin', 'Translator', 'App', 'Robots'];\n $folder = static::$root.'Setup/Documentations'.'/';\n\n self::call($files, $folder);\n\n $files = ['AppSetupException'];\n $folder = static::$root.'Setup/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "title": "" }, { "docid": "dabaef0ca21502627a48179969e7da9f", "score": "0.5203245", "text": "public function getOutput() {\n if($this->strLogfile != \"\") {\n $strTemplateID = $this->objTemplates->readTemplate(\"/core/module_installer/installer.tpl\", \"installer_log\", true);\n $this->strLogfile = $this->objTemplates->fillTemplate(\n array(\n \"log_content\" => $this->strLogfile,\n \"systemlog\" => $this->getLang(\"installer_systemlog\")\n ), $strTemplateID\n );\n }\n\n\n //build the progress-entries\n $strCurrentCommand = (isset($_GET[\"step\"]) ? $_GET[\"step\"] : \"\");\n if($strCurrentCommand == \"\")\n $strCurrentCommand = \"phpsettings\";\n\n $arrProgressEntries = array(\n \"phpsettings\" => $this->getLang(\"installer_step_phpsettings\"),\n \"config\" => $this->getLang(\"installer_step_dbsettings\"),\n \"loginData\" => $this->getLang(\"installer_step_adminsettings\"),\n \"modeSelect\" => $this->getLang(\"installer_step_modeselect\"),\n \"install\" => $this->getLang(\"installer_step_modules\"),\n \"samplecontent\" => $this->getLang(\"installer_step_samplecontent\"),\n \"finish\" => $this->getLang(\"installer_step_finish\"),\n );\n\n $strProgress = \"\";\n $strTemplateEntryTodoID = $this->objTemplates->readTemplate(\"/core/module_installer/installer.tpl\", \"installer_progress_entry\", true);\n $strTemplateEntryCurrentID = $this->objTemplates->readTemplate(\"/core/module_installer/installer.tpl\", \"installer_progress_entry_current\", true);\n $strTemplateEntryDoneID = $this->objTemplates->readTemplate(\"/core/module_installer/installer.tpl\", \"installer_progress_entry_done\", true);\n\n $strTemplateEntryID = $strTemplateEntryDoneID;\n foreach($arrProgressEntries as $strKey => $strValue) {\n $arrTemplateEntry = array();\n $arrTemplateEntry[\"entry_name\"] = $strValue;\n\n //choose the correct template section\n if($strCurrentCommand == $strKey) {\n $strProgress .= $this->objTemplates->fillTemplate($arrTemplateEntry, $strTemplateEntryCurrentID, true);\n $strTemplateEntryID = $strTemplateEntryTodoID;\n }\n else\n $strProgress .= $this->objTemplates->fillTemplate($arrTemplateEntry, $strTemplateEntryID, true);\n\n }\n $arrTemplate = array();\n $arrTemplate[\"installer_progress\"] = $strProgress;\n $arrTemplate[\"installer_version\"] = $this->strVersion;\n $arrTemplate[\"installer_output\"] = $this->strOutput;\n $arrTemplate[\"installer_forward\"] = $this->strForwardLink;\n $arrTemplate[\"installer_backward\"] = $this->strBackwardLink;\n $arrTemplate[\"installer_logfile\"] = $this->strLogfile;\n $strTemplateID = $this->objTemplates->readTemplate(\"/core/module_installer/installer.tpl\", \"installer_main\", true);\n\n $strReturn = $this->objTemplates->fillTemplate($arrTemplate, $strTemplateID);\n $strReturn = $this->callScriptlets($strReturn);\n $this->objTemplates->setTemplate($strReturn);\n $this->objTemplates->deletePlaceholder();\n $strReturn = $this->objTemplates->getTemplate();\n return $strReturn;\n }", "title": "" } ]
54e6408aa2f9593cdec7294f9b2872d2
Returns all shipping methods offered by this shipper.
[ { "docid": "54a81ccf8c14d80af67579ee724ff4d3", "score": "0.8585494", "text": "public function getShippingMethods()\n {\n return $this->shippingMethods->toArray();\n }", "title": "" } ]
[ { "docid": "29c5fed1e9efaf902d232253921eb670", "score": "0.85200787", "text": "public function get_shipping_methods()\n {\n $methods = DB::table(\"shipping_methods\")\n ->get();\n return $methods;\n }", "title": "" }, { "docid": "0705af06792b6dbb98750a98fc7f2cbd", "score": "0.85012764", "text": "public function getAllShippingMethods()\n {\n if (!isset($this->_shippingMethods)) {\n $methods = $this->getAllCoreShippingMethods();\n\n $additionalMethods = craft()->plugins->call('commerce_registerShippingMethods');\n\n foreach ($additionalMethods as $additional) {\n $methods = array_merge($methods, $additional);\n }\n\n $this->_shippingMethods = $methods;\n }\n\n return $this->_shippingMethods;\n }", "title": "" }, { "docid": "fc5d0a1f6f0d34003045d90082fdcdc0", "score": "0.7918005", "text": "public function shippingMethods(){\n\t\t$shipModel = Base::getModel('Catalogue_ShippingMethods');\n\t\t$select = $shipModel->select()->where('sub_id = ?', $this->sub_id)\n\t\t\t\t\t\t ->where('active = ?', 1)\n\t\t\t\t\t\t ->order('name ASC');\n\t\t$shippingMethods = $shipModel->fetchAll($select);\n\t\tforeach($shippingMethods as $shippingMethod) {\n\t\t\t$shipping_options[$shippingMethod['id']] = $shippingMethod['name'];\n\t\t}\n\t\treturn $shipping_options;\n\t}", "title": "" }, { "docid": "419b7e9640981e4915490df7b5abe008", "score": "0.7739214", "text": "protected function _getAvailableShippingMethodList()\n {\n $rates = array();\n\n foreach($this->_quote->getShippingAddress()->getAllShippingRates() as $rate) {\n $rates[] = array(\n 'code' => $rate->getCode(),\n 'title' => $rate->getMethodTitle(),\n 'description' => $rate->getMethodDescription(),\n 'price' => (float) $rate->getPrice(),\n );\n }\n\n return $rates;\n }", "title": "" }, { "docid": "701dcf8b56d33c5ce9de9740c08d2323", "score": "0.7511754", "text": "public function getShippingMethod();", "title": "" }, { "docid": "701dcf8b56d33c5ce9de9740c08d2323", "score": "0.7511754", "text": "public function getShippingMethod();", "title": "" }, { "docid": "d57da1c747baa3be89b605c56e463753", "score": "0.7342935", "text": "public function shippingmethods($store = null)\n {\n $storeId = $this->_getStoreId($store);\n $shippingMethods = array();\n\n $activeCarriers = Mage::getSingleton('shipping/config')->getActiveCarriers($storeId);\n foreach ($activeCarriers as $carrierCode => $carrierModel) {\n if ($carrierMethods = $carrierModel->getAllowedMethods()) {\n foreach ($carrierMethods as $methodCode => $method) {\n $code = $carrierCode . '_' . $methodCode;\n }\n $carrierTitle = Mage::getStoreConfig('carriers/' . $carrierCode . '/title');\n }\n if(isset($code) && isset($carrierTitle)) {\n $shippingMethods[] = array(\n 'code' => $code,\n 'name' => $carrierTitle\n );\n }\n }\n\n return json_encode(array_values($shippingMethods),JSON_PRETTY_PRINT + JSON_UNESCAPED_SLASHES);\n }", "title": "" }, { "docid": "1ffa1ba520e56141fc84510b5efaade3", "score": "0.7338207", "text": "public function getDeliveryMethods()\n {\n return $this->delivery_methods;\n }", "title": "" }, { "docid": "2392d0a8cf6b065efe2f40a041666b70", "score": "0.72520673", "text": "public function GetAvailableDeliveryMethods()\n\t{\n\t\t$methods = array();\n\n\t\t$domesticServices = $this->GetDomesticServices();\n\t\tforeach ($domesticServices as $service) {\n\t\t\t$methods[] = $service['description'];\n\t\t}\n\n\t\t// Get the international services\n\t\t$intlServices = $this->GetIntlServices();\n\t\tforeach ($intlServices as $service) {\n\t\t\t$methods[] = GetLang('USPSIntlService_' . $service);\n\t\t}\n\n\t\t$displayName = $this->GetDisplayName();\n\n\t\tforeach ($methods as $key => $method) {\n\t\t\t$methods[$key] = $displayName.' ('.$method.')';\n\t\t}\n\n\t\treturn $methods;\n\t}", "title": "" }, { "docid": "325c69791c6d58141087b4d787e46543", "score": "0.7178351", "text": "public function GetAvailableDeliveryMethods()\n\t\t{\n\t\t\t$methods = array();\n\n\t\t\t// Get the selected delivery types\n\t\t\t$delivery_types = $this->GetValue(\"deliverytypes\");\n\n\t\t\tif(!is_array($delivery_types) && $delivery_types != \"\") {\n\t\t\t\t$delivery_types = array($delivery_types);\n\t\t\t}\n\n\t\t\tforeach($delivery_types as $delivery_type) {\n\t\t\t\t$methods[] = $this->GetDisplayName() . ' (' . $this->_deliverytypes[$delivery_type].')';\n\t\t\t}\n\n\t\t\treturn $methods;\n\t\t}", "title": "" }, { "docid": "d9887ce579ea0805ea3de57bb595a0b6", "score": "0.7073596", "text": "function _getShippingTypes(){\n\n return array();\n }", "title": "" }, { "docid": "66d5a82b90f6a221ce3f3ba9a8e017bf", "score": "0.70612526", "text": "public function getShippingMethodsAction(){\n\t\tif (!$_POST['zipcode'] || !$_POST['country']){\t\t\t\n\t\t\theader(\"HTTP/1.0 400 Bad Request\");\n\t\t\tdie('{error:400}');\n\t\t}\n\t\t$addressData['zipcode'] = $_POST['zipcode'];\n\t\t$addressData['region'] = $_POST['region'];\n\t\t$addressData['city'] = $_POST['city'];\n\t\t$addressData['country_id'] = $_POST['country'];\n\n\t\t$session = Mage::getSingleton('checkout/session');\n\t\t$address = $session->getQuote()->getShippingAddress()->addData($addressData);\n\n \t$currencySym = Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol();\n\n\t $rates = $address->setCollectShippingRates(true)->collectShippingRates()->getGroupedAllShippingRates();\n\t $i = 0;\n\t foreach ($rates as $code => $carrier) {\n\t \t$title = Mage::getStoreConfig('carriers/'.$code.'/title');\n\t \t$shipMethods[$i][\"label\"] = $title;\n\t \t$shipMethods[$i][\"id\"] = $code;\n\t \t$j = 0;\n\t foreach ($carrier as $rate) {\n\t // $shipMethods[$i][\"rates\"][] = array(\n\t // \t\"cost\" => $currencySym.$rate->getPrice(),\n\t // \t\"label\" => $rate->getMethodTitle()\n\t // \t);\n\t $shipMethods[$i][\"rates\"][$j][\"cost\"] = $currencySym.$rate->getPrice();\n\t $shipMethods[$i][\"rates\"][$j][\"label\"] = $rate->getMethodTitle();\n\t $j++;\n }\n $i++;\n }\n $paymentObj = Mage::getSingleton('payment/config');\n\t\t$payments = $paymentObj->getActiveMethods();\n \t$payMethods = array();\n \t$i = 0;\n \tforeach ($payments as $paymentCode => $paymentModel) {\n \t\tif($paymentModel->canUseCheckout() == 1 \n \t\t\t&& $paymentCode != 'free'\n \t\t\t&& $paymentCode != 'checkmo'\n \t\t\t&& $paymentCode != 'banktransfer'\n \t\t\t&& $paymentCode != 'cashondelivery'\n \t\t\t&& $paymentCode != 'googlecheckout'){\n\n\t \t\t$cctypes = $paymentObj->getCcTypes();\n\t \t\t$cardTypes = array();\n\t $availableTypes = $paymentModel->getConfigData('cctypes');\n\t if ($availableTypes) {\n\t $availableTypes = explode(',', $availableTypes);\n\t foreach ($cctypes as $code => $name) {\n\t if (in_array($code, $availableTypes)) {\n\t $cardTypes[] = array(\n\t \t'id' => $code,\n\t \t'label' => $name\n \t);\n\t }\n\t } \n\t \t}\n\n\t \t$paymentTitle = Mage::getStoreConfig('payment/'.$paymentCode.'/title');\n\t \t$useccv = Mage::getStoreConfig('payment/'.$paymentCode.'/useccv');\n\t $payMethods[$i++] = array(\n\t \t'id' => $paymentCode,\n\t 'label' => $paymentTitle,\n\t 'useccv' => ($useccv) ? true : false,\n\t 'cctypes' => $cardTypes\n\t ); \t\t\t\n \t\t}\n }\n $result = array();\n if (!$shipMethods || !$payMethods){ \t\n\t\t\theader(\"HTTP/1.0 400 Bad Request\");\n\t\t\tdie('{error:400}');\n }\n else{\n \t$result['shippings'] = $shipMethods;\n \t$result['payments'] = $payMethods;\n }\n\t echo json_encode($result);\n\t}", "title": "" }, { "docid": "2605938f170c7a1045ac6d6b13106e73", "score": "0.70552653", "text": "public function shippingProviders()\n {\n return $this->request('POST', '/v1/order/shipping-provider/list', ['body' => '{}']);\n }", "title": "" }, { "docid": "407630ec5b0e9ce451aa85f694518702", "score": "0.7009886", "text": "public function showShippingMethodsAction()\n {\n $response = false;\n\n try {\n $model = $this->_initModel();\n if (!$model->getId()) {\n Mage::throwException($this->__('Wrong rma id.'));\n }\n\n } catch (Mage_Core_Exception $e) {\n $response = array(\n 'error' => true,\n 'message' => $e->getMessage(),\n );\n } catch (Exception $e) {\n $response = array(\n 'error' => true,\n 'message' => $this->__('Cannot display available shipping methods.')\n );\n }\n\n $this->loadLayout();\n $response = $this->getLayout()\n ->getBlock('enterprise_rma_shipping_available')\n ->toHtml()\n ;\n\n if (is_array($response)) {\n $response = Mage::helper('core')->jsonEncode($response);\n $this->getResponse()->setBody($response);\n } else {\n $this->getResponse()->setBody($response);\n }\n }", "title": "" }, { "docid": "aaad3a53c517f9abb50b79c82e70ef0c", "score": "0.69899845", "text": "function shipping_method($methods) {\n \t$methods['wcis'] = 'WCIS_Method';\n $methods['wcis_zone'] = 'WCIS_Zones_Method';\n \treturn $methods;\n }", "title": "" }, { "docid": "ff76133ae43915ea0fe60d7c10aacc66", "score": "0.6962554", "text": "public function getShippingInfo($activeMethods = 1);", "title": "" }, { "docid": "1c07493fd1066bb620bd83b6096ddf99", "score": "0.6947719", "text": "public static function getShipping()\n {\n $queryString =\n 'SELECT * FROM `shipping_methods` ORDER BY RAND()';\n $paramsArray = array();\n\n // query\n $dbh = new \\Components\\Db();\n $result = $dbh->getResult($queryString, $paramsArray);\n\n return $result;\n }", "title": "" }, { "docid": "2251c02e2ab18e993407d5308ee5c678", "score": "0.6943782", "text": "public function getShippers(): array\n {\n return Shipper::all();\n }", "title": "" }, { "docid": "d39f203d44e3e7d92c25bd420deb33bf", "score": "0.6918777", "text": "public function getShippingMethod()\n {\n return $this->shipping_method;\n }", "title": "" }, { "docid": "8b8f69e3ca9edee91a69fdc1e6959618", "score": "0.6847929", "text": "public function getShippingMethods(UpdateShippingMethodsNotificationInterface $updateContainer);", "title": "" }, { "docid": "82f2f7d62e5c75de8e0be04bd5bf7c0a", "score": "0.68231905", "text": "public function getShippingServiceList()\n {\n return $this->shipping_service_list;\n }", "title": "" }, { "docid": "d2ad8735d785840bc0f9696c95a58a49", "score": "0.68095976", "text": "public function getAllowedMethods()\n {\n $priceList = $this->_getPricing(null, 'default');\n $allowedShippingMethod = array();\n foreach ($priceList as $operator) {\n $allowedShippingMethod[$operator->operatorName] = $operator->operatorFullName;\n $allowedShippingMethod[$operator->operatorName . '_COD'] = $operator->operatorFullName . ' COD';\n }\n\n $allowedShippingMethod['sendit_bliskapaczka'] = 'bliskapaczka.pl';\n\n return $allowedShippingMethod;\n }", "title": "" }, { "docid": "f1fb0ae84bfa83197342426362f0852b", "score": "0.673103", "text": "public static function palpodelivery_get_shipping_method_enabled() {\n\n $results = palpodelivery_common::palpodelivery_get_shipping_settings();\n\t $shipping_enabled = \"\";\n\t foreach ( $results as $key => $value ) {\n\t $var = $var_time = $delivery_dates_str = $setting_to_load_value = '';\n\t $shipping_settings = get_option( $value->option_name );\n\t if( isset( $shipping_settings[ 'delivery_settings_based_on' ][ 0 ] ) &&\n\t \t$shipping_settings[ 'delivery_settings_based_on' ][ 0 ] == 'shipping_methods' ) {\n\t $shipping_enabled = \"yes\";\n\t }\n\t }\n\t return $shipping_enabled;\n\t}", "title": "" }, { "docid": "c90887c9206dbb7577019b966d71a2e0", "score": "0.6710288", "text": "protected function _getAvailableFedexMethods(){\n\t\treturn $this->_getAvailableMethods(Mage::getSingleton('usa/shipping_carrier_fedex')->getCode('method'), $this->_availFedexMethods, self::LABEL_PREFIX_FEDEX);\n\t}", "title": "" }, { "docid": "3a5728768a5a52237e252bc3c44e798a", "score": "0.66995066", "text": "public function getPaymentMethods() {\n\t\treturn GatewayInfo::get_supported_gateways();\n\t}", "title": "" }, { "docid": "3002944835ced041f91fea937dc3463e", "score": "0.66905", "text": "public function getAllAction()\n\t{\n\t\t$shippingMethods = $this->getBaseController()->getAll();\n\n $this->View()->assign('response', Response::dtoEntitiesResponse($shippingMethods));\n\t}", "title": "" }, { "docid": "8f026ad9682d6fbbb333a0e62fd219b8", "score": "0.66540325", "text": "public function getAllCoreShippingMethods($criteria = [])\n {\n $records = Commerce_ShippingMethodRecord::model()->findAll($criteria);\n\n $methods = Commerce_ShippingMethodModel::populateModels($records);\n\n return $methods;\n\n }", "title": "" }, { "docid": "ceb351fbe1e243ccabcca6d8c3498c87", "score": "0.66467094", "text": "public function getShippingAndHandling();", "title": "" }, { "docid": "a7d9ed4cde05e63d5a1ae69d4b777627", "score": "0.66067123", "text": "function getShippingServices(){return array();}", "title": "" }, { "docid": "d2bb69f268d6dd4f1792d284a80c1055", "score": "0.6588597", "text": "public static function getPaymentMethods() {\r\n return self::sendRequest(array('action' => 'getpaymentmethods'));\r\n }", "title": "" }, { "docid": "ade05fc41129670ae8fe5fbb5f4ecaf2", "score": "0.65518963", "text": "public function getAllowedMethods()\n {\n if (!$this->getConfigFlag('user_codes')) {\n \t\treturn $this->getSimpleAllowedMethods();\n }\n\n $collection = Mage::getResourceModel('premiumrate_shipping/carrier_premiumrate_collection');\n $collection = $collection->setDistinctDeliveryCodeFilter();\n $allowedMethods=array();\n $deliveryTypes=array();\n foreach ($collection->getItems() as $item) {\n\n\t if ($item['algorithm']!=\"\")\n\t {\n\t\t\t\t$algorithm_array=explode(\"&\",$item['algorithm']); // Multi-formula extension\n\t\t\t\treset($algorithm_array);\n\t\t\t\t$skipData=false;\n\t\t\t\tforeach ($algorithm_array as $algorithm_single)\n\t\t\t\t{\n\t\t\t\t\t$algorithm=explode(\"=\",$algorithm_single,2);\n\t\t\t\t\tif (!empty($algorithm) && count($algorithm)==2)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (strtolower($algorithm[0])==\"m\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$item['delivery_type']=$algorithm[1];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t }\n\t $newDelType=preg_replace('/&|;| /',\"_\",$item->getData('delivery_type'));\n\t $deliveryTypes[]=$newDelType;\n\t $allowedMethods[$newDelType] = $item->getData('delivery_type');\n }\n return $allowedMethods;\n }", "title": "" }, { "docid": "aca02bc744ef6363280ee4f69ceb807a", "score": "0.6531946", "text": "private function getShipping($args)\n {\n global $woocommerce;\n $shipper = 'OTHER';\n $method = 'OTHER';\n $key = false;\n\n if (!empty($args['shipping_method']) && !empty($args['shipping_method'][0]))\n {\n $methodSlug = $args['shipping_method'][0];\n\t $methodSlug = new StringDecorator($methodSlug);\n\t if($methodSlug->contains(\":\")) {\n\n\t\t list( $method, $key ) = preg_split( '/:/', $methodSlug->__toString() );\n\n\t\t $mapper = false;\n\t\t switch ( $method ) {\n\t\t\t case \"ups\":\n\t\t\t\t $mapper = new UPSMapper();\n\t\t\t\t break;\n\t\t\t case \"fedex\":\n\t\t\t\t $mapper = new FedExMapper();\n\t\t\t\t break;\n\t\t }\n\n\t\t if ( $mapper ) {\n\t\t\t $shipper = $mapper->getShipCompliantKey( $key );\n\t\t }\n\t }\n\t else if ($methodSlug == 'free_shipping') {\n\n\t\t //get the default option from the options\n\n\t\t $default_shipper = get_option('woocommerce_shipcompliant_config_settings');\n\n\t\t $shipper = $default_shipper['default_free_shipping'];\n\n\t }\n }\n\n return array(\n 'cost' => $woocommerce->cart->shipping_total,\n 'wc_method' => $method,\n 'wc_key' => $key,\n 'sc_shipper' => $shipper\n );\n\n }", "title": "" }, { "docid": "af8996b5d41a349517977296cf942265", "score": "0.64970666", "text": "public function refreshMethods()\n {\n $allowedMethodUrl = $this->_helper->getAllowedMethodGatewayUrl();\n\n $shipperMapper = Mage::getSingleton('Webshopapps_Despatchbay_Model_Carrier_Convert_ShipperMapper');\n $resultSet = $this->_getShipperInstance()->getAllowedMethods($shipperMapper->getCredentialsTranslation(), $allowedMethodUrl);\n $this->_debug($resultSet);\n\n $allowedMethodResponse = $resultSet['result'];\n\n if (!is_object($allowedMethodResponse) || !isset($allowedMethodResponse->carrierMethods)) {\n $this->_debug('Unable to parse response');\n\n return array();\n }\n\n $returnedMethods = $allowedMethodResponse->carrierMethods;\n\n $allMethods = array();\n $carrierTitles = array();\n foreach ($returnedMethods as $carrierMethod) {\n\n $rateMethods = $carrierMethod->methods;\n\n foreach ($rateMethods as $method) {\n\n $methodCode = $method->methodCode;\n $methodCode = preg_replace('/&|;| /', \"_\", $methodCode);\n\n if (!array_key_exists($methodCode, $allMethods)) {\n $allMethods[$methodCode] = $method->name;\n }\n }\n\n $carrierTitles[$carrierMethod->carrierCode] = $carrierMethod->title;\n }\n $this->_debug($allMethods);\n\n // go set carrier titles\n $this->setCarrierTitles($carrierTitles);\n $encodedMethods = json_encode($allMethods);\n $this->setAllMethods($encodedMethods);\n\n return $allMethods;\n }", "title": "" }, { "docid": "9ceea58eae55c22775fa69d40128c2ec", "score": "0.64921385", "text": "public function load_shipping_method() {\n\t\tinclude_once( 'class-wc-product-vendors-per-product-shipping-method.php' );\n\t}", "title": "" }, { "docid": "e0b6f9db5a8511c1f15c624cebe45c73", "score": "0.64900386", "text": "protected function _getAvailableUspsMethods(){\n\t\treturn $this->_getAvailableMethods(Mage::getSingleton('usa/shipping_carrier_usps')->getCode('method'), $this->_availUspsMethods, self::LABEL_PREFIX_USPS, TRUE);\n\t}", "title": "" }, { "docid": "1cc8a30467cf297e75002d49d72c2357", "score": "0.6481001", "text": "function shippingMethodList($argWhere = '', $argLimit = '') {\n $arrClms = array(\n 'pkShippingGatewaysID',\n );\n $varOrderBy = \"\";\n //pre($argWhere);\n $varTable = TABLE_SHIP_GATEWAYS;\n $arrRes = $this->select($varTable, $arrClms, $argWhere, $varOrderBy, $argLimit);\n //pre($arrRes);\n return $arrRes;\n }", "title": "" }, { "docid": "dfec954c3d137b78f3cc49d76d1e3878", "score": "0.6478517", "text": "public function getAllowedMethods()\n {\n $allowed = explode(',', $this->getConfigData('allowed_methods'));\n $arr = array();\n $isByCode = $this->getConfigData('type') == 'UPS_XML';\n foreach ($allowed as $k) {\n $arr[$k] = $isByCode ? $this->getShipmentByCode($k) : $this->getCode('method', $k);\n }\n return $arr;\n }", "title": "" }, { "docid": "0fb7663fded1ce3fabd86a536f45c7b3", "score": "0.64775693", "text": "public function getAllPaymentMethods()\n {\n $returnPaymentMethods = array();\n $shopPaymentMethods = Shopware()->Db()->fetchAll(\n \"SELECT DISTINCT name FROM `s_core_paymentmeans` WHERE name != ''\"\n );\n\n foreach ($shopPaymentMethods as $shopPaymentMethod) {\n $paymentMethod = array(\n 'id' => $shopPaymentMethod['name'],\n );\n $returnPaymentMethods[] = $paymentMethod;\n }\n\n return $returnPaymentMethods;\n }", "title": "" }, { "docid": "16b84c894cc7657cb91fcc2aa2c9f242", "score": "0.64715475", "text": "public function getShippingMethodCode();", "title": "" }, { "docid": "275ea5c76a1f82eaf88b304a19cbb21b", "score": "0.64174944", "text": "public function getShipping() {\n return $this->shipping;\n }", "title": "" }, { "docid": "24b24a7adcd589cd7dabf8fcc16b5faf", "score": "0.6416339", "text": "public function add_shipping_method($methods) {\n\t\t\t$methods[] = 'WC_Shipping_ShipTime';\n\t\t\treturn $methods;\n\t\t}", "title": "" }, { "docid": "fad796dd00d40d88099f300ff1058fa1", "score": "0.640729", "text": "public static function palpodelivery_shipping_methods_for_custom() {\n\t global $wpdb;\n\t $shipping_method_based_settings = 'no';\n\t if ( get_option( 'palpodelivery_enable_shipping_based_delivery' ) == 'on' &&\n\t \tget_option( 'palpodelivery_enable_delivery_date' ) == 'on' ) {\n\n\t $results = palpodelivery_common::palpodelivery_get_shipping_settings();\n\t $shipping_settings = array();\n\t foreach ( $results as $key => $value ) {\n\t $shipping_settings = get_option( $value->option_name );\n\t if( isset( $shipping_settings[ 'delivery_settings_based_on' ][ 0 ] ) && $shipping_settings[ 'delivery_settings_based_on' ][ 0 ] == 'shipping_methods' ) {\n\t $shipping_method_based_settings = 'yes';\n\t break;\n\t }\n\t }\n\n\n\t if( 'no' == $shipping_method_based_settings ) {\n\t\t\t\tforeach ( $results as $key => $value ) {\n\t\t $shipping_settings = get_option( $value->option_name );\n\t\t if( isset( $shipping_settings[ 'delivery_settings_based_on' ][ 0 ] ) && $shipping_settings[ 'delivery_settings_based_on' ][ 0 ] == 'product_categories' && isset( $shipping_settings[ 'shipping_methods_for_categories' ] ) && $shipping_settings[ 'shipping_methods_for_categories' ] != '' ) {\n\t\t $shipping_method_based_settings = 'yes';\n\t\t break;\n\t\t }\n\t\t }\n\t }\n\t }\n\n\t return $shipping_method_based_settings;\n\t}", "title": "" }, { "docid": "276749b447bc754c9f6ee8776f7aaceb", "score": "0.6404644", "text": "public function get_payment_methods()\n {\n $methods = DB::table(\"payment_methods\")\n ->get();\n return $methods;\n }", "title": "" }, { "docid": "954f776f7e942b039e36697fdf65f011", "score": "0.63862693", "text": "public function getAllThirdPartyShippingMethods($criteria = [])\n {\n $methods = [];\n\n $additionalMethods = craft()->plugins->call('commerce_registerShippingMethods');\n\n foreach ($additionalMethods as $additional) {\n $methods = array_merge($methods, $additional);\n }\n\n return $methods;\n\n }", "title": "" }, { "docid": "643a2724ef1da08469c5cfe45b42c5de", "score": "0.6339608", "text": "public function getPaymentMethods()\n {\n return $this->scopeConfig->getValue(\n 'payment/walletsystem/allowpaymentmethod',\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n }", "title": "" }, { "docid": "e33ee99df4f5c9fda48a574da9c694f8", "score": "0.6325118", "text": "public function getShippingDetails();", "title": "" }, { "docid": "9a97567216d2139e2570ae03518c8310", "score": "0.6322056", "text": "public function getShipping(): Shipping\n {\n return $this->getModel()->shipping;\n }", "title": "" }, { "docid": "9a97567216d2139e2570ae03518c8310", "score": "0.6322056", "text": "public function getShipping(): Shipping\n {\n return $this->getModel()->shipping;\n }", "title": "" }, { "docid": "7db544ed065bb1479a4651ca81c1ca51", "score": "0.63102466", "text": "public function getAllowedMethods()\n\t{\n\t\t$allowed_methods = array();\n\n\t\tfor ($i = 1; $i < 16; $i++) {\n\t\t\tif ($method_name = Mage::getStoreConfig('carriers/alliance_shipping/method_'.$i.'_name')) {\n\t\t\t\t$slug = $this->convertToSlug($method_name);\n\t\t\t\t$allowed_methods[$slug] = $method_name;\n\t\t\t}\n\t\t}\n\n\t\treturn $allowed_methods;\n\t}", "title": "" }, { "docid": "0ab3ef73f66c13ff1bd474a2c704378b", "score": "0.6301022", "text": "public function getPaymentMethods(){\n // Set method and action\n $method = 'orders';\n $action = 'GetPaymentMethods';\n\n // Send request and retrieve response\n $result = Dispatcher::send($method, $action, array('dummy' => 1));\n\n return $result;\n }", "title": "" }, { "docid": "ad7a63e61630163070b3c19277febfbd", "score": "0.62943274", "text": "public function getPaymentMethods() {\n\t\treturn $this->payment_methods;\n\t}", "title": "" }, { "docid": "c1db7a8725a733a1d8e622748ab85caa", "score": "0.6290829", "text": "public static function wc_shipping_methods_by_instance( $cache_key = 'vsp' ) {\n\t\ttry {\n\t\t\treturn vsp_get_cache( $cache_key . '/wc/shipping_methods_instance' );\n\t\t} catch ( Cache_Not_Found $exception ) {\n\t\t\t/**\n\t\t\t * @var \\WC_Shipping_Zone $zone\n\t\t\t * @var \\WC_Shipping_Method $shipping_method\n\t\t\t */\n\t\t\ttry {\n\t\t\t\t$delivery_zones = WC_Shipping_Zones::get_zones();\n\t\t\t} catch ( Exception $exception_inner ) {\n\t\t\t\t$delivery_zones = array();\n\t\t\t}\n\t\t\t$return = array();\n\t\t\tif ( ! empty( $delivery_zones ) ) {\n\t\t\t\tforeach ( $delivery_zones as $zone ) {\n\t\t\t\t\tif ( ! empty( $zone['shipping_methods'] ) ) {\n\t\t\t\t\t\t$store = array();\n\t\t\t\t\t\tforeach ( $zone['shipping_methods'] as $shipping_method ) {\n\t\t\t\t\t\t\t$store[ $shipping_method->get_instance_id() ] = apply_filters( 'vsp/wc/shipping_methods/instance/label', $shipping_method->get_title(), $shipping_method );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$return[ $zone['zone_name'] ] = $store;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$exception->set( $return );\n\t\t\treturn $return;\n\t\t}\n\t}", "title": "" }, { "docid": "529eca3d7fbc3beb4f275089f0c481d0", "score": "0.62807906", "text": "public function rates()\n {\n return $this->hasMany(ShippingRate::class);\n }", "title": "" }, { "docid": "f411444efd1b68a87d49d6ae3a3be995", "score": "0.62586117", "text": "public function register_shipping_method( $methods ) {\n\t\t$methods[] = 'WC_Product_Vendors_Per_Product_Shipping_Method';\n\n\t\treturn $methods;\n\t}", "title": "" }, { "docid": "a7898b1380bcbd83f6f0dcff85adf241", "score": "0.6231415", "text": "protected function _getAvailableUpsMethods(){\n\t\treturn $this->_getAvailableMethods(Mage::getSingleton('usa/shipping_carrier_ups')->getCode('method'), $this->_availUpsMethods, self::LABEL_PREFIX_UPS);\n\t}", "title": "" }, { "docid": "c2b1cd73f73a798efe13b66d599b0e77", "score": "0.62012994", "text": "function hide_all_shipping_when_free_is_available( $available_methods ) {\n\tif( isset( $available_methods['free_shipping'] ) ) {\n\n\t\t// Get Free Shipping array into a new array\n\t\t$freeshipping = array();\n\t\t$freeshipping = $available_methods['free_shipping'];\n\n\t\t// Empty the $available_methods array\n\t\tunset( $available_methods );\n\n\t\t// Add Free Shipping back into $avaialble_methods\n\t\t$available_methods = array();\n\t\t$available_methods['free_shipping'] = $freeshipping;\n\t}\n\n\treturn $available_methods;\n}", "title": "" }, { "docid": "ce76ed3327b366372f752db22480072f", "score": "0.6198616", "text": "public function getShippingRates()\n {\n $quote = $this->getQuote();\n\n // Recollect totals\n $quote->setTotalsCollectedFlag(false)->collectTotals()->save();\n\n $shippingAddress = $quote->getShippingAddress();\n\n // Set the values on the quotes shipping address\n $shippingAddress->setCity((string) $this->getCity());\n $shippingAddress->setPostcode((string) $this->getPostcode());\n $shippingAddress->setCountryId((string) strtoupper($this->getCountryId()));\n\n // Recollect all totals for the quote\n $quote->setTotalsCollectedFlag(false);\n $quote->getBillingAddress();\n $quote->getShippingAddress()->setCollectShippingRates(true);\n $quote->collectTotals();\n $quote->save();\n\n // Pull out the shipping rates\n $shippingRates = $shippingAddress\n ->collectShippingRates()\n ->getGroupedAllShippingRates();\n\n $rates = [];\n $currentRate = false;\n\n /* @var $shippingRate Mage_Sales_Model_Quote_Address_Rate */\n foreach ($shippingRates as $carrier => $groupRates) {\n foreach ($groupRates as $shippingRate) {\n // Is this the current selected shipping method?\n if ($quote->getShippingAddress()->getShippingMethod() == $shippingRate->getCode()) {\n $currentRate = $this->convertShippingRate($shippingRate);\n } else {\n $rates[] = $this->convertShippingRate($shippingRate);\n }\n }\n }\n\n // Add the current shipping rate first\n if ($currentRate) {\n array_unshift($rates, $currentRate);\n }\n\n return $rates;\n }", "title": "" }, { "docid": "86a35135c7986a738239aa6d68313947", "score": "0.6193194", "text": "public function getPaymentMethods()\r\n\t{\r\n\t\t$postData = [];\r\n\t\tforeach (self::$g_customer_fields as $field) {\r\n\t\t\tif (isset($customerDetails[$field])) {\r\n\t\t\t\t$postData[$field] = $customerDetails[$field];\r\n\t\t\t}\r\n\t\t}\r\n\t\ttry {\r\n\t\t\t$url = $this->findUrl('tools', \"/get-payment-methods\");\r\n\t\t\t$request = new Request('GET', $url);\r\n\t\t\t$response = $this->client->send($request, [\r\n\t\t\t\t'timeout' => self::$g_timeout,\r\n\t\t\t\t'connect_timeout' => self::$g_connect_timeout,\r\n\t\t\t\t'form_params' => $postData,\r\n\t\t\t\t\t'verify' => self::$g_verify\r\n\t\t\t]);\r\n\t\t\t$this->checkResult($response);\r\n\t\t\t$result = json_decode($response->getBody(), true);\r\n\r\n\t\t\tif (count($result) > 0) {\r\n\t\t\t\treturn $result;\r\n\t\t\t}\r\n\t\t} catch (\\Exception $any) {\r\n\t\t\tthrow $this->wrapException($any);\r\n\t\t}\r\n\t\tthrow $this->wrapException(new ClientException(\"There are no payment methods available.\"));\r\n\r\n\t}", "title": "" }, { "docid": "fe7944236ce9560bfeae2681792b1101", "score": "0.61570543", "text": "public function loadShippingMethodsAction()\n {\n /** @var Buckaroo_Buckaroo3Extended_Model_PaymentMethods_Applepay_Process $process */\n $process = Mage::getModel(' buckaroo3extended/paymentMethods_applepay_process');\n $postData = Mage::app()->getRequest()->getPost() ?: $process->sanitizeParams(${'_GET'});\n $wallet = array();\n if ($postData['wallet']) {\n $wallet = $postData['wallet'];\n }\n /** @var Mage_Checkout_Model_Session $session */\n $session = Mage::getModel('checkout/session');\n $quote = $session->getQuote();\n \n /** @var Mage_Sales_Model_Quote_Address $address */\n $address = $quote->getShippingAddress();\n $shippingAddress = $process->processAddressFromWallet($wallet, 'shipping');\n \n $address->addData($shippingAddress);\n $quote->setShippingAddress($address);\n $session->setEstimatedShippingAddressData($shippingAddress);\n /**\n * Apparently this affects the loading of the shipping methods and differs in existing or new sessions.\n * It's important the quote is saved after setting this parameter.\n */\n $address->setCollectShippingRates(true);\n \n $quote->getPayment()->importData(array('method' => 'buckaroo3extended_applepay'));\n $quote->setCurrency(Mage::app()->getStore()->getBaseCurrencyCode());\n $quote->save();\n \n /** @var Mage_Checkout_Model_Cart_Shipping_Api $cartShippingApiModel */\n $cartShippingApiModel = Mage::getModel('checkout/cart_shipping_api');\n $shippingMethods = $cartShippingApiModel->getShippingMethodsList($quote->getId());\n \n /**\n * If no shipping methods are found.\n */\n if (count($shippingMethods) == 0) {\n $session->addError($this->__('Apple Pay payment failed, because no shipping methods were found for the selected address. Please select a different shipping address within the pop-up or within your Apple Pay Wallet.'));\n throw new Exception();\n }\n \n foreach ($shippingMethods as $index => $shippingMethod) {\n $shippingMethods[$index]['price'] = round($shippingMethod['price'], 2);\n $shippingMethods[$index]['method_description'] = $shippingMethod['method_description'] ?: '';\n \n if ($shippingMethod['code'] == $address->getShippingMethod() && $index != 0) {\n $selectedIndex = $index;\n $selectedShipping = $shippingMethods[$index];\n }\n }\n \n if (isset($selectedIndex) && $selectedIndex > 0) {\n unset($shippingMethods[$selectedIndex]);\n array_unshift($shippingMethods, $selectedShipping);\n }\n \n $this->setShippingMethodAction($shippingMethods[0]['code']);\n \n /**\n * Reload quote, because we've modified it in setShippingMethodAction().\n *\n * @var Mage_Checkout_Model_Session $quote\n */\n $quote = Mage::getModel('checkout/session')->getQuote();\n $totals = $process->gatherTotals($quote->getShippingAddress(), $quote->getTotals());\n $methodsAndTotals = $shippingMethods + $totals;\n \n /** @var Mage_Core_Helper_Data $coreHelper $coreHelper */\n $coreHelper = Mage::helper('core');\n $this->getResponse()->clearHeaders()->setHeader('Content-type', 'application/json', true);\n $this->getResponse()->setBody($coreHelper->jsonEncode($methodsAndTotals));\n }", "title": "" }, { "docid": "d322a01ef93014fc5ba9fa3ea8ac05d6", "score": "0.6151397", "text": "public function getShippingMethodAction()\n\t{\n\t\t$id = $this->request->getQuery('id');\n\n\t\tif ($id === null) {\n\t\t $this->return400(['success' => false]);\n\n return;\n\t\t}\n\n\t\t$shippingMethod = $this->getBaseController()->getShippingMethod($id);\n\n\t\tif ($shippingMethod === null) {\n\t\t $this->Response()->setStatusCode(404);\n $this->View()->assign('response', ['success' => false]);\n\n return;\n\t\t}\n\n\t\t$this->View()->assign(['response' => $shippingMethod->toArray()]);\n\t}", "title": "" }, { "docid": "c45da3b7fef276138d4404956d41e100", "score": "0.61455214", "text": "function add_awd_shipping( $methods ) {\r\n\t$methods[] = 'awd_shipping'; return $methods;\r\n}", "title": "" }, { "docid": "4a27ff6f6d15fdbc719c6f451b7a6e00", "score": "0.6139915", "text": "public function getAllMethods()\n {\n $allMethods = json_decode($this->getConfigData('all_methods'));\n\n if(!count($allMethods) || empty($allMethods)){\n return $this->refreshMethods();\n }\n\n return $allMethods;\n }", "title": "" }, { "docid": "94f93f354a4ad51de43174cdb965c18e", "score": "0.6135432", "text": "public function getShippingMethod($_order)\n {\n return $_order->getShippingMethod();\n }", "title": "" }, { "docid": "04c54e7c7a673e68990d1168713a6a8f", "score": "0.613328", "text": "function _getServicesByCountry(){\n\n return $this->getShippingServices();\n }", "title": "" }, { "docid": "bd80a6832bb9d35d98aa7a6a977d11d5", "score": "0.61326516", "text": "public static function getPaymentMethods()\n\t{\n\t\t$payment_methods = PaymentMethod::active()->get();\n\n\t\treturn $payment_methods;\n\t}", "title": "" }, { "docid": "4d9cab798f30736d28cccf5e5cc6e965", "score": "0.6131134", "text": "public function setShippingMethod($shippingMethod);", "title": "" }, { "docid": "4478e3d48715fc662f050f051f501bc0", "score": "0.61277616", "text": "public function paymentMethods() {\n $methods = array();\n if (empty($this->call_class)) {\n return $methods;\n }\n // Try to get methods.\n try {\n $response = $this->call_class->getMethods();\n }\n catch (ExpayException $e) {\n watchdog('commerce_expay', $e->getMessage(), NULL, WATCHDOG_ERROR);\n return $methods;\n }\n // If problem - return empty methods list\n // and log error.\n if (empty($response)) {\n $this->logError();\n return $methods;\n }\n // Payment methods request was correct.\n // Check payment methods list.\n if (!empty($response['methods'])) {\n foreach ($response['methods'] as $method) {\n // Type always must be filled.\n if (empty($method['type'])) {\n continue;\n }\n $methods[$method['id']] = $method;\n }\n }\n // Debug record.\n if ($this->debug) {\n watchdog('commerce_expay', 'Expay pymentMethods response: <br /> <pre>@methods</pre>', array('@methods' => print_r($methods, TRUE)), WATCHDOG_NOTICE);\n }\n // Setting class property.\n $this->methods = $methods;\n\n return $methods;\n }", "title": "" }, { "docid": "4a194fb23e680443a6a1abb85a11056e", "score": "0.6122352", "text": "public function index()\n {\n return $this->shippingService->index();\n }", "title": "" }, { "docid": "990165ecf96f822a56362660cfbfa297", "score": "0.6117734", "text": "public static function palpodelivery_get_shipping_based_settings() {\n\t\t$gmt = false;\n if( has_filter( 'palpodelivery_gmt_calculations' ) ) {\n $gmt = apply_filters( 'palpodelivery_gmt_calculations', '' );\n }\n $current_time = current_time( 'timestamp', $gmt );\n\n\t $hidden_vars_str = '';\n\t if( get_option( 'palpodelivery_enable_shipping_based_delivery' ) == 'on' ) {\n\t\t $i = 0;\n\t\t $shipping_method_js_str = array();\n\t\t $product_categories_js_str = array();\n\t\t $shipping_settings = array();\n\t\t $results = palpodelivery_common::palpodelivery_get_shipping_settings();\n\t $shipping_methods_exists = \"no\";\n\t $j = 1 ;\n\n\t foreach ( $results as $key => $value ) {\n\t $shipping_settings = get_option( $value->option_name );\n\n\t if( isset( $shipping_settings[ 'delivery_settings_based_on' ][ 0 ] ) && $shipping_settings[ 'delivery_settings_based_on' ][ 0 ] == 'shipping_methods' ) {\n \t\tif( isset( $shipping_settings[ 'shipping_methods' ] ) ) {\n \t\t\t$shipping_methods_exists = \"yes\";\n \t\t}\n \t}\n\n\t $shipping_method_str = palpodelivery_common::palpodelivery_get_shipping_method_str( $shipping_settings );\n\t $shipping_methods_for_categories = palpodelivery_common::palpodelivery_get_shipping_methods_for_categories( $shipping_settings );\n\t $enable_delivery_date = palpodelivery_common::palpodelivery_get_shipping_enable_delivery_date( $shipping_settings );\n\t $delivery_checkout_option = palpodelivery_common::palpodelivery_get_shipping_delivery_checkout_option( $shipping_settings );\n\t $date_field_mandatory = palpodelivery_common::palpodelivery_get_shipping_date_field_mandatory( $shipping_settings );\n\t $time_slots_enable = palpodelivery_common::palpodelivery_is_shipping_timeslot_enable( $shipping_settings );\n\t $timeslot_field_mandatory = palpodelivery_common::palpodelivery_get_shipping_time_field_mandatory( $shipping_settings );\n\t $new_array = palpodelivery_common::palpodelivery_get_shipping_hidden_variables( $shipping_settings , $timeslot_field_mandatory );\n\t $var_time = palpodelivery_common::palpodelivery_get_shipping_time_settings_variable( $shipping_settings, $new_array[ 'palpodelivery_delivery_date_holidays' ], $new_array[ 'palpodelivery_lockout_days' ] );\n\t \t\t$palpodelivery_min_between_days = palpodelivery_common::palpodelivery_get_shipping_palpodelivery_min_between_days( $shipping_settings );\n $palpodelivery_max_between_days = palpodelivery_common::palpodelivery_get_shipping_palpodelivery_max_between_days( $shipping_settings );\n $palpodelivery_minimum_delivery_time = palpodelivery_common::palpodelivery_get_shipping_minimum_delivery_time( $shipping_settings );\n $palpodelivery_date_field_label = palpodelivery_common::palpodelivery_get_shipping_date_field_label( $shipping_settings );\n $palpodelivery_time_field_label = palpodelivery_common::palpodelivery_get_shipping_time_field_label( $shipping_settings );\n\n\t if( isset( $shipping_settings[ 'delivery_settings_based_on' ][ 0 ] ) && $shipping_settings[ 'delivery_settings_based_on' ][ 0 ] == 'shipping_methods' ) {\n \t\t\t$shipping_method_js_str[ $i ][ 'unique_settings_key' ] = 'custom_settings_' . $j;\n $shipping_method_js_str[ $i ][ 'shipping_methods' ] = $shipping_method_str;\n\t } else if( isset( $shipping_settings[ 'delivery_settings_based_on' ][ 0 ] ) && $shipping_settings[ 'delivery_settings_based_on' ][ 0 ] == 'product_categories' ) {\n \t\t\t$shipping_method_js_str[ $i ][ 'unique_settings_key' ] = 'custom_settings_' . $j;\n\t $shipping_method_js_str[ $i ][ 'product_categories' ] = $shipping_method_str;\n\t $shipping_method_js_str[ $i ][ 'shipping_methods_for_categories' ] = $shipping_methods_for_categories;\n\t }\n\n $shipping_method_js_str[ $i ][ 'enable_delivery_date' ] = $enable_delivery_date;\n $shipping_method_js_str[ $i ][ 'date_field_mandatory' ] = $date_field_mandatory;\n $shipping_method_js_str[ $i ][ 'time_slots' ] = $time_slots_enable;\n $shipping_method_js_str[ $i ][ 'timeslot_field_mandatory' ] = $timeslot_field_mandatory;\n $shipping_method_js_str[ $i ][ 'hidden_vars' ] = json_encode( $new_array );\n $shipping_method_js_str[ $i ][ \"time_settings\" ] = $var_time;\n $shipping_method_js_str[ $i ][ 'palpodelivery_delivery_checkout_options' ] = $delivery_checkout_option;\n $shipping_method_js_str[ $i ][ 'palpodelivery_min_between_days' ] = $palpodelivery_min_between_days;\n $shipping_method_js_str[ $i ][ 'palpodelivery_max_between_days' ] = $palpodelivery_max_between_days;\n $shipping_method_js_str[ $i ][ 'palpodelivery_minimum_delivery_time' ] = $palpodelivery_minimum_delivery_time;\n $shipping_method_js_str[ $i ][ 'palpodelivery_date_field_label' ] = __( $palpodelivery_date_field_label, 'order-delivery-date' );\n $shipping_method_js_str[ $i ][ 'palpodelivery_time_field_label' ] = __( $palpodelivery_time_field_label, 'order-delivery-date' );\n if( has_filter( 'palpodelivery_custom_delivery_settings' ) ) {\n\t \t\t$shipping_method_js_str[ $i ] = apply_filters( 'palpodelivery_custom_delivery_settings', $shipping_settings, $shipping_method_js_str[ $i ], $j );\n\t \t}\n\t $i++;\n\t $j++;\n\t }\n\n\t\t\t$hidden_vars_str = json_encode( $shipping_method_js_str );\n\t }\n\t return $hidden_vars_str;\n\t}", "title": "" }, { "docid": "eee20875a62dc82b85a4693104c7a3b0", "score": "0.61057943", "text": "public function getLocalMarketShippingMethodEnabled()\n {\n return $this->localMarketShippingMethodEnabled;\n }", "title": "" }, { "docid": "ec08c471e269c3b62229bc7be55870ff", "score": "0.60939336", "text": "public function omnivalt_get_shipping_classes()\n {\n $result = [];\n $shipping_classes = $this->get_all_shipping_classes();\n \n foreach ( $shipping_classes as $item ) {\n $this->create_categories_list('', $item, $result);\n }\n\n return $result;\n }", "title": "" }, { "docid": "9a26b1c429c39f24876c0a4902f6c79e", "score": "0.60852027", "text": "public function getPaymentMethods()\n\t{\n\t\t$oCustomerGroup\t= Customer_Group::getForId($this->CustomerGroup);\n\t\treturn $oCustomerGroup->getPaymentMethods();\n\t}", "title": "" }, { "docid": "f46619a8d25c13f3339f004ce995a788", "score": "0.6078113", "text": "public function getMethods()\n {\n return $this->methods();\n }", "title": "" }, { "docid": "5dba675a101d21697c65e847af8042f0", "score": "0.6075883", "text": "public function getMethods()\n {\n return $this->methods;\n }", "title": "" }, { "docid": "5dba675a101d21697c65e847af8042f0", "score": "0.6075883", "text": "public function getMethods()\n {\n return $this->methods;\n }", "title": "" }, { "docid": "5dba675a101d21697c65e847af8042f0", "score": "0.6075883", "text": "public function getMethods()\n {\n return $this->methods;\n }", "title": "" }, { "docid": "5dba675a101d21697c65e847af8042f0", "score": "0.6075883", "text": "public function getMethods()\n {\n return $this->methods;\n }", "title": "" }, { "docid": "2ac4d464a3bc710486aab1fd509011fc", "score": "0.60730654", "text": "public function getShippingCosts()\n {\n return $this->shippingCosts;\n }", "title": "" }, { "docid": "04a97ee5ebd5478605f1ca8e94ff99a4", "score": "0.6063501", "text": "public static function get_supported_methods() {\n $methodConfig = Config::inst()->get('FF_PaymentProcessor', 'supported_methods');\n $environment = FF_PaymentGateway::get_environment();\n \n // Check if all methods are defined in factory\n foreach ($methodConfig[$environment] as $method) {\n if (! FF_PaymentFactory::get_factory_config($method)) {\n user_error(\"Method $method not defined in factory\", E_USER_ERROR);\n }\n }\n \n return $methodConfig[$environment];\n }", "title": "" }, { "docid": "c6b5680579e9c7884698f41f9fde88e4", "score": "0.6061791", "text": "public function getMethods()\n {\n return $this->_methods;\n }", "title": "" }, { "docid": "3dec43f5e043e7344a4542de0bf85d6d", "score": "0.60375935", "text": "function get_list_shipping() {\n $this->db->where('published', 1);\n $this->db->order_by('ordering', 'asc');\n return $this->db->get('shop_shipping')->result();\n }", "title": "" }, { "docid": "e5bd57cd7c4f87fe8404a22b48948a0d", "score": "0.5994827", "text": "function hide_standard_shipping_when_free_is_available( $available_methods ) {\n\tif( isset( $available_methods['free_shipping'] ) AND isset( $available_methods['flat_rate'] ) ) {\n\t\t// remove standard shipping option\n\t\tunset( $available_methods['flat_rate'] );\n\t}\n\treturn $available_methods;\n}", "title": "" }, { "docid": "38596d8b1ed41954a5dec19e2b8da5bc", "score": "0.5993878", "text": "public static function get_shipping_method_labels() {\n\t\t$shipping_method_labels = Iconic_WDS_Core_Settings::get_setting_from_db( 'general_setup', 'shipping_method_labels' );\n\n\t\tif ( empty( $shipping_method_labels ) ) {\n\t\t\t$shipping_method_labels = array();\n\t\t}\n\n\t\treturn apply_filters( 'iconic_wds_shipping_method_labels', $shipping_method_labels );\n\t}", "title": "" }, { "docid": "8e76011c9b5a6e94f424df23ec050f7b", "score": "0.5982461", "text": "public function allMethods() {\n return $this->finderMethods(NULL);\n }", "title": "" }, { "docid": "c4c4a03a32964434774c18840d57339b", "score": "0.59817463", "text": "public function getMethods(): array\n {\n return $this->_methods;\n }", "title": "" }, { "docid": "0d1431b3e679d313d74c3c818580a56d", "score": "0.5972571", "text": "public function methods()\n {\n return $this->methods;\n }", "title": "" }, { "docid": "89bbc54ff518a78de7fae48d715fa33f", "score": "0.5964316", "text": "public static function getPaymentMethods() {\n return array(\n self::PAYMENT_METHOD_PAY_PAL => 'Pay Pal',\n );\n }", "title": "" }, { "docid": "be57c3debc80c25a678119b5efba472d", "score": "0.59568775", "text": "public function orderShipping()\n {\n return $this->hasMany('App\\Models\\OrderShipping', 'delivery_cutoff_id');\n }", "title": "" }, { "docid": "b9018078c85fd5be27b738919ca57071", "score": "0.5944533", "text": "public function getShippingOptions()\n {\n\n $recyclablePackAllowed = (bool)Configuration::get('PS_RECYCLABLE_PACK');\n $giftAllowed = (bool)Configuration::get('PS_GIFT_WRAPPING');\n\n $includeTaxes = (!Product::getTaxCalculationMethod((int)$this->context->cart->id_customer)\n && (int)Configuration::get('PS_TAX'));\n\n $displayTaxLabels = (Configuration::get('PS_TAX') && !Configuration::get('AEUC_LABEL_TAX_INC_EXC'));\n $giftCost = $this->context->cart->getGiftWrappingPrice($includeTaxes);\n\n $this->context->cart->save();\n $this->context->cart->setNoMultishipping();\n $this->updateAddressIdInDeliveryOptions();\n\n return\n array(\n 'hookDisplayBeforeCarrier' => Hook::exec('displayBeforeCarrier',\n array('cart' => $this->getCheckoutSession()->getCart())),\n 'hookDisplayAfterCarrier' => Hook::exec('displayAfterCarrier',\n array('cart' => $this->getCheckoutSession()->getCart())),\n 'id_address' => $this->getCheckoutSession()->getIdAddressDelivery(),\n 'delivery_options' => $this->getCheckoutSession()->getDeliveryOptions(),\n 'delivery_option' => $this->getCheckoutSession()->getSelectedDeliveryOption(),\n 'recyclable' => $this->getCheckoutSession()->isRecyclable(),\n 'recyclablePackAllowed' => $recyclablePackAllowed,\n 'delivery_message' => (version_compare(_PS_VERSION_,\n '1.7.3') >= 0) ? $this->getCheckoutSession()->getMessage() : '',\n 'gift' => array(\n 'allowed' => $giftAllowed,\n 'isGift' => $this->getCheckoutSession()->getGift()['isGift'],\n 'label' => $this->getTranslator()->trans(\n 'I would like my order to be gift wrapped %cost%',\n array('%cost%' => $this->getGiftCostForLabel($giftCost, $includeTaxes, $displayTaxLabels)),\n 'Shop.Theme.Checkout'\n ),\n 'message' => $this->getCheckoutSession()->getGift()['message'],\n ),\n );\n }", "title": "" }, { "docid": "8e02351769744886b0b51212655623eb", "score": "0.5937815", "text": "public function getMethods(){\n\t\t$parent_methods = parent::getMethods();\n\t\t$method_constrains = json_decode(Mage::getStoreConfig('payment/dynamicpm/dynamicpmmap'),true);\n\t\t\n\t\t$return_methods = array();\n\t\t\n\t\tforeach($parent_methods as $method){\n\t\t\tif(self::validMethod($method,$method_constrains))\n\t\t\t\t$return_methods[] = $method;\n\t\t}\n\t\t\n\t\treturn $return_methods;\n\t}", "title": "" }, { "docid": "c8ed38cf0d48bce8aeac864a620ca7a6", "score": "0.59094644", "text": "function methods() {\n\t\treturn $this->__methods;\n\t}", "title": "" }, { "docid": "af0e5e0ae852665fb0becf74efdf61c2", "score": "0.5903147", "text": "public function shipmentDataProvider()\n {\n return array(\n array('flatrate', null, 'usa'),\n array('free', null, 'usa'),\n array('ups', 'usa', 'usa'),\n array('upsxml', 'usa', 'usa'),\n array('usps', 'usa', 'usa'),\n array('fedex', 'usa', 'usa'),\n array('dhl', 'usa', 'france'),\n );\n }", "title": "" }, { "docid": "9354cdb32b0457ed72697f4dfbf405a8", "score": "0.5900741", "text": "protected function _getOrderShippingData()\n {\n return $this->_order->getIsVirtual()\n ? $this->_getVirtualOrderShippingData()\n : $this->_getPhysicalVirtualShippingData();\n }", "title": "" }, { "docid": "f9c4fd72830e649ec9e999ec893c43c8", "score": "0.5884612", "text": "public function gateways(){\n\t\t\treturn Opalmembership_Payment_gateways::getInstance();\n\t\t}", "title": "" }, { "docid": "2611cbedc1e7900ce0b898f720147397", "score": "0.58827096", "text": "public function getEnableShipping()\n {\n return $this->enableShipping;\n }", "title": "" }, { "docid": "e95fae82b296b716bd2a1a89b759bda7", "score": "0.5880568", "text": "public function getAllMethods()\n {\n $methods = [];\n\n foreach ($this->paymentHelper->getPaymentMethods() as $code => $data) {\n if (isset($data['group']) && 'tokenbase' == $data['group']) {\n $methods[] = $code;\n }\n }\n\n return $methods;\n }", "title": "" }, { "docid": "f4c2552244064f153eae638f2b156e86", "score": "0.5871634", "text": "public function getClassifiedAdShippingMethodEnabled()\n {\n return $this->classifiedAdShippingMethodEnabled;\n }", "title": "" }, { "docid": "83c80196c77c8c07401d14c041df899c", "score": "0.5871011", "text": "public function getAvailableMethods()\n {\n return [\n 'get'\n ];\n }", "title": "" }, { "docid": "e115d9b88eb7d301eb1c024464379fd1", "score": "0.5862804", "text": "public function add_method( $methods ) {\n\t\t\tif ( version_compare( WC_VERSION, '2.6.0', '<' ) ) {\n\t\t\t\t$methods[] = 'WC_Shipping_USPS';\n\t\t\t} else {\n\t\t\t\t$methods['usps'] = 'WC_Shipping_USPS';\n\t\t\t}\n\n\t\t\treturn $methods;\n\t\t}", "title": "" }, { "docid": "046e73e4c984c5a347aa36487fd664c8", "score": "0.58604485", "text": "public function getQuoteShippingAddressesItems()\n {\n if ($this->_quoteShippingAddressesItems !== null) {\n return $this->_quoteShippingAddressesItems;\n }\n $this->_quoteShippingAddressesItems = $this->getQuote()->getShippingAddressesItems();\n return $this->_quoteShippingAddressesItems;\n }", "title": "" } ]
1ff9f3840cf80345285e0b514095e976
========================================================================= Output "skipped" message.
[ { "docid": "b0e5218b54507793b57671e80880b7b4", "score": "0.70630187", "text": "protected function skipped(string $reason = null): void {\n if ($this->command !== null) {\n $this->command->getOutput()\n ->writeln('<comment> skipped</comment>'.($reason ? \" ({$reason})\" : ''));\n }\n }", "title": "" } ]
[ { "docid": "020c713ab7c936c011ec6dd904e11588", "score": "0.80646867", "text": "public function skipped();", "title": "" }, { "docid": "a6f0bbab61cd32e94589e8d8dc0e9f84", "score": "0.73275304", "text": "public function skip();", "title": "" }, { "docid": "0bb1f7bf425fc1a748c12fc155104d77", "score": "0.72678065", "text": "public function skip()\n {\n $this->stopPropagation();\n\n $this->skipped = true;\n }", "title": "" }, { "docid": "9ac63211d76771691353d02fc816a49c", "score": "0.7109773", "text": "function paintSkip($message) {\n\t\tparent::paintSkip($message);\n\t\t$this->buffer .= 'SKIP' . $this->separator . $message . \"\\n\\n\";\n\t\tfwrite(STDOUT, 's');\n\t}", "title": "" }, { "docid": "91b6daf313d69ad62e7889933433aba0", "score": "0.69821525", "text": "public function stepSkip() {\n file_put_contents($this->file.\".progress\", ++$this->position);\n return true;\n }", "title": "" }, { "docid": "10af4b136520a405001029967c094f67", "score": "0.6946405", "text": "public function isSkipped()\n {\n return $this->skipped;\n }", "title": "" }, { "docid": "10af4b136520a405001029967c094f67", "score": "0.6946405", "text": "public function isSkipped()\n {\n return $this->skipped;\n }", "title": "" }, { "docid": "e145db84b8ef1f99000b6e9be6b7e16b", "score": "0.6906645", "text": "protected function state_check_skipped($message)\n {\n if (!isset($this->results[$this->current_section_label])) {\n $this->results[$this->current_section_label] = array();\n }\n $this->results[$this->current_section_label][] = array(HEALTH_CHECK__SKIP, $message);\n }", "title": "" }, { "docid": "334f21b88830f6956cb7f94a5e005093", "score": "0.6864286", "text": "public function skipped (): int\n {\n return $this->skipped;\n }", "title": "" }, { "docid": "28ee803c3dc8885969bc262ff27f0e03", "score": "0.6838974", "text": "function my_skip_message($message)\n\t{\n\t\t$this->reporter->paintSkip($message . $this->getAssertionLine());\n\t}", "title": "" }, { "docid": "621f7f0522b821f6b6b5f3751afed7cb", "score": "0.6812085", "text": "function skip(string $message): void\n{\n Assert::markTestSkipped($message);\n}", "title": "" }, { "docid": "633b4ff079f14ee29890da4758e76c39", "score": "0.6752832", "text": "protected function skip()\n\t\t{\n\t\t\tif ($this->space()) {\n\t\t\t\t$this->switchState(self::STATE_SKIP_SPACE);\n\t\t\t}\n\n\t\t\tif ($this->sharp() || $this->newLine()) {\n\t\t\t\t$this->switchState(self::STATE_SKIP_LINE);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "6686a362b047472c0e9c9b9111124c21", "score": "0.670157", "text": "public function skip() {\n\t\t$this->state->token = TokenConst::$SKIP_TOKEN;\n\t}", "title": "" }, { "docid": "e11b2a2fd22201b7ac859c423cb49b39", "score": "0.65673727", "text": "public function set_skip()\n\t{\n\t\t$this->__skip = true;\n\t}", "title": "" }, { "docid": "67015f403762cba5906e66b6228a63ac", "score": "0.65594274", "text": "public function exampleSkipped(Example $example)\n {\n $this->skipped[] = $example;\n $event = new ExampleSkipEvent($example);\n $this->dispatcher->dispatch(Events::EXAMPLE_SKIP, $event);\n }", "title": "" }, { "docid": "7086511f0809439a1099c7c74f9cef1d", "score": "0.6529932", "text": "public function testSkipped(HealthCheckEvent $healthCheckEvent)\n {\n $this->consoleOutput->write('<comment>S</comment>');\n }", "title": "" }, { "docid": "826bb35fd41247ea4f1c71b884f1f6f0", "score": "0.64394623", "text": "public function skip($message, $file, $line);", "title": "" }, { "docid": "6923ac3e645bdf6d51f7327451bdc78f", "score": "0.63267154", "text": "protected function skip(){\n do {\n readBlock();\n } while ($blockSize > 0);\n }", "title": "" }, { "docid": "2f4e82ce0dc3392fe230756101b11840", "score": "0.6195054", "text": "public function skip($report = null)\n {\n $this->_write('S', 'cyan');\n }", "title": "" }, { "docid": "bfd2fdc20fb5d99bc691176b7e495ee5", "score": "0.6185148", "text": "public function markAsSkipped() {\n $this->status = self::STATUS_SKIPPED;\n\n return $this->save(false);\n }", "title": "" }, { "docid": "98422872d246e71644c4caf926dcf12c", "score": "0.6157605", "text": "protected function skip($reason, $exitCode = 0)\n {\n $this->io->write(\"<comment>Skipping the current action:</comment> $reason\");\n false === $exitCode || exit($exitCode);\n }", "title": "" }, { "docid": "12d36f542578419ebb84fe97baee2b86", "score": "0.6122323", "text": "public function getSkipped(): array\n {\n return $this->skipped;\n }", "title": "" }, { "docid": "9231363699b30c97c4c98d6155e70c9b", "score": "0.61168873", "text": "public function getSkippedResults()\n {\n return $this->skipped_results;\n }", "title": "" }, { "docid": "c2426154ce57d958f8034c443a5977cb", "score": "0.6054574", "text": "public function skippedTest($className, $methodName);", "title": "" }, { "docid": "ebabd9f359cb1761b889f45bafbb4bbf", "score": "0.6030558", "text": "protected function updateSkippedMessage() {\n\t\treturn 'Vote has already been migrated to use the actor columns.';\n\t}", "title": "" }, { "docid": "4e2ff13656df41f7fbd7ba87f924e853", "score": "0.5955096", "text": "public function testVerifyProcessingSkipped()\n {\n // register an event dispatcher\n $dispatcher = new EventDispatcher();\n\n $this->processor->setDispatcher($dispatcher);\n\n // require that processing be skipped\n $dispatcher->addListener(\n Events::PRE_PROCESSING,\n function (PreProcessingEvent $event) {\n $event->skip();\n }\n );\n\n // verify that the skip event is dispatched\n $skipped = false;\n\n $dispatcher->addListener(\n Events::SKIPPED_PROCESSING,\n function (SkippedProcessingEvent $event) use (&$skipped) {\n $skipped = true;\n }\n );\n\n // make sure the processing method is never called\n $this\n ->processor\n ->expects(self::never())\n ->method('doProcessing')\n ;\n\n // make sure the contents were are returned unchanged\n self::assertEquals(\n '<?php echo \"Hello, world!\\n\";',\n $this->processor->process(\n 'test.php',\n '<?php echo \"Hello, world!\\n\";'\n )\n );\n\n // make sure the skip event was dispatched\n self::assertTrue($skipped);\n }", "title": "" }, { "docid": "5719bb9a6ec254178701b2b7aa6e2daf", "score": "0.58211404", "text": "public static function getSkippedVersion() : string\n {\n return (string) self::$skipped;\n }", "title": "" }, { "docid": "d89b02efde645b7567de59904af6e8cd", "score": "0.5790699", "text": "public static function skip_enabled() {\n self::$skipenabled = true;\n }", "title": "" }, { "docid": "8819d1ebf62f82f4be26b38f6bfbfaac", "score": "0.57848644", "text": "public function getSkipRun() {\n\t\t\treturn $this->blnSkipRun;\n\t\t}", "title": "" }, { "docid": "ff270f3044e391e3efe15d01d6d89efd", "score": "0.5780697", "text": "public function renderSkipNavigation()\n\t{\n\t\treturn '<div class=\"wd-Skip\"><a accesskey=\"2\" href=\"#skip-content\">Skip Navigation</a></div>';\n\t}", "title": "" }, { "docid": "999817d4f299769517f4f370a2b89c21", "score": "0.57791483", "text": "protected function failsafeSkip(): bool {\n\t\t$this->advance();\n\t\treturn true;\n\t}", "title": "" }, { "docid": "9f7f1717157f7286457b7392a494967a", "score": "0.5717858", "text": "public function testSkipMethod()\n {\n $this->assertEquals($this->getExpected(10), $this->getActual(10));\n }", "title": "" }, { "docid": "26cbef36a5d6c1fa5ef2baf5670731e9", "score": "0.566876", "text": "public static function header_skip() {\n\t\t?>\n\t\t<p>\n\t\t\t<?php echo wp_kses( __( 'The following options define cases in which a view will <strong>not</strong> be tracked.', 'statify' ), array( 'strong' => array() ) ); ?>\n\t\t</p>\n\t\t<?php\n\t}", "title": "" }, { "docid": "ed6578bd36138440b1fb6f9bceb224e7", "score": "0.566342", "text": "public function getSkippedRows()\n {\n return $this->skippedRows;\n }", "title": "" }, { "docid": "fed21d56bd877b392bf8c9d4328d7c21", "score": "0.5627385", "text": "protected function sendSkip($status = \"Skipped!\")\n {\n if (!$this->sent) {\n $this->setStatusCode(204)\n ->setHeader(\"X-Bot-Status\", $status);\n echo \"\";\n $this->sent = true;\n }\n\n return true;\n }", "title": "" }, { "docid": "1d99f8c9da4d56c9ae7a43b8503275ef", "score": "0.561259", "text": "public function skipNextTransaction()\n\t{\n\t\t$this->currentTxHashIndex++;\n\t}", "title": "" }, { "docid": "d1296f186860a1d9a20bab19f11bf2b8", "score": "0.5608981", "text": "public function setSkippedResults($var)\n {\n GPBUtil::checkInt32($var);\n $this->skipped_results = $var;\n\n return $this;\n }", "title": "" }, { "docid": "4fc454b89efd89d9a32a7cbfbc41d541", "score": "0.55354273", "text": "public function skipNextRead()\n {\n $this->skipNextRead = true;\n }", "title": "" }, { "docid": "416ec9228a8ceccb4fefc4dbe5f08cbf", "score": "0.5507574", "text": "public function skip($n);", "title": "" }, { "docid": "97bc10d14d89a1790abd452dee979ba1", "score": "0.5501131", "text": "protected function printIntroMessage()\n {\n $this->info(\"Testing <comment>\".$this->getTestedClassName().\"</comment>\\n\");\n }", "title": "" }, { "docid": "7d68c2229f042465e09e5967530f727d", "score": "0.54837644", "text": "protected function skip(string $sequence)\n {\n $this->next(strlen($sequence));\n }", "title": "" }, { "docid": "4212e075349f9c90450693a805d5b5b6", "score": "0.54393905", "text": "public function skipRow($skip = true)\n {\n\n // raise the counter for the skipped rows\n if ($skip === true) {\n $this->skippedRows++;\n }\n\n // set the the flag to signal the row has been skipped\n $this->skipRow = $skip;\n }", "title": "" }, { "docid": "97dd395cfba6b71919c8abb9aa516ba3", "score": "0.53745806", "text": "public function skip($bits) {\n $this->read($bits);\n }", "title": "" }, { "docid": "c4aa7c4ef8fbcf0ae396da4ca0d4be9b", "score": "0.53420085", "text": "public function setSkipRun($blnSkipRun) {\n\t\t\t$this->blnSkipRun = $blnSkipRun;\n\t\t}", "title": "" }, { "docid": "38ebb300904f5a086c3d5fb17fb50e3e", "score": "0.53336257", "text": "private function skipWhitespace() {\n $finished = false;\n while (!$finished) {\n if ($this->isEof()) {\n $finished = true;\n } elseif (self::isWhitespace($this->peek())) {\n $this->advance();\n } else {\n $finished = true;\n }\n }\n }", "title": "" }, { "docid": "840fd9cf5d903c7278ccafabe9197d1d", "score": "0.5315815", "text": "protected function step0()\n {\n echo '__STEP0__';\n }", "title": "" }, { "docid": "866375f41af06b17e31076bc3b2b661e", "score": "0.5312584", "text": "function checkSkippedQuestions($session_id) {\n\t\treturn true;\n }", "title": "" }, { "docid": "ae687118f9241bc0cdc58a9c629c1271", "score": "0.5294759", "text": "public function skip($theNumRows){\n \n if ($theNumRows >= $this->getCardinality()){\n $this->loggerM->warn(\"The skipped [ $theNumRows ] is greater then or equal the tables rows [ \" .\n $this->getCardinality() . \" ]\");\n }\n if ($theNumRows == 0){\n $this->loggerM->warn(\"The skipped num rows is 0\");\n }\n if ($theNumRows > 0 && $theNumRows < $this->getCardinality()){\n for ($i = 0; $i < $theNumRows; $i++){\n $this->next();\n }\n }\n }", "title": "" }, { "docid": "24933e84c3310ad5f56bfee6e211b002", "score": "0.52824074", "text": "public function skipped(string $name, callable $body)\n {\n $step = $this->steps->skipped($name, $body);\n\n $this->tryAddingToUnit($step);\n }", "title": "" }, { "docid": "26e3cfec916f297a86918f056f71986a", "score": "0.527153", "text": "public function skip(int $position): \\Ds\\Pair {}", "title": "" }, { "docid": "7db0d1779f3af13e0395491a98b08df4", "score": "0.5257381", "text": "public function rowHasToBeSkipped()\n {\n return $this->skipRow;\n }", "title": "" }, { "docid": "583fc40892bf8199e5efb7f6debde549", "score": "0.525319", "text": "function paintFail($message) {\n parent::paintFail($message);\n print $this->getFailCount() . \") $message\\n\";\n $breadcrumb = $this->getTestList();\n array_shift($breadcrumb);\n print \"\\tin \" . implode(\"\\n\\tin \", array_reverse($breadcrumb));\n print \"\\n\";\n }", "title": "" }, { "docid": "325ef7554b6fe362a38b70ab0102c8d2", "score": "0.52518964", "text": "public function testIgnored() {\n\t\treturn;\n\t\t$this->assertTrue($this->example->test());\n\t\t$this->assertEquals(TRUE,FALSE);\n\t}", "title": "" }, { "docid": "4865641043df4755bb8ad050fe2f95ed", "score": "0.521241", "text": "protected function dumpNotInspected()\n {\n return 'NOT INSPECTED';\n }", "title": "" }, { "docid": "3a36f2f5cd99158da55766c0e1dd2b66", "score": "0.51981235", "text": "public function testAddRowToSkip()\n {\n $this->model->addRowToSkip(7);\n $result = $this->model->isRowInvalid(7);\n $this->assertTrue($result);\n }", "title": "" }, { "docid": "ad952b0e28723339edbd6a55d47803e1", "score": "0.5196846", "text": "public static function skipHeader($bSkip = true) {\n\t\tself::setSkip('HEADER', $bSkip);\n\t}", "title": "" }, { "docid": "09c7ac92b578a99e9c687b97e120f3bf", "score": "0.5196016", "text": "public function isSkip($skip)\n {\n if ($this->commandData->getOption('skip')) {\n return in_array($skip, (array)$this->commandData->getOption('skip'));\n }\n\n return false;\n }", "title": "" }, { "docid": "3c5f62214d57e55b3ded9359c2a7fdfd", "score": "0.5194748", "text": "public function setStateSkippedChain() {\n $this->state = static::STATE_SKIPPED_CHAIN;\n }", "title": "" }, { "docid": "3c563e99033ccde929402a654e8d945b", "score": "0.517457", "text": "public function shouldMessageCaptureBeSkipped(string $message): bool\n {\n if (function_exists('fnmatch')) {\n foreach ($this->skipWildcard as $wildcard) {\n if (fnmatch($wildcard, $message)) {\n return true;\n }\n }\n }\n if (in_array($message, $this->skipCapture, true)) {\n return true;\n }\n\n if (in_array($message, $this->skipCommand, true)) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "74988d96edba0ea7afba8bd7d4543161", "score": "0.5171997", "text": "public function skip( $count ) {\r\n return $this->skipBase( $count, true );\r\n }", "title": "" }, { "docid": "6db558392190dec937e44c158543d9ad", "score": "0.5168968", "text": "public function onTestSkipped(HealthCheckEvent $healthCheckEvent)\n {\n $reporters = $healthCheckEvent->getHealthCheck()->getReporters();\n foreach ($reporters as $reporter) {\n $reporter->testSkipped($healthCheckEvent);\n }\n }", "title": "" }, { "docid": "43bff75d47c144958e5d71b0eb6110f2", "score": "0.51614803", "text": "function paintFooter($test_name) {\n if ($this->getFailCount() + $this->getExceptionCount() == 0) {\n print \"OK\\n\";\n } else {\n print \"FAILURES!!!\\n\";\n }\n print \"Test cases run: \" . $this->getTestCaseProgress() .\n \"/\" . $this->getTestCaseCount() .\n \", Passes: \" . $this->getPassCount() .\n \", Failures: \" . $this->getFailCount() .\n \", Exceptions: \" . $this->getExceptionCount() . \"\\n\";\n }", "title": "" }, { "docid": "21a6d30ed8bea3e20e6e85689d0609c0", "score": "0.51594365", "text": "protected function _testFailed($message){\n\t\techo '<li style=\"padding-left:'.($this->tabs+1).'em;color:tomato;\">'.$message.'</li>';\n\t}", "title": "" }, { "docid": "f267ebba85dad9807710859fcfbd434f", "score": "0.51531833", "text": "public function test_play_again($questions_to_be_excluded)\n\t{\n\n\t}", "title": "" }, { "docid": "f6e62d6addf552a546f02c4cbdcedee5", "score": "0.5139191", "text": "public static function skipAll($bSkip = true) {\n\t\tself::skipHeader($bSkip);\n\t\tself::skipFooter($bSkip);\n\t\tself::skipVisibleHeader($bSkip);\n\t\tself::skipVisibleFooter($bSkip);\n\t}", "title": "" }, { "docid": "ad9890c46d1f146c94a6e88adc770770", "score": "0.5121032", "text": "public function testExecuteWithIgnoredFile()\n {\n list($result, $output) = $this->runCommand([FormatCommand::COMMAND_NAME, 'ignored.txt']);\n\n // check result code\n $this->assertEquals(0, $result);\n\n // output must end as expected\n $this->assertContains(self::EXECUTE_OUTPUT_RESULT_FAIL, $output->fetch());\n }", "title": "" }, { "docid": "a2a7d88044b75eaf8443fec93de465e0", "score": "0.51154345", "text": "protected function _testPassed($message){\n\t\techo '<li style=\"padding-left:'.($this->tabs+1).'em;color:seagreen;\">'.$message.'</li>';\n\t}", "title": "" }, { "docid": "d228cb27d1545c4acd5fc86168b8418f", "score": "0.5097594", "text": "function csisjti_skip_link() {\n\techo '<a class=\"skip-link screen-reader-text\" href=\"#site-content\">' . __( 'Skip to the content', 'csisjti' ) . '</a>';\n}", "title": "" }, { "docid": "caa3a1f5e7517c89ff66ffb10e551d21", "score": "0.50866073", "text": "public function skip($reason, $prerequisites= []) {\n if ($prerequisites) {\n throw new PrerequisitesNotMetError($reason, null, $prerequisites);\n } else {\n throw new IgnoredBecause($reason);\n }\n }", "title": "" }, { "docid": "cb867419899a2edc4c2685b338a84246", "score": "0.5060875", "text": "public function testHandleMissingSkipOption(): void\n {\n Queue::fake();\n\n $this->artisan('comm-links:download-new-versions')\n ->assertExitCode(0);\n\n Queue::assertPushedWithChain(\n ReDownloadDbCommLinks::class,\n [\n ImportCommLinks::class,\n ]\n );\n }", "title": "" }, { "docid": "3995f922ba303b70bb506f9ee0c57646", "score": "0.50533813", "text": "public function skip($n)\n {\n $this->buffer = 0;\n $this->bufferSize = 0;\n $this->setPosition($this->position + $n);\n }", "title": "" }, { "docid": "c324caefd876f982c322af7960a5f803", "score": "0.50350636", "text": "public function skip_heading($fh)\n\t{\n\t}", "title": "" }, { "docid": "766dc5f28c6d0a694cba1b3d80f045ae", "score": "0.4995204", "text": "public function test_podcast_produces_no_warning(): void\n {\n $this->assertSame(\n 'Writing RSS to: out.xml',\n implode('\\n', self::$output)\n );\n $this->assertSame(0, self::$returncode);\n }", "title": "" }, { "docid": "2956c969b2df5a4eb78abe165b623521", "score": "0.49708766", "text": "private function hydrateSkip(Zept $zept, array $sections)\n {\n if (isset($sections['SKIPIF'])) {\n $jobResult = $this->codeRunner->runPhp($sections['SKIPIF'], $zept->getIni());\n if (!strncasecmp('skip', ltrim($jobResult['stdout']), 4)) {\n $message = '';\n\n if (preg_match('/^\\s*skip\\s*(.+)\\s*/i', $jobResult['stdout'], $rawMessage)) {\n $message = substr($rawMessage[1], 2);\n }\n\n $zept->setSkipMessage($message);\n }\n }\n\n return $zept;\n }", "title": "" }, { "docid": "9880632d82d7e73b2a93a9ad7a622fa1", "score": "0.49660298", "text": "protected function runTest() {\n\t\t$this->fail();\n\t}", "title": "" }, { "docid": "6ec0314239c9e47e8b94a9aa62cbe727", "score": "0.49569184", "text": "public function hasSkippedTheAttack(): bool\n {\n $range = new Range(1, 100);\n return $range->getRandom() <= $this->getLuck();\n }", "title": "" }, { "docid": "f13205d78a5ed9acd4515d56fcecc129", "score": "0.49473098", "text": "function parse_only() {\n $test_index = 0;\n foreach ($this->testsrc as $test) {\n $test_index++;\n $parse_return = $this->parse_run(realpath($test), false);\n $rc_eq = $this->check_rc($parse_return, realpath($test));\n if (!$rc_eq) {\n $this->fail++;\n $this->HTMLgen->add_fail($test, $test_index);\n continue;\n }\n if ($parse_return == 0) {\n $out_eq = $this->check_out_xml(realpath($test));\n if (!$out_eq) {\n $this->fail++;\n $this->HTMLgen->add_fail($test, $test_index);\n continue;\n }\n }\n $this->success++;\n $this->HTMLgen->add_success($test, $test_index);\n }\n }", "title": "" }, { "docid": "fc523a1ee98fb9935ea3cdadcaa58935", "score": "0.49466085", "text": "function paintFail($message) {\n\t\tparent::paintFail($message);\n\t\tfwrite(STDERR, 'FAIL' . $this->faildetail_separator . $this->_paintTestFailDetail($message));\n\t}", "title": "" }, { "docid": "dd9769b74eacbab500abd61f3e3fe2dc", "score": "0.49428785", "text": "function paintFail( $message )\n {\n \t// increment global counter\n parent::paintFail( $message );\n\n $breadcrumb = $this->getTestList();\n array_shift( $breadcrumb );\n\n $this->_paintHelper('fail', $breadcrumb, $message);\n }", "title": "" }, { "docid": "045fc982fb8317cd4aeb22e05ae2dfc7", "score": "0.49070737", "text": "public function empty_export()\n\t{\n\t\techo $this->row_export(\"No items match your request\");\n\t}", "title": "" }, { "docid": "3fbcb2b8430d030bf80c098b26e88751", "score": "0.49034622", "text": "public function skipWaitingTime();", "title": "" }, { "docid": "36096bba3777a5f258a13371dd2c1d87", "score": "0.48918128", "text": "public function testExecuteWithoutTransUnits()\n {\n list($result, $output) = $this->runCommand(\n [FormatCommand::COMMAND_NAME, '../translations-faulty/no-trans-units.de.xlf']\n );\n\n // check result code\n $this->assertEquals(0, $result);\n\n // output must end as expected\n $this->assertContains(self::EXECUTE_OUTPUT_RESULT_FAIL_TRANS_UNITS, $output->fetch());\n }", "title": "" }, { "docid": "3a7f4ff153f1c68190c5eb8521da03dd", "score": "0.48878184", "text": "public function testFailureCardPrint() {\n $testCard = new Card ('Test Title');\n\n $return = $testCard->printCard();\n\n $expected = '<div class=\"itemCard\"><h1>Test Title</h1></div>';\n\n $this->assertEquals($return, $expected);\n }", "title": "" }, { "docid": "30d58c9f3a875556540e474bbc7c6750", "score": "0.4884231", "text": "public function isContinue()\n {\n return false;\n }", "title": "" }, { "docid": "7f1ee4cf1594deb3ffbc9c3209ba031a", "score": "0.48783547", "text": "#[Skip]\n public function testThePreloadMethod(UnitTester $I): void\n {\n }", "title": "" }, { "docid": "4e34bec3b5733e339c09eeab7b4abf1c", "score": "0.48754847", "text": "public function testHalt(){\n\t\t\t$this->assertEquals(\"Go away\", $this->get_data('/halt'));\n\t\t}", "title": "" }, { "docid": "36076a7d53bee1a1e1897c14510df023", "score": "0.48626828", "text": "public function testShouldBeInProgressing()\n\t{\n\t\t$this->markTestSkipped(static::$skipTest);\n\t\treturn static::$skipTest;\n\t\t$taskModel = $this->getProjectTask('pt3');\n\t\t$taskModel->set('projecttaskstatus', 'PLL_IN_PROGRESSING');\n\t\t$taskModel->save();\n\n\t\t$this->executeBatchMethod();\n\t\t$this->assertProjectTask('PLL_IN_PROGRESSING', $taskModel);\n\n\t\t$this->executeBatchMethod();\n\t\t$this->assertProjectMilestone('PLL_IN_PROGRESSING', $this->getProjectMilestone('pm0'));\n\n\t\t$this->assertProject('PLL_IN_PROGRESSING', $this->getProject('p0'));\n\t}", "title": "" }, { "docid": "0da3301f38a9a17fbb652b2d0cada1fc", "score": "0.4861306", "text": "function setMissingTestCase($reason='Implement') {\n\t\t$this->_missing_tests[] = $this->method_name;\n\t\t$this->_methods[$this->method_name]['miss'] = true;\n\t\tif ($reason) {\n\t\t\t$this->_methods[$this->method_name]['reason'] = $this->_htmlEntities($reason);\n\t\t}\n\t\treturn count($this->_missing_tests);\n\t}", "title": "" }, { "docid": "23ae60dcd9470bd1ac10f804f1c97b60", "score": "0.48587355", "text": "public function testLoop()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "9f21eac7dd70b1ca83390f6a641446a6", "score": "0.48445523", "text": "public function testPrintUncolorizedOutput(): void\n {\n $actual_output = self::generatePhanOutput(\n new IssueInstance(Issue::fromType(Issue::UndeclaredVariableDim), 'dim.php', 10, ['varName']),\n new IssueInstance(Issue::fromType(Issue::SyntaxError), 'test.php', 1, ['fake error']),\n new IssueInstance(Issue::fromType(Issue::UndeclaredMethod), 'undefinedmethod.php', 1, ['\\\\Foo::bar'])\n );\n $expected_output = '';\n // phpcs:disable\n $expected_output .= 'dim.php:10 PhanUndeclaredVariableDim Variable $varName was undeclared, but array fields are being added to it.' . \\PHP_EOL;\n $expected_output .= '> mock line 10 of dim.php' . \\PHP_EOL . \\PHP_EOL;\n $expected_output .= 'test.php:1 PhanSyntaxError fake error' . \\PHP_EOL;\n $expected_output .= '> mock line 1 of test.php' . \\PHP_EOL . \\PHP_EOL;\n $expected_output .= 'undefinedmethod.php:1 PhanUndeclaredMethod Call to undeclared method \\Foo::bar' . \\PHP_EOL;\n // Mock no contents being read\n // phpcs:enable\n $this->assertSame($expected_output, $actual_output);\n }", "title": "" }, { "docid": "4b92e05ae1805c068007c90204d79cb1", "score": "0.48321852", "text": "public static function skipVisibleHeader($bSkip = true) {\n\t\tself::setSkip('VISIBLE_HEADER', $bSkip);\n\t}", "title": "" }, { "docid": "ef13d294ee2c288caa40a2d841341a93", "score": "0.4831039", "text": "public function testMissingCycle() {\n $this->expectException('Exception');\n Batch::process([\n 'article-ids' => ['12345678'],\n 'import-type' => $this->importTypes[Batch::IMPORT_TYPE_REGULAR],\n 'board' => 1,\n 'topic' => 1,\n ]);\n }", "title": "" }, { "docid": "170bbbc30b8d71387edd99aee836a2fc", "score": "0.4821697", "text": "function paintFooter($test_name) {\n\t\t$buffer = $this->getTestCaseProgress() . '/' . $this->getTestCaseCount() . ' test cases complete: ';\n\n\t\tif (0 < ($this->getFailCount() + $this->getExceptionCount())) {\n\t\t\t$buffer .= $this->getPassCount() . \" passes\";\n\t\t\tif (0 < $this->getFailCount()) {\n\t\t\t\t$buffer .= \", \" . $this->getFailCount() . \" fails\";\n\t\t\t}\n\t\t\tif (0 < $this->getExceptionCount()) {\n\t\t\t\t$buffer .= \", \" . $this->getExceptionCount() . \" exceptions\";\n\t\t\t}\n\t\t\t$buffer .= \".\\n\";\n\t\t\tfwrite(STDOUT, $buffer);\n\t\t\texit(ST_FAILS_RETURN_CODE);\n\t\t} else {\n\t\t\tfwrite(STDOUT, $buffer . $this->getPassCount() . \" passes.\\n\");\n\t\t}\n\t}", "title": "" }, { "docid": "d8beaf5293cae10e1952c9d3486af558", "score": "0.4791915", "text": "public function beforeLoop()\n {\n // no-op\n }", "title": "" }, { "docid": "9f55f8dd82ce1c6eff3e053a14a04f5d", "score": "0.47849292", "text": "public function addSkip($word)\n {\n \tarray_push($this->wordsToSkip, $word);\n }", "title": "" }, { "docid": "0400a6ec5d1cca227fb7fbdfb19915aa", "score": "0.47793552", "text": "protected function printReport()\n {\n $total = $this->passed + $this->failed;\n\n $report = sprintf(\"\\n%d/%d tests passed\", $this->passed, $total);\n\n $this->line($report);\n }", "title": "" }, { "docid": "5f24c598c272b0cdd81b3883dd398bf1", "score": "0.47691867", "text": "public function incomplete($report = null)\n {\n $this->_write('I', 'yellow');\n }", "title": "" }, { "docid": "93de9137af181c1faf1ca9b79c6330b0", "score": "0.4755209", "text": "public function pause($message=\"[ ENTER TO STEP | 'FINISH' TO CONTINUE ]\")\n {\n if (!$this->step) return;\n\n $this->hr();\n $this->output($message);\n $this->hr();\n\n $line = $this->input();\n\n if (strtolower(trim($line)) == 'finish')\n {\n $this->step = false;\n }\n }", "title": "" }, { "docid": "58c81d10ce8a110571bad1084ebe9b69", "score": "0.47527212", "text": "public function skipBytes($byteCount)\n {\n $this->_dataSource->skipBytes($byteCount);\n }", "title": "" }, { "docid": "338b66ac97f1c7854bc72eb31568fc87", "score": "0.47369722", "text": "function pzarc_sudo_nav_skipper($hover_nav, $blueprint)\n {\n if ($blueprint[ '_blueprints_section-0-layout-mode' ] === 'slider'\n && $blueprint[ '_blueprints_navigator-skip-button' ] !== 'none'\n && !in_array($blueprint[ '_blueprints_navigator' ], array('none',\n 'numbers',\n 'bullets',\n 'tabbed',\n 'labels'))\n && !in_array($blueprint[ '_blueprints_navigator-position' ], array('none',\n 'right',\n 'left'))\n ) {\n $skip_left = 'backward';\n $skip_right = 'forward';\n // open the nav\n\n $hover_nav .= '<button class=\"pager skip-left icon-btn-style\"><span class=\"icon-' . $skip_left . ' ' . $blueprint[ '_blueprints_navigator-skip-button' ] . '\"></span></button>';\n $hover_nav .= '<button class=\"pager skip-right icon-btn-style\"><span class=\"icon-' . $skip_right . ' ' . $blueprint[ '_blueprints_navigator-skip-button' ] . '\"></span></button>';\n\n }\n\n return $hover_nav;\n }", "title": "" } ]
84a246397d173d05df4749d8ecde6f0a
/ Identifiant du sejour
[ { "docid": "dc7881434ca4ae3f6b398dafae29d078", "score": "0.0", "text": "public function setUid($iv_uid) {\n\t\t\t/* Database attributes control */\n\t\t\t$lv_datatype = 'int(10) unsigned';\n\t\t\ttry {\n\t\t\t\t$this->uid = Securite::checkDataFormat($iv_uid, $lv_datatype);\n\t\t\t} catch (Message $lo_message) {\n\t\t\t\t$this->addMessage($lo_message);\n\t\t\t\t$this->v_has_error = true;\n\t\t\t}\n\t\t}", "title": "" } ]
[ { "docid": "07d3bbd845c208b1244e1543ed03c7a4", "score": "0.735353", "text": "function identifiant()\r\n\t\t{\r\n\t\t}", "title": "" }, { "docid": "1537f06b02eb6efac06b75d86a5c03ae", "score": "0.63687485", "text": "public function getIdSede()\n {\n return $this->IdSede;\n }", "title": "" }, { "docid": "0fb3f7491e65a26be76df4ce05d5ce9f", "score": "0.6212119", "text": "function getManagedSede(){\n //Declaracion de variables\n global $conexionMySQL;\n $query='SELECT S.sedeID FROM sede S JOIN usuario O ON S.instructora=O.username WHERE username=\"'. $this->username .'\"';\n //ver si tenemos resultado\n if($result=$conexionMySQL->query($query)){\n $row=$result->fetch_assoc();\n return $row[\"sedeID\"];\n }else{\n return null;\n }\n }", "title": "" }, { "docid": "a9c932067fbea5051f1065c8fd3b596d", "score": "0.6211384", "text": "function gerarIdentificador() {\n $letras = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z');\n // Seleciono do banco pra verificar se ja existe uma Turma dessa Curso_Semestre em especifico\n $query = \"SELECT identificador FROM Turmas WHERE id_curso_semestre = '$this->id_curso_semestre' AND id_periodo = '$this->id_periodo' ORDER BY identificador DESC\";\n $resultado = $this->bd->executarQuery($query);\n if ($this->bd->teveRetorno($resultado)):\n $identificador = mysql_fetch_array($resultado);\n // Percorro o array de letras pra verificar se ja existe, caso seja ele vai pegar a proxima letra\n for ($x = 0; $x < 26; $x++):\n if ($letras[$x] == $identificador['identificador']):\n // Retorna a letra que será registra\n return $letras[$x + 1];\n endif;\n endfor;\n\n else:\n //Caso ele não encontre nenhuma Turma cadastrada ele vai dar o identificador como A\n return \"A\";\n endif;\n }", "title": "" }, { "docid": "a4ee7706d9f70ef597ec4030f81fe86f", "score": "0.62006074", "text": "public function getIdentificador() {\n return $this->sIdentificador;\n }", "title": "" }, { "docid": "bf5293619a637afa94a463a4e5d75b2c", "score": "0.6142953", "text": "public function getIdVisiteur() {\n return $this->idVisiteur;\n }", "title": "" }, { "docid": "086309b70e1082fafeb20af3e8b82077", "score": "0.6137228", "text": "public function GetSessionID() {\n\treturn $this->GetFieldValue('ID_Sess');\n }", "title": "" }, { "docid": "3075427e9300c044857c3f972e99988c", "score": "0.6105672", "text": "public function getId_servicio()\n {\n return $this->id_servicio;\n }", "title": "" }, { "docid": "9691d1da8b64427c10094fc4a2bdbf5c", "score": "0.61026776", "text": "function obtenerSiguienteRegistro()\n {\n\t\n }", "title": "" }, { "docid": "08cc560aa2cec7c4eb31dd7011cde829", "score": "0.60854226", "text": "public function ident();", "title": "" }, { "docid": "45d5257420faecd6c1c36a8c80032c0d", "score": "0.6038726", "text": "function get_sede_para_usuario_logueado ($nombre_usuario){\n $sql=\"SELECT id_sede\n FROM administrador \n WHERE nombre_usuario='$nombre_usuario'\";\n $sede=toba::db('gestion_aulas')->consultar($sql);\n \n return ($sede[0]['id_sede']);\n }", "title": "" }, { "docid": "34abde96e0cae195be28f23b441ffce9", "score": "0.59880924", "text": "public function getIdentificador()\t{\n return $this->iIdentificador;\n }", "title": "" }, { "docid": "7ca93ea524310b9ed7d1d5121694b55d", "score": "0.5979762", "text": "public function getIdentifant()\n {\n return $this->identifant;\n }", "title": "" }, { "docid": "dc5486757763bc3da47bfc8dd367904d", "score": "0.5962319", "text": "public function getSeccion() {\r\n return $this->seccion;\r\n }", "title": "" }, { "docid": "fa95ccfbdd75c818fb0823d0bd342bf2", "score": "0.5951267", "text": "public function getSeccionId() {\n\t\tif ($this->__blnRestored && empty($this->__blnValid[self::SECCION_ID_FIELD])) {\n\t\t\tthrow new QCallerException(\"SeccionId was not selected in the most recent query and is not valid.\");\n\t\t}\n\t\treturn $this->strSeccionId;\n\t}", "title": "" }, { "docid": "bf54db95a15db9471f648bd847ebce4d", "score": "0.5931124", "text": "public function getIdentification();", "title": "" }, { "docid": "ffdf8f2da56994652832a5bdb5acb04d", "score": "0.59093857", "text": "function informacion_sucursal(){\n $class=new constante();\n $resultado = $class->consulta(\"SELECT nombre_sucursal FROM sucursales.misucursal where id = '$_SESSION[sucursal_activo]';\");\n while ($row=$class->fetch_array($resultado)) {\n $acu=$row[0];\n }\n return $acu;\n }", "title": "" }, { "docid": "809e764843d8ddb171cf68082cf615f7", "score": "0.5893832", "text": "public function getIdSolicitud() {\n\t\treturn $this->idSolicitud;\n\t}", "title": "" }, { "docid": "25ebb604145f36bab94de286bb8656b5", "score": "0.58770746", "text": "public function firstSid() {\n return \\Drupal::state()->get('webform_d7_to_d8', 0);\n }", "title": "" }, { "docid": "70a135730d9d9f6ef87b3edca9735f8e", "score": "0.58595467", "text": "public function get_id() {\n\t\treturn $this->sid;\n\t}", "title": "" }, { "docid": "55f5a1d59bcb7dd8714711238b0cc30d", "score": "0.5859392", "text": "function formulaires_editer_souhait_identifier_dist($id_souhait='new', $id_rubrique=0, $retour='', $lier_trad=0, $config_fonc='', $row=array(), $hidden=''){\n\treturn serialize(array(intval($id_souhait)));\n}", "title": "" }, { "docid": "977ad6609850048f962a11e7973dfe9a", "score": "0.58584106", "text": "public function obtenerIdentificador(){\r\n return $this->identificador;\r\n }", "title": "" }, { "docid": "c4774ff27ceb7ce4f90fccd19a28d4a9", "score": "0.58142054", "text": "function getIdClase($clase)\r\n {\r\n \r\n $sql=\"SELECT id FROM clases\r\n WHERE activo ='1'\r\n AND nombre ='{$clase}'\";\r\n \r\n $conexion = new ConectarBD(SERVIDOR, USUARIO, PASS, BD);\r\n $conexion->consultaSQL($sql); \r\n $dato=null;\r\n \r\n \r\n if(count($conexion->_datosRegistros)>0 )\r\n $dato= $conexion->_datosRegistros[0]['id']; \r\n \r\n \r\n return $dato; \r\n \r\n \r\n }", "title": "" }, { "docid": "dea661fa0fb3290266d42b1eb1023560", "score": "0.57878715", "text": "public function getIdSalle()\n {\n return $this->id_salle;\n }", "title": "" }, { "docid": "5744166a40d2d0dbbe852968553528fb", "score": "0.5779407", "text": "public static function discId(): string\n {\n return 'discid';\n }", "title": "" }, { "docid": "6716d99687ef34b58c1bb7b42dc676c6", "score": "0.57602835", "text": "public function getIdrene()\n {\n return $this->idrene;\n }", "title": "" }, { "docid": "79401ec99ec3d4a5108ac09f8d917bc5", "score": "0.57581544", "text": "public function id();", "title": "" }, { "docid": "79401ec99ec3d4a5108ac09f8d917bc5", "score": "0.57581544", "text": "public function id();", "title": "" }, { "docid": "79401ec99ec3d4a5108ac09f8d917bc5", "score": "0.57581544", "text": "public function id();", "title": "" }, { "docid": "79401ec99ec3d4a5108ac09f8d917bc5", "score": "0.57581544", "text": "public function id();", "title": "" }, { "docid": "79401ec99ec3d4a5108ac09f8d917bc5", "score": "0.57581544", "text": "public function id();", "title": "" }, { "docid": "0f0a4c537cd0fcffefce4e9ad939ef2e", "score": "0.5750809", "text": "public function getIdentifier();", "title": "" }, { "docid": "0f0a4c537cd0fcffefce4e9ad939ef2e", "score": "0.5750809", "text": "public function getIdentifier();", "title": "" }, { "docid": "0f0a4c537cd0fcffefce4e9ad939ef2e", "score": "0.5750809", "text": "public function getIdentifier();", "title": "" }, { "docid": "0f0a4c537cd0fcffefce4e9ad939ef2e", "score": "0.5750809", "text": "public function getIdentifier();", "title": "" }, { "docid": "0f0a4c537cd0fcffefce4e9ad939ef2e", "score": "0.5750809", "text": "public function getIdentifier();", "title": "" }, { "docid": "fa2b0b335eeb4e38c0b5fbfed275ab14", "score": "0.5750609", "text": "function ritorna_sottosezione_pertinenza() {\n $s_id = 1; // must be greater than 0\n//\n// DO NOT EDIT ANYTHING BELOW THIS LINE!\n//\n \n \n if(isset($_SESSION[\"sottosezione_appartenenza\"])) \n $s_id = $_SESSION[\"sottosezione_appartenenza\"];\n\n if($s_id <= 0)\n $s_id = 1;\n\n return($s_id); \n}", "title": "" }, { "docid": "1280453ccb184f1434b1bb7791aae2cb", "score": "0.5748163", "text": "function getId();", "title": "" }, { "docid": "1280453ccb184f1434b1bb7791aae2cb", "score": "0.5748163", "text": "function getId();", "title": "" }, { "docid": "b6a6a14193985c4153f4253cdd98700c", "score": "0.57380325", "text": "public function getIdcliente() {\n\t\t\t\treturn $this->id_cliente ?? \"Id do Cliente não solicitado !!\";\n\t\t\t}", "title": "" }, { "docid": "99349a902597a88c74c69405ceadf333", "score": "0.5729849", "text": "public function getIdentidade()\n {\n return $this->getValueByKey($this->values, 'INF_MIL_BASICO.MILITAR_IDENTIDADE');\n }", "title": "" }, { "docid": "83db5b373f12878686ce6bdb0c20d0ec", "score": "0.5727493", "text": "public function getNtokloSessionId(){\n\t\t/** @var Mage_Log_Model_Visitor $visitor */\n $visitor = Mage::getSingleton('log/visitor');\n\n\t\tif ($visitor->getVisitorId()) {\n return $visitor->getVisitorId();\n }\n\n return false;\n\t}", "title": "" }, { "docid": "114ee924224a5840f3d6055a5072d6b5", "score": "0.57156", "text": "public function getSeccion() {\n\t\tif ($this->__blnRestored && empty($this->__blnValid[self::SECCION_FIELD])) {\n\t\t\tthrow new QCallerException(\"Seccion was not selected in the most recent query and is not valid.\");\n\t\t}\n\t\treturn $this->strSeccion;\n\t}", "title": "" }, { "docid": "323e2f727926d52049e1dc3c50560312", "score": "0.5711052", "text": "public function getSID(){\n\t\t\treturn $this->_SID;\t\n\t\t}", "title": "" }, { "docid": "9c0e40c8066d0f048fb50da83722a1ff", "score": "0.5699768", "text": "function personalId();", "title": "" }, { "docid": "d370bb84695f4070c486ea9619d77bef", "score": "0.56962276", "text": "function get_id_auteur($name) {\r\n if (trim($name)==\"\") return false; \r\n $sql = \"SELECT id_auteur FROM spip_auteurs WHERE nom='\".addslashes(filtrer_entites($name)).\"'\";\r\n $result = spip_query($sql);\r\n while ($row = spip_fetch_array($result)) {\r\n return $row['id_auteur'];\r\n }\r\n // auteur inconnu, on le cree ...\r\n spip_log(\"creation auteur\".$name,\"snippets\");\r\n return sql_insertq('spip_auteurs',array('nom'=>$name,'statut'=>'1comite')) ;\r\n}", "title": "" }, { "docid": "a5fc4256e2f4d1bbe604accb3013fa28", "score": "0.56846315", "text": "private function getNomeSite(){\n $nomeSite = \"DUCAJOBS (Ducamaleão)\";\n \n return $nomeSite;\n }", "title": "" }, { "docid": "25ab49085bd2042720c08455fb4849be", "score": "0.5680529", "text": "public function Identifiant($Valeur = null)\n\t{\n\t\tif ($Valeur !== null)\n\t\t{\n\t\t\tif (!is_string($Valeur)) return false;\n\t\t\t$this->m_Id = $Valeur;\n\t\t}\n\t\treturn $this->m_Id;\n }", "title": "" }, { "docid": "4a7cd7d82dc71c856a79f1dbc37a055c", "score": "0.5680475", "text": "public function getServicioId(){\n\t\treturn $this->servicio_id;\n\t}", "title": "" }, { "docid": "2e4dbe36ca90a1c3c6fe5eeb0937aac6", "score": "0.56672174", "text": "public function get_id(){\n\n $usuario = $_SESSION['usuario'];\n $sql= \"SELECT dni FROM usuario WHERE usuario = :usuario\";\n $sentencia=$this->conexionDB->prepare($sql);\n $sentencia->execute(array(\":usuario\"=>$usuario));\n $resultado=$sentencia->fetch(PDO::FETCH_ASSOC);\n $idUsuario = $resultado['dni'];\n $sentencia->closeCursor();\n return $idUsuario;\n }", "title": "" }, { "docid": "eaf0750c800d4f0dcb95bf115ace36c7", "score": "0.5666423", "text": "public function getId_sala()\n {\n return $this->id_sala;\n }", "title": "" }, { "docid": "eff0097943c8c09759f8ea2f68194999", "score": "0.566425", "text": "public function message()\n {\n return 'Tamaño de identificación no coincide con el tipo de identificación.';\n }", "title": "" }, { "docid": "92703911d4071e4f22587ace579823a5", "score": "0.56619346", "text": "public function getCEOId()\r\n {\r\n $params = array();\r\n $params['fields'] = array(\r\n 'supervisor'\r\n );\r\n $params['conditions'] = array(\r\n 'Section.id' => 1,\r\n 'Section.name' => 'Zarząd'\r\n );\r\n $return = $this->find('first', $params);\r\n $return = $return['Section']['supervisor'];\r\n return $return;\r\n }", "title": "" }, { "docid": "5629cd8364a125bda0af56f9f7a56605", "score": "0.56588525", "text": "function setIdUserVisiting(){\n\tif(!isset($_SESSION['idUserVisiting']) OR ($_SESSION['idUserVisiting']==0)){\n\t\t//echo \"no seteada<br />\";\n\t\t$iSMuIdKey=$_SESSION['iSMuIdKey'];\n\t\treturn $iSMuIdKey;\n\t}else{\n\t\t//echo \"seteada<br />\";\n\t\t$iSMuIdKey=$_SESSION['idUserVisiting'];\n\t\treturn $iSMuIdKey;\n\t}\n}", "title": "" }, { "docid": "71a599bc99ade93c25fbc0cba27a47be", "score": "0.56583756", "text": "function _se_id() {\n\treturn substr(session_id(), -5); // last 5 \"digits\" only\n}", "title": "" }, { "docid": "5b8da5978a8df6fe2e7379f0b7faea73", "score": "0.5655024", "text": "public function getIdentifier(): string;", "title": "" }, { "docid": "5b8da5978a8df6fe2e7379f0b7faea73", "score": "0.5655024", "text": "public function getIdentifier(): string;", "title": "" }, { "docid": "ce2f71633c1104f9e751d1b4ca42dbe2", "score": "0.56339926", "text": "public static function getIdentifier(): string;", "title": "" }, { "docid": "66530df39267febb05b1acd1ac6aa99f", "score": "0.56252", "text": "public function identifier(): string;", "title": "" }, { "docid": "8a48c3b0cebd67916a83b09bc41f5d2f", "score": "0.56098104", "text": "public function getSeccion(){\n\n\t\tif(is_null($this->seccion)){\n\t\t\t$seccionService = new SeccionService;\n\n\t\t\ttry {\n\n\t\t\t\t$this->seccion = $seccionService->getSeccionById($this->id_seccion)->nombre;\n\n\t\t\t}catch(Exeption $e){\n\t\t\t\t$logger = Logger::getRootLogger();\n\t\t\t\t$logger->error($e);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\treturn $this->seccion;\n\t}", "title": "" }, { "docid": "24ab8c7d8011e8cdcbeb821710061bef", "score": "0.5600006", "text": "public function getIdde()\n {\n return $this->idde;\n }", "title": "" }, { "docid": "322c2b0a775e8e36c470706f6d825785", "score": "0.5595499", "text": "function selecionarSemestre($id_semestre) {\n $query = \"SELECT id_semestre, nome_semestre FROM `semestres` WHERE `id_semestre` = '$id_semestre'\";\n $resultado = $this->bd->executarQuery($query);\n if ($this->bd->teveRetorno($resultado)):\n /* Setando dados do Semestre */\n $semestre = mysql_fetch_array($resultado);\n $this->id_semestre = $semestre['id_semestre'];\n $this->nome_semestre = $semestre['nome_semestre'];\n return true;\n else:\n return false;\n endif;\n }", "title": "" }, { "docid": "a46360f908dd4cf8c3c82fffd699f833", "score": "0.5588622", "text": "function getSecrectKey()\n {\n return $this->SecrectKey;\n }", "title": "" }, { "docid": "2865b5ed1837e1868b178a533ddd5c6d", "score": "0.55761874", "text": "function getIdent()\n {\n return $this->_ident;\n }", "title": "" }, { "docid": "e0eb2bd003d7728d8215e489aa24bf05", "score": "0.5575367", "text": "public function getIdDomaine()\n {\n return $this->id_domaine;\n }", "title": "" }, { "docid": "117c0cad4f8128d70d77a852e1d9af90", "score": "0.5573977", "text": "Public function get_idinteret()\n\t\t{\n\t\t\tReturn $this ->idinteret;\n\t\t}", "title": "" }, { "docid": "8e15516b91211aa475caa3d67da61d4e", "score": "0.55724317", "text": "function getCitizenSsnNo() {\n\t\t$ctznNo = $this->NepaliNumber->toggleNumberLang($this->data['PersonalAccount']['citizenship_no'], 'English');\n\t\t\n\t\t$countCtzn = $this->Citizen->find(\"list\", array('conditions' => array('citizenship_no' => $ctznNo), 'fields' => array('ssn_no', 'citizenship_no')));\n\t\t$ssnNo = '';\n\t\tif(count($countCtzn) > 0) {\n\t\t\tforeach($countCtzn as $k => $v) {\n\t\t\t\t$ssnNo = $k;\n\t\t\t}\n\t\t\t$this->data['PersonalAccount']['person_name_id'] = $ssnNo;\n\t\t} else {\n\t\t\t//print \"citizen entry need to be done\";\n\t\t\t$this->data['Citizen']['birth_date'] = \"1900-01-01\";\n\t\t\t$this->data['Citizen']['birth_place'] = 1;\n\t\t\t$this->data['Citizen']['permanent_address'] = 1;\n\t\t\t$this->data['Citizen']['citizenship_no'] = $ctznNo;\n\t\t\t$this->data['Citizen']['first_name'] = '';\n\t\t\t$this->data['Citizen']['last_name'] = '';\n\t\t\t\n\t\t\tforeach(explode(\" \", $this->data['PersonalAccount']['person_name']) as $k => $v) {\n\t\t\t\tif($k == 0) {\n\t\t\t\t\t$this->data['Citizen']['first_name'] = $v;\n\t\t\t\t} else {\n\t\t\t\t\t$this->data['Citizen']['last_name'] .= ' ' . $v;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->Citizen->create($this->data);\n\t\t\t$this->Citizen->save($this->data);\n\t\t\t\n\t\t\t$ssnNo = $this->Citizen->getLastInsertId();\n\t\t\t//print $ssnNo;\n\t\t\t$this->data['PersonalAccount']['person_name_id'] = $ssnNo;\n\t\t}\n\t\treturn $ssnNo;\n\t}", "title": "" }, { "docid": "972c7739ee969ba43cb4ec3b3c1647f2", "score": "0.5568481", "text": "abstract public static function getIdentifier(): string;", "title": "" }, { "docid": "b3dffdc29402e9aa92823c694b692797", "score": "0.55618376", "text": "public function getId(){\r\n\t\t\treturn $this->idutilisateur;\r\n\t\t}", "title": "" }, { "docid": "d60b6956da70799b42271539ac0b7709", "score": "0.5558945", "text": "public function seguindo($pNick){\n\t\tsession_start();\n\t\t$modelAnimal = new ModelAnimal(Init::getDB());\n\t\t$dadosAnimal = $modelAnimal->exibirDadosAnimal($pNick); // carregando informacoes do animal\n\t\t$modelIntegracao = new ModelInteracao(Init::getDB()); // carregando a lista de seguidos\n\t\t$seguidos = $modelIntegracao->listarSeguidos($dadosAnimal['codigo']);\n\n\t\t$cab = new Cabecalho();\n\t\t$cab->abertura($dadosAnimal['nome']); // inserindo o cabecalho com o nome do usuario\n\t\tinclude_once \"../App/Views/mostraUsuario.php\";\n\t\t//include_once \"../App/Views/formBusca.php\";\n\t\tinclude_once \"../App/Views/listarSeguidos.php\"; // inserindo a pagina que vai listar os seguidos\n\t\t$cab->fechamento();\n\t}", "title": "" }, { "docid": "6336ad15e5941594e2dfb304d36e34ac", "score": "0.5557135", "text": "public function getIdspecialite()\r\n {\r\n return $this->idspecialite;\r\n }", "title": "" }, { "docid": "864a82b101284235b6e8c0c9a98aa90f", "score": "0.55545855", "text": "function getIdEscuela($escuela) {\n if ($escuela != \"\") {\n $escuela = strtolower(__($escuela));\n $query = new Query(\"SG\");\n $query->sql = <<<SQL\n select id_escuela from escuelas where lower(nombre_escuela) ='$escuela'\nSQL;\n\n $registro = $query->select(\"obj\");\n\n if ($registro) {\n foreach ($registro as $reg) {\n return $reg->id_escuela;\n }\n } else {\n return false;\n }\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "1d8009290f69666e529d5c933f7fa3cc", "score": "0.55531937", "text": "public static function getSitio(){\n return (string) FrameWork::$sitio;\n }", "title": "" }, { "docid": "4f9ef70f4dfbeb62676c4257430984c1", "score": "0.5550381", "text": "public function constructId()\n {\n $stri_index=$this->stri_url;\n //construction de l'identifiant du menu\n $stri_index=strtr($stri_index,\".&=?/- \",\"_______\");\n \n return $stri_index;\n /* \n /// $stri_index=array_pop(get_included_files()); //génération de l'id basé sur le script appellant\n $arra_file=get_included_files();\n $stri_index=$arra_file[count($arra_file)-1];\n \n //$stri_index=crc32($stri_index);\n //$stri_index=crypt($stri_index,\"unesupergrandeclef\");\n //$stri_index=$stri_index.$stri_index.$stri_index; \n \n //construction de l'identifiant du menu\n $stri_index=strtr($stri_index,\" .&=?/-homecladivpw'\",\"_______phomecladiv8\"); //remplacement de caractère pour éviter de transmettre en claire un chemin du serveur\n $stri_index=substr($stri_index,0,75);//limitation de la taille de l'id au delà de laquel le js ne fonctionne plus\n \n return $stri_index;*/\n }", "title": "" }, { "docid": "ae1a7f4214f99a7c8c3dfef50a97305c", "score": "0.5532582", "text": "public function getId() : string\n\t{\n\t}", "title": "" }, { "docid": "1c9920c782b98501db968347d3d48d7e", "score": "0.55311465", "text": "public function constructId()\n {\n $stri_index=$this->stri_url;\n //construction de l'identifiant du menu\n $stri_index=strtr($stri_index,\".&=?/- \",\"_______\");\n \n return $stri_index;\n \n /// $stri_index=array_pop(get_included_files()); //génération de l'id basé sur le script appellant\n $arra_file=get_included_files();\n $stri_index=$arra_file[count($arra_file)-1];\n \n //$stri_index=crc32($stri_index);\n //$stri_index=crypt($stri_index,\"unesupergrandeclef\");\n //$stri_index=$stri_index.$stri_index.$stri_index; \n \n //construction de l'identifiant du menu\n $stri_index=strtr($stri_index,\" .&=?/-homecladivpw'\",\"_______phomecladiv8\"); //remplacement de caractère pour éviter de transmettre en claire un chemin du serveur\n $stri_index=substr($stri_index,0,75);//limitation de la taille de l'id au delà de laquel le js ne fonctionne plus\n \n return $stri_index;\n }", "title": "" }, { "docid": "602979443dcd32a5255d730aedb7de30", "score": "0.5520454", "text": "public function getUniqueid();", "title": "" }, { "docid": "e57d2b8da60023421429ebe5d22ff6c2", "score": "0.5512473", "text": "public function getCampagnebyStatus()\n {\n try {\n $infos=Campagne::whereStatus(\"EN COURS\")->get('id');\n\n if($infos->isNotEmpty()){\n return $infos[0]['id'];\n }else{\n return \"Aucune en Campagne en cours\";\n }\n \n } catch (\\Throwable $th) {\n throw $th;\n }\n \n \n \n \n }", "title": "" }, { "docid": "f0835c054860fd016a247e61c25decb7", "score": "0.5509129", "text": "public function identifier(): string\n {\n return 'six-saferpay';\n }", "title": "" }, { "docid": "5111debc673f861633ae6b069cda05f1", "score": "0.55090374", "text": "public function getSid()\n\t{\n\t\treturn session_id();\n\t}", "title": "" }, { "docid": "7c3ec830ce9486d40bc7b59d78446dcd", "score": "0.5504166", "text": "public function getID(): string;", "title": "" }, { "docid": "7c3ec830ce9486d40bc7b59d78446dcd", "score": "0.5504166", "text": "public function getID(): string;", "title": "" }, { "docid": "40837144da8ce615bcbde68012b88cf5", "score": "0.54923886", "text": "public function getIdentifier() : string;", "title": "" }, { "docid": "233adbdbeb3451ceb11b90791018f6d8", "score": "0.5487793", "text": "function codeEntrepriseExiste($codeEntreprise)\n\t\t{\n\t\t$retour = false;\n\t\t$requete = \"SELECT ID FROM boutique_obj_entreprise\n\t\t\t\t\tWHERE code='\".$codeEntreprise.\"'\";\n\t\t$resSql = T_LAETIS_site::requeter($requete);\n\t\tif($resSql)\n\t\t\t{\n\t\t\t$retour = true;\n\t\t\t}\n\t\treturn($retour);\n\t\t}", "title": "" }, { "docid": "24ee3bcb35d1b11bf382043360753875", "score": "0.5477097", "text": "public function ident()\n {\n return $this->ident;\n }", "title": "" }, { "docid": "05ac2742d18b314270312482ca9baf92", "score": "0.54652476", "text": "function siteName() {\r\n\treturn \"HSU Comissioning\";\r\n}", "title": "" }, { "docid": "7ee9b7c2e3e91c75b208ec37ce446253", "score": "0.54626226", "text": "public function getIdentifiantEtudiant()\n {\n return $this->identifiantEtudiant;\n }", "title": "" }, { "docid": "7540ac1c12ec8afa5a3cb5ee69065721", "score": "0.54603046", "text": "public function getIdSubservicio()\n {\n return $this->idSubservicio;\n }", "title": "" }, { "docid": "777b07bbc01517067aaa5f7195a75cf2", "score": "0.54587424", "text": "abstract protected function getUniqueIdentifier();", "title": "" }, { "docid": "3aef8d2cef74c895a440164a3a4a029c", "score": "0.5453069", "text": "function verifiePseudo($pseudo, $mdp){\r\n\t//Si la fonction qui verifie le couple (pseudo/mdp) est vrai (donc il existe), on cree une variable de session \"pseudo\" et on lance le jeu\r\n if ($this->modeleBD->verifMdp($pseudo,$mdp)) {\r\n $_SESSION[\"pseudo\"] = $pseudo;\r\n $this->modelePlateau->initialiserPlateau();\r\n $this->vueJeu->AffichageJeu();\r\n }\r\n else{ //Sinon, on cree une variable de session \"erreur\" qui va servir dans la vue Erreur, et on affiche la vue Erreur\r\n \t$_SESSION[\"erreur\"] = \"connexion\";\r\n $this->vueErreur->affichageErreur();\r\n }\r\n}", "title": "" }, { "docid": "c86bdf629b55e13e54219d887acdc8c9", "score": "0.5448293", "text": "function Seguidor($suId,$miId){\n\t\t$link=conexion();\n\t\t$query=\"insert into siguiendo (usuarios_id, usuarioseguido_id) values ('$miId', '$suId')\";\n\t\t$result=mysqli_query($link,$query);\n\t\treturn $result;\n\n\t}", "title": "" }, { "docid": "ca7df2c8cb104542692026f732f710ad", "score": "0.5445873", "text": "abstract public function identifier(): string;", "title": "" }, { "docid": "4a494a254b5b50602ada60da22308756", "score": "0.5439974", "text": "public function getName()\n {\n return $this['sid'];\n }", "title": "" }, { "docid": "4f57b080d92a2c0025393aa4996f0dae", "score": "0.5432716", "text": "function registraVisita($secao)\n\t{\n\t\tconectar($conexao);\n\t\t$hora = date(\"Y-m-d h-i-s\");\n\t\tmysql_query (\"INSERT INTO visitas VALUES ('\".$_SERVER['REMOTE_ADDR'].\"','\".$secao.\"','\".$hora.\"')\",$conexao);\n\t}", "title": "" }, { "docid": "ac70b8130c77d8080089bb84155e2b38", "score": "0.54299575", "text": "public function getCreatorId(): string\n {\n return $this->getFirst('//epp:epp/epp:response/epp:resData/host:infData/host:crID')->nodeValue;\n }", "title": "" }, { "docid": "988713432ca6ecca755e597a2cbcc288", "score": "0.5429063", "text": "public function getID() : string\n {\n return $this->iD;\n }", "title": "" }, { "docid": "4fc351d396acb859526690b5da44b04a", "score": "0.54269475", "text": "public function getIdConseil()\n\t{\n\t \n\t $sql=\"SELECT\n\t\t\t\tc_id,\n c_id_utilisateur,\n c_id_conseiller\n\t\t\t\tFROM conseil\n\t\t\t\tORDER BY c_id DESC\";\n\t $query = $this->db->query($sql);\n\t $id=$query->result_array();\n\t $lastidconseil=$id[0][\"c_id\"];\n\t return $lastidconseil;\n\t}", "title": "" }, { "docid": "10fd47cd2ca62d62f762b24c5ddecc32", "score": "0.5425235", "text": "public function getIdString() : string;", "title": "" }, { "docid": "e503fbb8443992108583cae2928c591f", "score": "0.54252195", "text": "protected function getIdiom()\n\t{\n\t\treturn 'english';\n\t}", "title": "" }, { "docid": "2eb560d03dccb9aca8e636760e20c0bc", "score": "0.542454", "text": "public function getId_realisateur()\n {\n return $this->id_realisateur;\n }", "title": "" }, { "docid": "7ff0bfbb025a0efeb879e1a6fc2c8df8", "score": "0.5418831", "text": "public function getIdDetail()\n {\n \treturn \"ACO-03-\". date(\"Y\") . sprintf('%05d', $this->id_actaconteo);\n }", "title": "" } ]
963104631b3682a4d6d5beb50d5f1f3e
Display a listing of users Author : Vaibhav Bharti
[ { "docid": "ca23a1f8f247b4ec9f5d2bb7d9026eed", "score": "0.0", "text": "public function index(Request $request)\n\t{\n\t\t\n\t\t$data = $request->all();\n\n\t\t$data['usersCount'] = DB::table('role_user')\n\t\t\t\t\t\t//->select(array('dn_users.id'))\n\t\t\t\t\t\t->join('dn_users', 'role_user.user_id', '=', 'dn_users.id')\t\t\n\t\t\t\t\t\t->where('role_id','3')\n\t\t\t\t\t\t//->take(\"10\") \n\t\t\t\t\t\t->count();\n\t\t\t\t\t\t//->paginate(config('admin.user.perpage'));\n\t\t//print_r($users );\tdie;\n\t\t$data['activeUsersCount'] = DB::table('role_user')\n\t\t\t\t\t\t//->select(array('dn_users.id'))\n\t\t\t\t\t\t->join('dn_users', 'role_user.user_id', '=', 'dn_users.id')\t\t\n\t\t\t\t\t\t->where('role_id','3')\n\t\t\t\t\t\t->where('dn_users.active','1')\n\t\t\t\t\t\t//->take(\"10\") \n\t\t\t\t\t\t->count();\n\t\t//print_r($ActiveUsersCount);die;\n\t\t$states = DB::table('dn_states')->get();\n\t\tif(isset($data['stateCode']))\n\t\t{\n\t\t\t$stateCode=$data['stateCode'];\n\t\t\t$cities = DB::table('dn_cities')->where('state_code',$stateCode)->get();\n\t\t\techo \"<option value=''>---City---</option>\";\n\t\t\tforeach($cities as $city)\n\t\t\t{\n\t\t\t\techo \"<option class='append' value='$city->id'>\".$city->city.\"</option>\";\n\t\t\t}\n\t\t}\n\t\t$citys = DB::table('dn_users')\n\t\t\t\t\t->select(array('dn_users.city','dn_cities.*', DB::raw('COUNT(dn_users.id) as no_of_users,dn_users.id as pid')))\n\t\t\t\t\t->leftjoin('dn_cities', 'dn_users.city', '=', 'dn_cities.id')\n\t\t\t\t\t->leftjoin('dn_states', 'dn_users.state', '=', 'dn_states.state_code')\n\t\t\t\t\t->leftjoin('role_user', 'dn_users.id', '=', 'role_user.user_id')\n\t\t\t\t\t->where('dn_users.city','!=',0)\n\t\t\t\t\t->where('role_user.role_id',3)\n\t\t\t\t\t->where('dn_users.city','!=','')\n\t\t\t\t\t->groupBy('dn_users.city')\n\t\t\t\t\t->orderBy('no_of_users')\n\t\t\t\t\t->get();\n\t\tif(@$citys and !empty($citys)){\n\t\t$n=count($citys)-1;\n\t\tif($n>=0)\n\t\t{\n\t\t\t$citiesCount=array('least'=>@$citys[0],'most'=>@$citys[$n]); }\n\t\t}else{\n\t\t\t$cty=(object)array('city'=>'N/A','no_of_users'=>'N/A');\n\t\t\t@$citiesCount=array('least'=>@$cty,'most'=>$cty);}\n\t//echo \"fhdhfj\";die;\n\t\treturn $this->view('users.index', compact('data','citiesCount','states'));\n\t}", "title": "" } ]
[ { "docid": "8c9e82eabb7313b1e5ae4995e6017d17", "score": "0.76207155", "text": "public function getUserAuthor();", "title": "" }, { "docid": "40211062123f508d2ff03e3822f61cf2", "score": "0.7444028", "text": "public function getAuthorsAction() {\n\n $user = $this->getUser();\n\n $authors = $this->getDoctrine()->getRepository(Author::class)\n ->findBy(['owner' => $user->getId()]);\n\n $view = $this->view($authors, 200);\n return $this->handleView($view);\n }", "title": "" }, { "docid": "c6f99a37facf035def37bf2808cc06b1", "score": "0.7373398", "text": "public function index()\n {\n $authors = User::where('is_author', true)->paginate(10);\n\n return view('authors.index', compact('authors'));\n }", "title": "" }, { "docid": "3b900af0284161ce084159a164a74e53", "score": "0.7239576", "text": "function rc_list_authors_loop() { \n \n\t$number \t\t= 56;\n\t$paged \t\t= (get_query_var('paged')) ? get_query_var('paged') : 1;\n\t$offset \t\t= ($paged - 1) * $number;\n\t$total_users \t\t= (int)count(get_users());\n\t$total_pages \t\t= intval($total_users / $number) + 1;\n\n $args = array( \n\t\t'order' \t\t\t=> 'ASC',\n\t\t'orderby' \t\t \t\t\t=> 'display_name',\n\t\t'exclude'\t\t \t\t\t=> array (15, 2, 519),\n\t\t'has_published_posts' \t\t=> array('post'),\n\t\t'number' \t \t\t\t=> $number,\n\t\t'offset' \t\t\t\t\t=> $offset,\n\n\t);\n\n\t$user_query = new WP_User_Query( $args );\n\t\n\tif ( ! empty( $user_query->results ) ) { \t\t\n\t\tforeach ( $user_query->results as $user ) {\n\t\t\n\t\t\t$id \t\t\t= $user->ID;\n\t\t\t$first_name \t= $user->first_name;\n\t\t\t$last_name \t\t= $user->last_name;\n\t\t\t$link \t\t\t= get_author_posts_url( $id );\n\t\t\t\n\t\t\t$attachment_id \t= get_field( 'artist_photo', 'user_'.$id );\n\t\t\t$avatar \t\t= wp_get_attachment_image_src( $attachment_id, 'artist-image' );\n\n\t\t\t$fallback \t\t= '';\n\n\t\t\t// If the artist/user does not have a photo in the custom field, \n\t\t\t// then get_posts for that author an grab the featured image from the first post and use as fallback image\n\t\t\tif( ! $attachment_id ) {\t\t\t\t\n\t\t\t\t$posts = get_posts(\"author=\" . $id . \"&posts_per_page=1\"); \t\t\t\t\t\n\t\t\t\tforeach( $posts as $post ) {\n\t\t\t\t\t$fallback = get_the_post_thumbnail( $post->ID, 'artist-image' );\n\t\t\t\t}\t\t\n\t\t\t}\n\n\t\t\t// Show the individual artist info\n\t\t\techo '<article class=\"entry one-eighth\" itemscope=\"itemscope\" itemtype=\"http://schema.org/Person\">';\t\t\t\t\t\n\t\t\t\tif( $attachment_id ) {\t\t\t\t\t\n\t\t\t\t\tprintf('<a href=\"%s\" class=\"post-image entry-image\" rel=\"bookmark\" itemprop=\"url\"><img src=\"%s\" alt=\"%s %s\" itemprop=\"image\" /></a>',\n\t\t\t\t\t\tesc_url($link),\n\t\t\t\t\t\tesc_url($avatar[0]),\n\t\t\t\t\t\tesc_html($first_name),\n\t\t\t\t\t\tesc_html($last_name)\n\t\t\t\t\t);\t\t\t\t\n\t\t\t\t}else{ \n\t \tprintf('<a href=\"%s\" class=\"post-image entry-image\" rel=\"bookmark\" itemprop=\"url\">%s</a>',\n\t \t\tesc_url($link),\n\t \t\t$fallback\n\t \t);\t \n\t }\t\t \n\t\t\t\techo '<header class=\"entry-header\">';\n\t\t\t\t\tprintf('<h2 class=\"entry-title\" itemprop=\"name\"><a href=\"%s\" rel=\"bookmark\" itemprop=\"url\">%s %s</a></h2>',\n\t\t\t\t\t\tesc_url($link),\n\t\t\t\t\t\tesc_html($first_name),\n\t\t\t\t\t\tesc_html($last_name)\n\t\t\t\t\t);\t\t\t\t\t\n\t\t\t\t\tprintf('<a class=\"more-link\" href=\"%s\" rel=\"bookmark\" itemprop=\"url\">%s <i class=\"fa fa-long-arrow-right\"></i></a>', \n\t\t\t\t\t\tesc_url($link),\n\t\t\t\t\t\tesc_html__('View Artist', CHILD_THEME_DOMAIN)\n\t\t\t\t\t);\t\t\t\t\t\t\n\t\t\t\techo '</header>';\t\t\t\t\t\n\t\t\techo '</article>';\t\t\t\n\t\t} \n\n\t\t// Pagination\n\t if ($total_users > $number) {\n\t echo '<div class=\"archive-pagination pagination\">'; \n\t echo paginate_links(array(\n\t 'base' \t\t\t=> get_pagenum_link(1) . '%_%',\n\t 'format' \t\t=> 'page/%#%/',\n\t 'current' \t\t=> max(1, get_query_var('paged')),\n\t 'total' \t\t=> $total_pages,\n\t 'prev_next' => false,\n\t 'type' => 'list',\n\t ));\n\t echo '</div>';\t \n\t }\n\t}\t\n}", "title": "" }, { "docid": "beedc14b7655bbc50a6a8e91a11e891e", "score": "0.7207994", "text": "public function actionGetArticlesByAuthor(){\n $author = Author::findOne(['name' => Yii::$app->request->get('name')]);\n $data = Author::getArticles($author->id);\n return $this->render('index', [\n 'articles' => $data['articles'],\n 'pagination' => $data['pagination'],\n ]);\n }", "title": "" }, { "docid": "657ebb391699cc8edadcd7e8eaba81bb", "score": "0.7170912", "text": "public function get_authors() {\n $output .= $this->get_creators();\n //$output .= \"</a></li> \\n\";\n \n return $output;\n }", "title": "" }, { "docid": "4b1dc0e5eddc892666f6550bf2207ec7", "score": "0.7111416", "text": "function magazinevibe_edge_get_authors() {\n $vc_array = $authors = array();\n $vc_array[0] = \"All Authors\";\n $authors = get_users();\n foreach ($authors as $author) {\n $vc_array[$author->ID] = $author->display_name;\n }\n return $vc_array;\n }", "title": "" }, { "docid": "9abc4f4188dff85bd0acf66ab96e36a9", "score": "0.70683336", "text": "public function getAuthor();", "title": "" }, { "docid": "9abc4f4188dff85bd0acf66ab96e36a9", "score": "0.70683336", "text": "public function getAuthor();", "title": "" }, { "docid": "9abc4f4188dff85bd0acf66ab96e36a9", "score": "0.70683336", "text": "public function getAuthor();", "title": "" }, { "docid": "9abc4f4188dff85bd0acf66ab96e36a9", "score": "0.70683336", "text": "public function getAuthor();", "title": "" }, { "docid": "f71fd38ae931b8199e8deb54c4e4fe09", "score": "0.70365506", "text": "public function getAuthorname() {}", "title": "" }, { "docid": "c758fb9e01ee5c0a502f2a0eb3c9fdeb", "score": "0.7035984", "text": "protected function do_list_authors( $cond ) {\n\t\t$this->author_list = \"<contributors>\";\n\t\t// rev_deleted\n\n\t\t$res = $this->db->select(\n\t\t\t[ 'page', 'revision' ],\n\t\t\t[ 'DISTINCT rev_user_text', 'rev_user' ],\n\t\t\t[\n\t\t\t\t$this->db->bitAnd( 'rev_deleted', Revision::DELETED_USER ) . ' = 0',\n\t\t\t\t$cond,\n\t\t\t\t'page_id = rev_id',\n\t\t\t],\n\t\t\t__METHOD__\n\t\t);\n\n\t\tforeach ( $res as $row ) {\n\t\t\t$this->author_list .= \"<contributor>\" .\n\t\t\t\t\"<username>\" .\n\t\t\t\thtmlentities( $row->rev_user_text ) .\n\t\t\t\t\"</username>\" .\n\t\t\t\t\"<id>\" .\n\t\t\t\t$row->rev_user .\n\t\t\t\t\"</id>\" .\n\t\t\t\t\"</contributor>\";\n\t\t}\n\t\t$this->author_list .= \"</contributors>\";\n\t}", "title": "" }, { "docid": "148aaa1767785f5d90cc4224ce7dca57", "score": "0.7018257", "text": "public function index()\n {\n $author = new Author;\n // $data = $author->all();\n $data = $author->paginate(6);\n return view('manage.manageAuthor')->with(compact('data'));\n }", "title": "" }, { "docid": "bb10862cdc49d1e21d456027d60bdbbe", "score": "0.70094013", "text": "function zp_printMoreByAuthorsLinks() {\n\t$tags = zp_getAuthorTags('item');\n\tif(!empty($tags)) {\n\t\t$tagcount = getAllTagsCount();\n\t\t?>\n\t\t<hr />\n\t\t<h3 class=\"relateditems\">More by author:</h3>\n\t\t<ul class=\"morebyauthorlist\">\n\t\t<?php\n\t\tforeach($tags as $tag) {\n\t\t\t$count = $tagcount[$tag];\n\t\t\tif($count > 1) {\n\t\t\t\t?>\n\t\t\t\t<li><?php zp_printReadmoreOfAuthorLink($tag); ?> (<?php echo $count; ?>)</li>\n\t\t\t\t<?php\n\t\t\t} else {\n\t\t\t\t?>\n\t\t\t\t<li>Nothing else available by <?php echo ucwords(substr($tag,7)); ?></li>\n\t\t\t\t<?php\n\t\t\t}\n \t\t} \n \t\t?>\n \t\t</ul>\n \t\t<?php\n \t} \n}", "title": "" }, { "docid": "674e80f3afe2c0bd8ae15f487777f138", "score": "0.7003709", "text": "public function getAuthorName();", "title": "" }, { "docid": "34970edc56230334ceec78be21e56372", "score": "0.6976623", "text": "function selectAuthors()\n {\n global $serendipity;\n\n $users = (array)serendipity_fetchUsers();\n foreach ($users as $user) {\n if ($this->checkUser($user)) {\n $u[$user['authorid']] = $user['realname'];\n }\n }\n return $u;\n }", "title": "" }, { "docid": "d7c100053c0ee25317ff35aee48e4030", "score": "0.6949809", "text": "public function getAuthor() {}", "title": "" }, { "docid": "c463286a95b6d8aec9fd306c035b2e97", "score": "0.6928975", "text": "public function show(Author $author)\n {\n //\n }", "title": "" }, { "docid": "c463286a95b6d8aec9fd306c035b2e97", "score": "0.6928975", "text": "public function show(Author $author)\n {\n //\n }", "title": "" }, { "docid": "c463286a95b6d8aec9fd306c035b2e97", "score": "0.6928975", "text": "public function show(Author $author)\n {\n //\n }", "title": "" }, { "docid": "c463286a95b6d8aec9fd306c035b2e97", "score": "0.6928975", "text": "public function show(Author $author)\n {\n //\n }", "title": "" }, { "docid": "c463286a95b6d8aec9fd306c035b2e97", "score": "0.6928975", "text": "public function show(Author $author)\n {\n //\n }", "title": "" }, { "docid": "c463286a95b6d8aec9fd306c035b2e97", "score": "0.6928975", "text": "public function show(Author $author)\n {\n //\n }", "title": "" }, { "docid": "714ab12b358eaeccd1b00afc444f29ae", "score": "0.6919415", "text": "public static function getListAuthorsNames()\n {\n return ArrayHelper::map(self::find()->all(), 'author', 'author.username'); //return ArrayHelper::map(self::find()->joinWith('author')->all(), 'createdBy', 'author.username');\n }", "title": "" }, { "docid": "b36775e29cf636cbbca3b110850ee16c", "score": "0.6917182", "text": "public function indexByAuthor()\n {\n $books = Book::orderBy('author', 'asc')->paginate(50);\n\n return view('pages.books', compact('books'));\n\n }", "title": "" }, { "docid": "6a053f30cab05b5ae51aee0f98d60a53", "score": "0.6910766", "text": "private function wxr_authors_list() {\n\t\tglobal $wpdb;\n\n\t\t$authors = array();\n\t\t$results = $wpdb->get_results( \"SELECT DISTINCT post_author FROM $wpdb->posts WHERE post_status != 'auto-draft'\" );\n\t\tforeach ( (array) $results as $result )\n\t\t\t$authors[] = get_userdata( $result->post_author );\n\n\t\t$authors = array_filter( $authors );\n\n\t\t$wxr_authors = '';\n\n\t\tforeach ( $authors as $author ) {\n\t\t\t$wxr_authors .= \"\\t<wp:author>\";\n\t\t\t$wxr_authors .= '<wp:author_id>' . $author->ID . '</wp:author_id>';\n\t\t\t$wxr_authors .= '<wp:author_login>' . $author->user_login . '</wp:author_login>';\n\t\t\t$wxr_authors .= '<wp:author_email>' . $author->user_email . '</wp:author_email>';\n\t\t\t$wxr_authors .= '<wp:author_display_name>' . $this->wxr_cdata( $author->display_name ) . '</wp:author_display_name>';\n\t\t\t$wxr_authors .= '<wp:author_first_name>' . $this->wxr_cdata( $author->user_firstname ) . '</wp:author_first_name>';\n\t\t\t$wxr_authors .= '<wp:author_last_name>' . $this->wxr_cdata( $author->user_lastname ) . '</wp:author_last_name>';\n\t\t\t$wxr_authors .= \"</wp:author>\\n\";\n\t\t}\n\n\t\treturn $wxr_authors;\n\t}", "title": "" }, { "docid": "258832a9aec2a51913dc71ddd91258ac", "score": "0.688995", "text": "public function getAuthors();", "title": "" }, { "docid": "da7493081b3829d3475ce73638144de1", "score": "0.68488026", "text": "function twentyfourteen_list_authors() {\n\t$contributor_ids = get_users( array(\n\t\t'fields' => 'ID',\n\t\t'orderby' => 'post_count',\n\t\t'order' => 'DESC',\n\t\t'who' => 'authors',\n\t) );\n\n\tforeach ( $contributor_ids as $contributor_id ) :\n\t\t$post_count = count_user_posts( $contributor_id );\n\n\t\t// Move on if user has not published a post (yet).\n\t\tif ( ! $post_count ) {\n\t\t\tcontinue;\n\t\t}\n\t?>\n\n\t<div class=\"contributor\">\n\t\t<div class=\"contributor-info\">\n\t\t\t<div class=\"contributor-avatar\"><?php echo get_avatar( $contributor_id, 132 ); ?></div>\n\t\t\t<div class=\"contributor-summary\">\n\t\t\t\t<h2 class=\"contributor-name\"><?php echo get_the_author_meta( 'display_name', $contributor_id ); ?></h2>\n\t\t\t\t<p class=\"contributor-bio\">\n\t\t\t\t\t<?php echo get_the_author_meta( 'description', $contributor_id ); ?>\n\t\t\t\t</p>\n\t\t\t\t<a class=\"button contributor-posts-link\" href=\"<?php echo esc_url( get_author_posts_url( $contributor_id ) ); ?>\">\n\t\t\t\t\t<?php printf( _n( '%d Article', '%d Articles', $post_count, 'twentyfourteen' ), $post_count ); ?>\n\t\t\t\t</a>\n\t\t\t</div><!-- .contributor-summary -->\n\t\t</div><!-- .contributor-info -->\n\t</div><!-- .contributor -->\n\n\t<?php\n\tendforeach;\n}", "title": "" }, { "docid": "da7493081b3829d3475ce73638144de1", "score": "0.68488026", "text": "function twentyfourteen_list_authors() {\n\t$contributor_ids = get_users( array(\n\t\t'fields' => 'ID',\n\t\t'orderby' => 'post_count',\n\t\t'order' => 'DESC',\n\t\t'who' => 'authors',\n\t) );\n\n\tforeach ( $contributor_ids as $contributor_id ) :\n\t\t$post_count = count_user_posts( $contributor_id );\n\n\t\t// Move on if user has not published a post (yet).\n\t\tif ( ! $post_count ) {\n\t\t\tcontinue;\n\t\t}\n\t?>\n\n\t<div class=\"contributor\">\n\t\t<div class=\"contributor-info\">\n\t\t\t<div class=\"contributor-avatar\"><?php echo get_avatar( $contributor_id, 132 ); ?></div>\n\t\t\t<div class=\"contributor-summary\">\n\t\t\t\t<h2 class=\"contributor-name\"><?php echo get_the_author_meta( 'display_name', $contributor_id ); ?></h2>\n\t\t\t\t<p class=\"contributor-bio\">\n\t\t\t\t\t<?php echo get_the_author_meta( 'description', $contributor_id ); ?>\n\t\t\t\t</p>\n\t\t\t\t<a class=\"button contributor-posts-link\" href=\"<?php echo esc_url( get_author_posts_url( $contributor_id ) ); ?>\">\n\t\t\t\t\t<?php printf( _n( '%d Article', '%d Articles', $post_count, 'twentyfourteen' ), $post_count ); ?>\n\t\t\t\t</a>\n\t\t\t</div><!-- .contributor-summary -->\n\t\t</div><!-- .contributor-info -->\n\t</div><!-- .contributor -->\n\n\t<?php\n\tendforeach;\n}", "title": "" }, { "docid": "502f6c213775f0994a37e42145231196", "score": "0.68483573", "text": "public function authors($char = 'A') {\n\n\t\t$this->session->set_userdata('referred_from', uri_string());\n\t\t$t = array\n\t\t\t(\n\t\t\t\t'title' \t=> $this->lang->line('database_authors'),\n\t\t\t\t'h1' \t\t=> $this->lang->line('database_authors'),\n\t\t\t\t'authors' \t=> $this->database_model->get_authors($char)\n\t\t\t);\n\t\t$this->layout->blok('database/show_authors', 'content', $t);\n\t\t$this->layout->make('theme');\n\t}", "title": "" }, { "docid": "c9ba199ced483b0f426e0a6e32578e3c", "score": "0.6830908", "text": "function get_editable_authors($user_id)\n{\n}", "title": "" }, { "docid": "87bfc9d48ad8a166f7462f55172a92b8", "score": "0.68288034", "text": "public function getAuthors(){\n\t \n\t $q = new SmartestManyToManyQuery('SM_MTMLOOKUP_PAGE_AUTHORS');\n\t $q->setTargetEntityByIndex(1);\n\t $q->addQualifyingEntityByIndex(2, $this->_properties['id']);\n\t \n\t $q->addSortField('Users.user_lastname');\n\t \n\t $result = $q->retrieve();\n\t \n\t return $result;\n\t \n\t}", "title": "" }, { "docid": "565152bc07fe75f93885e877e1853f73", "score": "0.6817245", "text": "public function show_addedby( $author, $type = 'list' ) {\r\n\t\tif ( CTDL_Loader::$settings['list_view'] == 1 && CTDL_Loader::$settings['todo_author'] == 0 ) {\r\n\t\t\tif ( $author != '0' ) {\r\n\t\t\t\t$this->list .= ' <small class=\"todo-addedby\">- '.apply_filters( 'ctdl_added_by', esc_html__( 'Added By', 'cleverness-to-do-list' ) ).': '.esc_attr( $author ).'</small>';\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "c073cd66b45df32c80fdcf899acbce5e", "score": "0.68130803", "text": "public function index_author_submitted()\n {\n $papers = Paper::where('user_id', auth()->id())->get();\n $type = config('appConstants.titles.author_all');\n return view(\n 'papers.index',\n compact('papers', 'type')\n );\n }", "title": "" }, { "docid": "f344a71b3b4b17221bd29333b710eba2", "score": "0.6794542", "text": "public function allAuthors()\n {\n // fetch settings\n $setting=Helper::settings();\n\n // fetch header category\n $headCategories =Helper::headerCategories(5);\n\n // fetch footer category\n $footerCategories=Helper::footerCategories(50);\n\n // fetch all Authors\n $allAuthors=Helper::allAuthors('','name','asc');\n\n return view('front.all-authors')\n ->with('headCategories',$headCategories)\n ->with('footerCategories',$footerCategories)\n ->with('authors',$allAuthors);\n }", "title": "" }, { "docid": "e44538e7d23cdf740b412dcc0e21f65d", "score": "0.679356", "text": "public function index()\n {\n $authors = Author::select()->get();\n return view('admin.author.list', ['authors' => $authors]);\n }", "title": "" }, { "docid": "8233d49948679b5fbde589efb0d50f66", "score": "0.67867416", "text": "function index()\n\t{\n \t$aRes = $this->Author->find();\n\t\tpr($aRes);\n\t\texit();\n }", "title": "" }, { "docid": "908729c1ec9ef3917eb9c62dc4c470fa", "score": "0.6774602", "text": "public function index()\n {\n $authors=Author::all()->sortBy('name');\n return view('admin.authors.index',compact('authors'));\n }", "title": "" }, { "docid": "b6231c6a56e710ce66def70432d5b423", "score": "0.6769243", "text": "public function authors()\n {\n Log::error(\"get authors not implemented\");\n }", "title": "" }, { "docid": "44a10e1437426401a8f46e9c4a55648e", "score": "0.67686903", "text": "public function author(){\n\t\t$this->render('themeAuthor', array(), array());\n\t}", "title": "" }, { "docid": "10d11e9eb6b3cbfd44d69af1ba4bc042", "score": "0.67656726", "text": "public static function get_authors() {\n\t\t$users = get_users( [\n\t\t\t'who' => 'authors',\n\t\t\t'has_published_posts' => true,\n\t\t\t'fields' => [\n\t\t\t\t'ID',\n\t\t\t\t'display_name',\n\t\t\t],\n\t\t] );\n\n\t\tif ( ! empty( $users ) ) {\n\t\t\treturn wp_list_pluck( $users, 'display_name', 'ID' );\n\t\t}\n\t}", "title": "" }, { "docid": "3ddefff1ef9d0bb50c7b3bde3a85ae10", "score": "0.6764962", "text": "function magazinebook_posted_by() {\n\t\tif ( ! get_theme_mod( 'magazinebook_hide_post_author', false ) ) {\n\t\t\techo '<span class=\"byline\">';\n\t\t\techo '<i class=\"far fa-user-circle\"></i>';\n\t\t\techo '<span class=\"author vcard\"><a class=\"url fn n\" href=\"' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '\">' . esc_html( get_the_author() ) . '</a></span>';\n\t\t\techo '</span>';\n\t\t}\n\t}", "title": "" }, { "docid": "332f447dda9da0e88e1f1f77a7d46d58", "score": "0.6752393", "text": "public function get_author()\n {\n return 'Kamen / Naveen / Chris';\n }", "title": "" }, { "docid": "eddf76bb5251d11c9f5e58a47356a92e", "score": "0.6740967", "text": "function build_author_sidebar()\n\t{\n\t\tif ( ! $this->cp->allowed_group('can_access_content'))\n\t\t{\n\t\t\tshow_error($this->lang->line('unauthorized_access'));\n\t\t}\n\t\t\n\t\t$this->output->enable_profiler(FALSE);\n\n\t\tif ($this->input->get_post('author_id') == \"\")\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$this->load->model('member_model');\n\n\t\t// set the user to in_authorlist = \"y\"\n\t\t$this->member_model->update_authorlist($this->input->get_post('author_id'));\n\n\t\t// gather up info so we can return their data intelligently\n\t\t$member = $this->member_model->get_member_data($this->input->get_post('author_id'));\n\t\t$member = $member->row();\n\t\techo '<li><a href=\"'.BASE.AMP.'C=myaccount'.AMP.'id=' . $member->member_id.'\">' . $member->screen_name . '</a> <a onclick=\"removeAuthor($(this)); return false;\" href=\"#\" class=\"delete\" id=\"mid'.$member->member_id.'\"><img src=\"' . $this->cp->cp_theme_url . 'images/content_custom_tab_delete.png\" alt=\"Delete\" width=\"19\" height=\"18\" /></a></li>';\n\t}", "title": "" }, { "docid": "8cf92d02115858eb985b406fe1e0ada6", "score": "0.671946", "text": "function author(){\n \n $this->View->add('layout_header_title', sprintf(__(\"Posts by %s \"), get_query_var('author_name'))); \n }", "title": "" }, { "docid": "9c9f0ddd9f8a92b07025e39ad21c0aac", "score": "0.67187166", "text": "function show_authors($authors, $pagesize) {\r\n global $db;\r\n\r\n echo \"<h1>Search results</h1>\\n\";\r\n if(!$authors) {\r\n echo \"<p>Sorry, no authors found.</p>\\n\";\r\n return; }\r\n\r\n // build comma-separated string with authIDs\r\n $items = min($pagesize, sizeof($authors));\r\n for($i=0; $i<$items; $i++)\r\n if($i==0)\r\n $authIDs = $authors[$i]->authID;\r\n else\r\n $authIDs .= \",\" . $authors[$i]->authID;\r\n\r\n // get all titles these authors have written\r\n $sql = \"SELECT title, rel_title_author.titleID, authID \" .\r\n \"FROM titles, rel_title_author \".\r\n \"WHERE titles.titleID = rel_title_author.titleID \" .\r\n \"AND rel_title_author.authID IN ($authIDs) \" .\r\n \"ORDER BY title\";\r\n $rows = $db->queryObjectArray($sql);\r\n\r\n // process all authors, show all titles for each author\r\n echo '<table class=\"resulttable\">', \"\\n\";\r\n for($i=0; $i<$items; $i++) {\r\n echo td1(\"Author:\", \"td1head\"),\r\n td2($authors[$i]->authName, \"td2head\");\r\n $titles=0;\r\n foreach($rows as $row)\r\n if($authors[$i]->authID == $row->authID) {\r\n if($titles==0)\r\n echo td1(\"Titles[s]:\");\r\n else\r\n echo td1(\"\");\r\n echo td2url($row->title, \"find.php?titleID=$row->titleID\");\r\n $titles++;\r\n }\r\n // show empty line before next title\r\n echo td1(\"\", \"tdinvisible\"), td2asis(\"&nbsp;\", \"tdinvisible\");\r\n }\r\n echo \"</table>\\n\";\r\n}", "title": "" }, { "docid": "f5bfc2d4dea4fb7dd3af9dbb76736fe1", "score": "0.67049587", "text": "public function index()\n {\n $user = auth()->user();\n $authors = Author::all()->where('team_id', '=', $user->currentTeam->id);\n return view('authors.index', ['authors'=>$authors]);\n }", "title": "" }, { "docid": "fd27ed568f629272c173547d1e91d8b2", "score": "0.67026764", "text": "public function Get_By_Authors()\n {\n\n $users = $this->Get(\"WHERE `is_admin`=2\");\n if(count($users) > 0)\n {\n return $users;\n }\n return FALSE;\n }", "title": "" }, { "docid": "eca0e9c0681eaff290bab0948ed34f31", "score": "0.6679159", "text": "public function author($id = NULL) {\n\n\t\t$this->session->set_userdata('referred_from', uri_string());\n\t\tif ($id == NULL)\n\t\t{\n\t\t\tredirect('database/authors', 'refresh');\n\t\t}\n\t\t$author = $this->database_model->get_author($id);\n\t\tforeach ($author as $value)\n\t\t{\n\t\t\t$t = array\n\t\t\t(\n\t\t\t\t'author_name' \t\t\t=> $value->author_name,\n\t\t\t\t'title' \t\t\t\t=> $value->author_name,\n\t\t\t\t'author_description' \t=> $value->author_description,\n\t\t\t);\n\t\t}\n\n\t\t$this->layout->blok('database/show_author', 'content', $t);\n\t\t$this->layout->make('theme');\n\t}", "title": "" }, { "docid": "b82f96449a679fe5cd906a161f78a554", "score": "0.66752106", "text": "function getAuthor()\n {\n return 'Eoin Dubsky | Shane Saunders | Jean-Christophe Berthon | Kai Greve';\n }", "title": "" }, { "docid": "0506b934b1d4894037d5dbc44e014bf7", "score": "0.6673444", "text": "function vira_discussion_avatars_list($comment_authors)\n {\n if (empty($comment_authors)) {\n return;\n }\n echo '<ol class=\"discussion-avatar-list\">', \"\\n\";\n foreach ($comment_authors as $id_or_email) {\n printf(\n \"<li>%s</li>\\n\",\n vira_get_user_avatar_markup($id_or_email)\n );\n }\n echo '</ol><!-- .discussion-avatar-list -->', \"\\n\";\n }", "title": "" }, { "docid": "c3a54f718412866a26ead83ea063bb12", "score": "0.6663157", "text": "public function index()\n {\n $authors = Author::orderBy('id', 'ASC')->paginate(10);\n return view('Backend.Modules.Article.Author.index', compact('authors'));\n }", "title": "" }, { "docid": "708f6dbc1fdea9e458f6d3cc1c850dd7", "score": "0.6660863", "text": "public function authorsAction()\n {\n $view = $this->app->renderView('page/authors.html.twig');\n\n return new Response($view);\n }", "title": "" }, { "docid": "662a1112f36d9986e74ec3bc2168356a", "score": "0.66577667", "text": "public function base_authorInfo_handler($sender, $args) {\n //echo ' '.wrapIf(htmlspecialchars(val('Department', $Args['Author'])), 'span', array('class' => 'MItem AuthorDepartment'));\n //echo ' '.wrapIf(htmlspecialchars(val('Organization', $Args['Author'])), 'span', array('class' => 'MItem AuthorOrganization'));\n }", "title": "" }, { "docid": "304f1c0652aeaa53228dc8275e343cb8", "score": "0.66412586", "text": "public function authorName() : string{\n\t\treturn $this->user_name;\n\t}", "title": "" }, { "docid": "b9a9351f9b97e4c87990fb431a6a1e7f", "score": "0.66346186", "text": "function parse_authorname() { global $member;\n echo $member->getDisplayName();\n }", "title": "" }, { "docid": "280e511bb8eba09491062ed5a70cbe17", "score": "0.6632196", "text": "function GetAuthor()\n\t{\n\t\treturn '';\n\t}", "title": "" }, { "docid": "e6944879698b48a1b877b09a77526c56", "score": "0.6629589", "text": "static function display_meta_author($author='Teia - Web Development') {\n\t\techo '<meta name=\"author\" content=\"' . $author. '\" />\\n';\n\t}", "title": "" }, { "docid": "3e95664c1388594297d2355c2ee6d746", "score": "0.6628976", "text": "public function getAuthorName()\n {\n return $this->user->username;\n }", "title": "" }, { "docid": "614e5e1a1b5dfeff29d1fddaae7c9160", "score": "0.6627367", "text": "public function actionIndex()\n {\n $searchModel = new AuthorSearch();\n $dataProvider = $searchModel->search($this->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "49c1cff68c5e81363185fe8962e19b76", "score": "0.66226393", "text": "public function randomAuthorAction()\n {\n //$authorsList = $this->authorsRepository->findAll();\n $authorsList = $this->authorsRepository->findByUidList($this->settings['randomAuthor']['authorUidList']);\n $this->view->assign('author', $authorsList[rand(0, count($authorsList) - 1)]);\n }", "title": "" }, { "docid": "d46fb9edd47ed91b020e6d71bb687276", "score": "0.66192675", "text": "function capezzahill_discussion_avatars_list( $comment_authors ) {\r\n if ( empty( $comment_authors ) ) {\r\n return;\r\n }\r\n echo '<ol class=\"discussion-avatar-list\">', \"\\n\";\r\n foreach ( $comment_authors as $id_or_email ) {\r\n printf(\r\n \"<li>%s</li>\\n\",\r\n capezzahill_get_user_avatar_markup( $id_or_email )\r\n );\r\n }\r\n echo '</ol><!-- .discussion-avatar-list -->', \"\\n\";\r\n }", "title": "" }, { "docid": "5521b153d10d3a0ec0342e1176746c5e", "score": "0.6614194", "text": "public function index()\n {\n $authors = QueryBuilder::for(Author::class)\n ->allowedFilters([\n 'first_name',\n 'last_name'\n ])\n ->allowedSorts('created_at')\n ->allowedIncludes([\n 'news'\n ])\n ->paginate()\n ->appends(request()->query());\n\n return AuthorResource::collection($authors);\n }", "title": "" }, { "docid": "91f1bf42b4d9ad4636deda95a9a71d02", "score": "0.66120183", "text": "public static function get_author(){\n $author = DB::table('authors')->paginate(6);\n $author = $author->load('books');\n return $author;//array('list_author'=>$list_author,'list_book_author'=>$list_book_author);\n\n }", "title": "" }, { "docid": "d89867a60ba15fed734e46000a36620d", "score": "0.6600556", "text": "static function listAction() {\n // Get user files\n $users = self::getUsers();\n\n // Display user ids\n echo '<ul>';\n\n foreach ($users as $user) {\n echo '<li><a href=\"/users/' . $user->USR . '\">' . $user->NAME . ' (' . $user->USR . ')</a></li>';\n }\n\n echo '</ul>';\n }", "title": "" }, { "docid": "b94c4eb277abaf8d0786440ee39d3276", "score": "0.66001886", "text": "public function getAuthorName()\n {\n return $this->author_name;\n }", "title": "" }, { "docid": "ad11f037cae1a7ad532922e3ac27eacd", "score": "0.65983677", "text": "function goAuthor() {\n // value simgo author\n $value = simgo::AUTHOR;\n\n // Return value\n return go($value);\n }", "title": "" }, { "docid": "c303579e24c91994329ff140cc27fbd4", "score": "0.65836865", "text": "public function index()\n { \n $items = $this->item_repo->index(5);\n\n $links = $items->render();\n \n return view('author.index', compact('items', 'links'));\n }", "title": "" }, { "docid": "ce15e8fe6ff16d3fbb5a0ac0fe8ac582", "score": "0.6579604", "text": "public function show_addedby( $author, $layout = 'list' ) {\r\n\t\tif ( CTDL_Loader::$settings['list_view'] == 1 && CTDL_Loader::$settings['todo_author'] == 0 ) {\r\n\t\t\tif ( $author != '0' ) {\r\n\t\t\t\tif ( $layout == 'table' ) {\r\n\t\t\t\t\t$this->list .= '<td class=\"todo-addedby\">'.esc_attr( $author ).'</td>';\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->list .= ' - '.apply_filters( 'ctdl_added_by', esc_html__( 'Added By', 'cleverness-to-do-list' ) ).': '.esc_attr( $author );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif ( $layout == 'table' ) $this->list .= '<td class=\"todo-addedby\"></td>';\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "80c61314711fb7d04ea2bfe697bda9a8", "score": "0.6568012", "text": "public static function listUserAction(){\n\t\ttry{\n\t\t\t$display = new BlogDisplay(User::findAll());\n\t\t\t$display->displayPage('listUsers');\n\t\t}catch(Exception $e){\n\t\t\t$error = 'Erreur lors de la récupération des utilisateurs';\n\t\t\t$display = new Display($error);\n\t\t\t$display->displayPage('error');\n\t\t}\n\t}", "title": "" }, { "docid": "7d6b914aa071b6e8849d328a724d7dee", "score": "0.6566348", "text": "function get_author_user_ids()\n{\n}", "title": "" }, { "docid": "843148129124298146148b434ea8fd8e", "score": "0.6562805", "text": "public function popularAuthors()\n {\n // fetch settings\n $setting=Helper::settings();\n\n // fetch header category\n $headCategories =Helper::headerCategories(5);\n\n // fetch footer category\n $footerCategories=Helper::footerCategories(50);\n\n // fetch popular Authors\n $popularAuthors=Helper::popularAuthors('','name','asc');\n\n return view('front.popular-authors')\n ->with('headCategories',$headCategories)\n ->with('footerCategories',$footerCategories)\n ->with('setting',$setting)\n ->with('authors',$popularAuthors);\n }", "title": "" }, { "docid": "c03279a0114d5f2479b4e96348f04832", "score": "0.6560362", "text": "function index()\n\t{\n\t\t$data=$this->Author->find('list', ['fields'=>['id','name','first'],'order'=>['first','name']]);\n $this->set('data',$data);\n $this->set('nist',Configure::read('url.base'));\n\t}", "title": "" }, { "docid": "72e6fd05ffb42980ceb1ef8eb9910eba", "score": "0.65511626", "text": "function author_name()\r\r\n\t{\r\r\n\t\t//loading resources\r\r\n\t\t$user =& $this->getOneToOne('juser');\r\r\n\t\t\r\r\n \treturn $user->name();\r\r\n\t}", "title": "" }, { "docid": "885eda80cbd0def66a6ae0ec785c1fc6", "score": "0.65472156", "text": "function smd_ebook_fld_list_author($name, $val = '')\n{\n $cfs = getCustomFields();\n $cfs['Title'] = gTxt('title');\n $cfs['Excerpt_html'] = gTxt('excerpt');\n $cfs['AuthorID'] = gTxt('author');\n $cfs['SMD_FIXED'] = gTxt('smd_ebook_fixed');\n\n return selectInput($name, $cfs, $val, true, '', $name);\n}", "title": "" }, { "docid": "a9faa70105095dda32b1de330655bf48", "score": "0.65454686", "text": "function vira_posted_by()\n {\n printf(\n /* translators: 1: SVG icon. 2: Post author, only visible to screen readers. 3: Author link. */\n '<span class=\"byline\">%1$s<span class=\"screen-reader-text\">%2$s</span><span class=\"author vcard\"><a class=\"url fn n\" href=\"%3$s\">%4$s</a></span></span>',\n vira_get_icon_svg('person', 16),\n __('Posted by', 'twentynineteen'),\n esc_url(get_author_posts_url(get_the_author_meta('ID'))),\n esc_html(get_the_author())\n );\n }", "title": "" }, { "docid": "03acec530f6fa5575a836e8c701eecbf", "score": "0.6544374", "text": "public function single_author_html() {\n\t\t\tif($this->get_option($this->prefix.'_show_author', 'on') != 'off') {\n\t\t\t\tget_template_part('templates/author','box');\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "784fa9b934e25c093db21dfb70b56ed7", "score": "0.6531635", "text": "public function index()\n {\n\n $Authors = Autor::offset(0)->orderBy('created_at','DESC')->limit(15)->get();\n\n\t\t return view('authors',[\n 'author' => $Authors\n ]);\n\n }", "title": "" }, { "docid": "b00ff9f407b9d409aa8eea47da2065e6", "score": "0.65259755", "text": "public function index()\n {\n // get the fucking authors! (well, the first 20 anyway)\n $authors = Author::orderBy('name', 'asc')->limit(20)->get();\n Return view('authors/index', compact('authors'));\n }", "title": "" }, { "docid": "34ce30e7722141eee86b2be094be14ad", "score": "0.652503", "text": "function lesintegristes_get_author_link($author_id, $opts = array()) {\n\n if (!isset($opts[\"before\"])) $opts[\"before\"] = \"\";\n if (!isset($opts[\"after\"])) $opts[\"after\"] = \"\";\n\n $author = get_userdata($author_id);\n\n return '<a href=\"'. get_bloginfo('url') .'/author/'. $author->user_nicename .'/\" title=\"Articles par '.$author->display_name.'\">'. $opts[\"before\"] . $author->display_name . $opts[\"after\"] . '</a>';\n}", "title": "" }, { "docid": "27f96e1f623f1240a5b3c66b86b76c41", "score": "0.651812", "text": "public function get_author()\n {\n return 'Chris Graham';\n }", "title": "" }, { "docid": "27f96e1f623f1240a5b3c66b86b76c41", "score": "0.651812", "text": "public function get_author()\n {\n return 'Chris Graham';\n }", "title": "" }, { "docid": "27f96e1f623f1240a5b3c66b86b76c41", "score": "0.651812", "text": "public function get_author()\n {\n return 'Chris Graham';\n }", "title": "" }, { "docid": "27f96e1f623f1240a5b3c66b86b76c41", "score": "0.651812", "text": "public function get_author()\n {\n return 'Chris Graham';\n }", "title": "" }, { "docid": "6f90e72bc4f435ab854c0ca4b8d9eb28", "score": "0.6512807", "text": "public function index()\n {\n $authors= Author::all();\n\n return view(\"author.index\", [\"authors\" =>$authors]);\n }", "title": "" }, { "docid": "9207de98cd8931caae11ceec02212f6f", "score": "0.6506453", "text": "public function user_list(){\n\t\t$view = $this->getView('usersearch', 'html');\n\t\t$view->assign('action', 'list');\n\t\t$view->display();\n\t}", "title": "" }, { "docid": "3c49689e38578b8ba60a49d485c4a48d", "score": "0.6496857", "text": "function alienship_do_post_author() {\n\n\t// Return early if theme options are set to hide author\n\tif ( ! of_get_option('alienship_post_author', 1 ) )\n\t\treturn;\n\n\tprintf( __( '<span class=\"byline\"><i class=\"glyphicon glyphicon-user\"></i> <span class=\"author vcard\"><a class=\"url fn n\" href=\"%1$s\" title=\"%2$s\" rel=\"author\">%3$s</a></span></span>', 'alienship' ),\n\t\tesc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\n\t\tesc_attr( sprintf( __( 'View all posts by %s', 'alienship' ), get_the_author() ) ),\n\t\tesc_html( get_the_author() )\n\t);\n}", "title": "" }, { "docid": "2f32661104bbfe0d7ad3f0c73cea83db", "score": "0.6482964", "text": "public function index()\n {\n $books=Book::all();\n $authors= Author::paginate(10);\n //admin/users/index.blade.php\n return view('admin.authors.index', compact('authors','books'));\n }", "title": "" }, { "docid": "0aaf2e86c603b7b13027d84fc55f9ef3", "score": "0.6482772", "text": "private function getAuthors(){\n\t\t$authorIDs = $this->getField('listAuthorsOfPad');\n\t\t$authors = array();\n\t\tforeach($authorIDs as $current){\n\t\t\t$author = $this->getAuthor($current);\n\t\t\t$author = null === $author? 'Arno Nym' : $author;\n\t\t\t$authors[] = $author;\n\t\t}\n\t\t$authors = array_unique($authors);\n\t\tsort($authors);\n\t\t$this->authors = $authors;\n\t}", "title": "" }, { "docid": "2af0a9a934893f53ad20a2f3eefbdbe4", "score": "0.6478254", "text": "function ktf2021_posted_by() {\n\t\t$byline = sprintf(\n\t\t\t/* translators: %s: post author. */\n\t\t\tesc_html_x( '%s', 'post author', 'ktf2021' ),\n\t\t\t'<span class=\"author vcard\">' . esc_html( get_the_author() ) . '</span>'\n\t\t);\n\n\t\techo '<span class=\"byline\"><i class=\"fas fa-user\"></i>' . $byline . '</span>'; // WPCS: XSS OK.\n\n\t}", "title": "" }, { "docid": "fbd145a78666c8b35aa50c8b8cdce87f", "score": "0.6472639", "text": "function getAuthor () {\n\t\treturn Tgx_User::getInstance()->getUserById ($this->authorId, true);\n\t}", "title": "" }, { "docid": "5193e0244ce61d300a85f112c483959f", "score": "0.6466715", "text": "public function getAuthorName()\n {\n return $this->author_name;\n }", "title": "" }, { "docid": "5193e0244ce61d300a85f112c483959f", "score": "0.6466715", "text": "public function getAuthorName()\n {\n return $this->author_name;\n }", "title": "" }, { "docid": "5193e0244ce61d300a85f112c483959f", "score": "0.6466715", "text": "public function getAuthorName()\n {\n return $this->author_name;\n }", "title": "" }, { "docid": "ccbea231bd6a7a74e5c0f93a18d518d2", "score": "0.6464459", "text": "public function listing()\n {\n // solo permite mostrar listado de usuarios al administrador\n if (!$this->isAdmin())\n $this->redirect();\n\n $users = \\models\\User::findBy(null);\n\n $this->view->assign(\"list\", $users);\n $this->view->render(\"user_list\");\n }", "title": "" }, { "docid": "722baf958359f9509fa35e62d564ac63", "score": "0.64607555", "text": "private function author()\n {\n $authors = array(\n '&nbsp;' => '',\n $this->lang->get(\"Calculation.Form.author.cd\") => 'cd',\n $this->lang->get(\"Calculation.Form.author.khe\") => 'khe',\n $this->lang->get(\"Calculation.Form.author.gk\") => 'gk',\n $this->lang->get(\"Calculation.Form.author.ts\") => 'ts',\n $this->lang->get(\"Calculation.Form.author.pt\") => 'pt',\n $this->lang->get(\"Calculation.Form.author.bz\") => 'bz'\n );\n\n $out = \"\\t\\t\" . '<div id=\"authors\">' . \"\\n\";\n $out .= \"\\t\\t \" . '<label for=\"author\">' . $this->lang->get(\"Calculation.Form.author\") . '</label>' . \"\\n\";\n $out .= \"\\t\\t\\t\" . $this->selectbox(\"author\", \"\", \"author\", $authors, $this->author);\n $out .= \"\\t\\t\" . '</div><!-- #authors -->' . \"\\n\\n\";\n\n return $out;\n }", "title": "" }, { "docid": "c5f80d5b6ea226fce7ff6fb03000a785", "score": "0.6458563", "text": "function show_user_list()\n\t{\n\t\tglobal $db_type;\n\t\tif($db_type == 'mysql')\n\t\t{\n\t\t\t$query = \"SELECT * FROM users LIMIT $this->strt,$this->lim\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query = \"SELECT * FROM users LIMIT $this->strt OFFSET $this->lim\";\n\t\t}\n\t\t$result = db_query($query);\n\t\tdb_error_log();\n\n\t\n\t\t$count = db_num_rows($result);\n\t\t\n\t\tif($count == 0)\n\t\t{\n\t\t\techo '<tr><td colspan=2>Nothing to show</td></tr>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor($i=0 ; $i < $count ; $i++)\n\t\t\t{\n\n\t\t\t\t$row = db_fetch_array($result);\n\t\t\t\t$url =\"userdetails.php?userId=$row[0]&name=\". urlencode($row[2]);\n\t\t\t\tprintf('<tr><td bgcolor=\"#CCCCCC\">\n\t\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"userId[]\" value=\"%s\"></td>\n\t\t\t\t\t\t\t<td bgcolor=\"#EFEFEF\"><nobr>\n\t\t\t\t\t\t\t\t<a href=\"%s\" class=\"Category\" target=\"right\">%s</a></nobr></td></tr>',\n\t\t\t\t\t\t$row[0],$url,$row[2]);\n\t\t\t}\n\t\t\tif($count == $this->lim)\n\t\t\t{\n\t\t\t\t$this->more =1;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "701976fee18cc3b85c2b2cb729fee5d7", "score": "0.64582133", "text": "public function display_list(){\r\n\t\t\r\n\t\t$collection = new User_Collection();\r\n\t\t$variables = array(\r\n\t\t\t'collection' => $collection->getPaginated(),\r\n\t\t\t'pagination' => $collection->getPagination(),\r\n\t\t\t'sorters' => $collection->getSortableLinks(),\r\n\t\t);\r\n\t\t\r\n\t\tBackendLayout::get()\r\n\t\t\t->prependTitle('Список пользователей')\r\n\t\t\t->setLinkTags($collection->getLinkTags())\r\n\t\t\t->setContentPhpFile(self::TPL_PATH.'admin_list.php', $variables)\r\n\t\t\t->render();\r\n\t}", "title": "" }, { "docid": "1e1c77aced33051342da2fd639d48a66", "score": "0.64577854", "text": "public function get_author_permastruct()\n {\n }", "title": "" }, { "docid": "ad6c3d44f7eee33a65d2003108a1af9e", "score": "0.6456943", "text": "public function getAuthor(){\n return $this->author->last_name.' '.$this->author->first_name;\n }", "title": "" } ]
733583149822419584c148fea7f76845
Permite marcar una actividad
[ { "docid": "9b8365cf470e2cf4851e8c457583c9e9", "score": "0.51706064", "text": "public function seguirActividad($actividad)\r\n {\r\n parent::conectar();\r\n // Verificamos que no sea un hack\r\n $actividad = parent::salvar($actividad);\r\n\r\n\r\n switch ($actividad) {\r\n case 'actividad1':\r\n $actividad = 'Proyectos innovadores';\r\n $verificar = parent::verificarRegistros('select id from brain where descripcion=\"'.$actividad.'\" and usuario_id=\"'.$_SESSION['id'].'\"');\r\n if($verificar > 0){\r\n echo 'error_1';\r\n }else{\r\n parent::query('insert into brain(descripcion, usuario_id) values(\"'.$actividad.'\", \"'.$_SESSION['id'].'\")');\r\n $this->getBrains();\r\n }\r\n break;\r\n\r\n case 'actividad2':\r\n $actividad = 'Mentoring';\r\n $verificar = parent::verificarRegistros('select id from brain where descripcion=\"'.$actividad.'\" and usuario_id=\"'.$_SESSION['id'].'\"');\r\n if($verificar > 0){\r\n echo 'error_1';\r\n }else{\r\n parent::query('insert into brain(descripcion, usuario_id) values(\"'.$actividad.'\", \"'.$_SESSION['id'].'\")');\r\n $this->getBrains();\r\n }\r\n break;\r\n\r\n case 'actividad3':\r\n $actividad = 'Asesoramiento';\r\n $verificar = parent::verificarRegistros('select id from brain where descripcion=\"'.$actividad.'\" and usuario_id=\"'.$_SESSION['id'].'\"');\r\n if($verificar > 0){\r\n echo 'error_1';\r\n }else{\r\n parent::query('insert into brain(descripcion, usuario_id) values(\"'.$actividad.'\", \"'.$_SESSION['id'].'\")');\r\n $this->getBrains();\r\n }\r\n break;\r\n\r\n case 'actividad4':\r\n $actividad = 'Formaci&oacute;n';\r\n $verificar = parent::verificarRegistros('select id from brain where descripcion=\"'.$actividad.'\" and usuario_id=\"'.$_SESSION['id'].'\"');\r\n if($verificar > 0){\r\n echo 'error_1';\r\n }else{\r\n parent::query('insert into brain(descripcion, usuario_id) values(\"'.$actividad.'\", \"'.$_SESSION['id'].'\")');\r\n $this->getBrains();\r\n }\r\n break;\r\n\r\n case 'actividad5':\r\n $actividad = 'Contenidos';\r\n $verificar = parent::verificarRegistros('select id from brain where descripcion=\"'.$actividad.'\" and usuario_id=\"'.$_SESSION['id'].'\"');\r\n if($verificar > 0){\r\n echo 'error_1';\r\n }else{\r\n parent::query('insert into brain(descripcion, usuario_id) values(\"'.$actividad.'\", \"'.$_SESSION['id'].'\")');\r\n $this->getBrains();\r\n }\r\n break;\r\n\r\n default:\r\n # code...\r\n break;\r\n }\r\n\r\n parent::cerrar();\r\n }", "title": "" } ]
[ { "docid": "7f29a6630a5434b67cb1ef8a10c0981b", "score": "0.60914904", "text": "function Activar(){\r\n\r\n}", "title": "" }, { "docid": "4d0e5cffe65143bbb3933d7a6ebf3ac0", "score": "0.603392", "text": "public function activar()\n {\n $this->estatus = 1;\n $this->save();\n }", "title": "" }, { "docid": "f1b2332f4c35a1acc0a51c20ac14c261", "score": "0.5804166", "text": "public function agregarAction(){\n\t\t\t\t\t\n }", "title": "" }, { "docid": "14fe05ffab2009ab6f88efb160ef2ddf", "score": "0.57995987", "text": "public function activate(){return;}", "title": "" }, { "docid": "36e0bbc6688547ad45aebaa9b38595d0", "score": "0.5770383", "text": "function Articulo_Autor(){\n parent::Modelo();\n }", "title": "" }, { "docid": "05bfbea9937cb89f145f85210cd2b93d", "score": "0.5756238", "text": "public function activate() {\r\n\t}", "title": "" }, { "docid": "cf691413dd693fde056b75c9ed45ca6a", "score": "0.5754152", "text": "public function activate();", "title": "" }, { "docid": "cf691413dd693fde056b75c9ed45ca6a", "score": "0.5754152", "text": "public function activate();", "title": "" }, { "docid": "eb679be1d5b96b7df3144b21e00484c8", "score": "0.57366645", "text": "public function activar() {\n $this->activo = '1';\n return $this->update();\n }", "title": "" }, { "docid": "8c37a6ed9a42f72221468b998f5534f7", "score": "0.5700838", "text": "public function activate() {\n\n }", "title": "" }, { "docid": "f0d97238dee7c56f5bc7abf4926d72ee", "score": "0.56782866", "text": "public function ejecutarCompra(){\r\n }", "title": "" }, { "docid": "c9d1d2544fd9621ab5e6efcc67d8510f", "score": "0.5642406", "text": "public function activate(): void\n {\n }", "title": "" }, { "docid": "44f050a5628abae0cd5a5b9c240363a7", "score": "0.5636986", "text": "public function executeActividad()\n {\n $this->metapd = MetaPdPeer::retrieveByPK($this->getRequestParameter('meta'));\n }", "title": "" }, { "docid": "237f62f045be442d4c9f5fd62c51faa3", "score": "0.56303906", "text": "function bpbbst_activate() {\n\t// Let's just put a transcient, the rest belongs to admin class\n\tset_transient( '_bpbbst_welcome_screen', true, 30 );\n}", "title": "" }, { "docid": "385b95fa442aac7aaf2ac07f13c27562", "score": "0.56269896", "text": "function activate() {}", "title": "" }, { "docid": "48f18b3fb750ff917c3f1179c4489c25", "score": "0.5569251", "text": "public static function activate() {\n\n\n\t}", "title": "" }, { "docid": "c0b36543719ae8599c96456a4c505d05", "score": "0.55406797", "text": "protected function activate()\n {\n \n }", "title": "" }, { "docid": "2ffb5eb29bae5dbd7d2e89e05b122621", "score": "0.5486951", "text": "public function AfficherPromotionsAction()\n {\n\n }", "title": "" }, { "docid": "12e4e500dae85fe145d51c90015ce436", "score": "0.5473235", "text": "public function activar(Request $request)\n {\n //Funcion para actualizar\n \n //Encontrar la categoria por id\n $articulo = Articulo::findOrFail($request->id);\n $articulo->condicion = \"1\";\n \n //Guardar el registro en la base de datos\n $articulo->save();\n }", "title": "" }, { "docid": "6267d938a257f7a62f376a23966a3685", "score": "0.5472117", "text": "public function muestraApartados(){\n\t\t$objeto = new modelo();\n\t\t$data[\"titulo\"] = \"Apartar Aulas\";\n\t\t$data[\"objeto\"] = $objeto->getApartados();\n\t\t$data[\"pagina\"] = $objeto->getPaginacionApartados();\n\t\n\t\t//mandando información del modelo a la vista\n\t\trequire_once \"vista/admin/adm_apartados.php\";\n\t}", "title": "" }, { "docid": "b7dde5d7d4d1bebb68ac08d8d44cb920", "score": "0.5448062", "text": "public function dejarActividad($actividad)\r\n {\r\n parent::conectar();\r\n\r\n // Verificamos que no sea un hack\r\n $actividad = parent::salvar($actividad);\r\n\r\n $cuantosBrains = parent::verificarRegistros('select id from brain where usuario_id=\"'.$_SESSION['id'].'\"');\r\n if($cuantosBrains > 1){\r\n\r\n\r\n switch ($actividad) {\r\n case 'actividad1':\r\n $actividad = 'Proyectos innovadores';\r\n $verificar = parent::verificarRegistros('select id from brain where descripcion=\"'.$actividad.'\" and usuario_id=\"'.$_SESSION['id'].'\"');\r\n if($verificar > 0){\r\n parent::query('delete from brain where descripcion=\"'.$actividad.'\" and usuario_id=\"'.$_SESSION['id'].'\"');\r\n $this->getBrains();\r\n }else{\r\n echo 'error_1';\r\n }\r\n break;\r\n\r\n case 'actividad2':\r\n $actividad = 'Mentoring';\r\n $verificar = parent::verificarRegistros('select id from brain where descripcion=\"'.$actividad.'\" and usuario_id=\"'.$_SESSION['id'].'\"');\r\n if($verificar > 0){\r\n parent::query('delete from brain where descripcion=\"'.$actividad.'\" and usuario_id=\"'.$_SESSION['id'].'\"');\r\n $this->getBrains();\r\n }else{\r\n echo 'error_1';\r\n }\r\n break;\r\n\r\n case 'actividad3':\r\n $actividad = 'Asesoramiento';\r\n $verificar = parent::verificarRegistros('select id from brain where descripcion=\"'.$actividad.'\" and usuario_id=\"'.$_SESSION['id'].'\"');\r\n if($verificar > 0){\r\n parent::query('delete from brain where descripcion=\"'.$actividad.'\" and usuario_id=\"'.$_SESSION['id'].'\"');\r\n $this->getBrains();\r\n }else{\r\n echo 'error_1';\r\n }\r\n break;\r\n\r\n case 'actividad4':\r\n $actividad = 'Formaci&oacute;n';\r\n $verificar = parent::verificarRegistros('select id from brain where descripcion=\"'.$actividad.'\" and usuario_id=\"'.$_SESSION['id'].'\"');\r\n if($verificar > 0){\r\n parent::query('delete from brain where descripcion=\"'.$actividad.'\" and usuario_id=\"'.$_SESSION['id'].'\"');\r\n $this->getBrains();\r\n }else{\r\n echo 'error_1';\r\n }\r\n break;\r\n\r\n case 'actividad5':\r\n $actividad = 'Contenidos';\r\n $verificar = parent::verificarRegistros('select id from brain where descripcion=\"'.$actividad.'\" and usuario_id=\"'.$_SESSION['id'].'\"');\r\n if($verificar > 0){\r\n parent::query('delete from brain where descripcion=\"'.$actividad.'\" and usuario_id=\"'.$_SESSION['id'].'\"');\r\n $this->getBrains();\r\n }else{\r\n echo 'error_1';\r\n }\r\n break;\r\n\r\n }\r\n\r\n }else{\r\n echo 'error_5';\r\n }\r\n\r\n parent::cerrar();\r\n }", "title": "" }, { "docid": "3baa6a49bf8bcee3068941b163727c22", "score": "0.5446402", "text": "public static function bootActivatable()\n {\n static::addGlobalScope(new ActivatableScope);\n }", "title": "" }, { "docid": "fbf02fdd6946ab5e8fb147c25e680f43", "score": "0.54453874", "text": "private function activate() {\n\t\t$this->create_tables();\n\t\t$this->create_cron_job();\n\t}", "title": "" }, { "docid": "6d4acaa28e725de68079dd529b6b2f9f", "score": "0.5438102", "text": "public static function activate() {\n\t}", "title": "" }, { "docid": "6d4acaa28e725de68079dd529b6b2f9f", "score": "0.5438102", "text": "public static function activate() {\n\t}", "title": "" }, { "docid": "fba2e0092567a44dd98b9d255577f8b9", "score": "0.54300135", "text": "private function setInstancia()\n {\n if($this->_input->session('logueado'))\n {\n if(class_exists($this->_claseActual))\n {\n $this->_controller = new $this->_claseActual();\n \n $this->setMensaje('Iniciando.sistema',\\core\\config\\vars::ok);\n }\n else\n {\n throw new \\Exception('Modulo '.$this->_claseActual.' no registrado');\n }\n }\n else\n {\n \n }\n }", "title": "" }, { "docid": "c26af7d6cfe9fb4e44dcdacf50f9c582", "score": "0.5426906", "text": "public function principal(){\n\t\t$objeto = new modelo();\n\t\t$data[\"titulo\"] = \"Inicio\";\n\t\t$data[\"objeto\"] = $objeto->getDocentes();\n\n\t\t//mandando información del modelo a la vista\n\t\trequire_once \"vista/bienvenidaPrueba.php\";\n\t}", "title": "" }, { "docid": "10d630c9acd20d7bb96c9c1fcc9749c5", "score": "0.53990334", "text": "public function __construct() {\n $this->adminPuntoVentaModelo = new adminPuntoVentaModelo();\n }", "title": "" }, { "docid": "140bf42e08757c4150fdc922c7a49eb6", "score": "0.5370211", "text": "public function index()\n {\n /*$actividad = new Actividad;\n $actividad->nombre=\"RODALLA\";\n $actividad->tipo=\"DEPORTIVA\";\n $actividad->creditos=1;\n $actividad->save();*/\n $actividades = Actividad::get();\n return view('actividades.index',compact('actividades'));\n //return $actividad;\n\n }", "title": "" }, { "docid": "7342592c0737b05470b96dc6dbd79bc6", "score": "0.53585714", "text": "function activar($id,$estado){\n\n\t\t$sql=\"update modulo set\n\t\t\t\tmod_activar='\".$this->id_estado.\"' where mod_id='\".$this->id_item.\"'\";\n\t\t$this->fmt->query->consulta($sql,__METHOD__);\n\t\t$this->fmt->class_modulo->script_location($this->id_mod,\"busqueda\");\n\t\t//header(\"location: modulos.adm.php?id_mod=\".$this->id_mod);\n\t}", "title": "" }, { "docid": "136377a7343322c0e1d9b6b0a028a9ab", "score": "0.5347423", "text": "public function inactivate(): void\n {\n $oDebtDAO = new DebtDAO();\n $oDebtDAO->inactivate($this);\n }", "title": "" }, { "docid": "bba785d6e7236416e7758ce5282740df", "score": "0.5337018", "text": "public function run()\n {\n Model::unguard();\n factory(Conta::class, 2)->create();\n }", "title": "" }, { "docid": "5ef135b89c54c9d3e3ea7b460ac14356", "score": "0.53349453", "text": "static public function execute ()\n {\n extract(Router::get(), EXTR_OVERWRITE);\n\t\t\n $controllers_dir = APP_PATH . 'controllers';\n if ($module) {\n $controllers_dir = $controllers_dir . '/' . $module;\n }\n\n $app_controller = Util::camelcase($controller) . 'Controller';\n $file = \"$controllers_dir/$controller\".'_controller.php';\n if(!is_file($file)){\n\t\t\tthrow new KumbiaException(null,'no_controller');\n\t\t}\n\t\tinclude_once $file;\n\t\t/**\n\t\t * Asigna el controlador activo\n\t\t **/\n\t\tself::$_controller = $activeController = new $app_controller($module, $controller, $action, $id, $all_parameters, $parameters);\n\n\t\t/**\n * Carga de modelos\n **/\n\t\tif(Config::get('config.application.database')) {\n\t\t\tif(Config::get('config.application.models_autoload')) {\n\t\t\t\tLoad::models();\n\t\t\t} elseif($activeController->models !== null) {\n\t\t\t\tLoad::models($activeController->models);\n\t\t\t}\n\t\t}\n\t\t/**\n\t\t * Se ejecutan los filtros before\n\t\t */\n\t\tif($activeController->initialize() === false) {\n\t\t\treturn $activeController;\n\t\t}\n\t\tif($activeController->before_filter() === false) {\n\t\t\treturn $activeController;\n\t\t}\n\t\t\t\n\t\t/**\n\t\t * Se ejecuta el metodo con el nombre de la accion\n\t\t * en la clase\n\t\t */\n\t\tif (!method_exists($activeController, $action)) {\t\t\t\n\t\t\tthrow new KumbiaException(null,'no_action');\t\n\t\t}\n\t\tcall_user_func_array(array($activeController , $action), $parameters);\n\t\t\t\t\n\t\t/**\n\t\t * Corre los filtros after\n\t\t */\n\t\t$activeController->after_filter();\n\t\t$activeController->finalize();\n\n\t\t/**\n\t\t * Elimino del controlador los modelos inyectados\n\t\t **/\n\t\tforeach (Load::get_injected_models() as $model) {\n\t\t\tunset($activeController->$model);\n\t\t}\n\t\t/**\n\t\t * Limpia el buffer de modelos inyectados\n\t\t **/\n\t\tLoad::reset_injected_models();\n\n\t\treturn $activeController;\n }", "title": "" }, { "docid": "3b48d8ec69539c9f4344ad7c850e097e", "score": "0.531954", "text": "public static function modActividad(){\n $a = new Actividad();\n\n if(!isset($_POST['tipoActividad'])){\n $tipo = \"\";\n }else{\n $tipo = $_POST['tipoActividad'];\n \t if($_POST['tipoActividad'] == 'Individual')\n \t {\n \t\t $num = 0;\n \t }\n \t\telse{\n \t\t $num = $_POST['plazasActividad'];\n\n \t }\n }\n\n //HASYA AQUI\n $a->modificarActividad($_POST['idActividad'],$_POST['nomActividad'],$tipo,$num);\n header('Location: ../Views/GestionActividades.php');\n }", "title": "" }, { "docid": "6ede31e0f4d3e8ca6763cffbff303597", "score": "0.531631", "text": "public function cargarDatosActivos_get(){ \n\t\tparent::logueado();\n\t\t$this->response($this->ContactoModel->getActive(), 200);\n }", "title": "" }, { "docid": "de99fa96e8a3a88584c51f463eb1c450", "score": "0.5296603", "text": "private function _activateController () {\n if (class_exists($this->_controller, FALSE) == FALSE) {\n $this->loadController($this->_controller);\n }\n $controller = new $this->_controller;\n $controller->{$this->_action}($this->_arguments);\n }", "title": "" }, { "docid": "f0becc3162e9626c24dbc190539cde88", "score": "0.5285655", "text": "public function activated();", "title": "" }, { "docid": "ca55f0534fdd3931ffba67fc438d8f21", "score": "0.52712333", "text": "public function actionActive(){\n echo 1;\n }", "title": "" }, { "docid": "909c3ce1a182c5fcaa9384a8c779bfe7", "score": "0.52528745", "text": "public static function activate() : void {\n\n // create all database table\n self::create_tables();\n \n }", "title": "" }, { "docid": "9ec247c4dd570b4233441822dda84fbe", "score": "0.5245214", "text": "public function insertarActividad()\r\n {\r\n $conexion = gimnasioBD::conectarBD();\r\n\r\n $idG = $this->id;\r\n $nombreG = $this->nombre;\r\n $descripcionG = $this->descripcion;\r\n $aforoG = $this->aforo;\r\n\r\n //controlar que no exista ya una actividad con el mismo nombre\r\n $mismoNombre = false;\r\n $arrayNombres = Actividad::getAllNombres();\r\n\r\n for($i = 0;$i<count($arrayNombres);$i++)\r\n {\r\n if($arrayNombres[$i]==$nombreG)\r\n {\r\n $mismoNombre = true;\r\n }\r\n }\r\n\r\n if($mismoNombre)\r\n {\r\n ?>\r\n <script>\r\n alert('Ya existe una actividad con ese nombre. Porfavor introduzca un nombre distinto');\r\n </script>\r\n <?php\r\n }\r\n else\r\n {\r\n //insertar actividad\r\n $conexion->exec(\"INSERT INTO actividades \r\n (id,nombre,descripcion,aforo) \r\n VALUES ('$idG','$nombreG','$descripcionG','$aforoG')\");\r\n }\r\n\r\n //refrescar la pagina\r\n echo \"<script>setTimeout(\\\"location.href = '../controllers/crearActividadesController.php';\\\",0);</script>\";\r\n }", "title": "" }, { "docid": "f434bb8099c74aa8504eef3aab8f292d", "score": "0.52435195", "text": "public function chAction()\n {\n $container = new Container('melistoolcreator');\n\n $container['melis-toolcreator']['step1']['tcf-name'] = 'Newstooltab';\n// $container['melis-toolcreator']['step1']['tcf-tool-edit-type'] = 'tab';\n exit;\n }", "title": "" }, { "docid": "ab237981e110e0e1ed1bed4bc627072d", "score": "0.5242074", "text": "function activate_myappname() {\n $activate = new classes\\MyAppNameSettings();\n $activate->setupApplication();\n}", "title": "" }, { "docid": "72d942505fddf7a36f8f27f251330493", "score": "0.523758", "text": "public function boot()\n {\n\n\n // registering a callback to be executed upon the creation of an activity AR\n\n }", "title": "" }, { "docid": "54c561ccb2865bcd13d73d08f7ec38e6", "score": "0.52369106", "text": "public function newActivityAction()\n {\n \n }", "title": "" }, { "docid": "182b921def577d6cc0f89474219d59b9", "score": "0.522985", "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": "24b03fea7daf9751f9fdc9cbe6173b64", "score": "0.52219266", "text": "public function run()\n {\n //ADMINISTRADOR COM PAPEL DE ADMIN\n User::find(1)->roles()->attach(1);\n\n //user COM PAPEL DE user\n User::find(2)->roles()->attach(2);\n }", "title": "" }, { "docid": "1dc579ab30440611cc290b854c34e209", "score": "0.5214316", "text": "public function run()\n {\n Requisito::create([\n \t\t 'requisito' =>'control hacia la mascota ',\n \n 'mascota_id' => 2\n\t\t]);\n\t\t\n\t\t Requisito::create([\n \t\t 'requisito' =>'control en la alimentacion de la mascota',\n \n 'mascota_id' => 2\n\t\t]);\n\t\t\n\t\t }", "title": "" }, { "docid": "9bc87f44437a40460c99eb2822b4cc0c", "score": "0.52028817", "text": "public function run()\n {\n $propositor = Role::firstOrCreate([\n 'name'=>'propositor'\n ]);\n\n $admin = Role::firstOrCreate([\n 'name'=>'admin'\n ]);\n\n $parecerista = Role::firstOrCreate([\n 'name'=>'parecerista'\n ]);\n\n $enviarProposta = Permission::firstOrCreate([\n 'name'=>'enviar-proposta'\n ]);\n\n $avaliarProposta = Permission::firstOrCreate([\n 'name'=>'avaliar-proposta'\n ]);\n\n $propositor->attachPermission($enviarProposta);\n $parecerista->attachPermission($avaliarProposta);\n\n }", "title": "" }, { "docid": "8c1d283c7ca1196ef4b06708c3d00de8", "score": "0.5202488", "text": "public function __construct()\n {\n $this->lineas = new imprimirFilas_controller();\n }", "title": "" }, { "docid": "227dd0837fbea1b7638548fdeee0f3be", "score": "0.52012336", "text": "function activate()\n\t{\n\t\tparent::activate();\n\t\t\n\n\t\tdo_action( $this->WPB_PREFIX.'_activate' );\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "882507a6403ee661c0fcb9d71227bd2b", "score": "0.5200132", "text": "public function actionInit()\n {\n\n $trans = Yii::$app->db->beginTransaction();\n try {\n $dir = dirname(dirname(dirname(__FILE__))) . '/backend/controllers';\n $controllers = glob($dir . '/*');\n $permissions = [];\n foreach ($controllers as $controller) {\n $content = file_get_contents($controller);\n preg_match('/class ([a-zA-Z]+)Controller/', $content, $match);\n $cName = $match[1];\n //$permissions[] = strtolower($cName . '/*');\n preg_match_all('/public function action([a-zA-Z_]+)/', $content, $matches);\n foreach ($matches[1] as $aName) {\n\n switch ($cName) {\n case 'base':\n case 'admin':\n case 'error':\n continue;\n default:\n if ($aName != 's') {\n $permissions[] = $this->humpTo_($cName) . '/' . $this->humpTo_($aName);\n }\n }\n\n }\n }\n $auth = Yii::$app->authManager;\n foreach ($permissions as $permission) {\n if (!$auth->getPermission($permission)) {\n $obj = $auth->createPermission($permission);\n $obj->description = $permission;\n $auth->add($obj);\n }\n }\n $trans->commit();\n echo \"import success \\n\";\n } catch (\\Exception $e) {\n $trans->rollback();\n echo \"import failed \\n\";\n }\n }", "title": "" }, { "docid": "e7ffb81fb376fa166993b6b1287301f4", "score": "0.51969665", "text": "public function run()\n {\n Actividad::create(['Id_Actividad' => '1', 'Nombre_Actividad' => 'Destete', 'Descripcion_Actividad' => 'Destetar conejos']);\n Actividad::create(['Id_Actividad' => '2', 'Nombre_Actividad' => 'Monta', 'Descripcion_Actividad' => 'Monta de conejos']);\n Actividad::create(['Id_Actividad' => '3', 'Nombre_Actividad' => 'Medicar', 'Descripcion_Actividad' => 'Administrar Medicamentos']);\n\n\n }", "title": "" }, { "docid": "f3d642130ee4828384972fc59b7b2942", "score": "0.5184081", "text": "public static function activate() {\n add_action( 'admin_init','na_manage_komitee::add_cap');\n }", "title": "" }, { "docid": "09b019629dd49b6753fdaffd7db5cca2", "score": "0.517836", "text": "public function __construct()\n {\n// $this->ctrlAccueil = new ControllerAccueil();\n// $this->ctrlArticle = new ControllerArticle();\n }", "title": "" }, { "docid": "6ea2a65de198fa7ec1b87434dd0d5ac0", "score": "0.51759374", "text": "public function __construct()\n\t{\n\t $this->entity = new CuentasContables;\n\t}", "title": "" }, { "docid": "4268d293c09c4a6b50f71c813dcde955", "score": "0.5175747", "text": "function __construct(){\n\t\t\t##INSTANCIA A CLASSE CLIENTES PARA ESSE CONTROL##\n\t\t\t$this->mProjetos = new projetosModel();\n\t\t\t$this->mCategoria = new categoriasModel();\n\t\t}", "title": "" }, { "docid": "0f9e397118ce89f2cc5f1ddf0e713e94", "score": "0.5175504", "text": "public function add_actividad ($campanya, $actividad, $descripcion, $organiza, $lugar, $idbarrio, $idseccion, $fecha, $usuario, $publicada) {\n // Recuerda, en el modelo, comprobar que los datos que te meten\n // en los parametros estan correctos, por seguridad\n // Funcion para añadir una actividad\n // $campanya --> Nombre de la campanya de la actividad\n // $actividad --> Nombre de la actividad\n // $descripcion --> Descripcion de la actividad\n // $organiza --> Nombre del organizador u organizadores\n // $lugar --> Direccion donde tiene lugar\n // $idbarrio --> ID del barrrio donde se realiza la actividad\n // $idseccion --> ID de la seccion a la que pertenece la actividad\n // $fecha --> Fecha y Hora de comienzo de la actividad\n // $usuario --> login del usuario\n // $publicada --> Si está o no publicada la actividad, al crearla vendrá con valor 0\n\n $sql = \"INSERT INTO actividades (campanya, actividad, descripcion, organiza, lugar, idbarrio, idseccion, fecha, usuario, publicada) VALUES ('\" . $campanya . \"', '\" . $actividad . \"', '\" . $descripcion . \"', '\" . $organiza . \"', '\" . $lugar . \"', '\" . $idbarrio . \"', '\" . $idseccion . \"', '\" . $fecha . \"', '\" . $usuario . \"', '\" . $publicada . \"')\";\n $resultado = $this->db->query($sql);\n // Recuperamos el ID\n // En de si exite fecha o no la consulta es distinta, porque sale error.\n // Porque si no tiene fecha al hacer el select no devuelve ninguno,\n // Aunque con fecha en blanco pueden aparecer varios\n // OJO si no tiene fecha, pongo la fecha a la que graba por defecto, porque sino la consulta no devuelve ningun registro\n if ($fecha ==\"\") {$fecha=\"0000-00-00\";}\n $sql=\"SELECT idactividades FROM actividades WHERE campanya='\".$campanya.\"' AND actividad='\".$actividad.\"' AND descripcion='\".$descripcion.\"' AND organiza='\".$organiza.\"' AND lugar='\".$lugar.\"' AND idbarrio='\".$idbarrio.\"' AND idseccion='\".$idseccion.\"' AND fecha='\".$fecha.\"' AND usuario='\".$usuario.\"' AND publicada='\".$publicada.\"'\";\n $resultado = $this -> db -> query($sql);\n \tforeach ($resultado->result() as $row) {\n $idactividades = $row -> idactividades;\n \t}\n\treturn $idactividades;\n }", "title": "" }, { "docid": "11ad4fde3fb75076ad95c6a32876c627", "score": "0.51642317", "text": "public function __construct()\n {\n\n $this->lineas = new imprimirFilas_controller();\n }", "title": "" }, { "docid": "ac990f27b1e0833bc7c09ab1161fb31c", "score": "0.5161072", "text": "public function relatorioAction() { \r\n \r\n }", "title": "" }, { "docid": "a4cacf52e4b813adb8029e544bf0aca1", "score": "0.51556265", "text": "function care_companion_activate()\n{\n $plugin = new \\DSC\\CareCompanion\\Activator();\n $plugin->activate();\n return;\n}", "title": "" }, { "docid": "13c6400c969add6e67aa2f2ab49c0496", "score": "0.51492965", "text": "public function run()\n {\n $arreglo= [\"Aditivo\",\"Aguardiente\",\"Ajos\",\"Almendra\",\"Arroz\",\"Art. Bambo\",\"Articulos para telefonos\",\"Arvejas\",\"Bananos\",\"Bioestimulantes\",\"Bolsas\",\"Bomba\",\"Bulbos Flores\",\"Camión Diesel\",\"Cartones\",\"Cervezas\",\"Cestas\",\"Cinta de embalaje\",\"Cuero\",\"Fertilizantes\",\"Fibra Coco\",\"Forfenicol\",\"Gelatina\",\"Granos Chia\",\"Herbicida\",\"Hierro dextrano\",\"Juguetes\",\"Leche en polvo\",\"Legumbres\",\"Lentejas\",\"Licores\",\"Lincomicina\",\"Lizana\",\"Madera\",\"Maq. Usada\",\"Maquina botonera\",\"Med. Veterinarios\",\"Meloxicam\",\"Motivos decorativos\",\"Oxitetraciclina\",\"Palillos chinos\",\"Paltas\",\"Piñas\",\"Plato prep. Carne\",\"Prendas de Ropa\",\"Prendas de vestir\",\"Pulpa tomate\",\"Puzzles de papel\",\"Quesos\",\"QUINOA\",\"Sacos\",\"Semilla Cilantro\",\"Semilla Zanahoria\",\"Sesamo\",\"Sulfato magnesio\",\"Tabaco\",\"Taurina\",\"Turba\",\"Varillas Bamboo\",\"Vino\",\"Vitamina A\",\"Whisky\"];\n for ($i=0; $i < count($arreglo); $i++) { \n \n Contenido::create([\n 'nombre' => $arreglo[$i],\n 'activo' => true,\n ]);\n }\n }", "title": "" }, { "docid": "40a5faf60c2a5a3b4e977c8b896517df", "score": "0.51426244", "text": "public function boot(){\r\n\r\n //make somethings\r\n }", "title": "" }, { "docid": "59528b831b009c64b51da1bdaec6c29a", "score": "0.5140292", "text": "function alta($objeto){\n\n\t\t\n\t\t\t$objeto->agregar($objeto);\n\t\n\t\t}", "title": "" }, { "docid": "b83e3761e45b8f56fbcc5c4f2b93e945", "score": "0.5139417", "text": "public function nuevoApartado(){\n\t\t$objeto = new modelo();\n\t\t$data[\"titulo\"] = \"Agregar Apartados\";\n\t\t$data[\"objeto2\"] = $objeto->llenaSalones();\n\t\trequire_once \"vista/admin/agregarApartados.php\";\n\t}", "title": "" }, { "docid": "f1f6384541a133a429b77bd2e4dc8158", "score": "0.51389796", "text": "public function activate() {\n $permission = Permission::add($this->_plugin.'.manage-ticket', 0, 0);\n\n $menu = MenuItem::add(array(\n 'plugin' => $this->_plugin,\n 'name' => 'main-ticket',\n 'labelKey' => $this->_plugin.'.main-menu-title',\n 'icon' => 'bars'\n ));\n\n MenuItem::add(array(\n 'plugin' => $this->_plugin,\n 'name' => 'project',\n 'labelKey' => $this->_plugin.'.menu-project-title',\n 'action' => 'htracker-project-index',\n 'parentId' => $menu->id,\n 'icon' => 'cubes'\n ));\n\n MenuItem::add(array(\n 'plugin' => $this->_plugin,\n 'name' => 'ticket',\n 'labelKey' => $this->_plugin.'.menu-ticket-title',\n 'action' => 'htracker-index',\n 'parentId' => $menu->id,\n 'icon' => 'tasks'\n ));\n }", "title": "" }, { "docid": "6d6bcfb61b5d5212657563fc97b34697", "score": "0.51372", "text": "function lAction()\r\n {\r\n $p = new ICargos();\r\n $pp = $p->GetDatosMilitares(10, 0);\r\n echo '<pre>';\r\n print_r($p);\r\n\r\n }", "title": "" }, { "docid": "73e88cf4b1d2582d65430c0d45f38b39", "score": "0.5133654", "text": "public function active();", "title": "" }, { "docid": "73e88cf4b1d2582d65430c0d45f38b39", "score": "0.5133654", "text": "public function active();", "title": "" }, { "docid": "d0cdc316db755e956586da4478fbe434", "score": "0.5129419", "text": "private function initialActivities(){\n $this->activities = array(\n array('name'=>'Crossfit', 'description'=>'es una modalidad de entrenamiento que se realiza en las fuerzas militares de Estados Unidos y consiste en un trabajo de alta intensidad en poco tiempo.', 'image'=>'r1.jpg', 'm2'=>'3', 'status'=>'Activo', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()),\n array('name'=>'Bikram yoga', 'description'=>'también conocido como \"Hot yoga\". Es una variante del yoga que se realiza a una temperatura ambiente de 42ºC con una humedad del 60 por ciento', 'image'=>'5DDKSXYCJRHFNJRIK2GZYJSQTE.jpg', 'm2'=>'2', 'status'=>'Activo', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()),\n array('name'=>'Fitness boot camp', 'description'=>'es una forma de entrenamiento intensivo realizado al aire libre', 'image'=>'SKFPDRTKWNGCJJPCPI2FWDJONA.jpg', 'm2'=>'2', 'status'=>'Activo', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()),\n array('name'=>'Zumba fitness', 'description'=>'fusiona fitness y baile y utiliza un estilo libre coreografiado como método de enseñanza.', 'image'=>'C2757G74UZASZAEL2KXZWJSIW4.jpg', 'm2'=>'3', 'status'=>'Activo', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()),\n );\n }", "title": "" }, { "docid": "10b7a67ae40ca2a58765b0f4791d0561", "score": "0.5125343", "text": "public function run()\n {\n $creaciones = ['Reunion Estudio','Trabajo Grupal','Actividad Recreativa','Actividad Extracurricular','Presentacion'];\n $rechazos = ['No procede','Reasignada'];\n foreach($creaciones as $creacion){\n Motivo::create(['action'=>'creacion','descripcion'=>$creacion]);\n }\n foreach($rechazos as $rechazo){\n Motivo::create(['action'=>'rechazo','descripcion'=>$rechazo]);\n }\n }", "title": "" }, { "docid": "6fee69ff1d2e14fee19c0989230a7446", "score": "0.5125233", "text": "private function manageAction(){\t\t\t\n\t\t\t// On exécute l'action cible du controller et on affiche la vue avec le modèle renvoyé\n\t\t\ttry{\n\t\t\t\t$this->_dispatcher->executeAction($this->_dispatchedUrl, $this->_repositoryManager);\n\t\t\t}\n\t\t\tcatch(Adapter\\ViewException $ex){\n\t\t\t\tif(self::$_isDebugMode){\n\t\t\t\t\tif($ex->getType() == Adapter\\ViewException::NO_MODEL){\n\t\t\t\t\t\tCore\\Logger::write(Adapter\\ViewException::NO_MODEL . \" : noModelProvided \" . implode(' ', $ex->getParams()));\n\t\t\t\t\t\t$this->_errorManager->noModelProvided($ex->getParams());\n\t\t\t\t\t\tdie();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tCore\\Logger::write(Adapter\\ViewException::BAD_LAYOUT . \" : layoutDoesntExist \" . implode(' ', $ex->getParams()));\n\t\t\t\t\t\t$this->_errorManager->layoutDoesntExist($ex->getParams());\n\t\t\t\t\t\tdie();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this->redirectTo404();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "d698b5177d83a16f0c45f1988b56315d", "score": "0.5123674", "text": "function activate(array $hActiveController);", "title": "" }, { "docid": "2c5c71c22115c7b52550431b579b0224", "score": "0.5114467", "text": "public function __construct()\n {\n $this->model = new produitsModel;\n //afficher tous les produitspublic \n \n }", "title": "" }, { "docid": "2ddea445b9d1ea308b8afdcde580c7d6", "score": "0.5099541", "text": "public function muestraAsistencias(){\n\t\t$objeto = new modelo();\n\t\t$data[\"titulo\"] = \"Asistencias\";\n\t\t$data[\"objeto\"] = $objeto->getAsistencias();\n\t\t$data[\"pagina\"] = $objeto->getPaginacionAsistencias();\n\n\t\t//mandando información del modelo a la vista\n\t\trequire_once \"vista/admin/asistencias.php\";\n\t}", "title": "" }, { "docid": "08e92da5c102a43144cc7e6ab9d480b7", "score": "0.50958735", "text": "public function activate()\n {\n // dummy implementation\n }", "title": "" }, { "docid": "04b0f978f3926b9f826cd52d0f86ef28", "score": "0.5091973", "text": "public function __construct()\n {\n parent::__construct();\n $this->setLog('actividadController.log');\n }", "title": "" }, { "docid": "82bd85738deac3b7618fbeaa40052651", "score": "0.5090448", "text": "public function run()\n {\n\n $createTasks = Permission::where('slug','like','%categories%')->get();\n $manager = new Role();\n $manager->name = 'Управление категориями';\n $manager->slug = 'category-editor';\n $manager->save();\n $manager->permissions()->attach($createTasks);\n $manager->save();\n\n $manager = new Role();\n $createTasks = Permission::all();\n $manager->name = 'Доступ к админпанели';\n $manager->slug = 'adminPanel';\n $manager->save();\n $manager->permissions()->attach($createTasks);\n $manager->save();\n\n $createTasks = Permission::where('slug','like','%role%')->get();\n $developer = new Role();\n $developer->name = 'Управление Ролями';\n $developer->slug = 'role-editor';\n $developer->save();\n $developer->permissions()->attach($createTasks);\n\n }", "title": "" }, { "docid": "fa08ba5a1d8584de3d4d1d77f083ab04", "score": "0.508917", "text": "function generarEncabezadoInformeDeSubactividades($id_actividad_plan_trabajo)\n{\n $obj_actividad_model = new ActividadModel();\n return $obj_actividad_model->generarEncabezadoInformeDeSubactividades($id_actividad_plan_trabajo);\n}", "title": "" }, { "docid": "14ac6d676b093c2bb7e0a883dfeaad0f", "score": "0.5088177", "text": "function pa_activation() {\n\t//Nothing to do\n}", "title": "" }, { "docid": "d50733c2a483409723c3731ac173434b", "score": "0.5087388", "text": "public function __construct() {\n parent::__construct();\n\t\t$this->atos_tiasa_leubeut();\n\t\tModules::run('ref_role/permissions');\n\t\t$this->load->model('m_masuk');\n }", "title": "" }, { "docid": "804dd1cb976ce3644a71f95d442026ec", "score": "0.5082686", "text": "function listarActaMaestro(){\n $this->procedimiento='tes.f_plan_pago_sel';\n $this->transaccion='TES_ACTCONFPP_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n $this->setCount(false);\n\n\n //Definicion de la lista del resultado del query\n $this->captura('nombre_solicitante','text');\n $this->captura('proveedor','varchar');\n $this->captura('fecha_conformidad','text');\n $this->captura('conformidad','text');\n $this->captura('numero_oc','varchar');\n $this->captura('numero_op','varchar');\n $this->captura('numero_cuota','numeric');\n $this->captura('numero_tramite','varchar');\n $this->captura('detalle','text');\n $this->captura('tipo','varchar');\n $this->captura('fecha_costo_ini','date');\n $this->captura('fecha_costo_fin','date');\n $this->captura('obs_monto_no_pagado','text');\n $this->captura('total_nro_cuota','integer');\n $this->captura('obs','varchar');\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n //echo($this->consulta);exit;\n $this->ejecutarConsulta();\n\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "e70e04d07f84127ff2063932a7929f57", "score": "0.508217", "text": "function activar($objeto) {\n\t\t$sql = \"\tUPDATE\n\t\t\t\t\t\tusuarios\n\t\t\t\t\tSET\n\t\t\t\t\t\tstatus = 1\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tid = '\".$objeto['id'].\"'\";\n\t\t// return $sql;\n\t\t$result = $this -> query($sql);\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "7a16f97d071eb3be07a4a9117316504c", "score": "0.507961", "text": "protected function activeControllerAction() {\n $backtrace = debug_backtrace();\n $controller = $backtrace[2];\n $mvc = (object)array(\n 'controller' => strtolower($controller['class']),\n 'action' => strtolower($controller['function']),\n 'args' => $controller['args']\n );\n $this->app->view->set('mvc', $mvc);\n }", "title": "" }, { "docid": "689dd4ccca93a5aef022e80d2f48226d", "score": "0.507696", "text": "public function actionIndex() {\n $session = Yii::$app->session;\n $user = Yii::$app->user;\n $models = Marca::find();\n $marca = new Marca();\n\n if ($session->has('business')) {\n $bizId = $session->get('business');\n $models = $models->where(['business_id' => $bizId]);\n $marca->business_id = $bizId;\n } \n\n $models = $models->all();\n $_dataBusiness = ArrayHelper::map(Business::find()->all(), 'id', 'name');\n\n return $this->render('index', [\n 'models' => $models,\n 'newMarca' => $marca,\n 'newUser' => new SignupForm(),\n 'newProdutor' => new Produtor(),\n '_dataBusiness' => $_dataBusiness\n ]);\n }", "title": "" }, { "docid": "bda5b41220d7b29753cf6cdef9ca1449", "score": "0.50760376", "text": "public function activate()\n {\n $this->status = SystemStatus::ACTIVE;\n $this->save();\n }", "title": "" }, { "docid": "6c9f5487fec0e2c09b33608fabe508b4", "score": "0.5071582", "text": "function iniciarsesion(){}", "title": "" }, { "docid": "8cc3de4851f31acdadb58cb0a38de6ed", "score": "0.5071152", "text": "public function run()\n {\n $marca =new Marca;\n $marca->nombre='BMW';\n $marca->save();\n\n $marca =new Marca;\n $marca->nombre='Ford';\n $marca->save();\n\n $marca =new Marca;\n $marca->nombre='Honda';\n $marca->save();\n\n $marca =new Marca;\n $marca->nombre='Hyundai';\n $marca->save();\n\n $marca =new Marca;\n $marca->nombre='Mazda';\n $marca->save();\n\n $marca =new Marca;\n $marca->nombre='Toyota';\n $marca->save();\n }", "title": "" }, { "docid": "c6343685337d6cac85b697cc63a76406", "score": "0.5061727", "text": "public function run()\n {\n $module = new Modules();\n $module->modu_id = 1;\n $module->modu_title = 'Facturas';\n $module->modu_description = 'Módulo de facturas';\n $module->modu_visible = 1;\n $module->save();\n }", "title": "" }, { "docid": "0f6ad5c100f02f98da6a540b804e01fa", "score": "0.5060587", "text": "public static function onActivate()\n {\n self::createSql();\n self::createConfigEntries();\n }", "title": "" }, { "docid": "1026c69d78b578b6994c9680da46b077", "score": "0.5060376", "text": "function generarInformeDeSubactividades($id_actividad_plan_trabajo)\n{\n $obj_actividad_model = new ActividadModel();\n return $obj_actividad_model->generarInformeDeSubactividades($id_actividad_plan_trabajo);\n}", "title": "" }, { "docid": "a19fb7702d79b86460fe6e2c5f4e5ced", "score": "0.5059601", "text": "public function activate() {\n global $app;\n MySBDB::query(\"UPDATE \".MySB_DBPREFIX.\"users \".\n \"SET active=1 \".\n \"WHERE id=\".$this->id,\n \"MySBUser::activate()\" );\n $this->active = 1;\n }", "title": "" }, { "docid": "2b3cf1476e1928a92dc932188f26f8ef", "score": "0.5057596", "text": "public function mostrarInicio(){\n $this->cargarVista(\"listadoPuja\"); \n }", "title": "" }, { "docid": "73004bfd216d880a19cbbd020e98875c", "score": "0.50569576", "text": "function arrancar(){\n //se ejecutara todo su codigo\n parent::arrancar();\n\n echo \"Camion arrancado\";\n }", "title": "" }, { "docid": "098a5c94717c38580c7236dd0ab2ee50", "score": "0.50525373", "text": "public function atualizaRecorrenciasAction() {\n\t\t \t// Init\n\t\t \t$this->init();\n\t\t \t$sMensagemErro = \"\";\n\t\t \t\n\t\t \t$dbAdapter = $this->umServiceManager->get(\"Zend\\Db\\Adapter\\Adapter\");\n\t\t \t\n\t\t \t// Protege o acesso\n\t\t \t$this->sessaoAtiva();\n\t\t\n\t\t // template\n\t\t $this->layout('layout/webadmin');\n\t\t\n\t\t // variaveis do topo\n\t\t $umPerfil = new Perfil($this->umServiceManager,null,$this->umContainer->sUsuarioAdminLogado);\n\t\t $this->layout()->sLoginUsuario = ucfirst($umPerfil->getNome());\t// Seta uma variável no layout diretamente.\n\t\t $this->layout()->sTempoSessaoTela = $this->config[\"session\"][\"expira-tela\"];\n\t\t\n\t\t $config = $this->umServiceManager->get(\"config\");\t// Captura o config setado em global|local\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t // 1. pegar todas as assinaturas do moip (subscriptions)\n\t\t $url = \"https://api.moip.com.br/assinaturas/v1/subscriptions\"; //$this->config[\"moip\"][\"url\"].\"subscriptions\"; //https://api.moip.com.br/assinaturas/v1/subscriptions\n $assinaturas = $this->sendMoipInstruction($url, \"GET\");\n $assinaturas = json_decode($assinaturas[\"return\"], true);\n $assinaturas = $assinaturas[\"subscriptions\"];\n //echo \"<b>assinatura:</b><br><pre>\"; print_r($cobrancas); echo \"</pre><br><br>\";\n \n \n foreach ($assinaturas as $assinatura) {\n \t\n \t\n \t\t\n \t\t// 2. pegar as faturas de cada assinatura (invoices)\n \t\t\n\t\t\t\t $url = \"https://api.moip.com.br/assinaturas/v1/subscriptions/\".$assinatura[\"code\"].\"/invoices\"; // $this->config[\"moip\"][\"url\"].\"subscriptions/\".$assinatura[\"code\"].\"/invoices\"; //https://api.moip.com.br/assinaturas/v1/subscriptions/recorrente-219/invoices\n\t\t $faturas = $this->sendMoipInstruction($url, \"GET\");\n\t\t $faturas = json_decode($faturas[\"return\"], true);\n\t\t $faturas = $faturas[\"invoices\"];\n\t\t //echo \"<b>faturas:</b><br><pre>\"; print_r($faturas); echo \"</pre><br><br>\";\n\t\t \n\t\t foreach ($faturas as $fatura) {\n\t\t \t\n\t\t \t\n\t\t \t\t\n\t\t \t\t// 3. pegar as cobranças de cada fatura(payments)\n\t\t \t\t\n\t\t\t\t\t\t $url = \"https://api.moip.com.br/assinaturas/v1/invoices/\".$fatura[\"id\"].\"/payments\"; //$this->config[\"moip\"][\"url\"].\"invoices/\".$fatura[\"id\"].\"/payments\"; //https://api.moip.com.br/assinaturas/v1/invoices/428815/payments\n\t\t\t\t $cobrancas = $this->sendMoipInstruction($url, \"GET\");\n\t\t\t\t $cobrancas = json_decode($cobrancas[\"return\"], true);\n\t\t\t\t $cobrancas = $cobrancas[\"payments\"];\n\t\t\t\t $cobranca = $cobrancas[0];\n\t\t\t\t \n\t\t\t\t //echo \"<b>cobrancas:</b><br><pre>\"; print_r($cobrancas); echo \"</pre><br><br>\";\n\t\t\t\t \n\t\t\t\t // procurar pela assinatura e recorrencia\n\t\t\t\t $q = \"\n\t\t\t\t select\n\t\t\t\t id, status, invoice_code, payment_code\n\t\t\t\t \n\t\t\t\t from\n\t\t\t\t contributions\n\t\t\t\t \n\t\t\t\t where\n\t\t\t\t start_value='\".$fatura[\"occurrence\"].\"' and\n\t\t\t\t payment_gateway_code='\".$fatura[\"subscription_code\"].\"'\n\t\t\t\t \";\n\t\t\t\t echo $q.\"<br>\";\n\t\t\t\t\t\t\t\t$umResultSet = $dbAdapter->query($q)->execute();\n\t\t\t\t\t\t\t\t$quantidade = 0;\n\t\t\t\t\t\t\t\twhile ($linha = $umResultSet->next()) {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif ($linha[\"invoice_code\"]==\"\") {\n\t\t\t\t\t\t\t\t\t\t\t\t$q = \"\n\t\t\t\t\t\t\t\t\t\t\t\tupdate\n\t\t\t\t\t\t\t\t\t\t\t\tcontributions\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\tset \n\t\t\t\t\t\t\t\t\t\t\t\tinvoice_code='\".$fatura[\"subscription_code\"].\"', payment_code='\".$fatura[\"id\"].\"'\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\twhere\n\t\t\t\t\t\t\t\t start_value='\".$fatura[\"occurrence\"].\"' and\n\t\t\t\t\t\t\t\t payment_gateway_code='\".$fatura[\"subscription_code\"].\"'\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$dbAdapter->query($q)->execute();\n\t\t\t\t\t\t\t\t echo $q.\"<br>\";\n\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t // se ja existir, atualizar status\n\t\t\t\t\t\t /*\n\t\t\t\t\t\t [CANCELADO NO MOIP] - cobrado e recorrencia autorizada\n\t\t\t\t\t\t aguardando atualização do endereço\n\t\t\t\t\t\t cancelado pelo usuario\n\t\t\t\t\t\t [ATRASADO] - cobrado e recorrencia autorizada\n\t\t\t\t\t\t cobrado e recorrencia autorizada\n\t\t\t\t\t\t substituida\n\t\t\t\t\t\t suspensa por não pagamento\n\t\t\t\t\t\t erro [Erro na requisição] - %\n\t\t\t\t\t\t cobrado e recorrencia autorizada - ACTIVE\n\t\t\t\t\t\t dados do cartão atualizados. Aguardando comunicação com MOIP.\n\t\t\t\t\t\t passo 2 - aguardando preenchimento do endereço\n\t\t\t\t\t\t \n\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t\t\t$quantidade++;\n\t\t\t\t\t\t\t\t\t\t$status_atual = $linha[\"status\"];\n\t\t\t\t\t\t\t\t\t\t$status_novo = $status_atual;\n\t\t\t\t\t\t\t\t\t\tswitch ($cobranca[\"status\"][\"code\"]) {\n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t case \"1\": \n\t\t\t\t\t\t\t\t\t\t\t \t\t// autorizado\n\t\t\t\t\t\t\t\t\t\t\t \t\t$status_novo = \"autorizado pela MOIP\";\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 break;\n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t case \"2\":\n\t\t\t\t\t\t\t\t\t\t\t \t\t// iniciado\n\t\t\t\t\t\t\t\t\t\t\t \t\t$status_novo = \"iniciado pela MOIP\";\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t case \"3\":\n\t\t\t\t\t\t\t\t\t\t\t \t\t// boleto impresso\n\t\t\t\t\t\t\t\t\t\t\t \t\t$status_novo = \"boleto Impresso\";\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t case \"4\":\n\t\t\t\t\t\t\t\t\t\t\t \t\t// concluído\n\t\t\t\t\t\t\t\t\t\t\t \t\t$status_novo = \"cobrado e recorrencia autorizada\";\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t case \"5\":\n\t\t\t\t\t\t\t\t\t\t\t \t\t// cancelado\n\t\t\t\t\t\t\t\t\t\t\t \t\t$status_novo = \"cancelado pelo usuario\";\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t case \"6\":\n\t\t\t\t\t\t\t\t\t\t\t \t\t// em análise\n\t\t\t\t\t\t\t\t\t\t\t \t\t$status_novo = \"em análise\";\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t case \"7\":\n\t\t\t\t\t\t\t\t\t\t\t \t\t// estornado\n\t\t\t\t\t\t\t\t\t\t\t \t\t$status_novo = \"estornado\";\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t case \"8\":\n\t\t\t\t\t\t\t\t\t\t\t \t\t// nao tem\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t case \"9\":\n\t\t\t\t\t\t\t\t\t\t\t \t\t// reembolsado\n\t\t\t\t\t\t\t\t\t\t\t \t\t$status_novo = \"reembolsado\";\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif ($status_novo!=$status_atual) {\n\t\t\t\t\t\t\t\t\t\t\t\t// atualizar status da [recorrencia e assinatura]\n\t\t\t\t\t\t\t\t\t\t\t\t$q = \"\n\t\t\t\t\t\t\t\t\t\t\t\tupdate\n\t\t\t\t\t\t\t\t\t\t\t\tcontributions\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\tset \n\t\t\t\t\t\t\t\t\t\t\t\tstatus='$status_novo', dt_status_change=CURRENT_TIMESTAMP()\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\twhere\n\t\t\t\t\t\t\t\t start_value='\".$fatura[\"occurrence\"].\"' and\n\t\t\t\t\t\t\t\t payment_gateway_code='\".$fatura[\"subscription_code\"].\"'\n\t\t\t\t\t\t\t\t\t\t\t\t\";\n\t\t\t\t \t\t\t\techo $q.\"<br>\";\n\t\t\t\t\t\t\t\t\t\t\t\t$dbAdapter->query($q)->execute();\n\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\tif ($quantidade==0) {\n\t\t\t\t\t\t\t\t\t\t// nao existe assinatura e recorrencia, INSERIR !\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t// primeiro pegar dados base \n\t\t\t\t\t\t $q = \"\n\t\t\t\t\t\t select\n\t\t\t\t\t\t id_user, id_project, id_payment\n\t\t\t\t\t\t \n\t\t\t\t\t\t from\n\t\t\t\t\t\t contributions\n\t\t\t\t\t\t \n\t\t\t\t\t\t where\n\t\t\t\t\t\t payment_gateway_code='\".$fatura[\"subscription_code\"].\"'\n\t\t\t\t\t\t \n\t\t\t\t\t\t limit \n\t\t\t\t\t\t 0, 1\n\t\t\t\t\t\t \";\n\t\t\t\t\t\t echo $q.\"<br>\";\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t$umResultSet2 = $dbAdapter->query($q)->execute();\n\t\t\t\t\t\t\t\t\t\t$quantidade = 0;\n\t\t\t\t\t\t\t\t\t\twhile ($linha = $umResultSet2->next()) {\n\t\t\t\t\t\t\t\t\t\t\t\t$fatura[\"amount\"] = substr($fatura[\"amount\"], 0, -2).\".\".substr($fatura[\"amount\"], -2);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t$q = \"\n\t\t\t\t\t\t\t\t\t\t\t\tinsert into contributions\n\t\t\t\t\t\t\t\t\t\t\t\t(id_user, id_project, id_payment, dt_contribution, value_contribution, status, start_value, dt_status_change, payment_gateway_code, invoice_code, payment_code) values\n\t\t\t\t\t\t\t\t\t\t\t\t('\".$linha[\"id_user\"].\"', '\".$linha[\"id_project\"].\"', '\".$linha[\"id_payment\"].\"', '\".$cobranca[\"creation_date\"][\"year\"].\"-\".$cobranca[\"creation_date\"][\"month\"].\"-\".$cobranca[\"creation_date\"][\"day\"].\" \".$cobranca[\"creation_date\"][\"hour\"].\":\".$cobranca[\"creation_date\"][\"minute\"].\":\".$cobranca[\"creation_date\"][\"second\"].\"', '\".$fatura[\"amount\"].\"', '\".$cobranca[\"status\"][\"description\"].\"', '\".$fatura[\"occurrence\"].\"', CURRENT_TIMESTAMP(), '\".$fatura[\"subscription_code\"].\"', '\".$fatura[\"subscription_code\"].\"', '\".$fatura[\"id\"].\"')\n\t\t\t\t\t\t\t\t\t\t\t\t\";\n\t\t\t\t \t\t\t\techo $q.\"<br>\";\n\t\t\t\t \t\t\t\t$dbAdapter->query($q)->execute();\n\t\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t\t};\n\n\t\t };\n\t\t \n\t\t echo \"---------------------------------------------------------------------<br>\";\n \t\t\n };\n\t\t\t \n\t\t //View de saída\n\t\t \t$umViewModel = new ViewModel();\n\t\t \t \n\t\t \treturn $umViewModel;\n }", "title": "" }, { "docid": "a1f078faef1926322fa1a6e5aa1b0331", "score": "0.50517094", "text": "public function applyDefaultValues()\n {\n $this->activo = 1;\n }", "title": "" }, { "docid": "565b8e597303dc20e1c453622eb73eae", "score": "0.5046474", "text": "public function muestrausuarios(){\n\t\t$objeto = new modelo();\n\t\t$data[\"titulo\"] = \"Usuarios\";\n\t\t$data[\"objeto\"] = $objeto->getUsuarios();\n\t\t$data[\"pagina\"] = $objeto->getPaginacionUsuarios();\n\n\t\t//mandando información del modelo a la vista\n\t\trequire_once \"vista/admin/adm_usuarios.php\";\n\t}", "title": "" }, { "docid": "ae445379955c9d9e621cbc58d14351ce", "score": "0.5043404", "text": "public function __construct(){\r\n\t\t\tparent::__construct();\r\n\t\t\t$this->_administracion = $this->loadModel('administracion');\r\n\t\t\t$this->_personal = $this->loadModel('personal');\r\n\r\n\t\t}", "title": "" }, { "docid": "df2cc32598162469580cc188a842927d", "score": "0.5039133", "text": "public function run()\n {\n $c=new Tipo_trabajo(array(\n \t'id_tipo_trabajo'=>'1',\n \t'nombre'=>'Instrumentación'\n ));\n $c->save();\n\n $c=new Tipo_trabajo(array(\n 'id_tipo_trabajo'=>'2',\n 'nombre'=>'Seguridad'\n ));\n $c->save();\n\n $c=new Tipo_trabajo(array(\n 'id_tipo_trabajo'=>'3',\n 'nombre'=>'Pintura'\n ));\n $c->save();\n\n $c=new Tipo_trabajo(array(\n 'id_tipo_trabajo'=>'4',\n 'nombre'=>'Mecanica'\n ));\n $c->save();\n\n $c=new Tipo_trabajo(array(\n 'id_tipo_trabajo'=>'5',\n 'nombre'=>'Electrica'\n ));\n $c->save();\n }", "title": "" }, { "docid": "afe877a071cf17cd6f02e976389f5d4a", "score": "0.5036553", "text": "public function activarCuenta($temp_pass){\r\n $data[\"menu_activo\"] = \"index\";\r\n $data[\"content\"] = \"index\";\r\n\t\t$data[\"total\"] = $this->carrito->get_total();\r\n\t\t$data[\"NumeroItems\"] = $this->carrito->get_numero_items();\r\n\t\t$data[\"recientes\"] = $this->Tienda_model->get_productos_recientes(6);\r\n\t\t#Comprobamos que la liga de activacion sea correcta\r\n $usuario =$this->Clientes_model->is_valid_pass_activate($temp_pass);\r\n\t\t\tif($usuario==FALSE){ \r\n\t\t\t#key invalido redirecciona a principal con un mensaje\r\n\t\t\t\t$data[\"msg\"] = \"error_activate\";\r\n\t\t\t\t$this->load->view(\"template\", $data);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t#liga correcta\r\n\t\t\t\t#activamos al usuario\r\n\t\t\t\tif($this->Clientes_model->update_activate($usuario->email))\r\n\t\t\t \t{ #Se pudo activar la cuenta\r\n\t\t\t \t #Activamos al usuario\r\n\t\t\t \t $this->session->set_userdata(\"usuario_logeado\", TRUE);\r\n\t\t\t\t $this->session->set_userdata(\"usuario\", $usuario);\t\r\n\t\t\t\t $data[\"msg\"] = \"succ_activate\";\r\n\t\t\t\t $this->load->view(\"template\", $data);\r\n\t\t\t \t}\r\n\t\t\t \telse{\r\n\t\t\t\t\t$data[\"msg\"] = \"error_activando_cuenta\";\r\n\t\t\t\t\t$this->load->view(\"template\", $data);\r\n\t\t\t \t}\r\n\t\t\t}\r\n }", "title": "" }, { "docid": "7a47529588515aaa562709160a68a496", "score": "0.5031663", "text": "public function run()\n {\n ModoPago::create([\n \t'nombre' => 'CAJA'\n ]);\n ModoPago::create([\n \t'nombre' => 'PAGO'\n ]); \n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "6242b5a76e7cc909f40c30bf50162e86", "score": "0.0", "text": "public function show(Service $service)\n {\n\n }", "title": "" } ]
[ { "docid": "1b84960e1b92d293ded93b3711f4a5bb", "score": "0.8233183", "text": "public function show(Resource $resource)\n {\n // not available for now\n }", "title": "" }, { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.81894475", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "ed2d107c1c9ce4912402cbef90125ac4", "score": "0.7609591", "text": "public function show(Resource $resource)\n\t{\n\t\treturn $resource;\n\t}", "title": "" }, { "docid": "364c14abc03f539e9a17828c2c3c5094", "score": "0.71428", "text": "protected function makeDisplayFromResource()\n\t{\n\t\treturn $this->activeResource->makeDisplay();\n\t}", "title": "" }, { "docid": "05f03e4964305c5851a8417af8f32544", "score": "0.66831124", "text": "public function show($resource, $id)\n {\n return $this->repository->get($id);\n }", "title": "" }, { "docid": "e21cb6c5a585a50a5b1a659e50a3576d", "score": "0.64457613", "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.6235311", "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.6226839", "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.61915004", "text": "public function show(Dispenser $dispenser)\n {\n //\n }", "title": "" }, { "docid": "990c774538153829a382b969fb274ad6", "score": "0.617914", "text": "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "title": "" }, { "docid": "0180fbb47af0be5e609b81a6e3465c37", "score": "0.6172935", "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.60798067", "text": "public function get(Resource $resource);", "title": "" }, { "docid": "1a2ff798e7b52737e1e6ae5b0d854f6a", "score": "0.60512996", "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.60386544", "text": "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "title": "" }, { "docid": "586d0347683cd6c5e16251dd1e1a0a98", "score": "0.6036201", "text": "public function show($id)\n {\n $data = Resource::findOrFail($id);\n return view('Resource/view', compact('data'));\n }", "title": "" }, { "docid": "da456d60e11065d629261fc79e691a95", "score": "0.6008594", "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.59945756", "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.5973403", "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.5963477", "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.5952755", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59065384", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59065384", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d2bd10ab674d0671bf2851850995cea8", "score": "0.58923435", "text": "public function show(Resena $resena)\n {\n }", "title": "" }, { "docid": "f02f37fffab992508c7d7d6f7ae94f94", "score": "0.58700746", "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": "d752fd3972b546ef194ae14ab221ca30", "score": "0.5868533", "text": "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "4aec6f94d5731faefe27bdf32f7cbd44", "score": "0.5851443", "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.5815833", "text": "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "title": "" }, { "docid": "305f64db85d64f68019d2fadcd0a85d2", "score": "0.580419", "text": "public function show()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "41e5ee3783ca0e67337c6b41b7d0ca62", "score": "0.5795106", "text": "public function display()\n {\n echo $this->fetch();\n }", "title": "" }, { "docid": "fd37d1765d15b4bc18c928879eeab887", "score": "0.5793256", "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": "5b7cde41d4a1270d31720878d4a50b19", "score": "0.57929426", "text": "public function show($id)\n\t{\n\t\treturn $this->success($this->resource->getById($id));\n\t}", "title": "" }, { "docid": "8e4604d345a4a1aa92109fa7c7b9b1e1", "score": "0.57844466", "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": "e918056f269cc66c35d0c9d5ae72cf98", "score": "0.57829785", "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": "dfcf7f89daddfb442f3e0ba6b417b34a", "score": "0.57822853", "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.5770989", "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": "a3e57330d7cd59896b945f16d0e12a89", "score": "0.5759738", "text": "public function display()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "fcef539023519ca355832da7d8f035c5", "score": "0.5758838", "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": "69113639710554fd174b3aaec6536b9c", "score": "0.5757928", "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": "1e8ae24781dac20c4f5e103867a805e0", "score": "0.57578564", "text": "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "title": "" }, { "docid": "e3b51ebfe04703c114ab39fc729ba43b", "score": "0.5751031", "text": "public function show(Entry $entry)\n {\n //\n }", "title": "" }, { "docid": "1eedca4ba72a90a807a2f92511283570", "score": "0.574881", "text": "public function show()\n\t{\n\n\n\t}", "title": "" }, { "docid": "5e79caa6f512ec951cafbf72e8caa6f2", "score": "0.5741311", "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.57376534", "text": "public function display($id = null) {\n \n }", "title": "" }, { "docid": "ca0564d197f7b97c9c7bb3bf9ec0d891", "score": "0.57360727", "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.5731491", "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.5727921", "text": "public function show($id)\n {\n //\n $this->_show($id);\n }", "title": "" }, { "docid": "20397e06b8673db8692c5f84120c3011", "score": "0.5727622", "text": "public function show()\n\t{\n\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5724217", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5724217", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5724217", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5724217", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5724217", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5724217", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5724217", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5724217", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5724217", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5724217", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5724217", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5720258", "text": "public function show($id) {}", "title": "" }, { "docid": "e3c948157c6e692386196d78f9677b46", "score": "0.5714068", "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.571107", "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.57058644", "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.57057875", "text": "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5704414", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5704414", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5704414", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5704414", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5704414", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5704414", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "d936662ad1c81979476df2e0767c5e19", "score": "0.57011694", "text": "public function show($id)\n\t{\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "9032057600ac1cb05d858c6264b8aed1", "score": "0.5692151", "text": "public function show()\n {\n return auth()->user()->getResource();\n }", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5686576", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5686576", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5686576", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5686576", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5686576", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5686576", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5686576", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5686576", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5686576", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5686576", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5686576", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5686576", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5686576", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5686576", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5686576", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5686576", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5686576", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5686576", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5686576", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5686576", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5686576", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5686576", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5686576", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5686576", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5686576", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5686576", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5686576", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5686576", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5686576", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5686576", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
2e98edbb96fa1e2b74250f759b751670
TODO: Implement getLoginUrl() method.
[ { "docid": "06396b4788acaade65530bf5bb382bff", "score": "0.859039", "text": "protected function getLoginUrl()\n {\n }", "title": "" } ]
[ { "docid": "21f8d709108a2f0c6f496d9c96c92237", "score": "0.8668882", "text": "public function get_login_url() { }", "title": "" }, { "docid": "06971c3b02873a2f3cd75dbe81b6f1c2", "score": "0.82232517", "text": "public function getLoginUrl();", "title": "" }, { "docid": "f1e198c281d7618a4e43bd23dd4b1ba0", "score": "0.80885834", "text": "public function getLoginURL()\n {\n return $this->loginUrl;\n }", "title": "" }, { "docid": "cbe1ab5f1cd2f5ab309bc3c3e8741067", "score": "0.80381733", "text": "protected function getLoginUrl()\n {\n return $this->host . self::REQUEST_URI_LOGIN;\n }", "title": "" }, { "docid": "823c2b2fb8623b9bf037dbd6ef5f07f6", "score": "0.77730966", "text": "public function getLoginRedirectUrl();", "title": "" }, { "docid": "51cde00fe05274de0539e8053a14e1b3", "score": "0.7717221", "text": "public function getLoginUrl()\n {\n return $this->getUrl('customer/account/login',array('_secure'=>true));\n }", "title": "" }, { "docid": "62b60b3a1c171af50aa101a3f50f9ddf", "score": "0.76248217", "text": "public function getLoginUrl() {\n $this->init();\n\n return $this->_client->createAuthUrl();\n }", "title": "" }, { "docid": "0524f9c2e38ff19c38ad26552b44e93e", "score": "0.7622132", "text": "public function getLoginUri()\n {\n return $this->loginUri;\n }", "title": "" }, { "docid": "555d43a8a7141f15d311300bbfe8689b", "score": "0.7613662", "text": "public function getLoginUrl()\n {\n return $this->_getUrl(self::ROUTE_ACCOUNT_LOGIN, $this->getLoginUrlParams());\n }", "title": "" }, { "docid": "555d43a8a7141f15d311300bbfe8689b", "score": "0.7613662", "text": "public function getLoginUrl()\n {\n return $this->_getUrl(self::ROUTE_ACCOUNT_LOGIN, $this->getLoginUrlParams());\n }", "title": "" }, { "docid": "070fdeefe11bf355e22dd705984ada21", "score": "0.75736964", "text": "public function LoginURL() {\n\t\treturn $this->Link(\"login\");\n\t}", "title": "" }, { "docid": "8f669fc7853049dd5b18573a4c38f4ce", "score": "0.75376874", "text": "public function login_url() {\n\t\t$login_url = \"\";\n\t\treturn $login_url;\n\t}", "title": "" }, { "docid": "53e8a52e4b3a876c9bf5252428d45c6e", "score": "0.75184166", "text": "public function login_url()\n {\n return $this->login_url = urldecode($this->fb->getLoginUrl(array(\n 'scope' => $this->config->scope,\n 'redirect_uri' => $this->config->redirect_uri,\n 'display' => $this->config->display,\n )));\n }", "title": "" }, { "docid": "04bc7ec9273a64f77fb74af73b3f75c6", "score": "0.7513714", "text": "public function loginUrl()\n\t{\n\t\tif (isset($this->file->login) && $this->file->login) {\n\t\t\tdefine(\"USER_LOGIN\", $this->file->login);\n\t\t}\n\t}", "title": "" }, { "docid": "e1f5f8394770cafc8871e68debbc9c50", "score": "0.7496788", "text": "public function getLoginUrl()\n {\n return $this->_customerUrl->getLoginUrl();\n }", "title": "" }, { "docid": "7b96682e31cdc15e07fcf84617d6b4a9", "score": "0.7489711", "text": "public function getLoginURL(): string\n {\n return \"{$this->loginUrl}?api_key={$this->apiKey}&v=3\";\n }", "title": "" }, { "docid": "f5e91e208a97aff6b5cd1b49323a5945", "score": "0.7438618", "text": "public function outputLoginUrl()\n\t{\n\t\techo App::e($this->app->uri->getLogin());\n\t}", "title": "" }, { "docid": "44c2385460a135d8b4c06388d0d6d8bd", "score": "0.7420125", "text": "public static function login_url()\n {\n return Controller::join_links(Director::baseURL(), self::config()->get('login_url'));\n }", "title": "" }, { "docid": "e5c97dce77d4b4b2d2878a1b78aa0285", "score": "0.74172443", "text": "protected function getLoginUrl(): string\n {\n return $this->router->generate(\"security_login\");\n }", "title": "" }, { "docid": "7e19c856188cf349cc93b20b083cdd5a", "score": "0.73952603", "text": "protected function getLoginUrl()\n {\n return $this->router->generate('api_login');\n }", "title": "" }, { "docid": "13607aa9e56e1b6ffc1bcfa84884062f", "score": "0.7342164", "text": "public function getLoginUrl()\n {\n return $this->instagram->getLoginUrl();\n }", "title": "" }, { "docid": "1faa9eddc4806218299ce8135d9c8e9e", "score": "0.73341346", "text": "protected function getAuthenticationUrl()\n {\n return '';\n }", "title": "" }, { "docid": "81b0b6e8014411e441cdcd1ed4ae585e", "score": "0.7298232", "text": "public function getLoginUrl()\n {\n return $this->facebook->getLoginUrl();\n }", "title": "" }, { "docid": "b9750d63f007c14bbb02859b4548f438", "score": "0.7282964", "text": "public function getLoginURL()\n {\n $url = \\Craft::$app->getConfig()->getGeneral()->siteUrl.'/'.\\Craft::$app->getConfig()->getGeneral()->cpTrigger.'/hubspot-toolbox/oauth/'.$this->handle.'/login';\n return $url;\n }", "title": "" }, { "docid": "817ccef9919dde33860456fc70bc0411", "score": "0.72802365", "text": "public function getLoginUrl()\n\t{\n\t\t$options = ['scope' => $this->scope];\n\t\tif ($this->state != null) {\n\t\t\t$options['state'] = $this->state;\n\t\t}\n\t\t$loginUrl = $this->provider->getAuthorizationUrl($options);\n\t\t$_SESSION['oauth2state'] = $this->provider->getState();\n\t\treturn $loginUrl;\n\t}", "title": "" }, { "docid": "e7cfccc9a1b1dc88f5568db1cee783dc", "score": "0.727241", "text": "public static function login()\n\t{\n\t\t\n\t\t$login = self::url([\"login\"]);\n\t\treturn $login;\n\t\t\n\t}", "title": "" }, { "docid": "b6a11f0b646993b4c83aea185661b280", "score": "0.72349405", "text": "function get_login_url() {\r\n\t\t// base_url (is the URL of the CORE -> send you to Core.php.index())\r\n\t\t$redirect_uri = base_url();\r\n\t\t// get the login url from facebook with the configured return uri\r\n\t\treturn $loginurl = $this->facebook->getLoginUrl(array('redirect_uri' => \"$redirect_uri\", 'scope' => 'email,read_friendlists'));\r\n\t}", "title": "" }, { "docid": "b1369d67280441858ecd6ccc7f66b9c3", "score": "0.722381", "text": "protected function getLoginUrl()\n {\n return $this->router->generate('login_route');\n }", "title": "" }, { "docid": "9f2e4ab32db3416e00c40beed1fef22e", "score": "0.7207486", "text": "public function getLoginRedirect()\n {\n return [\"/\"];\n }", "title": "" }, { "docid": "952fb831057deb6197eafb583ccbc199", "score": "0.72011924", "text": "public function url()\n {\n return '/login';\n }", "title": "" }, { "docid": "952fb831057deb6197eafb583ccbc199", "score": "0.72011924", "text": "public function url()\n {\n return '/login';\n }", "title": "" }, { "docid": "82177b7d2e36e7251a98abb645a47d93", "score": "0.7193066", "text": "public function getLogin()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "e27cac7f7bd3941621ded54a70085f1d", "score": "0.71825546", "text": "public function getLogin();", "title": "" }, { "docid": "e27cac7f7bd3941621ded54a70085f1d", "score": "0.71825546", "text": "public function getLogin();", "title": "" }, { "docid": "c0260b278b5c8ee7a3455be99dff40ef", "score": "0.7181181", "text": "public static function login() {\n return new moodle_url('/login/index.php');\n }", "title": "" }, { "docid": "0a9ddecb9dfdd80eb52dd3b93e49484d", "score": "0.71779454", "text": "public function getLoginUrl() {\n $params = array(\n 'client_id' => $this->_apikey,\n 'redirect_uri' => $this->_callbackurl,\n 'response_type' => 'code',\n 'scope' => $this->_scope\n );\n\n return self::API_OAUTH_URL.'?'.http_build_query($params);\n }", "title": "" }, { "docid": "dc61450e51a5177483bb3af6e685a262", "score": "0.71255875", "text": "public function getAuthUrl();", "title": "" }, { "docid": "6aa6f5467de235b2212b321bee0621c4", "score": "0.7108638", "text": "function get_login_url(){\n\t\t$this->ci->load->helper('url');\n\t\t$helper = $this->fb->getRedirectLoginHelper();\n\t\treturn $helper->getLoginUrl(site_url().'/user/login/login_facebook', ['email', 'user_photos']);\n\t}", "title": "" }, { "docid": "6f5d15287e884db5ab0663c1d4623fae", "score": "0.7087382", "text": "public static function getUserLogin(){\n return self::getServer() . \"/account/login/\" ;\n }", "title": "" }, { "docid": "7e24afbb158068037ac86caf084ec635", "score": "0.7084755", "text": "public function get_loginURL()\n {\n return 'https://www.facebook.com/dialog/oauth?client_id='.$this->_appId\n .'&redirect_uri='.urlencode($this->_callback)\n .'&scope='.$this->_CI->config->item('facebook_default_scope');\n }", "title": "" }, { "docid": "79a73bdc8457ca1cb77c90f2dae7d10a", "score": "0.70433885", "text": "public static function login_url($returnURL = \"\");", "title": "" }, { "docid": "61e7ecf5fc1dc8ba855d8ab69e330d3e", "score": "0.69938785", "text": "public function login()\n {\n $login_url = $this->fb->getLoginUrl(['email', 'publish_actions']);\n // print_r($login_url);\n // die();\n return $login_url;\n // Obviously you'd do this in blade :)\n //echo '<a href=\"' . $login_url . '\">Login with Facebook</a>';\n }", "title": "" }, { "docid": "7a84df2eca9bac2223fd3c40720deb86", "score": "0.69703215", "text": "function joints_login_url() { return home_url(); }", "title": "" }, { "docid": "d0fa160f49542dbd3be8b127d7b70681", "score": "0.6937603", "text": "public function getLoginPage()\n {\n return $this->loginPage;\n }", "title": "" }, { "docid": "3c89fd53285c342960f6f48474e9aab9", "score": "0.69249594", "text": "public function getLoginUrl()\n {\n $necktieUrl = $this->necktieUrl . self::NECKTIE_OAUTH_AUTH_URI;\n $this->stateCookie = $this->createStateCookie();\n $router = $this->router;\n $queryParameters = [\n 'client_id' => $this->necktieClientId,\n 'client_secret' => $this->necktieClientSecret,\n 'redirect_uri' => $this->router->generate(\n $this->loginResponseRoute,\n [],\n $router::ABSOLUTE_URL\n ),\n 'grant_type' => 'trusted_authorization',\n 'state' => $this->stateCookie->getValue(),\n ];\n $queryParametersString = http_build_query($queryParameters);\n\n return $necktieUrl . '?' . $queryParametersString;\n }", "title": "" }, { "docid": "c6889d653823d216560eecfdf29e15e6", "score": "0.69247526", "text": "function\t_frozen_login_url() {\n\t\t\t//Return the home url.\n\t\t\treturn home_url();\n\t\t}", "title": "" }, { "docid": "794b00095b168ce38069ba926642153b", "score": "0.69197476", "text": "function quindo_login_url() { return home_url(); }", "title": "" }, { "docid": "3e4fd7bdffbe30adf37016c73f95e989", "score": "0.6914998", "text": "public function getLoginUrl()\n\t{\n\t\t$scope = implode(\",\", $this->permArray);\n\t\t$loginUrl = 'https://www.facebook.com/dialog/oauth/?scope='.$scope.'&client_id='.$this->appID.'&redirect_uri='.$this->appPage;\n\t\theader('Location: '.$loginUrl);\n\t}", "title": "" }, { "docid": "a09842cf37be79bc462a9f6af40f4925", "score": "0.6911451", "text": "public function getLoginLinkPath()\n {\n return $this->getLinkPathFromHeader($this->__('Log In'));\n }", "title": "" }, { "docid": "d24e413cda0315d469c71bd085061c3d", "score": "0.689801", "text": "public function getAuthUrl(): string;", "title": "" }, { "docid": "49b6eb8f15900851fe4ca72f3dea7f69", "score": "0.6879696", "text": "public function login_redirect() {\n\n\t\t/**\n\t\t * this function is overwritten in the inheriting classes\n\t\t */\n\t}", "title": "" }, { "docid": "46f360331b263446e08434cebfd6b2c3", "score": "0.68683094", "text": "public function setRedirectOnLogin(){\n\t\t$_path = (string) $this->_getConfigValue('path_redirect');\n\t\treturn Mage::getUrl($_path);\n\t}", "title": "" }, { "docid": "e11e47469316d7bb6c151b0e5f439872", "score": "0.6848434", "text": "function icecreamcake_login_url() { return home_url(); }", "title": "" }, { "docid": "0829d075994b5d4a9b3f1eb791215a9a", "score": "0.6833569", "text": "public function login_custom_url() {\n return network_site_url(\"wp-admin\");\n }", "title": "" }, { "docid": "2cfa49c7cbdcae8b522dec1f9f5c6e27", "score": "0.68125635", "text": "public function login()\n {\n redirect($this->get_loginURL());\n }", "title": "" }, { "docid": "9ad98f8b1accfabbe912c2535471793b", "score": "0.6807421", "text": "function webdraftertheme_login_url() { return home_url(); }", "title": "" }, { "docid": "5c5829058e4182941251ed09f768625f", "score": "0.6805887", "text": "public function getOAuthLoginUrl()\n {\n $callback = $this->factory->getRouter()->generate('mautic_social_callback',\n array('network' => $this->getName()),\n true //absolute\n );\n\n $state = hash('sha1', uniqid(mt_rand()));\n $url = $this->getAuthenticationUrl()\n . '?client_id={clientId}' //placeholder to be replaced by whatever is the field\n . '&response_type=code'\n . '&redirect_uri=' . urlencode($callback)\n . '&state=' . $state; //set a state to protect against CSRF attacks\n $this->factory->getSession()->set($this->getName() . '_csrf_token', $state);\n\n return $url;\n }", "title": "" }, { "docid": "c84ad5d6165c35ed2f4065c0fdb329c7", "score": "0.6801685", "text": "public function gluu_sso_login_url()\n\t{\n $config = $this->config('gluu_sso.default');\n\t\t$openidurl=$config->get('openidurl');\n\t\t$oxd_port=$config->get('oxd_port');\n\t\t$user_acr=$config->get('user_acr');\n $oxd_id=$config->get('gluu_oxd_id');\n\t\t$scopes=$config->get('gluu_scopes');\n $gluu_config=$config->get(\"gluu_config\");\n $base_url=self::gluu_sso_getbaseurl();\n if($oxd_id =='')\n {\n drupal_set_message('Please check your admin settings');\n $response = new RedirectResponse($base_url);\n $response->send();\n return;\n }\n else {\n\n $get_authorization_url = new Get_authorization_url();\n $get_authorization_url->setRequestOxdId($oxd_id);\n $get_authorization_url->setRequestScope($gluu_config['scope']);\n $get_authorization_url->setRequestAcrValues(array($user_acr));\n $get_authorization_url->request();\n header(\"Location: \".$get_authorization_url->getResponseAuthorizationUrl());\n\t\t exit;\n }\n\t}", "title": "" }, { "docid": "54c39bd56e5b771ecc35992018248253", "score": "0.6796461", "text": "function markcond_login_url() { return home_url(); }", "title": "" }, { "docid": "3108648fab88ad8fff3fb591912793e4", "score": "0.6773516", "text": "function custom_login_permalink() {\n\t\t$login_url = get_theme_mod('capstone_auth_login_page') ? get_permalink(get_theme_mod('capstone_auth_login_page')) . '?redirect_to=' . get_permalink() : wp_login_url( get_permalink() );\n\t\techo sprintf( __( 'You must <a href=\"%s\">sign in</a> to apply for this position.', 'capstone' ), $login_url );\n\t}", "title": "" }, { "docid": "f1a8c1cb14a9b93d1c0558fba827614a", "score": "0.6740114", "text": "public function login() { }", "title": "" }, { "docid": "fa8674232e2f129f4ea71524a4f8fd06", "score": "0.6736338", "text": "public function login();", "title": "" }, { "docid": "e4b48f5c828fabda556fbf233d33a779", "score": "0.6725011", "text": "abstract function getLoginURL($service);", "title": "" }, { "docid": "4c5cc49a0cd7c7100bdfbfa39e47adc0", "score": "0.67172825", "text": "public function loginLink()\n {\n $client = Utils\\CloudClient::getClient();\n return json_decode($client->post($this->url . \"/loginLink\")->body)->link;\n }", "title": "" }, { "docid": "3d1f8c3a5f54d12527bb3baca0367dfa", "score": "0.67030954", "text": "public function getLoginUrl()\n\t{\n\t\t$this->twitterOAuth = new Abraham\\TwitterOAuth\\TwitterOAuth($this->params['consumerKey'], $this->params['consumerSecret']);\n\t\t$this->requestToken = $this->twitterOAuth->oauth(\n\t\t\t'oauth/request_token',\n\t\t\t[\n\t\t\t\t'oauth_callback' => $this->params['callbackURL'],\n\t\t\t],\n\t\t);\n\n\t\t$sessionSection = $this->session->getSection('twitter');\n\t\t$sessionSection->oauth_token = $token = $this->requestToken['oauth_token'];\n\t\t$sessionSection->oauth_token_secret = $this->requestToken['oauth_token_secret'];\n\n\t\t$loginUrl = $this->twitterOAuth->url(\n\t\t\t'oauth/authorize',\n\t\t\t[\n\t\t\t\t'oauth_token' => $this->requestToken['oauth_token'],\n\t\t\t],\n\t\t);\n\t\treturn $loginUrl;\n\t}", "title": "" }, { "docid": "e507f516dc0bcdaf597e909680f50f8a", "score": "0.66952646", "text": "Abstract Public Function login();", "title": "" }, { "docid": "de3118b9ee84ae7f7cf8636d5b23af3c", "score": "0.6690688", "text": "public function loginHeaderUrl()\n {\n return home_url();\n }", "title": "" }, { "docid": "caeb3ad85d411a8c9cd90e70f9fbb439", "score": "0.66889584", "text": "public function get_auth_url()\n {\n // \"max_auth_age\" is needed because the user needs to always log in\n // and not use an existing session.\n return $this->client->createAuthUrl() . '&max_auth_age=0';\n }", "title": "" }, { "docid": "8fb592b2af597354b44f5a6b6b6d10d2", "score": "0.66873103", "text": "public function actionLogin() {\n\t\t\n\t\ttry {\n\t\t\t//if(isset(Yii::app()->session['login']))\n\t\t\tif (!isset(Yii::app()->session['hybridauth-ref'])) {\n\t\t\t\tYii::app()->session['hybridauth-ref'] = Yii::app()->request->urlReferrer;\n\t\t\t}\n\t\t\t$this->_doLogin();\n\t\t} catch (Exception $e) {\n\t\t\tYii::app()->user->setFlash('hybridauth-error', \"Something went wrong, did you cancel?\");\n\t\t\t$this->redirect(Yii::app()->session['hybridauth-ref'], true);\n\t\t}\n\t}", "title": "" }, { "docid": "3c05a5ba8814b87d4d102d2fccec0cab", "score": "0.66820675", "text": "private function getLoginPage()\n {\n // Set the login page\n $this->loginPage = $this->loginPage ?? $this->getClient()->get($this->loginUrl);\n\n return $this->loginPage;\n }", "title": "" }, { "docid": "cae01b9904edf611e8f42376fb717858", "score": "0.6671843", "text": "private function get_authorize_login_url() {\n // the site for Facebook, then come back via redirect URI\n if ( ! session_id() ) {\n session_start( array( 'read_and_close' => true ) );\n }\n\n $fb = new Facebook\\Facebook([\n 'app_id' => $this->app_id,\n 'app_secret' => $this->app_secret,\n 'default_graph_version' => self::DEFAULT_GRAPH_VERSION,\n ]);\n\n $helper = $fb->getRedirectLoginHelper();\n\n $permissions = ['email']; // Optional permissions TODO possibly remove?\n $loginUrl = $helper->getLoginUrl( $this->callback_url, $permissions );\n\n return $loginUrl;\n }", "title": "" }, { "docid": "97f08c4de0a4c29a6677ecd1bf472511", "score": "0.6671227", "text": "public function login($redirect_url=NULL);", "title": "" }, { "docid": "f6a5eed5a9b99832741298344cbf53c9", "score": "0.6667847", "text": "public function getLoginUrl()\n {\n $endpoint = \"https://www.facebook.com/dialog/oauth?\"; \n \n $options = array(\n 'client_id' => $this->appId,\n 'redirect_uri'\t=> $this->redirect_uri,\n 'scope'\t\t\t=> 'email,user_education_history,user_birthday,user_location',\n// 'scope'\t\t\t=> 'email,user_education_history,read_stream,publish_stream,user_birthday,user_location',\n 'state' => $this->generateState()\n\t\t);\n \n $url = $endpoint.http_build_query($options);\n \n return $url;\n }", "title": "" }, { "docid": "cd02f275f44eccdc044132e525e5948f", "score": "0.66667914", "text": "public static function RedirectToLogin() {\n\t\t\tQApplication::Redirect('/login/?strReferer=' . urlencode(QApplication::$RequestUri));\n\t\t}", "title": "" }, { "docid": "a26e1e5aa18ed92852730f47bc64c820", "score": "0.66616136", "text": "function bt_custom_login_url() {\n\treturn site_url();\n}", "title": "" }, { "docid": "b5a98c0f604e01a6da9dabfdb7b1cf03", "score": "0.6657276", "text": "protected function getAuthenticationURL()\n {\n return $this->getBaseEntrypoint() . self::SUB_URL_AUTH;\n }", "title": "" }, { "docid": "a653d2090cfaec1d4fa6439bb72aec13", "score": "0.6653688", "text": "public function getLoginURL() {\n\n if( !$this->oFB ) {\n return false;\n }\n\n $oHelper = NULL;\n $oHelper = $this->oFB->getRedirectLoginHelper();\n\n return $oHelper->getLoginUrl(\n self::getOAuthRedirectUrl()\n , ['manage_pages','publish_pages']\n );\n }", "title": "" }, { "docid": "2901d0222c7d185921ea08da239513c1", "score": "0.6647511", "text": "public function getLoginURL() {\r\n if (isset($this->app_id)) {\r\n $helper = $this->fb->getRedirectLoginHelper(); \r\n $loginUrl = $helper->getLoginUrl($this->facebook_callback, static::PERMISSIONS);\r\n return $loginUrl;\r\n }\r\n }", "title": "" }, { "docid": "f6c2753691170c461671bbbef530176c", "score": "0.66272414", "text": "public function getLoginUrl()\n {\n $host = 'https://'.$this->_config['host'].':'.$this->_getPort().'/';\n\n return $host;\n }", "title": "" }, { "docid": "42044f6d7af554e26026ee980a138db9", "score": "0.66212213", "text": "public function getLogin()\n {\n if(isset($this->post_params['login']))\n {\n\t\t\tif(!isset($this->post_params['remember']))\n\t\t\t{\n\t\t\t\t$this->post_params['remember'] = false;\n\t\t\t}\n $user_manager = new UserManager;\n $this->response['login_error'] = $user_manager->logUser(\n\t\t\t$this->post_params['username'],\n\t\t\t$this->post_params['password'],\n\t\t\t$this->post_params['remember']);\n }\n\t}", "title": "" }, { "docid": "936a849e02f055c5d43bfc9a1e504a77", "score": "0.6615216", "text": "public function getLoginPostUrl(){\n $secure = Mage::app()->getStore()->isCurrentlySecure();\n return $this->getUrl(\"oink/checkout/loginPost\",array(\"_secure\"=>$secure));\n }", "title": "" }, { "docid": "e38f78a51d55705a6f43866a3cd59aa8", "score": "0.66143066", "text": "public function requireLogin();", "title": "" }, { "docid": "9dd1bddc64512997b9b368197b7e170f", "score": "0.6611432", "text": "public function url()\n {\n return '/admin/login';\n }", "title": "" }, { "docid": "7b7226977be5d0ca50654d6db7e741ba", "score": "0.6601287", "text": "public function url()\n {\n return 'https://gymbox.legendonlineservices.co.uk/enterprise/account/login';\n }", "title": "" }, { "docid": "6a9c3d11a24e4f094b158677d0203ff8", "score": "0.6599082", "text": "function bones_login_url() { return home_url(); }", "title": "" }, { "docid": "6a9c3d11a24e4f094b158677d0203ff8", "score": "0.6599082", "text": "function bones_login_url() { return home_url(); }", "title": "" }, { "docid": "ad38b5d38c21550a3ae99103adb131fe", "score": "0.6595661", "text": "public static function getEmailLoginUrl()\n\t\t{\n\t\t\treturn self::BX_SERVER . \n\t\t\t\t\t'user-login/' . \n\t\t\t\t\t$_SESSION['bxkey'] . \n\t\t\t\t\t'?callback_url=' . self::$callbackUrl;\n\t\t}", "title": "" }, { "docid": "917e862ab9f11a4c8e9fb24f613c802a", "score": "0.6590766", "text": "public function loginPath() {\n\t\treturn property_exists($this, 'loginPath') ? $this->loginPath : '/auth/login';\n\t}", "title": "" }, { "docid": "b70cbbd3af99cbdeef8c03bb06bdda23", "score": "0.6589075", "text": "public static function getApiUrl()\n {\n return static::TRADESHIFT_AUTH__LOGIN_URL . '?response_type=code&client_id=' . static::TRADESHIFT_CLIENT_ID . '&redirect_uri='. static::TRADESHIFT_REDIRECT_URL . '&scope=openid';\n\n }", "title": "" }, { "docid": "100dbc10fa93e7764bcf32d442f6527b", "score": "0.6575699", "text": "public function getLogin()\r\n {\r\n return $this->login;\r\n }", "title": "" }, { "docid": "bbf9a3d2340e451562c0bf06c225f30d", "score": "0.65732867", "text": "private function _loginPostRedirect()\n {\n $session = $this->_getSession();\n if ($referer = $this->getRequest()->getParam(Mage_Customer_Helper_Data::REFERER_QUERY_PARAM_NAME)) {\n $referer = Mage::helper('core')->urlDecode($referer);\n if ((strpos($referer, Mage::app()->getStore()->getBaseUrl()) === 0) ||\n (strpos($referer, Mage::app()->getStore()->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK, TRUE)) === 0)) {\n $session->setBeforeAuthUrl($referer);\n } else {\n $session->setBeforeAuthUrl(Mage::helper('customer')->getDashboardUrl());\n }\n } else {\n $session->setBeforeAuthUrl(Mage::helper('customer')->getDashboardUrl());\n }\n\n $this->_redirectUrl($session->getBeforeAuthUrl(TRUE));\n }", "title": "" }, { "docid": "595c4660d8114103fdd3d4a2d273dd4d", "score": "0.6573186", "text": "public function loginPath()\n\t{\n\t\treturn property_exists($this, 'loginPath') ? $this->loginPath : '/auth/login';\n\t}", "title": "" }, { "docid": "656c05adf37a6cc67c8b1c6600ddc7ee", "score": "0.65688103", "text": "function get_login_redirect() {\n global $aws_region;\n\n // Get the instance id for this by using instance metadata\n $instance_id = file_get_contents('http://169.254.169.254/latest/meta-data/instance-id/');\n\n // Need an Ec2Client\n $ec2 = new Ec2Client([\n 'region' => $aws_region,\n 'version' => 'latest'\n ]);\n\n // Get the tags for this instance id\n $result = $ec2->describeTags([\n 'Filters' => [\n [\n 'Name' => 'resource-id',\n 'Values' => [$instance_id, ],\n ],\n ],\n ]);\n\n // Username is stored in the tags with key -- 'analyserver-owner'\n for ($i=0; $i<count($result['Tags']); $i++) {\n if ($result['Tags'][$i]['Key'] == 'redirect-to-authserver') {\n $_SESSION['redirect_url'] = $result['Tags'][$i]['Value'];\n break;\n }\n }\n }", "title": "" }, { "docid": "71802604ae302243b08f9fe232531109", "score": "0.6563082", "text": "public function getSingleSignOnUrl();", "title": "" }, { "docid": "5bc59b62465860f12ff7f11cb894dd01", "score": "0.655855", "text": "public function GetSignedInUrl ();", "title": "" }, { "docid": "2490c944404c240e4232a1da889d4f92", "score": "0.6543634", "text": "public function afterLoginSuccessPath();", "title": "" }, { "docid": "84ebd9be48373ecac32360bf19f6856b", "score": "0.65398246", "text": "public function loginPath()\n\t{\n\t\treturn property_exists($this, 'loginPath') ? $this->loginPath : '/login';\n\t}", "title": "" }, { "docid": "0bbe716ac57e8576e2f9481095e275d8", "score": "0.65371567", "text": "public function login()\n {\n return $this->facebook->redirectToLogin();\n }", "title": "" }, { "docid": "0d7aa3a81d3aee3348d8267562703358", "score": "0.6528011", "text": "public function getLogin()\n {\n return $this->login;\n }", "title": "" }, { "docid": "0d7aa3a81d3aee3348d8267562703358", "score": "0.6528011", "text": "public function getLogin()\n {\n return $this->login;\n }", "title": "" } ]
6801adecc43c89d8d2a80e8679ffaf47
Parse API result from Youtube to a standard Object
[ { "docid": "de72e0fd419f37eb77e36c19f6385c43", "score": "0.0", "text": "public function response_handler($response)\n\t{\n\t\tif ($response) {\n $response = json_decode($response);\n if ($response === null && json_last_error() !== JSON_ERROR_NONE) {\n return [];\n }\n\t\t\treturn $response;\n\t\t}\n\t\treturn [];\n }", "title": "" } ]
[ { "docid": "900fda6c5894f89a984f2476cd48c671", "score": "0.7008835", "text": "private function parseResult($result){\n $final = [];\n foreach ($result->items as $item) {\n $eachItem = [];\n $eachItem[\"id\"] = $item->id->videoId;\n $eachItem[\"url\"] = 'https://www.youtube.com/watch?v='.$item->id->videoId;\n $eachItem[\"title\"] = $item->snippet->title;\n $eachItem[\"thumbnail\"] = $item->snippet->thumbnails->high->url;\n $final[] = $eachItem;\n }\n return $final;\n }", "title": "" }, { "docid": "8415317efd38905af53ccc2e512aa78e", "score": "0.63647634", "text": "function get_data_from_youtube($url){\n $curl = curl_init();\n\n curl_setopt_array($curl, array(\n CURLOPT_URL => $url,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_HTTPHEADER => array(\n \"cache-control: no-cache\"\n ),\n ));\n\n $response = curl_exec($curl);\n $err = curl_error($curl);\n\n curl_close($curl);\n\n return json_decode($response, true);\n}", "title": "" }, { "docid": "f4a79c8a8ad42727b90a8aadbb1d37f7", "score": "0.62599427", "text": "public function testParseYoutubePlaylistSuccess()\n {\n $parserService = new ParserService();\n $video = $parserService->parse(new Video(), self::$youtubePlaylistUrl);\n \n // Assert video server\n $videoServer = ListServer::getServerName($video->getVideoServer());\n $this->assertEquals('Youtube', $videoServer);\n \n // Assert video id\n $this->assertEquals('PtmsoAbqT8w', $video->getVideoId());\n \n // Assert thumb\n $this->assertNotNull($video->getThumb());\n }", "title": "" }, { "docid": "700b4f3cf4eefd551392e979fab93c9e", "score": "0.6051963", "text": "public function parse(): object\n {\n $parsed = [\n 'host_status' => $this->host_status,\n 'raw' => (object) $this->results,\n ];\n\n if (count($this->round_trip_time) > 0) {\n $parsed['latency'] = $this->round_trip_time['avg'];\n $parsed['rtt'] = (object) $this->round_trip_time;\n }\n\n if (count($this->sequence) > 0) {\n $parsed['sequence'] = (object) $this->sequence;\n }\n\n if (count($this->statistics) > 0) {\n $parsed['statistics'] = (object) $this->statistics;\n }\n\n return (object) $parsed;\n }", "title": "" }, { "docid": "85ae9ae4730211c2078fbb8e034c982f", "score": "0.60044473", "text": "function get_youtube_meta_data($video_id = \"\") {\r\n if ($video_id == \"\") {\r\n return \"\";\r\n }\r\n $youtube_meta = array();\r\n $youtube_url = \"http://gdata.youtube.com/feeds/api/videos/\" . $video_id;\r\n $youtube_file = download_url($youtube_url);\r\n if (is_wp_error($youtube_file)) {\r\n return false;\r\n }\r\n $youtube_xml = simplexml_load_file($youtube_file);\r\n $youtube_meta[\"author\"] = (string) $youtube_xml->author->name;\r\n $youtube_media = $youtube_xml->children(\"http://search.yahoo.com/mrss/\");\r\n $youtube_meta[\"title\"] = $youtube_media->group->title;\r\n $youtube_meta[\"description\"] = $youtube_media->group->description;\r\n $thumbnails = $youtube_xml->xpath(\"media:group/media:thumbnail\");\r\n $youtube_meta[\"thumbnail_url\"] = (string) $thumbnails[0][\"url\"];\r\n unlink($youtube_file);\r\n return $youtube_meta;\r\n}", "title": "" }, { "docid": "cd45d88f569f4cd133b69433948080bd", "score": "0.58984387", "text": "public function YoutubeAction($id){\n\n \"https://www.googleapis.com/youtube/v3/videos?part=snippet&id=ew2Xh4gPots&fields=items/snippet/title,items/snippet/description&key=AIzaSyCdILi8yhSniTdGSyzHRHXdZjm6BKhb47w\";\n\n $content = file_get_contents(\"http://www.youtube.com/oembed?url=http://www.youtube.com/watch?v=\".$id.\"&format=json\");\n $json_output = json_decode($content, true);\n\n /*\n $xml = file_get_contents(\"http://www.youtube.com/oembed?format=xml&url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D\".$id);\n\n //$video = new \\SimpleXMLElement($xml);\n //exit(dump($video));\n /*$crawler = new Crawler($link);\n $crawler->get_page();\n $h1 = $crawler->get_h1();\n */\n // parse video entry\n\n $image = 'http://i3.ytimg.com/vi/'.$id.'/default.jpg';\n $title = htmlentities($json_output['title']);\n\n $data = <<<EOF\n<videos>\n <video>\n <Title>$title</Title>\n <Image>$image</Image>\n </video>\n</videos>\nEOF;\n $response = new Response();\n $response->setContent($data);\n $response->headers->set('Content-Type', 'application/xml');\n\n return $response;\n }", "title": "" }, { "docid": "4205ac96491589bcfe128f9aeba2da32", "score": "0.58832014", "text": "public function testParseClassicYoutubeVideoSuccess()\n {\n $parserService = new ParserService();\n $video = $parserService->parse(new Video(), self::$youtubeClassicUrl);\n \n // Assert video server\n $videoServer = ListServer::getServerName($video->getVideoServer());\n $this->assertEquals('Youtube', $videoServer);\n \n // Assert video id\n $this->assertEquals('PtmsoAbqT8w', $video->getVideoId());\n \n // Assert thumb\n $this->assertNotNull($video->getThumb());\n }", "title": "" }, { "docid": "00c63162a1bfbd5ee326429f08f144e4", "score": "0.58422947", "text": "private function _extractVideoInfo($data) {\n\t\t$video = array();\n\t\t$video['ID'] = intval($data->id);\n\t\t$video['Title'] = new Text(null);\n\t\t$video['Title']->setValue(trim($data->title));\n\t\t/*\n\t\t * need to clean up the text returned from Vimeo and paragraph format it so we can use\n\t\t * all the nifty SilverStripe text functionality. :)\n\t\t */\n\t\t$desc = nl2br(trim($data->description));\n\t\t$desc = str_replace(\"<br />\\n<br />\", '<br />', $desc);\n\t\t$desc = '<p>' . str_replace('<br />', '</p><p>', $desc) . '</p>';\n\t\t$video['Description'] = new HTMLText();\n\t\t$video['Description']->setValue($desc);\n\t\t\n\t\t// video url info\n\t\tforeach($data->urls->url as $url) {\n\t\t\tswitch($url->type) {\n\t\t\t\tcase 'video':\n\t\t\t\t\t$video['Url'] = new Text();\n\t\t\t\t\t$video['Url']->setValue(trim($url->_content));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'mobile':\n\t\t\t\t\t$video['MobileUrl'] = new Text();\n\t\t\t\t\t$video['MobileUrl']->setValue(trim($url->_content));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t// do nothing.\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// video date info\n\t\t$upload_date = trim($data->upload_date);\n\t\t// create a SS_Datetime object so we can use familiar functionality.\n\t\t$ud = new SS_Datetime();\n\t\t$ud->setValue($upload_date);\n\t\t$video['UploadDate'] = $ud;\n\t\t$modified_date = trim($data->modified_date);\n\t\t// create a SS_Datetime object so we can use familiar functionality.\n\t\t$md = new SS_Datetime();\n\t\t$md->setValue($modified_date);\n\t\t$video['ModifiedDate'] = $md;\n\t\t\n\t\t// video thumbnail info\n\t\tforeach($data->thumbnails->thumbnail as $tn) {\n\t\t\tif(strpos($tn->_content, '_100.jpg') !== false) {\n\t\t\t\t$video['ThumbSmall'] = new Text();\n\t\t\t\t$video['ThumbSmall']->setValue(trim($tn->_content));\n\t\t\t} elseif (strpos($tn->_content, '_200.jpg') !== false) {\n\t\t\t\t$video['ThumbMedium'] = new Text();\n\t\t\t\t$video['ThumbMedium']->setValue(trim($tn->_content));\n\t\t\t} elseif (strpos($tn->_content, '_640.jpg') !== false) {\n\t\t\t\t$video['ThumbLarge'] = new Text();\n\t\t\t\t$video['ThumbLarge']->setValue(trim($tn->_content));\n\t\t\t} \n\t\t}\n\t\t\n\t\t// User information\n\t\t$video['UserName'] = new Varchar(null, 255);\n\t\t$video['UserName']->setValue(trim($data->owner->username));\n\t\t$video['UserDisplayName'] = new Varchar(null, 255);\n\t\t$video['UserDisplayName']->setValue(trim($data->owner->display_name));\n\t\t$video['UserRealName'] = new Varchar(null, 255);\n\t\t$video['UserRealName']->setValue(trim($data->owner->realname));\n\t\t$video['UserID'] = (int)trim($data->owner->id);\n\t\t$video['UserUrl'] = new Text();\n\t\t$video['UserUrl']->setValue(trim($data->owner->profileurl));\n\t\t// User photos\n\t\tfor($i=0;$i<count($data->owner->portraits->portrait);$i++) {\n\t\t\t$tn = $data->owner->portraits->portrait[$i];\n\t\t\tswitch($i) {\n\t\t\t\tcase 0:\n\t\t\t\t\t$video['UserPortraitSmall'] = new Text();\n\t\t\t\t\t$video['UserPortraitSmall']->setValue(trim($tn->_content));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\t$video['UserPortraitMedium'] = new Text();\n\t\t\t\t\t$video['UserPortraitMedium']->setValue(trim($tn->_content));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\t$video['UserPortraitLarge'] = new Text();\n\t\t\t\t\t$video['UserPortraitLarge']->setValue(trim($tn->_content));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\t$video['UserPortraitXLarge'] = new Text();\n\t\t\t\t\t$video['UserPortraitXLarge']->setValue(trim($tn->_content));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t// do nothing.\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$video['NumberLikes'] = intval(trim($data->number_of_likes));\n\t\t$video['NumberPlays'] = intval(trim($data->number_of_plays));\n\t\t$video['NumberComments'] = intval(trim($data->number_of_comments));\n\t\t$video['Duration'] = intval(trim($data->duration));\n\t\t$video['Width'] = intval(trim($data->width));\n\t\t$video['Height'] = intval(trim($data->height));\n\t\t$video['IsHD'] = new Boolean(null);\n\t\t$video['IsHD']->setValue(intval($data->is_hd));\n\t\t$video['EmbedPrivacy'] = new Text();\n\t\t$video['EmbedPrivacy']->setValue(trim($data->embed_privacy));\n\t\t\n\t\treturn $video;\n\t}", "title": "" }, { "docid": "c9667005f9057fe387d49bfcdf076807", "score": "0.57128954", "text": "private function fetch($ID) {\n\t\t\t$URL = \"http://youtube.com/get_video_info?video_id=\" . $ID;\n\t\t\t\n\t\t//Fetch the contents of the requested page\n\t\t\t$contents = file_get_contents($URL);\n\t\t\t\n\t\t//Explode query so that the entire query can be parsed into an array\n\t\t\t$firstSplit = explode(\"&\", $contents);\n\t\t\t\n\t\t//Parse the contents into an array\n\t\t\t$return = array();\n\t\t\t\n\t\t\tforeach ($firstSplit as $value) {\n\t\t\t\t$secondSplit = explode(\"=\", $value);\n\t\t\t\t\n\t\t\t//Some parameters will require additional parsing\n\t\t\t\tswitch ($secondSplit['0']) {\t\t\t\t\t\t\n\t\t\t\t//The \"url_encoded_fmt_stream_map\" parameter is weird and it required more parsing, as in includes all of the video URLs\n\t\t\t\t\tcase \"url_encoded_fmt_stream_map\" : \t\t\t\t\t\t\n\t\t\t\t\t//This is a URL encoded query within the \"url_encoded_fmt_stream_map\", so this requires it own, subparser\n\t\t\t\t\t\t$URLFMTsSplit = explode(\"&\", urldecode($secondSplit['1']));\n\t\t\t\t\t\t$returnURLFMTs = array();\n\t\t\t\t\t\t\n\t\t\t\t\t//This query value has parameter names that repeat in a pattern: url, quality, fallback_host, type, itag. Append an interator to avoid conflicts\n\t\t\t\t\t\t$iterator = 1;\n\t\t\t\t\t\t\n\t\t\t\t\t\tforeach ($URLFMTsSplit as $URLFMTs) {\t\n\t\t\t\t\t\t\t$URLFMTsDetails = explode(\"=\", $URLFMTs);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tswitch ($URLFMTsDetails['0']) {\n\t\t\t\t\t\t\t//The \"type\" parameter *may* have an embedded \"codecs\" paramter that can be pulled out\n\t\t\t\t\t\t\t\tcase \"type\" : \n\t\t\t\t\t\t\t\t//There will be a \"; \", if a codec name is provided\n\t\t\t\t\t\t\t\t\t$typeSplit = explode(\"; \", urldecode($URLFMTsDetails['1']));\n\t\t\t\t\t\t\t\t\t$returnCodecs = array();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//Generate the \"codecs\" parameter\n\t\t\t\t\t\t\t\t\tif (!empty($typeSplit['1'])) {\n\t\t\t\t\t\t\t\t\t//If we are given this for the codec parameter: codecs=\"vp8.0, vorbis\", strip the 'codecs=\"' and '\"'\n\t\t\t\t\t\t\t\t\t\t$codecs = str_replace('codecs=\"', \"\", $typeSplit['1']);\n\t\t\t\t\t\t\t\t\t\t$codecs = str_replace('\"', \"\", $codecs);\n\t\t\t\t\t\t\t\t\t\t$codecs = explode(\", \", $codecs);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tforeach ($codecs as $codec) {\n\t\t\t\t\t\t\t\t\t\t\t$returnCodecs[] = urldecode($codec);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//Append \"type\" parameter\n\t\t\t\t\t\t\t\t\t$returnURLFMTs[\"type_\" . $iterator] = urldecode($typeSplit['0']);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//Append the codecs parameter\n\t\t\t\t\t\t\t\t\t$returnURLFMTs[\"codecs_\" . $iterator] = $returnCodecs;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//The \"itag\" parameter requires even more parsing as a video URL is listed within this parameter\n\t\t\t\t\t\t\t\tcase \"itag\" : \n\t\t\t\t\t\t\t\t\t$itagSplit = explode(\",\", urldecode($URLFMTsDetails['1']));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//The above split seperated the \"itag\" number from an attached \"url\" parameter. Attach the \"itag\" parameter here...\n\t\t\t\t\t\t\t\t\t$returnURLFMTs[$URLFMTsDetails['0'] . \"_\" . $iterator] = urldecode($itagSplit['0']);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//...increment the iterator at the end of every pattern (which is after each \"itag\" parameter) ...\n\t\t\t\t\t\t\t\t\t$iterator ++;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//... finally append the next \"url\" parameter. Note that the last \"itag\" in the list will not have a URL (WHY???)\n\t\t\t\t\t\t\t\t//Note the use of the \"$URLFMTsDetails\", since the explode at the \"=\" exploded this off the end of the \"itag\" parameter, and must be retrieved there\n\t\t\t\t\t\t\t\t\tif (!empty($URLFMTsDetails['2'])) {\n\t\t\t\t\t\t\t\t\t\t$returnURLFMTs[\"url_\" . $iterator] = urldecode($URLFMTsDetails['2']);\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\tbreak;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//This can be parse regularily\n\t\t\t\t\t\t\t\tdefault : \n\t\t\t\t\t\t\t\t\t$returnURLFMTs[$URLFMTsDetails['0'] . \"_\" . $iterator] = urldecode($URLFMTsDetails['1']);\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\t\t\t\t\t\t\n\t\t\t\t\t\t$return[$secondSplit['0']] = $returnURLFMTs;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t//Break the following parametersy into an array\n\t\t\t\t\tcase \"keywords\" : \n\t\t\t\t\tcase \"fmt_list\" : \n\t\t\t\t\tcase \"ad_channel_code_overlay\" : \n\t\t\t\t\tcase \"fexp\" : \n\t\t\t\t\tcase \"excluded_ads\" : \n\t\t\t\t\tcase \"watermark\" : \n\t\t\t\t\t\t$objectSplit = explode(\",\", urldecode($secondSplit['1']));\n\t\t\t\t\t\t$returnObject = array();\n\t\t\t\t\t\t\n\t\t\t\t\t\tforeach ($objectSplit as $object) {\n\t\t\t\t\t\t\t$returnObject[] = urldecode($object);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$return[$secondSplit['0']] = $returnObject;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t//This can be parse regularily\n\t\t\t\t\tdefault : \n\t\t\t\t\t\t$return[$secondSplit['0']] = urldecode($secondSplit['1']);\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\t\n\t\t\treturn $return;\n\t\t}", "title": "" }, { "docid": "7999bd612bcba7070a018d3521512272", "score": "0.5654189", "text": "function getVideoData($id)\n {\n $httpClient = $this->httpclient;\n $yt = new Zend_Gdata_YouTube($httpClient);\n\n //$entry=$yt->getVideoEntry($id);\n try\n {\n // $entry=$yt->getVideoEntry($id,null,true);\n $entry=$yt->getVideoEntry($id);\n }\n catch(Exception $e)\n {\n //echo $e->getMessage();\n return false;\n }\n\n //set data\n $data=array();\n\n $thumbnails=$entry->getVideoThumbnails();\n if(count($thumbnails) >0 )\n {\n $data['thumbnail']=$thumbnails[0];\n $data['thumbnails']=$thumbnails;\n }\n\n $data['flash_url']=$entry->getFlashPlayerUrl();\n $data['is_embeddable']=$entry->isVideoEmbeddable();\n\n //var_dump(get_class_methods($entry));\n\n return $data;\n }", "title": "" }, { "docid": "12b62037777dcb92c0ea6691708d412f", "score": "0.56415343", "text": "function extractVideoInfo($conn, $video) {\n $obj = [\n 'videoId' => $video['id'],\n 'channelId' => $video['snippet']['channelId'],\n 'title' => mysqli_real_escape_string($conn, $video['snippet']['title']),\n 'description' => mysqli_real_escape_string($conn, $video['snippet']['description']),\n 'publishedAt' => $video['snippet']['publishedAt'],\n 'channelTitle' => mysqli_real_escape_string($conn, $video['snippet']['channelTitle']),\n 'category_id' => $video['snippet']['categoryId'],\n 'duration' => $video['contentDetails']['duration'],\n 'viewCount' => $video['statistics']['viewCount']\n ];\n\n if (array_key_exists('likeCount', $video['statistics'])) {\n $obj['likeCount'] = $video['statistics']['likeCount'];\n $obj['dislikeCount'] = $video['statistics']['dislikeCount'];\n } else {\n $obj['likeCount'] = 0;\n $obj['dislikeCount'] = 0;\n }\n return $obj;\n }", "title": "" }, { "docid": "7be01fa0a838729907b52d0d1fa306ce", "score": "0.5606358", "text": "private function getVideoResponse($url)\n\t{\n\t\tif (YoutubeUrl::test($url)){\n\t\t\t$youtube = YoutubeUrl::create($url);\n\t\t\t$video = Array(\n\t\t\t\t'id' \t\t=> $youtube->getVideoId(),\n\t\t\t\t'url' \t\t=> $youtube->getUrl(),\n\t\t\t\t'embed_url' => $youtube->getEmbedUrl(),\n\t\t\t\t'thumbnail' => $youtube->getThumbnailUrl()\n\t\t\t);\n\t\t}elseif (VimeoUrl::test($url)){\n\t\t\t$vimeo = VimeoUrl::create($url);\n\t\t\t$video = Array(\n\t\t\t\t'id' \t\t=> '',\n\t\t\t\t'url' \t\t=> $vimeo->getUrl(),\n\t\t\t\t'embed_url' => $vimeo->getEmbedUrl(),\n\t\t\t\t'thumbnail' => $vimeo->getThumbnailUrl()\n\t\t\t);\n\t\t}else{\n\t\t\t$video = Array(\n\t\t\t\t'id' \t\t=> '',\n\t\t\t\t'url' \t\t=> '',\n\t\t\t\t'embed_url' => '',\n\t\t\t\t'thumbnail' => ''\n\t\t\t);\n\t\t}\n\n\t\treturn $video;\n\t}", "title": "" }, { "docid": "1cafcb060b0cc3c8fb899b8a0cfa9032", "score": "0.55560833", "text": "function getYoutubeResult($url)\n {\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);\n $result = curl_exec($curl);\n\n if ($result == FALSE) {\n echo curl_error($curl);\n curl_close($curl);\n\n return FALSE;\n }\n curl_close($curl);\n\n return $result;\n }", "title": "" }, { "docid": "3f23befc3098b87c49cab648f573e1e7", "score": "0.555087", "text": "public function youtubeFeed()\n {\n $videos = [];\n\n $api_key = Settings::where('label', 'youtube_api_key')->limit(1)->pluck('value')[0];\n $max_results = Settings::where('label', 'youtube_max_results')->limit(1)->pluck('value')[0];\n $username = Settings::where('label', 'youtube_username')->limit(1)->pluck('value')[0];\n\n if (empty($max_results) || $max_results <= 0) {\n $max_results = 10;\n }\n\n //search channels of user\n $json = file_get_contents('https://www.googleapis.com/youtube/v3/channels?part=contentDetails&forUsername=' . $username . '&key=' . $api_key);\n $channels = json_decode($json);\n $playlist_id = $channels->items[0]->contentDetails->relatedPlaylists->uploads;\n\n //search playlist items of upload channel\n $json = file_get_contents('https://www.googleapis.com/youtube/v3/playlistItems?part=contentDetails&maxResults=' . $max_results . '&playlistId=' . $playlist_id . '&key=' . $api_key);\n $items = json_decode($json)->items;\n\n foreach ($items as $item) {\n // search videos of the playlist items of the upload channel\n $json = file_get_contents('https://www.googleapis.com/youtube/v3/videos?part=id,snippet,contentDetails,status&id=' . $item->contentDetails->videoId . '&maxResults=' . $max_results . '&key=' . $api_key);\n $video = json_decode($json);\n array_push($videos, $video);\n }\n\n return response()->json($videos);\n }", "title": "" }, { "docid": "c8bdcf3fe06b882e6ebcb0ec829a28fe", "score": "0.55476797", "text": "protected function parseResponse() {\r\n\r\n parse_str($this->response);\r\n\r\n\r\n /* TRANS_ID */\r\n $this->transId = $TRANS_ID;\r\n\r\n /* STATUS */\r\n $this->status = $STATUS;\r\n\r\n /* AVS */\r\n $this->avsResp = $AVS;\r\n\r\n /* CVV2 */\r\n $this->cvv2Resp = $CVV2;\r\n\r\n /* AUTH_CODE */\r\n $this->authCode = $AUTH_CODE;\r\n\r\n /* MESSAGE */\r\n $this->message = $MESSAGE;\r\n\r\n /* REBID */\r\n $this->rebid = $REBID;\r\n }", "title": "" }, { "docid": "d7ee2b9557cce0adcd3b1b79a074139a", "score": "0.5520545", "text": "public function __construct($URL) {\n\t\t\t$URLFragments = parse_url($URL);\n\t\t\t\n\t\t//Check and see if a URL was provided\n\t\t\tif (empty($URL)) {\n\t\t\t\techo \"<data><status>error</status><message><title>No Link Provided</title><content>You did not provide us with a link! Please go back and enter the link of the video you wish to watch, or search YouTube for a one.</content></message></data>\";\n\t\t\t}\n\t\t\t\n\t\t//Parse $URLFragments['query'] for the video ID\n\t\t\tif (!empty($URLFragments['query'])) {\n\t\t\t//Break up each of the parameters, which are deliminated by the ampersand\n\t\t\t\t$parameters = explode(\"&\", $URLFragments['query']);\n\t\t\t\t\n\t\t\t//Then look for the attribute named \"v\", which contains the video ID\n\t\t\t\tforeach($parameters as $param) {\n\t\t\t\t\t$paramSegment = explode(\"=\", $param);\n\t\t\t\t\t\n\t\t\t\t\tif (strtolower($paramSegment['0']) == \"v\") {\n\t\t\t\t\t\t$this->videoID = $paramSegment['1'];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t//No URL query was passed\n\t\t\t} else {\n\t\t\t\techo \"<data><status>error</status><message><title>Invalid Link Provided</title><content>We could not understand the link that you gave us. Although it does link to youtube.com, it does not appear to link to any video. A typical video link from YouTube looks like this: www.youtube.com/watch?v=XXXXXXXXXXX, where the list of Xs can be anysd combination of letters or numbers. Try finding a link that looks similar to this an try again.</content></message></data>\";\n\t\t\t}\n\t\t\t\n\t\t//Check and see if the URL is in the format youtube.com/watch?v=XXXXXXXXXXX and that the video ID was found\n\t\t//The video ID will be 10 if the URL query was invalid or unparsable\n\t\t\tif ($this->videoID != \"0\") {\n\t\t\t//Now that all of the tests have been passed, fetch the data URL\n\t\t\t\techo print_r($this->fetch($this->videoID));\n\t\t\t} else {\n\t\t\t\techo \"<data><status>error</status><message><title>Invalid Link Provided</title><content>We could not understand the link that you gave us. Although it does link to youtube.com, it does not appear to link to any video. A typical video link from YouTube looks like this: www.youtube.com/watch?v=XXXXXXXXXXX, where the list of Xs can be any combination of letters or numbers. Try finding a link that looks similar to this an try again.</content></message></data>\";\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "700071187a8e8c225a270504875dab3f", "score": "0.5507306", "text": "function getMovieInfo($type, $value) {\n\t$url = 'http://www.imdbapi.com/?plot=full&'.$type.'='.$value;\n\t$json = file_get_contents($url);\n\t$movie = (json_decode($json));\n\t$movie->ID = preg_replace('/[^0-9]*/','', $movie->ID);\n\t$movie->Genre = explode(\",\", $movie->Genre);\n\t$movie->Director = explode(\",\", $movie->Director);\n\t$movie->Writer = explode(\",\", $movie->Writer);\n\t$movie->Actors = explode(\",\", $movie->Actors);\n\treturn $movie;\n}", "title": "" }, { "docid": "217aee18f6ea81145dd5ab191e69967b", "score": "0.548673", "text": "public function getTwitchVideos() {\n $channelsApi = 'https://api.twitch.tv/kraken/streams/?game=The%20Hunter:%20Call%20of%20the%20Wild&limit=40';\n $clientId = config('app.twitch_key');\n $ch = curl_init();\n\n curl_setopt_array($ch, array(\n CURLOPT_HTTPHEADER => array(\n 'Client-ID: ' . $clientId\n ),\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_URL => $channelsApi //. $channelName\n ));\n\n /* Isveda JSON */\n $response = curl_exec($ch);\n echo curl_error($ch);\n curl_close($ch);\n\n /* Konvertuoju JSON i ARRAY */\n $twitch = json_decode($response, true);\n\n return $twitch;\n\n }", "title": "" }, { "docid": "492c8a8bf6d289ec46148e4d142a0186", "score": "0.54715765", "text": "private function parseResults() {\n foreach($this->results['results'] as $tweet) {\n $this->tweets[] = $tweet['id_str'];\n }\n }", "title": "" }, { "docid": "21bac1f5106dcec029f751e10c782a18", "score": "0.54234695", "text": "public function loadYoutube(){\n\t\t$DEVELOPER_KEY = 'AIzaSyBBR3xd3H9inw1UqdbywBvKvBOTESMHBm4';\n\n\t\t$client = new Google_Client();\n\t\t$client->setDeveloperKey($DEVELOPER_KEY);\n\n\t\t$youtube = new Google_YoutubeService($client);\n\t\treturn $youtube;\t\n\t}", "title": "" }, { "docid": "d58cfc0e3f3afea69b0916a2ef5b5f33", "score": "0.54094166", "text": "public static function parseToResult(Response $response);", "title": "" }, { "docid": "d30c6ae55db0af6c88531a88ed528e7b", "score": "0.5404997", "text": "function getVideo() {\n $app = \\Slim\\Slim::getInstance();\n $search = $app->request()->params('search');\n\n // get video data from search\n\n $video = (object)array(\"title\" => \"CLUTCH AD\", \"src\" => \"videos/anthony_davis.mp4\");\n echo json_encode($video);\n}", "title": "" }, { "docid": "04f7666c1cdb5ec61299ef372d2637ff", "score": "0.5398562", "text": "protected function parseResults()\n\t{\n\t\t$this->resultCode = self::substring_between($this->response, '<resultCode>', '</resultCode>');\n\t\t$this->code = self::substring_between($this->response, '<code>', '</code>');\n\t\t$this->text = self::substring_between($this->response, '<text>', '</text>');\n\t\t$this->subscrId = self::substring_between($this->response, '<subscriptionId>', '</subscriptionId>');\n\t}", "title": "" }, { "docid": "1a3bfaa9cbd25a67870a400f9a58105d", "score": "0.53798103", "text": "public function getYoutube()\n {\n return $this->youtube;\n }", "title": "" }, { "docid": "3c53032d47098775b1c678ca9a9da4a4", "score": "0.53477824", "text": "public function parse()\n {\n return $this->parser->parseFromReleaseString($this->episodes);\n }", "title": "" }, { "docid": "6adef11ca2e4bfa3f307d6113f19c8bc", "score": "0.53416806", "text": "function apiCall(){\n // create curl resource \n $ch = curl_init(); \n\n // set url \n curl_setopt($ch, CURLOPT_URL, \"https://api.themoviedb.org/3/discover/movie?api_key=372f168ae29875f30eb9f0cda74358c1\"); \n\n //return the transfer as a string \n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n\n // $output contains the output string \n $output = curl_exec($ch); \n\n // close curl resource to free up system resources \n curl_close($ch); \n\n return $output;\n\n}", "title": "" }, { "docid": "b8d467d973c5d952542439c29fa032bb", "score": "0.53309226", "text": "function get_youtube_code($page_url, $width, $height) {\n $ch = curl_init(); \n curl_setopt($ch, CURLOPT_URL, \"http://www.youtube.com/oembed?url=\".urlencode($page_url).\"?wmode=opaque&format=json&maxwidth=\" . $width . \"&maxheight=\" . $height);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n $response = curl_exec($ch); \n curl_close($ch);\n \n $embed_code = json_decode($response, true);\n \n return $embed_code;\n}", "title": "" }, { "docid": "22cf8da77f55a2421d3cbc25e99129f9", "score": "0.5289496", "text": "function YouTubeDataAPIv3($videoTitle, $videoDescription, $videoPath, $videoCategory)\n{\n\n if (!file_exists(__DIR__ . '/vendor/autoload.php')) {\n throw new Exception(sprintf('Please run \"composer require google/apiclient:~2.0\" in \"%s\"', __DIR__));\n }\n require_once __DIR__ . '/vendor/autoload.php';\n\n $tokens = file_get_contents(__DIR__ . '/assets/tokens.json');\n\n try {\n $client = new Google_Client();\n $client->setApplicationName('API code samples');\n $client->setScopes([\n 'https://www.googleapis.com/auth/youtube.readonly',\n 'https://www.googleapis.com/auth/youtube.upload',\n 'https://www.googleapis.com/auth/youtube',\n 'https://www.googleapis.com/auth/youtubepartner',\n ]);\n\n // TODO: For this request to work, you must replace\n // \"YOUR_CLIENT_SECRET_FILE.json\" with a pointer to your\n // client_secret.json file. For more information, see\n // https://cloud.google.com/iam/docs/creating-managing-service-account-keys\n $client->setAuthConfig(__DIR__ . '/assets/client_secret.json');\n $client->setAccessType('offline');\n $client->setAccessToken($tokens);\n\n if ($client->getAccessToken()) {\n //Check to see if our access token has expired. If so, get a new one and save it to tokens.json for future use.\n if ($client->isAccessTokenExpired()) {\n echo \"Token was expired getting a new one .....\";\n $newToken = $client->getAccessToken();\n $client->refreshToken($newToken['refresh_token']);\n file_put_contents(__DIR__ . '/assets/tokens.json', json_encode($newToken));\n }\n\n $youtube = new Google_Service_YouTube($client);\n\n // Create a snipet with title, description, tags and category id\n $snippet = new Google_Service_YouTube_VideoSnippet();\n $snippet->setTitle($videoTitle);\n $snippet->setDescription($videoDescription);\n $snippet->setCategoryId($videoCategory);\n //$snippet->setTags($videoTags);\n\n // Create a video status with privacy status. Options are \"public\", \"private\" and \"unlisted\".\n $status = new Google_Service_YouTube_VideoStatus();\n $status->setPrivacyStatus('unlisted');\n\n // Create a YouTube video with snippet and status\n $video = new Google_Service_YouTube_Video();\n $video->setSnippet($snippet);\n $video->setStatus($status);\n\n // Size of each chunk of data in bytes. Setting it higher leads faster upload (less chunks,\n // for reliable connections). Setting it lower leads better recovery (fine-grained chunks)\n $chunkSizeBytes = 1 * 1024 * 1024;\n\n // Setting the defer flag to true tells the client to return a request which can be called\n // with ->execute(); instead of making the API call immediately.\n $client->setDefer(true);\n\n // Create a request for the API's videos.insert method to create and upload the video.\n $insertRequest = $youtube->videos->insert(\"status,snippet\", $video);\n\n // Create a MediaFileUpload object for resumable uploads.\n $media = new Google_Http_MediaFileUpload(\n $client,\n $insertRequest,\n 'video/*',\n null,\n true,\n $chunkSizeBytes\n );\n $media->setFileSize(filesize($videoPath));\n\n // Read the media file and upload it chunk by chunk.\n $status = false;\n $handle = fopen($videoPath, \"rb\");\n while (!$status && !feof($handle)) {\n $chunk = fread($handle, $chunkSizeBytes);\n $status = $media->nextChunk($chunk);\n }\n\n fclose($handle);\n\n /**\n * Video has successfully been upload, now lets perform some cleanup functions for this video\n */\n if ($status->status['uploadStatus'] == 'uploaded') {\n ?>\n <iframe class=\"blue stroke rounded\" style=\"min-width: 50%; min-height: 50%;\"\n src=\"https://www.youtube.com/embed/<?php echo $status['id']; ?>?rel=0&amp;showinfo=0\" frameborder=\"0\"\n allow=\"autoplay; encrypted-media\" allowfullscreen></iframe>\n\n <?php\n} else {\n echo \"Something went erong\";\n }\n\n // If you want to make other calls after the file upload, set setDefer back to false\n $client->setDefer(true);\n } else {\n // @TODO Log error\n echo 'Problems creating the client';\n }\n } catch (Google_Service_Exception $e) {\n print \"Caught Google service Exception \" . $e->getCode() . \" message is \" . $e->getMessage();\n print \"Stack trace is \" . $e->getTraceAsString();\n } catch (Exception $e) {\n print \"Caught Google service Exception \" . $e->getCode() . \" message is \" . $e->getMessage();\n print \"Stack trace is \" . $e->getTraceAsString();\n }\n}", "title": "" }, { "docid": "da220437ed214ca8fce7ff00f9f24bc4", "score": "0.52860004", "text": "function get_Video_details_OR_Meta_data($VideoID)\n{\n\t\t\t $youtube = returnYoutubeClientProfileObject();\n\n\n\t\t\t// gettting the meta data of a video by its video ID\n\t\t\t$videoResonse=$youtube->videos->listVideos('snippet,contentDetails,recordingDetails,statistics,',array(\n\n\n\t\t\t 'id'=>$VideoID,\n\n\n\n\t\t\t\t));\n\n\n\t\t\t$localArray=array();\n\n\t\t\t// looping through all the results\n\t\t\tforeach ($videoResonse['items'] as $videoMetadata) \n\t\t\t{\n\t\t\t\t\n\t\t\t\t//echo \"video meta data\".PHP_EOL;\n\t\t\t\tif(sizeof($videoMetadata['snippet']['tags'])!=0)\n\t\t\t\t$localArray['ttag']=implode('#',$videoMetadata['snippet']['tags']);\n\n\t\t\t\t$localArray['ttag']=\"NA\";\n\n\n\t\t\t\t$localArray['CcatogryId']=$videoMetadata['snippet']['categoryId'];\n\n\t\t\t\tif (trim($videoMetadata['snippet']['defaultLanguage']) == \"\") \n\t\t\t\t $localArray['DdefulatLanguage'] = \"NA\"; \n\t\t\t\t $localArray['DdefulatLanguage']=$videoMetadata['snippet']['defaultLanguage'];\n\t\t\t\t \n\t\t\t\t $localArray ['Vduration']=$videoMetadata['contentDetails']['duration'];\n\t\t\t\t $localArray ['VviewCount']=$videoMetadata['statistics']['viewCount'];\n\t\t\t\t $localArray['VlikeCount']=$videoMetadata['statistics']['likeCount'];\n\t\t\t\t $localArray['VdislikeCount']=$videoMetadata['statistics']['dislikeCount'];\n\t\t\t\t $localArray ['VcommentCount']=$videoMetadata['statistics']['commentCount'];\n\t\t\t\t\treturn $localArray;\n\t\t\t}\n}", "title": "" }, { "docid": "a3847689d561d6abfff56cfe0168813c", "score": "0.52694845", "text": "function youtube_video_bul($params)\n { \n //str_replace(\"'\", \"\", $params);\n $q = preg_replace('/[[:space:]]/', '/', trim($params)); \n $q = utf8_decode(utf8_encode($q)); \t\t\n //$replacements = array(',', '?', '!', '.'); \n //$q = str_replace($replacements, \"\", $q); \n //$feedURL = \"http://gdata.youtube.com/feeds/api/videos/-/{$q}?category=Music&v=2&safeSearch=strict&orderby=relevance&max-results=1&format=5\";\n \n\t\t $client = new Google_Client();\n\t\t $client->setDeveloperKey($GLOBALS['GOOGLE_DEVELOPER_KEY']);\n\n\t\t // Define an object that will be used to make all API requests.\n\t\t $youtube = new Google_Service_YouTube($client);\n\n\t\t try {\n\t\t\t// Call the search.list method to retrieve results matching the specified\n\t\t\t// query term.\n\t\t\t$searchResponse = $youtube->search->listSearch('id,snippet', array(\n\t\t\t 'q' => $params,\n\t\t\t 'maxResults' => 1,\n\t\t\t));\n\n\t\t\t$videos = '';\n\n\t\t\t// Add each result to the appropriate list, and then display the lists of\n\t\t\t// matching videos, channels, and playlists.\n\t\t\tforeach ($searchResponse['items'] as $searchResult) {\n\t\t\t if ($searchResult['id']['kind'] = 'youtube#video') {\n\t\t\t\t $watch['image'] = $searchResult['snippet']['thumbnails']['medium']['url']; \n\t\t\t\t $watch['id'] = $searchResult['id']['videoId'];\n\t\t\t }\n\t\t\t}\n\n\t\t } catch (Google_ServiceException $e) {\n\t\t\t$htmlBody .= sprintf('<p>A Google service error occurred: <code>%s</code></p>',\n\t\t\t htmlspecialchars($e->getMessage()));\n\t\t } catch (Google_Exception $e) {\n\t\t\t$htmlBody .= sprintf('<p>An client error occurred: <code>%s</code></p>',\n\t\t\t htmlspecialchars($e->getMessage()));\n\t\t }\n\t\t \n\t\t return $watch;\n \n }", "title": "" }, { "docid": "b713759ea5fcf7948631caf02da4f51a", "score": "0.52666", "text": "function returnYoutubeClientProfileObject()\n{\n\t // and submitted the form. Otherwise, the page displays the form above.\n\n /*\n * Set $DEVELOPER_KEY to the \"API key\" value from the \"Access\" tab of the\n * {{ Google Cloud Console }} <{{ https://cloud.google.com/console }}>\n * Please ensure that you have enabled the YouTube Data API for your project.\n */\n // google console developer key\n \t$DEVELOPER_KEY = ''; \n \t$client = new Google_Client();\n \t$client->setDeveloperKey($DEVELOPER_KEY);\n\n \n \t// Define an object that will be used to make all API requests.\n \t\t$youtube = new Google_Service_YouTube($client);\n\n \n\t\treturn $youtube;\n\n}", "title": "" }, { "docid": "9b0e2ea8de10e2428c39b8345de306ae", "score": "0.5255868", "text": "function parse_yt_video_id($url)\n{\n\n parse_str(parse_url($url, PHP_URL_QUERY), $my_array_of_vars);\n return isset($my_array_of_vars['v']) ?\n $my_array_of_vars['v'] :\n (isset($my_array_of_vars['watch']) ? $my_array_of_vars['watch'] : null);\n\n}", "title": "" }, { "docid": "dd002a9bf39a8491d2572e87cf6f5001", "score": "0.5241641", "text": "protected function parseMeetupApiData()\n {\n $responseBody = $this->parseBodyContent();\n\n $this->data = $responseBody['results'];\n $this->metadata = $responseBody['meta'];\n }", "title": "" }, { "docid": "603370358e9ce99384272dc245fd0eba", "score": "0.52345514", "text": "public function getDetails(array $params){\n \n if(!isset($params['ItemId']))\n throw new \\InvalidArgumentException('No id was passed to Youtube');\n \n $ve = $this->youTube->getVideoEntry($params['ItemId']);\n \n if($ve === false)\n throw new \\RuntimeException(\"Could not connect to YouTube\");\n \n if(count($ve) < 1){\n throw new \\LengthException(\"No results were returned\");\n }\n \n $response = $this->constructVideoEntry(new SimpleXMLElement('<entry></entry>'), $ve);\n \n return $response;\n }", "title": "" }, { "docid": "cd01a862367192a42ada7d6077a2a1a2", "score": "0.5229941", "text": "public function parseResponse($response)\n {\n }", "title": "" }, { "docid": "cfc7c71ef382592b18e3cb406cd1d24f", "score": "0.52296233", "text": "private function parse() {\n $apiBodyUTF8 = iconv($this->sourceEncoding, 'UTF-8', $this->rawData);\n $this->data = json_decode($apiBodyUTF8);\n }", "title": "" }, { "docid": "aed34678773342360104d2475237ed72", "score": "0.522867", "text": "public function getVideoFrameData() : array{\n $jsonApiBase = file_get_contents( $this->api_video_path);\n return json_decode($jsonApiBase);\n }", "title": "" }, { "docid": "c9c91d10332a199e4e5bbe50294da206", "score": "0.52002436", "text": "static public function hydrateFromDecodedResponse($t)\n {\n $tweet = new Tweet();\n $tweet['guid'] = $t->id_str ? $t->id_str : false;\n $tweet['twitter_user_id'] = $t->user->id ? $t->user->id : false;\n $tweet['screen_name'] = $t->user->screen_name ? $t->user->screen_name : false;\n $tweet['display_name'] = $t->user->name ? $t->user->name : false;\n $tweet['profile_pic'] = $t->user->profile_image_url ? $t->user->profile_image_url : false;\n $tweet['body'] = $t->text ? $t->text : false;\n self::processGeoData($t,$tweet);\n return $tweet;\n }", "title": "" }, { "docid": "8eb150ee1829403efe0c64440fba5dd8", "score": "0.5193686", "text": "private function getResults() {\n $url = 'https://dreambroker.com/channel/' . $this->channelId . '/iframe/' . $this->videoId;\n return [\n 'html' => '<iframe width=\"480\" height=\"270\" src=\"' . $url . '\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen</iframe>',\n 'height' => 270,\n 'type' => 'video',\n 'thumbnail_width' => 480,\n 'provider_url' => 'https://www.dreambroker.com/',\n 'version' => '1.0',\n 'thumbnail_height' => 360,\n 'width' => 480,\n 'thumbnail_url' => $this->getRemoteThumbnailUrl(),\n 'provider_name' => 'Dream Broker',\n 'title' => 'Dream Broker Video',\n ];\n }", "title": "" }, { "docid": "945b2b9789e4eea93c6ed08440095de1", "score": "0.51836514", "text": "public function process($data)\n {\n // Important! Unset the YouTube API key so it is not saved with the content\n unset($data['key']);\n\n // The YouTube API leaves out some crutal info so we have to get it with oembed\n if ($this->videoembed->isYouTube($data['url'])) {\n $url_string = 'https://www.youtube.com/oembed?url=http%3A//youtube.com/watch%3Fv%3D' . $this->videoembed->getYouTubeVideoId($data['url']) . '&format=json';\n\n $request = curl_init($url_string);\n\n curl_setopt($request, CURLOPT_RETURNTRANSFER, true);\n\n if ($contents = curl_exec($request)) {\n $contents = json_decode($contents, true);\n $data['author_url'] = $contents['author_url'];\n $data['height'] = $contents['height'];\n $data['width'] = $contents['width'];\n }\n }\n\n return $data;\n }", "title": "" }, { "docid": "008fff76f6a90ec05819aa566bfaf324", "score": "0.5173258", "text": "protected function processResponse() {\n\t\t$this->errors = $this->json['errors'];\n\t\t$this->api_version = $this->json['apiVersion'];\n\t\t$this->loaded_date = $this->json['mtime'];\n\t\t$this->capabilities['id'] = $this->json['id'];\n\t\t$this->capabilities = array_merge($this->capabilities,$this->json['capabilities']);\n\t}", "title": "" }, { "docid": "5125d2b55815c4a7315e5e52483efb45", "score": "0.5161394", "text": "function get_yt($param, $title) {\n $list = '<script>$(function(){var list =[{\"idGD\": \"';\n $last_key = end(array_keys($param));\n foreach ($param as $key => $value) {\n if ($key == $last_key) {\n $list .= $value->{Tbl_meta::value};\n } else {\n //$list .= $value->{Tbl_meta::value} . '0!?^0!?A';\n $list .= $value->{Tbl_meta::value} . '?^0!7x0k!iYAt';\n }\n }\n $list .='\",\"title\": \"' . $title . '\",\"type\": \"1\"}];\nloadall(list,\"TY\");\n});</script><style>.rm-rep-frame{height:330px}</style>';\n// foreach ($param as $vdo) {\n// $list .= '<div align=\"center\"><div style=\"font-size: 16px;font-weight: bold; padding:10px; clear:both; width:90%;overflow:hidden;margin-bottom:2px; text-align:center;border:1px solid #555;\">';\n// $list .= '<a href=\"/p/player.html?http://youtu.be/' . $vdo->{Tbl_meta::value} . '\" target=\"_blank\">' . $vdo->{Tbl_meta::key} . '</a>';\n// $list .= '</div></div>';\n// }\n return $list;\n }", "title": "" }, { "docid": "39b457ad7b9b5243394d97d27e8dbe1d", "score": "0.515994", "text": "public function parse() {}", "title": "" }, { "docid": "39b457ad7b9b5243394d97d27e8dbe1d", "score": "0.515994", "text": "public function parse() {}", "title": "" }, { "docid": "39b457ad7b9b5243394d97d27e8dbe1d", "score": "0.515994", "text": "public function parse() {}", "title": "" }, { "docid": "39b457ad7b9b5243394d97d27e8dbe1d", "score": "0.515994", "text": "public function parse() {}", "title": "" }, { "docid": "79be6d38449335a1a82c1213d3a0552d", "score": "0.5152988", "text": "function extractYoutubeID($text) {\n\n\t\t\tforeach( $text as $maybeYoutube){\n\t\t\t\t$stringStart = substr($maybeYoutube, 0,4);\n\t\t\t\tif($stringStart=='http'){\n\n\t\t\t\t $youTubeID = preg_replace('~\n\t\t\t\t # Match non-linked youtube URL in the wild. (Rev:20130823)\n\t\t\t\t https?:// # Required scheme. Either http or https.\n\t\t\t\t (?:[0-9A-Z-]+\\.)? # Optional subdomain.\n\t\t\t\t (?: # Group host alternatives.\n\t\t\t\t youtu\\.be/ # Either youtu.be,\n\t\t\t\t | youtube # or youtube.com or\n\t\t\t\t (?:-nocookie)? # youtube-nocookie.com\n\t\t\t\t \\.com # followed by\n\t\t\t\t \\S* # Allow anything up to VIDEO_ID,\n\t\t\t\t [^\\w\\s-] # but char before ID is non-ID char.\n\t\t\t\t ) # End host alternatives.\n\t\t\t\t ([\\w-]{11}) # $1: VIDEO_ID is exactly 11 chars.\n\t\t\t\t (?=[^\\w-]|$) # Assert next char is non-ID or EOS.\n\t\t\t\t (?! # Assert URL is not pre-linked.\n\t\t\t\t [?=&+%\\w.-]* # Allow URL (query) remainder.\n\t\t\t\t (?: # Group pre-linked alternatives.\n\t\t\t\t [\\'\"][^<>]*> # Either inside a start tag,\n\t\t\t\t | </a> # or inside <a> element text contents.\n\t\t\t\t ) # End recognized pre-linked alts.\n\t\t\t\t ) # End negative lookahead assertion.\n\t\t\t\t [?=&+%\\w.-]* # Consume any URL (query) remainder.\n\t\t\t\t ~ix', \n\t\t\t\t //for the embed\n\t\t\t\t //'<a href=\"http://www.youtube.com/watch?v=$1\">YouTube link: $1</a>',\n\t\t\t\t //'http://img.youtube.com/vi/$1/default.jpg',\n\t\t\t\t '$1', \n\t\t\t\t $maybeYoutube);\n\t\t\t\t return $youTubeID;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "c678ac6fc3422cf5343eb941f2a1f9af", "score": "0.51502985", "text": "public function testParseResponse(): void\n {\n $raw = [[0, 1323163469, 12451, ['SORT', 'list:unordered']]];\n $expected = [\n [\n 'id' => 0,\n 'timestamp' => 1323163469,\n 'duration' => 12451,\n 'command' => ['SORT', 'list:unordered'],\n ],\n ];\n\n $command = $this->getCommand();\n\n $this->assertSame($expected, $command->parseResponse($raw));\n }", "title": "" }, { "docid": "176c4555a560799549f0884625f48d56", "score": "0.5138133", "text": "public function parse();", "title": "" }, { "docid": "176c4555a560799549f0884625f48d56", "score": "0.5138133", "text": "public function parse();", "title": "" }, { "docid": "176c4555a560799549f0884625f48d56", "score": "0.5138133", "text": "public function parse();", "title": "" }, { "docid": "176c4555a560799549f0884625f48d56", "score": "0.5138133", "text": "public function parse();", "title": "" }, { "docid": "176c4555a560799549f0884625f48d56", "score": "0.5138133", "text": "public function parse();", "title": "" }, { "docid": "5053a3b89dd2383d3e1d3ad3ff04a890", "score": "0.5137767", "text": "public function parseQueryResponse($response)\n {\n return json_decode($response, true);\n }", "title": "" }, { "docid": "8b4b536b3b247f98bccd25779dd8add3", "score": "0.510563", "text": "private function result() {\n return json_decode($this->result, true);\n }", "title": "" }, { "docid": "6ec2c4587678bd6b0968d14eb98860c2", "score": "0.5103248", "text": "function extract_youtube_video($content, $width, $height) {\n if ( $id = extract_youtube_id($content) ) {\n return build_youtube_tag($id, $width, $height);\n }\n}", "title": "" }, { "docid": "080aa53a33bac6e8da8038d3541fd3e7", "score": "0.50937074", "text": "public function getPlayer() {\n return Mage::getSingleton('vidtest/connector')->getApiModel('youtube')->getRenderedPlayer();\n }", "title": "" }, { "docid": "dd46fa3cf66a5ac31236f8c60881f95a", "score": "0.5088875", "text": "function servicio_web($callback){\n $service_url = 'https://www.googleapis.com/youtube/v3/videos?id=1rmYfo84hyg&key=AIzaSyC54e9wTQtr2EDGs37VLGYh6NDxKowfmsw%20%20%20%20%20&part=snippet,contentDetails,statistics,status';\n $curl = curl_init($service_url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n $curl_response = curl_exec($curl);\n if ($curl_response === false) {\n $info = curl_getinfo($curl);\n curl_close($curl);\n die('Ocurrio un error: ' . var_export($info));\n }\n curl_close($curl);\n $decoded = json_decode($curl_response);\n if($decoded){\n $callback($decoded);\n }\n}", "title": "" }, { "docid": "92495c545ce555ecac13a27bd8661f61", "score": "0.50825673", "text": "protected function prepareResponseForParse()\n {\n return $this->responseBody();\n }", "title": "" }, { "docid": "6bf6632d247e84bbc5786f433569d330", "score": "0.50795585", "text": "public function toObject()\n {\n if (is_null($this->result)) {\n return null;\n }\n return json_decode($this->result);\n }", "title": "" }, { "docid": "f3ae49e0e7f470ad8d7a5930f15aa0c9", "score": "0.50769347", "text": "public function process($video = '')\n {\n if (empty($video)) {\n return ['error' => $this->lexicon('video_err_ns')];\n }\n\n $data = [];\n if (!preg_match('~^https?://~i', $video)) {\n $video = 'https://' . $video;\n }\n\n // Youtube\n if (preg_match('~https?://(?:www\\.|)youtube\\.com/watch\\?(?:.*)?v=([a-zA-Z0-9_\\-]+)~i', $video, $matches) ||\n preg_match('~https?://(?:www\\.|)youtube\\.com/embed/([a-zA-Z0-9_\\-]+)/?~i', $video, $matches) ||\n preg_match('~https?://(?:www\\.|)youtu\\.be/([a-zA-Z0-9_\\-]+)/?~i', $video, $matches)) {\n $video = 'https://www.youtube.com/embed/' . $matches[1];\n $image = 'https://img.youtube.com/vi/' . $matches[1] . '/0.jpg';\n\n $data = [\n 'video' => $video,\n 'videoId' => $matches[1],\n 'image' => $this->getRemoteImage($image),\n ];\n }\n\n // Vimeo\n elseif (preg_match('~https?://(?:www\\.|)vimeo\\.com/[a-zA-Z0-9_\\-/]*?([a-zA-Z0-9_\\-]+)(&.+)?$~i', $video, $matches) ||\n preg_match('~https?://player\\.vimeo\\.com/video/([a-zA-Z0-9_\\-]+)(&.+)?~i', $video, $matches)) {\n $video = 'https://player.vimeo.com/video/' . $matches[1];\n $image = '';\n if ($json = json_decode(file_get_contents('https://vimeo.com/api/oembed.json?url=' . $video), true)) {\n $image = $json['thumbnail_url'];\n $image = preg_replace(['~_[0-9]+x[0-9]+\\.~', '~_[0-9]+\\.~', '~_[0-9]+x[0-9]+~'], ['.', '.', ''], $image);\n $image = $this->getRemoteImage($image);\n }\n // if ($xml = simplexml_load_file('http://vimeo.com/api/v2/video/' . $matches[1] . '.xml')) {\n // $image = $xml->video->thumbnail_large ? (string)$xml->video->thumbnail_large : (string)$xml->video->thumbnail_medium;\n // $image = str_replace(array('_640.', '_200x150.'), array('.', '.'), $image);\n // $image = $this->getRemoteImage($image);\n // }\n $data = [\n 'video' => $video,\n 'videoId' => $matches[1],\n 'image' => $image,\n ];\n }\n\n // Rutube\n elseif (preg_match('~https?://(?:www\\.|)rutube\\.ru/video/embed/([a-zA-Z0-9_\\-]+)/?~i', $video, $matches) ||\n preg_match('~https?://(?:www\\.|)rutube\\.ru/video/([a-zA-Z0-9_\\-]+)/?~i', $video, $matches) ||\n preg_match('~https?://(?:www\\.|)rutube\\.ru/tracks/([a-zA-Z0-9_\\-]+)(&.+)?/?~i', $video, $matches)) {\n $video = 'https://rutube.ru/video/embed/' . $matches[1];\n $image = '';\n if ($json = json_decode(file_get_contents('https://rutube.ru/api/video/' . $matches[1]), true)) {\n $image = $json['thumbnail_url'];\n $image = $this->getRemoteImage($image);\n }\n $data = [\n 'video' => $video,\n 'videoId' => $matches[1],\n 'image' => $image,\n ];\n }\n\n // Vk\n elseif (preg_match('~https?://(?:www\\.|)vk\\.com~i', $video)) {\n $video_id = '';\n if (preg_match('~(video-?[0-9]+_[0-9]+)~ui', $video, $matches)) {\n $video_id = str_replace('video', '', $matches[1]);\n $video = 'https://vk.com/' . $matches[1];\n } elseif (preg_match('~[?&]oid=(-?[0-9]+)~ui', $video, $matches_oid) && preg_match('~[?&]id=([0-9]+)~ui', $video, $matches_id)) {\n $video_id = $matches_oid[1] . '_' . $matches_id[1];\n $video = 'https://vk.com/video' . $matches_oid[1] . '_' . $matches_id[1];\n } else {\n $video_id = $video = null;\n }\n $image = '';\n if (!empty($video)) {\n // Get html content\n $content = file_get_contents($video, false, stream_context_create([\n 'http' => [\n 'method' => 'GET',\n 'header' => implode(\"\\r\\n\", ['Accept: *', 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/76.0.3809.132 Edg/44.18362.267.0'])\n ]\n ]));\n $content = iconv('windows-1251//IGNORE', 'UTF-8//IGNORE', $content);\n\n preg_match('~<meta property=\"og:video\" content=\"([^\"]*)\"~usi', $content, $matches);\n $embed_url = $matches[1];\n\n preg_match('~<meta property=\"og:image\" content=\"([^\"]*)\"~usi', $content, $matches);\n $image = str_replace(['http:', '&amp;'], ['https:', '&'], $matches[1]);\n $image = $this->getRemoteImage($image);\n\n $data = [\n 'video' => $embed_url,\n 'videoId' => $video_id,\n 'image' => $image,\n ];\n }\n }\n\n // No matches\n if (empty($data)) {\n $data = ['error' => $this->lexicon('video_err_nf')];\n }\n\n return $data;\n }", "title": "" }, { "docid": "f0d43f4d92e4878b1451c920523b2adc", "score": "0.5071889", "text": "public function getPageXml() {\n\n $papyaXmlDomObject = $this->getPapayaXmlDomObject();\n $content = $papyaXmlDomObject->appendElement(\"video\");\n if ($this->_data['set_no_cookie'] == 1) {\n $url = $this->_data['youtube_no_cookie_url'];\n } else {\n $url = $this->_data['youtube_url'];\n }\n\n if ($this->_data['video_format'] == '16:9') {\n $playerHeight = $this->_data['player_width'] / 1.77;\n } else if ($this->_data['video_format'] == '4:3') {\n $playerHeight = $this->_data['player_width'] / 1.33;\n }\n\n $content->appendElement(\"title\", array(), $this->_data['title']);\n $content->appendElement('subtitle', array(), $this->_data['subtitle']);\n $content->appendElement(\n \"player\", \n array(\n \"videoId\" => $this->_data['youtube_video_id'],\n \"width\" => $this->_data['player_width'],\n \"height\" => round($playerHeight),\n \"autoplay\" => $this->_data['autoplay'],\n \"rel\" => $this->_data['related'],\n \"info\" => $this->_data['show_info'],\n \"controls\" => $this->_data['controls'],\n \"url\" => $url\n )\n );\n $teaser = $content->appendElement(\"teaser\");\n $teaser->appendXml($this->_data['teaser']);\n $image = $content->appendElement(\n \"image\", \n array(\n \"align\" => $this->_data['imgalign'],\n \"break\" => $this->_data['breakstyle']\n )\n );\n $image->appendXml(\n $this->_owner->getPapayaImageTag(\n $this->_data['image']\n )\n );\n $text = $content->appendElement(\"text\");\n $text->appendXml($this->_data['text']);\n return $papyaXmlDomObject->saveXML($content);\n }", "title": "" }, { "docid": "b1824718af4111363ed82f4ff2583831", "score": "0.5070507", "text": "public function get_info() {\n\n // we're not getting anywhere without a video ID.\n if (!isset($this->video_id)) {\n $this->tattle(\"No Video ID supplied for coreapi::getInfo()\");\n return false;\n } else {\n\n // build the API call and pass it to callAPI();\n $apicall = \"?method=getStatus&id=\" . $this->video_id;\n\n if (!$xml = $this->callAPI($apicall, $this->apiurl)) {\n $this->tattle(\"coreapi::get_info - No data returned from API with the following call: $apicall\");\n return false;\n }\n\n // did we get an error? Let's check and bail out if we did.\n if (isset($xml->getStatus->error) && $xml->getStatus->error <> \"\") {\n // and let's log this, so we can figure out what happened.\n $this->tattle(\"An error occurred when querying the API: \" . $xml->getStatus->error);\n return false;\n } else {\n // yay valid search results!\n $this->title = (string)$xml->getStatus->result->title;\n $this->video_url = (string)$xml->getStatus->result->video_url;\n $this->published_date = (string)$xml->getStatus->result->published_date;\n $this->status = (string)$xml->getStatus->result->status;\n $this->video_status = (string)$xml->getStatus->result->video_status;\n $this->download = (string)$xml->getStatus->result->download;\n $this->embed = (string)$xml->getStatus->result->embed;\n $this->get_screenshot();\n $this->description = (string)$xml->getStatus->result->description;\n $this->access_key = (string)$xml->getStatus->result->access_key;\n $this->uploaded_by = (string)$xml->getStatus->result->uploaded_by;\n $this->uploaded_by_username = (string)$xml->getStatus->result->uploaded_by_username;\n $this->created = (string)$xml->getStatus->result->created;\n $this->modified = (string)$xml->getStatus->result->modified;\n $this->asset_type = (string)$xml->getStatus->result->asset_type;\n return true;\n } // end check for errors;\n } // end check for video id\n }", "title": "" }, { "docid": "8effe68c7c1013e156eb3349d56eb836", "score": "0.5051729", "text": "private function parseResults() {}", "title": "" }, { "docid": "334e4e1d3e2a44ba2e2dd76e18ba5afc", "score": "0.5039588", "text": "public static function parse_youtube_url($url)\n {\n // If it's not a url, just return what was given\n if(!filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_QUERY_REQUIRED))\n {\n return $url;\n }\n\n $parsed_url = parse_url($url);\n $query = $parsed_url['query'];\n $path = $parsed_url['path'];\n $path_parts = explode('/', trim($path, '/'));\n parse_str($query, $query_parts);\n\n $v = isset($query_parts['v']) ? $query_parts['v'] : '';\n\n // Couldn't find out youtube_id in the query string, lets try to find it in the URI\n $next = false;\n while (empty($v))\n {\n $piece = array_shift($path_parts);\n\n if ($next)\n {\n $v = $piece;\n }\n elseif ($piece == 'v')\n {\n $next = true;\n }\n }\n\n return $v;\n }", "title": "" }, { "docid": "764924bb4be179f17a6a4703c20ecdc5", "score": "0.5023515", "text": "function YT_video(){\n\t\t$html = '';\n\t\t//RSS feed Link RPGTEAMX Kanal\n\t\t$url = \"https://www.youtube.com/feeds/videos.xml?channel_id=UCf15ZON61Cgu6F3kw1Q22LA\";\n\t\t//RSS FEED in XML laden\n\t $xml = simplexml_load_file($url);\n\t\tfor ($i=0; $i < 2; $i++) {\n\t\t\t//Id der aktuellsten Videos\n\t\t\t$id = $xml->entry[$i]->id;\n\t\t\t$id = substr($id, strpos($id, \":\")+7);\n\t\t\t$title = $xml->entry[$i]->title;\n\t\t\t//Titel kürzen falls zu lang\n\t\t\tif (strlen($title)> 50) {\n\t $title = substr($title, 0, 80). '...';\n\t }\n\t\t\t//HTML generieren\n\t\t\t$html .= \"<div class='YTVideo'>\n\t\t\t\t\t\t<h3 style='margin-bottom:30px'><u><b>$title</b></u></h3>\n\t\t\t\t\t\t<div class='embed-responsive embed-responsive-16by9'>\n\t\t \t\t\t<iframe class='embed-responsive-item' src='https://www.youtube.com/embed/$id'></iframe>\n\t\t \t\t\t</div>\n\t\t \t\t</div>\";\n\t\t if ($i<1) {\n\t\t \t$html .= \"<hr class='YThr'>\";\n\t\t }\n\t\t}\n\t\t#HTML ausgeben\n\t\techo $html;\n\t}", "title": "" }, { "docid": "a5792fdd4b4a05d9cf42a91f380147c1", "score": "0.5014904", "text": "public function getResponseObject();", "title": "" }, { "docid": "dc8c5d6658f2f98b87cd14f6bb9591e1", "score": "0.5005419", "text": "protected function parse()\n {\n $parser = $this->parser;\n $object = $parser['object'];\n if ($object === 'this') {\n $object = $this;\n }\n $method = $parser['method'];\n\n return $parser['options'] === null ? $object->$method($this->response) :\n $object->$method($this->response, $parser['options']);\n }", "title": "" }, { "docid": "e5ebfb0bec4ba910f77ecb9657394176", "score": "0.49984148", "text": "function extract_youtube_video_url($content) {\n if ( $id = extract_youtube_id($content) ) {\n return \"http://www.youtube.com/v/{$id}?fs=1&amp;hl=en_US\";\n }\n}", "title": "" }, { "docid": "616a15d80774dd6cb63e08840cfae4ca", "score": "0.49981883", "text": "public function parse($plugin, $response);", "title": "" }, { "docid": "e1f2b302848cd71873441334e08ab992", "score": "0.4996373", "text": "function parse($video_code) {\n\t\t$regexes = array(\n\t\t\t// Something like: https://www.youtube.com/watch?v=lsSC2vx7zFQ\n\t\t\t\"url_regex\" =>\n\t\t\t\t'~^' . \n\t\t\t\t\t$this->regex_fragments['protocol'] . \n\t\t\t\t\t'(?P<domain>(?:www\\.)?youtube\\.com)/watch\\?v=' . \n\t\t\t\t\t$this->regex_fragments['video_id'] .\n\t\t\t\t'~i', \n\n\t\t\t// Something like \"http://youtu.be/lsSC2vx7zFQ\" or \"http://youtu.be/6jCNXASjzMY?t=3m11s\"\n\t\t\t\"share_url_regex\" =>\n\t\t\t\t'~^' .\n\t\t\t\t\t$this->regex_fragments['protocol'] . \n\t\t\t\t\t'youtu\\.be/' .\n\t\t\t\t\t$this->regex_fragments['video_id'] .\n\t\t\t\t\t$this->regex_fragments['args'] .\n\t\t\t\t'$~i',\n\n\t\t\t// Youtube embed iframe code: \n\t\t\t// //www.youtube.com/embed/LlhfzIQo-L8?rel=0\n\t\t\t\"direct_embed_code_regex\" =>\n\t\t\t\t'~^'.\n\t\t\t\t\t$this->regex_fragments['protocol'] . \n\t\t\t\t\t'(?P<domain>(www\\.)?youtube(?:-nocookie)?\\.com)/(?:embed|v)/' . \n\t\t\t\t\t$this->regex_fragments['video_id'] .\n\t\t\t\t\t$this->regex_fragments['args'] .\n\t\t\t\t'$~i',\n\n\t\t\t// Youtube embed iframe code: \n\t\t\t// <iframe width=\"560\" height=\"315\" src=\"//www.youtube.com/embed/LlhfzIQo-L8?rel=0\" frameborder=\"0\" allowfullscreen></iframe>\n\t\t\t\"embed_code_regex\" =>\n\t\t\t\t'~'.\n\t\t\t\t\t'<iframe.*?src=[\\'\"]' .\n\t\t\t\t\t$this->regex_fragments['protocol'] . \n\t\t\t\t\t'(?P<domain>(www\\.)?youtube(?:-nocookie)?\\.com)/(?:embed|v)/' . \n\t\t\t\t\t$this->regex_fragments['video_id'] .\n\t\t\t\t\t$this->regex_fragments['args'] .\n\t\t\t\t'[\\'\"]~i',\n\n\t\t\t// Youtube old embed flash code:\n\t\t\t// <object width=\"234\" height=\"132\"><param name=\"movie\" ....\n\t\t\t// .. type=\"application/x-shockwave-flash\" width=\"234\" heighGt=\"132\" allowscriptaccess=\"always\" allowfullscreen=\"true\"></embed></object>\n\t\t\t\"old_embed_code_regex\" =>\n\t\t\t\t'~'.\n\t\t\t\t\t'<object.*?' .\n\t\t\t\t\t$this->regex_fragments['protocol'] . \n\t\t\t\t\t'(?P<domain>(www\\.)?youtube(?:-nocookie)?\\.com)/v/' . \n\t\t\t\t\t$this->regex_fragments['video_id'] .\n\t\t\t\t\t$this->regex_fragments['args'] .\n\t\t\t\t'[\\'\"]~i'\n\t\t);\n\n\t\t$args = array();\n\t\t$video_input_type = null;\n\n\t\tforeach ($regexes as $regex_type => $regex) {\n\t\t\tif (preg_match($regex, $video_code, $matches)) {\n\t\t\t\t$video_input_type = $regex_type;\n\t\t\t\t$this->video_id = $matches['video_id'];\n\n\t\t\t\tif (isset($matches['params'])) {\n\t\t\t\t\t// & in the URLs is encoded as &amp;, so fix that before parsing\n\t\t\t\t\t$args = htmlspecialchars_decode($matches['params']);\n\t\t\t\t\tparse_str($args, $params);\n\n\t\t\t\t\tif ($video_input_type === 'old_embed_code_regex') {\n\t\t\t\t\t\t// Those are legacy params for the flash player\n\t\t\t\t\t\tunset($params['hl'], $params['version']);\n\t\t\t\t\t}\n\n\t\t\t\t\tforeach ($params as $arg_name => $arg_val) {\n\t\t\t\t\t\t$this->set_param($arg_name, $arg_val);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (isset($matches['domain'])) {\n\t\t\t\t\t$this->domain = $matches['domain'];\n\t\t\t\t}\n\n\t\t\t\t// Stop after the first match\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// For embed codes, width and height should be extracted\n\t\t$is_embed_code = in_array($video_input_type, array(\n\t\t\t'embed_code_regex',\n\t\t\t'old_embed_code_regex'\n\t\t));\n\n\t\tif ($is_embed_code) {\n\t\t\tif (preg_match_all('~(?P<dimension>width|height)=[\\'\"](?P<val>\\d+)[\\'\"]~', $video_code, $matches)) {\n\t\t\t\t$this->dimensions = array_combine(\n\t\t\t\t\t$matches['dimension'],\n\t\t\t\t\t$matches['val']\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tif (!isset($this->video_id)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a88771551d8221572702fdc7b455ab80", "score": "0.49939793", "text": "protected function parse()\n\t{\n\t\t// we know that for the track method, we should be received XML back.\n\t\t// if we don't have XML, then give an error\n\t\t$xml = simplexml_load_string($this->rawResponse['body']);\n\t\tif ($xml === false)\n\t\t{\n\t\t\tthrow new \\Exception(\"non-xml response from tracking response\");\n\t\t} // end if\n\t\t\n\t\t// otherwise we have a valid object and can continue\n\t\t$resp = [];\n\t\tforeach ($xml->xpath('PackageTrackingInfo') as $shipment)\n\t\t{\n\t\t\t// going to do something very simple here and convert each shipment into an associative array\n\t\t\t$this->response[] = json_decode(json_encode($shipment), true);\n\t\t}\n\t}", "title": "" }, { "docid": "df2b59d11ef1576829dac2603c41d8c2", "score": "0.49833202", "text": "public function parse()\n\t{\n\t\t// get current weather, just for fun\n\t\t$data = file_get_contents(\"http://api.openweathermap.org/data/2.5/weather?zip=420000,ru&units=metric\");\n\t\t$this->record->formatted = str_replace(\"{weather}\", $data, $this->record->formatted);\n\t\treturn $this->record;\n\t}", "title": "" }, { "docid": "3a8fd4d7b002a4ac6e84707b328e0421", "score": "0.49831563", "text": "public function prepValue($value)\n\t{\n\t\t$value = json_decode($value);\n\n\t\treturn $value ? craft()->wistia_video->getVideos($value) : $value;\n\t}", "title": "" }, { "docid": "d2e83eef8f1a7ea84bea40ecd9533926", "score": "0.49733397", "text": "function youtube_follower($id){\n // $res = $client->request('GET', 'http://rctimobile.com/engine/ytsubs.php?id='.$id);\n\n // echo $res->getBody();\n\n $channel = \\Youtube::getChannelByID($id);\n\n $youtube=$channel;\n\n if(isset($youtube->statistics)){\n return $youtube->statistics->subscriberCount;\n }else{\n return 0;\n }\n}", "title": "" }, { "docid": "cbbbe8f3afbfc8451b17e5e16a506a38", "score": "0.49691775", "text": "public function getParsedResponse() {\n return $this->parsedResponse;\n }", "title": "" }, { "docid": "f41d3964a9b495ebf0cbb5993beae04a", "score": "0.496804", "text": "public function getParsedUrl(): object {\r\n return $this -> url;\r\n }", "title": "" }, { "docid": "76f5dc7c1d1e00ce8363dac22bcd9bbc", "score": "0.49677607", "text": "public function get_vimeo_videos($type,$value){\n\t\t//call the API and decode the response\n\t\tif($type==\"user\"){\n\t\t\t$url = \"https://vimeo.com/api/v2/\".$value.\"/videos.json\";\n\t\t}\n\t\telse{\n\t\t\t$url = \"https://vimeo.com/api/v2/\".$type.\"/\".$value.\"/videos.json\";\n\t\t}\n\t\t\n\t\t$rsp = json_decode(file_get_contents($url));\n\t\t\n\t\treturn $rsp;\n\t}", "title": "" }, { "docid": "b36194a3507902d6dcdc3a736caff912", "score": "0.4960219", "text": "public function getVideoTrailer($tmdbId=\"\"){ \n Validate::checkParameter($tmdbId);\n\n try{\n $request_two=file_get_contents(APIURL.\"movie/\".$tmdbId.\"/videos?api_key=\".APIKEY.\"&language=en-US\");\n if($request_two === FALSE){\n throw new Exception(\"Cannot access API to read contents.\");\n }else{\n $jsonTrailer=json_decode($request_two, true);\n }\n \n\n $trailer=null;\n\n if($jsonTrailer['results'] != null){\n if($jsonTrailer['results'][0] != null){\n if($jsonTrailer['results'][0]['site'] == 'YouTube'){\n $trailer = $jsonTrailer['results'][0]['key'];\n }\n }\n }\n return $trailer;\n\n }catch(\\Exception $e){\n header(\"location:../../Home/index?alert=\".$e->getMessage()); \n }\n }", "title": "" }, { "docid": "a05c701f521f0bac339af3a6918965b4", "score": "0.495807", "text": "protected function parseResponse()\n {\n if (!empty($this->response)) {\n preg_match('/^SIP\\/2\\.0 (([0-9]{3}) (\\w+))/', $this->response, $parsedResponse);\n $this->responseCode = $parsedResponse[2];\n $this->responseMessage = $parsedResponse[3];\n $this->responseConcat = $parsedResponse[1];\n }\n }", "title": "" }, { "docid": "c22a81f906909c37177ed54d050042fc", "score": "0.49577174", "text": "private function parseResult(Response $response): void\n {\n $return = $response->getBody()->getContents();\n\n $json = json_decode($return);\n\n $this->resultReset();\n\n $this->result->status = 'OK';\n $this->result->version = $json->versao;\n $this->result->quantity = $json->quantidade;\n $this->result->queryType = $json->pesquisa;\n $this->result->resultType = $json->resultado;\n\n $count = 0;\n foreach ($json->objeto as $object) {\n\n $this->result->objects[$count] = new \\stdClass();\n\n if(mb_strpos($object->categoria, 'ERRO: ') !== false){\n $this->result->objects[$count]->status = 'ERROR';\n $this->result->objects[$count]->number = $object->numero;\n $this->result->objects[$count]->error = $object->categoria;\n continue;\n }\n\n $this->result->objects[$count]->status = 'OK';\n $this->result->objects[$count]->number = $object->numero;\n $this->result->objects[$count]->initials = $object->sigla;\n $this->result->objects[$count]->name = $object->nome;\n $this->result->objects[$count]->category = $object->categoria;\n\n $this->result->objects[$count]->events = $this->parseTrackingEvents($object->evento);\n $count++;\n }\n }", "title": "" }, { "docid": "81366c6d4b637254b1657439fc1de0fc", "score": "0.49547198", "text": "public function getYoutubeVideoIdUnwrapped()\n {\n return $this->readWrapperValue(\"youtube_video_id\");\n }", "title": "" }, { "docid": "1a131c0bc804591e00e0d4df1c595d69", "score": "0.4944219", "text": "public function processResult($result) {\n \t\ttry {\n\t\t\t if(is_object($result->ysearchresponse) && $result->ysearchresponse->responsecode == self::SUCCESS ) {\n\t\t\t\t $temp = $result->ysearchresponse;\n\t\t\t\t if($temp->nextpage)\n\t\t\t\t $this->next = $temp->nextpage;\n\t\t\t\t if($temp->prevpage)\n\t\t\t\t $this->previous = $temp->prevpage;\n\t\t\t\t $this->totalhits = $temp->totalhits;\n\t\t\t\t $this->start = $temp->start;\n\t\t\t\t $this->result_per_page = $temp->count;\n\t\t\t\t $this->deephit = $temp->deephits;\n\t\t\t\t if($temp->count > 0) {\n\t\t\t\t $this->total = ceil($temp->totalhits/$temp->count);\n\t\t\t\t $this->current = ceil($temp->start/$temp->count);\n\t\t\t }\n\t\t\t else {\n\t\t\t \t $this->total = 0;\n\t\t\t \t $this->current = 0;\n\t\t\t }\n\t\t\t\t\n\t\t\t\t if($this->searchtype == 'web') {\n\t\t\t\t\t $this->search_results = $temp->resultset_web;\n\t\t\t\t\t \t$this->processResultsWeb();\n\t\t\t\t\t\tprint_r($result,true); //no idea why it dosent work when this is removed.\n\t\t\t\t }\n\t\t\t\t elseif($this->searchtype == 'images') {\n\t\t\t\t\t $this->search_results = $temp->resultset_images;\n\t\t\t\t }\n\t\t\t\t elseif($this->searchtype == 'news') {\n\t\t\t\t\t $this->search_results = $temp->resultset_news;\n\t\t\t\t }\n\n\t\t\t }\n\t\t\t}\n\t\t\tcatch(Exception $e) {\n\t\t\t throw new Exception(\"Could not retreive result:\",$e->getMessage(), \"\\n\");\n\t\t }\n\t\t}", "title": "" }, { "docid": "bb212195f977ec6d3f0b3769cf94604f", "score": "0.4936441", "text": "function insert_videos($youtube_channel_id,$channel_id,$page_token,$DEVELOPER_KEY,$conn,$last_channel_pull,$output){\n //add date to curl if a data was given\n if(!empty($last_channel_pull)){\n $last_channel_pull = \"&publishedAfter={$last_channel_pull}\";\n }\n //fill curl string with an empty string if no page token was given\n //else include the page token\n if($page_token==='first'){\n $page_query='';\n }else{\n $page_query=\"&pageToken={$page_token}\";\n }\n //make curl call to youtube to grab videos based on channel\n //and any addition information\n try{\n $ch = curl_init(\"https://www.googleapis.com/youtube/v3/search?key={$DEVELOPER_KEY}{$page_query}{$last_channel_pull}&channelId={$youtube_channel_id}&part=snippet&order=date&maxResults=45\");\n }catch(e){\n error_log(e,0)\n }\n \n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $json = curl_exec($ch);\n $error_occurred = false;\n //check for error on curl call, output error message if needed\n if ($json === false || curl_errno($ch)) {\n $error_occurred = true;\n }\n $decoded_json = json_decode($json);\n if ($decoded_json === NULL ) {\n $error_occurred = true;\n }\n if ($error_occurred){\n $body = 'Error occurred in ' . __FILE__ . \"\\n\\n\" .\n 'curl_errno: ' . curl_errno($ch) . \"\\n\" .\n 'curl_error: ' . curl_error($ch) . \"\\n\" .\n 'strlen($json): ' . strlen($json) . \"\\n\" .\n 'var_export(curl_getinfo($ch), true): ' . var_export(curl_getinfo($ch), true) . \"\\n\\n\" .\n '$json: ' . $json . \"\\n\";\n $error = json_encode($body);\n $output['errors'][] = $error;\n $output['messages'] = 'curl failed at youtube_channel_curl';\n output_and_exit($output);\n } else {\n //decode data from youtube and convert into format\n //to be inserted into the database\n $video_array = json_decode($json, true);\n //exit and output message if nothing was found\n if(empty($video_array['items'])){\n $output['messages'][] = 'no new videos';\n output_and_exit($output);\n }\n //grab a page token if it exist\n if(!empty($video_array['nextPageToken'])){\n $next_page_token = $video_array['nextPageToken'];\n $output['page_token']=$next_page_token;\n }\n $entries = $video_array['items'];\n $last_updated = date('Y-m-d H:i:s');\n //complete query based on length of videos array\n $query = \n \"INSERT INTO \n videos \n (video_title, \n channel_id, \n youtube_video_id, \n description, \n published_at) \n VALUES\n (?,?,?,?,?)\";\n $bind_str = \"sisss\";\n $output['videos_inserted'] = 0;\n //break the data to insert into database\n foreach($entries as $key => $value){\n if(!empty($value['id']['videoId'])&&!empty($value['snippet']['title'])&&!empty($value['snippet']['description'])&&!empty($value['snippet']['publishedAt'])){\n $data = [];\n //grab relavent data from youtube and put it into an array\n $data[] = html_entity_decode(filter_var($value['snippet']['title'], FILTER_SANITIZE_STRING));//youtube video title\n $data[] = $channel_id;\n if(preg_match('/^[a-zA-Z0-9\\-\\_]{11,15}$/', $value['id']['videoId'])){//regex video id\n $data[] = $value['id']['videoId'];\n }\n $data[] = html_entity_decode(filter_var($value['snippet']['description'], FILTER_SANITIZE_STRING));//description\n //break datetime given from youtube to datetime that can be entered into database\n $published_at = $value['snippet']['publishedAt'];\n $published_at = str_replace('T',' ',$published_at);\n $published_at = str_replace('.000Z','',$published_at);\n if(validateDate($published_at)){\n $data[] = $published_at;\n };\n $stmt = $conn->prepare($query);\n $stmt->bind_param($bind_str, ...($data));\n $stmt->execute();\n if($conn->affected_rows>0){\n $output['videos_inserted'] +=1;\n //set output page token if it exist\n }else{\n $output['errors'][] = 'unable to insert video';\n }\n }\n }\n if($output['videos_inserted']>1){\n $output['success'] = true;\n }\n //let client know that first 45 has been inserted so they can search\n if($page_token === 'first'){\n output_and_exit($output);\n }\n //recursively call this function till there are no more page tokens\n if(!empty($next_page_token)){\n insert_videos($youtube_channel_id,$channel_id,$next_page_token,$DEVELOPER_KEY,$conn,$last_channel_pull,$output);\n }\n }\n}", "title": "" }, { "docid": "95d043e2e802ec6951a9b4c86ea31f04", "score": "0.4935925", "text": "public function get_info_multi() {\n\n\n // we're not getting anywhere without a video ID.\n if (!isset($this->video_id_list) or !is_array($this->video_id_list)) {\n $this->tattle(\"No Video ID list supplied for coreapi::getInfo() or video list not supplied as an array\");\n return false;\n } else {\n\n foreach ($this->video_id_list as $videoid) {\n // build the API call and pass it to callAPI();\n $apicall[] = \"?method=getStatus&id=\" . $videoid;\n }\n\n // call\n\n if (!$xml = $this->callAPIMulti($apicall, $this->apiurl)) { // BREAKPOINT\n $this->tattle(\"coreapi::get_info - No data returned from API with the following call: $apicall\");\n return false;\n }\n\n // did we get an error? Let's check and bail out if we did.\n if (isset($xml->getStatus->error) && $xml->getStatus->error <> \"\") {\n // and let's log this, so we can figure out what happened.\n $this->tattle(\"An error occurred when querying the API: \" . $xml->getStatus->error);\n return false;\n } else {\n\n\n\n $this->video_list_details = array();\n foreach ($xml as $item) {\n // if a valid video is returned in the list, process it.\n if (!isset($item->getStatus->error)) {\n $vid = (string)$item->getStatus->result->video_id;\n // yay valid search results!\n $this->video_list_details[\"{$vid}\"]->video_id = $vid;\n $this->video_list_details[\"{$vid}\"]->title = (string)$item->getStatus->result->title;\n $this->video_list_details[\"{$vid}\"]->video_url = (string)$item->getStatus->result->video_url;\n $this->video_list_details[\"{$vid}\"]->published_date = (string)$item->getStatus->result->published_date;\n $this->video_list_details[\"{$vid}\"]->status = (string)$item->getStatus->result->status;\n $this->video_list_details[\"{$vid}\"]->video_status = (string)$item->getStatus->result->video_status;\n $this->video_list_details[\"{$vid}\"]->download = (string)$item->getStatus->result->download;\n $this->video_list_details[\"{$vid}\"]->embed = (string)$item->getStatus->result->embed;\n $this->video_list_details[\"{$vid}\"]->description = (string)$item->getStatus->result->description;\n $this->video_list_details[\"{$vid}\"]->access_key = (string)$item->getStatus->result->access_key;\n $this->video_list_details[\"{$vid}\"]->uploaded_by = (string)$item->getStatus->result->uploaded_by;\n $this->video_list_details[\"{$vid}\"]->uploaded_by_username = (string)$item->getStatus->result->uploaded_by_username;\n $this->video_list_details[\"{$vid}\"]->created = (string)$item->getStatus->result->created;\n $this->video_list_details[\"{$vid}\"]->modified = (string)$item->getStatus->result->modified;\n $this->video_list_details[\"{$vid}\"]->asset_type = (string)$item->getStatus->result->asset_type;\n $this->get_screenshot($item);\n } else {\n $this->tattle(\"An error occurred when querying the API: \" . $xml->getStatus->error);\n return false;\n }\n }\n\n return true;\n } // end check for errors;\n } // end check for video id\n }", "title": "" }, { "docid": "254b41affeadd102de748a810f6969cb", "score": "0.49303725", "text": "function video_cck_brightcove_extract($embed = '') {\n return array(\n //<embed src='http://www.brightcove.tv/playerswf' bgcolor='#FFFFFF' flashVars='allowFullScreen=true&initVideoId=1155177265&servicesURL=http://www.brightcove.tv&viewerSecureGatewayURL=https://www.brightcove.tv&cdnURL=http://admin.brightcove.com&autoStart=false' base='http://admin.brightcove.com' name='bcPlayer' width='425' height='350' allowFullScreen='true' allowScriptAccess='always' seamlesstabbing='false' type='application/x-shockwave-flash' swLiveConnect='true' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'></embed>\n\n '@brightcove\\.tv/playerswf\\' bgcolor\\=\\'\\#FFFFFF\\' flashVars\\=\\'initVideoId\\=([^\\&]*)\\&@i',\n\n // was:\n // &initVideoId=753308735&\n // '@\\&initVideoId=([^\\&]*)\\&@',\n\n // http://www.brightcove.tv/title.jsp?title=753308735\n '@brightcove\\.tv/title\\.jsp\\?title=(.*)@i',\n );\n}", "title": "" }, { "docid": "9bc3752bd538a5c79237f1e63efed46a", "score": "0.49276054", "text": "function callback($result) {\n // remember, the \"body\" property of $result is run through \"htmlentities()\" so we need to \"html_entity_decode\" it\n $result->body = json_decode(html_entity_decode($result->body));\n // show everything\n print_r('<pre>');\n print_r($result->info['original_url']);\n\t print_r('</pre>');\n }", "title": "" }, { "docid": "f08643dddc770bfe4c997db1a3855715", "score": "0.4925909", "text": "function vcita_parse_response($response) {\r\n $success = false;\r\n $raw_data = \"Unknown error\";\r\n \r\n if (is_wp_error($response)) {\r\n $raw_data = $response->get_error_message();\r\n \r\n } elseif (!empty($response['response'])) {\r\n if ($response['response']['code'] != 200) {\r\n $raw_data = $response['response']['message'];\r\n } else {\r\n $success = true;\r\n $raw_data = $response['body'];\r\n }\r\n }\r\n \r\n return compact('raw_data', 'success');\r\n}", "title": "" }, { "docid": "9cecb2304b8bc8fcfd45ff5620ae9b45", "score": "0.49035186", "text": "function extract_youtube_id($content) {\n if( preg_match('/\\[youtube.+id=\"(.*?)\".*\\]/i',$content,$regs) ) {\n return $regs[1];\n }\n else {\n return \"NO_VIDEO\";\n }\n}", "title": "" }, { "docid": "5ce995f4d28d305ee229cb74576a9d14", "score": "0.489989", "text": "public function getObject()\n {\n // Special case for empty strings.\n if(strlen($this->_response) === 0) {\n return '';\n }\n $objectFromJson = json_decode($this->_response);\n if(!$objectFromJson) {\n throw new Temboo_Exception(\"API returned invalid JSON response.\", array('response' => $this->_response));\n }\n return $objectFromJson;\n }", "title": "" }, { "docid": "9faa9b15a0a294d88216cd5771b74f64", "score": "0.48974517", "text": "public function getVideo()\n {\n try {\n $data = array();\n $video = Video::where('status', '1')->get();\n foreach ($video as $temp) {\n $data[] = array(\n 'id' => $temp->id,\n 'title' => $temp->title,\n 'link' => $temp->link,\n 'description' => $temp->description,\n );\n }\n\n $per_page = config('constants.perPage10');\n $currentPage = LengthAwarePaginator::resolveCurrentPage();\n $collection = new Collection($data);\n $currentPageResults = $collection->slice(($currentPage - 1) * $per_page, $per_page)->values();\n $data['results'] = new LengthAwarePaginator($currentPageResults, count($collection), $per_page);\n $data = $data['results'];\n\n return response()->json(['status' => 1, 'msg' => config('constants.successMsg'), \"payload\" => ['data' => $data]], config('constants.ok'));\n } catch (Exception $e) {\n return response()->json(['status' => 0, 'msg' => config('constants.serverErrMsg'), 'payload' => (object)[]], config('constants.serverErr'));\n }\n }", "title": "" }, { "docid": "f69163d9f03e0aba05cd33baef4afbb7", "score": "0.48956507", "text": "private function parseOutput() {\n $this->mediaType = array_shift($this->output);\n \n foreach ($this->output as $line) {\n list($key, $value) = explode(':', $line, 2);\n $key = trim($key);\n $value = trim($value);\n \n $this->mediaInfo[$key] = $value;\n }\n }", "title": "" }, { "docid": "0f02c45860be7ffa3e7e5ca606c4a2eb", "score": "0.48880038", "text": "function getYTID($url){\n // echo $my_array_of_vars['v='];\n\n preg_match('%(?:youtube(?:-nocookie)?\\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\\.be/)([^\"&?/ ]{11})%i', $url, $match);\n $youtube_id = $match[1];\n\n echo $youtube_id;\n}", "title": "" }, { "docid": "72467a9779540b5869be6b33b09c7ea0", "score": "0.48879448", "text": "function fetch_my_youtube_vids(){\r\n\trequire_once(ABSPATH.WPINC.'/rss.php');\r\n\t$rss = fetch_rss(\"http://gdata.youtube.com/feeds/base/users/\".get_option('myyt_username').\"/uploads?alt=rss&v=2&orderby=published&client=ytapi-youtube-profile\");\r\n\t$content = '<table width=\"120px\" cellpadding=\"2px\" cellspacing=\"2px\">';\r\n\tif(!empty($rss)){\r\n\t\t$items = array_slice($rss->items, 0, get_option('myyt_display_many'));\r\n\t\tforeach($items as $item){\r\n\t\t\t$content .= '<tr><td valign=\"top\">';\r\n\t\t\t$video_link = clean_url($item['link'], $protocolls = null, 'display');\r\n\t\t\t$video_id = str_replace(\"http://www.youtube.com/watch?v=\", \"\", \"$video_link\"); /* Removes the beginning part of the video url. */\r\n\t\t\t$video_id = str_replace(\"feature=youtube_gdata\", \"\", \"$video_id\"); /* Removes the end of the video url. */\r\n\t\t\tif(get_option('myyt_enable_hd') == 'yes'){\r\n\t\t\t\t$enableHD = str_replace(\"feature=youtube_gdata\", \"feature=youtube_gdata&hd=1\", $video_link); // Removes the end of the video url.\r\n\t\t\t\t$video_link = $enableHD;\r\n\t\t\t}\r\n\t\t\t$video_id = preg_replace('/&/', '&amp;', $video_id); /* Rewrites the '&' symbol. */\r\n\t\t\t$video_id = str_replace('&amp;', '', $video_id); /* Removes the '&' symbol. */\r\n\t\t\t$video_id = str_replace('#038;', '', $video_id); /* Removes the garbage put in place of '&' . */\r\n\t\t\tif(get_option('myyt_display_thumb') == 'yes'){ $content .= '<a target=\"_blank\" href=\"'.$video_link.'\" title=\"'.htmlentities($item['title']).'\"><img class=\"latest_yt\" src=\"http://i.ytimg.com/vi/'.$video_id.'/default.jpg\" width=\"120\" height=\"90\" /></a><br />'; } /* Displays latest video thumbnail linked to the video. */\r\n\t\t\t$content .= '<a target=\"_blank\" href=\"'.$video_link.'\" title=\"'.htmlentities($item['title']).'\">'.htmlentities($item['title']).'</a><br />';\r\n\t\t\tif(get_option('myyt_display_dateadded') == 'yes'){ $content .= 'Added: <em>('.date('M j, Y', strtotime($item['pubdate'])).')</em>'; /* Date of video uploaded. */ }\r\n\t\t\t//$content .= '<span style=\"font-size:12px;\">'.$item['description'].'</span><br /><br />';\r\n\t\t\t$content .= \"</td></tr>\\n\";\r\n\t\t}\r\n\t}\r\n\telse{\r\n\t\t$content .= \"<tr>\\n\";\r\n\t\t$content .= \"<td>YouTube Feed not found! Please try again later</td>\\n\";\r\n\t\t$content .= \"</tr>\\n\";\r\n\t}\r\n\t$content .= '</table>';\r\n\treturn $content; // Displays the YouTube video feed.\r\n}", "title": "" }, { "docid": "5b21b1fa6d3d7ed09ed98dac2fb9b9af", "score": "0.4884091", "text": "public function extract () {\n\n // If is an object, it's most likely an error.\n if (is_object($this->data)) return $this->data;\n\n // Attempt to pick NEXT_DATA from DOM\n if (preg_match_all('#\\<script id=\\\"__NEXT_DATA__\\\" type=\\\"application/json\\\" crossorigin=\\\"anonymous\\\">(.*?)\\<\\/script\\>#', $this->data, $out)) {\n return json_decode($out[1][0], true, 512, JSON_BIGINT_AS_STRING);\n }\n\n return (object) [\n 'error' => true,\n 'type' => 'NO_NEXT_DATA',\n 'message' => 'Unable to retrieve NEXT_DATA from DOM'\n ];\n }", "title": "" }, { "docid": "4fb35ed89e2c49d9d95c94c6dfe33c60", "score": "0.4883672", "text": "function get_param_vid() // parametri per video YouTube\n {\n $arr=array();\n $arr = explode(\",\",$this->param); \n // scompongo i singoli elementi\n foreach ($arr as $par) \n {// scompongo chiave-valore separati da \"=\"\n \t $part = explode(\"=\",$par);\n \n switch ($part[0])\n {\n case 'vid':\n $this->vid = $part[1];\n break;\n case 'lar':\n $this->lar = $part[1];\n break; \n case 'alt':\n $this->alt = $part[1];\n break; \n case 'bor':\n $this->bor = $part[1];\n break; \n case 'chi':\n $this->chi = $part[1];\n break; \n case 'scu':\n $this->scu = $part[1];\n break; \n default:\n \tbreak;\n }\n\n } \n }", "title": "" }, { "docid": "508b747654916c50a4ed83c60f5e85f2", "score": "0.48786625", "text": "public static function parse_videos($xpath) {\n // Array con los videos a retornar\n $videos = array();\n\n // Xpath donde buscar los videos\n $video_nodes = $xpath->query(\"//div[@class='mozaique']/div\");\n\n // Iteracion sobre los nodos encontrados\n foreach ($video_nodes as $node) {\n // Solo necesitamos los nodos li\n if ($node->tagName == 'div') {\n // Creamos una instancia de Video con los parametros por defecto\n $video = new Video();\n \n // ID del video\n $video->id = $node->getAttribute('data-id');\n \n // Titulo del video\n $link_node = $xpath->query(\"div[@class='thumb-under']/p[@class='title']/a\", $node);\n $video->title = self::encodeToUtf8($link_node->item(0)->nodeValue);\n \n // Video url\n $video->url = self::build_video_url($link_node->item(0)->getAttribute('href'));\n\n // Duracion\n $dur_node = $xpath->query(\"div[@class='thumb-under']/p[@class='metadata']//span[@class='duration']\", $node);\n $video->duration = $dur_node->item(0)->nodeValue;\n\n // Video thumb\n $thumb_node = $xpath->query(\"div[@class='thumb-inside']//img\", $node);\n $video->img_src = $thumb_node->item(0)->getAttribute('data-src') ;\n $video->iframe = self::get_iframe($video->id);\n \n // Agregamos el video al array\n $videos[] = $video;\n }\n }\n\n return $videos;\n }", "title": "" }, { "docid": "6fb5cb8f341d5ebd18ce845b2f13ac87", "score": "0.48785812", "text": "function download ($video_id) {\n\t\t$url = \"http://www.youtube.com/watch?v=\".$video_id;\n\t\t$this->req =& new HTTP_Request($url);\n\t\t$response = $this->req->sendRequest();\n\t\tif (PEAR::isError($response)) {\n\t\t\techo $response->getMessage().\"\\n\";\n\t\t} else {\t\n\t\t\t$page = $this->req->getResponseBody();\t\n\t\t\t//preg_match('/watch_fullscreen\\?video_id=(.*?)&l=(.*?)+&t=(.*?)&/', $page, $match);\n\t\t\tpreg_match('/\"video_id\": \"(.*?)\"/', $page, $match);\n\t\t\t$var_id = $match[1];\n\n\t\t\tpreg_match('/\"t\": \"(.*?)\"/', $page, $match);\n\t\t\t$var_t = $match[1];\n\n\t\t\t$url = \"\";\n\t\t\t$url .= $var_id;\n\t\t\t$url .= \"&t=\";\n\t\t\t$url .= $var_t;\n\t\t\t$url = \"http://www.youtube.com/get_video?video_id=\".$url;\n\t\t\tif ($this->debug)\n\t\t\t\treturn $url;\n\t\t\t\n\t\t\n\t\t}\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "3d2806ffa6c0589cb5d90e88fb9f13f0", "score": "0.4877638", "text": "function getSingleVideo($call_params=array()) {\n\t\tif(!self::$api_key || ! self::$api_secret_key) {\n\t\t\tuser_error('Fatal error: Invalid API keyand/or secret specified!');\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Prepare oauth arguments\n $oauth_params = array(\n 'oauth_consumer_key' => self::$api_key,\n 'oauth_version' => '1.0',\n 'oauth_signature_method' => 'HMAC-SHA1',\n 'oauth_timestamp' => time(),\n 'oauth_nonce' => $this->_generateNonce()\n );\n \n if(self::$token) {\n \t$oauth_params['oauth_token'] = self::$token;\n }\n \n\t\t$api_params = array(\n\t\t\t'format' => 'php',\n\t\t\t'method' => 'vimeo.videos.getInfo'\n\t\t);\n\t\t\n\t\t// Merge args\n foreach ($call_params as $k => $v) {\n if (strpos($k, 'oauth_') === 0) {\n $oauth_params[$k] = $v;\n }\n else {\n $api_params[$k] = $v;\n }\n }\n \n // Generate the signature\n $oauth_params['oauth_signature'] = $this->_generateSignature(array_merge($oauth_params, $api_params), self::$api_base_url);\n\t\t\n // Merge all args\n $params = array_merge($oauth_params, $api_params);\n \n\t\t$this->setQueryString($params);\n\t\t\n\t\t$response = $this->request();\n\t\t\n\t\t$video = unserialize($response->getBody());\n\t\t\n\t\tif(isset($video->video)) {\n\t\t\t$results = new DataObjectSet();\n\t\t\tforeach($video->video as $video) {\n\t\t\t\t$data = $this->_extractVideoInfo($video);\n\t\t\t\t$results->push(new ArrayData($data));\n\t\t\t}\n\t\n\t\t\t// since we manually created the dataobjectset, we need to set the pager info manually, too.\n\t\t\t$results = $results->First();\n\t\t} else {\n\t\t\t$results = false;\n\t\t}\n\t\t\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "d1c71a60df133433a3115fafd4153b0d", "score": "0.48770085", "text": "function PhilaCalendarGetFeed($url){\n\t$data = json_decode(file_get_contents($url, True));\n\n\treturn $data;\n}", "title": "" }, { "docid": "f2045bb17e6237342b73a17b2a4c0c3a", "score": "0.487264", "text": "public function getVideoInfo($id)\n {\n $url = 'https://facebook.com/watch/?v=' . $id;\n\n /* Grab video page */\n $response = VideoPlatformsParser::HTTPGet($url);\n\n /* Make HTML DOM from response */\n $dom = new DOMDocument();\n libxml_use_internal_errors(true); // ignore errors in html on website\n $dom->loadHTML($response);\n\n /* Parse data */\n $return = [];\n $metas = $dom->getElementsByTagName('meta');\n for ($i = 0; $i < $metas->length; $i++) { // check all meta tags\n $meta = $metas->item($i);\n if ($meta->getAttribute('name') == 'description') {\n $return['description'] = $meta->getAttribute('content');\n } else if ($meta->getAttribute('property') == 'og:image') {\n $return['thumbnail'] = $meta->getAttribute('content');\n } else if ($meta->getAttribute('property') == 'og:title') {\n $return['title'] = $meta->getAttribute('content');\n }\n }\n\n if (empty($return['title'])) {\n $return['title'] = $dom->getElementsByTagName('title')->item(0)->textContent;\n }\n if (empty($return['description'])) {\n $return['description'] = $return['title'];\n }\n\n return $return;\n }", "title": "" } ]
d03b388b5c2bcd743860d5a3096e1c5d
Execute the console command.
[ { "docid": "3b6ee1e25aa0182fb0a7e0956e498ed3", "score": "0.0", "text": "public function handle()\n {\n $now = Carbon::now();\n $send_notifi_order = OrderPackage::orderBy('id', 'desc')->get();\n if (count($send_notifi_order)) {\n $mail_package = EmailTemplate::where('slug', 'thong-bao-goi-dich-vu-sap-het-han')->first();\n foreach ($send_notifi_order as $key => $value) {\n $type = $value->type;\n $params = [\n 'sender' => env('MAIL_USERNAME'),\n 'receiver' => $value->orderToUser->name ? '[email protected]' : '[email protected]',\n 'content' => $value->name . $mail_package->body . $value->limit,\n 'title' => $mail_package->title,\n 'subject' => $mail_package->subject,\n ];\n if ($type == OrderPackageCode::TYPE_NEWS) {\n $date_end = Carbon::parse($value->limit);\n $diff = $date_end->diffInDays($now);\n if ($diff == NotificationCode::DATE_END && $diff > NotificationCode::NUMBER_ZERO) {\n $data = [\n 'message' => $value->name . ' của bạn sắp hết hạn vào ngày ' . $value->limit,\n 'user_id' => $value->user_id,\n 'common_id' => $value->id,\n 'type' => 'package',\n 'status' => NotificationCode::NUMBER_ZERO,\n ];\n Notification::create($data);\n \\Func::sendMail($params);\n } else {\n if ($diff == NotificationCode::NUMBER_ZERO) {\n $value->status = OrderPackageCode::STATUS_ORDER_EXPIRED;\n $value->save();\n }\n }\n }\n }\n }\n\n $send_notifi_product = SellProduct::orderBy('id', 'desc')->get();\n if (count($send_notifi_product)) {\n $mail_product = EmailTemplate::where('slug', 'thong-bao-san-pham-sap-het-han')->first();\n foreach ($send_notifi_product as $key => $value) {\n $check = $value->send_mail;\n $params = [\n 'sender' => env('MAIL_USERNAME'),\n 'receiver' => $value->sellToUser->name ? '[email protected]' : '[email protected]',\n 'content' => 'Sản phẩm ' . $value->name . $mail_product->body . $value->time_end,\n 'title' => $mail_product->title,\n 'subject' => $mail_product->subject,\n ];\n $date_end = Carbon::parse($value->time_end);\n $diff = $date_end->diffInDays($now);\n if ($diff <= NotificationCode::DATE_END && $diff > NotificationCode::NUMBER_ZERO\n && $check == NotificationCode::NUMBER_ZERO) {\n $data = [\n 'message' => 'Sản phẩm ' . $value->name . ' của bạn sắp hết hạn vào ngày ' . $value->time_end,\n 'user_id' => $value->user_id,\n 'common_id' => $value->id,\n 'type' => 'sellproduct',\n 'status' => NotificationCode::NUMBER_ZERO,\n ];\n Notification::create($data);\n \\Func::sendMail($params);\n $value->send_mail = NotificationCode::NUMBER_ONE;\n $value->save();\n }\n }\n }\n }", "title": "" } ]
[ { "docid": "41860c81414c761042ac26245cb46fd6", "score": "0.68433106", "text": "public function handle()\n {\n $arguments = $this->argument();\n $options = $this->option();\n\n $this->writeCriteria($arguments, $options);\n $this->composer->dumpAutoloads();\n }", "title": "" }, { "docid": "c8f750b3bae71f0e2005ed5790538fbb", "score": "0.6422205", "text": "public function handle()\n {\n switch ($this->option('command')) {\n case 'create':\n $this->takeSnapShot();\n break;\n\n case 'restore':\n $this->restoreSnapShot();\n break;\n\n default:\n $this->error('Invalid Option !!');\n break;\n }\n }", "title": "" }, { "docid": "6921c8ab7ff7a3512eb299a2c84b86f7", "score": "0.6421142", "text": "public function handle()\n {\n\n $match_id = $this->argument('match_id');\n $this->match_player_score($match_id);\n }", "title": "" }, { "docid": "850563a270b7d99bcc68012e7d1f0de1", "score": "0.6407697", "text": "public function handle()\n {\n // Get the arguments.\n $arguments = $this->argument();\n // Write controller.\n $this->writeController($arguments);\n // Dump autoload.\n $this->composer->dumpAutoloads();\n }", "title": "" }, { "docid": "e614e422b3d0e24fc4524350a0989d18", "score": "0.63631994", "text": "public function handle()\n {\n $translations = $this->getTranslations();\n $this->copyTranslations(\n $translations,\n collect($this->option('locale')),\n $this->option('origin')\n );\n }", "title": "" }, { "docid": "c4c8a2720895cefe782508d2a8430d53", "score": "0.63138884", "text": "public function handle()\n {\n // if you are on the local environment\n if (!app()->isLocal()) {\n $this->error('This command is only avilable on the local environment.');\n return;\n }\n \n $name = $this->argument('name');\n \n $this->archiveTenant($name);\n }", "title": "" }, { "docid": "85d7fe239d07fb45261afb62e9cbe363", "score": "0.6291947", "text": "public function handle()\n {\n\n $this->manifest->build();\n\n $this->info( 'Package manifest generated successfully.' );\n\n }", "title": "" }, { "docid": "1f7ac97715a7f845ce40901d843a9790", "score": "0.62873244", "text": "public function handle()\n {\n $command_user = $this->argument( 'user' );\n /* 设置执行用户 */\n if( $command_user ) {\n static::setUser( $command_user );\n }\n /* 设置执行用户 */\n \n //\n static::$Logger->info( \"test\" );\n }", "title": "" }, { "docid": "e2fe5d101675a0297c20751be2a43340", "score": "0.6272963", "text": "public function handle()\n {\n $generator = SitemapGenerator::getSitemapGenerator($this->argument('extension'));\n try {\n $generator->generate($this->argument('path'), self::ITEMS_ARRAY);\n } catch (Throwable $exception) {\n echo $exception->getMessage();\n }\n }", "title": "" }, { "docid": "25564db007f7b2923f22d0da0153d503", "score": "0.6270587", "text": "public function handle()\n {\n $this->info('Generate metadataset version '.$this->argument('version'));\n\n $curricula = Curriculum::where('type_id', 1)->get();\n $this->generate($curricula, $this->argument('version'));\n\n $this->info(' ...done');\n }", "title": "" }, { "docid": "bde9714f274e58d801c296a6fb51c3c1", "score": "0.6239485", "text": "public function handle()\n {\n $this->call('mission:clear');\n\n $this->info(\n $this->prependTimestamp('Generating missions...')\n );\n\n $this->database->transaction(function () {\n $users = User::whereNotNull('started_at')->get();\n\n foreach ($users as $user) {\n $this->manager->createRand($user);\n }\n });\n\n $this->info(\n $this->prependTimestamp('Generation complete!')\n );\n }", "title": "" }, { "docid": "e64d2deec514b8a15b93b76436a32208", "score": "0.62362635", "text": "public function handle()\n {\n $this->registerCommands();\n\n $this->application->run();\n }", "title": "" }, { "docid": "03d70e7b69dd3e4fa111a4771abdcad3", "score": "0.62302315", "text": "public function handle()\n {\n $annotations = $this->option('annotations');\n $db = $this->option('db');\n\n if ($annotations) {\n PermissionsHandler::clearCachedAnnotations();\n $this->info('Annotations cache has been deleted!');\n }\n\n if ($db) {\n Cache::forget('permissionsHandler');\n $this->info('Database cache has been deleted!');\n }\n }", "title": "" }, { "docid": "8163d1da65889db1a69beb0e4a651819", "score": "0.6229836", "text": "public function handle()\n {\n $this->entity = $this->argument('entity');\n\n $this->loadSchema();\n $this->loadNaming();\n $this->loadServices();\n }", "title": "" }, { "docid": "1a61f30c5ff47b38d0e39aee0b47d6f2", "score": "0.6227346", "text": "public function handle()\n {\n $this->user = User::find($this->argument('user'));\n try {\n $this->processing();\n foreach (Game::keyValue() as $gameId => $name) {\n $this->user->cardmarketApi->syncAllArticles($gameId);\n }\n $this->processed();\n }\n catch (\\Exception $e) {\n $this->processed();\n\n throw $e;\n }\n }", "title": "" }, { "docid": "1df765b91c4cf12abaca96292cf7894c", "score": "0.6218607", "text": "public function handle()\n {\n $channel = $this->argument('channel');\n $data = $this->argument('data');\n $this->info(\"Channel {$channel}!\");\n $this->info(\"Data {$data}!\");\n $result = Redis::publish(\n $channel,\n $data\n );\n $this->info(\"Resultado {$result}!\");\n }", "title": "" }, { "docid": "54e4e9f5ef98f17976368d102a617def", "score": "0.6209011", "text": "public function handle()\n {\n \\Log::info('Executing command playerInfo:update');\n $this->pullPlayerInfo();\n \\Log::info('Executed command playerInfo:update successfully');\n }", "title": "" }, { "docid": "f8204fec2526d4addf113d541a9205f0", "score": "0.6204994", "text": "public function handle()\n {\n $renameUser = new RenameUserService();\n\n $renameUser->execute(date(\"Y-m-d H:i:s\"));\n }", "title": "" }, { "docid": "3cc629923f9227c72153d98934b8a332", "score": "0.6195348", "text": "public function handle(): void\n {\n $arg = $this->argument('file');\n $command = $this->argument('command');\n $method = (strpos($command, ':') > 0) ? explode(':', $command)[1] : '';\n\n // Execute Quantical Solutions ReactNative command\n new Listener($this, $method, $arg);\n }", "title": "" }, { "docid": "ee6187456ee2422eae6a94410cffdbb7", "score": "0.61816555", "text": "public function handle()\n {\n $name = $this->getNameInput();\n $component = $this->getComponentInput();\n $installer = $this->getInstallerInstance($component);\n $this->$name($installer, $component);\n\n $this->error(\n 'This command is about to be removed, and this development will not be supported.'.PHP_EOL.\n 'We designed a better way to develop please refer to:'.PHP_EOL.\n ' https://github.com/zhiyicx/plus-installer'\n );\n\n $this->openBrowser('https://github.com/zhiyicx/plus-installer');\n }", "title": "" }, { "docid": "ac15acc3724f92190aaab43ef30552d3", "score": "0.61689013", "text": "public function handle()\n {\n $this->ignoreTmpTables = (bool)$this->option('ignoreTmp');\n $this->ignoreMigrationsTable = (bool)$this->option('ignoreMigrations');\n\n $this->fire();\n }", "title": "" }, { "docid": "fb2195f8224349de35a1d29856f47da3", "score": "0.61428034", "text": "public function handle()\n\t{\n\t\t$name = $this->argument('name');\n\n\t\tif (!$name) {\n\t\t\t$this->error('Sitemap class name required!');\n\t\t\texit(1);\n\t\t}\n\n\t\t$class = app_path(\"Sitemap/{$name}.php\");\n\n\t\tif (file_exists($class)) {\n\t\t\t$this->error(\"{$class} already exists!\");\n\t\t\texit(2);\n\t\t} elseif (!is_dir(app_path('Sitemap'))) {\n\t\t\tmkdir(app_path('Sitemap'));\n\t\t}\n\n\t\t$bytes = file_put_contents(\n\t\t\t$class,\n\t\t\tstr_replace('{name}', $name, file_get_contents(dirname(__DIR__, 2).'/stubs/sitemap.stub'))\n\t\t);\n\n\t\tif (!$bytes) {\n\t\t\t$this->error(\"Cannot create file: {$class}\");\n\t\t\texit(3);\n\t\t}\n\t}", "title": "" }, { "docid": "d034b41eee4e6ea73acf9c7487b4954b", "score": "0.6142225", "text": "public function handle()\n {\n $id = $this->argument('id');\n $bankAccount = $this->repository->load($id);\n\n echo $bankAccount->isClosed() ? 'Closed account' : 'Account';\n echo PHP_EOL;\n\n echo \"Name: \" . $bankAccount->getName() . PHP_EOL;\n echo \"Balance: $ \" . number_format($bankAccount->getBalance());\n }", "title": "" }, { "docid": "d620abdc9b16f8ea113150dd91b93860", "score": "0.61385727", "text": "public function handle()\n {\n $this->extendToken(\n token: $this->findToken()\n );\n\n return Command::SUCCESS;\n }", "title": "" }, { "docid": "407fd99b69a0fc43bd42f95af81efc20", "score": "0.61324", "text": "public function handle()\n {\n $name = $this->argument('name');\n\n $this->call('make:seeder', [\n 'name' => 'customer\\Permission' . $name . 'Seeder',\n ]);\n }", "title": "" }, { "docid": "9c809593cb5839ef29904ecb555357ac", "score": "0.6129035", "text": "public function handle()\n {\n\n $source = Source::find($this->argument('id'));\n\n if (!$source)\n {\n return $this->error('source not found');\n }\n\n $this->info(\"Fetching...\");\n\n $start = microtime(true);\n\n $items = Fetch::source($source->id);// fetch items\n\n $end = microtime(true);\n\n $timeTaken = round($end - $start, 2);\n \n $this->line(\"Collected {$items} items from source {$source->id} ({$source->url}) in {$timeTaken} seconds.'\");\n }", "title": "" }, { "docid": "50df32a8c00ddecfd6cf40838f706b8e", "score": "0.61203766", "text": "public function handle()\n {\n $filename = $this->argument('filename');\n GedcomParserFacade::parse('mysql', $filename, true, true);\n }", "title": "" }, { "docid": "acd12c6e0c9c6b8aff859ccee9f66451", "score": "0.61188745", "text": "public function handle()\n {\n $user = User::find($this->argument('user'));\n $amount = $this->argument('amount');\n\n Transaction::makeDeposit(new Money($amount), $user);\n\n $this->info(\"Deposit of {$amount} BRL made to User #{$user->id} {$user->name}\");\n }", "title": "" }, { "docid": "2f3bc1ded6b70f01ebcf5687b6f173bf", "score": "0.61177874", "text": "public function handle()\n {\n $this->call('package:contract', [\n 'name' => $this->argument('name'),\n ]);\n }", "title": "" }, { "docid": "998b9a26592ba3a4671ea3a31eece55b", "score": "0.6111735", "text": "public function fire()\n {\n $sqlPath = trim($this->input->getArgument('sqlPath'));\n\n $this->generateMigrations($sqlPath);\n\n $this->composer->dumpAutoloads();\n }", "title": "" }, { "docid": "766b2c594138b221fefc5d4f3c48eefd", "score": "0.609366", "text": "public function handle()\n {\n defined('DS') or define('DS', DIRECTORY_SEPARATOR);\n $action = $this->argument('action');\n $funcName = strtolower($action) . 'Action';\n if (method_exists($this, $funcName)) {\n call_user_func([\n $this,\n $funcName\n ]);\n } else {\n $this->error(PHP_EOL . 'No Action Found');\n }\n $this->comment(PHP_EOL . '> DONE !');\n }", "title": "" }, { "docid": "613d72f81f696cbb3cc0ce9fc584bd56", "score": "0.60905", "text": "public function handle()\n {\n $from = $this->argument('from');\n $to = $this->argument('to');\n\n if (!$this->isValidParam($from)) {\n $this->error('Only \"usd\" and \"cad\" are supported');\n return;\n }\n\n if (!$this->isValidParam($to)) {\n $this->error('Only \"usd\" and \"cad\" are supported');\n return;\n }\n\n $this->info('Fetching rate for \"' . $from . '\" -> \"' . $to . '\"');\n\n $result = $this->exchangeService->getData($from, $to);\n\n if (!isset($result['Realtime Currency Exchange Rate'])) {\n $this->error('There was an error during command execution');\n $this->info(json_encode($result));\n return;\n }\n\n $this->info(json_encode($result));\n }", "title": "" }, { "docid": "7eef6f692a2e8612701529fc2c749ebc", "score": "0.60823095", "text": "public function handle()\n {\n if ($this->argument('act')) {\n $this->executeJob($this->argument('act'));\n } else {\n $acts = Account::All();\n foreach ($acts as $act) {\n $this->executeJob($act->id);\n }\n }\n }", "title": "" }, { "docid": "96d82526fc64a65fc05bdc29f061f39c", "score": "0.60797423", "text": "public function handle()\n {\n $this->call('passport:keys', [ '--force' => $this->option('force') ]);\n\n $this->call('passport:client', [\n '--personal' => true,\n '--database' => $this->option('database'),\n '--connection' => $this->option('connection'),\n '--name' => $this->option('name') ?: null,\n ]);\n\n $this->call('passport:client', [\n '--password' => true,\n '--database' => $this->option('database'),\n '--connection' => $this->option('connection'),\n '--name' => $this->option('name') ?: null,\n ]);\n }", "title": "" }, { "docid": "53524eb4c21830da7ad77e2b87e9ea62", "score": "0.60743773", "text": "public function handle()\n {\n $sponsorId = $this->argumentsSponsorId();\n\n // {\"smart2::real_time::view\": {\"contract\": {\"start\": \"1900-01-01 00:00:00\",\"end\": \"9999-12-31 23:59:59\"}}, \"smart2::region_kanto::view\": {\"contract\": {\"start\": \"1900-01-01 00:00:00\",\"end\": \"9999-12-31 23:59:59\"}}}\n $permissions = $this->argumentsPermissions();\n\n $this->confirmApply('update', [\n 'sponsor_id: ' . $sponsorId,\n 'permissions: ' . json_encode($permissions, JSON_PRETTY_PRINT),\n ]);\n\n $sponsorRole = SponsorRole::findOrFail($sponsorId);\n $sponsorRole->fill([\n 'permissions' => $permissions,\n ])->save();\n\n $this->infoApplied();\n }", "title": "" }, { "docid": "53ed27d5bca7019d748f913b9836771d", "score": "0.60713667", "text": "public function handle()\n {\n $this->info('Normalizing author names');\n ResultsRepository::normalizeNames();\n }", "title": "" }, { "docid": "bfa6833d965fb8905fcc4c5f3fe36bda", "score": "0.6068034", "text": "public function handle()\n {\n $this->info('Generating sitemap...');\n $this->generate();\n }", "title": "" }, { "docid": "efd9dc2f03a338d9a35783097d33012f", "score": "0.60667014", "text": "public function handle()\n {\n $this->executeCommand($this->getCommand());\n }", "title": "" }, { "docid": "5fc5f5bddc1df94c9482d0a11927a24a", "score": "0.60648674", "text": "public function handle()\n {\n //\n Timer::start();\n $lang = app()->getLocale();\n $championEntity = new ChampionEntity($lang);\n if (!empty($this->argument('champion')) && $this->argument('champion') == 'all') {\n // get all champions\n $champions = $championEntity->getAllChampionsID();\n foreach ($champions as $champion) {\n echo $champion . \"\\n\";\n /* foreach (RiotEntity::$lanes as $lane) {\n echo \" \" . $lane; */\n $lane = \"all\";\n $this->livefeed($lang, $lane, $champion);\n event(new \\App\\Events\\LiveFeed($lane, $champion));\n /* } */\n }\n } else {\n $champion = \"\";\n if (!empty($this->argument('champion'))) {\n $champion = $this->argument('champion');\n }\n foreach (RiotEntity::$lanes as $lane) {\n echo $lane . \"\\n\";\n $this->livefeed($lang, $lane, $champion);\n event(new \\App\\Events\\LiveFeed($lane, $champion));\n }\n }\n\n $time = Timer::stop();\n print Timer::secondsToTimeString($time);\n }", "title": "" }, { "docid": "d2b5ba67d75a7d273d336c7f3b851c65", "score": "0.60639083", "text": "public function handle()\n {\n $value = $this->argument('value');\n $encrypted = Crypt::encrypt($value);\n $this->info($encrypted); \n }", "title": "" }, { "docid": "718e4409379d10d120304fa5d73cfbda", "score": "0.60616785", "text": "public function handle() {\n\n $urls = array_map( 'trim', file( $this->argument( 'input_file' ) ) );\n $finder = new Finder( $urls, $this->option( 'threads' ) );\n $finder->setCommand( $this );\n $res = $finder->find( function ( $request ) {\n } );\n\n if ( $o = $this->option( 'output' ) ) {\n file_put_contents( $o, implode( PHP_EOL, $res[ 'success' ] ) );\n }\n\n }", "title": "" }, { "docid": "bbca84711955ddf92518c9f80e31419a", "score": "0.6056845", "text": "public function handle()\n {\n //\n $option = $this->argument('action');\n\n\n switch ($option)\n {\n case \"start\":\n $this->info('wsswoole observer started');\n $this->start();\n break;\n case \"stop\":\n $this->info('stoped');\n $this->stop();\n break;\n case \"restart\":\n $this->info(\"restarted\");\n $this->restart();\n break;\n }\n }", "title": "" }, { "docid": "8b1a0baa56a3f37fe2e19da20c7db152", "score": "0.60534847", "text": "public function handle()\n {\n if ($this->argument('name') || $this->option('path')) {\n $this->writeView();\n }\n }", "title": "" }, { "docid": "7cd5de8a0836eae4674a607951f74956", "score": "0.6051865", "text": "public function handle()\n {\n dump($this->option('verified'));\n echo User::count() . \"\\n\";\n }", "title": "" }, { "docid": "6a01054f6fcd4659052a6578dd2fae68", "score": "0.60479355", "text": "public function handle()\n {\n $subject = $this->argument('subject');\n $fromDate = Carbon::today()->format('Y-m-d');\n\n if (!$this->isValidParam($subject)) {\n $this->error('Subject must not contain any spaces (it must be one word)');\n return;\n }\n\n $this->info('Fetching latest news about \"' . $subject . '\" for \"' . $fromDate . '\"');\n\n $result = $this->service->getData($subject, $fromDate);\n\n if (!isset($result[NewsTopicService::TOP_LEVEL_NAME])) {\n $this->error('There was an error during command execution');\n $this->info(json_encode($result));\n return;\n }\n\n $this->info(json_encode($result));\n }", "title": "" }, { "docid": "edc952b3b6fe354389f62f3a7057797e", "score": "0.60462517", "text": "public function handle() {\n $lookback = $this->argument('lookback');\n\n foreach($this->entities as $entity) {\n $job = new RedshiftDataValidationJob($entity, $lookback, str_random(16), $this->option('runtime-threshold'));\n $this->dispatch($job);\n }\n\n }", "title": "" }, { "docid": "f8f1f44788d86b3587c8a830e5a176b2", "score": "0.6045046", "text": "public function handle()\n {\n $this->bundle = ucfirst($this->argument('bundle'));\n $this->entity = ucfirst($this->argument('entity'));\n\n if (!$this->loader->onLoad()) {\n $this->error('Invalid JSON file: paths.json');\n return;\n }\n $this->http = $this->loader->paths->http;\n\n foreach ($this->loader->paths->paths as $key => $value) {\n $this->makeFile($key, $value);\n }\n }", "title": "" }, { "docid": "547ec9c5af8cb8f04f0c4306e6938132", "score": "0.6044936", "text": "public function fire()\n {\n $nameparser = new NameParser($this->argument('name'));\n $path = $this->getPath($nameparser);\n $template = $this->option('template');\n\n $this->printResult($this->generator->make($path, $template, $nameparser), $path);\n }", "title": "" }, { "docid": "5382d2a14390ada2dcb4baea471f5f31", "score": "0.60422015", "text": "public function handle()\n {\n //\n $userId = $this->argument('user');\n if (!$userId) {\n $this->error('Can not send email without user id.');\n return;\n }\n /** @var User $user */\n $user = User::find($userId);\n if (!$user) {\n $this->error('Can not find user by id: '. $userId);\n return;\n }\n if ($this->confirm(\"Email will send to {$user->email}. continue? [y|N]\")) {\n $shouldQueue = $this->option('queue');\n if ($shouldQueue) {\n \\Mail::to($user)->queue(new Test());\n } else {\n \\Mail::to($user)->send(new Test());\n }\n }\n }", "title": "" }, { "docid": "155e636f5525d9dbde6c02415acb5976", "score": "0.60394853", "text": "public function handle()\n {\n $return = Pandoc::file($this->argument('file'))\n ->from($this->argument('from'))\n ->to($this->argument('to'))\n ->output($this->argument('output'))\n ->convert();\n\n $this->info($return);\n }", "title": "" }, { "docid": "17ed8e47b278caa212d510315e290fd2", "score": "0.60339785", "text": "public function handle()\n {\n $key = $this->argument('key');\n $type = $this->argument('type');\n switch ($type){\n case 0: dd(Sentence::search($key)->get()->toArray());\n case 1: dd(Author::search($key)->get()->toArray());\n }\n }", "title": "" }, { "docid": "badc40b71ff184b0f987f5c56c52c6c6", "score": "0.60333925", "text": "public function handle()\n {\n $year = $this->argument('year');\n $institution = $this->argument('institution');\n $institutionGrade = $this->instituion_grade->getInstitutionGradeToPromoted($year,$institution);\n (new BulkPromotion())->callback($institutionGrade,$year);\n }", "title": "" }, { "docid": "744fd709a883cc0741ad37af29f05b9e", "score": "0.60297495", "text": "public function handle()\n {\n $this->createDirectories();\n \n if(file_exists(app_path('Models/User.php'))) {\n if (! $this->confirm(\"The User model already exists. Do you want to replace it?\")) {\n exit;\n }\n }\n\n file_put_contents(\n app_path('Models/User.php'),\n $this->compileModelStub()\n );\n $this->info('Authentication scaffolding generated successfully.');\n\n }", "title": "" }, { "docid": "39f84566fb36ddb7bae746c552472ede", "score": "0.6026551", "text": "public function handle()\n {\n $user = $this->argument('user');\n $tag = $this->argument('tag');\n $userId = $this->argument('userId');\n //\n $this->dispatch((new FetchOverwatchProfiles([\n 'user' => $user,\n 'tag' => $tag,\n 'userId' => $userId\n ]))->onQueue('overwatch_profiles'));\n }", "title": "" }, { "docid": "413a8ddefe106344ea7ed471b3c8737c", "score": "0.60264957", "text": "public function fire()\n {\n $config = $this->getDDDGeneratorConfig();\n $domain_definition = $this->getDomainFileDefinition($this->argument('domain_file_definition'));\n\n $this->generateFiles($domain_definition,$config);\n\n $this->info('files created successfully!');\n }", "title": "" }, { "docid": "62edc3ea51259069e12a52499ca5787e", "score": "0.60194355", "text": "public function handle()\n {\n // echo \"\\n*今日の格言*\\n\\n\";\n // echo Inspiring::quote();\n // echo \"\\n\\n\";\n // $p = $this->argument('person');\n // if($p != null){\n // $person = Person::find($p);\n // if($person != null){\n // echo \"\\nPerson id = \".$p.\":\\n\";\n // echo $person->getData() . \"\\n\";\n // }\n // }else{\n // $person = Person::all();\n // foreach ($person as $val) {\n // echo $val->getData().\"\\n\";\n // }\n // }\n $id = $this->option('id');\n $name = $this->option('name');\n if($id != '?'){\n $p = Person::find($id);\n }else{\n if($name != '?'){\n $p = Person::where('name',$name)->first();\n }else{\n $p = null;\n }\n }\n if($p != null){\n //file_put_contents(TESTFILE,$p->getData());\n Log::debug($p->getData());\n //echo $p->getData().\"\\n\";\n }else{\n echo 'no Person find...';\n }\n }", "title": "" }, { "docid": "6312c2f2fe4090d9c7eb66bafbb77efb", "score": "0.6018056", "text": "public function handle()\n {\n $this->findTranslations->make();\n $this->call('cache:clear');\n }", "title": "" }, { "docid": "e727876bcd7fd5442eb153a2a04c618a", "score": "0.6016", "text": "public function handle()\n {\n $id = $this->argument('id');\n $amount = $this->argument('amount');\n\n echo $id . ' is Depositing.' . PHP_EOL;\n\n $command = new DepositCommand($id, $amount);\n $this->commandBus->dispatch($command);\n }", "title": "" }, { "docid": "eac6e7d74fd6782dae0af1bdd5529345", "score": "0.6015829", "text": "public function handle()\n {\n $this->settings();\n\n $repository = $this->resources->all();\n\n // Resources menu should only be appended if there is actually\n // resources to be displayed.\n if (! empty($repository)) {\n $this->resources($repository);\n }\n }", "title": "" }, { "docid": "b28e48cf82d651dddb85badcaa9ec6a7", "score": "0.60104865", "text": "public function handle()\n {\n $paragraph = $this->argument('text');\n Processor::processParagraph($paragraph);\n }", "title": "" }, { "docid": "234d02a028de0975297cb2cdc5815a38", "score": "0.6008873", "text": "public function handle()\n {\n $search = Twitter::getSearch([\n 'q' => $this->argument('search'),\n 'count' => 100,\n ]);\n\n $users = [];\n array_walk($search->statuses, function (stdClass $value, int $idx) use (&$users) {\n $users[$value->user->screen_name] = $value->user->name;\n });\n array_walk($users, function (string $name, string $account) {\n $this->updateTweep($account, $name);\n });\n\n echo \"\\nMuahahahahaha!\\n\";\n }", "title": "" }, { "docid": "c2bc60091f76fd81197c873aa896f33c", "score": "0.6005184", "text": "public function handle()\n {\n $id = $this->argument('user_id');\n\n try {\n $user = User::findOrFail($id);\n } catch (\\Exception $e) {\n return $this->error('User not found');\n }\n\n $this->info(sprintf(' User name : %s', $user->name));\n $this->info(sprintf(' User email : %s', $user->email));\n\n if ($this->confirm('Do you wish to continue ?')) {\n try {\n $user->notify(new Test);\n } catch (\\Exception $e) {\n return $this->error(sprintf(\n 'Failed to send notification : %s',\n $e->getMessage()\n ));\n }\n\n $this->info('The notification has been sent');\n }\n }", "title": "" }, { "docid": "aa59becd4a8068e7b84cb72cd49174b2", "score": "0.60048527", "text": "public function handle()\n {\n try {\n $pairs = $this->pairs->getPairs($this->argument('args'), $this->option('unique_args'));\n foreach ($pairs as $pair) {\n $this->info($pair);\n }\n }\n catch(\\Exception $e) {\n $this->error($e->getMessage());\n }\n }", "title": "" }, { "docid": "90523e2f5aa8aba34fffa420f163ce65", "score": "0.6004468", "text": "public function handle()\n {\n $this->start();\n if ($this->option('mutix')) {\n $this->mutix();\n } else {\n $this->grap();\n }\n $this->end();\n }", "title": "" }, { "docid": "e3860256ff41f07dbaf77b49365f7157", "score": "0.60008323", "text": "public function handle() {\n $file = $this->argument('file');\n\n $builder = new Builder($this);\n $builder->load($file);\n if ($builder->hasError()) {\n $this->error(' > No files generated due to errors');\n } else {\n $builder->createMigration();\n }\n }", "title": "" }, { "docid": "02a29fcf57269375262dfcabd90da5d6", "score": "0.599935", "text": "public function handle()\n {\n config([\n 'push' => [\n 'apns' => [\n 'root' => config('push.apns.root'),\n 'certificate' => $this->option('certificate') ?: config('push.apns.certificate'),\n 'password' => $this->option('password') ?: config('push.apns.password'),\n 'environment' => $this->option('environment') ?: config('push.apns.environment'),\n ],\n 'gcm' => config('push.gcm'),\n ],\n ]);\n\n $notification = new Notification($this->argument('title') ?: 'Notification test', $this->argument('message'));\n\n $notification->push(Device::apns($this->argument('token')));\n\n $results = $notification->send();\n\n foreach ($results['errors'] as $data) {\n $this->error(sprintf('Device %s has failed', $data->token));\n }\n\n foreach ($results['updates'] as $data) {\n $this->error(sprintf('Device %s has been updated', $data->token));\n }\n }", "title": "" }, { "docid": "abff07aa014c97752e5d228120d3d089", "score": "0.59958154", "text": "public function handle()\n {\n \n if($this->option('type')){\n $year = $this->option('type');\n }else {\n $year = 'year';\n }\n if($this->option('year')){\n $type = $this->option('year');\n }else {\n $type = date('Y');\n }\n if($this->option('date')){\n $date = $this->option('date');\n }else {\n $date = date('Y-MM-DD');\n }\n $this->service->generateGoalReport($type,$year,$date);\n }", "title": "" }, { "docid": "0a8a6cbd28bf81f0bf43224fa04edf78", "score": "0.5988102", "text": "public function handle()\n {\n $directory = $this->getDirectoryArgument();\n\n $cleaner = Cleaner::directory($directory, $this->argument('recursive') ?? true);\n\n $cleaner->inAvailableResources(request());\n\n dd($cleaner->analyze(request()));\n }", "title": "" }, { "docid": "4cb5190c7ef134ed018cc813614d2d4e", "score": "0.5987503", "text": "public function handle(Command $command);", "title": "" }, { "docid": "32b677c44fc3838c2b30fc69e9188ef4", "score": "0.598459", "text": "public function handle()\n {\n $debug = $this->option('debug');\n $this->controller->goingToLondonViaEbbsfleet();\n $this->info($this->controller->lineOne);\n $this->info($this->controller->lineTwo);\n if (!$debug) {\n $this->controller->action = \"notification\";\n $this->controller->sendToIffft(\"K\");\n }\n }", "title": "" }, { "docid": "9000c91111734cbc4ac788d9a2097c01", "score": "0.59825385", "text": "public function handle()\n {\n $language = $this->argument('language');\n\n Excel::store(new TranslationsExport($language), 'translations.xlsx');\n }", "title": "" }, { "docid": "ecf5ae38aca74a6bad530af03c3d059e", "score": "0.59823906", "text": "public function handle()\n {\n $locations = LocationCollection::findNewForGeocode();\n\n /** @var UserLocation $location */\n foreach ($locations->all() as $location) {\n $location->geocodeFromCoordinates();\n }\n }", "title": "" }, { "docid": "531d8ae7458ade45561ad2c0fca237fc", "score": "0.5981926", "text": "public function handle()\n {\n $email = $this->argument('email');\n $comment = $this->argument('comment');\n\n $user = app(UserService::class)->findByEmailOrNull($email);\n\n if($user === null) {\n $this->error(\"No user found under the email [{$email}]\");\n }\n\n $data = [\n 'user_id' => $user->id,\n 'content' => $comment\n ];\n\n app(CommentService::class)->create($data);\n\n $this->info(\"New comment added to user {$user->formattedName()} - {$user->email}\");\n }", "title": "" }, { "docid": "6e5debb7388bedc20883fa0571eb03ab", "score": "0.59803087", "text": "public function handle()\n {\n $type = $this->argument('type');\n $title = $this->argument('title');\n $content = $this->argument('content');\n\n $users = User::all();\n\n foreach ($users as $user) {\n $update = new UserUpdate;\n $update->email = $user->email;\n $update->title = $title;\n $update->type = $type;\n $update->content = $content;\n if ($update->save()) {\n $this->line(\"Added announcement/update for [\" . $user->email . \"]\");\n }\n }\n }", "title": "" }, { "docid": "bc0635a760f337badc542f5e70b70440", "score": "0.5979463", "text": "public function handle()\n {\n $this->copy_cards();\n $this->copy_card_owneds();\n $this->copy_card_set();\n $this->copy_conditions();\n $this->copy_symbols();\n }", "title": "" }, { "docid": "486db648371fee6471c9b00700eb075f", "score": "0.5978549", "text": "public function handle()\n {\n $langs = \\LaravelLocalization::getSupportedLanguagesKeys();\n\n if ($this->argument('name')) {\n $langs = array_intersect($langs, [$this->argument('name')]);\n }\n\n foreach ($langs as $lang) {\n try {\n $generator = $this->getContentFromFile($lang);\n\n while($generator->valid()) {\n $this->add($generator->key(), $generator->current());\n $generator->next();\n\n if (count($this->data) >= $this->limit || !$generator->valid()) {\n $this->import($lang);\n }\n }\n } catch (\\Exception $e) {\n $this->error($e->getMessage());\n }\n }\n\n $this->info('OK!');\n }", "title": "" }, { "docid": "0176e97bdaead44d614f7f9a3e43dde5", "score": "0.59771085", "text": "public function handle()\n {\n $this->getCities();\n $this->info('Cities was loaded successfully');\n\n $this->getWarehouses();\n $this->info('Warehouses was loaded successfully');\n }", "title": "" }, { "docid": "367e3fa8c7f89298f58314710b0d96ac", "score": "0.5973143", "text": "public function handle()\n {\n $params = [];\n\n // Prepare arguments.\n $this->preparePaths($params);\n\n // Get configuration file.\n $this->setConfigFile($params);\n\n // Prepare options.\n $this->prepareOptions($params);\n\n // Fix files.\n chdir(base_path());\n passthru($this->getCommand($params));\n }", "title": "" }, { "docid": "351e66235fcc9309e5e81647ac6af753", "score": "0.5972634", "text": "public function handle()\n {\n $user = (int)$this->argument('user');\n $roles = $this->argument('roles');\n $attach = $this->option('attach');\n $detach = $this->option('detach');\n if (!$attach and !$detach)\n {\n $this->viewUserRoles($user);\n } else if ($attach and $detach) {\n $this->error('detach and attach conflicts.');\n } else if ($attach) {\n $this->attachUserRoles($user, $roles);\n } else if ($detach) {\n $this->detachUserRoles($user, $roles);\n }\n }", "title": "" }, { "docid": "84744882f12f12b91012cf8e08572d5d", "score": "0.597002", "text": "public function handle()\n {\n $errors = Validation::get_errors(\n ['file' => $this->argument('file')],\n ['file' => 'required|string']\n );\n\n if(!is_null($errors)) {\n Validation::print_errors($errors->get('file'));\n exit(1);\n }\n\n if(file_exists($this->argument('file'))\n && !$this->confirm('File already exists, do you wish to continue?')) {\n die(\"Cancelling command\\n\");\n }\n\n $media = \\App\\Media::all();\n\n $media->transform(function($m) {\n $m['created_at_unix'] = $m->created_at->timestamp;\n $m['updated_at_unix'] = $m->updated_at->timestamp;\n return $m;\n });\n\n MediaIndexing::write_to_file($this->argument('file'), $media);\n }", "title": "" }, { "docid": "ad6dd0e9fbfbbb3bcd1e2261f8feb482", "score": "0.5968444", "text": "public function handle()\n {\n //\n $user = User::where('email', $this->argument('email'))->first();\n UserVerification::generate($user);\n UserVerification::send($user, $subject = 'IndieWise: Account Verification', $from = '[email protected]', $name = 'IndieWise Registration');\n $this->info('Verification Email Sent');\n }", "title": "" }, { "docid": "8f428c5e462bfbf74cdebf75ff40f04d", "score": "0.5963965", "text": "public function handle()\n {\n $this->createDirectory($this->directories);\n $this->callOrderPackages();\n\n $this->components((new ComponentService()), [\n 'themes',\n 'plugins'\n ]);\n\n $this->comment($this->comment);\n }", "title": "" }, { "docid": "a1404998170529f9ec4f525bed0c7ef0", "score": "0.59624535", "text": "public function handle()\n {\n try {\n Telegram::setWebhook([\n 'url' => $this->argument('url')\n ]);\n\n $this->info('The Webhook was successfully set');\n } catch (Exception $e) {\n $this->error($e->getMessage());\n }\n }", "title": "" }, { "docid": "a35b64447df60c97fc9c10104e23a8ec", "score": "0.5960009", "text": "public function handle()\n {\n $key = $this->argument('key');\n\n $user = User::where('key', $key)->first();\n\n if ($user) {\n $encryptedOne = JWTAuth::fromUser($user);\n\n $this->info('The gernerated token of key is ========> ' . $encryptedOne);\n } else {\n $this->info('user not found!!!' . json_encode($user));\n }\n }", "title": "" }, { "docid": "8fbb90a5412231ead701ca0762a5c78d", "score": "0.5959815", "text": "public function handle()\n {\n $user = $this->userRepository->create([\n 'username' => $this->argument('username'),\n 'password' => $this->argument('password'),\n 'email' => $this->argument('email'),\n 'full_name' => $this->argument('full_name'),\n 'gender' => $this->argument('gender'),\n 'phone_number' => $this->argument('phone_number'),\n 'access_level' => $this->argument('access_level'),\n 'status' => $this->argument('status'),\n 'token' => $this->argument('token'),\n 'requests' => $this->argument('requests'),\n 'division_id' => $this->argument('division_id')\n ]);\n\n $this->info(sprintf('A user was created with ID %s', $user->id));\n }", "title": "" }, { "docid": "320a494842bc9f8373c4accbf280e933", "score": "0.5958902", "text": "public function handle()\n {\n $this->info('Running command ' . $command = $this->command());\n passthru($command);\n }", "title": "" }, { "docid": "82da91b28adee4d6a7de6aa8efaa49de", "score": "0.5958323", "text": "public function handle()\n {\n try {\n $this->filesystem->overwrite(\n $path = database_path('seeds/' . config('AdminUserSeeder', 'AdminUserSeeder.php')),\n $this->compiler->compile(\n $this->filesystem->get($this->getStubPath()),\n [\n \"USER_NAME\" => $this->username(),\n \"USER_EMAIL\" => $this->email(),\n ]\n )\n );\n $this->info('File ' . $path . ' created');\n } catch (\\Exception $e) {\n print_r($e->getMessage());\n }\n }", "title": "" }, { "docid": "2db65d15cd46f25fa107213db52db70f", "score": "0.5957788", "text": "public function handle()\n {\n if (!is_null($this->option('only'))) {\n $only = explode(',',$this->option('only'));\n $this->availableCommands = array_only($this->availableCommands, $only);\n } elseif (!is_null($this->option('except'))) {\n $except = explode(',',$this->option('except'));\n $this->availableCommands = array_except($this->availableCommands, $except);\n }\n foreach ($this->availableCommands as $key => $command) {\n $this->call($command);\n }\n }", "title": "" }, { "docid": "b79a19302f2081c9c5aab92d4c38698f", "score": "0.5957016", "text": "public function handle()\n {\n $file = $this->argument('file');\n\n $password = Import::config('password');\n\n Import::start(compact('file', 'password'));\n\n $this->info('Completed');\n }", "title": "" }, { "docid": "6fc684739029cd4125d3af3cda1bd76f", "score": "0.59564626", "text": "public function handle()\n {\n $this->comment(PHP_EOL . 'Creating user ' . $this->argument('user') . PHP_EOL);\n $user = new User();\n $user->email = $this->argument('user');\n $user->password = $this->argument('password');\n $user->status = 1;\n $user->role()->associate(Role::find(1));\n $user->save();\n }", "title": "" }, { "docid": "11d25ec9c6129b1fa3fbfbd8a5800384", "score": "0.59528464", "text": "public function handle()\n {\n $models = explode(',', $this->option(\"model\"));\n foreach($models as $model){\n $this->info(\"Fixing Model \" . $model);\n try{\n $this->$model();\n } catch (\\Exception $ex) {\n $this->error(\"Model class not found \" . $ex);\n } \n } \n }", "title": "" }, { "docid": "353eeef619a6be1d0ce1f1e6456825d6", "score": "0.5949969", "text": "public function handle()\n {\n $manifest = $this->getLaravel()->make('addons.manifest');\n $manifest->build();\n\n $count = $manifest->getAddonCount();\n $term = ($count == 1) ? 'addon' : 'addons';\n\n $this->info(\"Discovered {$count} {$term}!\");\n }", "title": "" }, { "docid": "a5389f7b9aba49246fb7cef9f0d07703", "score": "0.59490013", "text": "public function handle()\n {\n $this->info($this->employeeCommandService->canDoAction($this->argument('specialty'), $this->argument('action')));\n }", "title": "" }, { "docid": "78b1a8d44016e8894e7ab854253e30e1", "score": "0.5946749", "text": "public function handle()\n {\n $this->line('working...');\n\n $this->createIndexes();\n\n $this->populateIndexes();\n }", "title": "" }, { "docid": "0412e513aa601d7d3e9c0fb832da1854", "score": "0.5945706", "text": "public function fire()\n {\n try {\n $title = $this->argument('title');\n $text = $this->argument('text');\n KeenEvents::sendSlackEvent($title, $text);\n } catch (Exception $e) {\n $this->error('Error: '.$e->getMessage());\n throw $e;\n }\n\n $this->info('done');\n }", "title": "" }, { "docid": "772af67c488e83becd0917d5a245c961", "score": "0.5945673", "text": "public function handle()\n {\n $this->info($this->bithumb->getTradingHistory($this->argument('type')));\n }", "title": "" }, { "docid": "ff281bfe3e70fd83ad335f21dd3cd08d", "score": "0.59453624", "text": "public function handle()\n {\n $user = User::where('username', $this->argument('username'))->firstOrFail();\n\n Bouncer::assign('superadmin')->to($user);\n }", "title": "" }, { "docid": "75944b2dd1c5e0af2a9f58e1a22d121f", "score": "0.5944221", "text": "public function handle()\n {\n foreach(Product::search($this->argument('search'))->get() as $product)\n {\n print(\"[\".$product->id.\"]: \".$product->title.\"\\n\");\n }\n }", "title": "" }, { "docid": "9e95d6f71a3bb70ff6881516ab83bdc2", "score": "0.59430885", "text": "public function handle()\n {\n //publishing config, blade templates, language file\n $this->call('vendor:publish', [\n '--provider' => 'Zanozik\\Cdnjs\\CdnjsServiceProvider'\n ]);\n //migrating assets table to db\n $this->call('migrate', [\n '--path' => '/vendor/zanozik/cdnjs/src/database/migrations'\n ]);\n //seeding asset table with sample assets for manager frontend\n $this->call('db:seed', [\n '--class' => 'Zanozik\\Cdnjs\\Database\\Seeds\\AssetsTableSeeder'\n ]);\n //clearing cache in case we already have that key in our cache\n $this->call('cache:clear');\n }", "title": "" }, { "docid": "502bc0448bf2f61ff3167e1015ffe3bc", "score": "0.59427357", "text": "public function handle()\n {\n $this->call('vendor:publish', ['--provider' => WisteriaServiceProvider::class, '--tag' => ['wisteria-assets', 'wisteria-config']]);\n\n $this->info('Wisteria successfully installed! Enjoy 😍');\n }", "title": "" }, { "docid": "34f628fcb5c4b21504f82c4043a8ef05", "score": "0.59426194", "text": "public function handle()\n {\n $this->info('Publishing assets to public folder.');\n\n // Publish hub public assets\n foreach ($this->commands as $command) {\n Artisan::call($command);\n }\n\n $this->line('Done.');\n }", "title": "" } ]
d4ad47421d566abb847894947b261303
////////////////////////////// GET SUBJECT NAME
[ { "docid": "e38f4d0905076ed2fb5865b8a8c4f035", "score": "0.0", "text": "function getSubj(){\n\t\tglobal $_CON;\n\t\t$_SUBJ_ID = urldecode(base64_decode(subj_id())); \n\t\t$sqlSearch = mysqli_query($_CON,\"SELECT subject_code, subject_name FROM subjects_table WHERE subject_id='$_SUBJ_ID' \");\n\t\t$count = mysqli_num_rows($sqlSearch);\n\t\tif($count > 0){\n\t\t\t$row = mysqli_fetch_array($sqlSearch);\n\t\t\t$subject_code = $row['subject_code'];\n\t\t\t$subject_name = $row['subject_name'];\n\t\t\treturn \"Subject: \" . $subject_code. \" - \" . $subject_name;\n\t\t}else{\n\t\t\theader(\"location: myclass.php?errno=404\");\n\t\t\tob_end_clean();\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "0cc623b1e65abb5f3746b216d33472dc", "score": "0.7185037", "text": "public function getSubjectName()\n {\n return $this->getName();\n }", "title": "" }, { "docid": "d388364f09350285e6f7cf0913958a06", "score": "0.6720907", "text": "public function getTranslationSubject()\r\n\t{\r\n\t\treturn str_replace(\"_\", \" \", substr($this->__params[1], 3));\r\n\t}", "title": "" }, { "docid": "e9549de070202120d56575b52d0f119c", "score": "0.6560983", "text": "public function getName() {\n\t\treturn $this->topic->getTitle();\n\t}", "title": "" }, { "docid": "526630b3e2d19012d0a5e124418a0dd5", "score": "0.6336877", "text": "public function getSubject(): string\n {\n return $this->subject;\n }", "title": "" }, { "docid": "526630b3e2d19012d0a5e124418a0dd5", "score": "0.6336877", "text": "public function getSubject(): string\n {\n return $this->subject;\n }", "title": "" }, { "docid": "b31b282c7f7e6d741e4dadeccdb47cd1", "score": "0.6257484", "text": "function get_name() {\n return isset($this->name) ? $this->name : $this->subscription_type()->get_name();\n }", "title": "" }, { "docid": "d9b4a044bb18f9e1d62985201ed69c5e", "score": "0.62533414", "text": "function getSubject() {\r\n return $this->subj;\r\n }", "title": "" }, { "docid": "028cbe5fb3e41d8ce8558c9c4f611793", "score": "0.6225496", "text": "function getLabelSubject() {\r\n return $this->subj->getLabel();\r\n }", "title": "" }, { "docid": "0feb21466ff70aaf9edb7a00528d4f51", "score": "0.6222127", "text": "public function getName()\n {\n return 'topicsubs';\n }", "title": "" }, { "docid": "47d10c871d8d1a55fc8967cb0d1ca19a", "score": "0.61549133", "text": "public function get_subject() : string {\n return $this->subject;\n }", "title": "" }, { "docid": "3b4546facd513a312d5deb38cf71990a", "score": "0.61265624", "text": "public function getSubject()\n {\n return $this->data['Subject'];\n }", "title": "" }, { "docid": "a842cc6bdec5d29ea83202fbe19b7398", "score": "0.61224", "text": "function toStringSubject() {\r\n return $this->subj->toString();\r\n }", "title": "" }, { "docid": "9a4a1823ee202f2ff44dee9110511079", "score": "0.60885745", "text": "protected function _get_name()\n {\n return $this->_params['name'];\n }", "title": "" }, { "docid": "9012f01d2d59ef0f50e2e401aa56e7b8", "score": "0.60479283", "text": "function customize_name($subject) {\n $var = str_replace('_', ' ', $subject);\n $var = ucwords($var);\n return trim($var);\n }", "title": "" }, { "docid": "66450767fd72d3a365152459cfacd4d6", "score": "0.602872", "text": "public function GetName()\n\t{\treturn $this->details['title'];\n\t}", "title": "" }, { "docid": "3b6c7afb96bd9c5b277a041fe61f33a4", "score": "0.6027055", "text": "public function get_name();", "title": "" }, { "docid": "3b6c7afb96bd9c5b277a041fe61f33a4", "score": "0.6027055", "text": "public function get_name();", "title": "" }, { "docid": "3db1186c18c649a791a01b382345afe1", "score": "0.6018363", "text": "public function getSubject()\n {\n return 'We found some changes on ' . $this->scan->getSite()->base_url;\n }", "title": "" }, { "docid": "78354a8af268c1cf673859e337fe25ae", "score": "0.5960699", "text": "public function getSubject() \n\t\t{\n\t\t\treturn $this->subject;\n\t\t}", "title": "" }, { "docid": "31cadacdda6b47ecbd9fcbc9a94ddf86", "score": "0.5956969", "text": "public function getSubject(): ?string\n\t{\n\t\treturn $this->getHeader('Subject');\n\t}", "title": "" }, { "docid": "cd32d9c0b320ecc10ad998f200998761", "score": "0.5946998", "text": "public function getTopicName(): string\n {\n return $this->topicName;\n }", "title": "" }, { "docid": "6e46d83ef3a60ea9fd13407e6911f19f", "score": "0.5939405", "text": "public function readSubject()\n {\n }", "title": "" }, { "docid": "fdad50451b478e6868069fad7d3d0324", "score": "0.5928227", "text": "public function getSubject(){\n\t\treturn $this->subject?:'';\n\t}", "title": "" }, { "docid": "4dec4327d01df62811da911f8af54c54", "score": "0.59170693", "text": "public function getSubject();", "title": "" }, { "docid": "4dec4327d01df62811da911f8af54c54", "score": "0.59170693", "text": "public function getSubject();", "title": "" }, { "docid": "4dec4327d01df62811da911f8af54c54", "score": "0.59170693", "text": "public function getSubject();", "title": "" }, { "docid": "079f9e469daae1aaa5c6df7e10ffff55", "score": "0.59129786", "text": "public function subject(): string;", "title": "" }, { "docid": "3c1a11ff301eecc8d1102a0d4a1e75b4", "score": "0.5900565", "text": "public function getTitle()\n {\n return $this->event->name;\n }", "title": "" }, { "docid": "f6a357cc5e379a7733d77df1fd21b96f", "score": "0.58889776", "text": "function get_title() {\n return $this->subscription_type()->get_title();\n }", "title": "" }, { "docid": "15134fe04699cd38f5ed7bc39c8bb0db", "score": "0.58751565", "text": "public function getName()\n {\n return $this->title;\n }", "title": "" }, { "docid": "15134fe04699cd38f5ed7bc39c8bb0db", "score": "0.58751565", "text": "public function getName()\n {\n return $this->title;\n }", "title": "" }, { "docid": "79f8590bb7d06f7a92eefb92c172dd93", "score": "0.5871284", "text": "function getSubject() {\n\t\treturn $this->subject;\n\t}", "title": "" }, { "docid": "554f1d222b8028c45babf02b66f7110c", "score": "0.5856068", "text": "public function get_title()\n\t{\n\t\treturn $this->name() . \" \" . $this->prop(\"ettevotlusvorm.shortname\");\n\t}", "title": "" }, { "docid": "da429177ed3f97bd81e5eebcc1b3dfcb", "score": "0.58440053", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "da429177ed3f97bd81e5eebcc1b3dfcb", "score": "0.58440053", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "0d856adbcfa38b6b5853d65f3fc5a54e", "score": "0.5831774", "text": "public function getSubject()\n\t\t{\n\t\t\treturn $this->subject;\n\t\t}", "title": "" }, { "docid": "768868394a7a6cad70213d448a1a442a", "score": "0.5820816", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "768868394a7a6cad70213d448a1a442a", "score": "0.5820816", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "768868394a7a6cad70213d448a1a442a", "score": "0.5820816", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "768868394a7a6cad70213d448a1a442a", "score": "0.5820816", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "768868394a7a6cad70213d448a1a442a", "score": "0.5820816", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "768868394a7a6cad70213d448a1a442a", "score": "0.5820816", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "768868394a7a6cad70213d448a1a442a", "score": "0.5820816", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "768868394a7a6cad70213d448a1a442a", "score": "0.5820816", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "768868394a7a6cad70213d448a1a442a", "score": "0.5820816", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "768868394a7a6cad70213d448a1a442a", "score": "0.5820816", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "768868394a7a6cad70213d448a1a442a", "score": "0.5820816", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "768868394a7a6cad70213d448a1a442a", "score": "0.5820816", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "768868394a7a6cad70213d448a1a442a", "score": "0.5820816", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "768868394a7a6cad70213d448a1a442a", "score": "0.5820816", "text": "public function getSubject()\n {\n return $this->subject;\n }", "title": "" }, { "docid": "513011ee9058422ce975ba61b0a67319", "score": "0.5819054", "text": "public function getJobtitle();", "title": "" }, { "docid": "56318744112267d2bd4b881cece72ff6", "score": "0.58124954", "text": "function getName()\n {\n return (string) $this->_sName;\n }", "title": "" }, { "docid": "87677280279bdc05405b51979baf19f6", "score": "0.5796095", "text": "public function getName()\r\r\n {\r\r\n return $this->getProperty('name');\r\r\n }", "title": "" }, { "docid": "3cf10252b084a63baf492e9a4231b95b", "score": "0.57765377", "text": "public function getEmailSubject()\n {\n return $this->discussion->title;\n }", "title": "" }, { "docid": "38486968ab6d00a7476a78ba580590a9", "score": "0.577093", "text": "public function getSubject() {\n\t\treturn $this->subject;\n\t}", "title": "" }, { "docid": "9cd847ae08cdbc0849e0ac91eeb74c64", "score": "0.57702535", "text": "public function getSubject()\n {\n return strip_tags($this->subject);\n }", "title": "" }, { "docid": "c08be2d2cf8b8bbf4781b6fad2ff12d6", "score": "0.57621396", "text": "public function getNAME()\r\n {\r\n return $this->name;\r\n }", "title": "" }, { "docid": "0c43b856af136ac9b480295148c6ea76", "score": "0.5761974", "text": "public function getSubject()\r\n {\r\n return $this->subject;\r\n }", "title": "" }, { "docid": "a53dda66643ae3d43dcf95cc47814aba", "score": "0.57557434", "text": "public static function getName() {\n\t\treturn static::getMessage('NAME');\n\t}", "title": "" }, { "docid": "a53dda66643ae3d43dcf95cc47814aba", "score": "0.57557434", "text": "public static function getName() {\n\t\treturn static::getMessage('NAME');\n\t}", "title": "" }, { "docid": "a53dda66643ae3d43dcf95cc47814aba", "score": "0.57557434", "text": "public static function getName() {\n\t\treturn static::getMessage('NAME');\n\t}", "title": "" }, { "docid": "e5ca14144747be2b8b60110a7228b4bd", "score": "0.57546175", "text": "public function getTitle()\n\t{\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "621a00eebfa668614e13ea8b293f1250", "score": "0.5753532", "text": "public function getPressAnnouncementTitle()\n\t{\n\t\tif(!$this->isDeleted())\n\t\t{\n\t\t\tif($this->isHtSupporter())\n\t\t\t{\n\t\t\t\tif(!isset($this->pressSubject) || $this->pressSubject === null)\n\t\t\t\t{\n\t\t\t\t\t$node = $this->getXml()->getElementsByTagName('Subject');\n\t\t\t\t\tif($node !== null && $node->length)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->pressSubject = $node->item(0)->nodeValue;\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$this->pressSubject = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn $this->pressSubject;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "b80457e9e1000629ffd9fe8bf0e701ef", "score": "0.57530016", "text": "abstract public function get_name();", "title": "" }, { "docid": "b80457e9e1000629ffd9fe8bf0e701ef", "score": "0.57530016", "text": "abstract public function get_name();", "title": "" }, { "docid": "846f8fdda2f6d2c08834a1589065bbee", "score": "0.57523197", "text": "function getSubName($subject)\n{\n global $conn;\n\n // get subject\n $getSub = $conn->prepare(\"SELECT\n subject\n FROM\n subjects\n WHERE\n id = ?\");\n $getSub->execute([$subject]);\n if ($getSub->rowCount() > 0) {\n return $getSub->fetchColumn();\n } else {\n return 'UNKNOWN';\n }\n}", "title": "" }, { "docid": "c9e6cb7b3c30efe76d818931af00e3dd", "score": "0.575048", "text": "public function get_name() {\n }", "title": "" }, { "docid": "65a33a879a2adeae25f0a76e96c4249b", "score": "0.5747065", "text": "public function getSubject()\n {\n return $this->_subject;\n }", "title": "" }, { "docid": "e8b8419e112edefca5ba9f17a33cddfb", "score": "0.5747034", "text": "private function getEmailSubject() {\n\t\tif ($this->isSpecializedView()) {\n\t\t\t$result = $this->translate('label_email_subject_specialized') .\n\t\t\t\t' ' . $this->getRealtyObject()->getProperty('object_number');\n\t\t} else {\n\t\t\t$result = $this->translate('label_email_subject_general');\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "c0b95f17988427eefae5efbf91ab2351", "score": "0.5746255", "text": "private function getConsumableName(): string\n {\n $attribute = strtolower(get_called_class());\n $explodeFQCN = explode('\\\\' ,$attribute);\n return end($explodeFQCN);\n }", "title": "" }, { "docid": "8d0540b84c222ffb6940e8da8fb83b22", "score": "0.5742703", "text": "public function getStudySubject();", "title": "" }, { "docid": "82fba40744ffc321e75039ab782d1e83", "score": "0.57425123", "text": "public function getName()\n {\n return $this->title ?: $this->media->getName();\n }", "title": "" }, { "docid": "1d1bda5e784d13226d065f9470a50b46", "score": "0.5741234", "text": "public function getName()\n {\n switch ($this->queriedContext) {\n case 'By username':\n case 'By channel id':\n case 'By custom name':\n case 'By playlist Id':\n case 'Search result':\n return htmlspecialchars_decode($this->feedName) . ' - YouTube'; // We already know it's a bridge, right?\n default:\n return parent::getName();\n }\n }", "title": "" }, { "docid": "9640f417de12413c4dba29e724e72847", "score": "0.5738259", "text": "public function get_subject() {\n\t\t$args = $this->get_args();\n\n\t\t/**\n\t\t * @var WP_Post $job\n\t\t */\n\t\t$job = $args['job'];\n\t\treturn sprintf( __( 'Job Listing Expiring: %s', 'wp-job-manager' ), $job->post_title );\n\t}", "title": "" }, { "docid": "2eaa996268666fd5df3fae5cd01940d6", "score": "0.57376003", "text": "function bp_course_get_item_name() {\n\t\tglobal $items_template;\n\t\techo apply_filters( 'bp_course_get_item_name', $items_template->item->name ); // course: $items_template->item->name;\n\t}", "title": "" }, { "docid": "e729d3ba944bde5246f261ca9c9cd714", "score": "0.5735512", "text": "public function getCompositeName(): string;", "title": "" }, { "docid": "3faaf365498012cfcf63b9e91e1d2d33", "score": "0.5733962", "text": "public function getName()\n\t{\n\t\treturn $this->get('name');\n\t}", "title": "" }, { "docid": "c8e7b305a898885e203855c7fdacdb68", "score": "0.57328326", "text": "public function getCertificateName()\n {\n $name = $this->getName();\n\n if (strlen($name) > self::CERTIFICATE_NAME_LENGTH) {\n $name = sprintf('%s. %s',\n ucfirst($this->firstName[0]),\n ucfirst($this->lastName)\n );\n }\n\n return $name;\n }", "title": "" }, { "docid": "c55fce02c9e7004731a2c3330842da04", "score": "0.57274073", "text": "public function get_name( $context = 'view' ) {\n\t\treturn $this->get_prop( 'name', $context );\n\t}", "title": "" }, { "docid": "00d1b35aad14b24c5f4e1ddfa82e4a73", "score": "0.5723684", "text": "public function getname()\n {\n return $this->name;\n }", "title": "" }, { "docid": "d8d90eb3b1de2c8ab8f91ff40a66a112", "score": "0.5718907", "text": "public function get_name() {\n\t\tif ( $this->name ) {\n\t\t\t$name = $this->name;\n\t\t} else {\n\t\t\t$name = '';\n\t\t}\n\t\treturn $name;\n\t}", "title": "" }, { "docid": "26456ce5e886fa72e6e58b69742b434e", "score": "0.5712694", "text": "public function getProcessedTemplateSubject()\r\n\t{\r\n\t\treturn $this->_title;\r\n\t}", "title": "" }, { "docid": "467c85a6b446d0de7c0c7c6913e82644", "score": "0.57123995", "text": "public function get_name()\n {\n return get_string('messagesubscribers', 'block_glsubs');\n }", "title": "" }, { "docid": "6c0b85da11fc911d51b20739854fb80c", "score": "0.57095355", "text": "public function get_name()\n {\n return $this->get_property(self::PROPERTY_NAME);\n }", "title": "" }, { "docid": "27b788468bd9a2364cf61251f9b627b7", "score": "0.5702378", "text": "public static function getName()\n\t{\n\t\treturn static::getMessage('NAME');\n\t}", "title": "" }, { "docid": "65e1c73cf4c61e1f0481bf2c84ea3d48", "score": "0.5701539", "text": "public function getSubject() {\n return $this->subject;\n }", "title": "" }, { "docid": "65e1c73cf4c61e1f0481bf2c84ea3d48", "score": "0.5701539", "text": "public function getSubject() {\n return $this->subject;\n }", "title": "" }, { "docid": "65e1c73cf4c61e1f0481bf2c84ea3d48", "score": "0.5701539", "text": "public function getSubject() {\n return $this->subject;\n }", "title": "" }, { "docid": "6a76ae119523b6eff9a2fcd554226d34", "score": "0.5696229", "text": "public function getName()\n {\n return 'subscriber';\n }", "title": "" }, { "docid": "19165b9aa2f813ae31204b9eb75316d7", "score": "0.56918097", "text": "public function get_course_name() {\n\n $rec = $this->DB->get_record('course', array('id'=>$this->course), 'fullname,shortname');\n return $rec;\n\n }", "title": "" }, { "docid": "36745ea77e28c5a13d9746a878f302c1", "score": "0.5691464", "text": "public function getEventTitle() {\r\n\t\treturn $this->eventTitle;\r\n\t}", "title": "" }, { "docid": "7bdb725eb3c0884ace2ba539e2a3552f", "score": "0.56860656", "text": "function getName() ;", "title": "" }, { "docid": "7bdb725eb3c0884ace2ba539e2a3552f", "score": "0.56860656", "text": "function getName() ;", "title": "" }, { "docid": "36e9af7b9b871aed5f26bb3cafc1080f", "score": "0.5685497", "text": "public function getName() {\n return basename($this->name);\n }", "title": "" }, { "docid": "7bdb725eb3c0884ace2ba539e2a3552f", "score": "0.5685378", "text": "function getName() ;", "title": "" }, { "docid": "7bdb725eb3c0884ace2ba539e2a3552f", "score": "0.5685378", "text": "function getName() ;", "title": "" }, { "docid": "891e461730598cb00b213a708b84f58d", "score": "0.5679923", "text": "private function getResourceName()\n {\n return str_plural(\n snake_case(preg_replace('/Controller$/', '', class_basename($this)))\n );\n }", "title": "" }, { "docid": "56d3c7362ffe58f0d4b6dba21c1c1fa8", "score": "0.567974", "text": "public function getRecipientName() \n {\n return $this->_fields['RecipientName']['FieldValue'];\n }", "title": "" }, { "docid": "0cab0aace9a1ef5d5e13c96e77ef294b", "score": "0.56754994", "text": "public function getName() {\n\t\t$this->checkDisposed();\n\t\t\t\n\t\tif ($this->_name === null)\n\t\t\t$this->load();\n\t\treturn $this->_name;\t\n\t}", "title": "" }, { "docid": "fdfc17c2ac424dc3a3858fa36667790a", "score": "0.5675328", "text": "public function getAdTitle() {\n return $this->adData[\"PRODUKTNAME\"];\n }", "title": "" }, { "docid": "545a69c089c453083c286d6e787f335f", "score": "0.5674498", "text": "public function getTitle()\n {\n return $this->get('name');\n }", "title": "" } ]
7afad2e9bd7c6897a8d882ab73ceebd9
OneToOne (inverse side) Set TcmbaSubvencaoEmpenho
[ { "docid": "e298ec973d996a16dca3926cb5c8cd1e", "score": "0.52976537", "text": "public function setFkTcmbaSubvencaoEmpenho(\\Urbem\\CoreBundle\\Entity\\Tcmba\\SubvencaoEmpenho $fkTcmbaSubvencaoEmpenho)\n {\n $fkTcmbaSubvencaoEmpenho->setFkSwCgm($this);\n $this->fkTcmbaSubvencaoEmpenho = $fkTcmbaSubvencaoEmpenho;\n return $this;\n }", "title": "" } ]
[ { "docid": "6ab62e78bb3bbbec9a39762b65a9daa1", "score": "0.6976563", "text": "public function getFkTcmbaSubvencaoEmpenho()\n {\n return $this->fkTcmbaSubvencaoEmpenho;\n }", "title": "" }, { "docid": "20b09c63500e9df0e956344f31434331", "score": "0.5779961", "text": "private function vincularEtapaCenso() {\n\n $this->removerVinculoEtapaCenso();\n\n $oDao = new cl_censoetapaturmacenso();\n\n $oDao->ed134_codigo = null;\n $oDao->ed134_turmacenso = $this->iCodigo;\n $oDao->ed134_censoetapa = $this->iEtapaCenso;\n $oDao->ed134_ano = $this->iAnoCalendarioTurmas;\n\n $oDao->incluir(null);\n if ( $oDao->erro_status == \"0\" ) {\n throw new DBException(\"Erro ao incluir vinculo com etapa do censo. \\n{$oDao->erro_msg}\");\n }\n\n }", "title": "" }, { "docid": "7475c3251e83374d142fb63a670f0601", "score": "0.5305175", "text": "protected function setEquipementarmegaucheObject() {\n\t\t$this->_oEquipementarmegauche = FactoryEquipement_joueur::getFromTableEquipement_joueur($this->_equipementarmegauche);\n\t}", "title": "" }, { "docid": "ae3a754f68e278dcab3545f0ec209e2c", "score": "0.52902836", "text": "function proveedorMoneda(){\n\t\t$idbancaria = explode('//',$_REQUEST['idbancaria']);\n\t\t// $prv = $this->ChequesModel->proveedorMoneda($idbancaria[0]);\n\t\t// while($p = $prv->fetch_assoc()){\n\t\t\t// echo \"<option value=\".$p['cuenta'].'/'. $p['idPrv'].\" >\".$p['razon_social'].\"</option>\";\n\t\t// }\n\t \techo \"<option value=0 selected>--Seleccione--</option>\";\n\t\t$cuentasprvsin = $this->ChequesModel->cuentasAfectables($_REQUEST['ext']);\n\t\twhile($b = $cuentasprvsin->fetch_assoc()){\n\t\t\techo \"<option value='\".$b['account_id'].\"/\".$b['currency_id'].\"'>\".$b['description'].\"(\".$b['manual_code'].\")</option>\";\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "1d80841beec3e9d244457a114d89712b", "score": "0.5289389", "text": "public function getFkFolhapagamentoTcmbaCargoServidores()\n {\n return $this->fkFolhapagamentoTcmbaCargoServidores;\n }", "title": "" }, { "docid": "69b35d6b0607bb1592e9acb0ac427d66", "score": "0.5249285", "text": "public function select($informe_gestion_semillero){\n $id=$informe_gestion_semillero->getId();\n\n try {\n $sql= \"SELECT `id`, `fecha`, `semestre`, `capacitaciones_id`, `proyectos_id`\"\n .\"FROM `informe_gestion_semillero`\"\n .\"WHERE `id`='$id'\";\n $data = $this->ejecutarConsulta($sql);\n for ($i=0; $i < count($data) ; $i++) {\n $informe_gestion_semillero->setId($data[$i]['id']);\n $informe_gestion_semillero->setFecha($data[$i]['fecha']);\n $informe_gestion_semillero->setSemestre($data[$i]['semestre']);\n $capacitaciones = new Capacitaciones();\n $capacitaciones->setId($data[$i]['capacitaciones_id']);\n $informe_gestion_semillero->setCapacitaciones_id($capacitaciones);\n $proyectos = new Proyectos();\n $proyectos->setId($data[$i]['proyectos_id']);\n $informe_gestion_semillero->setProyectos_id($proyectos);\n\n }\n return $informe_gestion_semillero; } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n return null;\n }\n }", "title": "" }, { "docid": "e7781d8bea68c9c506e0c30a60b58e37", "score": "0.5219442", "text": "public function getFkEconomicoUsoSoloEmpresa()\n {\n return $this->fkEconomicoUsoSoloEmpresa;\n }", "title": "" }, { "docid": "edca14052b0f7acfebaf016a946406ba", "score": "0.5201243", "text": "function setIdtipotrabajador($val) {$this->idtipotrabajador=$val;}", "title": "" }, { "docid": "0700a09ee4b2779960b780006279c8e4", "score": "0.51612157", "text": "public function subirSonidoContraparte( ) {\n $this->setSonidoOn(self::$SONIDO_ENTRANTE, 0);\n }", "title": "" }, { "docid": "7b0809c8e8f97f5601444a8387fe5d11", "score": "0.5154348", "text": "public function cadastrarAlterar($objetoVo) {\r\n //var_dump($objetoVo);\r\n // verifica se tiver o id dentro do objeto para salvar ou alterar\r\n eval('$id = $objetoVo->get' . ucfirst($this->entidade) . 'Id();');\r\n //echo \"<br />\";\r\n //var_dump($this->entidade);\r\n //echo \"<br />\";\r\n //echo var_dump($id);\r\n //echo \"<br />\";\r\n //var_dump($objetoVo->get . $this->entidade . 'Id()');\r\n //exit();\r\n\r\n if (empty($id)) {\r\n // nao tem o id dentro do objeto, insert\r\n $sql = 'INSERT INTO ' . $this->entidade . ' ( ';\r\n // verifica as chaves estrangeiras\r\n for ($j = 0; $j < count($this->chaveEstrangeira); $j++) {\r\n $_dadosEstrangeiro = explode(' ', $this->chaveEstrangeira[$j]);\r\n $sql .= $_dadosEstrangeiro[0];\r\n if ($j + 1 <= count($this->chaveEstrangeira)) {\r\n $sql .= ', ';\r\n }\r\n }\r\n for ($j = 0; $j < count($this->dadosBase); $j++) {\r\n $_dadosBase = explode(' ', $this->dadosBase[$j]);\r\n $sql .= $this->entidade . ucfirst($_dadosBase[0]);\r\n if ($j + 1 <> count($this->dadosBase)) {\r\n $sql .= ', ';\r\n }\r\n }\r\n // se na Dao tiver setado momentoCadastro = true, cadastra o momento na tabela\r\n if ($this->momentoCadastro) {\r\n $sql .= ', ' . $this->entidade . 'DataCadastro';\r\n }\r\n if ($this->status) {\r\n $sql .= ', ' . $this->entidade . 'Status';\r\n }\r\n $sql .= ' ) VALUES ( ';\r\n //chave estrangeira\r\n for ($j = 0; $j < count($this->chaveEstrangeira); $j++) {\r\n $_dadosEstrangeiro = explode(' ', $this->chaveEstrangeira[$j]);\r\n //var_dump($_dadosEstrangeiro);\r\n eval('$valor = $objetoVo -> get' . ucfirst($_dadosEstrangeiro[0]) . '();');\r\n //var_dump($this->chaveEstrangeira);\r\n if (empty($valor)) {\r\n $sql .= 'null';\r\n } else {\r\n $sql .= $valor;\r\n }\r\n if ($j + 1 <= count($this->chaveEstrangeira)) {\r\n $sql .= ', ';\r\n }\r\n }\r\n //var_dump($_dadosBase);\r\n for ($j = 0; $j < count($this->dadosBase); $j++) {\r\n $_dadosBase = explode(' ', $this->dadosBase[$j]);\r\n eval('$valor = $objetoVo -> get' . ucfirst($this->entidade) . ucfirst($_dadosBase[0]) . '();');\r\n if (is_string($valor)) {\r\n $sql .= \"'\";\r\n }\r\n if (empty($valor)) {\r\n $sql .= 'null';\r\n } else {\r\n if ($_dadosBase[1] == 'DATE') {\r\n $sql .= formatarData($valor);\r\n } else if($_dadosBase[1] == 'DECIMAL'){\r\n \t\t$sql .= formatarValor($valor);\r\n \t} else {\r\n $sql .= $valor;\r\n }\r\n }\r\n if (is_string($valor)) {\r\n $sql .= \"'\";\r\n }\r\n if ($j + 1 <> count($this->dadosBase)) {\r\n $sql .= ', ';\r\n }\r\n }\r\n // se na Dao tiver setado momentoCadastro = true, cadastra o momento na tabela\r\n if ($this->momentoCadastro) {\r\n $sql .= \", '\" . date('Y-m-d H:m:s') . \"'\";\r\n }\r\n if ($this->status) {\r\n $sql .= ', ';\r\n eval('$sql .= $objetoVo -> get' . ucfirst($this->entidade) . 'Status();');\r\n }\r\n $sql .= ' ) ;';\r\n $query = mysql_query($sql);\r\n $_id = mysql_insert_id();\r\n //echo $sql;\r\n //exit();\r\n } else {\r\n\r\n // tem o id dentro do objeto, update\r\n $sql = 'UPDATE ' . $this->entidade . ' SET ';\r\n \t\tfor ($j = 0; $j < count($this->dadosBase); $j++) {\r\n $_dadosBase = explode(' ', $this->dadosBase[$j]);\r\n if($_dadosBase[0] <> 'login' &&\r\n \t\t$_dadosBase[0] <> 'senha' &&\r\n \t\t$_dadosBase[0] <> 'lembrete') {\r\n\t $sql .= $this->entidade . ucfirst($_dadosBase[0]);\r\n\t $sql .= ' = ';\r\n\t eval('$valor = $objetoVo -> get' . ucfirst($this->entidade) . ucfirst($_dadosBase[0]) . '();');\r\n if (is_string($valor)) {\r\n\t $sql .= \"'\";\r\n\t }\r\n\t if ($_dadosBase[1] == 'DATE') {\r\n\t $sql .= formatarData($valor);\r\n\t } else if($_dadosBase[1] == 'DECIMAL'){\r\n \t\t$sql .= formatarValor($valor);\r\n \t} else {\r\n\t $sql .= $valor;\r\n\t }\r\n\t if (is_string($valor)) {\r\n\t $sql .= \"'\";\r\n\t }\r\n\t if($this->entidade == 'usuario'){\r\n\t \tif (($j + 4) < count($this->dadosBase)) {\r\n\t \t$sql .= ', ';\r\n\t \t}\r\n\t } else {\r\n\t \tif (($j + 1) <> count($this->dadosBase)) {\r\n\t \t$sql .= ', ';\r\n\t \t}\r\n\t }\r\n } \r\n }\r\n \r\n \t$sql .= ' WHERE '.$this->entidade .'Id = '. $id;\r\n //$_sql .= ' - '.$sql;\r\n //echo $_sql;\r\n //exit();\r\n $query = mysql_query($sql);\r\n $_id = $id;\r\n }\r\n //var_dump($objetoVo);\r\n\r\n if (!$query) {\r\n return false;\r\n } else {\r\n return $_id;\r\n }\r\n }", "title": "" }, { "docid": "299504ecc95ed1eac61dcda4b02ded38", "score": "0.5153764", "text": "public function selectPedidoEditPorIdNovo($id_pedido, $ordem, $id_empresa, $campos) {\n if($id_empresa!=0){\n $onde = \" (pi.id_empresa_atend='\".$id_empresa.\"' or pi.id_empresa_resp='\".$id_empresa.\"') and \";\n } else {\n $onde = '';\n }\n $this->sql = \"SELECT\n pi.id_pedido_item, pi.id_pedido, pi.ordem, pi.id_servico, pi.id_servico_var, pi.id_status, pi.dias,pi.valor,pi.id_fatura,pi.urgente,\n pi.controle_cliente,pi.custas,pi.certidao_resultado,pi.id_servico_departamento, pi.motivo_atraso,pi.certidao_sequencia,pi.obs,\n pi.ocor, pi.regi \" . $campos . \",\n date_format(pi.data_prazo,'%d/%m/%Y') as data_prazo, \n pi.id_empresa_atend as id_empresa, pi.id_empresa_resp, \n st.status, sd.departamento, s.descricao as servico, sv.variacao,\n p.nome, p.endereco, p.numero, p.complemento, p.bairro, p.cidade, p.estado, p.cep, p.contato, p.id_conveniado, p.id_afiliado\n\t\tfrom vsites_pedido_item as pi, vsites_pedido as p, vsites_status as st, vsites_servico as s, vsites_servico_var as sv, vsites_servico_departamento as sd\n\t\twhere\n\t\tpi.id_pedido=? and\n\t\tpi.ordem=? and\n\t\t\".$onde.\"\n\t\tpi.id_pedido=p.id_pedido and\n\t\tpi.id_status=st.id_status and\n\t\tpi.id_servico_departamento=sd.id_servico_departamento and\n\t\tpi.id_servico=s.id_servico and\n\t\tpi.id_servico_var=sv.id_servico_var limit 1\";\n $this->values = array($id_pedido, $ordem);\n $ret = $this->fetch();\n return $ret[0];\n }", "title": "" }, { "docid": "08f09271560409bd98b8a3b22e7897ae", "score": "0.51184464", "text": "public function proveedor(){\r\n\t\tparent::conectaBDMy();\t \r\n\t\t$this->idProveedor=\"\";\r\n\t\t$this->rif=\"\";\r\n\t\t$this->alias=\"\";\r\n\t\t$this->nomb=\"\";\r\n\t\t$this->personaContacto=\"\";\r\n\t\t$this->celular=\"\";\r\n\t\t$this->telefono=\"\";\r\n\t\t$this->fax=\"\";\r\n\t\t$this->correo=\"\";\r\n\t\t$this->idCiudad=\"\";\r\n\t\t$this->direccion=\"\";\r\n\t\t$this->fechaInicio=\"\";\r\n\t\t$this->fechaFin=\"\";\r\n\t\t$this->ordenar_por=\"\";\r\n\t\r\n\t}", "title": "" }, { "docid": "2f954025096c3403fad7499e97ec131b", "score": "0.5116789", "text": "private function CampoEmprestimoInclusao($empresaId){\n\t\t\t\n\t\t// Verifica se existe lista de emprestimos ou sera a primeira inclusão.\n\t\tif($this->ListaEmprestimo){\n\n\t\t\t$out =' <div id=\"novoEmprestimo\">\n\t\t\t\t\t\t<input type=\"hidden\" value=\"inserEmprestimo\" name=\"acaoEmprestimo\" id=\"acaoEmprestimo\">\n\t\t\t\t\t\t<span>Atribua um apelido para este empréstimo:</span>\n\t\t\t\t\t\t<input id=\"apelido\" name=\"apelido\" type=\"text\" value=\"\" style=\"margin-left:5px; width:150px;\" disabled=\"\">\n\t\t\t\t\t\t<a id=\"mostraSelecione\" href=\"\">Voltar</a>\n\t\t\t\t\t\t<span style=\"margin-left: 30px;\">Informe o prazo de carência do empréstimo:</span>\n\t\t\t\t\t\t<select id=\"prazo_carencia\" name=\"prazo_carencia\" style=\"margin-left:5px;width:40px\" disabled=\"\">'.$this->MontaOpcaoCarencia().'</select> Meses\n\t\t\t\t\t</div>';\n\t\t} else {\n\t\t\t\n\t\t\t$out ='\t<div id=\"novoEmprestimo\">\n\t\t\t\t\t\t<input type=\"hidden\" value=\"inserNovoEmprestimo\" name=\"acaoEmprestimo\" id=\"acaoEmprestimo\">\n\t\t\t\t\t\t<span>Atribua um apelido para este empréstimo:</span>\n\t\t\t\t\t\t<input id=\"apelido\" name=\"apelido\" type=\"text\" value=\"\" style=\"margin-left:5px; width:150px;\">\n\t\t\t\t\t\t<span style=\"margin-left: 30px;\">Informe o prazo de carência do empréstimo:</span>\n\t\t\t\t\t\t<select id=\"prazo_carencia\" name=\"prazo_carencia\" style=\"margin-left:5px;width:40px\">'.$this->MontaOpcaoCarencia().'</select> Meses\n\t\t\t\t\t</div>';\n\t\t}\n\t\t\t\t\t\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "3404fba5688db1d9dd256bfab0163554", "score": "0.51060987", "text": "function set_tipoacompanamiento_element($object)\n\t\t{\n\t\t\t$this->tipoacompanamiento_element = $object->get_idtipoacompanamiento();\n\t\t}", "title": "" }, { "docid": "7537587d38b9dda9964c7b27842e996a", "score": "0.50938517", "text": "public function subir($idHoja){\n\t\t$hojaActual = $this->hoja_model->subir($idHoja);\n\t\t$this->por_articulo($hojaActual->id_articulo);\n\t}", "title": "" }, { "docid": "13beed32f21abc9fc5dcf9bc7ecbca83", "score": "0.5090972", "text": "public function setTetanggaKabkotasRelatedByKodeWilayah1(PropelCollection $tetanggaKabkotasRelatedByKodeWilayah1, PropelPDO $con = null)\n {\n $tetanggaKabkotasRelatedByKodeWilayah1ToDelete = $this->getTetanggaKabkotasRelatedByKodeWilayah1(new Criteria(), $con)->diff($tetanggaKabkotasRelatedByKodeWilayah1);\n\n $this->tetanggaKabkotasRelatedByKodeWilayah1ScheduledForDeletion = unserialize(serialize($tetanggaKabkotasRelatedByKodeWilayah1ToDelete));\n\n foreach ($tetanggaKabkotasRelatedByKodeWilayah1ToDelete as $tetanggaKabkotaRelatedByKodeWilayah1Removed) {\n $tetanggaKabkotaRelatedByKodeWilayah1Removed->setMstWilayahRelatedByKodeWilayah1(null);\n }\n\n $this->collTetanggaKabkotasRelatedByKodeWilayah1 = null;\n foreach ($tetanggaKabkotasRelatedByKodeWilayah1 as $tetanggaKabkotaRelatedByKodeWilayah1) {\n $this->addTetanggaKabkotaRelatedByKodeWilayah1($tetanggaKabkotaRelatedByKodeWilayah1);\n }\n\n $this->collTetanggaKabkotasRelatedByKodeWilayah1 = $tetanggaKabkotasRelatedByKodeWilayah1;\n $this->collTetanggaKabkotasRelatedByKodeWilayah1Partial = false;\n\n return $this;\n }", "title": "" }, { "docid": "de6a048a3c628b98870957126cbe6667", "score": "0.5084584", "text": "public function verEmpresa()\n\t\t{\n\t\t\treturn $this->belongsTo('App\\Empresa', 'proveedor_empresa_id', 'id');\n\t\t}", "title": "" }, { "docid": "5b94b589867cc6d6eea86091e5d5f5ea", "score": "0.5057837", "text": "function setPreguntasByIdExamen()\n {\n global $dbLink;\n\n $sql = \"SELECT idPregunta, valor FROM examenpregunta\n\t\t\t\t\tWHERE idExamen=\" . $this->getIdExamen();\n $res = mysqli_query($dbLink, $sql);\n $arrExamenPregunta = array();\n if ($res && mysqli_num_rows($res) > 0) {\n while ($row_inf = mysqli_fetch_assoc($res)) {\n $idPregunta = $row_inf['idPregunta'];\n $this->examenPregunta = new ModeloExamenpregunta();\n $this->examenPregunta->getPreguntaByIdPregunta($idPregunta);\n $this->examenPregunta->setValor($row_inf['valor']);\n $arrExamenPregunta[] = $this->examenPregunta;\n }\n }\n $this->preguntas= $arrExamenPregunta;\n }", "title": "" }, { "docid": "d8a9b230fe491c5cba8eb87e9391ba40", "score": "0.50387925", "text": "private static function CorteControlTalles(&$producto, $row, &$idTalleAnterior) \r\n {\r\n\t\tif ($idTalleAnterior != $row['idTalle'] && !self::contieneElemento($producto->talle,$row['idTalle'])) {\r\n\t\t\t$tal = new Talle($row['idTalle'],$row['descripcionTalle']);\r\n\t\t\t$producto->addTalle($tal);\r\n\t\t\t\r\n\t\t\t$idTalleAnterior = $row['idTalle'];\r\n\t\t}\t\t\r\n\t}", "title": "" }, { "docid": "dccc59ae3e048280dedadbbcf07b8507", "score": "0.5022317", "text": "public function empleado(){\n\t\treturn $this->hasOne('Empleado','idEmpleado','idEmpleado');\n\t}", "title": "" }, { "docid": "b2747943705b75f2852587f5beebfdc9", "score": "0.49993202", "text": "public function actualizarVigenciaCupones(){\n $fechaHoy = new \\DateTime('now');\n $query = $this->getEntityManager()\n ->createQuery(\n \"select cup\n from AppBundle:Cupon cup\n left join cup.estadoCupon ec\n where ec.nombre=:paramEstadoCupon\n and cup.vencimiento<=:paramFechaHoy\")\n ->setParameter('paramEstadoCupon', 'porCanjear')\n ->setParameter('paramFechaHoy', $fechaHoy);\n \n $arrayCupones = $query->getResult();\n $arrayResult['cupones-vencidos']=count($arrayCupones);\n if($arrayResult['cupones-vencidos']>0){\n $entityManager = $this->getEntityManager();\n $repoEstadoCupon = $entityManager->getRepository('AppBundle:EstadoCupon');\n $estadoVencido = $repoEstadoCupon->findOneByNombre('vencido');\n foreach ($arrayCupones as $cupon) {\n $cupon->setEstadoCupon($estadoVencido);\n $entityManager->persist($cupon);\n }\n $entityManager->flush();\n }\n \n return $arrayResult;\n }", "title": "" }, { "docid": "888da8d334435e5fdfde749aa3e80176", "score": "0.49973986", "text": "public function supernumerario_id($id){\r\t\tglobal $conn;\r\t\ttry { \r\t\t\t\r\t\t\t/*$sql=\"select car.cod_car, car.nom_car, nov.* from supernumerario_nov as nov,empleados_basic as bas, cargos as car \r\t\t\t\t\twhere nov.id='\".$id.\"'\r\t\t\t\t\tand bas.cod_car=car.cod_car\r\t\t\t\t\tand bas.cod_epl=cod_epl_reemp and bas.estado='A'\";*/\r\t\t\t\t\t\r\t\t\t$sql=\"select car.cod_car, car.nom_car, nov.cod_epl_super, RTRIM(bas1.nom_epl)+' '+RTRIM(bas1.ape_epl) as supernumerario ,nov.cod_epl_reemp,RTRIM(bas2.nom_epl)+' '+RTRIM(bas2.ape_epl) as reemplazo, nov.cod_epl_jefe, RTRIM(bas3.nom_epl)+' '+RTRIM(bas3.ape_epl) as jefe,\r\t\t\t\t\tconvert(varchar,nov.fec_ini,105) as fecha_ini, convert(varchar,nov.fec_fin,105) as fecha_fin, baja.nombre as baja, ccosto.nom_cc2, nov.tipo_baja, nov.cod_cc2\r\t\t\t\t\tfrom supernumerario_nov as nov,empleados_basic as bas1, cargos as car,\r\t\t\t\t\templeados_basic as bas2, empleados_basic as bas3, tipo_baja as baja, centrocosto2 as ccosto\r\t\t\t\t\twhere nov.id='\".$id.\"'\r\t\t\t\t\tand bas1.cod_car=car.cod_car\r\t\t\t\t\tand nov.cod_epl_super=bas1.cod_epl\r\t\t\t\t\tand nov.cod_epl_reemp=bas2.cod_epl\r\t\t\t\t\tand nov.cod_epl_jefe=bas3.cod_epl\r\t\t\t\t\tand bas1.estado='A'\r\t\t\t\t\tand nov.tipo_baja=baja.tipo_baja\r\t\t\t\t\tand nov.cod_cc2=ccosto.cod_cc2\r\t\t\t\t\tunion\r\t\t\t\t\tselect car.cod_car, car.nom_car, nov.cod_epl_super, RTRIM(bas1.nom_eplc)+' '+RTRIM(bas1.ape_eplc) as supernumerario , nov.cod_epl_reemp, RTRIM(bas2.nom_epl)+' '+RTRIM(bas2.ape_epl) as reemplazo, nov.cod_epl_jefe, RTRIM(bas3.nom_epl)+' '+RTRIM(bas3.ape_epl) as jefe,\r\t\t\t\t\tconvert(varchar,nov.fec_ini,105) as fecha_ini, convert(varchar,nov.fec_fin,105) as fecha_fin, baja.nombre as baja, ccosto.nom_cc2, nov.tipo_baja, nov.cod_cc2\r\t\t\t\t\tfrom supernumerario_nov as nov,epl_ctistas2 as bas1, cargos as car,\r\t\t\t\t\templeados_basic as bas2, empleados_basic as bas3, tipo_baja as baja, centrocosto2 as ccosto\r\t\t\t\t\twhere nov.id='\".$id.\"'\r\t\t\t\t\tand bas1.cod_car=car.cod_car\r\t\t\t\t\tand nov.cod_epl_super=bas1.cod_eplc\r\t\t\t\t\tand nov.cod_epl_reemp=bas2.cod_epl\r\t\t\t\t\tand nov.cod_epl_jefe=bas3.cod_epl\r\t\t\t\t\tand bas1.estado='A'\r\t\t\t\t\tand nov.tipo_baja=baja.tipo_baja\r\t\t\t\t\tand nov.cod_cc2=ccosto.cod_cc2\r\t\t\t\t\t\t\t\t\t\t\";\r\t\t\t\t\t\t\t\t\t\t\r\t\t\t\t\r\t\t\t$rs=$conn->Execute($sql);\r\t\t\twhile($fila=$rs->FetchRow()){\r\t\t\t\t\t\r\t\t\t\t$this->lista[]=array(\"cod_epl_super\" => $fila[\"cod_epl_super\"],\r\t\t\t\t\t\t\t\t\t \"supernumerario\" => $fila[\"supernumerario\"],\r\t\t\t\t\t\t\t\t\t \"cod_epl_reemp\"=>$fila[\"cod_epl_reemp\"],\r\t\t\t\t\t\t\t\t\t \"reemplazo\" => $fila[\"reemplazo\"],\r\t\t\t\t\t\t\t\t\t \"cod_epl_jefe\"=>$fila[\"cod_epl_jefe\"],\r\t\t\t\t\t\t\t\t\t \"jefe\"=> $fila[\"jefe\"],\r\t\t\t\t\t\t\t\t\t \"nom_cc2\"=>$fila[\"nom_cc2\"],\r\t\t\t\t\t\t\t\t\t \"centro_costo2\"=>$fila[\"cod_cc2\"],\r\t\t\t\t\t\t\t\t\t \"nombre_baja\"=>$fila[\"baja\"],\r\t\t\t\t\t\t\t\t\t \"tipo_baja\" => $fila[\"tipo_baja\"],\r\t\t\t\t\t\t\t\t\t \"cod_car\"=>$fila[\"cod_car\"],\r\t\t\t\t\t\t\t\t\t \"nom_car\"=>$fila[\"nom_car\"],\r\t\t\t\t\t\t\t\t\t \"fecha_ini\"=>$fila[\"fecha_ini\"],\r\t\t\t\t\t\t\t\t\t \"fecha_fin\"=>$fila[\"fecha_fin\"]);\r\t\t\t}\r\t\t\t\r\t\t\treturn $this->lista;\r\t\t\t\r\t\t}catch (exception $e) { \r\r var_dump($e); \r\r adodb_backtrace($e->gettrace());\r\r\t\t} \r\t}", "title": "" }, { "docid": "e51be78baa98536f80c6ad442affcc03", "score": "0.4993472", "text": "public function subir($idHoja){\n\t\t$hojaActual = $this->get($idHoja);\n\t\t$hojas = $this->getConArticulo($hojaActual->id_articulo);\n\t\t$hojaAnterior = NULL;\n\t\tfor($i=0 ; $i<count($hojas) ; $i++){\n\t\t\tif($hojas[$i]->id == $hojaActual->id){\n\t\t\t\tif($i-1 >= 0)\n\t\t\t\t\t$hojaAnterior = $hojas[$i-1];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(!empty($hojaAnterior)){\n\t\t\t$orden = $hojaAnterior->orden;\n\t\t\t$hojaAnterior->orden = $hojaActual->orden;\n\t\t\t$hojaActual->orden = $orden;\n\t\t\t$this->actualizar($hojaAnterior->id, $hojaAnterior);\n\t\t\t$this->actualizar($hojaActual->id, $hojaActual);\n\t\t}\n\t\treturn $hojaActual;\n\t}", "title": "" }, { "docid": "9ac5cb0e2083cb98a33f5a78b0000134", "score": "0.49860942", "text": "public function getClienti()\n{\n return $this->hasOne(Clienti::className(), ['id' => 'idCliente']);\n}", "title": "" }, { "docid": "dd4df41ee157179ed8bf142d499bc896", "score": "0.49846816", "text": "function comboEmpresas() {\n $query = new Query(\"SG\");\n\n $query->sql = \"SELECT id_empresa, nombre_empresa FROM empresa where status = 1\";\n $empresas = $query->select(\"obj\");\n\n if ($empresas) {\n foreach ($empresas as $empresa) {\n echo <<<HTML\n <option value=\"$empresa->id_empresa\">$empresa->nombre_empresa</option>\nHTML;\n }\n } else {\n echo <<<html\n <option value=''>No hay empresas disponibles</option>\nhtml;\n }\n}", "title": "" }, { "docid": "42658f0c27b3a9e1f673c3f29f92a614", "score": "0.49713197", "text": "function setCondicao($valor = null){\n if($valor != null){\n array_push($this->condicoes,$valor);\n }\n }", "title": "" }, { "docid": "ff01b34a59da03daf1afbecd68ee850d", "score": "0.4969161", "text": "public function cobertura(){\r\n\t\tparent::conectaBDMy();\t \r\n\t\t$this->idCobertura=\"\";\t\t\r\n\t\t$this->desc=\"\";\r\n\t\t$this->tipo=\"\";\t\r\n\t\t$this->monto=\"\";\t\r\n\t\t$this->fecha_inicio=\"\";\t\r\n\t\t$this->fecha_fin=\"\";\t\t\t\r\n\t}", "title": "" }, { "docid": "1768ece69ae73a441262905b925129a0", "score": "0.4932046", "text": "public function getPerakuanSubkukp()\n {\n return $this->hasOne(KonfRujukan::className(), ['id' => 'perakuan_subkukp']);\n }", "title": "" }, { "docid": "8814ede78bd234904c5a5b9a5ccd6f80", "score": "0.4925476", "text": "public function setTetanggaKabkotasRelatedByKodeWilayah2(PropelCollection $tetanggaKabkotasRelatedByKodeWilayah2, PropelPDO $con = null)\n {\n $tetanggaKabkotasRelatedByKodeWilayah2ToDelete = $this->getTetanggaKabkotasRelatedByKodeWilayah2(new Criteria(), $con)->diff($tetanggaKabkotasRelatedByKodeWilayah2);\n\n $this->tetanggaKabkotasRelatedByKodeWilayah2ScheduledForDeletion = unserialize(serialize($tetanggaKabkotasRelatedByKodeWilayah2ToDelete));\n\n foreach ($tetanggaKabkotasRelatedByKodeWilayah2ToDelete as $tetanggaKabkotaRelatedByKodeWilayah2Removed) {\n $tetanggaKabkotaRelatedByKodeWilayah2Removed->setMstWilayahRelatedByKodeWilayah2(null);\n }\n\n $this->collTetanggaKabkotasRelatedByKodeWilayah2 = null;\n foreach ($tetanggaKabkotasRelatedByKodeWilayah2 as $tetanggaKabkotaRelatedByKodeWilayah2) {\n $this->addTetanggaKabkotaRelatedByKodeWilayah2($tetanggaKabkotaRelatedByKodeWilayah2);\n }\n\n $this->collTetanggaKabkotasRelatedByKodeWilayah2 = $tetanggaKabkotasRelatedByKodeWilayah2;\n $this->collTetanggaKabkotasRelatedByKodeWilayah2Partial = false;\n\n return $this;\n }", "title": "" }, { "docid": "fb93113a9cfed7a87dd6c979dc83a777", "score": "0.49250448", "text": "public function cogeValoresSegunId(){\n\t\t$queryForId = array('_id' => $this->id);\n\t\tif($this->bbdd->contar($queryForId)){\n\t\t\t$respuesta = $this->bbdd->findOneCollection($queryForId);\n\t\t\t$this->id = $respuesta['_id'];\n\t\t\t$this->usuario = $respuesta['idUsu'];\n\t\t\t$this->idSitio= (isset($respuesta['idCiu']))? $respuesta['idCiu'] : $respuesta['idPais'];\n\t\t\t$this->idPregunta= $respuesta['idPregunta'];\n\t\t\t$this->fecha = $respuesta['data'];\n\t\t\t$this->respuesta = $respuesta['respuesta'];\n\t\t}\n\t}", "title": "" }, { "docid": "a29c6a2c1644a1d4776502f5a7e0e005", "score": "0.49161658", "text": "public function cambiaempresa()\n {\n $idempresa = $_GET['idemp'];\n \n $sql=\"SELECT id_usuario, admin FROM usuarios WHERE login= '\".$_SESSION[\"backend_login\"].\"'\";\n $res= $this->conn->query($sql);\n $reg = $res->fetch_array(MYSQLI_ASSOC);\n\n\n\n //$res=mysql_query($sql,parent::con());\n //$reg=mysql_fetch_assoc($res);\n \n\n if ($reg['admin']== 1)\n {\n // 1 es igual a accesos usuario administrador\n $sql=\"SELECT id_usuario FROM acceso WHERE id_empresa= '\".$idempresa.\"'\";\n //.\"' AND id_usuario= '\".$reg['id_usuario'].\"'\";\n $res= $this->conn->query($sql);\n }\n elseif($reg['admin']== 0)\n {\n // 0 es igual a accesos usuario NO adminsitrador\n $sql=\"SELECT id_usuario FROM acceso WHERE id_empresa= '\".$idempresa.\"' AND id_usuario= '\".$reg['id_usuario'].\"'\";\n $res= $this->conn->query($sql);\n \n }\n\n\n\n\n //$res = mysql_query($sql,parent::con());\n \n echo '<option value=\"0\">Seleccione usuario</option>';\n \n //while($reg=mysql_fetch_assoc($res))\n while($reg = $res->fetch_array(MYSQLI_ASSOC))\n {\n $sql=\"SELECT id_usuario, nombre FROM usuarios WHERE id_usuario= '\".$reg['id_usuario'].\"'\";\n $ress= $this->conn->query($sql);\n $regg = $ress->fetch_array(MYSQLI_ASSOC);\n\n //$ress=mysql_query($sql,parent::con());\n //$regg=mysql_fetch_assoc($ress); \n echo '<option value=\"'.$regg['id_usuario'].'\">'.$regg['nombre'].'</option>';\n \n }\n }", "title": "" }, { "docid": "ff3eb3541366ac457c4bfebee69d92d6", "score": "0.49015704", "text": "public function vendido(){\n return $this->hasOne(Vendido::class);\n }", "title": "" }, { "docid": "410a85613a8b8130d9e556c28fd1b324", "score": "0.48772442", "text": "public function getProducto()\n {\n return $this->hasOne(Productos::className(), ['app_idApp' => 'app_idApp','id'=>'productos_id']);\n }", "title": "" }, { "docid": "30058d2c30843b33227fe681959ca5a9", "score": "0.4875445", "text": "public function getTiempo()\n {\n return $this->hasOne(Tiempo::className(), ['idFuente' => 'idFuente']);\n }", "title": "" }, { "docid": "51e3aa9955ab15e5281453dc1f13b8e5", "score": "0.48718607", "text": "public function detalle_pro(){\r\n\t\tparent::conectaBDMy();\t \r\n\t\t$this->idProveedor=\"\";\t\t\r\n\t\t$this->idMedico=\"\";\t\r\n\t\t$this->id_Proveedor_Medico=\"\";\r\n\t}", "title": "" }, { "docid": "8ce45dce97698652709ce261007d2795", "score": "0.48695076", "text": "function limpaPropriedade()\r\n\t{\r\n\t\tparent::limpaPropriedade();\r\n\t\t$this->strAcao = \"\";\r\n\t}", "title": "" }, { "docid": "8fcd1bb72fa59d7af0948c1dbad2695a", "score": "0.48677278", "text": "function SelectBuscaTipoCliente($busca_cliente){\n \t$Sql = \"SELECT * FROM fixo_tipo_profissional\";\n \t$result = parent::Execute($Sql);\n \t$linha = parent::Linha($result);\n \tif($linha){\n \t\t$retorno = \"<select name='tipo_cliente' id='busca_cliente' class='form-control' style='width: 10%; float: left;'>\";\n \t\t$retorno .= \"<option value=''>Tipo</option>\";\n \t\twhile($rs = parent::ArrayData($result)){\n \t\t\tif($rs['idtipoprofissional'] == $busca_cliente){\n \t\t\t\t$retorno .= \"<option value='\".utf8_encode($rs['idtipoprofissional']).\"' selected>\".utf8_encode($rs['tipo']).\"</option>\";\n \t\t\t}else{\n \t\t\t\t$retorno .= \"<option value='\".utf8_encode($rs['idtipoprofissional']).\"'>\".utf8_encode($rs['tipo']).\"</option>\";\n \t\t\t}\n \t\t}\n \t\t$retorno .= \"</select>\";\n \t}\n \treturn $retorno;\n }", "title": "" }, { "docid": "38ad0d9c2b68b97d2e7e2ddaad2bbd56", "score": "0.48677185", "text": "public function getFkTcernObraAcompanhamentos()\n {\n return $this->fkTcernObraAcompanhamentos;\n }", "title": "" }, { "docid": "30c0438885b86b61fe93dce24888d270", "score": "0.48658216", "text": "private function getPropriedade($seq) {\n\n // instancia a instrução de SELECT\n $this->obKDbo->setEntidade('campos_x_propriedades');\n $criteriaCampoProps = new TCriteria();\n $criteriaCampoProps->add(new TFilter('campseq','=',$seq));\n $criteriaCampoProps->add(new TFilter('statseq','=','1'));\n $Result = $this->obKDbo->select(\"*\", $criteriaCampoProps);\n\n //Zera vetor de objetos propriedades\n $this->props = null;\n\n // retorna consulta no banco de propriedades\n while($props = $Result->fetchObject()) {\n\n \tforeach(explode(';', $props->metodo) as $metodo){\n \t\t$property = clone $props;\n \t\t// verifica se a propriedade é uma addItems\n \t\t$property->metodo = $metodo;\n \t\tif($metodo == \"addItems\") {\n \t\t\n \t\t\tif(strpos($property->valor,\"getItens/\") !== false) {\n \t\t\t\t$obSetModel = new TSetModel();\n \t\t\t\t$Itens = $obSetModel->getItensSel($property->valor);\n \t\t\t}\n \t\t\telseif(strpos($property->valor,\"select\") !== false or strpos($property->valor,\"SELECT\") !== false or strpos($property->valor,\"show \") !== false or strpos($property->valor,\"SHOW \") !== false) {\n \t\t\n \t\t\t\t//=====================================================\n \t\t\t\t//apresentação do menu dropdown via chave estrageira\n \t\t\t\t$dboItens = new TDbo();\n \t\t\t\t$QueryItens = $dboItens->sqlExec($property->valor);\n \t\t\t\tif($QueryItens){\n \t\t\t\t\twhile($ObItens = $QueryItens->fetch()) {\n \t\t\n \t\t\t\t\t\tif($ObItens[0] != \"\") {\n \t\t\t\t\t\t\t$Itens[$ObItens[0]] = $ObItens[1];\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\n \t\t\t}else {\n \t\t\n \t\t\t\t$vls = explode(';',$property->valor);\n \t\t\n \t\t\t\tforeach($vls as $v) {\n \t\t\t\t\t$pts = explode('=>',$v);\n \t\t\t\t\t$Itens[$pts[0]] = $pts[1];\n \t\t\t\t}\n \t\t\t}\n \t\t\n \t\t\t//atribui items ao campo seletor\n \t\t\t$property->valor = $Itens;\n \t\t\t$Itens = NULL;\n \t\t}\n \t\t\n \t\t$this->props[$metodo] = $property;\n \t}\n \n }\n return $this->props;\n }", "title": "" }, { "docid": "84a7da57d856a38448b08a120dd14e37", "score": "0.48558584", "text": "public function getCdEmpresa()\n {\n return $this->cd_empresa;\n }", "title": "" }, { "docid": "cf1ee2c52b329ef974c898ba44a7e30a", "score": "0.4839899", "text": "public function setComuna(\\VerantBundle\\Entity\\Provincias $comuna = null)\n// public function setComuna($comuna)\n {\n $this->comuna = $comuna;\n\n return $this;\n }", "title": "" }, { "docid": "6323117514ca42e518efe67b3cf38d8b", "score": "0.48381266", "text": "private function carregaEquipe($db){\n\t\t$r=$db->prepare(\"select idAluno from equipeprojeto where idProjeto = :idProjeto\");\n\t\t$r->execute(array(':idProjeto'=>$this->getId()));\n\t\t$linhas=$r->fetchAll(PDO::FETCH_NUM);\n\t\t\n\t\t$this->equipe = array();\n\t\tfor($i=0; $i < count($linhas) ; $i++){\n\t\t\t$aluno = Usuario::getUsuarioById($linhas[$i][0]);\n\t\t\t$this->equipe[$i]=$aluno;\n\t\t}\n\t\t//for($i=count($this->equipe); $i < 3 ; $i++){\n\t\t//\t$this->equipe[$i]=null;\n\t\t//}\n\t}", "title": "" }, { "docid": "66a5f48b7e650e3a72bfaacfd881b90b", "score": "0.48365557", "text": "public function setCavalos($cavalos){\r\n$this->cavalos = $cavalos;\r\n}", "title": "" }, { "docid": "c8965489191cfbb323e0e93ef91f8ead", "score": "0.48315585", "text": "public function getFkComprasSolicitante()\n {\n return $this->fkComprasSolicitante;\n }", "title": "" }, { "docid": "da123d43b20796f93b57ac479ad081b9", "score": "0.4821458", "text": "public function exibir($objetoVo){\r\n \t\r\n \t$sql = 'SELECT * FROM ' . $this->entidade . ' WHERE ' . $this->entidade.'Id = ';\r\n \teval('$sql .= $objetoVo->get'.ucfirst($this->entidade).'Id();');\r\n $query = mysql_query($sql);\r\n $qtde = mysql_affected_rows();\r\n if ($qtde > 0) {\r\n\t\t\teval('$objetoVo = new '.ucfirst($this->entidade).'Vo();');\r\n\t while ($rows = mysql_fetch_object($query)) {\r\n\t \t// chave primaria\r\n\t\t\t\teval('$objetoVo->set' . ucfirst($this->entidade) . 'Id((int)$rows->' . $this->entidade . 'Id);');\r\n\t \t//chave estrangeira\r\n\t for ($j = 0; $j < count($this->chaveEstrangeira); $j++) {\r\n\t $_dadosEstrangeiro = explode(' ', $this->chaveEstrangeira[$j]);\r\n\t eval('$objetoVo -> set'.ucfirst($_dadosEstrangeiro[0]) . '(\"$rows->'.$_dadosEstrangeiro[0].'\");');\r\n\t }\r\n\t \tfor ( $i = 0; $i < count($this->dadosBase); $i++ ) {\r\n\t\t\t\t\t$_dadosBase = explode(' ', $this->dadosBase[$i]);\r\n\t\t\t\t\tif ($_dadosBase[1] == 'DATE') {\r\n\t\t\t \teval('$objetoVo -> set'.ucfirst($this->entidade). ucfirst($_dadosBase[0]).'(formatarData(\"$rows->'.$this->entidade.ucfirst($_dadosBase[0]).'\"));');\r\n \r\n } else if($_dadosBase[1] == 'DECIMAL'){\r\n\t\t\t \teval('$objetoVo -> set'.ucfirst($this->entidade). ucfirst($_dadosBase[0]).'(formatarValor(\"$rows->'.$this->entidade.ucfirst($_dadosBase[0]).'\"));');\r\n\t\t\t \r\n \t} else {\r\n\t\t\t \teval('$objetoVo -> set'.ucfirst($this->entidade). ucfirst($_dadosBase[0]).'(\"$rows->'.$this->entidade.ucfirst($_dadosBase[0]).'\");');\r\n \r\n }\r\n\t\t\t\t}\t\r\n\t\t\t\t\r\n\t\t\t\tif ($this->momentoCadastro) {\r\n eval('$objetoVo->set' . ucfirst($this->entidade) . 'DataCadastro($rows->' . $this->entidade . 'DataCadastro);');\r\n }\r\n if ($this->status) {\r\n eval('$objetoVo->set' . ucfirst($this->entidade) . 'Status($rows->' . $this->entidade . 'Status);');\r\n }\r\n\t }\r\n }\t\t\r\n \t\r\n\t\treturn $objetoVo;\r\n }", "title": "" }, { "docid": "4ebefb4205258b5575bcff198f5f7d59", "score": "0.48205313", "text": "public function supernumerario_id2($id){\r\t\tglobal $conn;\r\t\ttry { \r\t\t\t\r\t\t\t$sql=\"select car.cod_car, car.nom_car, nov.* from supernumerario_nov as nov,empleados_basic as bas, cargos as car \r\t\t\t\twhere nov.id='\".$id.\"'\r\t\t\t\tand bas.cod_car=car.cod_car\r\t\t\t\tand bas.cod_epl=nov.cod_epl_super and bas.estado='A'\r\t\t\t\tunion\r\t\t\t\tselect car.cod_car, car.nom_car, nov.* from supernumerario_nov as nov,epl_ctistas2 as bas, cargos as car \r\t\t\t\twhere nov.id='\".$id.\"'\r\t\t\t\tand bas.cod_car=car.cod_car\r\t\t\t\tand bas.cod_eplc=nov.cod_epl_super and bas.estado='A'\";\r\t\t\t\t\r\t\t\t\r\t\t\t$rs=$conn->Execute($sql);\r\t\t\twhile($fila=$rs->FetchRow()){\r\t\t\t\t$this->lista[]=array(\"cod_epl_super\" => $fila[\"cod_epl_super\"],\r\t\t\t\t\t\t\t\t\t \"cod_epl_jefe\"=>$fila[\"cod_epl_jefe\"],\r\t\t\t\t\t\t\t\t\t \"cod_cc2\"=>$fila[\"cod_cc2\"],\r\t\t\t\t\t\t\t\t\t \"tipo_baja\"=>$fila[\"tipo_baja\"],\r\t\t\t\t\t\t\t\t\t \"cod_car\"=>$fila[\"cod_car\"],\r\t\t\t\t\t\t\t\t\t \"nom_car\"=>$fila[\"nom_car\"]);\r\t\t\t}\r\t\t\t\r\t\t\treturn $this->lista;\r\t\t\t\r\t\t}catch (exception $e) { \r\r var_dump($e); \r\r adodb_backtrace($e->gettrace());\r\r\t\t} \r\t}", "title": "" }, { "docid": "8893efa5521783d0098b8487b1be6a1f", "score": "0.4818893", "text": "public function retrieveOrganismesMindefActifPourSelectBox()\n {\n $objRequete = $this->createQuery('o')\n ->where(\"o.est_actif = 1\")\n ->orderBy(\"o.abreviation\");\n return $objRequete;\n }", "title": "" }, { "docid": "866f39fc7b73b04f89409f219f1fcc92", "score": "0.48177454", "text": "public function actionSetDropdownDaerahPasien()\n {\n if(Yii::app()->getRequest()->getIsAjaxRequest()) {\n $modPasien = new PPPasienM;\n $propinsi_id = $_POST['propinsi_id'];\n $kabupaten_id = $_POST['kabupaten_id'];\n $kecamatan_id = $_POST['kecamatan_id'];\n $kelurahan_id = (isset($_POST['kelurahan_id']) ? $_POST['kelurahan_id'] : null);\n\n $propinsis = PropinsiM::model()->findAll('propinsi_aktif = TRUE');\n $propinsis = CHtml::listData($propinsis,'propinsi_id','propinsi_nama');\n $propinsiOption = CHtml::tag('option',array('value'=>''),\"-- Pilih --\",true);\n foreach($propinsis as $value=>$name)\n {\n if($value==$propinsi_id)\n $propinsiOption .= CHtml::tag('option',array('value'=>$value,'selected'=>true),CHtml::encode($name),true);\n else\n $propinsiOption .= CHtml::tag('option',array('value'=>$value),CHtml::encode($name),true);\n }\n $kabupatens = $modPasien->getKabupatenItems($propinsi_id);\n// $kabupatens = KabupatenM::model()->findAllByAttributes(array('propinsi_id'=>$propinsi_id,'kabupaten_aktif'=>true,));\n $kabupatens = CHtml::listData($kabupatens,'kabupaten_id','kabupaten_nama');\n $kabupatenOption = CHtml::tag('option',array('value'=>''),\"-- Pilih --\",true);\n foreach($kabupatens as $value=>$name)\n {\n if($value==$kabupaten_id)\n $kabupatenOption .= CHtml::tag('option',array('value'=>$value,'selected'=>true),CHtml::encode($name),true);\n else\n $kabupatenOption .= CHtml::tag('option',array('value'=>$value),CHtml::encode($name),true);\n }\n $kecamatans = $modPasien->getKecamatanItems($kabupaten_id);\n// $kecamatans = KecamatanM::model()->findAllByAttributes(array('kabupaten_id'=>$kabupaten_id,'kecamatan_aktif'=>true,));\n $kecamatans = CHtml::listData($kecamatans,'kecamatan_id','kecamatan_nama');\n $kecamatanOption = CHtml::tag('option',array('value'=>''),\"-- Pilih --\",true);\n foreach($kecamatans as $value=>$name)\n {\n if($value==$kecamatan_id)\n $kecamatanOption .= CHtml::tag('option',array('value'=>$value,'selected'=>true),CHtml::encode($name),true);\n else\n $kecamatanOption .= CHtml::tag('option',array('value'=>$value),CHtml::encode($name),true);\n }\n $kelurahans = $modPasien->getKelurahanItems($kecamatan_id);\n $kelurahans = CHtml::listData($kelurahans,'kelurahan_id','kelurahan_nama');\n $kelurahanOption = CHtml::tag('option',array('value'=>''),\"-- Pilih --\",true);\n foreach($kelurahans as $value=>$name)\n {\n if($value==$kelurahan_id)\n $kelurahanOption .= CHtml::tag('option',array('value'=>$value,'selected'=>true),CHtml::encode($name),true);\n else\n $kelurahanOption .= CHtml::tag('option',array('value'=>$value),CHtml::encode($name),true);\n }\n \n $dataList['listPropinsi'] = $propinsiOption;\n $dataList['listKabupaten'] = $kabupatenOption;\n $dataList['listKecamatan'] = $kecamatanOption;\n $dataList['listKelurahan'] = $kelurahanOption;\n\n echo json_encode($dataList);\n Yii::app()->end();\n }\n }", "title": "" }, { "docid": "937e7cec1ca1d0c8f63f6ae0fad90a5b", "score": "0.48120278", "text": "public function getFkEmpenhoEmpenho()\n {\n return $this->fkEmpenhoEmpenho;\n }", "title": "" }, { "docid": "3623a2dd6e57a6349cac2986d836d964", "score": "0.48083246", "text": "public function getFkFrotaVeiculoCombustiveis()\n {\n return $this->fkFrotaVeiculoCombustiveis;\n }", "title": "" }, { "docid": "a9a24577e79ea6f0dbe604efdc13192c", "score": "0.48052567", "text": "public function miCocinero(){\n return $this->belongTo(Cocinero::class,'id_cocinero');\n }", "title": "" }, { "docid": "5c81657d0a937801ffaa8d1f91b9d64f", "score": "0.47995642", "text": "function SubeItem($id, $tematica)\n{\n $orden_anterior = 0;\n $orden_nuevo = 0;\n $query=\"SELECT orden\n FROM tienda_tematica_item\n WHERE idTematica=$tematica and idItem=$id\";\n $model = new model();\n $stmt = $model->get_stmt($query);\n $stmt->bind_result($col1);\n while ($row = $stmt->fetch())\n {\n $orden_anterior = $col1;\n\t$orden_nuevo = $orden_anterior -1;\n }\n\n $query=\"UPDATE tienda_tematica_item SET orden = $orden_anterior\n\t WHERE orden = $orden_nuevo and idTematica = $tematica\";\n $model = new model();\n $stmt = $model->get_stmt($query);\n\n $query=\"UPDATE tienda_tematica_item SET orden = $orden_nuevo\n WHERE idItem = $id\";\n $model = new model();\n $stmt = $model->get_stmt($query);\n\n if ($stmt)\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n}", "title": "" }, { "docid": "24fad5f57985393476219921076b054d", "score": "0.47902328", "text": "function SubeTematica($id)\n{\n\t$orden_anterior = 0;\n\t$orden_nuevo = 0;\n\t$query=\"SELECT orden\n\t\t\tFROM tienda_tematica\n\t\t\tWHERE idTematica=\".$id;\n $model = new model();\n $stmt = $model->get_stmt($query);\n $stmt->bind_result($col1);\n while ($row = $stmt->fetch())\n {\n $orden_anterior = $col1;\n\t\t$orden_nuevo = $orden_anterior -1;\n }\t\n\t\n $query=\"UPDATE tienda_tematica SET orden = $orden_anterior\n\t\t\tWHERE orden = $orden_nuevo\";\n $model = new model();\n $stmt = $model->get_stmt($query);\n\t\n $query=\"UPDATE tienda_tematica SET orden = $orden_nuevo\n\t\t\tWHERE idTematica = $id\";\n $model = new model();\n $stmt = $model->get_stmt($query);\n\t\t \n\tif ($stmt)\n\t{\n\t\treturn TRUE;\n\t}\n\telse\n\t{\n\t\treturn FALSE;\n\t} \n}", "title": "" }, { "docid": "b224f9cecd815e4c25aedb8c731657ad", "score": "0.47861233", "text": "public function getEmpresa() {\n return $this->oEmpresa;\n }", "title": "" }, { "docid": "805638fc865dac7de4d18bead10d578b", "score": "0.47830215", "text": "public function select($curso_has_estudiante){\n $curso_curso_id=$curso_has_estudiante->getCurso_curso_id()->getCurso_id();\n$estudiante_estudiante_id=$curso_has_estudiante->getEstudiante_estudiante_id()->getEstudiante_id();\n\n try {\n $sql= \"SELECT `curso_curso_id`, `estudiante_estudiante_id`\"\n .\"FROM `curso_has_estudiante`\"\n .\"WHERE `curso_curso_id`='$curso_curso_id' AND`estudiante_estudiante_id`='$estudiante_estudiante_id'\";\n $data = $this->ejecutarConsulta($sql);\n for ($i=0; $i < count($data) ; $i++) {\n $curso = new Curso();\n $curso->setCurso_id($data[$i]['curso_curso_id']);\n $curso_has_estudiante->setCurso_curso_id($curso);\n $estudiante = new Estudiante();\n $estudiante->setEstudiante_id($data[$i]['estudiante_estudiante_id']);\n $curso_has_estudiante->setEstudiante_estudiante_id($estudiante);\n\n }\n return $curso_has_estudiante; } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n return null;\n }\n }", "title": "" }, { "docid": "a0c0201cc5d5e0df19d7fe9fd83a8659", "score": "0.47821993", "text": "public function getPerakuanSubw()\n {\n return $this->hasOne(KonfRujukan::className(), ['id' => 'perakuan_subw']);\n }", "title": "" }, { "docid": "c2ae765baf19d8d52aa5c20b86402033", "score": "0.47803625", "text": "public function getFkTcmbaTipoCombustivelVinculos()\n {\n return $this->fkTcmbaTipoCombustivelVinculos;\n }", "title": "" }, { "docid": "f9551c87cfadd97c0d4772b6636627c5", "score": "0.47767425", "text": "public function actionSetDropdownDaerahPasien()\n {\n if(Yii::app()->getRequest()->getIsAjaxRequest()) {\n $modPasien = new LBPasienM;\n $propinsi_id = $_POST['propinsi_id'];\n $kabupaten_id = $_POST['kabupaten_id'];\n $kecamatan_id = $_POST['kecamatan_id'];\n $kelurahan_id = $_POST['kelurahan_id'];\n\n $propinsis = PropinsiM::model()->findAll('propinsi_aktif = TRUE');\n $propinsis = CHtml::listData($propinsis,'propinsi_id','propinsi_nama');\n $propinsiOption = CHtml::tag('option',array('value'=>''),\"-- Pilih --\",true);\n foreach($propinsis as $value=>$name)\n {\n if($value==$propinsi_id)\n $propinsiOption .= CHtml::tag('option',array('value'=>$value,'selected'=>true),CHtml::encode($name),true);\n else\n $propinsiOption .= CHtml::tag('option',array('value'=>$value),CHtml::encode($name),true);\n }\n $kabupatens = $modPasien->getKabupatenItems($propinsi_id);\n// $kabupatens = KabupatenM::model()->findAllByAttributes(array('propinsi_id'=>$propinsi_id,'kabupaten_aktif'=>true,));\n $kabupatens = CHtml::listData($kabupatens,'kabupaten_id','kabupaten_nama');\n $kabupatenOption = CHtml::tag('option',array('value'=>''),\"-- Pilih --\",true);\n foreach($kabupatens as $value=>$name)\n {\n if($value==$kabupaten_id)\n $kabupatenOption .= CHtml::tag('option',array('value'=>$value,'selected'=>true),CHtml::encode($name),true);\n else\n $kabupatenOption .= CHtml::tag('option',array('value'=>$value),CHtml::encode($name),true);\n }\n $kecamatans = $modPasien->getKecamatanItems($kabupaten_id);\n// $kecamatans = KecamatanM::model()->findAllByAttributes(array('kabupaten_id'=>$kabupaten_id,'kecamatan_aktif'=>true,));\n $kecamatans = CHtml::listData($kecamatans,'kecamatan_id','kecamatan_nama');\n $kecamatanOption = CHtml::tag('option',array('value'=>''),\"-- Pilih --\",true);\n foreach($kecamatans as $value=>$name)\n {\n if($value==$kecamatan_id)\n $kecamatanOption .= CHtml::tag('option',array('value'=>$value,'selected'=>true),CHtml::encode($name),true);\n else\n $kecamatanOption .= CHtml::tag('option',array('value'=>$value),CHtml::encode($name),true);\n }\n $kelurahans = $modPasien->getKelurahanItems($kecamatan_id);\n $kelurahans = CHtml::listData($kelurahans,'kelurahan_id','kelurahan_nama');\n $kelurahanOption = CHtml::tag('option',array('value'=>''),\"-- Pilih --\",true);\n foreach($kelurahans as $value=>$name)\n {\n if($value==$kelurahan_id)\n $kelurahanOption .= CHtml::tag('option',array('value'=>$value,'selected'=>true),CHtml::encode($name),true);\n else\n $kelurahanOption .= CHtml::tag('option',array('value'=>$value),CHtml::encode($name),true);\n }\n \n $dataList['listPropinsi'] = $propinsiOption;\n $dataList['listKabupaten'] = $kabupatenOption;\n $dataList['listKecamatan'] = $kecamatanOption;\n $dataList['listKelurahan'] = $kelurahanOption;\n\n echo json_encode($dataList);\n Yii::app()->end();\n }\n }", "title": "" }, { "docid": "33b6db709198290ca1c39a4c8bab0d5a", "score": "0.47767332", "text": "public function Calendseguimtos()\n {\n return $this->hasOne('App\\Models\\Calendseguimtos');\n }", "title": "" }, { "docid": "f4687704a205c9e7f0924e901e2a9b6c", "score": "0.4769642", "text": "public function empresa() {\n return $this->hasOne( 'App\\Models\\EmpresaDataFactura', 'solicitud_factura_id', 'id' ); \n }", "title": "" }, { "docid": "537babc48f3bcf373e801c9e9c4b909f", "score": "0.47631964", "text": "public function setEmpenho($iEmpenho) {\n $this->iEmpenho = $iEmpenho;\n }", "title": "" }, { "docid": "537babc48f3bcf373e801c9e9c4b909f", "score": "0.47631964", "text": "public function setEmpenho($iEmpenho) {\n $this->iEmpenho = $iEmpenho;\n }", "title": "" }, { "docid": "57194eda9fc32d213944883470ddcc10", "score": "0.47630584", "text": "public function getFkFolhapagamentoConfiguracaoEventoCasoSubDivisoes()\n {\n return $this->fkFolhapagamentoConfiguracaoEventoCasoSubDivisoes;\n }", "title": "" }, { "docid": "2e600c1bf1a2645c3316eac254a8ad4c", "score": "0.47579584", "text": "function setIdEspaco( $idEspaco ) {\n // seta o valor de: idEspaco\n $this->idEspaco = $idEspaco;\n }", "title": "" }, { "docid": "3c710db00f69f8a05bba1faa301ef500", "score": "0.47567242", "text": "function insertarSolicitudEfectivoCompleta(){\n\t\t$cone = new conexion();\n\t\t$link = $cone->conectarpdo();\n\t\t$copiado = false;\t\t\t\n\t\ttry {\n\t\t\t$link->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\t\t\n\t\t \t$link->beginTransaction();\n\t\t\t\n\t\t\t/////////////////////////\n\t\t\t// inserta cabecera de la solicitud de compra\n\t\t\t///////////////////////\n\t\t\t\n\t\t\t\n\t\t\t//Definicion de variables para ejecucion del procedimiento\n\t\t\t$this->procedimiento = 'tes.ft_solicitud_efectivo_ime';\n\t\t\t$this->transaccion = 'TES_SOLEFE_INS';\n\t\t\t$this->tipo_procedimiento = 'IME';\n\t\t\t\t\t\n\t\t\t//Define los parametros para la funcion\n\t\t\t$this->setParametro('id_caja','id_caja','int4');\n\t\t\t$this->setParametro('id_estado_wf','id_estado_wf','int4');\n\t\t\t$this->setParametro('monto','monto','numeric');\n\t\t\t$this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\t\t\t$this->setParametro('nro_tramite','nro_tramite','varchar');\n\t\t\t$this->setParametro('estado','estado','varchar');\n\t\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t\t$this->setParametro('motivo','motivo','text');\n\t\t\t$this->setParametro('id_funcionario','id_funcionario','int4');\n\t\t\t$this->setParametro('tipo_solicitud','tipo_solicitud','varchar');\n\t\t\t$this->setParametro('fecha','fecha','date');\n\t\t\t\t\t\t\n\t\t\t//Ejecuta la instruccion\n $this->armarConsulta();\t\t\t\n\t\t\t$stmt = $link->prepare($this->consulta);\t\t \n\t\t \t$stmt->execute();\n\t\t\t$result = $stmt->fetch(PDO::FETCH_ASSOC);\t\t\t\t\n\t\t\t\n\t\t\t//recupera parametros devuelto depues de insertar ... (id_obligacion_pago)\n\t\t\t$resp_procedimiento = $this->divRespuesta($result['f_intermediario_ime']);\n\t\t\tif ($resp_procedimiento['tipo_respuesta']=='ERROR') {\n\t\t\t\tthrow new Exception(\"Error al ejecutar en la bd\", 3);\n\t\t\t}\n\t\t\t$respuesta = $resp_procedimiento['datos'];\n\t\t\t\n\t\t\t$id_solicitud_efectivo = $respuesta['id_solicitud_efectivo'];\n\t\t\t\n\t\t\t//////////////////////////////////////////////\n\t\t\t//inserta detalle de la solicitud de compra\n\t\t\t/////////////////////////////////////////////\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//decodifica JSON de detalles \n\t\t\t$json_detalle = $this->aParam->_json_decode($this->aParam->getParametro('json_new_records'));\t\t\t\n\t\t\t\n\t\t\t//var_dump($json_detalle)\t;\n\t\t\tforeach($json_detalle as $f){\n\t\t\t\t\n\t\t\t\t$this->resetParametros();\n\t\t\t\t//Definicion de variables para ejecucion del procedimiento\n\t\t\t $this->procedimiento='tes.ft_solicitud_efectivo_det_ime';\n\t\t\t\t$this->transaccion='TES_SOLDET_INS';\n\t\t\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t//modifica los valores de las variables que mandaremos\n\t\t\t\t\n\t\t\t\t$this->arreglo['id_solicitud_efectivo'] = $id_solicitud_efectivo;\n\t\t\t\t$this->arreglo['id_cc'] = $f['id_cc'];\n\t\t\t\t$this->arreglo['id_concepto_ingas'] = $f['id_concepto_ingas'];\n\t\t\t\t$this->arreglo['id_partida_ejecucion'] = $f['id_partida_ejecucion'];\n\t\t\t\t$this->arreglo['estado_reg'] = $f['estado_reg'];\n\t\t\t\t$this->arreglo['monto'] = $f['monto'];\n\t\t\t\t\t\t\n\t\t\t\t//Define los parametros para la funcion\n\t\t\t\t$this->setParametro('id_solicitud_efectivo','id_solicitud_efectivo','int4');\n\t\t\t\t$this->setParametro('id_cc','id_cc','int4');\n\t\t\t\t$this->setParametro('id_concepto_ingas','id_concepto_ingas','int4');\n\t\t\t\t$this->setParametro('id_partida_ejecucion','id_partida_ejecucion','text');\n\t\t\t\t$this->setParametro('estado_reg','estado_reg','numeric');\n\t\t\t\t$this->setParametro('monto','monto','int4');\n\t\t\t\t\n\t\t\t\t//Ejecuta la instruccion\n\t $this->armarConsulta();\n\t\t\t\t$stmt = $link->prepare($this->consulta);\t\t \n\t\t\t \t$stmt->execute();\n\t\t\t\t$result = $stmt->fetch(PDO::FETCH_ASSOC);\t\t\t\t\n\t\t\t\t\n\t\t\t\t//recupera parametros devuelto depues de insertar ... (id_solicitud)\n\t\t\t\t$resp_procedimiento = $this->divRespuesta($result['f_intermediario_ime']);\n\t\t\t\tif ($resp_procedimiento['tipo_respuesta']=='ERROR') {\n\t\t\t\t\tthrow new Exception(\"Error al insertar detalle en la bd\", 3);\n\t\t\t\t}\n \n \n }\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//si todo va bien confirmamos y regresamos el resultado\n\t\t\t$link->commit();\n\t\t\t$this->respuesta=new Mensaje();\n\t\t\t$this->respuesta->setMensaje($resp_procedimiento['tipo_respuesta'],$this->nombre_archivo,$resp_procedimiento['mensaje'],$resp_procedimiento['mensaje_tec'],'base',$this->procedimiento,$this->transaccion,$this->tipo_procedimiento,$this->consulta);\n\t\t\t$this->respuesta->setDatos($respuesta);\n\t\t} \n\t catch (Exception $e) {\t\t\t\n\t\t \t$link->rollBack();\n\t\t\t\t$this->respuesta=new Mensaje();\n\t\t\t\tif ($e->getCode() == 3) {//es un error de un procedimiento almacenado de pxp\n\t\t\t\t\t$this->respuesta->setMensaje($resp_procedimiento['tipo_respuesta'],$this->nombre_archivo,$resp_procedimiento['mensaje'],$resp_procedimiento['mensaje_tec'],'base',$this->procedimiento,$this->transaccion,$this->tipo_procedimiento,$this->consulta);\n\t\t\t\t} else if ($e->getCode() == 2) {//es un error en bd de una consulta\n\t\t\t\t\t$this->respuesta->setMensaje('ERROR',$this->nombre_archivo,$e->getMessage(),$e->getMessage(),'modelo','','','','');\n\t\t\t\t} else {//es un error lanzado con throw exception\n\t\t\t\t\tthrow new Exception($e->getMessage(), 2);\n\t\t\t\t}\n\t\t\t\t\n\t\t} \n\t \n\t return $this->respuesta;\n\t}", "title": "" }, { "docid": "0bb98514d6b4a5d89ef2baa8d5ce440a", "score": "0.4743687", "text": "public function getFkTcmbaObraFiscais()\n {\n return $this->fkTcmbaObraFiscais;\n }", "title": "" }, { "docid": "6c3d8fdf9c83ec4be567653db091f9c0", "score": "0.4740337", "text": "public function atualizarDadosEscolaridade($oLinha) {\n\n $oDaoRechumano = new cl_rechumano();\n if (isset($oLinha->escolaridade) && !empty($oLinha->escolaridade)) {\n $oDaoRechumano->ed20_i_escolaridade = $oLinha->escolaridade;\n }\n\n $oDaoRechumano->ed20_i_codigo = $this->iCodigoDocente;\n $oDaoRechumano->alterar($oDaoRechumano->ed20_i_codigo);\n\n if ($oDaoRechumano->erro_status == '0') {\n throw new Exception(\"Erro na alteração dos dados de endereço do Recurso Humano. Erro da classe: \".$oDaoRechumano->erro_msg);\n }\n $oDaoCursoFormacao = new cl_cursoformacao();\n $oDaoFormacao = new cl_formacao();\n $oDaoFormacao->excluir(null,\"ed27_i_rechumano = {$this->iCodigoDocente}\");\n $aFormacao = array();\n for ($i = 1; $i <= 3; $i++) {\n\n if ( isset($oLinha->{\"situacao_curso_superior_$i\"}) && isset($oLinha->{\"formacao_complementacao_pedagogica_$i\"})\n && isset($oLinha->{\"codigo_curso_superior_$i\"}) && isset($oLinha->{\"ano_inicio_curso_superior_$i\"})\n && isset($oLinha->{\"ano_conclusao_curso_superior_$i\"}) && isset($oLinha->{\"tipo_instituicao_curso_superior_$i\"})\n && isset($oLinha->{\"instituicao_curso_superior_$i\"})) {\n\n $aFormacao[] = array(trim($oLinha->{\"situacao_curso_superior_$i\"}),\n trim($oLinha->{\"formacao_complementacao_pedagogica_$i\"}),\n trim($oLinha->{\"codigo_curso_superior_$i\"}),\n trim($oLinha->{\"ano_inicio_curso_superior_$i\"}),\n trim($oLinha->{\"ano_conclusao_curso_superior_$i\"}),\n trim($oLinha->{\"tipo_instituicao_curso_superior_$i\"}),\n trim($oLinha->{\"instituicao_curso_superior_$i\"})\n );\n }\n }\n\n /**\n * Inclui os cursos do Recurso Humano (Aba Formação)\n */\n foreach ($aFormacao as $iFormacao => $aFormacaoDecente) {\n\n if ( empty($aFormacaoDecente[2]) ) {\n continue;\n }\n\n $sWhereCursoFormacao = \"ed94_c_codigocenso = '\".$aFormacaoDecente[2].\"'\";\n $sSqlCursoFormacao = $oDaoCursoFormacao->sql_query(\"\", \"*\", \"\", $sWhereCursoFormacao);\n $rsCursoFormacao = $oDaoCursoFormacao->sql_record($sSqlCursoFormacao);\n\n if ($oDaoCursoFormacao->numrows > 0) {\n\n if ($aFormacaoDecente[0] != null) {\n\n $oDaoFormacao->ed27_i_rechumano = $this->iCodigoDocente;\n $oDaoFormacao->ed27_i_cursoformacao = db_utils::fieldsmemory($rsCursoFormacao, 0)->ed94_i_codigo;\n $oDaoFormacao->ed27_c_situacao = 'CON';\n $oDaoFormacao->ed27_i_licenciatura = (isset($aFormacaoDecente[0]) ? $aFormacaoDecente[0] : '');\n $oDaoFormacao->ed27_i_anoconclusao = (isset($aFormacaoDecente[4]) ? $aFormacaoDecente[4] : '');\n $oDaoFormacao->ed27_i_censosuperior = (isset($aFormacaoDecente[5]) ? $aFormacaoDecente[5] : '');\n $oDaoFormacao->ed27_i_censoinstsuperior = (isset($aFormacaoDecente[6]) ? $aFormacaoDecente[6] : '');\n $oDaoFormacao->incluir(null);\n if ($oDaoFormacao->erro_status == '0') {\n\n throw new Exception(\"Erro na alteração dos dados da Formação do professor. Erro da classe: \".\n $oDaoFormacao->erro_msg\n );\n\n }\n }\n }\n }\n }", "title": "" }, { "docid": "15a30651198348086c9466fdee24f5e6", "score": "0.47340512", "text": "public function __construct($proposta)\n {\n $this->proposta = $proposta;\n $this->obra = Obra::where('Proposta_cod_proposta', '=', $this->proposta->cod_proposta)->first();\n $this->propositor = Pessoa::join('Usuario', 'Usuario.Pessoa_cod_pessoa', '=', 'Pessoa.cod_pessoa')\n ->join('Usuario_Propositor', 'Usuario_Propositor.Usuario_cod_usuario', '=', 'Usuario.cod_usuario')\n ->where('Usuario_Propositor.cod_propositor', '=', $this->proposta->Usuario_Propositor_cod_propositor)\n ->select('Pessoa.*')\n ->first();\n }", "title": "" }, { "docid": "359c7580850ecc80f389fc47ec4dfd33", "score": "0.4727379", "text": "public function getProduto()\n {\n return $this->hasOne(Produto::className(), ['id' => 'id_produto']);\n }", "title": "" }, { "docid": "fc9aef5c681d64d2624f4dc18749b0bc", "score": "0.47249556", "text": "public function actionBuscarParroquias() {\n $Selected = isset($_GET['parroquia']) ? $_GET['parroquia'] : '';\n if (!empty($_POST[\"VswBusquedaAvanzada\"][\"cod_estado\"])) {\n $criteria = new CDbCriteria;\n $criteria->addCondition('t.clvmunicipio = :clvmunicipio');\n $criteria->params = array(':clvmunicipio' => $_POST[\"VswBusquedaAvanzada\"][\"cod_estado\"]);\n //$criteria->order = 't.parroquia ASC';\n $criteria->select = 'clvcodigo, strdescripcion';\n $data = CHtml::listData(Tblparroquia::model()->findAll($criteria), 'clvcodigo', 'strdescripcion');\n //var_dump($data);die;\n\n echo CHtml::tag('option', array('value' => ''), CHtml::encode('SELECCIONE'), true);\n foreach ($data as $id => $value) {\n if ($Selected == $id) {\n echo CHtml::tag('option', array('value' => $id, 'selected' => true), CHtml::encode($value), true);\n } else {\n echo CHtml::tag('option', array('value' => $id), CHtml::encode($value), true);\n }\n }\n } else {\n echo CHtml::tag('option', array('value' => ''), CHtml::encode('SELECCIONE'), true);\n }\n }", "title": "" }, { "docid": "0f2855db4a2ec41eceb429881c0978cf", "score": "0.4722579", "text": "public function comboplato()\n {\n return $this->belongsTo('App\\ComboPlatos', 'comboplatos_id');\n }", "title": "" }, { "docid": "0a39f059f3c690bbc1d3dc9529c87a95", "score": "0.47191536", "text": "public function getFkTcernObraContratos1()\n {\n return $this->fkTcernObraContratos1;\n }", "title": "" }, { "docid": "efbd931156a87b01ebe01c12172b79d9", "score": "0.47164115", "text": "public function cobacoba()\n {\n // $coba = Pesertas::find(1);\n // $kelas = new Kelas(array('nama_kelas'=>'Sembarang'));\n //\n // $coba->kelass()->save($kelas);\n\n $peserta = Pesertas::find(2);\n // save satu-satu\n $kelas = Kelas::find(1);\n\n $kelasIds = [5];\n\n dd($peserta->kelass()->sync($kelasIds));\n\n\n\n // saveMany = langsung banyak pake array\n// $kelasbanyak = [\n// Kelas::find(1),\n// Kelas::find(2),\n// Kelas::find(3),\n// ];\n // metode lempar object\n //$peserta->kelass()->save($kelas);\n // metode attach\n //$peserta->kelass()->attach([3,4]);\n\n // metode detach (kebalikanya attach)\n //$peserta->kelass()->detach([1,2,3]);\n// if($peserta->kelass->contains($kelasbanyak))\n// {\n// dd('sudah ada! - di kelas banyak.');\n//\n// } else\n// {\n// // saveMany\n// $peserta->kelass()->saveMany($kelasbanyak);\n// dd('baru ditambhakan - di kalas banyak');\n// }\n//\n// // cek apakah sudah ada dengan \"contains\"\n// if($peserta->kelass->contains($kelas))\n// {\n// dd('sudah ada! - di kelas tunggal');\n// } else\n// {\n// $peserta->kelass()->save($kelas);\n// dd('baru ditambhakan');\n// }\n// dd($peserta);\n\n\n return view('du.coba')->withPeserta($peserta)->withKelas($kelas);\n }", "title": "" }, { "docid": "2cda2b03aa8dea7f259d63dd02e0445f", "score": "0.47151813", "text": "public function getFkPontoEscalaContrato()\n {\n return $this->fkPontoEscalaContrato;\n }", "title": "" }, { "docid": "129aad2c75d0f2024a13f38c5138d6af", "score": "0.47151482", "text": "public function testSetSelAvLstPersoCopieColonne() {\n\n $obj = new Constantes2();\n\n $obj->setSelAvLstPersoCopieColonne(true);\n $this->assertEquals(true, $obj->getSelAvLstPersoCopieColonne());\n }", "title": "" }, { "docid": "2c2703437478cfbd82246fd6ff0f6cc7", "score": "0.4714911", "text": "public function getFkTcmgoDividaConsolidadas()\n {\n return $this->fkTcmgoDividaConsolidadas;\n }", "title": "" }, { "docid": "a6c11fdae99167923fda0197e762f812", "score": "0.4714046", "text": "public function setPesertaDidiksRelatedByPekerjaanIdAyah(PropelCollection $pesertaDidiksRelatedByPekerjaanIdAyah, PropelPDO $con = null)\n {\n $pesertaDidiksRelatedByPekerjaanIdAyahToDelete = $this->getPesertaDidiksRelatedByPekerjaanIdAyah(new Criteria(), $con)->diff($pesertaDidiksRelatedByPekerjaanIdAyah);\n\n $this->pesertaDidiksRelatedByPekerjaanIdAyahScheduledForDeletion = unserialize(serialize($pesertaDidiksRelatedByPekerjaanIdAyahToDelete));\n\n foreach ($pesertaDidiksRelatedByPekerjaanIdAyahToDelete as $pesertaDidikRelatedByPekerjaanIdAyahRemoved) {\n $pesertaDidikRelatedByPekerjaanIdAyahRemoved->setPekerjaanRelatedByPekerjaanIdAyah(null);\n }\n\n $this->collPesertaDidiksRelatedByPekerjaanIdAyah = null;\n foreach ($pesertaDidiksRelatedByPekerjaanIdAyah as $pesertaDidikRelatedByPekerjaanIdAyah) {\n $this->addPesertaDidikRelatedByPekerjaanIdAyah($pesertaDidikRelatedByPekerjaanIdAyah);\n }\n\n $this->collPesertaDidiksRelatedByPekerjaanIdAyah = $pesertaDidiksRelatedByPekerjaanIdAyah;\n $this->collPesertaDidiksRelatedByPekerjaanIdAyahPartial = false;\n\n return $this;\n }", "title": "" }, { "docid": "e634ad2fe95c15903fcee802b653ba15", "score": "0.4712313", "text": "function select($parametro,$modo){\n\n $empresa = new empresa();\n try{\n if($modo==1){\n $stmte = $this->pdo->prepare(\"SELECT *\n FROM tb_empresa\n WHERE emp_nome LIKE :parametro\");\n $stmte->bindParam(\":parametro\", $parametro . \"%\" , PDO::PARAM_STR);\n }elseif ($modo==2) {\n $stmte = $this->pdo->prepare(\"SELECT *\n FROM tb_empresa\n WHERE emp_pk_id = :parametro\");\n $stmte->bindParam(\":parametro\", $parametro , PDO::PARAM_INT);\n }\n if($stmte->execute()){\n if($stmte->rowCount() > 0){\n while($result = $stmte->fetch(PDO::FETCH_OBJ)){\n $empresa->setPkId($result->emp_pk_id);\n $empresa->setNome($result->emp_nome);\n $empresa->setDescricao($result->emp_descricao);\n $empresa->setHistoria($result->emp_historia);\n $empresa->setEndereco($result->emp_endereco);\n $empresa->setBairro($result->emp_bairro);\n $empresa->setCidade($result->emp_cidade);\n $empresa->setEstado($result->emp_estado);\n $empresa->setCep($result->emp_cep);\n $empresa->setFone($result->emp_fone);\n $empresa->setWhats($result->emp_whats);\n $empresa->setEmail($result->emp_email);\n $empresa->setFacebook($result->emp_facebook);\n $empresa->setInstagram($result->emp_instagram);\n $empresa->setPinterest($result->emp_pinterest);\n $empresa->setFoto($result->emp_foto);\n $empresa->setTxtDiasSemana($result->emp_txt_dias_semana);\n $empresa->setTxtHorarioSemana($result->emp_txt_horario_semana);\n $empresa->setTxtDiasFimSemana($result->emp_txt_dias_fim_semana);\n $empresa->setTxtHorarioFimSemana($result->emp_txt_horario_fim_semana);\n $empresa->setArrDiasSemana($result->emp_arr_dias_semana);\n $empresa->setArrHorariosInicio($result->emp_arr_horarios_inicio);\n $empresa->setArrHorariosFinal($result->emp_arr_horarios_final);\n $empresa->setAberto($result->emp_aberto);\n $empresa->setEntregando($result->emp_entregando);\n $empresa->setTaxaConversaoFidelidade($result->emp_taxa_conversao_fidelidade);\n }\n }\n }\n return $empresa;\n }\n catch(PDOException $e){\n echo $e->getMessage();\n }\n }", "title": "" }, { "docid": "e31557d8026f05d4229d108aa00572d9", "score": "0.4706872", "text": "public function actionSetDropdownStatushubungankeluarga()\n {\n if(Yii::app()->getRequest()->getIsAjaxRequest()) {\n\t\t\t\t$penjamin_id = $_POST['penjamin_id'];\n $modAsuransiPasienBadak = new PPAsuransipasienbadakM();\n $option = CHtml::tag('option',array('value'=>''),CHtml::encode('-- Pilih --'),true);\n if(!empty($penjamin_id)){\n\t\t\t\t\t$data = $modAsuransiPasienBadak->getDropdownStatushubungankeluarga($penjamin_id);\n $data = CHtml::listData($data,'lookup_value', 'lookup_name');\n foreach($data as $value=>$name){\n $option .= CHtml::tag('option',array('value'=>$value),CHtml::encode($name),true);\n }\n } \n $dataList['statushubungankeluarga'] = $option;\n echo json_encode($dataList);\n Yii::app()->end();\n }\n }", "title": "" }, { "docid": "e7d2e299c0a55bfe00fc86f35ba1e232", "score": "0.4706789", "text": "public function actionBuscarMunicipios() {\n /* var_dump($_POST[\"VswBusquedaAvanzada\"][\"cod_estado\"]);die();\n $Id = (isset($_POST['Tblestado']['clvcodigo']) ? $_POST['Tblestado']['clvcodigo'] : $_GET['clvcodigo']);\n */\n $Selected = isset($_GET['municipio']) ? $_GET['municipio'] : '';\n\n if (!empty($_POST[\"VswBusquedaAvanzada\"][\"cod_estado\"])) {\n $criteria = new CDbCriteria;\n $criteria->addCondition('t.clvestado = :clvestado');\n $criteria->params = array(':clvestado' => $_POST[\"VswBusquedaAvanzada\"][\"cod_estado\"]);\n $criteria->order = 't.strdescripcion ASC';\n $criteria->select = 'clvcodigo, strdescripcion';\n\n $data = CHtml::listData(Tblmunicipio::model()->findAll($criteria), 'clvcodigo', 'strdescripcion');\n echo CHtml::tag('option', array('value' => ''), CHtml::encode('SELECCIONE'), true);\n foreach ($data as $id => $value) {\n if ($Selected == $id) {\n echo CHtml::tag('option', array('value' => $id, 'selected' => true), CHtml::encode($value), true);\n } else {\n echo CHtml::tag('option', array('value' => $id), CHtml::encode($value), true);\n }\n }\n } else {\n echo CHtml::tag('option', array('value' => ''), CHtml::encode('SELECCIONE'), true);\n }\n }", "title": "" }, { "docid": "2b900565af10c5ae08bb8ccfdc3cdf71", "score": "0.470424", "text": "public function fetch()\r\n {\r\n if (!empty($this->pesquisa[\"pesq_aluno\"])) {\r\n $this->pesquisa[\"pesq_codigo\"] = $this->pesquisa[\"pesq_aluno\"];\r\n }\r\n\r\n // as propriedades ja estarão mapeadas, mas eu ainda precisarei das nao mapeadas\r\n parent::fetch();\r\n\r\n $i = 0;\r\n if (!empty($this->dados_educacional)) {\r\n foreach ($this->dados_educacional as $r) {\r\n $item = new EducacionalAlunoETT();\r\n $item->bolsa = $r->BOLSA;\r\n $item->data_adesao = $r->DATAADESAO;\r\n $item->sexo = $r->SEXO;\r\n $item->naturalidade = $r->NATURALIDADE;\r\n $item->profissao = $r->PROFISSAO;\r\n $item->etnia = $r->ETNIA;\r\n $item->escolaridade = $r->ESCOLARIDADE;\r\n $item->especializacao = $r->ESPECIALIZACAO;\r\n $item->religiao = $r->RELIGIAO;\r\n $item->tipo_sanguineo = $r->TIPOSANGUINEO;\r\n $item->matricula = left(converteDataSqlOrdenada($item->data_adesao), 4) . \"/\" . insereZeros($item->handle, 6);\r\n $item->idade = !empty($r->NASCIMENTO) ? intval(abs(diasAtraso($r->NASCIMENTO)) / 365.25) : \"\"; // isso não será day-accurate relacionado a anos bissextos\r\n $item->tipo_transtorno = $r->TIPOTRANSTORNO;\r\n\r\n /* buscas extra do educacional\r\n * notar que os relatórios do educacional já ficarão super mal-otimizados por conta disso!\r\n * pensar em paliativos depois\r\n */\r\n $vinculo = new PessoaVinculoGUI();\r\n $vinculo->top = \"TOP 10\";\r\n $vinculo->pessoa = $item->handle;\r\n $vinculo->pesquisa[\"pesq_responsavel\"] = 1;\r\n $vinculo->fetch();\r\n $vinculo = $vinculo->itens[0];\r\n\r\n $matricula = new EducacionalMatriculaGUI();\r\n $matricula->top = \"TOP 10\";\r\n $matricula->pesquisa[\"pesq_aluno\"] = $item->handle;\r\n $matricula->pesquisa[\"pesq_vigente\"] = \"S\";\r\n $matricula->pesquisa[\"pesq_ativo\"] = 1;\r\n $matricula->fetch();\r\n $matricula = $matricula->itens[0];\r\n\r\n $item->responsavel = $vinculo->pai;\r\n $item->turma = $matricula->turma;\r\n $item->cod_turma = $matricula->cod_turma;\r\n $item->turno = $matricula->turno;\r\n\r\n // campos de especificação livre (JSON)\r\n $item->dados_censo = json_decode($r->DADOSCENSO, true); // array associativo\r\n if (is_array($item->dados_censo)) { // evita warning se dados estiverem vazios\r\n $item->dados_censo = array_map(\"utf8_decode\", $item->dados_censo);\r\n } else {\r\n $item->dados_censo = array(); // just in case\r\n }\r\n\r\n // especificação livre da ficha médica\r\n if ($this->ficha_medica) {\r\n $json_transtornos = json_decode($r->TRANSTORNOSJSON, true);\r\n $item->lista_transtornos = \"\";\r\n\r\n if (is_array($json_transtornos)) { // evita warning se dados estiverem vazios\r\n foreach ($json_transtornos as $key => $value) {\r\n $key = str_replace(\"_\", \" \", utf8_decode($key));\r\n\r\n if ($value == \"S\") {\r\n if (!empty($item->lista_transtornos)) $item->lista_transtornos .= \", \";\r\n $item->lista_transtornos .= $key;\r\n }\r\n }\r\n }\r\n\r\n $json_avaliacao = json_decode($r->AVALIACAO, true);\r\n $item->lista_avaliacao = \"\";\r\n\r\n if (is_array($json_avaliacao)) { // evita warning se dados estiverem vazios\r\n foreach ($json_avaliacao as $key => $value) {\r\n $key = str_replace(\"_\", \" \", utf8_decode($key));\r\n\r\n if ($value == \"S\") {\r\n if (!empty($item->lista_avaliacao)) $item->lista_avaliacao .= \", \";\r\n $item->lista_avaliacao .= $key;\r\n }\r\n }\r\n }\r\n }\r\n\r\n $i++;\r\n }\r\n }\r\n }", "title": "" }, { "docid": "9151e51819c8aeab9a35b49498b2ef9b", "score": "0.47020385", "text": "public function especialidad(){\r\n\t\tparent::conectaBDMy();\t \r\n\t\t$this->idespecialidad=\"\";\t\t\r\n\t\t$this->nom=\"\";\t\t\r\n\t}", "title": "" }, { "docid": "5b5e8ce917d52723455c298d7470aff6", "score": "0.47001955", "text": "public function ValoresParametros($parametros){\n //print_r($parametros);\n $js = $combo=$primera_opcion='';\n $primera_opcion= '<option value=\"\">--Seleccione--</option>';\n\n $combo.='<input name=\"id_persona_'.$parametros[id_req_item].'\" id=\"id_persona_'.$parametros[id_req_item].'\" type=\"hidden\" value=\"'.$parametros[id_persona].'\"/>';//id tipo persona de cada formulario escogido\nif($parametros[condicion]==1){//1. requisito tipo listado y no aplica vigencia - solo combo\n /********** consulta de valores del parametro seleccionado*********/\n$sql_valores=\"SELECT id,descripcion FROM mos_documentos_formulario_items where fk_id_unico=\".$parametros[id_combo];\n\n\nif($parametros[nuevo]!=0){// es edicion. debe salir marcada la opcion seleccionada\n $sql_param_select=\"SELECT id, descripcion FROM mos_documentos_formulario_items\nWHERE fk_id_unico IN (SELECT id_unico FROM mos_documentos_datos_formulario\nWHERE IDDoc = \".$parametros[id_form].\" AND tipo IN ( 9 )) \nAND id IN (SELECT id_parametro_items FROM mos_requisitos_parametros_index WHERE id_requisitos_formularios =\".$parametros[nuevo].\" and id_parametro_items<>'NULL')\";//obtener opcion marcada\n \n $res_primera_opcion = $this->dbl->query($sql_param_select, array());\n $completar_consulta_combo=' and id<>'.$res_primera_opcion[0][id];\n $primera_opcion='<option selected value=\"'.$res_primera_opcion[0][id].'\">'.$res_primera_opcion[0][descripcion].'</option>'; \n\n$sql_valores=\"SELECT id, descripcion\nFROM mos_documentos_formulario_items\nWHERE fk_id_unico IN (SELECT id_unico FROM mos_documentos_datos_formulario\nWHERE IDDoc = \".$parametros[id_form].\" AND tipo IN ( 9 ))\". $completar_consulta_combo;\n }\n\n$valores_index = $this->dbl->query($sql_valores, array());\n $combo .='<select id=\"valores_'.$parametros[id_req_item].'\" name=\"valores_'.$parametros[id_req_item].'\" class=\"form-control\" data-validation=\"required\">';\n\n $combo.=$primera_opcion;\n for($i=0;$i<count($valores_index);$i++){\n $combo .='<option value=\"'.$valores_index[$i][id].'\">'.$valores_index[$i][descripcion].'</option>';\n }\n \n $combo .='</select>';\n $combo .='<input name=\"id_combo_'.$parametros[id_req_item].'\" id=\"id_combo_'.$parametros[id_req_item].'\" type=\"hidden\" value=\"'.$parametros[id_combo].'\"/>';\n $combo .='<input name=\"id_vigencia_'.$parametros[id_req_item].'\" id=\"id_vigencia_'.$parametros[id_req_item].'\" type=\"hidden\" value=\"NULL\"/>'; \n if($parametros[nuevo]!=0){\n return $combo;//si se va editar y aparezca el seleccionado\n}\n\n}\n\nif($parametros[condicion]==2){//2. requisito tipo listado y aplica vigencia - combo y vigencia\n $sql_valores=\"SELECT id,descripcion FROM mos_documentos_formulario_items where fk_id_unico=\".$parametros[id_combo];\n\nif($parametros[nuevo]!=0){// es edicion. debe salir marcada la opcion seleccionada\n $sql_param_select=\"SELECT id, descripcion FROM mos_documentos_formulario_items\nWHERE fk_id_unico IN (SELECT id_unico FROM mos_documentos_datos_formulario\nWHERE IDDoc = \".$parametros[id_form].\" AND tipo IN ( 9 )) \nAND id IN (SELECT id_parametro_items FROM mos_requisitos_parametros_index WHERE id_requisitos_formularios =\".$parametros[nuevo].\" and id_parametro_items<>'NULL')\";//obtener opcion marcada\n \n $res_primera_opcion = $this->dbl->query($sql_param_select, array());\n $completar_consulta_combo=' and id<>'.$res_primera_opcion[0][id];\n $primera_opcion='<option selected value=\"'.$res_primera_opcion[0][id].'\">'.$res_primera_opcion[0][descripcion].'</option>'; \n\n$sql_valores=\"SELECT id, descripcion\nFROM mos_documentos_formulario_items\nWHERE fk_id_unico IN (SELECT id_unico FROM mos_documentos_datos_formulario\nWHERE IDDoc = \".$parametros[id_form].\" AND tipo IN ( 9 ))\". $completar_consulta_combo;\n }\n /********** consulta de valores del parametro seleccionado*********/\n\n$valores_index = $this->dbl->query($sql_valores, array());\n$combo .='<select id=\"valores_'.$parametros[id_req_item].'\" name=\"valores_'.$parametros[id_req_item].'\" class=\"form-control\" data-validation=\"required\">';\n\n\n $combo.=$primera_opcion;\n for($i=0;$i<count($valores_index);$i++){\n $combo .='<option value=\"'.$valores_index[$i][id].'\">'.$valores_index[$i][descripcion].'</option>';\n }\n \n $combo .='</select>'; \n $combo.='<input name=\"id_combo_'.$parametros[id_req_item].'\" id=\"id_combo_'.$parametros[id_req_item].'\" type=\"hidden\" value=\"'.$parametros[id_combo].'\"/>';\n $combo.='<input name=\"id_vigencia_'.$parametros[id_req_item].'\" id=\"id_vigencia_'.$parametros[id_req_item].'\" type=\"hidden\" value=\"'.$parametros[id_vigencia].'\"/>';\n if($parametros[nuevo]!=0){\n return $combo;//si se va editar y aparezca el seleccionado\n}\n \n\n}\nif($parametros[condicion]==3){//3. no aplica ni vigencia ni combo\n$combo.='<input name=\"id_vigencia_'.$parametros[id_req_item].'\" id=\"id_vigencia_'.$parametros[id_req_item].'\" type=\"hidden\" value=\"NULL\"/>';\n $combo.='<input name=\"id_combo_'.$parametros[id_req_item].'\" id=\"id_combo_'.$parametros[id_req_item].'\" type=\"hidden\" value=\"NULL\"/>';\n if($parametros[nuevo]!=0){\n // echo \"aquiiiiiiiiiii\";\n return $combo;//si se va editar y aparezca el seleccionado\n}\n\n}\nif($parametros[condicion]==4){//4. requisito tipo unico y aplica vigencia -aplica vigencia\n $combo.='<input name=\"id_vigencia_'.$parametros[id_req_item].'\" id=\"id_vigencia_'.$parametros[id_req_item].'\" type=\"hidden\" value=\"'.$parametros[id_vigencia].'\"/>';\n $combo.='<input name=\"id_combo_'.$parametros[id_req_item].'\" id=\"id_combo_'.$parametros[id_req_item].'\" type=\"hidden\" value=\"NULL\"/>'; \n if($parametros[nuevo]!=0){\n // echo \"aquiiiiiiiiiii\";\n return $combo;//si se va editar y aparezca el seleccionado\n}\n}\n \n$js=\"$('#valores_form_'+\".$parametros[id_req_item].\").show()\";\n $objResponse = new xajaxResponse(); \n //echo $combo;\n $objResponse->addAssign('valores_form_'.$parametros[id_req_item],\"innerHTML\",$combo);\n $objResponse->addScript(\"$('#valores_\".$parametros[id_req_item].\"').selectpicker({\n style: 'btn-combo'\n });\");\n $objResponse->addScript(\"$js\");\n\n return $objResponse;\n\n //echo $sql; \n }", "title": "" }, { "docid": "5207675e6b7df9cc52342b388fadd630", "score": "0.46969625", "text": "public function set_empleado($cod_epl){\r\t\r\t\t$this->cod_epl=$cod_epl;\r\t\r\t}", "title": "" }, { "docid": "4034e11e263c5ac0b25cf2165222366e", "score": "0.46937144", "text": "public function Comboparametros($parametros){\n //print_r($parametros);\n $js = $combo=$completar_consulta=$primera_opcion_combo=$primera_opcion_vigencia='';\n\n $completar_consulta_combo=$completar_consulta_vigencia=''; \n/************ id del tipo persona del formulario seleccionado***/\n$sql_parametros_persona=\"select id_unico, Nombre,tipo\nfrom mos_documentos_datos_formulario where IDDoc = \".$parametros[id_form].\" and tipo in (6)\";//tipo persona\n\n\n$parametros_index_persona = $this->dbl->query($sql_parametros_persona, array());\n$id_tipo_persona=$parametros_index_persona[0][id_unico];\n//$id_tipo_persona=1;//mientras para probar\n$combo='<input type=\"hidden\" id=\"id_persona_'.$parametros[id_req_item].'\" name=\"id_persona_'.$parametros[id_req_item].'\" value=\"'.$id_tipo_persona.'\"/>'; \n/********** consulta de parametros del formulario seleccionado*********/\n$grupo1=$grupo2='';\nif(($parametros[tipo_req]=='Listado') && ($parametros[vigencia_req]=='N')){//1. requisito tipo listado y no aplica vigencia\n $primera_opcion_combo='<option value=\"\">--Seleccione--</option>'; \n if($parametros[nuevo]!=0){// es edicion. debe salir marcada la opcion seleccionada\n //combo\n $sql_param_select=\"SELECT id_unico, Nombre FROM mos_documentos_datos_formulario WHERE IDDoc =\".$parametros[id_form].\" AND tipo IN ( 9 ) AND id_unico IN (SELECT id_parametro_formulario FROM mos_requisitos_parametros_index WHERE id_requisitos_formularios =\".$parametros[nuevo].\")\";//obtener opcion marcada\n $res_primera_opcion = $this->dbl->query($sql_param_select, array());\n $completar_consulta_combo=' and id_unico<>'.$res_primera_opcion[0][id_unico];\n $primera_opcion_combo='<option selected value=\"'.$res_primera_opcion[0][id_unico].'\">'.$res_primera_opcion[0][Nombre].'</option>'; \n\n }\n $grupo1='Combo';\n $sql_parametros_1=\"select id_unico, Nombre from mos_documentos_datos_formulario \nwhere IDDoc =\".$parametros[id_form].\" and tipo in (9) \".$completar_consulta_combo;//tipo combo\n$parametros_index_1 = $this->dbl->query($sql_parametros_1, array());\n\n //echo $sql; \n$combo .='<select id=\"parametro_'.$parametros[id_req_item].'\" name=\"parametro_'.$parametros[id_req_item].'\" class=\"form-control\" data-validation=\"required\" onchange=\"CargaValoresParametros(this,'.$parametros[id_form].','.$parametros[id_req_item].','.$id_tipo_persona.',1)\">';\n\n $combo.=$primera_opcion_combo; \nfor($i=0;$i<count($parametros_index_1);$i++){\n $combo .='<option value=\"'.$parametros_index_1[$i][id_unico].'\">'.$parametros_index_1[$i][Nombre].'</option>';\n }\n\n$combo .='</select>';\nif($parametros[nuevo]!=0){\n $datos[id_persona]=$id_tipo_persona;\n$datos[id_combo]=$res_primera_opcion[0][id_unico];\n$datos[id_vigencia]=NULL;\n return array($combo,$datos);//si se va editar y aparezca el seleccionado\n}\n}\nif(($parametros[tipo_req]=='Listado') && ($parametros[vigencia_req]=='S')){//2. requisito tipo listado y aplica vigencia\n if($parametros[nuevo]!=0){// es edicion. debe salir marcada la opcion seleccionada\n //combo\n $sql_param_select=\"SELECT id_unico, Nombre FROM mos_documentos_datos_formulario WHERE IDDoc =\".$parametros[id_form].\" AND tipo IN ( 9 ) AND id_unico IN (SELECT id_parametro_formulario FROM mos_requisitos_parametros_index WHERE id_requisitos_formularios =\".$parametros[nuevo].\")\";//obtener opcion marcada\n $res_primera_opcion = $this->dbl->query($sql_param_select, array());\n $completar_consulta_combo=' and id_unico<>'.$res_primera_opcion[0][id_unico];\n $datos[id_combo]=$res_primera_opcion[0][id_unico];\n $primera_opcion_combo='<option selected value=\"'.$res_primera_opcion[0][id_unico].'\">'.$res_primera_opcion[0][Nombre].'</option>'; \n //vigencia\n $sql_param_select=\"select id_unico, Nombre\nfrom mos_documentos_datos_formulario where IDDoc=\".$parametros[id_form].\" and tipo in (13) AND id_unico IN (SELECT id_parametro_formulario FROM mos_requisitos_parametros_index WHERE id_requisitos_formularios =\".$parametros[nuevo].\")\";//obtener opcion marcada\n $res_primera_opcion = $this->dbl->query($sql_param_select, array());\n $completar_consulta_vigencia=' and id_unico<>'.$res_primera_opcion[0][id_unico];\n $datos[id_vigencia]=$res_primera_opcion[0][id_unico];\n $primera_opcion_vigencia='<option selected value=\"'.$res_primera_opcion[0][id_unico].'\">'.$res_primera_opcion[0][Nombre].'</option>';\n\n }\n $grupo1='Combo';\n $sql_parametros_1=\"select id_unico, Nombre from mos_documentos_datos_formulario \nwhere IDDoc =\".$parametros[id_form].\" and tipo in (9) \".$completar_consulta_combo;//tipo combo\n\n$grupo2='Vigencia';\n$sql_parametros_2=\"select id_unico, Nombre\nfrom mos_documentos_datos_formulario where IDDoc=\".$parametros[id_form].\" and tipo in (13) \".$completar_consulta_vigencia;//tipo vigencia \n\n\n$parametros_index_1 = $this->dbl->query($sql_parametros_1, array());\n$parametros_index_2 = $this->dbl->query($sql_parametros_2, array());\n\n //echo $sql; \n$combo .='<select id=\"parametro_'.$parametros[id_req_item].'\" name=\"parametro_'.$parametros[id_req_item].'\" class=\"selectpicker\" class=\"form-control\" data-validation=\"required\" onChange=\"CargaValoresParametros(this,'.$parametros[id_form].','.$parametros[id_req_item].','.$id_tipo_persona.',2)\" multiple>';\n\n $combo .='<optgroup label=\"'.$grupo1.'\" data-max-options=\"1\">';\n $combo .=$primera_opcion_combo;\n for($i=0;$i<count($parametros_index_1);$i++){\n $combo .='<option value=\"'.$parametros_index_1[$i][id_unico].'\">'.$parametros_index_1[$i][Nombre].'</option>';\n }\n $combo .='</optgroup>';\n $combo .='<optgroup label=\"'.$grupo2.'\" data-max-options=\"1\">';\n $combo .=$primera_opcion_vigencia;\n for($j=0;$j<count($parametros_index_2);$j++){\n $combo .='<option value=\"'.$parametros_index_2[$j][id_unico].'\">'.$parametros_index_2[$j][Nombre].'</option>';\n }\n $combo .='</optgroup>';\n$combo .='</select>';\nif($parametros[nuevo]!=0){\n $datos[id_persona]=$id_tipo_persona;\n return array($combo,$datos);//si se va editar y aparezca el seleccionado\n}\n}\nif(($parametros[tipo_req]=='Unico') && ($parametros[vigencia_req]=='N')){//3. requisito tipo unico y no aplica vigencia\n $combo .='<input name=\"id_vigencia_'.$parametros[id_req_item].'\" id=\"id_vigencia_'.$parametros[id_req_item].'\" type=\"hidden\" value=\"NULL\"/>';\n $combo .='<input name=\"id_combo_'.$parametros[id_req_item].'\" id=\"id_combo_'.$parametros[id_req_item].'\" type=\"hidden\" value=\"NULL\"/>';\n if($parametros[nuevo]!=0){\n $datos[id_persona]=$id_tipo_persona;\n $datos[id_combo]=NULL;\n $datos[id_vigencia]=NULL; \n return array($combo,$datos);//si se va editar y aparezca el seleccionado\n }\n\n}\nif(($parametros[tipo_req]=='Unico') && ($parametros[vigencia_req]=='S')){//4. requisito tipo unico y aplica vigencia\n $primera_opcion_vigencia='<option value=\"\">--Seleccione--</option>';\n if($parametros[nuevo]!=0){// es edicion. debe salir marcada la opcion \n //vigencia\n $sql_param_select=\"select id_unico, Nombre\nfrom mos_documentos_datos_formulario where IDDoc=\".$parametros[id_form].\" and tipo in (13) AND id_unico IN (SELECT id_parametro_formulario FROM mos_requisitos_parametros_index WHERE id_requisitos_formularios =\".$parametros[nuevo].\")\";//obtener opcion marcada\n $res_primera_opcion = $this->dbl->query($sql_param_select, array());\n $completar_consulta_vigencia=' and id_unico<>'.$res_primera_opcion[0][id_unico];\n $primera_opcion_vigencia='<option selected value=\"'.$res_primera_opcion[0][id_unico].'\">'.$res_primera_opcion[0][Nombre].'</option>';\n\n}\n $grupo1='Vigencia';\n$sql_parametros_1=\"select id_unico, Nombre,tipo from mos_documentos_datos_formulario \nwhere IDDoc =\".$parametros[id_form].\" and tipo in (13)\".$completar_consulta_vigencia;//tipo vigencia\n\n$parametros_index_1 = $this->dbl->query($sql_parametros_1, array());\n\n$combo .='<select id=\"parametro_'.$parametros[id_req_item].'\" name=\"parametro_'.$parametros[id_req_item].'\" class=\"form-control\" data-validation=\"required\" onChange=\"CargaValoresParametros(this,'.$parametros[id_form].','.$parametros[id_req_item].','.$id_tipo_persona.',4)\">';\n /*$combo.='<option value=\"\">--Seleccione--</option>';\n $combo.='<option value=\"1\">Mustard</option>\n <option value=\"2\">Ketchup</option>\n <option value=\"3\">Relish</option>';\n*/\n $combo .=$primera_opcion_vigencia;\nfor($i=0;$i<count($parametros_index_1);$i++){\n $combo .='<option value=\"'.$parametros_index_1[$i][id_unico].'\">'.$parametros_index_1[$i][Nombre].'</option>';\n }\n\n$combo .='</select>';\nif($parametros[nuevo]!=0){\n $datos[id_persona]=$id_tipo_persona;\n $datos[id_combo]=NULL;\n $datos[id_vigencia]=$res_primera_opcion[0][id_unico];\n return array($combo,$datos);//si se va editar y aparezca el seleccionado\n}\n}\n\n\n//extraer el parametro tipo persona del formulario seleccionado\n\n\n $js=\"$('#combos_form_'+\".$parametros[id_req_item].\").show()\";\n $objResponse = new xajaxResponse(); \n //echo $combo;\n $objResponse->addAssign('combos_form_'.$parametros[id_req_item],\"innerHTML\",$combo);\n $objResponse->addScript(\"$('#parametro_\".$parametros[id_req_item].\"').selectpicker({\n style: 'btn-combo'\n });\");\n $objResponse->addScript(\"$js\");\n return $objResponse;\n }", "title": "" }, { "docid": "6c57c5dafce3130927e5c0e8ca77aced", "score": "0.46902263", "text": "public function getFkIdProjeto()\n {\n return $this->hasOne(Projeto::className(), ['id_projeto' => 'fk_id_projeto']);\n }", "title": "" }, { "docid": "52b73b8aef4e77322da354ee8122f89a", "score": "0.4689837", "text": "public function getFkTcmgoUnidadeResponsaveis1()\n {\n return $this->fkTcmgoUnidadeResponsaveis1;\n }", "title": "" }, { "docid": "4b32ec6fcd3b61f0bf1e3f0232f868c0", "score": "0.46887305", "text": "public function NuevoEquipoContinuidad() {\r\n\t$nuevo = \"SELECT co_equipo_continuidad FROM tr061_equipo_continuidad\r\n\t\tORDER BY co_equipo_continuidad DESC \r\n\t\tLIMIT 1;\";\r\n\t$c = $this->pdo->_query($nuevo);\r\n\t\r\n\t//if(is_object($this->pdo->monitor) && $this->pdo->monitor->notify_select)\r\n\t\t//$this->popNotify(); // Libera posicion reg_padre\r\n\t\t\t\r\n\treturn $c;\r\n }", "title": "" }, { "docid": "e88c4741d274ca700c0658b1ae6d3a95", "score": "0.4685141", "text": "public function setIdEcole($idEcole)\n{\n$this->idEcole = $idEcole;\n\nreturn $this;\n}", "title": "" }, { "docid": "7927c60d92da488dd4cb95861a2a63f5", "score": "0.46850845", "text": "public function selecionar(Persistente $persistente)\n {\n }", "title": "" }, { "docid": "79125229aac636cd49ac6147410d388f", "score": "0.4685079", "text": "public function setEmpresaNombre($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->empresa_nombre !== $v) {\n $this->empresa_nombre = $v;\n $this->modifiedColumns[] = EmpresasPeer::EMPRESA_NOMBRE;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "8972d298d142e245197ac645d0d27342", "score": "0.4684182", "text": "public function setFields() {\n\n //instancia campos do formulário\n $this->blocoCampos = new TSetfields();\n\n if(count($this->obBloco->campos) > 0){\n foreach($this->obBloco->campos as $seq=>$dadosCampo){\n\n //instancia objetos campos\n $setCampo = new TSetCampo();\n $setCampo->setOutControl($dadosCampo->outcontrol);\n $setCampo->setNome($dadosCampo->colunadb);\n $setCampo->setId($dadosCampo->campo);\n $setCampo->setLabel($dadosCampo->label);\n \n $tipoCampo = $setCampo->getTipoCampo($dadosCampo->tpcaseq);\n $setCampo->setTipoDado($tipoCampo->tipodado);\n \n \n\t //Seta descrição do campo FK com pesquisa\n\t if($dadosCampo->ativapesquisa != 0){\n\t \t$setCampo->descPesq = $this->headerForm[TConstantes::HEAD_DADOSFORM][$dadosCampo->campo.'Label'];\n\t }\n \n $setCampo->setCampo($seq, $tipoCampo->tpcadesc, $dadosCampo->seletorJQ);\n $setCampo->setPropriedade('alteravel', $dadosCampo->alteravel);\n $setCampo->setValue($dadosCampo->valorpadrao);\n \n if($dadosCampo->manter == true){\n \t$setCampo->setPropriedade('manter', 'true');\n }else{\n \tif($dadosCampo->tipo != 'TButton'){\n \t\t$setCampo->setPropriedade('view', 'true');\n \t}\n }\n \n // atribui atributo para gravação do objeto [se abilitado]\n if($this->headerForm[TConstantes::FIELD_STATUS] == 'edit'){\n \t\n \tif($dadosCampo->alteravel == '0'){\n \t\t\n \t\t$dadosCampo->ativapesquisa = null;\n \t\t$setCampo->setPropriedade('manter', 'false');\n \t\n \t\n\t\t if($dadosCampo->tipo === 'TRadio' or $dadosCampo->tipo === 'TRadioGroup'){\n\t\t \t$setCampo->setPropriedade('onClick', 'this.blur(); return false;');\n\t\t }else{\n\t\t \t$setCampo->setPropriedade('readonly', '');\n\t\t \t$setCampo->setPropriedade('onfocus', 'this.blur(); return false;');\n\t\t } \n \t}\n }\n\n\n //Aplica mascara nos campos\n if(!empty($dadosCampo->mascara) and $dadosCampo->mascara != \"\" and $dadosCampo->tipo != 'TButton') {\n $setCampo->setPropriedade('onkeypress',\"livemask(this,\".$dadosCampo->mascara.\",this)\");\n $setCampo->setPropriedade('onkeyup',\"livemask(this,\".$dadosCampo->mascara.\",this)\");\n }\n\n //atribui uma propriedade seqao botão para ações associadas\n if($dadosCampo->tipo == 'TButton') {\n $setCampo->setPropriedade(TConstantes::SEQUENCIAL,$this->seq);\n }\n if($dadosCampo->tipo == 'TFrameFile' or $dadosCampo->tipo == 'TVoiceFrameFile' or $dadosCampo->tipo == 'TCsvFrameFile') {\n $setCampo->setPropriedade(TConstantes::SEQUENCIAL,$this->seq);\n $setCampo->setPropriedade('form',$this->formseq);\n }\n\n //atribui PROPRIEDADE DOS CAMPOS\n if(is_array($dadosCampo->props)) {\n foreach($dadosCampo->props as $nProp=>$ObProps) {\n //--- Adiciona propriedades aos campos usando a classe TSetFields\n $setCampo->setPropriedade($ObProps->metodo, $ObProps->valor);\n }\n }\n\n // Injeta campo no conteiner TSetFields\n $obCampo = $setCampo->getCampo();\n $this->blocoCampos->addCampo($dadosCampo->label, $obCampo, $dadosCampo->ativapesquisa);\n\n //borbulha mensagem [help] para o metodo responsavel\n if($dadosCampo->help) {\n $this->blocoCampos->setHelp($seq, $dadosCampo->help);\n }\n\n //configura trigger onload no campo\n if($dadosCampo->trigger) {\n $this->blocoCampos->addTrigger($seq, $dadosCampo->trigger);\n }\n\n }//foreach principal\n }\n\n //compila objtos anexos\n if($this->obAnexo) {\n foreach($this->obAnexo as $obAn) {\n $this->blocoCampos->addObjeto($obAn);\n }\n }\n\n $panel = new TElement('div');\n $panel->id = 'contFields'.$this->blocseq;\n $panel->add($this->blocoCampos->getConteiner());\n\n //============================================================================================\n // compila campo tipo TBloco (listagem aninhada)\n //============================================================================================\n if($this->obBloco->blocos) {\n foreach($this->obBloco->blocos as $bl) {\n\n $panelLista = new TElement('div');\n $panelLista->id = TConstantes::CONTEINER_LISTA.$bl->campo;\n $panelLista->style = 'border:1px solid #999999; padding:4px;';\n\n $nbloco = new TCompLista($bl->campo, TConstantes::CONTEINER_LISTA.$bl->campo);\n $lb = $nbloco->get();\n\n //$listDados = $listObj->getListDados();\n $panelLista->add($lb->getLista());\n\n $panel->add($panelLista);\n }\n }\n\n $this->obKDbo->close();\n\n return $panel; \n }", "title": "" }, { "docid": "138ca7bc2fa787b8f47104dc2f76eadf", "score": "0.46831715", "text": "public function empleado(){\n return $this->hasOne('App\\ModelosBaseDato\\Empleado','legajo','legajo');\n }", "title": "" }, { "docid": "cf58075334d826838b652a239cac2c0e", "score": "0.46827933", "text": "public function clearComunicadosRelatedBySeguradoId()\n\t{\n\t\t$this->collComunicadosRelatedBySeguradoId = null; // important to set this to NULL since that means it is uninitialized\n\t}", "title": "" }, { "docid": "58caf8bfe83eca65840759036a6c239d", "score": "0.4677525", "text": "public function testSetSelAvLstPersoChampsModif() {\n\n $obj = new Constantes2();\n\n $obj->setSelAvLstPersoChampsModif(true);\n $this->assertEquals(true, $obj->getSelAvLstPersoChampsModif());\n }", "title": "" }, { "docid": "1307c08d0176793d68d8bb6bdacfc07c", "score": "0.46771067", "text": "public function ProduccionEnvasado() {\n\n return $this->belongsTo('App\\Models\\Produccion\\ProduccionEnvasado','prodenv_id');\n }", "title": "" }, { "docid": "97bea7c675d2b6b7f86386c1cda35403", "score": "0.46737072", "text": "public function getFkTcepbServidores()\n {\n return $this->fkTcepbServidores;\n }", "title": "" }, { "docid": "7252d61aba8b1c0c5ff71dc35831c93a", "score": "0.46716094", "text": "public function componentesSubtitulo(){\n return $this->hasMany('App\\Subtitulo','id_tramite','id');\n }", "title": "" }, { "docid": "485ca873b3dbf99627478dbf230d0909", "score": "0.46673444", "text": "public function getFkEmpenhoPreEmpenhos()\n {\n return $this->fkEmpenhoPreEmpenhos;\n }", "title": "" }, { "docid": "485ca873b3dbf99627478dbf230d0909", "score": "0.46673444", "text": "public function getFkEmpenhoPreEmpenhos()\n {\n return $this->fkEmpenhoPreEmpenhos;\n }", "title": "" } ]
8ed218de700dd2f37606e7740686d4b3
/ Function creates new xml element. element [name] element name [attributes] atributes array in form arry["attribute_name"]=attribute_value [content] if array childs otherwise some content
[ { "docid": "a1c0eead8b13d35006cd174fe86ff7ed", "score": "0.6206769", "text": "function buildXMLElement($elements){\n\t\t$out = '';\n\t\tforeach($elements as $element){\n\t\t\t$element = new we_html_baseElement($element['name'], true, $element['attributes'], (is_array($element['content']) ? self::buildXMLElement($element['content']) : $element['content']));\n\t\t\t$out.=$element->getHTML();\n\t\t}\n\t\treturn $out;\n\t}", "title": "" } ]
[ { "docid": "0fc9baed65015335c239a70a2c03f921", "score": "0.70734143", "text": "public function newElement();", "title": "" }, { "docid": "29cfa96e3b5d74eb651e3f5380397845", "score": "0.68397415", "text": "function create_element( $name ){\n return new xNode( $name,XNODE_TYPE_ELEM, $this ); \n }", "title": "" }, { "docid": "e7cf94b557792bdb123745ae206ac211", "score": "0.67139894", "text": "public function createXML() {}", "title": "" }, { "docid": "6e1a70ad807f7497af32e9616a1bdf67", "score": "0.66178757", "text": "function addElement( $name, $value, $attributes=null ) \n\t{\n\t $this->xmlValues[] = new XMLElement( $name, $value, $attributes);\t\n\t}", "title": "" }, { "docid": "17d8ce7754ceca924c013bdabca7d8a0", "score": "0.6414803", "text": "public function createElement()\n {\n\t\t$element = $this->service->instance->catalogElements()->create();\n\t\t$element->catalog_id = $this->id;\n\t\treturn $element;\n\t}", "title": "" }, { "docid": "0d00d6956f1374f3449dc5755362058a", "score": "0.640363", "text": "protected function create_and_add_element()\n {\n $element = call_user_func_array(array($this->form_builder, 'createElement'), func_get_args());\n\n $this->get_xml_form_parser_result()->add_element($element);\n\n return $element;\n }", "title": "" }, { "docid": "ecbe8ecf8f1ae90e4ac3ba6febc0b249", "score": "0.6334326", "text": "function xml_create($array,$indent = 0) {\n\t\t\t// Indent\n\t\t\t$indent_character = \"\t\"; // Tab\n\t\t\tfor($x = 0;$x < $indent;$x++) $indent_string .= $indent_character;\n\t\t\t\n\t\t\tif($array) {\n\t\t\t\tforeach($array as $k => $v) {\n\t\t\t\t\t// Parent\n\t\t\t\t\t$xml .= \"\n\".$indent_string.\"<\".$k.\">\";\n\t\t\t\t\t// Child - array\n\t\t\t\t\tif(is_array($v)) {\n\t\t\t\t\t\t$xml .= $this->xml_create($v,$indent + 1).\"\n\".$indent_string.\"</\".$k.\">\";\n\t\t\t\t\t}\n\t\t\t\t\t// Child - value\n\t\t\t\t\telse {\n\t\t\t\t\t\tif(strip_tags($v) != $v) $xml .= \"<![CDATA[\".$v.\"]]>\";\n\t\t\t\t\t\telse $xml .= $this->xml_escape(s($v));\n\t\t\t\t\t\t$xml .= \"</\".$k.\">\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Return\n\t\t\treturn $xml;\n\t\t}", "title": "" }, { "docid": "df268cf84434c4ff7eda744e1ad45aed", "score": "0.630084", "text": "public function createElement(): DOMElement\n {\n if (empty($this->element) === false) {\n return $this->element;\n }\n\n $this->element = $this->dom->createElement($this->getTagName());\n foreach ($this->attributes as $attribute => $value) {\n // $this->setNodeAttribute($attribute, $value);\n\n if ($value !== '') {\n $domAttribute = $this->dom->createAttribute($attribute);\n $domAttribute->value = $value;\n $this->element->nodeValue = $value;\n $this->element->appendChild($domAttribute);\n }\n }\n\n return $this->element;\n }", "title": "" }, { "docid": "dded9e0827f996c6fc52278ec92e8bd3", "score": "0.62973034", "text": "public function createElement($elements)\n {\n $output=\"\";\n $output=$this->startFile('techElement');\n\n // Create attributeGroup functions\n foreach($elements as $element)\n {\n $output=$this->annotation($element,$output);\n $output=$this->publicFunc($element,$output);\n $output[]=\"\\$ele['type']='\".$element['@type'].\"';\";\n\n // Keys?\n if(isset($element['key']))\n {\n if(!isset($element['key'][0])) { $element['key']=array($element['key']); }\n foreach($element['key'] as $idx=>$key) {\n $output = $this->key($idx, $key, $output, \"ele\");\n }\n }\n\n // Keyrefs?\n if(isset($element['keyref']))\n {\n if(!isset($element['keyref'][0])) { $element['keyref']=array($element['keyref']); }\n foreach($element['keyref'] as $idx=>$ref) {\n $output = $this->keyref($idx, $ref, $output, \"ele\");\n }\n }\n\n // Unique?\n if(isset($element['unique']))\n {\n if(!isset($element['unique'][0])) { $element['unique']=array($element['unique']); }\n foreach($element['unique'] as $idx=>$uni) {\n $output = $this->unique($idx, $uni, $output,\"ele\");\n }\n }\n\n $output[]=\"return \\$ele;\";\n $output=$this->closeFunc($output);\n }\n $output=$this->closeFunc($output);\n\n // Write file\n $this->writeFile($output,\"TechElement\");\n return;\n }", "title": "" }, { "docid": "40eccd159ca461d478dc7766438f32d5", "score": "0.6274817", "text": "function buildXMLElement($elements){\n\t\t\t\t\t\t\t$out=\"\";\n\t\t\t\t\t\t\t$content=\"\";\n\t\t\t\t\t\t\tforeach($elements as $element){\n\t\t\t\t\t\t\t\tif(is_array($element[\"content\"])){\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$content=weCustomerEI::buildXMLElement($element[\"content\"]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse $content=$element[\"content\"];\n\t\t\t\t\t\t\t\t$element=new we_baseElement($element[\"name\"],true,$element[\"attributes\"],$content);\n\t\t\t\t\t\t\t\t$out.=$element->getHtmlCode($element);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn $out;\n\t\t}", "title": "" }, { "docid": "68238e51d7923f3014334e6191b7d131", "score": "0.62396103", "text": "private function &makeElement(&$dom, $name, $attrs, $content = false) {\n\t\t$elem = $dom->createElement($name);\n\t\tforeach($attrs as $n=>$v) {\n\t\t\t$elem->setAttribute($n, $v);\n\t\t}\n\t\tif ($content !== false) {\n\t\t\t$elem->appendChild(new DOMText($content));\n\t\t}\n\t\treturn $elem;\n\t}", "title": "" }, { "docid": "c7ad30f8678a38f5d18dedd796eb2a79", "score": "0.62239265", "text": "function arrayToXml($xml1Array, &$xml_info, $parentNode=null)\n{\n foreach ($xml1Array as $key => $value) {\n if (is_array($value)) {\n if (!is_numeric($key)) {\n if ($key == '@attributes') {\n foreach ($value as $attrIndex => $attrVal) {\n $xml_info->addAttribute(\"$attrIndex\", \"$attrVal\");\n }\n arrayToXml($value, $xml_info, $key);\n } elseif (count($value) == 1) {\n $subnode = $xml_info->addChild($key);\n if (isset($value['@attributes']) && is_array(\n $value['@attributes']\n )) {\n foreach ($value['@attributes'] as $attrIndex => $attrVal) {\n $subnode->addAttribute(\"$attrIndex\", \"$attrVal\");\n }\n }\n } else {\n arrayToXml($value, $xml_info, $key);\n }\n } else {\n $subnode = $xml_info->addChild(\"$parentNode\");\n if (isset($value['@attributes']) && is_array(\n $value['@attributes']\n )) {\n foreach ($value['@attributes'] as $attrIndex => $attrVal) {\n $subnode->addAttribute(\"$attrIndex\", \"$attrVal\");\n }\n }\n }\n }\n }\n}", "title": "" }, { "docid": "77bb8f918afb33e680a711e6153c0185", "score": "0.6200115", "text": "static function addChild($parent, $name, $value='')\n\t{\t\t\n\t\t$new_child = new SimpleXMLElement(\"<$name>$value</$name>\");\n\t\t$node1 = dom_import_simplexml($parent);\n\t\t$dom_sxe = dom_import_simplexml($new_child);\n\t\t$node2 = $node1->ownerDocument->importNode($dom_sxe, true);\n\t\t$node1->appendChild($node2);\n\t\treturn simplexml_import_dom($node2);\n\t}", "title": "" }, { "docid": "a3040e3bf775725f3c64bce53df3a187", "score": "0.6199651", "text": "public function xmlCreateElement($name, $doc, $parent)\r\n\t{\r\n\t\t$element = $doc->createElement($name); \r\n\t\t$parent->appendChild($element);\r\n\t\treturn $element;\r\n\t}", "title": "" }, { "docid": "969e2b276f69dca2dffffc3ec382713c", "score": "0.61899", "text": "private static function &convert($node_name, $arr=array()) {\n\n //print_arr($node_name);\n $xml = self::getXMLRoot();\n $node = $xml->createElement($node_name);\n\n if(is_array($arr)){\n // get the attributes first.;\n if(isset($arr['@attributes'])) {\n foreach($arr['@attributes'] as $key => $value) {\n if(!self::isValidTagName($key)) {\n throw new Exception('[Array2XML] Illegal character in attribute name. attribute: '.$key.' in node: '.$node_name);\n }\n $node->setAttribute($key, self::bool2str($value));\n }\n unset($arr['@attributes']); //remove the key from the array once done.\n }\n\n // check if it has a value stored in @value, if yes store the value and return\n // else check if its directly stored as string\n if(isset($arr['@value'])) {\n $node->appendChild($xml->createTextNode(self::bool2str($arr['@value'])));\n unset($arr['@value']); //remove the key from the array once done.\n //return from recursion, as a note with value cannot have child nodes.\n return $node;\n } else if(isset($arr['@cdata'])) {\n $node->appendChild($xml->createCDATASection(self::bool2str($arr['@cdata'])));\n unset($arr['@cdata']); //remove the key from the array once done.\n //return from recursion, as a note with cdata cannot have child nodes.\n return $node;\n }\n }\n\n //create subnodes using recursion\n if(is_array($arr)){\n // recurse to get the node for that key\n foreach($arr as $key=>$value){\n if(!self::isValidTagName($key)) {\n throw new Exception('[Array2XML] Illegal character in tag name. tag: '.$key.' in node: '.$node_name);\n }\n if(is_array($value) && is_numeric(key($value))) {\n // MORE THAN ONE NODE OF ITS KIND;\n // if the new array is numeric index, means it is array of nodes of the same kind\n // it should follow the parent key name\n foreach($value as $k=>$v){\n $node->appendChild(self::convert($key, $v));\n }\n } else {\n // ONLY ONE NODE OF ITS KIND\n $node->appendChild(self::convert($key, $value));\n }\n unset($arr[$key]); //remove the key from the array once done.\n }\n }\n\n // after we are done with all the keys in the array (if it is one)\n // we check if it has any text value, if yes, append it.\n if(!is_array($arr)) {\n $node->appendChild($xml->createTextNode(self::bool2str($arr)));\n }\n\n return $node;\n }", "title": "" }, { "docid": "e451cbfd84c02b7cc5130d32e7b7a5db", "score": "0.6126587", "text": "public static function array_to_xml($array, SimpleXMLElement $xml, $child_name = 'item', $format = false)\n {\n foreach ($array as $key => $value)\n {\n // Check child name, if default and key ends with an s, then use the singular version for the child name\n if (substr(strtolower($key), -1) == 's')\n {\n $child_name = self::singularize($key);\n }\n\n // Check for attributes\n $attributes = null;\n\n if (is_array($value) && isset($value['_attributes']))\n {\n $attributes = $value['_attributes'];\n\n unset($value['_attributes']);\n\n $value = count($value) == 1 ? current($value) : $value;\n }\n\n // Create element\n if (is_array($value))\n {\n $child = is_int($key) ? self::array_to_xml($value, $xml->addChild($child_name), $value) : self::array_to_xml($value, $xml->addChild($key), $child_name);\n }\n else\n {\n // Check if contents need to be wrapped in CDATA\n preg_match_all('/\\&#x\\d+\\;/', htmlentities($value), $matches);\n\n if (count($matches[0]) > 0 || stristr(htmlentities($value), '&'))\n {\n $child = is_int($key) ? $xml->addChild($child_name) : $xml->addChild($key);\n\n $dom = dom_import_simplexml($child);\n $document = $dom->ownerDocument;\n $dom->appendChild($document->createCDATASection(html_entity_decode($value)));\n }\n else\n {\n $child = is_int($key) ? $xml->addChild($child_name, $value) : $xml->addChild($key, $value);\n }\n }\n\n // Add attributes to element\n if (!is_null($attributes))\n {\n foreach ($attributes as $attribute => $attribute_value)\n {\n $child->addAttribute($attribute, $attribute_value);\n }\n }\n }\n\n // Return in the format requested\n if ($format)\n {\n $dom = dom_import_simplexml($xml)->ownerDocument;\n $dom->formatOutput = true;\n\n return $dom->saveXML();\n }\n else\n {\n return $xml->asXML();\n }\n }", "title": "" }, { "docid": "ab5f70c8e53d8719cb63935334758311", "score": "0.60939", "text": "public function createXML()\n\t {\n\t\t$slice = array_slice($this->links, 0, 1);\n\t\t$this->id = sha1($slice[0][\"link\"] . $slice[0][\"datetime\"]->format(\"d.m.Y H:i:s\"));\n\t\t$this->_xml = new XMLGenerator(\"estate\");\n\n\t\t$this->_xml->newElement(\"id\", $this->id);\n\n\t\t$a = array_slice($this->mainprops, 0, 10);\n\t\tforeach ($a as $prop)\n\t\t {\n\t\t\tif (isset($this->$prop) === true)\n\t\t\t {\n\t\t\t\t$this->_xml->newElement($prop, $this->$prop);\n\t\t\t } //end if\n\n\t\t } //end foreach\n\n\t\t$this->_addXMLData(\"description\", \"descriptions\");\n\n\t\t$b = array_slice($this->mainprops, 10, 14);\n\t\tforeach ($b as $prop)\n\t\t {\n\t\t\tif (isset($this->$prop) === true)\n\t\t\t {\n\t\t\t\t$this->_xml->newElement($prop, $this->$prop);\n\t\t\t } //end if\n\n\t\t } //end foreach\n\n\t\t$c = [\n\t\t \"price\" => \"prices\",\n\t\t \"comission\" => \"comissions\",\n\t\t];\n\n\t\tforeach ($c as $field => $from)\n\t\t {\n\t\t\t$this->_addXMLData($field, $from);\n\t\t } //end foreach\n\n\t\tforeach ($this->sellers as $seller)\n\t\t {\n\t\t\t$this->_xml->newElement(\"seller\", $seller[\"seller\"], [\n\t\t\t \"person\" => $seller[\"person\"],\n\t\t\t \"phone\" => $seller[\"phone\"],\n\t\t\t]);\n\t\t } //end foreach\n\n\t\t$this->_addXMLData(\"link\", \"links\");\n\n\t\tforeach ($this->photos as $photo)\n\t\t {\n\t\t\t$this->_xml->newElement(\"photo\", $photo);\n\t\t } //end foreach\n\n\t\t$this->doc = $this->_xml->getDoc();\n\t }", "title": "" }, { "docid": "ae57d461af8df6ccf51cee407e6f9851", "score": "0.60808283", "text": "public function create_element_structure() {\n\t\t\t\n\t\t\t// Add name of the class to deserialize it again when the element is sent back to the server from the web page\n\t\t\t$this->config['php_class'] \t\t= get_class($this);\n\t\t\t// element id\n\t\t\t$this->config['id']\t \t\t= 'title_box';\n\t\t\t// element name\n\t\t\t$this->config['name']\t \t\t= __('Title', 'oxo-core');\n\t\t\t// element icon\n\t\t\t$this->config['icon_url'] \t\t= \"icons/sc-text_block.png\";\n\t\t\t// css class related to this element\n\t\t\t$this->config['css_class'] \t\t= \"oxo_element_box\";\n\t\t\t// element icon class\n\t\t\t$this->config['icon_class']\t\t= 'oxo-icon builder-options-icon oxoa-H';\n\t\t\t// tooltip that will be displyed upon mouse over the element\n\t\t\t//$this->config['tool_tip'] \t\t= 'Creates a Title Element';\n\t\t\t// any special html data attribute (i.e. data-width) needs to be passed\n\t\t\t// drop_level: elements with higher drop level can be dropped in elements with lower drop_level, \n\t\t\t// i.e. element with drop_level = 2 can be dropped in element with drop_level = 0 or 1 only.\n\t\t\t$this->config['data'] \t\t\t= array(\"drop_level\" => \"4\");\n\t\t}", "title": "" }, { "docid": "0ae1dc0d1d319ed5cec21dc03af90482", "score": "0.6063062", "text": "function create_attrib($nom_attrib,$pseudo){\n \n $dom = get_dom(); \n\n $attrib = $dom->createElement(\"attrib\");\n $attrib->setAttribute(\"name\", utf8_encode($nom_attrib)); \n $attrib->setAttribute(\"pseudo\", utf8_encode($pseudo)); \n $attribs = $dom->getElementsByTagName(\"attribs\")->item(0);\n $attribs->appendChild($attrib);\n \n $dom->formatOutput = true;\n $dom->save(\"attribution.xml\");\n \n }", "title": "" }, { "docid": "8bfab90c060a05d20fc995f09cc386c9", "score": "0.6043567", "text": "abstract protected function generateXML();", "title": "" }, { "docid": "77100fb552ff214de81e44d52996eb2b", "score": "0.6032008", "text": "public function getElementXml()\n {\n $xmlObj = $this->getXmlObject();\n $this->_addRequiredAttributes($xmlObj);\n foreach ($this->getAttributes() as $key => $val) {\n $xmlObj->addAttribute($key, $xmlObj->xmlAttribute($val));\n }\n\n foreach ($this->getChildrenXml(false) as $element) {\n $xmlObj->appendChild($element);\n }\n\n foreach ($this->getChildrenXml(true) as $fieldset) {\n $xmlObj->appendChild($fieldset);\n }\n $this->addAfterXmlElementToObj($xmlObj);\n return $xmlObj;\n }", "title": "" }, { "docid": "957cef8a7a123b96dfbbe90e893b7ec4", "score": "0.6021115", "text": "abstract public function createRegularPostXML();", "title": "" }, { "docid": "8514b24b65c13e0a5945aa8f0086a996", "score": "0.60059965", "text": "function array_to_element(array $data)\n{\n global $pagesDocument;\n \n $page = $pagesDocument->createElement('page');\n $page->setAttribute('uid', $data['uid']);\\\n $page->setAttribute('isHomepage', $data['homepage']);\n $page->appendChild($pagesDocument->createElement('title', $data['title']));\n $page->appendChild($pagesDocument->createElement('slug', $data['slug']));\n \n $body = $pagesDocument->createElement('body');\n $body->appendChild($pagesDocument->createCDATASection($data['body']));\n $page->appendChild($body);\n \n if(isset($data['layout']) && !empty($data['layout'])) {\n $page->appendChild($pagesDocument->createElement('layout', $data['layout']));\n }\n \n return $page;\n}", "title": "" }, { "docid": "ba8ec82310a178349e9c277db76780dd", "score": "0.5984524", "text": "public function make( array $attributes = array() );", "title": "" }, { "docid": "c307b555bc400928d2faf9caa837190d", "score": "0.5982388", "text": "public function create_element($element, $attr = '', $content = '') {\n\t\t\t\tif (in_array($element, $this->closeable)) {\n\t\t\t\t\treturn $this->open($element, $attr) . $content . $this->close($element);\n\t\t\t\t} elseif (in_array($element, $this->emptytags)) {\n\t\t\t\t\treturn $this->open($element, $attr);\n\t\t\t\t} else {\n\t\t\t\t\t$this->error(\"This element $element is not defined to be called as a closing or open ended element.\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "7fbfdd5dbbfd7318e753b0834349d628", "score": "0.5972497", "text": "public function generateXML();", "title": "" }, { "docid": "a68690921d4352606d1cd970aee93593", "score": "0.5960726", "text": "abstract protected function createRootElement();", "title": "" }, { "docid": "b6a4256400b0f693de96bd1a2d110c27", "score": "0.59369797", "text": "function add_creator($field_value) {\n /*\n<namePart>#{term}</namePart>\n<role>\n<roleTerm type='text'>creator</roleTerm>\n<roleTerm type='code'>cre</roleTerm>\n</role>\n</name>\"\n\n @root << \"<name type='personal'>\n<namePart>#{term}</namePart>\n */\n\n $name = $this->doc->addChild('name');\n $name->addAttribute('type', 'personal');\n $namePart = $name->addChild('namePart', $field_value);\n\n //$role = $this->get_element('/mods:mods/mods:role', 'role');\n $role = $name->addChild('role');\n $role->addChild('roleTerm', 'creator');\n $role->addAttribute('type', 'text');\n\n $role = $name->addChild('role');\n $role->addChild('roleTerm', 'cre');\n $role->addAttribute('type', 'code');\n }", "title": "" }, { "docid": "79afaa2c6d5ace5ac0d5b550c61b123c", "score": "0.59248054", "text": "private function createXmlNode($xml, $value, $parent) {\n // Sigh... Oh DOM-API, your so backwards and useless.\n // We have to do this for namespaces to work correctly, there is no clean work around for this.\n $xml = strtr($xml, array('%value%' => $value));\n $xml = \"<root {$this->nameSpaceAttributes}>$xml</root>\";\n $node = $this->createDocumentFragment();\n $node->appendXML($xml);\n return $parent->appendChild($node->childNodes->item(0)->childNodes->item(0));\n }", "title": "" }, { "docid": "1277b0ba565af03c824bbceecdd2e787", "score": "0.5922566", "text": "public function createElements()\n {\n $this->allowEditing(array( ) );\n }", "title": "" }, { "docid": "1277b0ba565af03c824bbceecdd2e787", "score": "0.5922566", "text": "public function createElements()\n {\n $this->allowEditing(array( ) );\n }", "title": "" }, { "docid": "1277b0ba565af03c824bbceecdd2e787", "score": "0.5922566", "text": "public function createElements()\n {\n $this->allowEditing(array( ) );\n }", "title": "" }, { "docid": "398387fc14e151be0f5e07a941e4befe", "score": "0.59179366", "text": "public static function createXMLElement($name,$value,$name_extension='')\r\n {\r\n $str = '';\r\n if(!empty($name))\r\n {\r\n if(!empty($name_extension))\r\n {\r\n $str = '<'.$name.' '.$name_extension.'>'.$value.'</'.$name.'>';\r\n }\r\n else\r\n {\r\n $str = '<'.$name.'>'.$value.'</'.$name.'>';\r\n }\r\n }\r\n\r\n return $str;\r\n }", "title": "" }, { "docid": "78f34ed259b561a6844255ad6d882862", "score": "0.5904444", "text": "protected function createElement($tag, $name, $value, array $attributes = [])\n {\n $id = $this->getId($name);\n\n // Evtl postwerte wieder übernehmen (auch externe Werte überschreiben)\n $postValue = $this->elementPostValue($this->getFieldsetName(), $name);\n if ($postValue !== null) {\n $value = $postValue;\n }\n\n // Wert aus Quelle nehmen, falls keiner extern und keiner im POST angegeben\n if ($value === null) {\n $value = $this->getValue($name);\n }\n\n if (!isset($attributes['internal::useArraySyntax'])) {\n $attributes['internal::useArraySyntax'] = true;\n }\n\n // Eigentlichen Feldnamen nochmals speichern\n $fieldName = $name;\n if ($attributes['internal::useArraySyntax'] === true) {\n $name = $this->fieldset . '[' . $name . ']';\n } elseif ($attributes['internal::useArraySyntax'] === false) {\n $name = $this->fieldset . '_' . $name;\n }\n unset($attributes['internal::useArraySyntax']);\n\n $class = 'rex_form_element';\n if (isset($attributes['internal::fieldClass'])) {\n $class = $attributes['internal::fieldClass'];\n unset($attributes['internal::fieldClass']);\n }\n\n $separateEnding = false;\n if (isset($attributes['internal::fieldSeparateEnding'])) {\n $separateEnding = $attributes['internal::fieldSeparateEnding'];\n unset($attributes['internal::fieldSeparateEnding']);\n }\n\n $internal_attr = ['name' => $name];\n if (isset($attributes['internal::noNameAttribute'])) {\n $internal_attr = [];\n unset($attributes['internal::noNameAttribute']);\n }\n\n // 1. Array: Eigenschaften, die via Parameter Überschrieben werden können/dürfen\n // 2. Array: Eigenschaften, via Parameter\n // 3. Array: Eigenschaften, die hier fest definiert sind / nicht veränderbar via Parameter\n $attributes = array_merge(['id' => $id], $attributes, $internal_attr);\n $element = new $class($tag, $this, $attributes, $separateEnding);\n $element->setFieldName($fieldName);\n $element->setValue($value);\n return $element;\n }", "title": "" }, { "docid": "ea7ad6a52082b53177648db1ce9e653e", "score": "0.589747", "text": "abstract static function buildBySimpleXML( $simpleXMLElement );", "title": "" }, { "docid": "90930ab71ee9d8e89e972592ab352c73", "score": "0.5879963", "text": "private function buildXML(\\SimpleXMLElement &$xml, array $element = []) {\n\n // Is there an element to add?\n if (!empty($element)) {\n // By default set passed by reference element as xml element to manipulate.\n $element_xml = $xml;\n // Element have a #name?\n if (isset($element['#name']) && !empty($element['#name'])) {\n // Create new child on parent and change element_xml to child.\n $element_xml = $element_xml->addChild($element['#name'], ($element['#value'] ?? null));\n }\n\n // Have attributes to add?\n if (isset($element['#attributes']) && !empty($element['#attributes'])) {\n // Add each attribute to the element_xml.\n foreach ($element['#attributes'] as $attribute => $value) {\n $element_xml->addAttribute($attribute, $value);\n }\n }\n\n // Have element_xml and there are children?\n if (isset($element['#children']) && !empty($element['#children'])) {\n // Recursively add the child elements.\n foreach ($element['#children'] as $child) {\n $this->buildXML($element_xml, $child);\n }\n }\n }\n }", "title": "" }, { "docid": "c15b12b41805f5b2d7053367e0b1e86e", "score": "0.5879206", "text": "public static function create($element_rule, $content = null, $attributes = array()) {\n $config = Interpreter::element_rule($element_rule);\n\n if ($content === null && !empty($config[\"content\"]))\n $content = $config[\"content\"];\n\n $element = new Element($config[\"tag\"], $content, $config[\"attributes\"]);\n $element->merge_attributes($attributes);\n return $element;\n }", "title": "" }, { "docid": "a3564222467cc9f053d0e8a60fb0b7cb", "score": "0.58788836", "text": "public function __call(string $name, array $attributes) : self {\n\t\t// Instantiate a new Factory for returning\n\t\t$element = new $this($this->output);\n\t\t$element->tag = $name;\n\t\tif (empty($attributes)) {\n\t\t\treturn $element;\n\t\t}\n\t\t// If the first (and only the first) parameter is an array, those are the element's attributes\n\t\tif (is_array($attributes[0])) {\n\t\t\t// array_shift returns the first $attribute and also removes it from the array\n\t\t\t$element->attributes = array_shift($attributes);\n\t\t}\n\t\t// The rest of the parameters will be the child elements. If none, it's an empty array\n\t\t$element->children = $attributes;\n\t\treturn $element;\n\t}", "title": "" }, { "docid": "6a8f4335db76208ecd309d980af70863", "score": "0.5875362", "text": "public static function &createXML($node_name, $arr=array()) {\n $xml = self::getXMLRoot();\n $xml->appendChild(self::convert($node_name, $arr));\n\n self::$xml = null; // clear the xml node in the class for 2nd time use.\n return $xml;\n }", "title": "" }, { "docid": "a116b870aa1a64e4c548d756e1eb80c6", "score": "0.5868951", "text": "static function addAttribute($parent, $name, $value='')\n\t{\n\t\t$node = dom_import_simplexml($parent);\n\t\t$node->setAttribute($name,$value);\n\t\treturn simplexml_import_dom($node);\n\t}", "title": "" }, { "docid": "21d63da3e0e7818c85088c6083c8e46e", "score": "0.5865196", "text": "public function createXml($array)\n {\n \t$log = new KZ_Api_Log();\n $log->log($this->requestParameters,$array);\n\n \t$dom = new KZ_Api_Extend_XmlDomConstruct('1.0','utf-8');\n \t$dom->fromMixed($array);\n \t$data = $dom->saveXML();\n \treturn $data;\n\n }", "title": "" }, { "docid": "468d5131519455e9db0670e40db4ab17", "score": "0.5844434", "text": "private function createElementNode($element, $value, $parent) {\n if (strpos($element, ':') !== FALSE) {\n list($prefix, $name) = explode(':', $element);\n $value = (trim($value) == '') ? NULL : $value;\n $node = $this->createElementNS($this->nameSpaces[$prefix], $element, $value);\n return $parent->appendChild($node);\n }\n else {\n list($prefix, $uri) = call_user_func(array(get_class($this), 'getDefaultNamespace'));\n $value = (trim($value) == '') ? NULL : $value;\n $node = $this->createElementNS($uri, $element, $value);\n return $parent->appendChild($node);\n }\n }", "title": "" }, { "docid": "ac74fca5890e0bdf5f8793b10069eb62", "score": "0.5840263", "text": "public function createElements()\n {\n $this->allowFiltering( array( ) );\n }", "title": "" }, { "docid": "ac74fca5890e0bdf5f8793b10069eb62", "score": "0.5840263", "text": "public function createElements()\n {\n $this->allowFiltering( array( ) );\n }", "title": "" }, { "docid": "ac74fca5890e0bdf5f8793b10069eb62", "score": "0.5840263", "text": "public function createElements()\n {\n $this->allowFiltering( array( ) );\n }", "title": "" }, { "docid": "25072daabc1528bb58389843f208a805", "score": "0.58320284", "text": "function createArray()\r\n {\r\n $xml = $this->xml;\r\n\r\n $values = array();\r\n $index = array();\r\n $array = array();\r\n $parser = xml_parser_create();\r\n xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);\r\n xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);\r\n xml_parse_into_struct($parser, $xml, $values, $index);\r\n xml_parser_free($parser);\r\n $i = 0;\r\n $name = $values[$i]['tag'];\r\n $array[$name] = isset($values[$i]['attributes']) ? $values[$i]['attributes'] : '';\r\n $array[$name] = $this->_struct_to_array($values, $i);\r\n return $array;\r\n\r\n }", "title": "" }, { "docid": "d67fc7c459b774c435a34dff08e657a2", "score": "0.5814439", "text": "abstract public function createRegularPaymentXML();", "title": "" }, { "docid": "f7b26c4d3f32e3858b741d1fa59b5bed", "score": "0.5813895", "text": "private function createJobTemplateAttributesNode() {\n $jta = new DOMDocument;\n\n $job_template_attributes = $jta->createElement(\"job-template-attributes\");\n\n $job_account_id = $jta->createElement(\"job-account-id\", $this->job_account_id);\n $job_account_id->setAttribute(\"syntax\", \"name\");\n $job_account_id->setAttribute(\"xml:space\", \"preserve\");\n $job_accounting_user_id = $jta->createElement(\"job-accounting-user-id\", $this->job_accounting_user_id);\n $job_accounting_user_id->setAttribute(\"syntax\", \"name\");\n $job_accounting_user_id->setAttribute(\"xml:space\", \"preserve\");\n $job_accounting_data = $jta->createElement(\"job-accounting-data\", $this->job_accounting_data);\n $job_accounting_data->setAttribute(\"syntax\", \"text\");\n $job_accounting_data->setAttribute(\"xml:space\", \"preserve\");\n $job_recipient_name = $jta->createElement(\"job-recipient-name\", $this->job_recipient_name);\n $job_recipient_name->setAttribute(\"syntax\", \"name\");\n $job_recipient_name->setAttribute(\"xml:space\", \"preserve\");\n $job_sheet_message = $jta->createElement(\"job-sheet-message\", $this->job_sheet_message);\n $job_sheet_message->setAttribute(\"syntax\", \"text\");\n $job_sheet_message->setAttribute(\"xml:space\", \"preserve\");\n $job_message_to_operator = $jta->createElement(\"job-message-to-operator\", $this->job_message_to_operator);\n $job_message_to_operator->setAttribute(\"syntax\", \"text\");\n $job_message_to_operator->setAttribute(\"xml:space\", \"preserve\");\n\n $copies = $jta->createElement(\"copies\", $this->copies);\n $copies->setAttribute(\"syntax\", \"integer\");\n $sides = $jta->createElement(\"sides\", $this->main_media_clean['sides']);\n $sides->setAttribute(\"syntax\", \"keyword\");\n $separator_sheets = $jta->createElement(\"separator-sheets\", $this->separator_sheets);\n $sheet_collate = $jta->createElement(\"sheet-collate\", $this->sheet_collate);\n $sheet_collate->setAttribute(\"syntax\", \"keyword\");\n\n $x_side1_image_shift = $jta->createElement(\"x-side1-image-shift\", $this->main_media_clean['x_side1_image_shift']);\n $x_side1_image_shift->setAttribute(\"syntax\", \"integer\");\n $y_side1_image_shift = $jta->createElement(\"y-side1-image-shift\", $this->main_media_clean['y_side1_image_shift']);\n $y_side1_image_shift->setAttribute(\"syntax\", \"integer\");\n $x_side2_image_shift = $jta->createElement(\"x-side2-image-shift\", $this->main_media_clean['x_side2_image_shift']);\n $x_side2_image_shift->setAttribute(\"syntax\", \"integer\");\n $y_side2_image_shift = $jta->createElement(\"y-side2-image-shift\", $this->main_media_clean['y_side2_image_shift']);\n $y_side2_image_shift->setAttribute(\"syntax\", \"integer\");\n\n //create page-ranges node\n $pageRangesNode = $this->createPageRangesNode($this->main_media_clean['page_ranges']);\n $pageRangesNode = $jta->importNode($pageRangesNode, true);\n\n //create finishings node\n $finishingsNode = $this->createfinishingsNode($this->finishings);\n $finishingsNode = $jta->importNode($finishingsNode, true);\n\n //create media-col node\n $mainMediaColNode = $this->createMediaColNode($this->main_media_clean);\n $mainMediaColNode = $jta->importNode($mainMediaColNode, true);\n\n //create cover-front and cover-back nodes\n $coverFrontNode = $this->createCoverNode('front');\n $coverFrontNode = $jta->importNode($coverFrontNode, true);\n $coverBackNode = $this->createCoverNode('back');\n $coverBackNode = $jta->importNode($coverBackNode, true);\n\n //create page-overrides node\n $pageOverridesNode = $this->createPageOverridesNode();\n $pageOverridesNode = $jta->importNode($pageOverridesNode, true);\n\n //create insert-sheet node\n $insertSheetNode = $this->createInsertSheetsNode();\n $insertSheetNode = $jta->importNode($insertSheetNode, true);\n\n //append\n $job_template_attributes->appendChild($job_account_id);\n $job_template_attributes->appendChild($job_accounting_user_id);\n $job_template_attributes->appendChild($job_accounting_data);\n $job_template_attributes->appendChild($job_recipient_name);\n $job_template_attributes->appendChild($job_sheet_message);\n $job_template_attributes->appendChild($job_message_to_operator);\n $job_template_attributes->appendChild($copies);\n $job_template_attributes->appendChild($pageRangesNode);\n $job_template_attributes->appendChild($finishingsNode);\n $job_template_attributes->appendChild($sides);\n $job_template_attributes->appendChild($separator_sheets);\n $job_template_attributes->appendChild($sheet_collate);\n $job_template_attributes->appendChild($x_side1_image_shift);\n $job_template_attributes->appendChild($y_side1_image_shift);\n $job_template_attributes->appendChild($x_side2_image_shift);\n $job_template_attributes->appendChild($y_side2_image_shift);\n $job_template_attributes->appendChild($mainMediaColNode);\n $job_template_attributes->appendChild($coverFrontNode);\n $job_template_attributes->appendChild($coverBackNode);\n $job_template_attributes->appendChild($pageOverridesNode);\n $job_template_attributes->appendChild($insertSheetNode);\n $jta->appendChild($job_template_attributes);\n\n //return a DOMNode for the job-template-attributes\n return $jta->getElementsByTagName(\"job-template-attributes\")->item(0);\n }", "title": "" }, { "docid": "ba66897c38f401d9bfca13cea36d59c6", "score": "0.57904536", "text": "protected function toXML(DOMElement $parent) {\n\t\tassert('is_null($this->ID) || is_string($this->ID)');\n\t\tassert('is_null($this->validUntil) || is_int($this->validUntil)');\n\t\tassert('is_null($this->cacheDuration) || is_string($this->cacheDuration)');\n\t\tassert('is_array($this->protocolSupportEnumeration)');\n\t\tassert('is_null($this->errorURL) || is_string($this->errorURL)');\n\t\tassert('is_array($this->Extensions)');\n\t\tassert('is_array($this->KeyDescriptor)');\n\t\tassert('is_null($this->Organization) || $this->Organization instanceof SAML2_XML_md_Organization');\n\t\tassert('is_array($this->ContactPerson)');\n\n\t\t$e = $parent->ownerDocument->createElementNS(SAML2_Const::NS_MD, $this->elementName);\n\t\t$parent->appendChild($e);\n\n\t\tif (isset($this->ID)) {\n\t\t\t$e->setAttribute('ID', $this->ID);\n\t\t}\n\n\t\tif (isset($this->validUntil)) {\n\t\t\t$e->setAttribute('validUntil', gmdate('Y-m-d\\TH:i:s\\Z', $this->validUntil));\n\t\t}\n\n\t\tif (isset($this->cacheDuration)) {\n\t\t\t$e->setAttribute('cacheDuration', $this->cacheDuration);\n\t\t}\n\n\t\t$e->setAttribute('protocolSupportEnumeration', implode(' ', $this->protocolSupportEnumeration));\n\n\t\tif (isset($this->errorURL)) {\n\t\t\t$e->setAttribute('errorURL', $this->errorURL);\n\t\t}\n\n\n\t\tSAML2_XML_md_Extensions::addList($e, $this->Extensions);\n\n\t\tforeach ($this->KeyDescriptor as $kd) {\n\t\t\t$kd->toXML($e);\n\t\t}\n\n\t\tif (isset($this->Organization)) {\n\t\t\t$this->Organization->toXML($e);\n\t\t}\n\n\t\tforeach ($this->ContactPerson as $cp) {\n\t\t\t$cp->toXML($e);\n\t\t}\n\n\t\treturn $e;\n\t}", "title": "" }, { "docid": "bfefbf87930c06bd172e1371a1f1b8c4", "score": "0.57901645", "text": "function array_to_xml(array $arr, SimpleXMLElement $xml)\n{\n foreach ($arr as $k => $v) {\n if(is_array($v)) {\n array_to_xml($v, $xml->addChild('contact'));\n }else {\n $xml->addChild($k, $v);\n }\n }\n return $xml;\n}", "title": "" }, { "docid": "6796ecdf1eea2a93936780754d6b6fe4", "score": "0.5787834", "text": "function _oembed_create_xml($data, $node = \\null)\n{\n}", "title": "" }, { "docid": "a0150d88d23e4a684ed460fbbbb91a39", "score": "0.5785172", "text": "private function prepare_tag() {\n\t\t$return_array = array(0 =>'', 1=>'');//initialize return array\n\t\tif(empty($this->name)) {\n\t\t\treturn $return_array;\n\t\t}\n //creating opening tag\n $return_array[0] = '<' . $this->name;\n //add attributes\n if(!empty($this->attributes)) {\n\t\t\tforeach($this->attributes as $key=>$value) {\n\t\t\t\t$return_array[0] .= ' ' . $key;\n\t\t\t\tif(!empty($value)) {\n\t\t\t\t\t$return_array[0] .= '=\"' . $value . '\"';\n\t\t\t\t}\n\t\t\t}\n }\n\n //close opening tag, and possibly create closing tag\n\t\tif($this->void_element) {\n\t\t\t$return_array[0] .= ' />';\n\t\t}else{\n\t\t\t$return_array[0] .= '>';\n\t\t\t$return_array[1] .= '</' . $this->name . '>';\n\t\t}\n\t\treturn $return_array;\n\t}", "title": "" }, { "docid": "cf7031c7d88d8ca8015f9cc49e72ee6f", "score": "0.57665884", "text": "public function getXml() {\n\t\t$this->dom = new \\DOMDocument();\n\t\tforeach ( $this->vars as $k => $v ) {\n\t\t\t$this->createElement ( $k, $v );\n\t\t}\n\t\treturn $this->dom;\n\t}", "title": "" }, { "docid": "1eb231b0134ff5e9358c2f05b026345b", "score": "0.5757543", "text": "public function create_element_structure() {\n\t\t\t\n\t\t\t// Add name of the class to deserialize it again when the element is sent back to the server from the web page\n\t\t\t$this->config['php_class'] \t\t= get_class($this);\n\t\t\t// element id\n\t\t\t$this->config['id']\t \t\t= 'recent_works';\n\t\t\t// element name\n\t\t\t$this->config['name']\t \t\t= __('Recent Works', 'oxo-core');\n\t\t\t// element icon\n\t\t\t$this->config['icon_url'] \t\t= \"icons/sc-text_block.png\";\n\t\t\t// css class related to this element\n\t\t\t$this->config['css_class'] \t\t= \"oxo_element_box\";\n\t\t\t// element icon class\n\t\t\t$this->config['icon_class']\t\t= 'oxo-icon builder-options-icon oxoa-insertpicture';\n\t\t\t// tooltip that will be displyed upon mouse over the element\n\t\t\t//$this->config['tool_tip'] \t\t= 'Creates a Recent Works Blck';\n\t\t\t// any special html data attribute (i.e. data-width) needs to be passed\n\t\t\t// drop_level: elements with higher drop level can be dropped in elements with lower drop_level, \n\t\t\t// i.e. element with drop_level = 2 can be dropped in element with drop_level = 0 or 1 only.\n\t\t\t$this->config['data'] \t\t\t= array(\"drop_level\" => \"4\");\n\t\t}", "title": "" }, { "docid": "793dce4adbe485b235a054e1be8fb36e", "score": "0.5755464", "text": "function createArray()\r\n\t{\r\n\t\t$xml = $this->xml;\r\n\t\t$values = array();\r\n\t\t$index = array();\r\n\t\t$array = array();\r\n\t\t$parser = xml_parser_create();\r\n\t\txml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);\r\n\t\txml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);\r\n\t\txml_parse_into_struct($parser, $xml, $values, $index);\r\n\t\txml_parser_free($parser);\r\n\t\t$i = 0;\r\n\t\t$name = $values[$i]['tag'];\r\n\t\t$array[$name] = isset($values[$i]['attributes']) ? $values[$i]['attributes'] : '';\r\n\t\t$array[$name] = $this->_struct_to_array($values, $i);\r\n\t\treturn $array;\r\n\t}", "title": "" }, { "docid": "7ab50c18b632e7cea2874a66e3d69757", "score": "0.5755092", "text": "abstract public function asXML();", "title": "" }, { "docid": "9c19adf2b6b99ced5e55bc90b052870d", "score": "0.5754545", "text": "function createEtape($objFormx,$idEtape,$libelleEtape,$tabAttributs) {\r\n\t$neudFormx = $objFormx->XMLDOM->getElementsByTagName('FORMX')->item(0);\r\n\t$etapeTemp = $objFormx->XMLDOM->createElement('ETAPE');\r\n\t$etape = $neudFormx->appendChild($etapeTemp);\r\n\tforeach($tabAttributs as $key => $value) {\r\n\t\t$etape->setAttribute($key,utf8_encode($value));\t\r\n\t}\r\n\t$libelle = $objFormx->XMLDOM->createElement('Libelle',utf8_encode($libelleEtape));\r\n\t$etape->appendChild($libelle);\r\n\treturn $etape;\r\n}", "title": "" }, { "docid": "9c19adf2b6b99ced5e55bc90b052870d", "score": "0.5754545", "text": "function createEtape($objFormx,$idEtape,$libelleEtape,$tabAttributs) {\r\n\t$neudFormx = $objFormx->XMLDOM->getElementsByTagName('FORMX')->item(0);\r\n\t$etapeTemp = $objFormx->XMLDOM->createElement('ETAPE');\r\n\t$etape = $neudFormx->appendChild($etapeTemp);\r\n\tforeach($tabAttributs as $key => $value) {\r\n\t\t$etape->setAttribute($key,utf8_encode($value));\t\r\n\t}\r\n\t$libelle = $objFormx->XMLDOM->createElement('Libelle',utf8_encode($libelleEtape));\r\n\t$etape->appendChild($libelle);\r\n\treturn $etape;\r\n}", "title": "" }, { "docid": "9246d78fc52ff3b6a5477cc48bbf4917", "score": "0.5736969", "text": "public function createElement(\n string $name,\n $children = '',\n array $attributes = []\n ): DOMElement {\n $element = $this->getDOMDocument()->createElement($name);\n static::create($element)->append($children);\n \n foreach ($attributes as $k => $value) {\n $element->setAttribute($k, $value);\n }\n \n return $element;\n }", "title": "" }, { "docid": "5cb028f56a4e3018de0555f290b47eda", "score": "0.5733603", "text": "public function createElement($name, $value = null) {\n\n\t\t$element = parent::createElement($name);\n\n\t\tif (!is_null($value)) {\n\t\t\t$element->appendChild(\n\t\t\t\t// createTextNode uses the right escaping\n\t\t\t\t$this->createTextNode($value)\n\t\t\t);\n\t\t}\n\t\treturn $element;\n\t}", "title": "" }, { "docid": "f497fb2bc43931fbaf62a9f4eb65e981", "score": "0.5721732", "text": "public static function create($attributes = []);", "title": "" }, { "docid": "9a50cb81217e724fd7e21e783348bf5b", "score": "0.5712615", "text": "function startElement($parser, $name, $attribs)\n{\n global $stack;\n $tag=array(\"name\"=>$name,\"attrs\"=>$attribs);\n array_push($stack,$tag);\n}", "title": "" }, { "docid": "5b05b3ff86d69b55025b01488ba845af", "score": "0.5708394", "text": "abstract protected function createRequestXml();", "title": "" }, { "docid": "6cb7cc73b08d77391d4278b5837748a6", "score": "0.5706258", "text": "protected function createXml()\n {\n $xml = new SimpleXMLElement('<xml/>');\n return $xml;\n }", "title": "" }, { "docid": "a7e1f0f337bd07ffd31d78e09fadaf87", "score": "0.5706069", "text": "private function createAttributes()\n {\n \n }", "title": "" }, { "docid": "ee1f7f58aaba7db4acde86a2e36d11f9", "score": "0.56963676", "text": "public function create_element_structure() {\r\r\n\t\t\t\r\r\n\t\t\t// Add name of the class to deserialize it again when the element is sent back to the server from the web page\r\r\n\t\t\t$this->config['php_class'] \t\t= get_class($this);\r\r\n\t\t\t// element id\r\r\n\t\t\t$this->config['id']\t \t\t= 'pricing_table';\r\r\n\t\t\t// element name\r\r\n\t\t\t$this->config['name']\t \t\t= __('Pricing Table', 'fusion-core');\r\r\n\t\t\t// element icon\r\r\n\t\t\t$this->config['icon_url'] \t\t= \"icons/sc-text_block.png\";\r\r\n\t\t\t// css class related to this element\r\r\n\t\t\t$this->config['css_class'] \t\t= \"fusion_element_box\";\r\r\n\t\t\t// element icon class\r\r\n\t\t\t$this->config['icon_class']\t\t= 'fusion-icon builder-options-icon fusiona-dollar';\r\r\n\t\t\t// tooltip that will be displyed upon mouse over the element\r\r\n\t\t\t//$this->config['tool_tip'] \t\t= 'Creates Prcing Table Element';\r\r\n\t\t\t// any special html data attribute (i.e. data-width) needs to be passed\r\r\n\t\t\t// drop_level: elements with higher drop level can be dropped in elements with lower drop_level, \r\r\n\t\t\t// i.e. element with drop_level = 2 can be dropped in element with drop_level = 0 or 1 only.\r\r\n\t\t\t$this->config['data'] \t\t\t= array(\"drop_level\" => \"4\");\r\r\n\t\t}", "title": "" }, { "docid": "ba0b5fe6311924b801ce1ee4c599282f", "score": "0.5689834", "text": "public function createTag($tagName,$attrib){\n $this->tag = $tagName;\n $final = array();\n $composedAttributes = \"\";\n global $attributes;\n //this loops through the attrib array checking if there is a value\n //without a key. this is helpful especialy when using <video controls>\n //becouse controls is just a word without the right hand part.\n foreach($attrib as $key=>$value){\n if(!$key)\n $final[] = \" \".$value;\n }\n foreach($attributes as $attribute){\n if(isset($attrib[$attribute])){\n $temp = $attribute;\n $temp = \" {$attribute}=\".'\"'.$attrib[$attribute].'\"';\n array_push($final,$temp);\n }\n }\n foreach($final as $attribute)\n $this->attributes .= $attribute;\n}", "title": "" }, { "docid": "e5759aa386800b1c3ab111edf520764e", "score": "0.5688526", "text": "public function createElement($name, $value=null) {\n\t\treturn $this->document->createElement($name, $value);\n\t}", "title": "" }, { "docid": "94617f7283e4016b64a3d723b3da1f36", "score": "0.5685083", "text": "function generateElement($element){\n global $dropdown;\n global $elements;\n\n //Generate html element with two input fields for xml attribute and value\n if( $element->columns == 'doubleColumn'){\n echo '\n <div class=\"form-group row no-gutters\" > <!--Standard form group with two inputs-->\n <label class=\"col-sm-2 col-form-label col-form-label-sm\" for=\"'. $element->name .'_attribute_input\">'. $element->name . (($element->isRequired==true)?'*':'') .'</label>\n <div class=\"input-group col-sm-10\" >'\n .((is_array($element->attribute) == false)?'<input type=\"text\" name=\"'. $element->prefix . $element->name .'\" class=\"form-control form-control-sm inputField\"' .(($element->value=='date')?'':/*'onfocus=\"expandInput(this)\"'*/'') . 'id=\"'. $element->name .'_attribute_input\" ' . ((is_array($element->attribute))?'value='. \"'\" . (string)$element->attribute[0] . \"'\" .'':'value='. \"'\" . (string)$element->attribute . \"'\" .'') . ' ' . (($element->readOnly==true)?'disabled=\"disabled\"':'') . ' ' . (($element->hidden==true)?'hidden=\"true\"':'') . '>':generateDropdown($element)) .\n '<input type=\"'.(($element->value=='date')?'date':'text').'\" ' .(($element->value=='date')?'':/*'onfocus=\"expandInput(this)\"'*/'') .' class=\"form-control form-control-sm inputField\" id=\"'. $element->name .'_value_input\" value=\"\">\n </div>\n </div>';\n //Generate html element with a single input field for either xml attribute or value\n }else if($element->columns == 'singleColumn'){\n echo ' \n <div class=\"form-group row no-gutters\"> <!--type--> \n <label class=\"col-sm-2 col-form-label col-form-label-sm\" for=\"'. $element->name .'_attribute_input\">' . $element->name . (($element->isRequired==true)?'*':'') .'</label>\n <div class=\"input-group col-sm-10\"> \n <input type=\"'.(($element->value=='date')?//If value field is == date, create add a datepicker\n 'date'\n :'text').//Else mark as text element\n '\" name=\"'. $element->prefix . $element->name .'\" class=\"form-control form-control-sm inputField\" '.(($element->value=='date')?'':/*'onfocus=\"expandInput(this)\"'*/'') .'id=\"'. $element->name .'_attribute_input\"' . ((is_array($element->attribute))?'value='. \"'\" . (string)$element->attribute[0] . \"'\" .'':'value='. \"'\" . (string)$element->attribute . \"'\" .'') . ' ' . (($element->readOnly==true)?'disabled':'').'>\n </div>\n </div>';\n }else if($element->columns == 'typeColumn'){ //Special case for the type fields\n echo ' \n <div class=\"form-group row no-gutters\"> <!--type--> \n <label class=\"col-sm-2 col-form-label col-form-label-sm\" for=\"'. $element->name .'_attribute_input\">' . $element->prefix . $element->name . (($element->isRequired==true)?'*':'') .'</label>\n <div class=\"input-group col-sm-10\"> \n <input type=\"text\" name=\"'. $element->prefix . $element->name .'\" class=\"form-control form-control-sm inputField\" id=\"'. $element->name .'_attribute_input\" value=\"'.((is_array($element->attribute))?''.((sizeof($elements) > 10))?(string)$element->attribute[0]:(string)$element->attribute[1].'':(string)$element->attribute).'\" ' . (($element->readOnly==true)?'disabled':'').'>\n </div>\n </div>';\n //Generate html element with two input fields for xml attribute and value and a button to dynamically add additional copies of this element\n }else if($element->columns == 'singleDropdown'){\n echo ' \n <div class=\"form-group row no-gutters\"> <!--type--> \n <label class=\"col-sm-2 col-form-label col-form-label-sm\" for=\"'. $element->name .'_attribute_input\">' . $element->name . (($element->isRequired==true)?'*':'') .'</label>\n <div class=\"input-group col-sm-10\">'\n .generateDropdown($element).\n '</div>\n </div>';\n }else if($element->columns == 'buttonDouble'){\n echo '\n <div class=\"form-group row no-gutters justify-content-end\"> <!--Form group with dynamic adding and removal of inputs-->\n <label class=\"col-sm-2 col-form-label col-form-label-sm\" for=\"'. $element->name .'_attribute_input\">'. $element->name . (($element->isRequired==true)?'*':'') .'</label>\n <div class=\"input-group entry col-sm-10 attribute_input\">'\n .((is_array($element->attribute) == false)? '<input type=\"text\" name=\"'. $element->prefix . $element->name .'\" class=\"form-control form-control-sm inputField\" '.(($element->value=='date')?'':/*'onfocus=\"expandInput(this)\"'*/'') .' id=\"'. $element->name .'_attribute_input\"' . ((is_array($element->attribute))?'value='. \"'\" . (string)$element->attribute[0] . \"'\" .'':'value='. \"'\" . (string)$element->attribute . \"'\" .'') . ' >':generateDropdown($element)) .\n '<input type=\"text\" class=\"form-control form-control-sm inputField\" '.(($element->value=='date')?'':/*'onfocus=\"expandInput(this)\"'*/'') .' id=\"'. $element->name .'_value_input\" ' . ((is_array($element->attribute) && sizeOf($element->attribute)==1)?'value='. \"'\" . (string)$element->attribute[0] . \"'\" .'':'') . '>\n <button class=\"btn btn-success btn-add\" type=\"button\" tabindex=\"-1\">\n <i class=\"fas fa-plus\"></i>\n </button>\n </div>\n </div>';\n //Generate html element with a single input field for xml attribute or value and a button to dynamically add additional copies of this element\n }else if($element->columns == 'buttonSingle'){\n echo '\n <div class=\"form-group row no-gutters justify-content-end\">\n <label class=\"col-sm-2 col-form-label col-form-label-sm\" for=\"'. $element->name .'_input\">'. $element->name . (($element->isRequired==true)?'*':'') .'</label>\n <div class=\"input-group entry col-sm-10\">\n <input type=\"text\" name=\"'. $element->prefix . $element->name .'\" class=\" form-control form-control-sm inputField attribute_input\" '.(($element->value=='date')?'':/*'onfocus=\"expandInput(this)\"'*/'') .' id=\"'. $element->name .'_input\" >\n <button class=\"btn btn-success btn-add\" type=\"button\" tabindex=\"-1\">\n <i class=\"fas fa-plus\"></i>\n </button>\n </div>\n </div>';\n }else if( $element->columns == 'doubleRow'){\n echo '\n <div>\n <div class=\"form-group row no-gutters justify-content-end\" > <!--Standard form group with two inputs-->\n <div class=\"col\"> \n <div class=\"form-group row no-gutters justify-content-end\"> \n <label class=\"col-2 col-form-label col-form-label-sm\" for=\"'. $element->name .'_attribute_input\">'. $element->name . (($element->isRequired==true)?'*':'') .'</label> \n <span class=\"col\">\n <div class=\"input-group col-12 no-padding\">\n <input type=\"text\" name=\"'. $element->prefix . $element->name .'\" class=\"form-control form-control-sm inputField\" '.(($element->value=='date')?'':/*'onfocus=\"expandInput(this)\"'*/'') .' id=\"'. $element->name .'_attribute_input\" ' . ((is_array($element->attribute))?'value='. \"'\" . (string)$element->attribute[0] . \"'\" .'':'value='. \"'\" . (string)$element->attribute . \"'\" .'') . ' ' . (($element->readOnly==true)?'disabled=\"disabled\"':'') . '>\n <input type=\"text\" class=\"form-control form-control-sm inputField\" '.(($element->value=='date')?'':/*'onfocus=\"expandInput(this)\"'*/'') .' id=\"'. $element->name .'_value_input\" value=\"\">\n </div>\n \n <div class=\"w-100\"></div>\n\n <span class=\"col-2\"></span>\n <div class=\"col-12 input-group no-padding\">\n <input type=\"text\" name=\"'. $element->prefix . $element->name .'\" class=\"form-control form-control-sm inputField\" '.(($element->value=='date')?'':/*'onfocus=\"expandInput(this)\"'*/'') .'id=\"'. $element->name .'_attribute_input\" ' . ((is_array($element->attribute))?'value='. \"'\" . (string)$element->attribute[1] . \"'\" .'':'value='. \"'\" . (string)$element->attribute . \"'\" .'') . ' ' . (($element->readOnly==true)?'disabled=\"disabled\"':'') . '>\n <input type=\"text\" class=\"form-control form-control-sm inputField\" '.(($element->value=='date')?'':/*'onfocus=\"expandInput(this)\"'*/'') .'id=\"'. $element->name .'_value_input\" value=\"\">\n </div>\n </span>\n </div>\n </div> \n </div>\n </div>';\n }\n else if( $element->columns == 'buttonDoubleRow'){\n echo '\n <div>\n <div class=\"form-group row no-gutters justify-content-end entry\"> <!--Form group with dynamic adding and removal of inputs-->\n <div class=\"col\">\n <div class=\"form-group row no-gutters justify-content-end\">\n <label class=\"col-2 col-form-label col-form-label-sm\" for=\"'. $element->name .'_attribute_input\">'. $element->name . (($element->isRequired==true)?'*':'') .'</label>\n <span class=\"col\">\n <div class=\"input-group col-12\">\n <input type=\"text\" name=\"'. $element->prefix . $element->name .'\" class=\"form-control form-control-sm inputField attribute_input\" '.(($element->value=='date')?'':/*'onfocus=\"expandInput(this)\"'*/'') .' id=\"'. $element->name .'_attribute_input\" ' . ' ' . ((is_array($element->attribute))?'value='. \"'\" . (string)$element->attribute[0] . \"'\" .'':'value='. \"'\" . (string)$element->attribute . \"'\" .'') . (($element->readOnly==true)?'disabled=\"disabled\"':'') . '>\n <input type=\"text\" class=\"form-control form-control-sm inputField\" '.(($element->value=='date')?'':/*'onfocus=\"expandInput(this)\"'*/'') .' id=\"'. $element->name .'_value_input\" value=\"\">\n </div>\n\n <div class=\"w-100\"></div>\n\n <span class=\"col-2\"></span>\n <div class=\"input-group col-12\">\n <input type=\"text\" name=\"'. $element->prefix . $element->name .'\" class=\"form-control form-control-sm inputField attribute_input\" '.(($element->value=='date')?'':/*'onfocus=\"expandInput(this)\"'*/'') .' id=\"'. $element->name .'_attribute_input\" ' . ' ' . ((is_array($element->attribute))?'value='. \"'\" . (string)$element->attribute[1] . \"'\" .'':'value='. \"'\" . (string)$element->attribute . \"'\" .'') . (($element->readOnly==true)?'disabled=\"disabled\"':'') . '>\n <input type=\"text\" class=\"form-control form-control-sm inputField\" '.(($element->value=='date')?'':/*'onfocus=\"expandInput(this)\"'*/'') .' id=\"'. $element->name .'_value_input\" value=\"\">\n </div>\n </span>\n </div>\n </div>\n <div style=\"padding-top: 5px;\">\n <button class=\"btn btn-success btn-double-add\" style=\"height: 100%;\" type=\"button\" tabindex=\"-1\">\n <i class=\"fas fa-plus\"></i>\n </button>\n </div>\n </div>\n </div>';\n }\n }", "title": "" }, { "docid": "d6d23d5acec904874841e16ba9e04fde", "score": "0.5675274", "text": "public function create_element_structure() {\n\t\t\t// Add name of the class to deserialize it again when the element is sent back to the server from the web page\n\t\t\t$this->config['php_class'] \t= get_class($this);\n\t\t\t// element id\n\t\t\t$this->config['id']\t \t= 'alert_box';\n\t\t\t// element name\n\t\t\t$this->config['name']\t \t= __('Alert', 'oxo-core');\n\t\t\t// element icon\n\t\t\t$this->config['icon_url'] \t= \"icons/sc-notification.png\";\n\t\t\t// css class related to this element\n\t\t\t$this->config['css_class'] \t= \"oxo_element_box\";\n\t\t\t// element icon class\n\t\t\t$this->config['icon_class']\t= 'oxo-icon builder-options-icon oxoa-exclamation-sign';\n\t\t\t// tooltip that will be displyed upon mouse over the element\n\t\t\t//$this->config['tool_tip'] \t= 'Creates an Alert Box';\n\t\t\t// any special html data attribute (i.e. data-width) needs to be passed\n\t\t\t// drop_level: elements with higher drop level can be dropped in elements with lower drop_level, \n\t\t\t// i.e. element with drop_level = 2 can be dropped in element with drop_level = 0 or 1 only.\n\t\t\t$this->config['data'] \t\t= array(\"drop_level\" => \"4\");\n\t\t}", "title": "" }, { "docid": "5f0a3a21eb26b5a42e32b43ed67abdde", "score": "0.56730866", "text": "function createXML($outputArray)\t{\n\n\t\t\t// Options:\n\t\t$options = array(\n\t\t\t#'useIndexTagForAssoc'=>'key',\n\t\t\t'parentTagMap' => array(\n\t\t\t\t'data' => 'languageKey',\n\t\t\t\t'orig_hash' => 'languageKey',\n\t\t\t\t'orig_text' => 'languageKey',\n\t\t\t\t'labelContext' => 'label',\n\t\t\t\t'languageKey' => 'label'\n\t\t\t)\n\t\t);\n\n\t\t\t// Creating XML file from $outputArray:\n\t\t$XML = '<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>'.chr(10);\n\t\t$XML.= t3lib_div::array2xml($outputArray,'',0,'T3locallang',0,$options);\n\n\t\treturn $XML;\n\t}", "title": "" }, { "docid": "669719ad5846936925123e34f176dcff", "score": "0.56718445", "text": "public function create_element_structure() {\n\t\t\t\n\t\t\t// Add name of the class to deserialize it again when the element is sent back to the server from the web page\n\t\t\t$this->config['php_class'] \t\t= get_class($this);\n\t\t\t// element id\n\t\t\t$this->config['id']\t \t\t= 'separator_element';\n\t\t\t// element name\n\t\t\t$this->config['name']\t \t\t= __('Separator', 'fusion-core');\n\t\t\t// element icon\n\t\t\t$this->config['icon_url'] \t\t= \"icons/sc-text_block.png\";\n\t\t\t// css class related to this element\n\t\t\t$this->config['css_class'] \t\t= \"fusion_element_box\";\n\t\t\t// element icon class\n\t\t\t$this->config['icon_class']\t\t= 'fusion-icon builder-options-icon fusiona-minus';\n\t\t\t// tooltip that will be displyed upon mous over the element\n\t\t\t//$this->config['tool_tip'] \t\t= 'Creates a Separator Element';\n\t\t\t// any special html data attribute (i.e. data-width) needs to be passed\n\t\t\t// drop_level: elements with higher drop level can be dropped in elements with lower drop_level, \n\t\t\t// i.e. element with drop_level = 2 can be dropped in element with drop_level = 0 or 1 only.\n\t\t\t$this->config['data'] \t\t\t= array(\"drop_level\" => \"4\");\n\t\t}", "title": "" }, { "docid": "fbf39fa1605cb0766212811fd0feedcf", "score": "0.5670494", "text": "private function toSoapCreate() {\n\t$returnVal = new thObject();\n\t$returnVal->Id = $this->getId();\n\t$returnVal->Type = $this->getType();\n\n\t$returnVal->any = '';\n\tfor ($i = 0; $i < $this->dom->childNodes->item(0)->childNodes->length; $i++) {\n\t $returnVal->any .= $this->dom->saveXML($this->dom->childNodes->item(0)->childNodes->item($i));\n\t}\n\n\treturn $returnVal;\n }", "title": "" }, { "docid": "146c45303bcf5ad008876648686cda85", "score": "0.56691176", "text": "private static function createXMLElement(DOMDocument $dom, DOMElement $el, array $ar, $last = null)\n {\n foreach ($ar as $tag => $value) {\n $tag = is_numeric($tag) ? $last : $tag;\n\n if (is_array($value)) {\n $$tag = (!self::isNumIndex($value)) ? $el->appendChild($dom->createElement($tag)) : $el;\n self::createXMLElement($dom, $$tag, $value, $tag);\n } else {\n $el->appendChild($dom->createElement($tag, $value));\n }\n }\n\n return $el;\n }", "title": "" }, { "docid": "aa18732e3a5159666d9774fde8194eac", "score": "0.5668469", "text": "public function addElement($elementName, $content, $attributes = null)\n {\n $this->elements[$elementName]['name'] = $elementName;\n $this->elements[$elementName]['content'] = $content;\n $this->elements[$elementName]['attributes'] = $attributes;\n }", "title": "" }, { "docid": "ecbc136f78fb71aa4574b0dcd248bd94", "score": "0.5666017", "text": "function add_4_nodes(&$fxml,$ps,$elem){\n $h=$w=0.1; // size of node \n for($k=0;$k<4;$k++){ \n $dom=dom_import_simplexml($fxml);\n $dom = $fxml->addChild('node');\n $prefix=str_replace(\" \",\"_\",$elem);\n $dom->addAttribute('id', 'in_'.$prefix.$k);\n $dom->addAttribute('label',\"\");\n $att=$dom->addChild('att');\n $att->addAttribute('name',\"CellWhere localization\");\n $att->addAttribute('value',$elem);\n $graphics = $dom->addChild('graphics');\n $graphics->addAttribute('type', \"ELLIPSE\");\n $graphics->addAttribute('x', (string)$ps[$k][0]);\n $graphics->addAttribute('y', (string)$ps[$k][1]);\n $graphics->addAttribute('h', $h);\n $graphics->addAttribute('w', $w);\n } \n }", "title": "" }, { "docid": "8608e402c93b368faddd8cd94db2faaa", "score": "0.56601", "text": "protected function OnCreateElements() {}", "title": "" }, { "docid": "fa1765ac9437c548fee24b8f163c96f7", "score": "0.5651505", "text": "public function create(array $attributes = []);", "title": "" }, { "docid": "2d5b27788e4267f66aa8d2e7c52eab92", "score": "0.561784", "text": "public function create(array $atribute)\n {\n }", "title": "" }, { "docid": "eec473bceb7305a9a8a808cc78a03f8a", "score": "0.5610821", "text": "public static function createElement($properties) : Element\n {\n $properties['description'] ??= '';\n \n if (isset($properties['composite']) && $properties['composite']) {\n return new CompositeElement(\n $properties['name'],\n $properties['symbol'],\n $properties['definition'],\n $properties['description']\n );\n }\n \n return new SimpleElement(\n $properties['name'],\n $properties['symbol'],\n $properties['definition'],\n $properties['description']\n );\n }", "title": "" }, { "docid": "0b67dc298770efc19bbe104c6221a1cd", "score": "0.5609565", "text": "function create(array $attributes)\n {\n }", "title": "" }, { "docid": "eded4406a77cc07a332de611dbeb2ee3", "score": "0.5606197", "text": "public function xmlBuild($array, $parentkey = '', $xml = false)\n {\n foreach($array as $key => $value)\n {\n if(is_array($value))\n {\n $this->xmlBuild($value, is_numeric((string) $key) ? ('n' . $key) : $key, $xml->addChild(is_numeric((string) $key) ? $parentkey : $key));\n } \n else \n {\n $xml->addAttribute(is_numeric((string) $key) ? ('n' . $key) : $key, $value);\n }\n }\n\n return $xml->asXML();\n }", "title": "" }, { "docid": "c57759fc88807bb3868f6efd4414c930", "score": "0.5599172", "text": "function xmlToArray($strContent, $getAttributes = 1) {\n if (!$strContent)\n return array();\n\n if (!function_exists('xml_parser_create')) {\n return array();\n }\n\n //Get the XML parser of PHP - PHP must have this module for the parser to work\n $parser = xml_parser_create();\n xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);\n xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);\n xml_parse_into_struct($parser, $strContent, $xmlValues);\n xml_parser_free($parser);\n\n if (!$xmlValues)\n return;\n\n //Initializations\n $xmlArray = array();\n $parents = array();\n // $opened_tags = array();\n $arr = array();\n\n $current = &$xmlArray;\n\n //Go through the tags.\n foreach ($xmlValues as $data) {\n unset($attributes, $value); //Remove existing values, or there will be trouble\n extract($data); //We could use the array by itself, but this cooler.\n\n $result = '';\n if ($getAttributes) {//The second argument of the function decides this.\n $result = array();\n if (true == isset($value))\n $result['value'] = $value;\n\n //Set the attributes too.\n if (true == isset($attributes)) {\n foreach ($attributes as $attr => $val) {\n if (1 == $getAttributes)\n $result['attr'][$attr] = $val; //Set all the attributes in a array called 'attr'\n \n// :TODO: should we change the key name to '_attr'? Someone may use the tagname 'attr'. Same goes for 'value' too\n }\n }\n } elseif (true == isset($value)) {\n $result = $value;\n }\n\n //See tag status and do the needed.\n if ('open' == $type) { //The starting of the tag '<tag>'\n $parent[$level - 1] = &$current;\n\n if (!is_array($current) || (!in_array($tag, array_keys($current)))) { //Insert New tag\n $current[$tag] = $result;\n $current = &$current[$tag];\n } else { //There was another element with the same tag name\n if (true == isset($current[$tag][0])) {\n array_push($current[$tag], $result);\n } else {\n $current[$tag] = array($current[$tag], $result);\n }\n $last = count($current[$tag]) - 1;\n $current = &$current[$tag][$last];\n }\n } elseif ('complete' == $type) { //Tags that ends in 1 line '<tag />'\n //See if the key is already taken.\n if (!isset($current[$tag])) { //New Key\n $current[$tag] = $result;\n } else { //If taken, put all things inside a list(array)\n if (( is_array($current[$tag]) and 0 == $getAttributes )//If it is already an array...\n or ( isset($current[$tag][0]) and is_array($current[$tag][0]) and 1 == $getAttributes )) {\n array_push($current[$tag], $result); // ...push the new element into that array.\n } else { //If it is not an array...\n $current[$tag] = array($current[$tag], $result); //...Make it an array using using the existing value and the new value\n }\n }\n } elseif ('close' == $type) { //End of tag '</tag>'\n $current = &$parent[$level - 1];\n }\n }\n\n return( $xmlArray );\n}", "title": "" }, { "docid": "0cfafc7a3ec83fc3f81f4466e1c04323", "score": "0.5591545", "text": "function generate_arg($xw, $type, $arg, $attr)\n{\n // <arg1\n xmlwriter_start_element($xw, $arg);\n\n //type=\"label\">\n xmlwriter_start_attribute($xw, 'type');\n xmlwriter_text($xw, $type);\n xmlwriter_end_attribute($xw);\n\n // >end< //text\n xmlwriter_text($xw, $attr);\n\n // </arg1>\n xmlwriter_end_element($xw);\n}", "title": "" }, { "docid": "f69e47ce2eb5d9c9f3661e2ed2c96ae6", "score": "0.55897385", "text": "private function fromArray($xml, $data)\n {\n if (isset($data['@attr'])){\n foreach ($data['@attr'] as $k => $v){\n $xml->addAttribute($k, $v);\n }\n unset($data['@attr']);\n }\n foreach ($data as $key => $val){\n if (!is_array($val)){\n $xml->addChild($key, htmlspecialchars($val));\n continue;\n }\n if (!isset($val[0])){\n $val = array($val);\n }\n foreach ($val as $v){\n if (!is_array($v)){\n $xml->addChild($key, htmlspecialchars($v));\n continue;\n }\n if (isset($v['@value'])){\n $child = $xml->addChild($key, htmlspecialchars($v['@value']));\n unset($v['@value']);\n } else {\n $child = $xml->addChild($key);\n }\n $this->fromArray($child, $v);\n }\n }\n }", "title": "" }, { "docid": "bdf10eb13e04ec58260230594ce4923c", "score": "0.5576538", "text": "protected function getNewElement(string $name, string $value = ''): DOMElement\n {\n return !empty($this->namespace)\n ? $this->document->createElementNS($this->namespace, $this->elementPrefix.$name, $value)\n : $this->document->createElement($name, $value)\n ;\n }", "title": "" }, { "docid": "2afbe3a03cf19c3741521c6728e35f28", "score": "0.5571734", "text": "function createDOMTreefromArray( $name, $array, $root = false )\n {\n $doc = new eZDOMDocument( $name );\n if ( !$root )\n $root = $doc->createElementNode( $name );\n\n $keys = array_keys( $array );\n foreach ( $keys as $key )\n {\n if ( is_array( $array[$key] ) )\n {\n $node = XROWRecurringordersCommonFunctions::createDOMTreefromArray( $key, $array[$key] );\n $root->appendChild( $node );\n }\n else\n {\n $node = $doc->createElementNode( (string)$key );\n $node->appendChild( $doc->createTextNode( $array[$key] ) );\n $root->appendChild( $node );\n }\n unset( $node );\n }\n return $root;\n }", "title": "" }, { "docid": "641f966081983a33920beac04451fad3", "score": "0.55681807", "text": "function simplexml_import_simplexml(SimpleXMLElement $parent, SimpleXMLElement $child, $before = false){\n\t// \tcheck if there is something to add\n\tif ($child[0] == NULL) {\n\t\treturn true;\n\t}\n\t// \tif it is a list of SimpleXMLElements default to the first one\n\t$child = $child[0];\n\t// \tinsert attribute\n\tif ($child->xpath('.') != array($child)) {\n\t\t$parent[$child->getName()] = (string)$child;\n\t\treturn true;\n\t}\n\t$xml = $child->asXML();\n\t// \tremove the XML declaration on document elements\n\tif ($child->xpath('/*') == array($child)) {\n\t\t$pos = strpos($xml, \"\\n\");\n\t\t$xml = substr($xml, $pos + 1);\n\t}\n\treturn simplexml_import_xml($parent, $xml, $before);\n}", "title": "" }, { "docid": "4410c0c537e711774d1fd736ced6abde", "score": "0.55614775", "text": "public function addChildWithCDATA($name, $value = NULL) { \n\t\t$new_child = $this->addChild($name); \n\t\tif ($new_child !== NULL) { \n\t\t$node = dom_import_simplexml($new_child);\n\t\t$no=$node->ownerDocument; $node->appendChild($no->createCDATASection($value)); \n\t} \n\treturn $new_child; \n\t}", "title": "" }, { "docid": "aa6a1d13e23e6a7cd60e87ca7302f8c0", "score": "0.55438274", "text": "function gen_arg($xw, $type, $arg, $attr)\n{\n // <arg1\n xmlwriter_start_element($xw, $arg);\n\n //type=\"label\">\n xmlwriter_start_attribute($xw, 'type');\n xmlwriter_text($xw, $type);\n xmlwriter_end_attribute($xw);\n\n // >end< //text\n xmlwriter_text($xw, $attr);\n\n // </arg1>\n xmlwriter_end_element($xw);\n}", "title": "" }, { "docid": "4df0e4a6e4f55dc7fe8d2bc6e90f6c2f", "score": "0.5543177", "text": "public function createNode($node_name, $value = null, $uri = null, $before = false) {\n\t\t//var_dump($this->_element_class);\n\t\t$element = new $this->_element_class($node_name, $value, $uri);\n\t\treturn $this->documentElement->appendNode($element, $before);\n\t}", "title": "" }, { "docid": "4d0040641bd85e377386acc0cc0c3b9d", "score": "0.5540566", "text": "function init($attribs) {\n parent::init($attribs);\n \n $rootElement = $this->getAttrib(\"element\");\n $rootNs = $this->getAttrib(\"ns\",array(\"http\"));\n $rootPrefix = $this->getAttrib(\"prefix\");\n $this->xml = new DomDocument();\n \n if ($rootNs) {\n $this->xmlRoot = $this->xml->appendChild($this->xml->createElementNs($rootNs,$rootElement));\n } else {\n $this->xmlRoot = $this->xml->appendChild($this->xml->createElement($rootElement));\n }\n }", "title": "" }, { "docid": "e82e85e372c841a81101e747821eed41", "score": "0.5530432", "text": "public function toXml($data, $rootNodeName = 'data', &$xml=null)\n {\n if ( ini_get('zend.ze1_compatibility_mode') == 1 ) ini_set ( 'zend.ze1_compatibility_mode', 0 );\n if ( is_null( $xml ) ) {\n $xml = simplexml_load_string(stripslashes(\"<?xml version='1.0' encoding='UTF-8'?><$rootNodeName></$rootNodeName>\"));\n }\n\n// payLog('mima.txt',print_r($data,true). \"+++72\");\n\n // loop through the data passed in.\n foreach( $data as $key => $value ) {\n\n // no numeric keys in our xml please!\n $numeric = false;\n if ( is_numeric( $key ) ) {\n $numeric = 1;\n $key = $rootNodeName;\n }\n\n // delete any char not allowed in XML element names\n $key = preg_replace('/[^a-z0-9\\-\\_\\.\\:]/i', '', $key);\n\n //check to see if there should be an attribute added (expecting to see _id_)\n $attrs = false;\n\n //if there are attributes in the array (denoted by attr_**) then add as XML attributes\n if ( is_array( $value ) ) {\n foreach($value as $i => $v ) {\n $attr_start = false;\n $attr_start = stripos($i, 'attr_');\n if ($attr_start === 0) {\n $attrs[substr($i, 5)] = $v; unset($value[$i]);\n }\n }\n }\n\n\n // if there is another array found recursively call this function\n if ( is_array( $value ) ) {\n if ( $this->is_assoc( $value ) || $numeric ) {\n // older SimpleXMLElement Libraries do not have the addChild Method\n if (method_exists('SimpleXMLElement','addChild')) {\n $node = $xml->addChild( $key, null);\n if ($attrs) {\n foreach($attrs as $key => $attribute) {\n $node->addAttribute($key, $attribute);\n }\n }\n }\n\n }else{\n $node =$xml;\n }\n\n // recrusive call.\n if ( $numeric ) $key = 'anon';\n\n $this->toXml( $value, $key, $node );\n } else {\n\n // older SimplXMLElement Libraries do not have the addChild Method\n if (method_exists('SimpleXMLElement','addChild')) {\n $childnode = $xml->addChild( $key, $value);\n if ($attrs) {\n foreach($attrs as $key => $attribute) {\n $childnode->addAttribute($key, $attribute);\n }\n }\n }\n }\n }\n\n// if ($this->bFormatted) {\n// // if you want the XML to be formatted, use the below instead to return the XML\n// $doc = new DOMDocument('1.0');\n// $doc->preserveWhiteSpace = false;\n// @$doc->loadXML( $this->fixCDATA($xml->asXML()) );\n// $doc->formatOutput = true;\n//\n// return $doc->saveXML();\n// }\n\n // pass back as unformatted XML\n// payLog('mima.txt',print_r($xml->asXML(),true). \"+++149\");\n return $xml->asXML();\n }", "title": "" }, { "docid": "27ae223449750e8677c442c918777b17", "score": "0.5518679", "text": "private function createXpifOperationAttributesNode() {\n $xoa = new DOMDocument;\n\n $xpif_operation_attributes = $xoa->createElement(\"xpif-operation-attributes\");\n\n $document_format = $xoa->createElement(\"document-format\", $this->document_format);\n $document_format->setAttribute(\"syntax\", \"mimeMediaType\");\n $job_name = $xoa->createElement(\"job-name\", $this->job_name);\n $job_name->setAttribute(\"syntax\", \"name\");\n $job_name->setAttribute(\"xml:space\", \"preserve\");\n $requesting_user_name = $xoa->createElement(\"requesting-user-name\", $this->requesting_user_name);\n $requesting_user_name->setAttribute(\"syntax\", \"name\");\n $requesting_user_name->setAttribute(\"xml:space\", \"preserve\");\n\n //append\n $xpif_operation_attributes->appendChild($document_format);\n $xpif_operation_attributes->appendChild($job_name);\n $xpif_operation_attributes->appendChild($requesting_user_name);\n $xoa->appendChild($xpif_operation_attributes);\n\n //return a DOMNode for the xpif-operation-attributes\n return $xoa->getElementsByTagName(\"xpif-operation-attributes\")->item(0);\n }", "title": "" }, { "docid": "a12f85778ae889e627395c4199a1fbff", "score": "0.55178636", "text": "public function toXML()\n {\n $xml = new SimpleXMLElement('<' . array_pop(explode('\\\\', get_class($this))) . '/>');\n foreach ($this->first()->attributes as $key => $value) {\n if (is_numeric($key)) {\n $key = 'item' . $key; //dealing with <0/>..<n/> issues\n }\n if (is_array($value)) {\n $subnode = $xml->addChild($key);\n $this->array_to_xml($value, $subnode);\n } else {\n $xml->addChild(\"$key\", htmlspecialchars(\"$value\"));\n }\n }\n return $xml->asXML();\n }", "title": "" }, { "docid": "346e5e822390e9d9b05a891ad6a9c24e", "score": "0.5516747", "text": "function __construct($name, $data, $attributes=null ) \n {\n $this->elementName = $name;\n $this->elementData = $data;\n if (is_null($attributes) == false) {\n $this->elementAttributes = $attributes;\n } else {\n $this->elementAttributes = array();\n }\n }", "title": "" }, { "docid": "f220b1ccacdd17b01861260b49de69c2", "score": "0.551545", "text": "protected function get_simple_xml_element ($opts)\n {\n if (isset($opts['element']))\n {\n if ($opts['element'] instanceof \\SimpleXMLElement)\n {\n $xml = $opts['element'];\n }\n elseif (is_string($opts['element']))\n {\n $xml = new \\SimpleXMLElement($opts['element']);\n }\n else\n {\n throw new \\Exception(\"Invalid XML passed.\");\n }\n }\n elseif (isset($opts['parent_element']))\n {\n if ($opts['parent_element'] instanceof \\SimpleXMLElement)\n {\n $parent = $opts['parent_element'];\n }\n elseif (is_string($opts['parent_element']))\n {\n $parent = new \\SimpleXMLElement($opts['parent_element']);\n }\n else\n {\n throw new \\Exception(\"Invalid parent XML passed.\");\n }\n\n if (isset($opts['child_element']))\n {\n $tag = $opts['child_element'];\n }\n elseif (isset($opts['default_tag']))\n {\n $tag = $opts['default_tag'];\n }\n else\n {\n $tag = $this->get_classname();\n }\n\n $xml = $parent->addChild($tag);\n }\n elseif (isset($opts['default_element']))\n {\n $defxml = $opts['default_element'];\n if ($defxml instanceof \\SimpleXMLElement)\n {\n $xml = $defxml;\n }\n elseif (is_string($defxml))\n {\n $xml = new \\SimpleXMLElement($defxml);\n }\n else\n {\n throw new \\Exception(\"Invalid default XML passed.\");\n }\n }\n elseif (isset($opts['default_tag']))\n {\n $defxml = '<'.$opts['default_tag'].'/>';\n $xml = new \\SimpleXMLElement($defxml);\n }\n else\n {\n $defxml = '<'.$this->get_classname().'/>';\n $xml = new \\SimpleXMLElement($defxml);\n }\n return $xml;\n }", "title": "" }, { "docid": "3379b7ad4539f21bd9a95962d0a7305b", "score": "0.55150247", "text": "private function _convertArrayToXml(string $nodeName, array $arr = [])\n {\n $node = $this->_xml->createElement($nodeName);\n\n if (is_array($arr)) {\n if (isset($arr['@attributes'])) {\n foreach ($arr['@attributes'] as $key => $value) {\n if (!$this->_isValidTagName($key)) {\n trigger_error(\"Illegal attribute name: \\\"{$key}\\\" in node \\\"{$nodeName}\\\"\");\n }\n $node->setAttribute($key, self::_valueToString($value));\n }\n unset($arr['@attributes']);\n }\n\n // check if it has a value stored in @value, if yes store the value and return\n // else check if its directly stored as string\n if (isset($arr['@value'])) {\n $node->appendChild($this->_xml->createTextNode($this->_valueToString($arr['@value'])));\n unset($arr['@value']);\n return $node;\n } else if (isset($arr['@cdata'])) {\n $node->appendChild($this->_xml->createCDATASection($this->_valueToString($arr['@cdata'])));\n unset($arr['@cdata']);\n return $node;\n }\n }\n\n if (is_array($arr)) {\n foreach ($arr as $key => $value) {\n if (!$this->_isValidTagName($key)) {\n trigger_error(\"Illegal tag name: \\\"{$key}\\\" in node \\\"{$nodeName}\\\"\");\n }\n if (is_array($value) && is_numeric(key($value))) {\n $numericKeyName = $this->_options['numericKeysName'] ?? $key;\n foreach ($value as $subValue) {\n $node->appendChild($this->_convertArrayToXml(\n $numericKeyName,\n $subValue\n ));\n }\n } else {\n $node->appendChild($this->_convertArrayToXml($key, $value));\n }\n unset($arr[$key]);\n }\n }\n\n if (!is_array($arr)) {\n $node->appendChild($this->_xml->createTextNode($this->_valueToString($arr)));\n }\n\n return $node;\n }", "title": "" }, { "docid": "15e4934ec60754065e7926f3679a2460", "score": "0.5510458", "text": "function xml_create_archive()\n\t{\n\t\t$this->xml->xml_set_root( 'xmlarchive', array( 'generator' => 'IPB', 'created' => time() ) );\n\t\t$this->xml->xml_add_group( 'fileset' );\n\t\t\n\t\t$entry = array();\n\t\t\n\t\tforeach( $this->file_array as $f )\n\t\t{\n\t\t\t$content = array();\n\t\t\t\n\t\t\tforeach ( $f as $k => $v )\n\t\t\t{\n\t\t\t\tif ( $k == 'content' )\n\t\t\t\t{\n\t\t\t\t\t$v = chunk_split(base64_encode($v));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$content[] = $this->xml->xml_build_simple_tag( $k, $v );\n\t\t\t}\n\t\t\t\n\t\t\t$entry[] = $this->xml->xml_build_entry( 'file', $content );\n\t\t}\n\t\t\n\t\t$this->xml->xml_add_entry_to_group( 'fileset', $entry );\n\t\t\n\t\t$this->xml->xml_format_document();\n\t}", "title": "" }, { "docid": "b105fcef82090fe4aff88e96ede03ae0", "score": "0.5497657", "text": "public static function create (string $tag, $content = NULL, iterable $attributes = []);", "title": "" } ]
772735b0cd877b129835d1d6cbf829ee
Run Instance This method enables you to create new Cloud Servers by specifying a flexible set of configuration parameters.
[ { "docid": "a51edc1fc20f95c2ac6721679f798df9", "score": "0.0", "text": "public function create_instance($setData, $output='array') {\n\t\t$dataError = false;\n\t\t\n\t\t$data['Action'] = 'run-instance';\n\t\t\n\t\t\n\t\t// Cleanup all the submitted data values\n\t\t$setData = array_map('trim', $setData);\n\t\t\n\t\t// Error Checking\n\t\tif( !isset($setData['servername']) || empty($setData['servername']) ) { $dataError = true; $dataErrorName[]='servername'; }\n\t\tif( !isset($setData['imageid']) || empty($setData['imageid']) ) { $dataError = true; $dataErrorName[]='imageid'; }\n\t\tif( !isset($setData['planname']) || empty($setData['planname']) ) { $dataError = true; $dataErrorName[]='planname'; }\n\t\tif( !isset($setData['vm_location']) || empty($setData['vm_location']) ) { $dataError = true; $dataErrorName[]='vm_location'; }\n\t\t\n\t\tif($dataError) {\n\t\t\tforeach($dataErrorName as $e) {\n\t\t\t\techo \"You must submit a value for '$e'\".PHP_EOL;\n\t\t\t}\n\t\t\texit();\n\t\t}\n\t\t\n\t\t/** Set Require Attributes **/\n\t\t$data['servername'] = $setData['servername'];\n\t\t$data['imageid'] = $setData['imageid'];\n\t\t$data['planname'] = $setData['planname'];\n\t\t$data['vm_location'] = $setData['vm_location'];\n\t\t\n\t\t/** Option Attributes **/\n\t\tif( isset($setData['enablebackup']) && !empty($setData['enablebackup']) ) {\n\t\t\t$data['enablebackup'] = $setData['enablebackup'];\n\t\t}\n\t\t\n\t\tif( isset($setData['cloneimage']) && !empty($setData['cloneimage']) ) {\n\t\t\t$data['cloneimage'] = $setData['cloneimage'];\n\t\t}\n\t\t\n\t\tif( isset($data['serverqty']) && !empty($data['serverqty']) ) {\n\t\t\t$data['serverqty'] = $setData['serverqty'];\n\t\t} else {\n\t\t\t$data['serverqty'] = 1;\n\t\t}\n\t\t\n\t\tif( isset($setData['key_id']) && !empty($setData['key_id']) ) {\n\t\t\t$data['key_id'] = $setData['key_id'];\n\t\t}\n\n\t\treturn $this->http_post($data, $output);\n\t}", "title": "" } ]
[ { "docid": "69d6bbd9e9f220987b2607f4a033d116", "score": "0.64542353", "text": "public function run()\n {\n $version =include base_path().'/version.php';\n \\App\\Models\\Cloud::create([\n 'api_host' => null,\n 'build' => $version['build'],\n 'access_token' => null,\n 'refresh_token' => null,\n ]);\n }", "title": "" }, { "docid": "0bff6cf2c905b5fd0be7913d84c7ca71", "score": "0.63531965", "text": "public function run()\n {\n $Service = [\n [\n 'code' => 'ENG',\n 'description' => 'This is service for fixing the engine ',\n 'cost' => 1500,\n 'provided_by' => 'Samuel'\n ],\n [\n 'code' => 'ELEC',\n 'description' => 'This is service for fixing the car wiring',\n 'cost' => 4500,\n 'provided_by' => 'Mike'\n ],\n [\n 'code' => 'MIR',\n 'description' => 'This is service for fixing the the lights and mirrors',\n 'cost' => 1000,\n 'provided_by' => 'Bob'\n ]\n ];\n\n\n foreach ($Service as $service) {\n Servicing::create(array(\n 'code' => $service['code'],\n 'description' => $service['description'],\n 'cost' => $service['cost'],\n 'provided_by' => $service['provided_by'],\n ));\n }\n }", "title": "" }, { "docid": "8ce4584b6d42e6edec41938bbed6d136", "score": "0.6288018", "text": "public function run() {\n\t\t\t$services = ['Piscina', 'Fronte mare', 'Lavanderia', 'Canile', 'WiFi', 'Palestra', 'Tornio', 'Specchio a soffitto', 'Materasso ad acqua', 'Frustini in pelle'];\n\t\t\tforeach ($services as $service) {\n\t\t\t\t\\App\\Service::create(['name' => $service]);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "0495c830ed57e45edca46b5b1e98c783", "score": "0.6155949", "text": "public function run()\n {\n $services = [\n [\n 'name' => 'Tollerie',\n 'description' => 'Allume cigare'\n ],\n [\n 'name' => 'Mecanique',\n 'description' => 'RK7 / RCD'\n ],\n [\n 'name' => 'Electricité',\n 'description' => 'Essuie Glace AV'\n ],\n [\n 'name' => 'Electronique',\n 'description' => 'Essuie Glace AR'\n ],\n ];\n\n foreach ($services as $key => $service) {\n Service::create($service);\n }\n }", "title": "" }, { "docid": "d88f2db4fb2a084fd3a3e8b9e52e7e87", "score": "0.6151447", "text": "public function run()\n {\n $allservices = [\n \t'Internet','Dark Fiber','Local Loop','Machine Servicing','RTU Monitoring','Network Planning and Design'\n\n ];\n foreach ($allservices as $value) {\n Service::create(['name' => $value]);\n }\n }", "title": "" }, { "docid": "374371b7bcaece93a011f3e5fa935f82", "score": "0.60861695", "text": "public function run()\n {\n Client::create([\n \t\t'organization_name' => 'Default Organization',\n \t\t'phone_number' => '1231241244',\n \t\t'contact_name' => 'Tom',\n \t\t'contact_email' => '[email protected]' \t\t\n\t\t]);\n }", "title": "" }, { "docid": "ada84c50e9650cca9f41051fa1bd15ff", "score": "0.6061788", "text": "public function run()\n {\n\n client::create([\n 'name' => 'maria',\n 'surname' => 'perez',\n 'email' => '[email protected]',\n 'wallet' => 500,\n ]);\n }", "title": "" }, { "docid": "416fe84b41eba24d128526b46c01fd1c", "score": "0.59959906", "text": "public function run()\n {\n Server::factory()->count(5)->hasServices(5)->create()->each(function (Server $server) {\n $server->services()->each(function (Service $service) use ($server) {\n $service->name = $server->name . ' ' . $service->name;\n $service->save();\n });\n });\n }", "title": "" }, { "docid": "9ab78b665c7d6f6618d49f47883caf0e", "score": "0.5993606", "text": "public function run()\n {\n ServiceCategory::create(\n [\n 'name' => 'server',\n 'placeholder' => 'Сервер'\n ]\n );\n ServiceCategory::create(\n [\n 'name' => 'side',\n 'placeholder' => 'Сторона'\n ]\n );\n ServiceCategory::create(\n [\n 'name' => 'class',\n 'placeholder' => 'Клас'\n ]\n );\n ServiceCategory::create(\n [\n 'name' => 'type',\n 'placeholder' => 'Тип'\n ]\n );\n }", "title": "" }, { "docid": "57f278148cdfc91816c5518b18d143b7", "score": "0.59767336", "text": "public function run()\n {\n Service::Create([\n 'name'=>\"Ai Services\",\n 'location'=>'Meru county',\n 'details'=>'I provide AI services within Igembe south area',\n 'image'=>'services/ai.jpeg',\n 'user_id'=>1,\n\n ]);\n Service::Create([\n 'name'=>\"Veterinary services\",\n 'location'=>'Meru county',\n 'details'=>'I provide AI services within Imenti south area',\n 'image'=>'services/vet.jpeg',\n 'user_id'=>1,\n\n ]);\n Service::Create([\n 'name'=>\"Crop spraying\",\n 'location'=>'Meru county',\n 'details'=>'I provide AI services within Maua area',\n 'image'=>'services/images.jpeg',\n 'user_id'=>1,\n\n ]);\n }", "title": "" }, { "docid": "3681957f780a5a1813c07327f91ad9df", "score": "0.5972183", "text": "public function run()\n\t\t{\n\n\t\t\t\tfactory( Client::class, 6 )->create();\n\t\t}", "title": "" }, { "docid": "d65e5b8a5cf5b44d5a64f1f173bb85d4", "score": "0.5923036", "text": "public function run(): void\n {\n // Create data for live deployment here\n }", "title": "" }, { "docid": "49940530632145d4953d25e96cb07780", "score": "0.5899003", "text": "public function run()\n {\n $services = [\n 'Демонтаж',\n 'Вывоз',\n 'Прием на переработку',\n 'Прием',\n 'Снос зданий и сооружений',\n 'Утилизация автомобилей и спецтехники',\n 'Погрузчик',\n 'Цветной металл',\n 'Черный металл',\n 'Бытовой металл',\n 'Нержавейка',\n 'Стружка',\n 'Кабель',\n 'Свинец',\n 'Бумага',\n 'Полиэтилен',\n 'Пленка ПВХ',\n 'Пластмасса',\n 'Поликарбонат',\n 'ПЭТ',\n ];\n\n foreach ($services as $service){\n factory(\\App\\Service::class)->create(['name' => $service]);\n }\n }", "title": "" }, { "docid": "b13b8a68ac319dea7d47dcec0a8a8880", "score": "0.58980405", "text": "public function run()\n {\n Client::create([\n 'nombre' => 'Marco',\n 'apellido' => 'Araya',\n 'rut' => 188878474,\n 'direccion' => 'Pobl. Miramar, Niebla',\n 'telefono' => '985993273',\n 'correo' => '[email protected]',\n ]);\n\n Client::create([\n 'nombre' => 'Francisco',\n 'apellido' => 'Gonzalez',\n 'rut' => 187845444,\n 'direccion' => 'Clemente Escobar 4010',\n 'telefono' => '974332180',\n 'correo' => '[email protected]',\n ]);\n }", "title": "" }, { "docid": "45cf9df0deb8ab8a238caf09a18449d1", "score": "0.58661795", "text": "public function run()\n {\n $items = [\n \n ['id' => 1, \n 'server_id' => '1',\n 'mounted_platforms' => '32',\n 'sftp_directories' => '/mnt/alant-ld_ulbridge-posttrade/sftp | /mnt/dzb-ld_ulbridge-posttrade/sftp',\n 'sftp_client_pass' => 'X'\n ],\n ];\n\n foreach ($items as $item) {\n \\App\\Platform::create($item);\n }\n }", "title": "" }, { "docid": "474d7d136bcab72a54f31a335096005f", "score": "0.58256423", "text": "public function run()\n {\n Client::create([\n 'name' => 'Juan Pérez',\n 'phone' => '9999999999',\n 'email' => '[email protected]',\n 'company' => 'Empresa de Juan',\n 'trade_name' => 'Juan Inc.',\n 'rfc' => 'CUPU800825569',\n 'address' => 'Calle 3C #284 por 20A Residencial Galerías',\n 'zipcode' => '97204'\n ]);\n }", "title": "" }, { "docid": "b590b0572a4acfb441670021f258ba41", "score": "0.5768917", "text": "public function run()\n {\n Client::create(\n [\n 'name' => 'Daniel',\n 'last_name' => 'Aguayo',\n 'status' => true\n ]\n );\n\n Client::create(\n [\n 'name' => 'Fabiola',\n 'last_name' => 'Perez',\n 'status' => true\n ]\n );\n\n Client::create(\n [\n 'name' => 'Carlos',\n 'last_name' => 'Sandoval',\n 'status' => false\n ]\n );\n }", "title": "" }, { "docid": "f045c05ac47c76a85eae24b79ee6e478", "score": "0.5766885", "text": "public function run()\n {\n Client::create([\n 'name' => 'Dua Lipa',\n 'image' => 'img/avatar/01.jpg',\n 'job' => 'CEO Company',\n ]);\n Client::create([\n 'name' => 'Emma Watson',\n 'image' => 'img/avatar/02.jpg',\n 'job' => 'Head Manager Company',\n ]);\n }", "title": "" }, { "docid": "1c1e482d81252698e20f3b60ad70e7d8", "score": "0.57353777", "text": "function run($options){\n\t\t//if($this->checkRequirements($options['db_server'], $options['db_user'], $options['db_password'], $options['db_name'], $options['universe_title'], $options['universe_url'], $options['universe_salt'])){\n\t\tif(true){\n include_once('../inc/classes/class_universe.php');\n //create first config to create folders\n $universe = new universe();\n $universe->createConfig($options);\n $this->createUniverseDB();\n \n //\n\t\t\t//$this->createServerConfigFile();\n\t\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "ec2a4cd8bb1565c8205764bef1b455ce", "score": "0.57325757", "text": "public function run()\n {\n $services = [\n [\n 'name' => 'AUDIOMETRIA'\n ],\n [\n 'name' => 'RADIOLOGIA DIGITAL'\n ],\n [\n 'name' => 'LABORATORIO CLINICO'\n ],\n [\n 'name' => 'EXAMEN FISICO'\n ],\n [\n 'name' => 'ERGONOMIA - MUSCULOESQUELETICO'\n ],\n [\n 'name' => 'OFTALMOLOGIA'\n ],\n [\n 'name' => 'ODONTOLOGIA'\n ],\n [\n 'name' => 'ELECTROCARDIOGRAMA'\n ],\n [\n 'name' => 'PSICOLOGIA'\n ],\n [\n 'name' => 'ESPIROMETRIA'\n ],\n\n\n ];\n\n foreach ($services as $service){\n Service::factory(1)->create($service);\n }\n }", "title": "" }, { "docid": "6d8f41c039fafa70505fb26f8885cb74", "score": "0.5725564", "text": "public function run()\n {\n //\n SiteConfig::Create([\n 'site_title' => 'Web App Starter',\n 'front_page_title' => 'Welcome To Our Site',\n 'front_page_body' => 'Welcome to our site. Please feel free to browse!'\n ]);\n }", "title": "" }, { "docid": "5c3a891553261a643eea85276c858471", "score": "0.57152736", "text": "public function run()\n {\n $domains = [\"http://127.0.0.1:8000\", \"http://192.168.1.30:8080\"];\n\n foreach ($domains as $domain) {\n App\\Domain::create([\"domain\" => $domain]);\n }\n\n //factory(App\\Article::class, 50)->create();\n }", "title": "" }, { "docid": "125b59945544a56d0eeaf7be88ebcfdf", "score": "0.5714226", "text": "public function run() {\n $serviceNames = array('EIRC Report', 'Consumer Unit Replacement');\n $types = array('House', 'Flat / Appartment', 'Bungalow');\n $bedroomNumbers = array('Studio', '1', '2', '3', '4', '5');\n\n foreach ($serviceNames as $serviceName) {\n $service = new Service;\n\n $service->name = $serviceName;\n $service->slug = Str::slug($serviceName);\n\n $service->save();\n\n foreach ($types as $type) {\n foreach ($bedroomNumbers as $bedroomNumber) {\n $serviceVariant = new ServiceVariant;\n\n $serviceVariant->service_id = $service->id;\n $serviceVariant->bedroom_number = $bedroomNumber;\n $serviceVariant->type = $type;\n $serviceVariant->duration = 60;\n $serviceVariant->price = 1;\n\n $serviceVariant->save();\n }\n }\n }\n }", "title": "" }, { "docid": "c3a886dd265d4326064739a15f57eccd", "score": "0.57070494", "text": "protected function configure()\n {\n $this\n ->setName('init')\n ->setDescription('Create a new Envoy file in the current directory.')\n ->addArgument('host', InputArgument::REQUIRED, 'The host server to initialize with.');\n }", "title": "" }, { "docid": "2d8c0a3d58aeb5f5d6a01096c048e2b1", "score": "0.5688382", "text": "public function run()\n {\n \\App\\Models\\Tenant::create([\n 'name' => 'De Gazelle',\n 'subdomain' => 'gazelle',\n 'domain' => 'gazelle.test',\n ]);\n\n \\App\\Models\\Tenant::create([\n 'name' => 'Het Boszicht',\n 'subdomain' => 'boszicht',\n 'domain' => 'boszicht.test',\n 'use_domain' => true,\n ]);\n\n\n }", "title": "" }, { "docid": "e285c2c7c825e17b66d81719038df4ae", "score": "0.5659883", "text": "protected function configure()\n {\n $this\n ->setName('server')\n ->setDescription('Start the Snowflake ZeroMQ server')\n ->addOption('worker', null, InputOption::VALUE_OPTIONAL, 'Worker Id.', 1)\n ->addOption('dc', null, InputOption::VALUE_OPTIONAL, 'Datacenter Id.', 1)\n ->addOption('port', null, InputOption::VALUE_OPTIONAL, 'Set the server port.', 5599);\n }", "title": "" }, { "docid": "6c5fe4d26e49c2ef4facc6bdbdcd0f52", "score": "0.56392133", "text": "public function run()\n {\n Cliente::create([\n 'nombre' => 'pepe',\n 'tipo_documento' => 'CEDULA',\n 'num_documento' => '11111111',\n 'direccion' => 'tucapel',\n 'telefono' => '572222222',\n 'email' => '[email protected]'\n ]);\n }", "title": "" }, { "docid": "1a5542e04664e4684ec5459861b048bc", "score": "0.5639196", "text": "public function run()\n {\n\n factory(App\\Service::class,10)->create();\n }", "title": "" }, { "docid": "cfd2573bedbaf15dd192c0f895e884d3", "score": "0.56201714", "text": "public function run()\n {\n Service::create([\n \t'icon'=>'frontend/img/service/4.png',\n \t'title'=>'Google Analytics',\n \t'description'=>'Lorem ipsum dolor sit amet consectetur adipisicing',\n ]);\n Service::create([\n \t'icon'=>'frontend/img/service/5.png',\n \t'title'=>'Digital Marketing',\n \t'description'=>'Lorem ipsum dolor sit amet consectetur adipisicing',\n ]);\n Service::create([\n \t'icon'=>'frontend/img/service/6.png',\n \t'title'=>'Content Managment',\n \t'description'=>'Lorem ipsum dolor sit amet consectetur adipisicing',\n ]);\n Service::create([\n \t'icon'=>'frontend/img/service/1.png',\n \t'title'=>'Web Development',\n \t'description'=>'Lorem ipsum dolor sit amet consectetur adipisicing',\n ]);\n Service::create([\n \t'icon'=>'frontend/img/service/2.png',\n \t'title'=>'Api integration',\n \t'description'=>'Lorem ipsum dolor sit amet consectetur adipisicing',\n ]);\n Service::create([\n \t'icon'=>'frontend/img/service/3.png',\n \t'title'=>'Srarch Engine',\n \t'description'=>'Lorem ipsum dolor sit amet consectetur adipisicing',\n ]);\n \n }", "title": "" }, { "docid": "4dfc6cfaf75390ab80751f9128368113", "score": "0.5611596", "text": "private function createServer(): Create\n {\n $bEnableBackups = self::ENVIRONMENTS[$this->sEnvironment] === self::ENV_PRODUCTION;\n\n $this->logln('');\n\n // --------------------------------------------------------------------------\n\n $this->log('Generating temporary SSH key... ');\n $oPrivateKey = $this->generateSshKey();\n $this->logln('<info>' . $oPrivateKey->getPublicKey()->getFingerprint() . '</info>');\n\n // --------------------------------------------------------------------------\n\n $this->log('Creating server... ');\n\n // @todo (Pablo - 2019-08-02) - Register with Shed API, but in a pending state\n\n $oServer = $this->oProvider->create(\n $this->sDomain,\n $this->sHostname,\n self::ENVIRONMENTS[$this->sEnvironment],\n self::FRAMEWORKS[$this->sFramework],\n $this->oAccount,\n $this->oRegion,\n $this->oSize,\n $this->oImage,\n $this->aProviderOptions,\n $this->aKeywords,\n $this->sDeployKey,\n $oPrivateKey\n );\n $this->logln('<info>done</info>');\n $this->logln('Server IP is <info>' . $oServer->getIp() . '</info>');\n\n // --------------------------------------------------------------------------\n\n $oSsh = $this->waitForSsh($oServer, $oPrivateKey);\n\n // --------------------------------------------------------------------------\n\n $this\n ->disableRootLogin($oSsh)\n ->randomiseRootPassword($oSsh)\n ->setDomainEnvVar($oSsh)\n ->configureHostname($oSsh)\n ->addDeployKey($oSsh)\n ->configureMySQL($oSsh)\n ->secureMySQL($oSsh)\n ->configureBackups($oSsh, $bEnableBackups)\n ->configureSsl($oSsh, $oServer)\n ->updateDependencies($oSsh)\n ->provisionFramework($oSsh)\n ->reboot($oSsh);\n\n // --------------------------------------------------------------------------\n\n try {\n // @todo (Pablo - 2019-08-02) - Update server state with Shed API\n $this->log('Registering with the Shed API... ');\n ShedApi::createServer($this->oShedAccount, $oServer);\n $this->logln('<info>done</info>');\n } catch (Exception $e) {\n $this->warning(array_filter([\n 'Failed to register server with the Shed API',\n $e->getMessage(),\n ]));\n }\n\n // --------------------------------------------------------------------------\n\n $this->keyValueList(\n [\n 'ID' => $oServer->getId(),\n 'IP Address' => $oServer->getIp(),\n 'Domain' => $oServer->getDomain(),\n 'Disk' => $oServer->getDisk()->getLabel(),\n 'Image' => $oServer->getImage()->getLabel(),\n 'Region' => $oServer->getRegion()->getLabel(),\n 'Size' => $oServer->getSize()->getLabel(),\n ],\n 'Server Details'\n );\n\n if ($this->shouldConfigureMySQL()) {\n if (!empty($this->oDbConfig->error)) {\n $this->warning(\n array_filter(\n array_merge(\n ['There was an error configuring MySQL:'],\n (array) $this->oDbConfig->error,\n $bEnableBackups\n ? ['Additionally, you will have to configure backups manually']\n : [null]\n )\n )\n );\n } else {\n $this->keyValueList(\n [\n 'MySQL host' => '127.0.0.1 (over SSH)',\n 'MySQL user' => $this->oDbConfig->user,\n 'MySQL pass' => $this->oDbConfig->password,\n 'MySQL databases' => implode(', ', $this->oDbConfig->databases),\n ],\n 'MySQL Details'\n );\n }\n }\n\n if ($this->oProvisionOutput) {\n $this->keyValueList(\n (array) $this->oProvisionOutput,\n 'Framework'\n );\n }\n\n // --------------------------------------------------------------------------\n\n return $this;\n }", "title": "" }, { "docid": "e7dceb0b4909ce682473b8b7cfaea260", "score": "0.55925673", "text": "public function run()\n {\n WeatherEngine::create(['name' => 'Default Weather / No 3rd Party Engine']);\n WeatherEngine::create(['name' => 'Active Sky Next']);\n WeatherEngine::create(['name' => 'Active Sky 2016 (32-bit for FSX/P3Dv1-3)']);\n WeatherEngine::create(['name' => 'Active Sky (64-bit for P3Dv4)']);\n WeatherEngine::create(['name' => 'REX SkyForce']);\n WeatherEngine::create(['name' => 'FS Global Real Weather']);\n WeatherEngine::create(['name' => 'FSXWX']);\n WeatherEngine::create(['name' => 'NOAA Weather Plugin for XP11']);\n WeatherEngine::create(['name' => 'XEnviro for XP11']);\n WeatherEngine::create(['name' => 'Other']);\n }", "title": "" }, { "docid": "0f1df4c1c44cedccf2e340daece05dae", "score": "0.5579131", "text": "public function run()\n {\n //\n $subservice = new Subservice;\n $subservice->name = 'Android Backend Development';\n $subservice->service_id = 1;\n $subservice->save();\n\n $subservice = new Subservice;\n $subservice->name = 'Android Frontend Development';\n $subservice->service_id = 1;\n $subservice->save();\n\n }", "title": "" }, { "docid": "94261d17d2952288c873cdf77cf928af", "score": "0.55755156", "text": "public function run()\n {\n factory(OAuthClients::class)->create([\n 'id' => 'appid01',\n 'secret' => 'secret', //DEVE SER UM HASH, USADO STRING NORMAL PARA FACILITAR OS TESTES\n 'name' => 'Minha App Mobile',\n ]);\n }", "title": "" }, { "docid": "dd19c77ad3844c2aa3372fca8499b503", "score": "0.5574844", "text": "public function run()\n {\n \n $clients = ['mohamed', 'ahmed'];\n\n foreach($clients as $client)\n {\n\n \\App\\Client::create([\n\n 'name' => $client,\n 'phone' => '0597665146',\n 'address' => 'Palestine/gaza',\n ]);\n\n }\n\n }", "title": "" }, { "docid": "c6ce959ff703226dba07cfaba046180a", "score": "0.55611736", "text": "public function run()\n {\n Service::create(['name' => 'credits']);\n Service::create(['name' => 'microcredits']);\n Service::create(['name' => 'avtocredits']);\n Service::create(['name' => 'lombards']);\n Service::create(['name' => 'credits']);\n Service::create(['name' => 'ipoteka']);\n\n }", "title": "" }, { "docid": "a70faaaf3604a57b96b0a2c8daf3f0df", "score": "0.5559603", "text": "public function run()\n {\n $configs = [\n [\n 'serial' => Str::uuid(),\n 'key' => 'disk_size',\n 'value' => '1000', // GB\n ],\n [\n 'serial' => Str::uuid(),\n 'key' => 'is_maintenance',\n 'value' => '0',\n ],\n ];\n Config::insert($configs);\n }", "title": "" }, { "docid": "04fda8e438b7e2df25b052fe35d3df8f", "score": "0.5558953", "text": "public function run()\n {\n Auth::query()->truncate();\n\n Auth::create([\n 'username' => config('cipi.username'),\n 'password' => Hash::make(config('cipi.password')),\n 'apikey' => Str::random(48)\n ]);\n\n Server::create([\n 'server_id' => strtolower('CIPISERVERID'),\n 'name' => 'This VPS!',\n 'ip' => 'CIPIIP',\n 'password' => strtolower('CIPIPASS'),\n 'database' => strtolower('CIPIDB'),\n 'default' => 1,\n 'cron' => ' '\n ]);\n\n return true;\n }", "title": "" }, { "docid": "7fb3685976e9c9ab27ad6a252c562e72", "score": "0.5551478", "text": "public function run()\n {\n $this->call(ClientsSeeder::class);\n }", "title": "" }, { "docid": "c1988dbb72171d82d3080c23c64a2901", "score": "0.55439144", "text": "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(LaratrustSeeder::class);\n $this->call(AlbumTableSeeder::class);\n $this->call(PhotoTableSeeder::class);\n $this->call(contactinfoTableSeeder::class);\n $this->call(TeamSeeder::class);\n $this->call(SettingTableSeeder::class);\n factory(Service::class,3)->create();\n }", "title": "" }, { "docid": "84143c359e693903ef677afb05bdac17", "score": "0.55412084", "text": "public function run()\n {\n $json = json_encode(new stdClass);\n\n Service::insert([\n ['name' => 'video', 'active' => 1, 'settings' => $json],\n ['name' => 'chat', 'active' => 1, 'settings' => $json],\n ['name' => 'sms', 'active' => 1, 'settings' => $json],\n ['name' => 'email', 'active' => 1, 'settings' => $json]\n ]);\n }", "title": "" }, { "docid": "eab8c2001bde353d1a5b71039408fa10", "score": "0.5514152", "text": "public function run()\n {\n Client::create([\n 'name_complete' => 'GOMEZ CUEVA WILLIAM PEDRO',\n 'first_name' => 'WILLIAM',\n 'last_name' => 'PEDRO',\n 'apellido_paterno' => 'GOMEZ',\n 'apellido_materno' => 'CUEVA',\n 'nro_doc_identidad' => '10531466',\n 'phone' => '',\n 'phone2' => '',\n 'country_id' => 1,\n 'department_id' => 15,\n 'province_id' => 128,\n 'district_id' => 1265,\n 'address' => 'URB. 5 DE AGOSTO MZ. E LOTE 5',\n 'code' => '10531466',\n 'user_id' => 1\n ]);\n }", "title": "" }, { "docid": "0f9c565fda5534fd471856a97425c04e", "score": "0.5511149", "text": "public function run()\n {\n $systemConfig = new SystemConfiguration();\n $systemConfig->name = 'Colégio Técnico Industrial \"Prof. Isaac Portal Roldán\"';\n $systemConfig->cep = '17033260';\n $systemConfig->uf = 'SP';\n $systemConfig->city = 'Bauru';\n $systemConfig->street = 'Avenida Nações Unidas';\n $systemConfig->number = '58-50';\n $systemConfig->district = 'Núcleo Residencial Presidente Geisel';\n $systemConfig->phone = '1431036150';\n $systemConfig->extension = null;\n $systemConfig->fax = '1431036150';\n $systemConfig->email = '[email protected]';\n $systemConfig->agreement_expiration = 5;\n $systemConfig->save();\n }", "title": "" }, { "docid": "3a784d43d6001b8590b30fa614db0385", "score": "0.55082995", "text": "public function run()\n {\n Service::create([\n 'description'=>[\n 'ar'=>'نستطيع ان نجعلهم ',\n 'en'=>'make them happy',\n ],\n 'service_one'=>[\n 'ar'=>'هناك حقيقة مثبتة منذ زمن طويل ص.',\n 'en'=>'Good news',\n ],\n 'service_two'=>[\n 'ar'=>'نستطيع ان نجعلهم ',\n 'en'=>'make them happy',\n ],\n 'phone'=>'0101222',\n 'email' => '[email protected]',\n\n ]);\n }", "title": "" }, { "docid": "3d0552efa7c0ee95150bf3447c8a7e5c", "score": "0.5489959", "text": "public function run()\n {\n $services = [\n 'Wifi',\n 'Parcheggio',\n 'Animali ammessi',\n 'Aria condizionata',\n 'Piscina',\n 'Lavatrice',\n 'Tv',\n 'Cucina',\n 'Colazione',\n ];\n foreach ($services as $service) {\n $new_service = new Service();\n $new_service->name = $service;\n $new_service->save();\n }\n }", "title": "" }, { "docid": "0fd8016d37bc7cc6b7716efe53787bb2", "score": "0.54881954", "text": "public function run()\n {\n $services = [\n 'WiFi',\n 'Free parking',\n 'Pool',\n 'Sauna',\n 'Sea view',\n 'Air coditioning',\n 'Concierge',\n 'Pets allowed'\n ];\n\n foreach ($services as $service) {\n $newService = new Service();\n $newService->name = $service;\n $newService->slug = Str::slug($service, '-');\n \n $newService->save();\n }\n }", "title": "" }, { "docid": "7be51ffcf138e3d034ad997e1a3eeb1d", "score": "0.54807955", "text": "protected function configureSwooleServer()\n {\n $options = [\n 'daemonize' => wswoole_is_daemon(),\n 'worker_num' => wswoole_worker_num(),\n 'task_worker_num' => wswoole_task_worker_num(),\n 'max_request' => wswoole_max_request(),\n 'log_file' => wswoole_log_file()\n ];\n\n static::$server->set($options);\n }", "title": "" }, { "docid": "c1b30b39f24957ffcffad8e6882c7683", "score": "0.54801774", "text": "public function run()\n {\n //\n SiteInfo::create([\n 'address' => 'Market Circle, Takoradi, WS0034423, Ghana',\n 'box_office' => 'P. O. Box MC 2185, Takoradi',\n 'phone_developer' => '+233 557 821 030',\n 'phone_info' => '+233 557 821 030',\n 'email_developer' => '[email protected]',\n 'email_info' => '[email protected]',\n 'email_support' => '[email protected]',\n 'email_admin' => '[email protected]',\n 'description' => 'Revolutionizing trade with passion'\n ]);\n }", "title": "" }, { "docid": "d41aff18d986aba75008219578de9a1a", "score": "0.5478405", "text": "protected function configure()\n {\n $this->setName('run')\n ->setDescription('Start all of the contianers'); \n }", "title": "" }, { "docid": "773f5b65aa885dd7e756ddb1d2319ae2", "score": "0.54702497", "text": "public function run()\n {\n factory(App\\Clientes::class, 10)->create();\n }", "title": "" }, { "docid": "8de968f21993704ab597c47d54f03367", "score": "0.5465115", "text": "public function run()\n {\n $plan = Plan::first();\n //Pega o plano cadastrado na base de dados para ser usado como parametro para criação do tenant\n\n $plan->tenants()->create([\n 'cnpj' => '23882706000120',\n 'name' => 'JnsSystem',\n 'url' => 'jnssystem',\n 'email' => '[email protected]'\n ]);\n }", "title": "" }, { "docid": "bce04daf30d14d3ea19b47ba17612559", "score": "0.54607487", "text": "public function run()\n {\n $numClientes = 100;\n\n // Function to create fake Clients.\n (new Illuminate\\Support\\Debug\\Dumper)->dump('Creando los '.$numClientes.' Clientes...');\n \tfactory(WIT\\Client::class, $numClientes)->create();\n (new Illuminate\\Support\\Debug\\Dumper)->dump('Finalizada la creación de los clientes');\n }", "title": "" }, { "docid": "1e90017046ef8a7ea5771095a8f71f98", "score": "0.54583156", "text": "public function run()\n {\n DB::table('configurations')->insert([\n 'name' => 'media_server',\n 'value' => 'http://127.0.0.1:3000'\n ]);\n DB::table('configurations')->insert([\n 'name' => 'api_key',\n 'value' => '1234567890'\n ]);\n DB::table('configurations')->insert([\n 'name' => 'api_expire',\n 'value' => '60'\n ]);\n DB::table('configurations')->insert([\n 'name' => 'impressum',\n 'value' => ''\n ]);\n DB::table('configurations')->insert([\n 'name' => 'welcome',\n 'value' => ''\n ]);\n }", "title": "" }, { "docid": "a9de171ec684b91d3e224ec63f3de623", "score": "0.5444878", "text": "public function run()\n {\n Service::truncate();\n\n Service::create([\n 'id' => 1,\n 'name' => 'Boxing',\n 'description' => '',\n ]);\n\n Service::create([\n 'id' => 2,\n 'name' => 'Yoga',\n 'description' => ''\n ]);\n\n Service::create([\n 'id' => 3,\n 'name' => 'Fitness Only',\n 'description' => 'Use gym of equipments',\n ]);\n\n Service::create([\n 'id' => 4,\n 'name' => 'Muai Thai',\n 'description' => ''\n ]);\n }", "title": "" }, { "docid": "9e3460b6ec45f6d8be5c7303babea371", "score": "0.54382116", "text": "public function run()\n {\n Client::create([\n \"user_id\" => null,\n \"secret\" => config('services.passport.password_client_secret'),\n \"name\" => \"Password Grant\",\n \"revoked\" => 0,\n \"password_client\" => 1,\n \"personal_access_client\" => 0,\n \"redirect\" => config('app.url'),\n 'provider' => 'users'\n ]);\n }", "title": "" }, { "docid": "7942060d71d8a2d9e67adc6d99d6137e", "score": "0.543258", "text": "public function run() {\n\n rec(' startup');\n\n // Lookup sensor\n $args = Daemon::getArgs();\n $id = $args->getOpt('id');\n\n if (!array_key_exists($id, $this->sensors)) {\n rec(\" no such sensor: {$id}\");\n return Daemon::APP_EXIT_EXIT;\n }\n $sensor = $this->sensors[$id];\n rec(\" sensor: {$id} ({$sensor['name']})\");\n\n // Adjust daemon log file\n Daemon::openLog(\"log/{$id}.log\");\n\n // Startup again\n rec(' startup');\n\n // Start the loop\n self::$loop = LoopFactory::create();\n\n Event::fire('startup');\n\n rec(' starting client');\n\n // Start client\n\n $connectionRetry = $this->config->get('server.retry.delay');\n\n // Run the server application\n switch ($sensor['type']) {\n case 'motion':\n $this->client = new MotionClient($sensor);\n break;\n\n case 'audio':\n $this->client = new AudioClient($sensor);\n break;\n\n default:\n rec(\" unsupported sensor type: {$sensor['type']}\");\n return Daemon::APP_EXIT_EXIT;\n break;\n }\n\n $ran = $this->client->run(self::$loop, $connectionRetry);\n\n rec(' client closed');\n rec($ran);\n }", "title": "" }, { "docid": "aa2b7941fc1a3f0b07d1451c3517ba8f", "score": "0.5429674", "text": "public static function run()\n {\n self::$instance = new self();\n\n self::$instance->csrfWather = new CsrfSecurity();\n self::$instance->csrfWather->methodWather();\n \n self::$instance->dotenv = new Dotenv('./');\n self::$instance->dotenv->load();\n\n self::$instance->db = new Db(getenv('DB_HOST'), getenv('DB_NAME'), getenv('DB_USER'), getenv('DB_PASSWORD'));\n self::$instance->db->connect();\n \n self::$instance->router = new RouterCollection();\n self::$instance->router->start();\n }", "title": "" }, { "docid": "7663501ab078265e6aef3279f966da57", "score": "0.5423005", "text": "public function run()\n {\n Api::create(array(\n 'user_id' => 1,\n 'api_name' => 'Test Api',\n 'api_key'\t => Hash::make('key'),\n 'api_status' => 1,\n ));\n\n Api::create(array(\n 'user_id' => 1,\n 'api_name' => 'Second Test Api',\n 'api_key' => Hash::make('key'),\n 'api_status' => 1,\n ));\n }", "title": "" }, { "docid": "01791b769fca997ad51b4c930900b408", "score": "0.54226196", "text": "public function run()\n {\n factory(Video::class)->create([\n 'title' => 'A maturidade do Mercado Americano',\n 'description' => '<p>Ao se tornar um investidor da Ultimate Farm, você passa a ter rendimentos mensais que podem ser resgatados a cada 6 meses.</p>',\n 'url' => 'https://www.youtube.com/watch?v=ljwij-EnmWg',\n 'image' => 'http://img.youtube.com/vi/ljwij-EnmWg/0.jpg',\n 'active' => true\n ]);\n }", "title": "" }, { "docid": "d2c54425a68bca056053aa4ef7af2012", "score": "0.5416303", "text": "public function main() {\n\n $fs = new Filesystem();\n\n $fs->touch($this->getTargetFile());\n\n $seedProperties = Yaml::parse(file_get_contents($this->getSeedFile()));\n $serverProperties = [];\n\n if (!isset($seedProperties['servers'])) {\n return;\n }\n\n foreach ($seedProperties['servers'] as $serverKey => $properties) {\n $serverProperties[$serverKey] = [\n 'label' => isset($properties['server_label']) ? $properties['server_label'] : ucfirst($serverKey),\n 'host' => $properties['server_host'],\n 'user' => $properties['server_user'],\n 'root' => $properties['server_root'],\n 'stage' => $properties['server_stage'],\n 'env' => $properties['server_env'],\n 'hostedBy' => $properties['server_hosted_by'],\n 'site' => isset($properties['server_site']) ? $properties['server_site'] : 'default',\n ];\n }\n\n $fs->dumpFile($this->getTargetFile(), Yaml::dump($serverProperties, 5, 2));\n }", "title": "" }, { "docid": "491e0962f46b8c60029fbcc456b25771", "score": "0.5415583", "text": "public function run()\n {\n \t$channels = ['Laravel', 'Vuejs', 'CSS', 'Javascript', 'PHP', 'Spark', 'Lumen', 'Forge'];\n\n \tforeach($channels as $channel) {\n \t\tChannel::create(['title' => $channel]);\n \t}\n }", "title": "" }, { "docid": "b37ddfd560a64004d32dfddc98082595", "score": "0.5409974", "text": "public function run()\n {\n $providerPanel = ProviderPanel::create([\n 'name' => 'LOLLIPOP SMM PANEL',\n 'website' => 'https://lollipop-smm.com/',\n 'get_profile_url' => 'https://lollipop-smm.com/api/profile',\n 'get_services_url' => 'https://lollipop-smm.com/api/services',\n 'check_status_url' => 'https://lollipop-smm.com/api/order',\n 'create_order_url' => 'https://lollipop-smm.com/api/status',\n 'is_active' => true\n ]);\n\n SMMFactory::make($providerPanel)->syncServices();\n }", "title": "" }, { "docid": "3eeb6a961a4ae287dec9744a29416af8", "score": "0.54074466", "text": "public function run()\n {\n \\App\\slider::create([\n 'image' => '/images/la.jpg',\n 'title' => 'Los Angeles',\n 'description' => 'We had the best time playing at Venice Beach!',\n ]);\n \\App\\slider::create([\n 'image' => '/images/ny.jpg',\n 'title' => 'New York',\n 'description' => 'The atmosphere in New York is lorem ipsum.',\n ]);\n \\App\\slider::create([\n 'image' => '/images/chicago.jpg',\n 'title' => 'Chicago',\n 'description' => \"Thank you, Chicago - A night we won\\'t forget.\",\n ]);\n }", "title": "" }, { "docid": "49ca893fccb95f340c1ab6d68f3125b8", "score": "0.5403392", "text": "public function run()\n {\n $this->createAdmin();\n $this->createOrganization();\n $this->createOrganizationStaff();\n $this->createPrivateCustomer();\n $this->createCandidate();\n $this->createSpecialist();\n $this->createPartner();\n }", "title": "" }, { "docid": "fb8b66f9c110ffbb44370f61cf46e26e", "score": "0.5402477", "text": "public function run()\n { \n $hostManager = App::make('Stigma\\ObjectManager\\HostManager');\n\n\n $data = [\n 'host_name' => 'generic-host',\n 'alias' => 'Generic host definition template',\n 'template_name' => 'generic-host',\n 'is_glusterfs' => 'N',\n 'is_template' => 'Y',\n 'data' => json_decode('{\"name\":\"generic-host\",\"notifications_enabled\":\"1\",\"event_handler_enabled\":\"1\",\"flap_detection_enabled\":\"1\",\"process_perf_data\":\"1\",\"retain_status_information\":\"1\",\"retain_nonstatus_information\":\"1\",\"notification_period\":\"24x7\",\"register\":\"0\"}'),\n ];\n\n $hostManager->register($data);\n\n\n $data = [\n 'host_name' => 'linux-server',\n 'alias' => 'Linux host definition template',\n 'template_name' => 'linux-server',\n 'is_glusterfs' => 'N',\n 'is_template' => 'Y',\n 'data' => json_decode('{\"name\":\"linux-server\",\"use\":\"generic-host\",\"check_period\":\"24x7\",\"check_interval\":\"5\",\"retry_interval\":\"1\",\"max_check_attempts\":\"10\",\"check_command\":\"check-host-alive\",\"notification_period\":\"workhours\",\"notification_interval\":\"120\",\"notification_options\":\"d,u,r\",\"contact_groups\":\"admins\",\"register\":\"0\"}'),\n ];\n\n $hostManager->register($data);\n\n\n $data = [\n 'host_name' => 'windows-server',\n 'alias' => 'Windows host definition template',\n 'template_name' => 'windows-server',\n 'is_glusterfs' => 'N',\n 'is_template' => 'Y',\n 'data' => json_decode('{\"name\":\"windows-server\",\"use\":\"generic-host\",\"check_period\":\"24x7\",\"check_interval\":\"5\",\"retry_interval\":\"1\",\"max_check_attempts\":\"10\",\"check_command\":\"check-host-alive\",\"notification_period\":\"24x7\",\"notification_interval\":\"30\",\"notification_options\":\"d,r\",\"contact_groups\":\"admins\",\"hostgroups\":\"windows-servers\",\"register\":\"0\"}'),\n ];\n\n $hostManager->register($data);\n\n\n $data = [\n 'host_name' => 'generic-printer',\n 'alias' => 'Define a generic printer template',\n 'template_name' => 'generic-printer',\n 'is_glusterfs' => 'N',\n 'is_template' => 'Y',\n 'data' => json_decode('{\"name\":\"generic-printer\",\"use\":\"generic-host\",\"check_period\":\"24x7\",\"check_interval\":\"5\",\"retry_interval\":\"1\",\"max_check_attempts\":\"10\",\"check_command\":\"check-host-alive\",\"notification_period\":\"workhours\",\"notification_interval\":\"30\",\"notification_options\":\"d,r\",\"contact_groups\":\"admins\",\"register\":\"0\"}'),\n ];\n\n $hostManager->register($data);\n\n\n $data = [\n 'host_name' => 'generic-switch',\n 'alias' => 'Define a template for switches',\n 'template_name' => 'generic-switch',\n 'is_glusterfs' => 'N',\n 'is_template' => 'Y',\n 'data' => json_decode('{\"name\":\"generic-switch\",\"use\":\"generic-host\",\"check_period\":\"24x7\",\"check_interval\":\"5\",\"retry_interval\":\"1\",\"max_check_attempts\":\"10\",\"check_command\":\"check-host-alive\",\"notification_period\":\"24x7\",\"notification_interval\":\"30\",\"notification_options\":\"d,r\",\"contact_groups\":\"admins\",\"register\":\"0\"}'),\n ];\n\n $hostManager->register($data);\n\n\n $data = [\n 'host_name' => 'localhost',\n 'alias' => 'localhost',\n 'template_name' => NULL,\n 'is_glusterfs' => 'N',\n 'is_template' => 'N',\n 'data' => json_decode('{\"use\":\"linux-server,generic-host\",\"host_name\":\"localhost\",\"alias\":\"localhost\",\"address\":\"127.0.0.1\",\"_graphiteprefix\":\"stigma\"}'),\n ];\n\n $hostManager->register($data);\n\n }", "title": "" }, { "docid": "f0e6cc871552ada2e3face4a3ece5336", "score": "0.539993", "text": "public function run()\n {\n // $this->call(AdminSeeder::class);\n\n if ('local' == config('app.env')) {\n $this->call(TestSeeder::class);\n }\n }", "title": "" }, { "docid": "e03af5d7e6a51da5d64ff7a4a4f1cb12", "score": "0.53837806", "text": "public function run()\n {\n $this->createApiResources($this->apiResources());\n }", "title": "" }, { "docid": "8cb82790da555cccc9f9dce0fa7019ad", "score": "0.5376201", "text": "public function run()\n {\n \t factory(App\\Petiscos::class, 20)\n \t->create();\n }", "title": "" }, { "docid": "901ee1142651e62045d479a95c9975a4", "score": "0.5363731", "text": "public function run()\n {\n App\\Servicio::create(['nombre' => 'Latoneria']);\n App\\Servicio::create(['nombre' => 'Pintura']);\n App\\Servicio::create(['nombre' => 'Electrónica']);\n App\\Servicio::create(['nombre' => 'Mecánica']);\n App\\Servicio::create(['nombre' => 'Suspensión']);\n App\\Servicio::create(['nombre' => 'Frenos']);\n }", "title": "" }, { "docid": "ccdb7122e08b337932e6e1d10cc371a3", "score": "0.535547", "text": "public function run()\n {\n Conf::create([\n 'key' => 'product_type',\n 'val' => 'cps',\n 'text' => '机审秒下',\n ]);\n\n Conf::create([\n 'key' => 'product_type',\n 'val' => 'cpa',\n 'text' => '精品推荐',\n ]);\n }", "title": "" }, { "docid": "743130c34c5fc5ea1e25e3b85e997d90", "score": "0.53454846", "text": "public function run()\n {\n Plan::factory()->create([\n 'name' => 'bronze',\n 'description' => 'Amazing description for bronze plan',\n 'price' => 29.9,\n ]);\n\n Plan::factory()->create([\n 'name' => 'silver',\n 'description' => 'Amazing description for silver plan',\n 'price' => 59.9,\n ]);\n\n Plan::factory()->create([\n 'name' => 'gold',\n 'description' => 'Amazing description for gold plan',\n 'price' => 69.9,\n ]);\n }", "title": "" }, { "docid": "6b4981123122069fb3ae95409df6d9f0", "score": "0.5345255", "text": "public function run()\n {\n Simulator::create(['name' => 'Microsoft Flight Simulator X']);\n Simulator::create(['name' => 'Lockheed Martin Prepar3D v1-3']);\n Simulator::create(['name' => 'Lockheed Martin Prepar3D v4']);\n Simulator::create(['name' => 'Laminar Research X-Plane 10']);\n Simulator::create(['name' => 'Laminar Research X-Plane 11']);\n Simulator::create(['name' => 'Aerofly FS 2']);\n Simulator::create(['name' => 'Microsoft Flight Simulator 2020']);\n }", "title": "" }, { "docid": "8b51158fe607376f5a5af2ebeb97ad58", "score": "0.53430367", "text": "public function run()\n {\n \\App\\Options::create([\n 'key' => 'title',\n 'name' => 'Your title',\n 'description' => 'Enter your title',\n 'tag' => 'options-input',\n 'value' => 'Your title',\n 'group' => '0',\n 'columns' => '4',\n ]);\n \\App\\Options::create([\n 'key' => 'themes',\n 'name' => 'Color theme',\n 'description' => 'Change color theme',\n 'tag' => 'options-select',\n 'value' => 'skin-blue',\n 'options' => '[\n {\"name\":\"skin-black\"}, \n {\"name\":\"skin-black-light\"},\n {\"name\":\"skin-blue\"},\n {\"name\":\"skin-blue-light\"},\n {\"name\":\"skin-green\"},\n {\"name\":\"skin-green-light\"},\n {\"name\":\"skin-purple\"},\n {\"name\":\"skin-purple-light\"},\n {\"name\":\"skin-red\"},\n {\"name\":\"skin-red-light\"},\n {\"name\":\"skin-yellow\"},\n {\"name\":\"skin-yellow-light\"}\n ]',\n 'group' => '0',\n 'columns' => '4',\n ]);\n }", "title": "" }, { "docid": "80ed6223d89ff48a1af078652fff0b76", "score": "0.53427744", "text": "public function run()\n {\n // Crear Solo un torneo de prueba\n factory(App\\Models\\Torneo::class, 1)->create();\n \n }", "title": "" }, { "docid": "8bb9852343df745db44d576d107538ff", "score": "0.53368443", "text": "public function run()\n {\n //DB::table('tlabServer')->truncate();\n DB::table('tlab_servers')->insert([\n ['a' => 'a','b' => 'b','c' => 'c']\n ]);\n\n $id_infos = ['id(仮)','cpu_id(仮)','memory_id(仮)','net_id(仮)'];\n $disk_infos = ['/private/var/vm','/dev/disk1s4','129.8G','apfs',2,'187.2G','3.0G'];\n\n foreach ($id_infos as $id_info) {\n DB::table('server_info_ids')->insert([\n ['info' => $id_info]\n ]);\n }\n\n DB::table('server_disks')->insert([\n [\n 'mount' => $disk_infos[0],\n 'device' => $disk_infos[1],\n 'free' => $disk_infos[2],\n 'fstype' => $disk_infos[3],\n 'percent' => $disk_infos[4],\n 'total' => $disk_infos[5],\n 'used' => $disk_infos[6],\n ]\n ]);\n }", "title": "" }, { "docid": "38948ff6ba7f818ed232b7e7d212e66d", "score": "0.5333539", "text": "public function run()\n {\n $this->command->info('Create Team Admin');\n Team::create([\n 'name' => 'ADMIN',\n 'display_name' => 'Team Admin',\n 'description' => 'Team Admin',\n ]);\n $this->command->info('Create Team Head Office');\n Team::create([\n 'name' => 'HQ',\n 'display_name' => 'Team Head Office',\n 'description' => 'Team Head Office',\n ]);\n $this->command->info('Create Team Constructions');\n Team::create([\n 'name' => 'CONS',\n 'display_name' => 'Team Constructions',\n 'description' => 'Team Constructions',\n ]);\n }", "title": "" }, { "docid": "8dd34fd19f5b9fb193b96a750338220d", "score": "0.53322095", "text": "public function run() {\n\t\t$this->create_version();\n\t\t$this->create_database();\n\t}", "title": "" }, { "docid": "075057092cf1985d4751ea6745621001", "score": "0.53278136", "text": "public function run()\n {\n $port = new \\App\\Port;\n $port->port = 19132;\n $port->in_use = false;\n $port->save();\n }", "title": "" }, { "docid": "7d44d0f851eea706a38b8e3ab89d84dc", "score": "0.53273165", "text": "public function run()\n {\n //\n HostType::create([\n 'id' => HostType::NONE,\n 'type' => HostType::NONE_NAME,\n ]);\n HostType::create([\n 'id' => HostType::PLOT,\n 'type' => HostType::PLOT_NAME,\n ]);\n HostType::create([\n 'id' => HostType::FARM,\n 'type' => HostType::FARM_NAME,\n ]);\n }", "title": "" }, { "docid": "24bb03ce0db2b19d45536bb7bb77af6a", "score": "0.53224194", "text": "public function run()\n {\n Api_settings::truncate();\n\n $api_token = '$2y$10$U54AVkcMA5HrkVf2WUZrhuMnwaFoOA1FV8zAEeL956pHTxiLWAuIm';\n $api_key = '$2y$10$LRyUsiLNnQQzuo8t9lkJlukE5SXisBS7wW5v7.8s4HJlqAaT3aWMO';\n\n Api_settings::create([\n 'api_name' => 'Prueba_Etraining',\n 'api_key' => $api_key,\n 'api_token' => $api_token,\n 'activo' => true,\n ]);\n\n }", "title": "" }, { "docid": "c1c0bbde724c9145145891d806b175e6", "score": "0.531792", "text": "protected function configure()\n {\n $this\n ->setName(self::CLI_COMMAND)\n ->setDescription('Register a SeleniumSetup server instance.')\n ->addOption('config', 'c', InputOption::VALUE_OPTIONAL, 'The config path.')\n ->addArgument('name', InputArgument::REQUIRED, 'Instance name.')\n ->addArgument('port', InputArgument::REQUIRED, 'Instance port.');\n }", "title": "" }, { "docid": "e5eaca874b1a90a4198a876accce01b3", "score": "0.5316833", "text": "public function run(): void\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(\n [\n CountriesSeeder::class,\n ShowAudienceSeeder::class,\n LanguagesSeeder::class,\n PersonalitySeeder::class,\n ProductionTypeSeeder::class,\n ShowTypeSeeder::class,\n EventTypeSeeder::class,\n CollectiveCategoriesSeeder::class,\n ContinentsCountriesSeeder::class,\n VenueCategoriesSeeder::class,\n ]\n );\n }", "title": "" }, { "docid": "95ca3e4b1411f19925112f5799a431db", "score": "0.5308724", "text": "public function run()\n {\n factory(App\\Customer::class, 50)->create();\n }", "title": "" }, { "docid": "eeac4a26040a3788644dee11f237973d", "score": "0.5308164", "text": "public function run()\n {\n //-- Random sample\n //factory('App\\Provider', config('kitamatch_config.count_providers'))->create();\n\n //-- Example sample\n $provider = new App\\Provider();\n $provider->name = 'Stadt';\n $provider->phone = '+4915776638369';\n $provider->plz = \"69115\";\n $provider->city = \"Heidelberg\";\n $provider->address = \"Bismarckplatz 10\";\n $provider->status = 61;\n $provider->uid = factory('App\\User')->create(['email' => \"[email protected]\", 'password' => Hash::make('secret'), 'account_type' => 4,])->id;\n $provider->save();\n\n $provider = new App\\Provider();\n $provider->name = 'Sonnenschein';\n $provider->phone = '+4915776638369';\n $provider->plz = \"69115\";\n $provider->city = \"Heidelberg\";\n $provider->address = \"Bismarckplatz 10\";\n $provider->status = 61;\n $provider->uid = factory('App\\User')->create(['email' => \"[email protected]\", 'password' => Hash::make('secret'), 'account_type' => 4,])->id;\n $provider->save();\n }", "title": "" }, { "docid": "c42d3660eee1fba53cd76ffa147d3594", "score": "0.53047687", "text": "public function run()\n {\n Service::insert([\n [\n 'uuid' => 804040,\n 'name' => 'Sonstige Umzugsleistungen'\n ],\n [\n 'uuid' => 802030,\n 'name' => 'Abtransport, Entsorgung und Entrümpelung'\n ],\n [\n 'uuid' => 411070,\n 'name' => 'Fensterreinigung'\n ],\n [\n 'uuid' => 402020,\n 'name' => 'Holzdielen schleifen'\n ],\n [\n 'uuid' => 108140,\n 'name' => 'Kellersanierung'\n ],\n ]);\n\n Location::insert([\n ['city' => 'Berlin'],\n ['city' => 'Porta Westfalica'],\n ['city' => 'Lommatzsch'],\n ['city' => 'Hamburg'],\n ['city' => 'Bülzig'],\n ['city' => 'Diesbar-Seußlitz'],\n ]);\n }", "title": "" }, { "docid": "e4391ca82df81895c919ba7e992d82cd", "score": "0.53042394", "text": "public function run()\n {\n //\n Backend::create([\n \t'name'\t=> 'heinthu',\n \t'email'\t=> '[email protected]',\n \t'password'\t=> \\Hash::make(\"123456\")\n ]);\n }", "title": "" }, { "docid": "35844a9c7863703960b74199fd6636ef", "score": "0.5302322", "text": "public function run()\n {\n factory(App\\Models\\Route::class, 10)->create();\n }", "title": "" }, { "docid": "b08700eb9cbb61fb58a300b1bd2f86dc", "score": "0.5296812", "text": "public function BuildServer() \n {\n //====================================================================//\n // Include NuSOAP Classes\n require_once( dirname(__FILE__) . \"/nusoap.php\");\n //====================================================================//\n // Initialize NuSOAP Server Class\n $this->server = new \\soap_server();\n //====================================================================//\n // Register a method available for clients\n $this->server->register(SPL_S_PING); // Check Availability\n $this->server->register(SPL_S_CONNECT); // Verify Connection Parameters\n $this->server->register(SPL_S_ADMIN); // Administrative requests\n $this->server->register(SPL_S_OBJECTS); // Main Object management requests\n $this->server->register(SPL_S_FILE); // Files management requests\n $this->server->register(SPL_S_WIDGETS); // Informations requests \n }", "title": "" }, { "docid": "6f5c4064101876881a9f71f71c55296f", "score": "0.5281649", "text": "public function create(array $vars) {\n\t\treturn $this->api->submit(\"vserver-create\", $vars);\n\t}", "title": "" }, { "docid": "91035d326acbc6b1d6f4c129c601a522", "score": "0.5279658", "text": "public function run(): void\n {\n factory(Givetem::class, 100)\n ->create();\n }", "title": "" }, { "docid": "4b1e7b77bfec7d5bb8369ec496f5e5d1", "score": "0.5273618", "text": "public function run()\n {\n $truckTypes = Config::get('lookup.VALUE.TRUCK_TYPE');\n\n $index = 0;\n foreach ($truckTypes as $key => $truckType) {\n $index++;\n $truck = [\n 'company_id' => 1,\n 'vendor_trucking_id' => $index,\n 'type' => $truckType,\n 'license_plate' => \"B 100$index AG\",\n 'inspection_date' => Carbon::yesterday(),\n 'driver' => \"Driver $index\",\n 'remarks' => \"Dummy truck $index\"\n ];\n\n Truck::create($truck);\n }\n }", "title": "" }, { "docid": "f7809315f23e20dec1cf85ff2725243a", "score": "0.527064", "text": "public function create($params = [])\n {\n return $this->api->apiRequest('/server/create', $params, 'POST');\n }", "title": "" }, { "docid": "ea9772314f1fff6c8c659c32a253636f", "score": "0.5267398", "text": "public function run()\n {\n \t/**\n * Administrador\n */\n \tfactory(Administrativo::class, Cargo::administrador())->create();\n\n \t/**\n * Coordinador\n */\n \tfactory(Administrativo::class, Cargo::coordinador(), 3)->create();\n\n \t/**\n * Secretaria\n */\n \tfactory(Administrativo::class, Cargo::secretaria(), 3)->create();\n }", "title": "" }, { "docid": "250015d6364ae7a40c6a94024f6f177b", "score": "0.5264847", "text": "public function run()\n {\n if (app()->environment() == 'production') {\n $this->call([\n RolesAndPermissionsSeeder::class,\n UserSeeder::class,\n SymptomSeeder::class,\n DiseaseSeeder::class,\n ArticleSeeder::class,\n RuleSeeder::class,\n ]);\n } else {\n $this->call([\n RolesAndPermissionsSeeder::class,\n UserSeeder::class,\n SymptomSeeder::class,\n DiseaseSeeder::class,\n ArticleSeeder::class,\n RuleSeeder::class,\n ]);\n }\n }", "title": "" }, { "docid": "29ce4e8ea86390466fc5186756149fd8", "score": "0.5264422", "text": "public function run()\n {\n factory(ShipmentPackage::class,app()->environment('production') ? 3 : 3)->create();\n }", "title": "" }, { "docid": "48f199d2abab94e0500d67effca8b2b2", "score": "0.526434", "text": "public function run()\n {\n Channel::create([\n 'name' => 'Laravel 8.44',\n 'slug' => Str::slug('Laravel 8.44')\n ]);\n\n Channel::create([\n 'name' => 'Angular 3',\n 'slug' => Str::slug('Angular 3')\n ]);\n\n Channel::create([\n 'name' => 'Vue js 3',\n 'slug' => Str::slug('Vue js 3')\n ]);\n\n Channel::create([\n 'name' => 'Node js',\n 'slug' => Str::slug('Node js')\n ]);\n }", "title": "" }, { "docid": "972b9913ed3eccf9b323c2cd18ca2eaf", "score": "0.5263539", "text": "public function run()\n {\n \n Config::create([\n 'title'=>'Umzila Thời trang Collection độc đáo nhất',\n 'description'=>'Umzila',\n 'keywords'=>'Umzila, umzila, Product',\n 'facebook'=>'http://facebook.com',\n 'youtube'=>'https://youtube.com/',\n 'twitter'=>'https://twitter.com/',\n 'email'=>'[email protected]',\n 'phone'=>'0466.872.558',\n 'content'=>'content',\n 'address' => 'Carelife Việt Nam',\n 'timework' => 'Mọi ngày 9h Am đến 8h Pm',\n 'countdown'=>date('Y-m-d H:i:s'),\n ]);\n }", "title": "" }, { "docid": "60268921ce477ec1d6d09a4047d89862", "score": "0.52598965", "text": "public function run()\n {\n ServiceRequest::create([\n 'service_id' => 1,\n 'member_id' => 2,\n 'description' => 'About my service request...',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n\n ServiceRequest::create([\n 'service_id' => 1,\n 'member_id' => 3,\n 'description' => 'About my service request...',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "title": "" }, { "docid": "e8712319a4bac8ebeb34207345825b9e", "score": "0.5259376", "text": "public function run()\n {\n ClientSegment::create([\n 'id' => '1',\n 'segment_name' => 'Comércio'\n ]);\n\n ClientSegment::create([\n 'id' => '2',\n 'segment_name' => 'Serviços'\n ]);\n\n ClientSegment::create([\n 'id' => '3',\n 'segment_name' => 'Indústria'\n ]);\n\n ClientSegment::create([\n 'id' => '4',\n 'segment_name' => 'Outros'\n ]);\n }", "title": "" }, { "docid": "78c3fe164844b734da6f2aa69ffd9df2", "score": "0.5257622", "text": "public function run()\n {\n \\App\\Team::create([\n 'name' => 'Benfica',\n 'country' => 'Portugal',\n 'division' => '1'\n ]);\n\n \\App\\Team::create([\n 'name' => 'Paços de Ferreira',\n 'country' => 'Portugal',\n 'division' => '1'\n ]);\n }", "title": "" }, { "docid": "bc8c83594223b46175cd15f263bb8d1e", "score": "0.5252818", "text": "public function run()\n {\n factory(App\\Simples::class, 5)->create();\n }", "title": "" }, { "docid": "3890c1a482405170df315312a94f4ba8", "score": "0.52525675", "text": "public function run()\n {\n $this->createNew('Directeur Général');\n $this->createNew('Sécrétaire Général');\n $this->createNew('Chef Division');\n $this->createNew('Chef Service');\n $this->createNew('Chef de Centre');\n\n $this->createNew('Ingénieur Informaticien');\n $this->createNew('Ingénieur Commerciale');\n $this->createNew('Technicien Supérieur');\n $this->createNew('Technicien Commerciale');\n $this->createNew('Prospecteur');\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "11768cfa64a09f055f89febeedf32a43", "score": "0.0", "text": "public function trabajosCliente(Request $request){\n $trabajos = Trabajo::select('idTrabajo', 'DescCorta')->where('idCliente', $request->get('id'))->orderBy('DescCorta')->get();\n\n return response()->json(\n $trabajos->toArray()\n );\n }", "title": "" } ]
[ { "docid": "619215bb4339ad93d666260778b90bfe", "score": "0.7755139", "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 if ($this->title) {\n $data['title'] = $this->title;\n }\n return self::getResponse()->setResType('view')\n ->setHeader(DefaultController::$defaultViewHeaders)\n ->setView($this->viewList)\n ->setData($data)\n ->send();\n }", "title": "" }, { "docid": "6126929dc3b0a4f22ee22cc3ad8d6a7b", "score": "0.742424", "text": "public function index() \n\t{ \n\t\t$this->listing();\t\n\t}", "title": "" }, { "docid": "6d81b7e1cab44c0c92f881f2877d4ed0", "score": "0.7306879", "text": "public function index()\n {\n $this->show_list();\n }", "title": "" }, { "docid": "e5aaa68b60a83d4042e360c0c15cd0b6", "score": "0.7268604", "text": "public function index()\n {\n try {\n $resources = $this->resourceRepository->all(['resourceable']);\n return $this->respondWithSuccess('Resources Loaded.', [\n 'resources' => ResourceResource::collection($resources)\n ]);\n } catch (Exception $e) {\n return $this->respondWithError($e->getMessage());\n }\n }", "title": "" }, { "docid": "ac3339bd1cec8bfe75390af276cfe9dc", "score": "0.7214969", "text": "public function index() {\n return view('acl::resource.index', [\n 'rows' => Resource::paginate(30)\n ]);\n }", "title": "" }, { "docid": "ec9fe93f7f0c8ef48fa8819d15129846", "score": "0.71625596", "text": "public function listAction()\r\n {\r\n $model = $this->getModel();\r\n $this->view->results = $model->fetchAll();\r\n }", "title": "" }, { "docid": "5d82cac8658bf58325423157f5868803", "score": "0.7101858", "text": "function index(){\n\t\t$this->listall();\n\t}", "title": "" }, { "docid": "6cb095287ba7893cf5db9fd09be1c994", "score": "0.7052246", "text": "public function indexAction() {\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n\n //GET LISTING SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t$this->view->listings = Engine_Api::_()->getDbTable('listings', 'list')->userListing($list->owner_id, $list->listing_id);\n\n if (count($this->view->listings) <= 0) {\n return $this->setNoRender();\n } \n }", "title": "" }, { "docid": "0e0625aecfc34f0729e33ff2660b6438", "score": "0.7027799", "text": "public function listingAction()\r\n {\r\n }", "title": "" }, { "docid": "d080dc96edad97480f40b6836d57b19b", "score": "0.7016012", "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 = DaerahOperasi::query()->where('status',true);\n\n $lists = $query->orderBy($sortBy, $direction)->paginate($per_page);\n\n return new ListResources($lists);\n }", "title": "" }, { "docid": "6b46ad2035db8f7885c8fcffe29f4ea2", "score": "0.7012276", "text": "public function actionList()\n {\n $categories = Category::find()->where(['status' => Category::AVAILABLE_MENU])->all();\n $all = Object::findAll(['visible' => 1]);\n return $this->render('index', [\n 'categories' => $categories,\n 'all' => $all,\n ]);\n }", "title": "" }, { "docid": "685fedab8ec30d9717b92d6aaf1a949a", "score": "0.6993658", "text": "public function listAction()\n\t{ \n\n\t\t// Get Sorting Configuration \n\t\t$sorting = $this->configureSorting();\n\t\t$maxProducts = $this->settings['maxAdsPerPage'];\n\t\t// Pagination Cofiguration\n\t\tif ($maxProducts != '') {\n\t\t\t$paginateConfiguration = array('itemsPerPage' => $maxProducts, 'insertAbove' => 0, 'insertBelow' => 1);\n\t\t} else {\n\t\t\t$paginateConfiguration = array('insertAbove' => 0, 'insertBelow' => 0);\n\t\t}\n\t\t$this->view->assign('configure', $paginateConfiguration);\n\t\t// Detail Page Id\n\t\t$detailPage = $this->settings['detailPageId'];\n\t\t$this->view->assign('detailPageId', $detailPage);\n\t\t\n\t\t// Fetch Products\n\t\t$products = $this->productsRepository->findProducts($sorting);\n\t\t$this->view->assign('product', $products);\n\t}", "title": "" }, { "docid": "f3c82870023b104cf3d41500546f04fe", "score": "0.6969016", "text": "public function listAction() {\n\t\t$lookupSession = $this->_helper->osid->getCourseManager()->getCourseCatalogLookupSession();\n\t\t$this->view->catalogs = $lookupSession->getCourseCatalogs();\n\t\t\n\t\t$this->view->title = 'Available Catalogs';\n\t\t$this->view->headTitle($this->view->title);\n }", "title": "" }, { "docid": "352cbf4ef1ef88715709090483c4f5d1", "score": "0.69540364", "text": "public function index()\n {\n $cardsList = CardsList::paginate(15);\n return CardsListResource::collection($cardsList);\n }", "title": "" }, { "docid": "b2127e4d9c0a879ae387cb11b315a1ec", "score": "0.69433725", "text": "public function indexAction()\n {\n\t\t// Default page setup is all resources displayed\n\t\t$this->countOptions['rsrc_type_id'] = DatabaseObject_ResourceType::$event;\n\t\t$this->resourceOptions['rsrc_type_id'] = DatabaseObject_ResourceType::$event;\n\t\t$this->render();\n }", "title": "" }, { "docid": "20a3c49baee8b4f404331b580d175c47", "score": "0.69310373", "text": "public function list() {\n\n // Checking allowed method\n if ($this->http->method() != 'GET') {\n $this->json->sendBack([\n 'success' => false,\n 'code' => 403,\n 'message' => 'This API onlsy supports method GET'\n ]);\n return;\n }\n\n $get_data = $this->http->data('GET');\n\n // Allow to only query 100 articles at a time\n if (!isset($get_data['limit']) || $get_data['limit'] > 100 ) {\n $get_data['limit'] = 100;\n }\n\n $this->model->load('blog/blog');\n $response = $this->model->blog->listRecords($get_data);\n\n unset($response['success']);\n\n $this->json->sendBack([\n 'success' => true,\n 'code' => 200,\n 'data' => $response\n ]);\n return;\n }", "title": "" }, { "docid": "78618d51f1162dbfe57d94dc54a00564", "score": "0.6909516", "text": "public function index()\n {\n $resources = Resource::all();\n return view('admin.resources.index', compact('resources'));\n }", "title": "" }, { "docid": "e4f860b51b85fbc3664e6a210482162d", "score": "0.68783826", "text": "public function index()\n\t{\n\t\t$filter = array(\n\t\t\t'name' \t\t\t=> Input::get('name'),\n\t\t\t);\n\n\t\t$resources = Resource::where(function($query){\n\t\t\tif(Input::get('name', null))\n\t\t\t\t$query->where('name', 'LIKE', '%' . Input::get('name') . '%');\n\t\t})\n\t\t->orderBy('name', 'asc')\n\t\t->paginate();\n\n\t\t$index = $resources->getPerPage() * ($resources->getCurrentPage()-1) + 1;\n\t\treturn View::make('resource.index')\n\t\t\t->with('resources', $resources)\n\t\t\t->with('index', $index)\n\t\t\t->with('filter', $filter);\n\t}", "title": "" }, { "docid": "b04d987b6c4dbb93710d7a4d57ff157f", "score": "0.68567383", "text": "public function showList()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "1d7f4db88d30c402e0790637ffc7fd6c", "score": "0.68518335", "text": "public function index()\n {\n //\n return DishResource::collection(Dish::paginate());\n }", "title": "" }, { "docid": "f29709817ec3db2d44ad77fdc0a55269", "score": "0.6829548", "text": "public function _index()\n\t{\n\t\t$this->_list();\n\t}", "title": "" }, { "docid": "adc6c1fac44768e67a938fe2c4fc3ca5", "score": "0.6827", "text": "public function index()\n {\n $resourceList = Snippet::all();\n\n $resourceList = $this->decorator->decorateList($resourceList->all());\n\n return $this->respond([\n 'data' => $resourceList\n ]);\n }", "title": "" }, { "docid": "db795c6fc7243bc4d68f7936f230581b", "score": "0.6824872", "text": "public function index()\n {\n $itemnames = itemname::paginate(9);\n\n return itemnameResource::collection($itemnames);\n }", "title": "" }, { "docid": "bed9bad3d9d68501c7cd402bf9cb5712", "score": "0.68052477", "text": "public function index()\n {\n $collections = Collection::filter()->paginate();\n\n return CollectionResource::collection($collections);\n }", "title": "" }, { "docid": "b2e04f7e31617a13cb7b2b7b2ba7b47c", "score": "0.6796558", "text": "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist($total, $roms) = Theme_Service_Rom::getList($page, $perpage);\n\t\t$this->assign('roms', $roms);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t}", "title": "" }, { "docid": "bef2afea068ad5239f1bf271014339d0", "score": "0.6778475", "text": "public function showList()\n {\n if (isset($this->post['page']) || isset($this->get['page'])) {\n if ($this->post) {\n $this->doListing($this->criteria, $this->orderBy);\n }\n if ($this->get) {\n $this->doPagination();\n }\n } else {\n //..destrói todas as sessões gravadas e cria uma view limpa.\n Session::destroySession('sqlData');\n Session::destroySession('criteria');\n Session::destroySession('orderBy');\n Session::destroySession('limit');\n Session::destroySession('lastPage');\n $this->viewList->show();\n }\n }", "title": "" }, { "docid": "8d6e2fdd2785fe46ed4465ad994a05e6", "score": "0.67741334", "text": "public function index()\n {\n return ItemResource::collection(Item::all(), Response::HTTP_OK);\n }", "title": "" }, { "docid": "832b0b1a8ad120ab04049782d56603d1", "score": "0.67585295", "text": "public function listAction()\n {\n $status = $this->getDoctrine()\n ->getRepository(Status::class)\n ->findAll();\n\n if (!$status) {\n throw $this->createNotFoundException(\n 'No status found'\n );\n }\n return $this->render(\n 'status/list.html.twig',\n array('status' => $status)\n );\n }", "title": "" }, { "docid": "801fd2ede943b983860e4f8b196c6a1d", "score": "0.67583203", "text": "public function listAction()\n {\n $this->view->projects = ProjectCatalog::getInstance()->getActives();\n $this->setTitle('List the Project');\n }", "title": "" }, { "docid": "4ee1d03a7835a54341989f25ecc11a12", "score": "0.67533183", "text": "public function ListView()\n {\n $this->Render();\n }", "title": "" }, { "docid": "26f513b71bf4203aa55a3b2ad88593a0", "score": "0.6751154", "text": "public function index ()\n {\n $model = $this->getModel();\n $data = $model::getWhere( $model )\n ->orderByRaw( $this->orderField )->paginate( $this->pageNum );\n\n return $this->display( [ 'data' => $data ] );\n }", "title": "" }, { "docid": "90225ecf05155b5ce68061d28310401f", "score": "0.6743644", "text": "public function index()\n {\n $lists = Lists::get();\n\n if ($lists->isEmpty()){\n return $this->_result('No lists on the database', 404);\n } else {\n return $this->_result($lists);\n }\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": "295efb639c3bbf287a3495dfebecfc27", "score": "0.6735022", "text": "public function display_list(){\n\t\t\n\t\t$collection = new TestGroup_Collection();\n\t\t$variables = array(\n\t\t\t'collection' => $collection->getPaginated(),\n\t\t\t'pagination' => $collection->getPagination(),\n\t\t\t'sorters' => $collection->getSortableLinks(),\n\t\t);\n\t\t\n\t\tBackendLayout::get()\n\t\t\t->prependTitle('Список элементов')\n\t\t\t->setLinkTags($collection->getLinkTags())\n\t\t\t->setContentPhpFile(self::TPL_PATH.'admin_list.php', $variables)\n\t\t\t->render();\n\t}", "title": "" }, { "docid": "a91ed5b6fa568bb8f34f7f1cb4eca554", "score": "0.6725086", "text": "public function listAction ()\n {\n return $this->render('ListsCompanystructureBundle:' . $this->baseTemplate . ':list.html.twig');\n }", "title": "" }, { "docid": "d822a771e046d38bc3baff6e1aecd775", "score": "0.67234546", "text": "public function index()\n {\n $attractions = Attraction::paginate();\n return new ListCollection($attractions);\n // return response()->successWithKey(ListResource::collection($attractions)->response()->getData(), 'attractions');\n }", "title": "" }, { "docid": "8cbe6f8b1b6b1ca1028e0172087e902f", "score": "0.671974", "text": "public function index()\n {\n $this->authorize('list', Query::class);\n\n return $this->ok($this->repo->paginate($this->request->all()));\n }", "title": "" }, { "docid": "ddf22eae2eb3a9afa79f4e227fbe85eb", "score": "0.67160857", "text": "public function ListAction()\r\n {\r\n $this->loadLayout();\r\n\r\n //add breadcrumbs\r\n $breadcrumbs = $this->getLayout()->getBlock('breadcrumbs');\r\n $breadcrumbs->addCrumb(\r\n 'home', array(\r\n 'label' => Mage::helper('CrmTicket')->__('Home'),\r\n 'title' => Mage::helper('CrmTicket')->__('Go to Home Page'),\r\n 'link' => Mage::getBaseUrl()\r\n )\r\n );\r\n $breadcrumbs->addCrumb(\r\n 'CrmTicket', array(\r\n 'label' => Mage::helper('CrmTicket')->__('Knowledge database'),\r\n 'title' => Mage::helper('CrmTicket')->__('Knowledge database'),\r\n 'link' => Mage::getUrl('CrmTicket/Front_Kb')\r\n )\r\n );\r\n\r\n $productId = $this->getRequest()->getParam('product_id');\r\n $product = Mage::getModel('catalog/product')->load($productId);\r\n Mage::register('crm_product', $product);\r\n\r\n $breadcrumbs->addCrumb(\r\n 'Product', array(\r\n 'label' => $product->getName(),\r\n 'title' => $product->getName()\r\n )\r\n );\r\n\r\n $this->renderLayout();\r\n }", "title": "" }, { "docid": "34c6952fbec4a94d7dfcf17341a14155", "score": "0.6712584", "text": "public function list()\n {\n $query = $this->crud_m->read();\n $data = array(\n 'title' => 'Data Users',\n 'data' => $query\n );\n $this->load->view('crud_view', $data, FALSE);\n }", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "f83b91372935d0e79b8188b7c36e777b", "score": "0.67089826", "text": "public function index()\n {\n return VariantResource::collection(Variant::paginate(5));\n }", "title": "" }, { "docid": "8dc49bad81dcd62fc2bee50fa0f6cde0", "score": "0.67058814", "text": "public function actionList()\n\t{\n\t\t$this->getScriptRegistrar()->registerScript(new Script('dream/dream-list.js'));\n\t\treturn $this->render('dream-list', [\n\t\t\t'canFilter' => true,\n\t\t\t'formAction' => '/search/list'\n\t\t]);\n\t}", "title": "" }, { "docid": "839dcdf11f716846642699f3d920ee15", "score": "0.67012167", "text": "public function index()\n {\n // Get Products\n $products = Product::orderBy('created_at', 'desc')->paginate(100);\n\n // Return collection of Products as a resource\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "2b1fabb72b908dfe49918e2514cc9637", "score": "0.67009133", "text": "public function index(){\n\n $resources = Resources::orderBy('id', 'desc')->get();\n\n return view('members.resources.overview', compact('resources'));\n }", "title": "" }, { "docid": "a52c0178145cd251c1e2992b130c6b5b", "score": "0.6690429", "text": "public function listing() \n\t{ \n\t\t/*-------------------------------------------------------------\n\t\t \tBreadcrumb Setup Start\n\t\t -------------------------------------------------------------*/\n\t\t$link \t\t\t\t\t= breadcrumb();\n\t\t$data['breadcrumb'] \t= $link;\n\t\t\n\t\t/*-------------------------------------------------------------\n\t\t \tFetch pages list from database \n\t\t -------------------------------------------------------------*/\n\t\t$data['pages_list']\t\t=\t\t$this->mod_pages->get_all();\n\t\t\n\t\t/*-------------------------------------------------------------\n\t\t \tPage Title showed at the content section of page\n\t\t -------------------------------------------------------------*/\n\t\t$data['page_title'] \t\t=\t\t$this->lang->line('label_static_pages_page_title');\n\t\t\n\t\t/*-------------------------------------------------------------\n\t\t \tEmbed current page content into template layout\n\t\t -------------------------------------------------------------*/\n\t\t$data['page_content']\t\t= \t\t$this->load->view(\"pages/pages_lists\",$data,true);\n\t\t$this->load->view('page_layout',$data);\n\t}", "title": "" }, { "docid": "aec4befd55531e0139482e045f820700", "score": "0.6682151", "text": "public function listingAction() {\n\t\t$category = Engine_Api::_()->getItem('experience_category', $this->_getParam('category'));\n\t\tif( $category ){\n\t\t\tEngine_Api::_()->core()->setSubject($category);\n\t\t}\n\t\t// Search Params\n\n\t\t// Do the show thingy\n\t\t\t// Get an array of friend ids\n\t\t\t// Get stuff\n\t\t\t// unset($values['show']);\n\n\t\t// Get experience paginator\n\n\t\t// Render\n\t\t$this -> _helper -> content -> setNoRender() -> setEnabled();\n\t}", "title": "" }, { "docid": "d8b31b9075f8d0e44e874177808829ae", "score": "0.6679244", "text": "public function index() {\n $this->display(\n 'post/list.html.twig',\n [\n 'posts' => Post::getInstance()->getAll(),\n ]\n );\n }", "title": "" }, { "docid": "0a8592943b60ef544a636ed3cf60401b", "score": "0.66778135", "text": "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $articles = $em->getRepository('VitrineBundle:Article')->findAll();\n\n return $this->render('VitrineBundle:Article:list.html.twig', array(\n 'articles' => $articles,\n ));\n }", "title": "" }, { "docid": "a334c5a280346b8ee428e51fa7cad7f5", "score": "0.6662709", "text": "public function index()\n {\n $people = People::latest()->paginate(10);\n return PeopleResource::collection($people);\n }", "title": "" }, { "docid": "4104b991af0a28a3c1c61639ca8bb994", "score": "0.666178", "text": "public function index()\n {\n $this->setDefaultData();\n $this->paginate = [\n 'contain' => ['RegisteredUsers', 'Listings'],\n 'conditions' => ['RegisteredUsers.username'\n => $this->Auth->user()['username']]\n ];\n $watchingLists = $this->paginate($this->WatchingLists);\n\n $this->set(compact('watchingLists'));\n $this->set('_serialize', ['watchingLists']);\n }", "title": "" }, { "docid": "315d8530da87836a0e7b0995b1cdbb0a", "score": "0.66505045", "text": "public function listAction() {\n\t\t// Preload info\n\t\t$category = Engine_Api::_()->getItem('experience_category', $this->_getParam('category'));\n\t\tif( $category ){\n\t\t\tEngine_Api::_()->core()->setSubject($category);\n\t\t}\n\n\t\t// Search Params\n\n\n\t\t// Get paginator\n\t\t// Render\n\t\t$this -> _helper -> content -> setNoRender() -> setEnabled();\n\t}", "title": "" }, { "docid": "03808d2d6d000fb1319fe742e01d9036", "score": "0.6646285", "text": "public function action_list()\n {\n $page = $this->request->param('page', 1);\n\n $m = new Model_Client();\n $client_list = $m->get_page($page);\n\n $body = View::factory('client/list');\n\n $body->set_global('title', \"Client Page {$page}\");\n $body->bind('client_list', $client_list);\n\n $this->body = $body;\n }", "title": "" }, { "docid": "02c8166c695e8bc3564f2f2bec85604e", "score": "0.6638152", "text": "public function index()\n {\n return ResponseHelper::findSuccess(\n 'Cms data',\n CmsResource::collection(Cms::all())\n );\n }", "title": "" }, { "docid": "85549542de9c758b6a3d4a16f168b2ce", "score": "0.66364837", "text": "public function index()\n {\n return BookResource::collection(Book::paginate(10));\n }", "title": "" }, { "docid": "ee7b30dd0dba246122a26d0716451cd3", "score": "0.6636415", "text": "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_building->get_all();\n\t\t$this->template->set('title', 'Building List');\n\t\t$this->template->load('template', 'contents', 'building/building_list', $data);\n\t}", "title": "" }, { "docid": "8515c32bb273c939079fe494608b7eaa", "score": "0.6633632", "text": "public function index()\n {\n $alunos = Aluno::paginate(10);\n return AlunoResource::collection($alunos);\n }", "title": "" }, { "docid": "7c63c6204952f65da01fd3b885ff05fb", "score": "0.66233116", "text": "public function list(){\n\t\t$data = $this->category_model->getAll();\n\n\t\tinclude_once 'views/category/list.php';\n\t}", "title": "" }, { "docid": "3be910f9eb3367f879662cbb48fa2a75", "score": "0.66174275", "text": "public function index()\n {\n $list_obj = Article::all();\n return view('admin.' . $this->obj_name . '.list')->with('list_obj', $list_obj);\n }", "title": "" }, { "docid": "54e0fa7125b81ab722716499fd5614cb", "score": "0.6610289", "text": "public function ListView()\n\t{\n\t\t$this->RequirePermission(ExampleUser::$PERMISSION_ADMIN, \n\t\t\t\t'SecureExample.LoginForm', \n\t\t\t\t'Login is required to access this page',\n\t\t\t\t'Admin permission is required to access this page');\n\t\t\n\t\t$this->Assign(\"currentUser\", $this->GetCurrentUser());\n\t\t\n\t\t$this->Assign('page','users');\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "db76ec3f068acc24a7c0805e126850ca", "score": "0.6606056", "text": "public function list()\n {\n\n $pageTitle = 'List';\n $pageDescription = 'Some description for the page';\n\n return view('components.list', compact('pageTitle', 'pageDescription'));\n }", "title": "" }, { "docid": "d73b7640ad41df7377bc45e90e4c9dbc", "score": "0.6605765", "text": "public function index()\n {\n //Listado de todo\n $todos = Todo::paginate(15);\n return TodoResource::collection($todos);\n\n }", "title": "" }, { "docid": "adb2b4c810e3d542d4d70e15a77dc1a4", "score": "0.6604502", "text": "public function listing()\n {\n // if($this->isAdmin() == TRUE)\n // if($this->isDataClerk() == FALSE || $this->isAccountant() == FALSE || $this->isAdmin() == FALSE)\n // {\n // $this->loadThis();\n // }\n // else\n // { \n $data['docs'] = $this->document_model->getDocs();\n // echo'<pre>HTTPS Clearing & Forwarding info Request: '; print_r($data['docs']); \n // die;\n \n $this->global['pageTitle'] = 'Trulance : Lodged Documents ';\n $this->loadViews(\"documents/index\", $this->global, $data, NULL);\n // }\n }", "title": "" }, { "docid": "47f1f9c4d1b025aae8305888135845b3", "score": "0.66041565", "text": "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Lista::find()->andWhere(['created_by' => Yii::$app->user->id]),\n /*\n 'pagination' => [\n 'pageSize' => 50\n ],\n 'sort' => [\n 'defaultOrder' => [\n 'id' => SORT_DESC,\n ]\n ],\n */\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "334bac2742f908edac4d7c1babc36724", "score": "0.6603296", "text": "public function index()\n {\n $items = Item::all();\n\n return ItemResource::collection($items);\n }", "title": "" }, { "docid": "eb627f82e04a8ce7babdb6c08d8661a8", "score": "0.6594868", "text": "public function index() {\n $this->model->getList($this->submit);\n\n $this->smarty->assign('module', $this);\n\n $this->smarty->assign('liste', $this->model->list);\n $this->smarty->assign('barre_nav2', $this->model->barre_nav2);\n $this->smarty->assign('nbtotal', $this->model->nbtotal);\n $this->smarty->assign('recherche', $this->model->recherche);\n\n $this->render($this->pathTpl . 'list.tpl');\n }", "title": "" }, { "docid": "e531e5dcc8f7b8b9853cd8c54766f305", "score": "0.6593884", "text": "public function index()\n {\n // Get contacts\n $contacts = Contact::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of contacts as a resource\n return ContactResource::collection($contacts);\n }", "title": "" }, { "docid": "4cd5fe89bdc578ba54a4aa2e31cb87e1", "score": "0.6588902", "text": "public function index()\n {\n return successResponseWithData($this->repository->listAll());\n }", "title": "" }, { "docid": "7a70b9654c373e705dcab06ef07fabd3", "score": "0.6588745", "text": "public function index() {\n $listings = Search::allListings();\n return view('listing.index', [\n 'allitems' => $listings,\n ]);\n }", "title": "" }, { "docid": "2e11fc1536caf81ce9f7d87adf08936c", "score": "0.6583178", "text": "public function index()\n {\n $model = $this->model;\n $paginator = $model::orderBy('created_at', 'desc')->paginate();\n return $this->controller->respondWithPagination($paginator, new $this->transformer);\n }", "title": "" }, { "docid": "9217fd803e32aa1e6cac6f3b595cc791", "score": "0.6580564", "text": "public function getList()\n {\n\t\t$uid = intval($_GET['uid']);\n\t\t$data = $this->storyModel->getList($uid);\n\t\t$this->RestAPI->display($data);\n }", "title": "" }, { "docid": "218a3bcc6c3ba48283149f8614d45562", "score": "0.65740526", "text": "public function index() {\n\t\t$this->get ();\n\t}", "title": "" }, { "docid": "ec01971be4b0a73de78f8a0662695e97", "score": "0.657313", "text": "public function index()\n\t{\t\n\t\t\n\t\t$data['lists'] = $this->mdl_employee->get_all();\n\t\t$this->template->set('title', 'Employee List');\n\t\t$this->template->load('template', 'contents', 'list', $data);\n\t}", "title": "" }, { "docid": "93ceccdfcfd3d2e3e028c05f01aee311", "score": "0.6564594", "text": "public function index()\n {\n // Get list of items\n ${$this->getEntity()} = $this->createModel()->get();\n\n if (request()->expectsJson()) {\n return ${$this->getEntity()};\n }\n\n // Show index page\n return view($this->getViewPath('index'), compact(\"{$this->getEntity()}\"));\n }", "title": "" }, { "docid": "c4bb31a9775a0e667ef62e4f3a23aeab", "score": "0.6563258", "text": "public function listAction() {\n $this->_datatable();\n return array();\n }", "title": "" }, { "docid": "4d16a85114e205a309d60d279285baf8", "score": "0.6556644", "text": "public function actionList() {\n $this->renderVideos(Yii::app()->params['videoListPageSize'], 'list');\n }", "title": "" }, { "docid": "1a71da726be7d8e39434bf8006641a36", "score": "0.65561515", "text": "public function index()\n {\n return NovelResource::collection(Novel::paginate(25));\n }", "title": "" }, { "docid": "0d8f15014904fe5debac00edf07281d4", "score": "0.6553877", "text": "public function listeAction()\n\t{\n\t\t$liste = $this->getListeEntity();\n\t\treturn $this->renderListeEntity($liste);\n\t}", "title": "" }, { "docid": "58a230f5d27bebeb199da204e142de11", "score": "0.6551992", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = ucfirst(($this->chapter ? $this->chapter->title . ' --> ' : '') . $this->crud->entity_name_plural);\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": "9244b40f6f21e992178f783de4251dd2", "score": "0.6550698", "text": "public function index()\n {\n $newsAge = new NewsAgeService();\n return response()->view('admin.resource.index', [\n 'resources' => Resource::all(),\n 'maximumNewsAge' => $newsAge->maximumAge,\n 'NewsAgeArray' => $newsAge->currentAgesArray\n ]);\n }", "title": "" }, { "docid": "3b73cbfdaf4da6b77e444f5087149b48", "score": "0.654366", "text": "public function listAction(){\n $this->_helper->layout->disableLayout();\n $search = $this->_request->getParam('search');\n $this->view->lists_search = $this->inst_list->getListsSearch($search);\n }", "title": "" }, { "docid": "5e6c89ae87e322e6cebabf8a709371ec", "score": "0.6532866", "text": "public function index()\n {\n $activitylists = ActivityList::getAllActivityList();\n return ActivityListResource::collection($activitylists);\n }", "title": "" }, { "docid": "fbff09efef269fb01080a8f477264a11", "score": "0.65298074", "text": "public function indexAction()\n {\n return $this->listAction();\n }", "title": "" }, { "docid": "f852b02ada9624be17ccc6c0b233bca4", "score": "0.65288365", "text": "public function list()\n {\n }", "title": "" }, { "docid": "8c17e54890fb7927d5665fd20840a59b", "score": "0.65280986", "text": "public function actionList() {}", "title": "" }, { "docid": "c5764d940efbfdf8d73db2746d19dc91", "score": "0.65280247", "text": "public function indexAction()\n {\n $ressources = $this->get('cba.service.ressource')->getAll();\n\n return $this->render('AppBundle:ressource:index.html.twig', array(\n 'ressources' => $ressources,\n ));\n }", "title": "" }, { "docid": "2ee8b8d707f017e5a8e409b7f12435d8", "score": "0.65266925", "text": "public function index()\n {\n return EntryResource::collection(Entry::all());\n }", "title": "" }, { "docid": "ec0f76ee79c606aa2baf2b2bcdb84b9c", "score": "0.6522105", "text": "public function index()\n {\n //get menus\n $menus = Menu::when(request()->q, function($menus) {\n $menus = $menus->where('name', 'like', '%'. request()->q . '%');\n })->latest()->paginate(10);\n \n //return with Api Resource\n return new MenuResource(true, 'List Data Menu', $menus);\n }", "title": "" }, { "docid": "5439447ac88f8cc98dc7832990b07305", "score": "0.65154237", "text": "public function indexAction()\n {\n $this->display();\n\n }", "title": "" }, { "docid": "dac10993b16b17127f0067b303d87b06", "score": "0.6514288", "text": "public function index()\n {\n //return Student::latest()->paginate(10);\n //return new StudentResource(Student::find(1));\n return new StudentCollection(Student::latest()->paginate(10));\n //return Student::all();\n }", "title": "" }, { "docid": "e9de3a5bbe6ce36d1c8d9b089e6812a0", "score": "0.6509821", "text": "public function index()\n {\n //Get Products\n $products = Products::orderBy('id', 'asc')\n ->join('categories', 'products.category_id', '=', 'categories.id')\n ->select('products.*', 'categories.name AS category')\n ->get();\n\n //Return Collection of Products\n return ProductsResource::collection($products);\n }", "title": "" }, { "docid": "57d86a0d21f4bd82a348ac1b9719ace2", "score": "0.65042144", "text": "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Food::find()\n ]);\n\n return $this->render('index', [\n 'listDataProvider' => $dataProvider\n ]);\n }", "title": "" }, { "docid": "2bccbfe61c567cbf0e28781cdbe73546", "score": "0.65021294", "text": "public function index()\n\t{\n\t\treturn (new PlayListCollection(PlayList::paginate()))->response()->setStatus(Response::HTTP_OK);\n\t}", "title": "" }, { "docid": "8645d213586ec548f9ce61cc0cf2e717", "score": "0.6501545", "text": "public function action_hospital_list() {\n $start = 0;\n if(isset($_GET[\"start\"])) {\n $start = $_GET[\"start\"];\n }\n $hospital_data = HospitalModel::get_hospitals($start, 20);\n $view = View::forge('hospitalviews/hospital_list');\n $view->contents = View::forge('hospitalviews/template');\n $view->title = 'Hospital List';\n $view->hospital_css = 'hospital.css';\n $view->hospital_data = $hospital_data;\n $view->start = $start;\n return Response::forge($view);\n }", "title": "" }, { "docid": "33f88f42b5cb9e92e9a26d82d3471d17", "score": "0.64990896", "text": "public function index()\n {\n $resource = $this->prepResource('index');\n if (request()->ajax()) {\n return $resource->jsonDatatables();\n }\n $this->showBreadcrumb($resource);\n\n return $this->view(compact('resource'));\n }", "title": "" }, { "docid": "3948769314da329754d55d43362bf87b", "score": "0.6489118", "text": "public function list()\n\t{\n\t\t$this->admin();\n\t\t$data['investors'] = $this->investor_model->getAllInvestor();\n\t\t$this->page_construct('investor/list',$data);\n\t}", "title": "" }, { "docid": "eac7a378742b29b2e677a3e136e5c663", "score": "0.6485999", "text": "public function index()\n {\n //TODO add showing of all records\n }", "title": "" }, { "docid": "e2c433ae62fdd0143166040b27f97b10", "score": "0.6484191", "text": "public function index()\n {\n $collection = UserResource::collection(\n User::all()\n );\n\n return $this->showAll($collection);\n }", "title": "" }, { "docid": "c857bd7504f0580a308861e50394e4b0", "score": "0.64808744", "text": "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\tif($page < 1) $page = 1;\n\t\t\n\t\t$status = intval($this->getInput('status'));\n\t\t$resolution = $this->getInput('resolution');\n\t\t$operators = $this->getInput('operators');\n\t\t$title = $this->getInput('title');\n\t\t$params = array();\n\t\t$search = array();\n\t\tif($resolution) {\n\t\t\t$params['resolution'] = $resolution;\n\t\t\t$search['resolution'] = $resolution;\n\t\t}\n\t\t\n\t\tif($operators != 'a') {\n\t\t\t$params['operators'] = $operators;\n\t\t\t$search['operators'] = $operators;\n\t\t}\n\t\tif($status) {\n\t\t\t$params['status'] = $status - 1;\n\t\t\t$search['status'] = $status;\n\t\t}\n\t\t\n\t\tif($title) {\n\t\t\t$params['title'] = $title;\n\t\t\t$search['title'] = $title;\n\t\t}\n\t\t\n\t\tlist(, $resolutions) = Resource_Service_Attribute::getList(1, 100,array('at_type'=>4));\n\t\t$resolutions = Common::resetKey($resolutions, 'id');\n\t\tlist(, $operators) = Resource_Service_Attribute::getList(1, 100,array('at_type'=>6));\n\t\t$operators = Common::resetKey($operators, 'id');\n\t\t\n\t\tlist($total, $result) = Resource_Service_Type::getCanUseResourceTypes($page, $perpage,$params);\t\t\n\t\t$this->cookieParams();\n\t\t$this->assign('result', $result);\n\t\t$url = $this->actions['listUrl'].'/?' . http_build_query($search).'&';\n\t\t$this->assign('pager', Common::getPages($total, $page, $this->perpage, $url));\n\t\t$this->assign('search', $search);\n\t\t$this->assign('resolutions', $resolutions);\n\t\t$this->assign('operators', $operators);\n\t\t$this->assign(\"total\", $total);\n\t}", "title": "" }, { "docid": "220099abd3e945ba3a715a4f02042bf9", "score": "0.6478389", "text": "public static function list( )\n\t\t{\n\t\t\t//echo \"Listando as coisas\";\n\t\t\n\t\t\t$dao = new LivroDAO;\n\t\t\t$lista = $dao->listAll( );\n\n\t\t\tself::view( 'consulta' , $lista );\n\n\t\t}", "title": "" }, { "docid": "c8bce961d8c00f94db1cc45bb581d8eb", "score": "0.6476608", "text": "public function index()\n {\n $products = Product::all();\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "d853b351ec514560d915a63492709983", "score": "0.6473065", "text": "public function index()\n {\n $allProducts = Product::all();\n return response(ProductResources::collection($allProducts));\n }", "title": "" } ]
8230782a2249a2640f824b1517e375f1
Operation deleteWireBankLinkUsingDeleteAsyncWithHttpInfo Delete bank link
[ { "docid": "9459eafe2e93479870329500455083a1", "score": "0.6544815", "text": "public function deleteWireBankLinkUsingDeleteAsyncWithHttpInfo($nucleus_bank_link_id)\n {\n $returnType = '\\com\\hydrogen\\integration\\Model\\WireBankLinkResponseVO';\n $request = $this->deleteWireBankLinkUsingDeleteRequest($nucleus_bank_link_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" } ]
[ { "docid": "b02ccb401efe70b40853d96be80311c8", "score": "0.60250175", "text": "public function deleteBankLinkUsingDeleteAsyncWithHttpInfo($bank_link_id)\n {\n $returnType = '';\n $request = $this->deleteBankLinkUsingDeleteRequest($bank_link_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "0a8918420d74194f45534c01326f6d50", "score": "0.5935628", "text": "public function deleteWireBankLinkUsingDeleteAsync($nucleus_bank_link_id)\n {\n return $this->deleteWireBankLinkUsingDeleteAsyncWithHttpInfo($nucleus_bank_link_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "23c6347e857a354bc0a95f5ffa72d333", "score": "0.59098166", "text": "protected function deleteBankLinkUsingDeleteRequest($bank_link_id)\n {\n // verify the required parameter 'bank_link_id' is set\n if ($bank_link_id === null || (is_array($bank_link_id) && count($bank_link_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $bank_link_id when calling deleteBankLinkUsingDelete'\n );\n }\n\n $resourcePath = '/nucleus/v1/bank_link/{bank_link_id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($bank_link_id !== null) {\n $resourcePath = str_replace(\n '{' . 'bank_link_id' . '}',\n ObjectSerializer::toPathValue($bank_link_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\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 \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 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "d588ea99c734edf0982b03825768b364", "score": "0.58907264", "text": "public function deleteWireBankLinkUsingDeleteWithHttpInfo($nucleus_bank_link_id)\n {\n $returnType = '\\com\\hydrogen\\integration\\Model\\WireBankLinkResponseVO';\n $request = $this->deleteWireBankLinkUsingDeleteRequest($nucleus_bank_link_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\com\\hydrogen\\integration\\Model\\WireBankLinkResponseVO',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "ea3c23421448333b43e8619bdfdfa189", "score": "0.5729426", "text": "protected function deleteWireBankLinkUsingDeleteRequest($nucleus_bank_link_id)\n {\n // verify the required parameter 'nucleus_bank_link_id' is set\n if ($nucleus_bank_link_id === null || (is_array($nucleus_bank_link_id) && count($nucleus_bank_link_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $nucleus_bank_link_id when calling deleteWireBankLinkUsingDelete'\n );\n }\n\n $resourcePath = '/wire/bank_link/{nucleus_bank_link_id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($nucleus_bank_link_id !== null) {\n $resourcePath = str_replace(\n '{' . 'nucleus_bank_link_id' . '}',\n ObjectSerializer::toPathValue($nucleus_bank_link_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $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 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "c40d0635e732d2969f4f9cd8d4be8140", "score": "0.5576195", "text": "public function actionDelete()\n {\n $post = $this->getRequiredFields(['code']);\n\n if (!$link = Link::findOne(['short' => $post['code']])) {\n $this->sendError(404, 'Link not found');\n }\n\n try {\n $link->delete();\n } catch (StaleObjectException $e) {\n } catch (\\Throwable $e) {\n $this->sendError(400, 'Unknown error deleting link');\n }\n\n $this->sendOk(200, 'Short link deleted with success');\n }", "title": "" }, { "docid": "5e7527386733e2c93efcc15ad28cddfa", "score": "0.537782", "text": "public function deleteWireBankLinkUsingDelete($nucleus_bank_link_id)\n {\n list($response) = $this->deleteWireBankLinkUsingDeleteWithHttpInfo($nucleus_bank_link_id);\n return $response;\n }", "title": "" }, { "docid": "9fd3d8bb61a21f1947402f9adbaec1cd", "score": "0.5343114", "text": "public function testDeleteBankAccountWithoutParameters(){\n\t\t$response = PayUBankAccounts::delete(array());\n\t}", "title": "" }, { "docid": "b04c36be721ec38d61b508d63e3bdb4c", "score": "0.5339195", "text": "public function deleteBankLinkUsingDeleteWithHttpInfo($bank_link_id)\n {\n $returnType = '';\n $request = $this->deleteBankLinkUsingDeleteRequest($bank_link_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "6cde6e1973ccf76a1f00b7856640e862", "score": "0.53298783", "text": "public function deleteBankLinkUsingDeleteAsync($bank_link_id)\n {\n return $this->deleteBankLinkUsingDeleteAsyncWithHttpInfo($bank_link_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "283df7455e97c023cd9224a2ab2d873b", "score": "0.52563995", "text": "public function delete($id_bank);", "title": "" }, { "docid": "398725f6eaf43a51539c9c040bb594a3", "score": "0.5189919", "text": "function delete()\n {\n $this->_api->doRequest(\"DELETE\", \"{$this->getBaseApiPath()}\");\n }", "title": "" }, { "docid": "bbcaaf214e33653bca814346798b0096", "score": "0.5181686", "text": "public function deleted(Link $link)\n {\n //\n }", "title": "" }, { "docid": "4bbf7920b760b7212b6e5283fb669f81", "score": "0.51618624", "text": "public function delLinkMan() {\n $delFlag = M('EmerServInfo')->where('id=' . $_GET['id'])->delete();\n if ($delFlag === FALSE) {\n $returnData['flag'] = 0;\n $returnData['msg'] = '删除失败,请重试';\n } else {\n $returnData['flag'] = 1;\n $returnData['msg'] = '删除成功';\n }\n $this->ajaxReturn($returnData);\n }", "title": "" }, { "docid": "18397ede83edea5037051a59346b4dd5", "score": "0.51113427", "text": "public function testCustomerLinkdeleteCreditCardCustomerCode() {\n // Create and populate the request object.\n $request = array(\n 'customerIPAddress' => '',\n 'customerCode' => self::$creditCardCustomerCode,\n );\n\n $iats = new CustomerLink(self::$agentCode, self::$password, 'NA');\n $response = $iats->deleteCustomerCode($request);\n\n $this->assertEquals('OK', $response['AUTHORIZATIONRESULT']);\n }", "title": "" }, { "docid": "ad4ca5be4a6cf0a04d0d9126ded51cd8", "score": "0.51056945", "text": "public function testDeleteBankAccountWithoutCustomerId(){\n\t\t$parameters[PayUParameters::BANK_ACCOUNT_ID] = \"ID_TESTING\";\n\t\t$response = PayUBankAccounts::delete($parameters);\n\t}", "title": "" }, { "docid": "8ab497b647fe9db37e1257cb0c8617b7", "score": "0.50553113", "text": "public function delete(string $url): ResponseInterface;", "title": "" }, { "docid": "aa4254ab135fddaa0f0ffb7827e680fd", "score": "0.49954963", "text": "public function testDeleteNoTokenCURL(){\n $token = \"\";\n $body = \"\";\n $endpoint = \"/brands/1\";\n\n try {\n $output = Testing::callAPIOverHTTP($endpoint, Methods::DELETE, $body, $token, Testing::JSON);\n } catch (\\Exception $err) {\n $this->assertEmpty($err->getMessage(), \"Error message: \". $err->getMessage());\n $output = \"API Call failed\";\n }\n\n $this->assertEquals(StatusCodes::UNAUTHORIZED, Testing::getLastHTTPResponseCode());\n $this->assertEquals(\"No token provided\", $output);\n }", "title": "" }, { "docid": "d434e2cdc40338f523a40bcd0c8522a0", "score": "0.49823642", "text": "public function delete() {\n $this->client->deleteData($this->uri);\n }", "title": "" }, { "docid": "2d474f82d3c7c659b70863f62ca6563b", "score": "0.49112457", "text": "public function delete($id_api);", "title": "" }, { "docid": "8398fa5dd2ac2d83f0588b9b48aeb12a", "score": "0.49105752", "text": "public function createBankLinkUsingPostAsyncWithHttpInfo($bank_link_info_request)\n {\n $returnType = '\\com\\hydrogen\\nucleus\\Model\\BankLink';\n $request = $this->createBankLinkUsingPostRequest($bank_link_info_request);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "c4c2aaad72a8f718f3d4eb5d9a35dd58", "score": "0.49047157", "text": "public function delete(Request $request) {\n\n $this->validateDeleteBillData($request);\n\n Auth::user()->bills()->where('bills.id', $request->get('bill_id'))->delete();\n\n return response()->json([\n 'title' => 'Succes!',\n 'message' => 'Factura a fost ștearsă.'\n ]);\n }", "title": "" }, { "docid": "3c9e980592fff48def0ef1554bb9ba31", "score": "0.48920533", "text": "public function delete($url, array $parameters = []): ResponseInterface;", "title": "" }, { "docid": "8b3e06ba198288f315ac931c713596da", "score": "0.48801938", "text": "protected function httpDelete() {\n\n $uri = $this->getRequestUri();\n $node = $this->tree->getNodeForPath($uri);\n if (!$this->broadcastEvent('beforeUnbind',array($uri))) return;\n $node->delete();\n\n $this->httpResponse->sendStatus(204);\n $this->httpResponse->setHeader('Content-Length','0');\n\n }", "title": "" }, { "docid": "99a1d18cc34d50d6d865dc70de02e884", "score": "0.48634195", "text": "public static function delete($url, $callback = null)\n {\n return self::make($url, self::METHOD_DELETE, $callback)->send();\n }", "title": "" }, { "docid": "1b7e2d0d9811e2ef2f45ba51a3cbc383", "score": "0.48596168", "text": "public function linkDelete($ajax = false)\n {\n return url(camelToSnake($this->object->className) . '/' . (($ajax) ? 'delete_ajax' : 'delete') . '/' . $this->object->id(), true);\n }", "title": "" }, { "docid": "21f2853ea2b02a5f99fcc380775dc2b4", "score": "0.48459685", "text": "public function delete(string $url, array $params = [], array $headers = [], array $options = []);", "title": "" }, { "docid": "a128c9317c89f3642d2c7a2517166e26", "score": "0.48193112", "text": "public function testDeleteBankAccount(){\n\t\t\n\t\t//Create Customer\n\t\t$parameters = PayUTestUtil::buildParametersBankAccount();\n\t\t$createdCustomer = PayUCustomers::create(PayUTestUtil::buildSubscriptionParametersCustomer());\n\t\t$this->assertNotNull($createdCustomer);\n\t\t$this->assertNotNull($createdCustomer->id);\n\t\t\n\t\t//Create bank account to customer\n\t\t$parameters[PayUParameters::CUSTOMER_ID] = $createdCustomer->id;\n\t\t$createdBankAccount = PayUBankAccounts::create($parameters);\n\t\t$this->assertNotNull($createdBankAccount);\n\t\t$this->assertNotNull($createdBankAccount->id);\n\t\t$this->assertEquals(\"CREATED\",$createdBankAccount->state);\n\t\t\n\t\t//Delete bank account\n\t\t$parameters[PayUParameters::BANK_ACCOUNT_ID] = $createdBankAccount->id;\n\t\t$response = PayUBankAccounts::delete($parameters);\n\t\t$this->assertNotNull($response);\n\t\t$this->assertNotNull($response->description);\n\t}", "title": "" }, { "docid": "8a92250a21f3f22c7c171ee761d1ada2", "score": "0.477269", "text": "public function delete($url, $body = []);", "title": "" }, { "docid": "8639d30c8ec9f8f7adee902a6926a296", "score": "0.4742981", "text": "public function delete()\n {\n return $this->apiCall('delete', '');\n }", "title": "" }, { "docid": "8639d30c8ec9f8f7adee902a6926a296", "score": "0.4742981", "text": "public function delete()\n {\n return $this->apiCall('delete', '');\n }", "title": "" }, { "docid": "8639d30c8ec9f8f7adee902a6926a296", "score": "0.4742981", "text": "public function delete()\n {\n return $this->apiCall('delete', '');\n }", "title": "" }, { "docid": "c382cbd58fbce43b044d6fad5b0f0c56", "score": "0.47313505", "text": "public function del() {\n $this->validate(request(), [\n 'asset_contract_id' => 'required'\n ]);\n\n $asset_contract_id = request('asset_contract_id');\n\n DB::table('asset_contract')\n ->where('id', '=', $asset_contract_id)\n ->delete();\n \n return response(['status' => 'ok'], 200);\n }", "title": "" }, { "docid": "b5b15fde0fda61397ae8a0d51cd7c3bf", "score": "0.471277", "text": "public function deleteAsyncWithHttpInfo($request)\n {\n $request = $this->deleteRequest($request);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $this->handleClientException($exception);\n }\n );\n }", "title": "" }, { "docid": "bbd60e0c3fae281a72c915d2990c720f", "score": "0.47044423", "text": "public function delete($id){\n\t\t$session = new Session();\n\t\t$userId = $session->currentId();\n\t\tif($userId != false){\n\t\t\t$response = $this->client->deleteItem(array(\n\t\t\t\t'TableName' => 'Links',\n\t\t\t\t'Key' => array(\n\t\t\t\t\t'LinkId' => array(\n\t\t\t\t\t\tType::STRING => $id\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t));\n\t\t}else{\n\t\t\techo \"error\";\n\t\t}\n\t}", "title": "" }, { "docid": "db6ccb41facd0a5b918439070038f074", "score": "0.47041053", "text": "public function actionDelete($id)\n {\n if (Yii::$app->request->isAjax) {\n $id = Yii::$app->request->post('id');\n $res = Yii::$app->db->createCommand()->update(Link::tableName(),\n ['is_del' => Link::DELETE_TRUE],\n ['id' => $id]\n )->execute();\n Yii::$app->response->format = 'json';\n return $res ? ['status' => 1] : ['status' => 0];\n }\n }", "title": "" }, { "docid": "566982a5431ee7a9fb46f1deb3bcfc14", "score": "0.4703456", "text": "public function delete($url, $error_map = [])\n {\n // process curl delete request\n $this->curl->delete($this->client->base_url.$url);\n\n // return response\n return new Response(\n $this->curl,\n $error_map\n );\n }", "title": "" }, { "docid": "93120d72a81921a71c34fbbd786c75de", "score": "0.4703434", "text": "public function delete($id){\r\n\t\t$sql = 'DELETE FROM link WHERE id = ?';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\t$sqlQuery->setNumber($id);\r\n\t\treturn $this->executeUpdate($sqlQuery);\r\n\t}", "title": "" }, { "docid": "ffa43adaccf1d58492dd910c0477ed65", "score": "0.4696402", "text": "public function deleteById($infoBarId);", "title": "" }, { "docid": "e5aa26039fcfb4674f8f595ffcb87bd5", "score": "0.46958613", "text": "public function httpDelete($url, $headers = null);", "title": "" }, { "docid": "b2f378a2e4ee6f4b1d6965d0d9ef2960", "score": "0.46753097", "text": "public function delete($url, $query = [], $body = null, $raw = false)\n {\n return $this->makeRequest('DELETE', $url, $query, $body, $raw);\n }", "title": "" }, { "docid": "88340071ec81dfdf5d70e453e9aa2bfb", "score": "0.4666862", "text": "public function delete($id, $unlink = true);", "title": "" }, { "docid": "be816243a68931cab697e7b9fe210c22", "score": "0.46624222", "text": "public function delete($url, array $data = [])\n {\n return $this->request('delete', $url, $data);\n }", "title": "" }, { "docid": "9d196d25712bdcd8fe60ad085d199ca5", "score": "0.46600774", "text": "public function delete($url, $params='', &$info='')\n\t{\n\t\treturn $this->Call($url, $params, $info, 'delete');\n\t}", "title": "" }, { "docid": "f816a5456e8483c15b8be110e238667b", "score": "0.46582603", "text": "public function deletePaymentLink(string $id): ApiResponse\n {\n $_reqBuilder = $this->requestBuilder(RequestMethod::DELETE, '/v2/online-checkout/payment-links/{id}')\n ->auth('global')\n ->parameters(TemplateParam::init('id', $id));\n\n $_resHandler = $this->responseHandler()->type(DeletePaymentLinkResponse::class)->returnApiResponse();\n\n return $this->execute($_reqBuilder, $_resHandler);\n }", "title": "" }, { "docid": "2958898750de822d3194e7cc72454c30", "score": "0.46577382", "text": "public function debtorContactNameDELETERequestDebtorIDContactNamesContactNameIDDeleteAsyncWithHttpInfo($accept, $debtor_id, $contact_name_id, $jiwa_stateful = null, $default_contact = null, $debtor_contact = null, $creditor_contact = null, $contact_id = null, $account_no = null, $title = null, $first_name = null, $surname = null, $primary_position_id = null, $primary_position_name = null, $secondary_position_id = null, $secondary_position_name = null, $tertiary_position_id = null, $tertiary_position_name = null, $phone = null, $mobile = null, $fax = null, $email_address = null, $prospect_id = null, $logon_code = null, $logon_password = null, $external_app_rec_id = null, $last_saved_date_time = null, $logon_code_changed_by_user = null)\n {\n $returnType = '\\Jiwa\\Model\\Object';\n $request = $this->debtorContactNameDELETERequestDebtorIDContactNamesContactNameIDDeleteRequest($accept, $debtor_id, $contact_name_id, $jiwa_stateful, $default_contact, $debtor_contact, $creditor_contact, $contact_id, $account_no, $title, $first_name, $surname, $primary_position_id, $primary_position_name, $secondary_position_id, $secondary_position_name, $tertiary_position_id, $tertiary_position_name, $phone, $mobile, $fax, $email_address, $prospect_id, $logon_code, $logon_password, $external_app_rec_id, $last_saved_date_time, $logon_code_changed_by_user);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "c501584da48ae79a083b29b65b53c61a", "score": "0.46518484", "text": "public function delete()\n {\n $this->method = 'DELETE';\n $this->send(null);\n }", "title": "" }, { "docid": "80a6ae588d31b6485e2580a50f9d9a00", "score": "0.46432853", "text": "final public function delete($url, array $argument = [])\n {\n return $this->sendRequest($url, strtoupper(__FUNCTION__), $argument);\n }", "title": "" }, { "docid": "760cfcba05742cb00fbf179a2e885eb5", "score": "0.4623148", "text": "public function delete_delete(){\n $response = $this->KelasM->delete_kelas(\n $this->delete('id_kelas')\n );\n $this->response($response);\n }", "title": "" }, { "docid": "d6bc267b5824027f8b659a56ce60cbb8", "score": "0.46222153", "text": "public function delete()\n\t{\n\t\t$this->authStub->refreshToken();\n\t\t$completeURL = $this->authStub->baseUrl . $this->path;\n\t\t$additionalQS = array();\n\t\t\n\t\t// All URL Props are required when doing Delete\t\n\t\tforeach($this->urlProps as $value){\n\t\t\tif (is_null($this->props) || !array_key_exists($value,$this->props)){\n\t\t\t\tthrow new Exception(\"Unable to process request due to missing required prop: {$value}\");\t\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!is_null($this->props)) {\n\t\t\tforeach ($this->props as $key => $value){\n\t\t\t\tif (in_array($key,$this->urlProps)){\n\t\t\t\t\t$completeURL = str_replace(\"{{$key}}\",$value,$completeURL);\t\t\t\t\t\n\t\t\t\t} \n\t\t\t}\t\t\t\t\n\t\t}\n//\t\techo $additionalQS[\"access_token\"] . \"\\n\";\n\t\t// $queryString = http_build_query($additionalQS);\t\t\n\t\t// $completeURL = \"{$completeURL}?{$queryString}\";\n\t\t// $response = new ET_DeleteRest($this->authStub, $completeURL);\t\n\t\t$response = new ET_DeleteRest($this->authStub, $completeURL, $this->authStub->getAuthToken());\n\t\t\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "d7025cd405f9b54ae585347b22123682", "score": "0.46221045", "text": "public function createWireBankLinkUsingPostAsyncWithHttpInfo($request)\n {\n $returnType = '\\com\\hydrogen\\integration\\Model\\WireBankLinkResponseVO';\n $request = $this->createWireBankLinkUsingPostRequest($request);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "d8d9b23315e757149906a067c4ee8df8", "score": "0.46220258", "text": "public function deleteLink() {\n\t\t$lid = $this->data['lid'];\n\t\tif($lid > 0) {\n\t $rs = mq(\"delete from \" . DB_TBL_LINKS . \" where lid='$lid'\");\n\t $rs = mq(\"delete from \" . DB_TBL_CATEGORY_LINK . \" where uid='$lid'\");\n\t $rs = mq(\"delete from \" . DB_TBL_META_DATA . \" where uid='$lid' and md_type='link'\");\n\t\t\t$_SESSION['_mtype'] = \"W\";\n\t\t\t$_SESSION['_msg'] = \"deletedlink\";\n\t\t}\n\t}", "title": "" }, { "docid": "2f18b116f8fedce78f294a6707d9d263", "score": "0.46202552", "text": "public function delete($uri, $options = array())\n {\n return $this->makeRequest(new Paysera_WalletApi_Http_Request(\n $uri,\n Paysera_WalletApi_Http_Request::METHOD_DELETE\n ), $options);\n }", "title": "" }, { "docid": "1460c5fbc8a5cee523423b75ae69afc1", "score": "0.4619342", "text": "public function delete($url)\n {\n return $this->raw('DELETE', $url);\n }", "title": "" }, { "docid": "8ccbfc232367f53c3c865d8b8e1058ae", "score": "0.4615825", "text": "public function deleteById($bannersId);", "title": "" }, { "docid": "ed6d40623782c0bc4617f27d8a161fe0", "score": "0.4608194", "text": "public function delete($uri, array $options = []);", "title": "" }, { "docid": "52d68497359fbfb02b1af69e8ccd99d4", "score": "0.46076345", "text": "public function delete_bridge($id) {\n $sentence = new SentenceUtil();\n $sentence->addCommand(\"/interface/bridge/remove\");\n $sentence->where(\".id\", \"=\", $id);\n $this->talker->send($sentence);\n return \"Success\";\n }", "title": "" }, { "docid": "72311488fd1c7abca88eb96fa7555fa7", "score": "0.46063733", "text": "function deleteLink($type, $label, $url=false) {\n\t\tVtiger_Link::deleteLink($this->id, $type, $label, $url);\n\t}", "title": "" }, { "docid": "a9a29b10530a98d83cddad3816f8b7f9", "score": "0.46026477", "text": "public function deleteLogHoneycombAsyncWithHttpInfo($options)\n {\n $returnType = '\\Fastly\\Model\\InlineResponse200';\n $request = $this->deleteLogHoneycombRequest($options);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "7c092948db7a208f81b7a2042f5caa58", "score": "0.45994452", "text": "public function delete_by_download_id($id);", "title": "" }, { "docid": "31fa513ab937dfb60800931b72beb040", "score": "0.45977104", "text": "public function botDelete($botType, $id) {\n return $this->getServiceResponse(\"botdelete \" . $botType . \" \" . $id);\n }", "title": "" }, { "docid": "0756098fc46c8184178558eee1a359d1", "score": "0.45959684", "text": "public function actionTestDelete() {\r\n\t\t$ch = curl_init();\r\n\r\n\t\tcurl_setopt($ch, CURLOPT_URL, $_SERVER['HTTP_HOST'].'/api/1/apps/testobjid');\r\n\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');\r\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, [\r\n\t\t\t'Accept: text/plain',\r\n\t\t]);\r\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n\r\n\t\techo curl_exec($ch);\r\n\t\techo '<br/><br/>';\r\n\t\techo '<pre>'.var_export(curl_getinfo($ch), true).'</pre>';\r\n\r\n\t\tcurl_close($ch);\r\n\t}", "title": "" }, { "docid": "fb585d6ea9ee25b268aabd4f0b0662e8", "score": "0.4592676", "text": "public static function delete($url, $callback) {\n\t\treturn self::addRoute(new RouteItem(['delete'],$url,$callback));\n\t}", "title": "" }, { "docid": "d2fcb5388cfed7e684f3a767ed4ae1d1", "score": "0.45910728", "text": "public function testDelete()\n\t{\n\t\t$this->response->code = 204;\n\t\t$this->response->body = $this->sampleString;\n\n\t\t$this->client->expects($this->once())\n\t\t\t->method('delete')\n\t\t\t->with('/repos/joomla/joomla-platform/hooks/42')\n\t\t\t->will($this->returnValue($this->response));\n\n\t\t$this->assertThat(\n\t\t\t$this->object->delete('joomla', 'joomla-platform', 42),\n\t\t\t$this->equalTo(json_decode($this->sampleString))\n\t\t);\n\t}", "title": "" }, { "docid": "881096a106b5873920638d20f04bb33d", "score": "0.45849356", "text": "public function testDelete(): void\n {\n $response = $this->getHandler([\n new Response(204, [], null),\n ])->executeAndRespond(new EntityStub(['entityId' => 'entity-id']), RequestAwareInterface::DELETE, 'api-key');\n\n self::assertNull($response);\n }", "title": "" }, { "docid": "60575217b72b0f9f47e47d5a92b1ba6e", "score": "0.45794463", "text": "public function deleteBill(Request $request)\n {\n $introduce_id = $request->id;\n $this->billPaymentService->deleteBill($introduce_id);\n // $this->getHeaderData($request);\n return config('constants.MSG_DELETE');\n }", "title": "" }, { "docid": "75448a0a6c903d847fce0c09a3a78736", "score": "0.45789114", "text": "public function test_deleteCurrency($Id) {\n $requestUrl = self::$Client . \"/currencies/\" . $Id;\n \n $ch = curl_init($requestUrl); \n curl_setopt($ch, CURLOPT_URL,$requestUrl); \n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n $result = curl_exec($ch);\n $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n curl_close($ch);\n \n $this->assertEquals(204, $httpCode); \n }", "title": "" }, { "docid": "b525af8721941bd6c511f6800b3e9511", "score": "0.45787722", "text": "public function deleteUserBank() {\n\n\t\t$this->form_validation->set_rules('id', 'Id', 'trim|required');\n\t\t$this->form_validation->set_rules('user_id', 'User id', 'trim|required');\n\t\tif ($this->form_validation->run() == true){\n\t\t\t$id = $this->input->post('id');\n\t\t\t$user_id = $this->input->post('user_id');\n\t\t\t$banks = $this->UserBankModel->delete(array('id'=>$id,'user_id'=>$user_id));\n\t\t\t$response = array('status'=>true,'message'=>'Record deleted successfully!');\n\t\t\t\n\t\t}else{\n\t\t\t$errors = $this->form_validation->error_array();\n\t\t\t$response = array('status'=>false,'message'=>$errors);\n\n\t\t}\n\t\t$this->renderJson($response);\n\t}", "title": "" }, { "docid": "6d8a16b9794007744ec029669d71d795", "score": "0.45783004", "text": "public function delete(): Result;", "title": "" }, { "docid": "d53a7bc18e2b7c2d753259de30f3157a", "score": "0.45748055", "text": "public function deleteDblink($id){\n \n global $connect_bdd; \n //sql to delete a record\n $sql_delete = \"DELETE FROM link WHERE id=\".$id;\n\n // execute la requête précédente\n $connect_bdd->query($sql_delete);\n\n }", "title": "" }, { "docid": "0a4f14df568844af63898be67faa9090", "score": "0.4571497", "text": "public function deleteLink()\n {\n return URL::route('tricks.delete', [ $this->resource->slug ]);\n }", "title": "" }, { "docid": "5f17a7cce1965dab5df1bb09fcf32b93", "score": "0.4570914", "text": "public function deleteWithHttpInfo($request)\n {\n $request = $this->deleteRequest($request);\n \n $response = $this->callClient($request);\n return [null, $response->getStatusCode(), $response->getHeaders()];\n }", "title": "" }, { "docid": "2cf9e3296fe9d53597704984791325c3", "score": "0.45609275", "text": "public function deleted(CompanyInfo $companyInfo)\n {\n //\n }", "title": "" }, { "docid": "df35b7ef65c19658d3ce232999a880e3", "score": "0.45443505", "text": "public function delete($connection, $id_transaksi);", "title": "" }, { "docid": "2eeeccf544610ddcf4bd4933cfc4981c", "score": "0.45406482", "text": "public function delete(string $uri, array $headers = [], string $version = '1.1'): TestResponse;", "title": "" }, { "docid": "8ae780f10151d906668eeb7f773b9014", "score": "0.45403022", "text": "abstract public function sendDeleteBillRequest($billId);", "title": "" }, { "docid": "6b6df35879368f887dab929865d5a760", "score": "0.4539436", "text": "public function deleted()\n {\n $oCurrencyType = CurrencyType::onlyTrashed()->paginate(10);\n\n $oResponse = responseBuilder()->success(__('message.general.deleted',[\"mod\"=>\"CurrencyType\"]), $oCurrencyType, false);\n \n $this->urlRec(5, 5, $oResponse);\n return $oResponse;\n }", "title": "" }, { "docid": "97f45b878d8fefb70e978c8594328fa3", "score": "0.45332912", "text": "public function deleteLogDatadogAsyncWithHttpInfo($options)\n {\n $returnType = '\\Fastly\\Model\\InlineResponse200';\n $request = $this->deleteLogDatadogRequest($options);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "8f7a6975d305743d4fafbd0e3cacc69e", "score": "0.4528339", "text": "public function deleteAction($id)\n {\n $this->dataProvider->deleteAddress($id);\n\n return new Response(array(), parent::HTTP_STATUS_NO_CONTENT);\n }", "title": "" }, { "docid": "083c32fb6d0308dcc9398796e42435d7", "score": "0.4522489", "text": "public function testDeleteExternalLink()\n {\n }", "title": "" }, { "docid": "22a0926042c71b27e30eba541e8574ad", "score": "0.45171487", "text": "public function delete() {\n if($this->orphan_error()) return false;\n\n //Only call the API if we have an id\n if(!is_null($this->id)) {\n //Determine the service name and arguments\n $svc = $this->get_service('DELETE');\n $args = array($this->id_property => $this->id);\n\n //GOGOGO!!!\n $result = $this->call($svc, $args);\n\n //DELETED!!!\n if($result->result == BinaryBeast::RESULT_SUCCESS) {\n //Clear cache\n $this->clear_id_cache();\n $this->clear_list_cache();\n\n //Reset all local values and errors\n $this->set_id(null);\n $this->data = array();\n $this->new_data = array();\n }\n\n //API request failed - developers should evaluate last_error and last_result for details\n else return $this->set_error($result);\n }\n\n //Now that we've deleted successfully, we can remove ourselves from our parent (if we have one)\n if(!is_null($this->parent)) {\n $this->parent->remove_child($this);\n $this->parent = &$this->bb->ref(null);\n $this->orphan = true;\n }\n\n //Successfully deleted\n return true;\n }", "title": "" }, { "docid": "00c780904e93e45308886b29efa82aa9", "score": "0.45090592", "text": "public function delete($id)\n {\n return parent::deleteRequestReturnBody($this->uri . $id);\n }", "title": "" }, { "docid": "7cb9aa983994649e58bdb88e0e8e721d", "score": "0.4506944", "text": "public function delete(Request $request)\n {\n if(Branch::destroy($request->hdnResource)){\n $message = toastMessage('Branch has been successfully removed.','success');\n }else{\n $message = toastMessage('Branch has not been removed.','error');\n }\n\n // Redirect\n session()->flash('toast',$message);\n \n return back();\n }", "title": "" }, { "docid": "7c8c0f54368a3a82050141b871b68840", "score": "0.44964457", "text": "public function delete($url, array $urlParameters = [], array $headers = [], $asJSON = false)\n {\n $request = $this->prepareRequest($url, $urlParameters, $headers);\n\n curl_setopt($request, CURLOPT_CUSTOMREQUEST, 'DELETE');\n\n return $this->executeRequest($request);\n }", "title": "" }, { "docid": "b4d8529c502096bb4133f22582030554", "score": "0.4492762", "text": "public function deleteTestLink($id,$deletedBy)\n {\n \t$status = 1;\n \t$data = array (\n \t\t\t'updated_by' => $deletedBy,\n \t\t\t'status' => $status\n \t);\n \t$this->tableGateway->update ( $data, array (\n \t\t\t'id' => $id\n \t) );\n }", "title": "" }, { "docid": "6dda8c4098d31144ba244df1cafded25", "score": "0.44890168", "text": "abstract public static function deleting($callback);", "title": "" }, { "docid": "c82dd1b9fb5dbfe2427b8a0867c0822f", "score": "0.44832328", "text": "function delete(Rage4Api $api)\r\n {\r\n $api->deleteRecord($this->id);\r\n }", "title": "" }, { "docid": "d7b0f2c6736afda2daa983f8af5c3ffe", "score": "0.44817838", "text": "public function deleteAction()\n {\n $id = $this->params('id');\n $result = Pi::api('block', 'system')->delete($id, false);\n\n $message = _a('Block is deleted.');\n $this->jump(['action' => 'index'], $message);\n }", "title": "" }, { "docid": "0ca949a06fec879556c26d73f2fc7a1d", "score": "0.4476707", "text": "public function actionDeleteAddress()\n {\n //Get all request parameter\n $amData = Common::checkRequestType();\n $amResponse = $amReponseParam = [];\n\n // Check required validation for request parameter.\n $amRequiredParams = array('user_id', 'id');\n $amParamsResult = Common::checkRequestParameterKey($amData['request_param'], $amRequiredParams);\n\n // If any getting error in request paramter then set error message.\n if (!empty($amParamsResult['error'])) {\n $amResponse = Common::errorResponse($amParamsResult['error']);\n Common::encodeResponseJSON($amResponse);\n }\n\n $requestParam = $amData['request_param'];\n Common::matchUserStatus($requestParam['user_id']);\n //VERIFY AUTH TOKEN\n $authToken = Common::get_header('auth_token');\n Common::checkAuthentication($authToken);\n $snUserId = $requestParam['user_id'];\n $model = Users::findOne([\"id\" => $snUserId]);\n if (!empty($model)) {\n $address = UserAddress::findOne($requestParam['id']);\n if (!empty($address)) {\n $address->delete();\n $response = UserAddress::find()->where(['user_id' => $requestParam['user_id']])->asArray()->all();\n $amReponseParam = $response;\n $ssMessage = 'Your address has been deleted successfully.';\n $amResponse = Common::successResponse($ssMessage, $amReponseParam);\n } else {\n $ssMessage = 'Invalid Address id.';\n $amResponse = Common::errorResponse($ssMessage);\n }\n\n } else {\n $ssMessage = 'Invalid User.';\n $amResponse = Common::errorResponse($ssMessage);\n }\n // FOR ENCODE RESPONSE INTO JSON //\n Common::encodeResponseJSON($amResponse);\n }", "title": "" }, { "docid": "fe73ce37c0c1da7de4b992e792b78993", "score": "0.4475945", "text": "public function journalSetLineDELETERequestJournalSetIDLinesJournalSetLineIDDeleteAsyncWithHttpInfo($accept, $journal_set_id, $journal_set_line_id, $jiwa_stateful = null, $item_no = null, $reference = null, $remark = null, $trans_code1_id = null, $trans_code1_description = null, $trans_code2_id = null, $trans_code2_description = null, $bas_code = null, $trans_post_date_time = null, $debit_amount = null, $credit_amount = null, $allow_group = null, $staff = null, $job_costing_stage_id = null, $job_costing_full_job_no = null, $general_ledger_account_rec_id = null, $general_ledger_account_account_no = null, $general_ledger_account_description = null)\n {\n $returnType = '\\Jiwa\\Model\\Object';\n $request = $this->journalSetLineDELETERequestJournalSetIDLinesJournalSetLineIDDeleteRequest($accept, $journal_set_id, $journal_set_line_id, $jiwa_stateful, $item_no, $reference, $remark, $trans_code1_id, $trans_code1_description, $trans_code2_id, $trans_code2_description, $bas_code, $trans_post_date_time, $debit_amount, $credit_amount, $allow_group, $staff, $job_costing_stage_id, $job_costing_full_job_no, $general_ledger_account_rec_id, $general_ledger_account_account_no, $general_ledger_account_description);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "5384f5e850829d7a0b56b51e321b470c", "score": "0.44679913", "text": "public function testDelete() {\n $c = Client::create($this->createData);\n \n $this->assertEquals(null, $c->delete());\n }", "title": "" }, { "docid": "e2de81f06894b842bf9222804e2e3adf", "score": "0.44643852", "text": "public function delete(CompositeApi $compositeApi)\n {\n }", "title": "" }, { "docid": "b11a627e4e88ca0e05988bcfcd6a0eb2", "score": "0.44617057", "text": "public function testDelete()\n\t{\n\t\t$this->transport->expects($this->once())\n\t\t\t->method('request')\n\t\t\t->with('DELETE', new JUri('http://example.com'), null, array('testHeader'))\n\t\t\t->will($this->returnValue('ReturnString'));\n\n\t\t$this->assertThat(\n\t\t\t$this->object->delete('http://example.com', array('testHeader')),\n\t\t\t$this->equalTo('ReturnString')\n\t\t);\n\t}", "title": "" }, { "docid": "0b702fda4cc0a3a5a693c7c6d2db53eb", "score": "0.4458148", "text": "public function deleteBtn($primaryKey, array $options = [])\n {\n $options += [\n 'escape' => false,\n 'title' => 'Delete',\n 'class' => 'btn btn-outline-danger btn-sq-xs btn-xs'\n ];\n\n return $this->postLink($this->Html->icon('trash'), ['action' => 'delete', $primaryKey], $options);\n }", "title": "" }, { "docid": "09b84eb35fc6a03bcef9a21bc7c2d204", "score": "0.4456395", "text": "public function delete($url, $params = array(), $options = array()) {\n return $this->request($url, self::DELETE, $params, $options);\n }", "title": "" }, { "docid": "eba898d267fe03e480aa65ce962c4fd7", "score": "0.4455297", "text": "public function delete(string $url, array $data = [], bool $json_encode = false): self\n {\n return $this->_createRequest(self::METHOD_DELETE, $url, $data, $json_encode);\n }", "title": "" }, { "docid": "bed70381b01b0fde08de426104456d86", "score": "0.4435016", "text": "function wp_delete_link($link_id)\n{\n}", "title": "" }, { "docid": "e90e03cfbb8ba3cd027b59640fd26d03", "score": "0.44312698", "text": "public function delete($data=array()){\n\t\t\treturn $this->requestor->delete(sprintf( $this->requests['delete']['url'] , $this->accountid ),$data);\n\t\t}", "title": "" }, { "docid": "71727d75edd139fe8c126a41b95fa6b9", "score": "0.4430795", "text": "public function deletebanner() {\n\t\theader('Content-Type: application/json');\n\t\t$params\t\t= json_decode(file_get_contents('php://input'),true);\n\t\t$parentid \t= $params['parentid'];\n\t\t$version \t= $params['version'];\n\t\t$curlParams2 = array();\n\t\t$curlParams2['url'] = DECS_TME.\"/api/banner_action.php?parentid=\".$parentid.\"&version=\".$version.\"&type=-2\";\n\t\t$curlParams2['formate'] = 'basic';\n\t\t$jdrrresp\t=\tUtility::curlCall($curlParams2);\n\t\treturn $jdrrresp;\n\t}", "title": "" }, { "docid": "05b23746d1c5d3ce194ccd4d9eb54aa3", "score": "0.44259858", "text": "public function testDelete() {\n $file = file_get_contents('tests/mock-api/remove-firewall-policy.json');\n $data = json_decode($file, true);\n\n // Create stub\n $this->stub->method('delete')\n ->willReturn($data);\n\n // Perform call\n $res = $this->stub->delete('83522FC7DA9172F229E5352C587075BA');\n\n // Assert\n $this->assertEquals($res['state'], 'REMOVING');\n\n }", "title": "" } ]
29b1c5c4a0e0674ee7b04f7156091e9d
View the contact information of a user in the messages ui.
[ { "docid": "351b6e445e0fda5b01906532f94f686b", "score": "0.6907319", "text": "public function i_view_contact_in_messages($userfullname) {\n // Visit home page and follow messages.\n $this->execute('behat_message::i_select_user_in_messaging', [$userfullname]);\n\n $this->execute('behat_general::i_click_on_in_the',\n array(\n \"//a[@data-action='view-contact']\",\n \"xpath_element\",\n \"//*[@data-region='message-drawer']//div[@data-region='header-container']\",\n \"xpath_element\",\n )\n );\n $this->execute('behat_general::i_click_on_in_the',\n array(\n \"//img[@title='Picture of \". $this->escape($userfullname) . \"']\",\n \"xpath_element\",\n \"//*[@data-region='message-drawer']//*[@data-region='view-contact']\",\n \"xpath_element\",\n )\n );\n\n $this->execute('behat_general::wait_until_the_page_is_ready');\n }", "title": "" } ]
[ { "docid": "446f97fe26ed4f462f340d9cf7c8766c", "score": "0.7411135", "text": "public function viewContact()\n {\n $userId = (Auth::check()) ? Auth::id() : ''; //проверка на пользователя\n\n if (!empty($userId)) {\n $user = User::find($userId);\n }\n\n return view('info.contact', compact('user'));\n }", "title": "" }, { "docid": "99e09c4af0ba00eba6a99a7e98c92667", "score": "0.69171226", "text": "public function show(ContactUs $user_contact_form)\n {\n //\n }", "title": "" }, { "docid": "c3ab0ec5b168e73b0193275a3b9719a6", "score": "0.68979466", "text": "public function userInfo()\n {\n $users = User::where('id', auth()->user()->id)->get();\n\n return view('/profile/contact_details', compact('users'));\n }", "title": "" }, { "docid": "9bdbcf415869248281bbd9d07f235fc5", "score": "0.6696925", "text": "public function info() {\n $this->grantAccess('user');\n \n $contact_id = isset($this->params['contact_id']) ? $this->params['contact_id'] : '';\n \t$username = isset($this->params['username']) ? $this->params['username'] : '';\n $splitted = $this->Contact->Identity->splitUsername($username);\n $session_identity = $this->Session->read('Identity');\n \n # get the contact\n\t\t$this->Contact->contain('Identity', 'WithIdentity');\n\t $contact = $this->Contact->findById($contact_id);\n\t \n if($session_identity['id'] != $contact['Contact']['identity_id']) {\n # this is not a contact of the logged in user\n $this->redirect('//contacts/');\n }\n \n $this->set('contact', $contact);\n $this->set('contact_photo', $this->Contact->Identity->getPhotoUrl($contact, 'WithIdentity'));\n \n # get contact's accounts\n $this->set(\n 'accounts', \n $this->Contact->Identity->Account->find('all', array(\n 'contain' => false,\n 'conditions' => array(\n 'identity_id' => $contact['WithIdentity']['id']\n ))));\n \n $this->set('headline', sprintf('Info about %s', $contact['WithIdentity']['username']));\n }", "title": "" }, { "docid": "9b5d53b4c892e1cf827a6e2e82667239", "score": "0.6490426", "text": "public function show()\n {\n $message = contact_us::get()->toArray();\n\n return view('list_message', ['messages'=>$message]);\n }", "title": "" }, { "docid": "64c182f194173b7b62577e23c3bedbce", "score": "0.6289607", "text": "public function contact($id)\n {\n ip_collect();\n $data = [\n 'title' => '',\n 'user' => User::find($id),\n ];\n\n return view('pages.contact')->with($data);\n }", "title": "" }, { "docid": "22dc13a9a94e8422eb001e7eadc7792e", "score": "0.6267996", "text": "public function _add_msg_user()\n\t{\n\t\t$user = Event::$data;\n\t\t\n\t\t$username = $user->username;\n\t\n\t\t$view = new View('usermsg/user_send');\n\t\t$view->username = $username;\n\t\n\t\techo $view;\n\t\n\n\t}", "title": "" }, { "docid": "44c6d9b24f58e2b7ce47a1ee5889c8b7", "score": "0.6264507", "text": "public function view_conversation() {\n\t\t$this->authentication->is_user_logged_in(true, 'user/login');\n\n\t\t// get enquiry id\n\t\t$enquiry_id = safeText('id', false, 'get');\n\n\n\n\n\n\n\t\t// only the enquirer or admin can see the enquiry.\n\t\t$aWhere = array('account_number' => s('ACCOUNT_NO'));\n\n\t\tif( ! $this->mcontents['oEnquiry'] \t = $this->Contact_us_model->get_enquiry_details($enquiry_id, $aWhere) ) {\n\n\t\t\tif( $this->mcontents['oEnquiry'] = $this->Contact_us_model->get_enquiry_details($enquiry_id) ) {\n\n\t\t\t\tif( ! $this->authentication->is_admin_logged_in(false) ) {\n\t\t\t\t\tsf('error_message', 'Enquiry not found');\n\t\t\t\t\tredirect('user/home');\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsf('error_message', 'Enquiry not found');\n\t\t\t\tredirect('user/home');\n\t\t\t}\n\t\t}\n\n\n\n\n\t\tif( ! empty($_POST) ) {\n\n\t\t\t$message \t= $this->input->post('message');\n\t\t\t$aEnquiry_reply['enquiry_id'] \t\t= $enquiry_id;\n\t\t\t$aEnquiry_reply['author_account'] = $this->session->ACCOUNT_NO;\n\t\t\t$aEnquiry_reply['message'] \t\t= $message;\n\t\t\t$aEnquiry_reply['created_on'] \t\t= date('Y-m-d H:i:s');\n\n\t\t\t$this->Contact_us_model->put_enquiry_reply( $aEnquiry_reply );\n\t\t}\n\n\n\t\t$this->mcontents['aEnquiry_reply'] = $this->Contact_us_model->get_enquiry_reply_details($enquiry_id);\n\n// p($this->mcontents['aEnquiry_reply']);\n// exit;\n\n\t\trequireFrontEndValidation();\n\t\t$this->mcontents['load_js'][] = 'validation/conversation.js';\n\n\t\tloadTemplate('contact_us/conversation');\n\n\t}", "title": "" }, { "docid": "82e4166520dd79f347c2f6cc2fd6752b", "score": "0.62290114", "text": "public function contact()\n\t{\n\t\treturn view('pages.contact');\n\t}", "title": "" }, { "docid": "fabd5ca58c646bb94106085620903941", "score": "0.6150943", "text": "public function contact()\n {\n $customer = customer::find(Auth::user()->customer_id);\n return view('customers.contact')->with('customer', $customer);\n }", "title": "" }, { "docid": "5aff4e07f28858ee2d92b0f1ed07325f", "score": "0.6143206", "text": "public function contact()\n {\n return view('templates.them10.contact');\n }", "title": "" }, { "docid": "2da5470b2cbe3868a31c44308ea532f5", "score": "0.610811", "text": "public function contact(){\n\t\t$address = Administrator::getTrait('contact', 'address');\n\t\t$email = Administrator::getTrait('contact', 'email');\n\t\t$phone = Administrator::getTrait('contact', 'phone');\n\t\t$latitude = Administrator::getTrait('contact', 'latitude');\n\t\t$longitude =Administrator::getTrait('contact', 'longitude');\n\n\t\treturn view('contact', ['address' => $address, 'email' => $email, 'phone' => $phone, 'latitude' => $latitude, 'longitude' => $longitude]);\n\t}", "title": "" }, { "docid": "b72f47eb8b197aa7303c29e956709288", "score": "0.6088219", "text": "public function contact()\n\t{\n\t\treturn View::make('home.contact');\n\t}", "title": "" }, { "docid": "2ed0d631d4f968d201671b46968c0e58", "score": "0.6081107", "text": "private function user() {\n\t\t$this->model = $this->load->model('Home_model');\n\t\treturn $this->model->get_contact_details($_SESSION['uid']);\n\t}", "title": "" }, { "docid": "ebb05a04042ff9bbb92f333ccbb85eb5", "score": "0.6080009", "text": "public function getContact()\n {\n //\n return view('camecafe.contact.contact');\n }", "title": "" }, { "docid": "d8430af0eb4a4ff37fde150c67f81a80", "score": "0.6062553", "text": "public function showContact(): void {\n\t\t$template = \"@client/pages/contact.html.twig\";\n\n\t\t$message = [];\n\n\t\tif (isset($_POST['submitButton'])) {\n\t\t\ttry {\n\t\t\t\t(new FormHandler)->contact($_POST);\n\n\t\t\t\t$message = [\n\t\t\t\t\t'success' => FormReturnMessage::MESSAGE_SUCCESSFULLY_SEND, \n\t\t\t\t];\n\t\t\t} catch (FormException $e) {\n\t\t\t\t$message = [\n\t\t\t\t\t'error' => $e->getMessage(), \n\t\t\t\t];\n\t\t\t}\n\t\t}\n\n\t\t$this->render($template, [\n\t\t\t'message' => $message, \n\t\t]);\n\t}", "title": "" }, { "docid": "a6eb268ffd5ef2848a67c3f441c26996", "score": "0.6060214", "text": "public function contact()\n {\n return view('site.contact');\n }", "title": "" }, { "docid": "abfd5ddc850ad1a9897275fa4f8f6fb9", "score": "0.60242397", "text": "public function showUser(&$_Data,$person) {\n\t\t$html = '';\n\t\tif(($_User = User::get($_Data->$person,'contact,name,title')) && $this->getAttribute('show_'.$person)) {\n\t\t\t$html = '<span class=\"text-nowrap\" itemProp=\"'.$person.'\" itemScope itemType=\"https://schema.org/Person\"><i class=\"fa fa-user\"></i> ';\n\t\t\tif(!empty($_User->contact) && $_Contact = Contact::get($_User->contact,'name')) {\n\t\t\t\t$html .= '<a class=\"info-link\" itemProp=\"name\" href=\"/contact/'.urlencode($_Contact->name).'\">'.htmlspecialchars($_User->title,ENT_QUOTES|ENT_HTML5).'</a>';\n\t\t\t} else {\n\t\t\t\t$html .= '<span itemProp=\"name\">'.htmlspecialchars($_User->title,ENT_QUOTES|ENT_HTML5).'</span>';\n\t\t\t}\n\t\t\t$html .= '</span> ';\n\t\t} elseif($_User) {\n\t\t\t$html .= '<meta itemProp=\"'.$person.'\" content=\"'.htmlspecialchars($_User->title,ENT_QUOTES|ENT_HTML5).'\" /> ';\n\t\t}\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "4ca40516340569f581151a7fedccfc94", "score": "0.60066247", "text": "public function index()\n {\n //\n $contacts = Auth::user()->contacts;\n return view('contact.index',compact('contacts'));\n }", "title": "" }, { "docid": "e5ed19947f0aa7490d2984db65a8e5ce", "score": "0.5999398", "text": "public function actionContact()\n {\n $model = new ContactForm();\n \n return $this->render('contact', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "46e66edc99e49ba98f082e0485370684", "score": "0.59928995", "text": "public function contactus()\n {\n return view('front.contactus');\n }", "title": "" }, { "docid": "bb8358946b3fcdd26817c17e522baac6", "score": "0.5981189", "text": "function contact_us(){\r\n $is_mobile = is_mobile();\r\n \r\n set_current_menu(MNU_CONTACT_US);\r\n\r\n $data = $this->_set_common_data(array(), CONTACT_US_PAGE, $is_mobile);\r\n\r\n $data = $this->_set_about_categories($data, CONTACT_US_PAGE, $is_mobile);\r\n\r\n $data = load_contact_form($data, $is_mobile, \"save_customer_contact_form\", true);\r\n\r\n $data['about_content'] = $data['contact_form'];\r\n\r\n render_view('about_us/main_view', $data, $is_mobile);\r\n }", "title": "" }, { "docid": "f6de4a70adc79ca64e5f15426f7bb240", "score": "0.59759307", "text": "public function index()\r\n\t{\r\n\t\t\r\n\t$comment = Comment::all();\r\n\t\tdd($comment);\r\n\t$user = User::first();\r\n\tdd($user->x);\r\n\t\treturn view('contact::contact');\r\n\t}", "title": "" }, { "docid": "0ec71d2a2f3482d9de23185de4707ad9", "score": "0.597427", "text": "public function index()\n {\n $relations = ['author', 'relations'];\n\n return view('contact.index', [\n 'messages' => $this->contactRepository->with($relations)->paginate(50)\n ]);\n }", "title": "" }, { "docid": "3512c5ea0c4dae21557409fd4b5f13a7", "score": "0.5968889", "text": "public function contactsAction(Request $r) {\n // General info\n $session = $r->getSession();\n $user_id = $session->get('user_id');\n\n $user = array();\n if ($user_id) {\n $user = $this->fetchUserById($user_id);\n }\n\n // Detect Mobile\n $mob = $this->get('mobile_detect');\n $template = 'EventGeneralBundle:Default:contacts.html.twig';\n if ($mob->isMobile()) {\n $template = 'EventGeneralBundle:Default:contacts.mob.html.twig';\n }\n\n return $this->render($template, array(\n 'user_id' => $user_id,\n 'user' => $user,\n ));\n }", "title": "" }, { "docid": "e5ff4bce9caf7a5646205f16cf3c46b1", "score": "0.5962921", "text": "public function index()\n {\n return view('conversations.chat', compact('user'));\n }", "title": "" }, { "docid": "21b64440503bec5f86a07893fc546fa4", "score": "0.59628606", "text": "public function contactAction()\n {\n return $this->render('NAOCoreBundle:Core:contact.html.twig');\n }", "title": "" }, { "docid": "8ee037cff7322fabb6cd4d9a220ed6b0", "score": "0.5960349", "text": "public function index()\n {\n // ->orWhere(\"to_id\", Auth::id())\n // ->with('from_user', 'to_user')->get();\n\n return view('messages-final.messages-view');\n }", "title": "" }, { "docid": "04558abe85332dcc434ffe884eb6ddc6", "score": "0.59573275", "text": "public function contact()\n {\n return view('static.contact');\n }", "title": "" }, { "docid": "26853f568b8fbdfec82a15badc1c378a", "score": "0.59519106", "text": "public function view($name){\n\t\t$this->load->model('Messages_model');\n\t\t$userMessages = $this->Messages_model->getMessagesByPoster($name);\t\n\t\tif($userMessages){\n\t\t\t$data['username'] = $name;\n\t\t\t$data['messagesData'] = $userMessages;\n\t\t\t$this->load->view('View_messages',$data);\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "69988450a0a65721d088424bf192abbb", "score": "0.59470266", "text": "public function getContact()\n {\n\t\t$user = null;\n\t\t\n\t\tif(Auth::check())\n\t\t{\n\t\t\t$user = Auth::user();\n\t\t}\n\t\t\n\t\t$cart = $this->helpers->getCart($user);\n \treturn view('contact',compact(['cart','user']));\n }", "title": "" }, { "docid": "cac44b9623b986fa3cdebb1e1466dba8", "score": "0.5934002", "text": "public function getMessages()\n {\n $md5 = context::getInstance(new UserStrategy());\n\n\n //$md5 = new context(new UserStrategy());\n\n //$wid = new contact;\n $contact = contact::getAll();\n\n //$contact=contact::all();\n\n for($i = 0 ; $i < count($contact) ; $i++)\n {\n $contact[$i]->message = $md5->decrypt($contact[$i]->message);\n }\n\n return view('admin.table',compact('contact'));\n }", "title": "" }, { "docid": "2c371450485c4be6aa5fa30ae8a15d01", "score": "0.5930278", "text": "public function contactUser()\n {\n return $this->belongsTo(User::class);\n }", "title": "" }, { "docid": "b9976cd1f481b6b79e600e6ec62d97e4", "score": "0.59219855", "text": "public function contact()\n\t{\n\t\t$contact_help_text = Storage::get('contact-help.txt');\n\t\t\n\t\treturn view('admin.contact-page-content', ['contact_help_text' => $contact_help_text]);\n\t}", "title": "" }, { "docid": "0b62702c0afd18126d799f99c2caa1c7", "score": "0.59218967", "text": "public function actionContact()\n\t{\n\t\t$this->addToTitle(\"Contact\");\n\t\t$model=new ContactForm;\n\t\t\n\t\tif (!Yii::app()->user->isGuest)\n\t\t{\n\t\t\t$me = User::model()->findByPk(Yii::app()->user->id);\n\t\t\t$model->email = $me->email;\n\t\t\t$model->name = $me->username;\n\t\t}\n\t\t\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$mailSender = new EmailSending();\n\t\t\t\t$mailSender->sendFeedBackEmail($model);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\tYii::log(\"user left a feedback\");\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "title": "" }, { "docid": "24b1480356e2652805005897b4eabc21", "score": "0.59215736", "text": "public function show(User $user)\n {\n if ($user->id==auth()->user()->id) {\n abort(404,'You cant Chat alone');\n }\n if ($user) { \n $messages = Message::where(function($query) use ($user) {\n $query->where('from_user', Auth::user()->id)->where('to_user', $user->id);\n })->orWhere(function ($query) use ($user) {\n $query->where('from_user', $user->id)->where('to_user', Auth::user()->id);\n })->orderBy('created_at', 'ASC')->get();\n foreach ($messages as $message ) {\n $message=[\n 'content'=>$message->content,\n 'from'=>$message->from_user,\n 'to'=>$message->to_user,\n 'created_at'=>$message->created_at->diffForHumans(),\n ]; \n }\n return response()->json($messages); \n }\n else{\n abort(404, 'Uknown User');\n }\n }", "title": "" }, { "docid": "3537396c1f6c4de433c167f30414dcdb", "score": "0.5917668", "text": "function getUserContacts()\r\n\t{\r\n\t\tHybrid_Logger::info( \"Enter [{$this->providerId}]::getUserContacts()\" );\r\n\t}", "title": "" }, { "docid": "9f1e250f0d4d10669ecefacedc3afaaa", "score": "0.59167653", "text": "public function viewMe() {\n $username = \\Core\\User::getInstance()->getUsername();\n $name = \\Core\\User::getInstance()->getName();\n \n \\Helpers\\Response::success([\n 'username' => $username,\n 'name' => $name\n ]);\n }", "title": "" }, { "docid": "21388b65b3618277c29575033cae95d1", "score": "0.59004915", "text": "public function actionContact()\n {\n return $this->render('contact');\n }", "title": "" }, { "docid": "8e72a912928bebf9fa310e21f4f57326", "score": "0.58981746", "text": "public function contactAction() {\n\n //ONLY LOGGED IN USER CAN ADD OVERVIEW\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n\n //GET EVENT ID AND OBJECT\n $event_id = $this->_getParam('event_id');\n\n $this->view->siteevent = $siteevent = Engine_Api::_()->getItem('siteevent_event', $event_id);\n Engine_Api::_()->core()->setSubject($siteevent);\n $contactDetails = Engine_Api::_()->getApi('settings', 'core')->getSetting('siteevent.contactdetail', array('phone', 'website', 'email'));\n if (empty($contactDetails)) {\n return $this->_forward('requireauth', 'error', 'core');\n }\n\n if (!$siteevent->authorization()->isAllowed($viewer, 'edit')) {\n return $this->_forward('requireauth', 'error', 'core');\n }\n\n if (!Engine_Api::_()->authorization()->getPermission($viewer->level_id, 'siteevent_event', \"contact\")) {\n return $this->_forward('requireauth', 'error', 'core');\n }\n\n //SELECTED TAB\n $this->view->TabActive = \"contactdetails\";\n\n //SET FORM\n $this->view->form = $form = new Siteevent_Form_Contactinfo();\n $tableOtherinfo = Engine_Api::_()->getDbTable('otherinfo', 'siteevent');\n\n //POPULATE FORM\n $row = $tableOtherinfo->getOtherinfo($event_id);\n $value['email'] = $row->email;\n $value['phone'] = $row->phone;\n $value['website'] = $row->website;\n\n $form->populate($value);\n\n //CHECK FORM VALIDATION\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n //GET FORM VALUES\n $values = $form->getValues();\n if (isset($values['email'])) {\n $email_id = $values['email'];\n\n //CHECK EMAIL VALIDATION\n $validator = new Zend_Validate_EmailAddress();\n $validator->getHostnameValidator()->setValidateTld(false);\n if (!empty($email_id)) {\n if (!$validator->isValid($email_id)) {\n $form->addError(Zend_Registry::get('Zend_Translate')->_('Please enter a valid email address.'));\n return;\n } else {\n $tableOtherinfo->update(array('email' => $email_id), array('event_id = ?' => $event_id));\n }\n } else {\n $tableOtherinfo->update(array('email' => $email_id), array('event_id = ?' => $event_id));\n }\n }\n\n //CHECK PHONE OPTION IS THERE OR NOT\n if (isset($values['phone'])) {\n $tableOtherinfo->update(array('phone' => $values['phone']), array('event_id = ?' => $event_id));\n }\n\n //CHECK WEBSITE OPTION IS THERE OR NOT\n if (isset($values['website'])) {\n $tableOtherinfo->update(array('website' => $values['website']), array('event_id = ?' => $event_id));\n }\n\n //SHOW SUCCESS MESSAGE\n $form->addNotice(Zend_Registry::get('Zend_Translate')->_('Your changes have been saved successfully.'));\n }\n }", "title": "" }, { "docid": "2b2da258f2ec80b14d99fd8ae16306fe", "score": "0.5898114", "text": "public function contact()\n {\n return view('contact');\n }", "title": "" }, { "docid": "4148d3039127ccbca703aacadf79729a", "score": "0.58940536", "text": "public function contacto()\n {\n $this->load->view('user/contacto');\n }", "title": "" }, { "docid": "9e00dfa9b5b6b9c04dbe5500882c81aa", "score": "0.5892118", "text": "public function show($id)\n {\n //\n\t\t$contact = User::with('emails','phonenumbers')->find($id);\t\t\n\t\t\n\t\treturn view('contacts.show',compact('contact'));\n }", "title": "" }, { "docid": "4528de9f39e32b8084e2c99ece972181", "score": "0.58865696", "text": "public function userDetail()\r\n {\r\n //echo $this->_f3->get('userId');\r\n\r\n $result = $GLOBALS['db']->getUserDetails($this->_f3->get('userId'));\r\n\r\n //var_dump($result);\r\n $this->_f3->set('results', $result);\r\n\r\n $view = new Template();\r\n echo $view->render('views/user.html');\r\n }", "title": "" }, { "docid": "f0e02ca4532fad8a1c01795c1ee0d627", "score": "0.5883446", "text": "public function user_info()\n {\n return view('dashboard.user_info.user_info');\n }", "title": "" }, { "docid": "d416081d3123629faa67efbade321e5a", "score": "0.5873866", "text": "public function index()\n {\n $message = new Message();\n $messages = $message->messagesUser();\n return view('message.index', compact('messages'));\n }", "title": "" }, { "docid": "beb2d698525024672a5ed087d11a744f", "score": "0.58729434", "text": "public function show($user_id)\n {\n $toUser = User::find($user_id);\n if(!$toUser){\n abort(404);\n }\n\n /*设置该对话全部未读为已读*/\n Message::where('to_user_id','=',Auth()->user()->id)->where('is_read','=',0)->update(['is_read'=>1]);\n\n $messages = Message::where(function($query) use ($toUser) {\n $query->where('to_user_id','=',Auth()->user()->id)\n ->where('from_user_id','=',$toUser->id)\n ->where('to_deleted','=',0);\n })->orWhere(function($query) use ($toUser) {\n $query->where('to_user_id','=',$toUser->id)\n ->where('from_user_id','=',Auth()->user()->id)\n ->where('from_deleted','=',0);\n })->orderBy('created_at','desc')->paginate(10);\n\n\n return view('theme::message.show')->with('toUser',$toUser)->with('messages',$messages);\n }", "title": "" }, { "docid": "ad6f514c575cd11dc53f1de4da64d308", "score": "0.5871282", "text": "public function contactUs(){\n\n\t\t// $tutorials = $this->crud_model->get_tutorials_by_subcat($id);\n\n\t\t$data['page_title'] = 'Contact Us';\n\t\t$data['page_name'] = 'contactUs';\n\t\t// $data['tutorials'] = $tutorials;\n\t\t$data['active'] = 'contactUs';\n\t\t\n\t\t$this->load->view('frontend/index', $data, FALSE);\n\t}", "title": "" }, { "docid": "f73a650f6b55c71d0edda563edbdcf69", "score": "0.5869088", "text": "public function contact()\n {\n return View::make('pages.contact');\n }", "title": "" }, { "docid": "51908ff1c8d7a72564d0c316147fae82", "score": "0.5868709", "text": "public function actionContact() {\n if (isset($_POST['contact-send'])) {\n $model = new ContactUs();\n $model->first_name = $fname = $_POST['first-name'];\n $model->last_name = $lname = $_POST['last-name'];\n $model->email = $email = $_POST['email'];\n $model->phone = $phone = $_POST['phone'];\n $model->message = $message = $_POST['message'];\n $model->date = date('Y-m-d');\n if ($model->save()) {\n $this->sendContactMail($model);\n $this->sendResponseMail($model);\n }\n }\n return $this->render('contact');\n }", "title": "" }, { "docid": "f5d5ba11b8db0f17cf4f926b10e49f5e", "score": "0.58684105", "text": "public function getContact()\n {\n return view('pages.contact');\n }", "title": "" }, { "docid": "2f690f47071f24a240b9790093b83856", "score": "0.5836512", "text": "public function contact()\n {\n return view('contact');\n }", "title": "" }, { "docid": "365fed6ca530f9dac325ec92cff8671b", "score": "0.58330584", "text": "public function showMessage($id)\n {\n\n if (admin()->user()->id == $id){\n return view('Admin/profile');\n }else{\n $find = ContactUs::findOrFail($id);\n// dd($find);\n return view('Admin/Admin/show-message-details',compact(['find','id']));\n }\n\n }", "title": "" }, { "docid": "4324b8cf4d2262d9f2974854535e42b7", "score": "0.58325195", "text": "public function admin_message()\n {\n // return view('admin_message');\n $messages = Contact::get();\n return view('admin_message', ['messages' => $messages]);\n }", "title": "" }, { "docid": "652e9d7700dc1d1d185d2a6a8578207f", "score": "0.5823783", "text": "public function contact()\n {\n return view('Frontend.pages.contact');\n }", "title": "" }, { "docid": "8d6fb0d69f6d6ba11244f94e60320695", "score": "0.5822834", "text": "public function contact()\n {\n //\n return view('site/contact');\n }", "title": "" }, { "docid": "23c8a1f6167b4dc23fbc5aad3f0176ef", "score": "0.58211553", "text": "public function show($uid)\n {\n $customer = Customer::find($uid);\n return view('admin.messages.show')->with('customer', $customer);\n }", "title": "" }, { "docid": "90be8c31fed99c1006bfc6dbf4b89ff0", "score": "0.58036476", "text": "public function view(User $user, Contact $contact)\n {\n return $this->isBelongsToUser($contact, $user);\n }", "title": "" }, { "docid": "160c430c46e7555fb7ebf40434b43fb2", "score": "0.58016115", "text": "function Contact() {\r\n if (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin()) {\r\n redirect('admincms/login', 'refresh');\r\n $this->session->set_flashdata('message', 'You must be an administrator to view this page.');\r\n } else {\r\n $this->data['message'] = (validation_errors()) ? validation_errors() : $this->session->flashdata('message');\r\n $data_setting = $this->blog_model->get_setting()->result_array();\r\n $data_users = $this->ion_auth->user()->row();\r\n $data = array(\r\n 'no' => '1',\r\n 'namelogin' => $data_users->username,\r\n 'maillogin' => $this->session->userdata(\"email\"),\r\n 'site_title' => $data_setting[0]['title'] . \"- List Contact\",\r\n 'contact' => $this->blog_model->get_contact(\"order by id_contact desc\")->result_array(),\r\n );\r\n $this->load->view('admincms/head', $data);\r\n $this->load->view('admincms/navbar');\r\n $this->load->view('admincms/sidebar');\r\n $this->load->view('admincms/contact');\r\n $this->load->view('admincms/footer');\r\n }\r\n }", "title": "" }, { "docid": "c3141681f1be9bfeb170317a38f9ed99", "score": "0.57945454", "text": "public function userinfo() {\n $this->layout = null;\n $user = $this->OAuth->user();\n $this->set(compact('user'));\n }", "title": "" }, { "docid": "9967f6847543edfd8c01e7f53d2fb4ae", "score": "0.5790892", "text": "public function GetAllMessages($userId) {\n global $con;\n $sql = \"select user_id, first_name, last_name, screen_name, message_text from users \"\n . \"inner join messages ON users.user_id = messages.from_id \"\n . \"WHERE messages.to_id = $userId \"\n . \" order by messages.id desc\";\n $result = mysqli_query($con, $sql);\n\n while ($message = mysqli_fetch_array($result)) {\n $messageUserName = substr($message['first_name'] . ' ' . $message['last_name'] . ' @' . $message['screen_name'], 0, 22);\n echo '<a href=\"userpage.php?memId=' . $message['user_id'] . '\" >' . $messageUserName . '</a>' . ' <br>';\n echo $message['message_text'];\n echo '<hr></hr>';\n }\n }", "title": "" }, { "docid": "611b189adc400a0813818ccdeddfe8bb", "score": "0.578868", "text": "function showFriends($username){\n $url=$this->url.'users/'.$username.'/contacts/users';\n $header=array($this->getToken());\n $result=$this->postCurl($url,'',$header,'GET');\n return $result;\n\n }", "title": "" }, { "docid": "7cc413949e2748c664cf1ffa90a6fdba", "score": "0.57800734", "text": "function forgottenScreenContact()\n {\n return \"Contact the admins\";\n }", "title": "" }, { "docid": "1414329060c56d67014a44515810f319", "score": "0.57758105", "text": "public function display() {\n\t\t$this->messenger->get_message();\n\t}", "title": "" }, { "docid": "0ac3073bdd2db3bbb6d1b4e6bd77f42a", "score": "0.5774963", "text": "public function send_to_user() {\n\n // init\n $User = ClassRegistry::init('User');\n // create message instance\n $this->Message->create();\n\n //debug($this->request->data);\n $user = $User->getByID($this->getLoggedUserID());\n $body = $this->request->data('body');\n $to_id = $this->request->data('user_to_id');\n\n $this->Message->data['Message']['user_from_id'] = $this->getLoggedUserID();\n $this->Message->data['Message']['user_to_id'] = $to_id;\n $this->Message->data['Message']['body'] = $body;\n\n if ($this->Message->validates()) {\n // store in db\n $res = $this->Message->save($this->Message->data);\n $msg['status'] = 'ok'; \n $msg['Message'] = $res['Message'];\n $msg['UserFrom'] = array(\n 'id' => $user['User']['id'],\n 'first_name' => $user['User']['first_name'],\n 'last_name' => $user['User']['last_name']\n );\n $this->set('data', $msg);\n \n }\n \n $this->render('/Elements/SerializeJson/');\n }", "title": "" }, { "docid": "92d81c291ad84f9756a0c36aa41f6a67", "score": "0.5774727", "text": "public function displayContacts($userid)\n {\n // display all contacts here \n $this->db->select('*');\n $this->db->from('contacts');\n $this->db->where('ContCreator',$userid);\n $query = $this->db->get();\n return $query->result();\n\n }", "title": "" }, { "docid": "330de40d22d42c09f5c14e4f7a1ca7d7", "score": "0.57743394", "text": "public function index()\n {\n $users = User::getAllOtherUsers();\n $groups = Group::getAllGroupsOfAuthUser();\n $this->addLastMessagePropertyToUsersCollection($users);\n $this->addLastMessagePropertyToGroupsCollection($groups);\n $all_contacts = $users->concat($groups);\n\n return view('home', compact('users', 'all_contacts'));\n }", "title": "" }, { "docid": "ee24be11d259980f23f090e1b182720c", "score": "0.5773492", "text": "public function contact()\n {\n return view('frontend.pages.contact_page');\n }", "title": "" }, { "docid": "337f03fba444db1b5b2b0611adcfeba3", "score": "0.5771761", "text": "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\t\n\t\t//add meta tags\n\t\t$keywords = Articles::model()->find(\"framecode = 'metaKeywordsContactUs'\");\n\t\tif(isSet($keywords))\n\t\tYii::app()->clientScript->registerMetaTag($keywords->content, 'keywords');\n\t\t\n\t\t$description = Articles::model()->find(\"framecode = 'metaDescriptionContactUs'\");\n\t\tif(isSet($description))\n\t\tYii::app()->clientScript->registerMetaTag($description->content, 'description');\n\t\t\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tsendMailPear(Yii::app()->params['adminEmail'],$model->subject,$headers.\"\\r\\n\".$model->body);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "title": "" }, { "docid": "47c4b8cada3f3b9dbd1af352180f9581", "score": "0.5769614", "text": "public function contact()\n {\n return view('frontend/contact');\n }", "title": "" }, { "docid": "230a2b8eb5340dbb00938a97d917d1b8", "score": "0.57680756", "text": "public function contact()\n {\n $this->load->view('contact_view');\n }", "title": "" }, { "docid": "bde564e2951c9957f5157fb152df12a8", "score": "0.5762559", "text": "public function contactos(){\n $user = User::find(Auth::user()->id);\n $pais = Country::find($user->country_id);\n\n return view('contacts', compact('user','pais'));\n }", "title": "" }, { "docid": "32501a54c4d5bb55cb2bfebe6d97840e", "score": "0.57624966", "text": "public function actionContact()\n {\n $model = new ContactForm();\n $info = new Info();\n if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n if ($model->sendEmail(Yii::$app->params['adminEmail'])) {\n Yii::$app->session->setFlash('success', 'Thank you for contacting us. We will respond to you as soon as possible.');\n } else {\n Yii::$app->session->setFlash('error', 'There was an error sending your message.');\n }\n\n return $this->refresh();\n } else {\n return $this->render('contact', [\n 'model' => $model,\n 'info' => $info,\n ]);\n }\n }", "title": "" }, { "docid": "fb939b06837ad64a1de1c11cb46ed090", "score": "0.5761401", "text": "public function actionContact()\n\t{\n\t\t$model = new ContactForm;\n\t\tif (isset($_POST['ContactForm'])) {\n\t\t\t$model->attributes = $_POST['ContactForm'];\n\t\t\tif ($model->validate()) {\n\t\t\t\t$headers = \"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'], $model->subject, $model->body, $headers);\n\t\t\t\tYii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact', array('model' => $model));\n\t}", "title": "" }, { "docid": "7c90caba139d425600d6cd211638b9ba", "score": "0.57600456", "text": "private function displayContactinfo() {\n \n $html = '<h2>Connect <em>Now >></em></h2>'.\"\\n\";\n $html .= '<p>Micheal Bignell / <strong>Technology Manager</strong></p>'.\"\\n\";\n $html .= '<p><i>[email protected]</i></p>'.\"\\n\";\n $html .= '<p>04 876 04382</p>'.\"\\n\";\n $html .= '<p>08 927 82473</p>'.\"\\n\";\n $html .= '<p>Level 28, AMP Tower<br />140 St. Georges Terrace, Perth, WA</p>'.\"\\n\";\n \n return $html;\n }", "title": "" }, { "docid": "a58409a9cbe38807dc2a5051c7c831c3", "score": "0.57451487", "text": "public function contact()\n {\n return view('contactPage.index');\n }", "title": "" }, { "docid": "02e86f1d188984ccbddb922ab523f6eb", "score": "0.57422185", "text": "public function getContact()\n\t{\n\t\t$store = ShopType::getShopInfo();\n\t\t$title = Lang::get('lang.contact_title').\" | nombredelapagina\";\n\t\treturn View::make($store->template.'.contact.index')\n\t\t->with('title',$title)\n\t\t->with('store',$store);\n\t}", "title": "" }, { "docid": "0752ef59a7c8a7f1f2926e64d53806b3", "score": "0.5740636", "text": "public function actionContact() {\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $headers = \"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n if (mail(Yii::app()->params['adminEmail'], $model->subject, $model->body, $headers)) {\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n } else {\n Yii::app()->user->setFlash('contact', 'Sending Failed !');\n }\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }", "title": "" }, { "docid": "8c6e02c830d9f8d014ddde5088f68dea", "score": "0.5739065", "text": "public function page_contact()\n\t{\n\t\tif (!$this->is_admin() && !$this->is_superadmin()) {\n\t\t\texit();\n\t\t}\n\n\t\t$this->set_title('Contact & Support');\n $this->render(array(\n ));\n\t}", "title": "" }, { "docid": "4391ea3f49c571719b2fbc621d47016d", "score": "0.57375854", "text": "public function contact()\n {\n return View::make('contact.index');\n }", "title": "" }, { "docid": "e6959b7641a6eb0fc90df1e223823cca", "score": "0.5729584", "text": "public function actionContact() {\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm'])) {\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate()) {\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "title": "" }, { "docid": "3121a09d676fb08b21949b48bb96db71", "score": "0.5728808", "text": "public function index()\n {\n return view('admin.layouts.contact')->with('messages',Contact::all());\n }", "title": "" }, { "docid": "36f9804867ed9adee9401d03d3321503", "score": "0.57267874", "text": "public function contactView()\n {\n return view('contact');\n }", "title": "" }, { "docid": "2e25f3a40934825cdeb328b013b77267", "score": "0.5717781", "text": "public function contacts()\n {\n return view('other.contacts');\n }", "title": "" }, { "docid": "1e7609a2e49a170f4aaee5f66f4de2a2", "score": "0.5701766", "text": "public function indexAction()\n {\n //echo 'User index on User Page<br>';\n View::renderTemplate('contact/index.phtml', [\n 'tabtitle' => 'Contact Form Entries',\n 'pageTitle' => 'Contact Form Entries',\n 'siteName' => $this->siteName,\n 'siteKeywords' => $this->siteKeywords,\n 'contactMessages' => $this->formEntry,\n 'contactentries' => Config::APP_CMS_CONTACT_ENTRIES_PRETTY_URI,\n 'controlboard' => Config::APP_CMS_CONTROL_BOARD_PRETTY_URI,\n 'soundeffects' => Config::APP_CMS_SOUND_EFFECTS_PRETTY_URI,\n 'breadcrumb_index' => 'cPanel',\n 'indexpage' => Config::APP_CMS_CPANEL_INDEX_PRETTY_URI,\n 'cpanelindexpage' => Config::APP_CMS_CPANEL_INDEX_PRETTY_URI,\n 'username' => $this->username,\n //'contactName' => $this->formEntry,\n ], 'appcms/views');\n\n\n }", "title": "" }, { "docid": "9620fb36ead87e037f9755538e185ed0", "score": "0.5699584", "text": "public function index() {\n $contacto = new Contacto($this->adapter);\n //Conseguimos todas las cotizaciones (se utiliza metodo de (entidadbase) )\n $allusers = $contacto->getAll();\n\n // Cargamos la vista index y le pasamos valores\n $this->view(\"contacto/contacto\", array(\n \"allusers\" => $allusers\n ));\n }", "title": "" }, { "docid": "42b789c0d0b7f5b599202fa4a91e5d8d", "score": "0.5691031", "text": "public function show($id)\n {\n //get contact by id\n $showUserContact=UserContacts::where('id',$id)->get();\n return $showUserContact;\n }", "title": "" }, { "docid": "85ef7ec197f2f5f56facfe36965c3022", "score": "0.5690619", "text": "public function displayContact($id){\n $query = \"SELECT * FROM posts WHERE post_id = '$id'\";\n $result = $this ->con->query($query);\n\n //fetch the information from the customer\n if($result -> num_rows > 0){\n $data = $result->fetch_assoc(); \n \n \n $userObject = new Users();\n \n $userData = $userObject ->displayUserbyEmail($data['owner']);\n \n return $userData;\n\n \n\n }\n else{\n echo \"Record not found\";\n }\n\n }", "title": "" }, { "docid": "2699e7fcd2c0ea3c1af96f54cb7ad375", "score": "0.5690467", "text": "public function contactName($user)\n {\n return $user->username;\n }", "title": "" }, { "docid": "cd54b64a7dff1b6a5ae3f36c1ec76c05", "score": "0.5690082", "text": "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "title": "" }, { "docid": "cd54b64a7dff1b6a5ae3f36c1ec76c05", "score": "0.5690082", "text": "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "title": "" }, { "docid": "cd54b64a7dff1b6a5ae3f36c1ec76c05", "score": "0.5690082", "text": "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "title": "" }, { "docid": "cd54b64a7dff1b6a5ae3f36c1ec76c05", "score": "0.5690082", "text": "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "title": "" }, { "docid": "cd54b64a7dff1b6a5ae3f36c1ec76c05", "score": "0.5690082", "text": "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "title": "" }, { "docid": "cd54b64a7dff1b6a5ae3f36c1ec76c05", "score": "0.5690082", "text": "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "title": "" }, { "docid": "cd54b64a7dff1b6a5ae3f36c1ec76c05", "score": "0.5690082", "text": "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "title": "" }, { "docid": "cd54b64a7dff1b6a5ae3f36c1ec76c05", "score": "0.5690082", "text": "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "title": "" }, { "docid": "cd54b64a7dff1b6a5ae3f36c1ec76c05", "score": "0.5690082", "text": "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "title": "" }, { "docid": "d78270ebbfb968548f826c0a1a51f52e", "score": "0.56898266", "text": "public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers =\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\t\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}", "title": "" }, { "docid": "6969002d8986fc4b56e407fc62110301", "score": "0.5685142", "text": "public function show($username, Request $request)\n {\n $user = User::findOrFailByUsername($username);\n\n $messages = Message::conversation($user,$request->user())->latest()->paginate(20);\n\n return view('messages.show')->withMessages($messages)->withRecuser($user);\n }", "title": "" } ]
fcf3a1cd1b9560fe523257b8a3ee26e0
Highlight a search string.
[ { "docid": "863ece97d127a8fffd36623b7740c84b", "score": "0.7675802", "text": "public function highlight($sSearch, $sStr)\n\t{\n\t\tif (!$this->_getVar($sSearch))\n\t\t{\n\t\t\treturn $sStr;\n\t\t}\n\t\t\n\t\t$sFind = $this->_getVar($sSearch);\n\t\tif (!empty($sFind))\n\t\t{\n\t\t\t$aParts = explode(' ', $sFind);\n\t\t\tif (is_array($aParts) && count($aParts))\n\t\t\t{\n\t\t\t\tforeach ($aParts as $sPart)\n\t\t\t\t{\n\t\t\t\t\t$sStr = preg_replace('/(' . preg_quote($sPart, '/') . ')/siU', '<span class=\"highlight\">\\\\1</span>', $sStr);\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $sStr;\n\t}", "title": "" } ]
[ { "docid": "c2b36343dc5a1b131ad2e67125bafcce", "score": "0.7440862", "text": "public function highlightString($string) {\n\t\treturn highlight_string($string, true);\n\t}", "title": "" }, { "docid": "506210f2c289fa84cd5d7031a5a2bf08", "score": "0.7400901", "text": "function str_highlight($text, $needle, $options = null, $highlight = null)\n{\n // Default highlighting\n if ($highlight === null) {\n $highlight = '<strong>\\1</strong>';\n }\n\n // Select pattern to use\n if ($options & STR_HIGHLIGHT_SIMPLE) {\n $pattern = '#(%s)#';\n } else {\n $pattern = '#(?!<.*?)(%s)(?![^<>]*?>)#';\n $sl_pattern = '#<a\\s(?:.*?)>(%s)</a>#';\n }\n\n // Case sensitivity\n if ($options ^ STR_HIGHLIGHT_CASESENS) {\n $pattern .= 'i';\n $sl_pattern .= 'i';\n }\n\n\t$needle = (array) $needle;\n\tforeach ($needle as $needle_s) {\n $needle_s = preg_quote($needle_s);\n\n // Escape needle with optional whole word check\n if ($options & STR_HIGHLIGHT_WHOLEWD) {\n $needle_s = '\\b' . $needle_s . '\\b';\n }\n\n // Strip links\n if ($options & STR_HIGHLIGHT_STRIPLINKS) {\n $sl_regex = sprintf($sl_pattern, $needle_s);\n $text = preg_replace($sl_regex, '\\1', $text);\n }\n\n $regex = sprintf($pattern, $needle_s);\n\t\t$text = preg_replace($regex, $highlight, $text);\n\t}\n\n return $text;\n}", "title": "" }, { "docid": "7cae51a12b0f429ec99453380027cab9", "score": "0.70755744", "text": "function highlightfast($needle, $haystack) {\n/// It's faster that the above function and doesn't care about\n/// HTML or anything.\n\n $parts = explode(strtolower($needle), strtolower($haystack));\n\n $pos = 0;\n\n foreach ($parts as $key => $part) {\n $parts[$key] = substr($haystack, $pos, strlen($part));\n $pos += strlen($part);\n\n $parts[$key] .= \"<span class=\\\"highlight\\\">\".substr($haystack, $pos, strlen($needle)).\"</span>\";\n $pos += strlen($needle);\n }\n\n return (join('', $parts));\n}", "title": "" }, { "docid": "ecad874e656edb8081eb9ccc6c38ee3a", "score": "0.7046066", "text": "function highlight($needle, $haystack, $case=0,\n $left_string=\"<span class=\\\"highlight\\\">\", $right_string=\"</span>\") {\n/// It cares about HTML and will not ruin links. It's best to use\n/// this function after performing any conversions to HTML.\n/// Function found here: http://forums.devshed.com/t67822/scdaa2d1c3d4bacb4671d075ad41f0854.html\n\n if (empty($needle)) {\n return $haystack;\n }\n\n $list_of_words = eregi_replace(\"[^-a-zA-Z0-9&']\", \" \", $needle);\n $list_array = explode(\" \", $list_of_words);\n for ($i=0; $i<sizeof($list_array); $i++) {\n if (strlen($list_array[$i]) == 1) {\n $list_array[$i] = \"\";\n }\n }\n $list_of_words = implode(\" \", $list_array);\n $list_of_words_cp = $list_of_words;\n $final = array();\n preg_match_all('/<(.+?)>/is',$haystack,$list_of_words);\n\n foreach (array_unique($list_of_words[0]) as $key=>$value) {\n $final['<|'.$key.'|>'] = $value;\n }\n\n $haystack = str_replace($final,array_keys($final),$haystack);\n $list_of_words_cp = eregi_replace(\" +\", \"|\", $list_of_words_cp);\n\n if ($list_of_words_cp{0}==\"|\") {\n $list_of_words_cp{0} = \"\";\n }\n if ($list_of_words_cp{strlen($list_of_words_cp)-1}==\"|\") {\n $list_of_words_cp{strlen($list_of_words_cp)-1}=\"\";\n }\n $list_of_words_cp = \"(\".trim($list_of_words_cp).\")\";\n\n if (!$case){\n $haystack = eregi_replace(\"$list_of_words_cp\", \"$left_string\".\"\\\\1\".\"$right_string\", $haystack);\n } else {\n $haystack = ereg_replace(\"$list_of_words_cp\", \"$left_string\".\"\\\\1\".\"$right_string\", $haystack);\n }\n $haystack = str_replace(array_keys($final),$final,$haystack);\n\n return stripslashes($haystack);\n}", "title": "" }, { "docid": "a69e47a72f2ae641948a525557def860", "score": "0.7021454", "text": "function hightlight($string){\n\treturn highlight_string($string);\n}", "title": "" }, { "docid": "7ee39dfde1b184318ff585415f24d0ae", "score": "0.69876695", "text": "function str_highlight ($text, $needle, $start = \"<strong>\", $end = \"</strong>\", $simple = false)\n{\n // Select pattern to use\n if ($simple === true) {\n // If there are no HTML tags to be worried about, use this\n $regex = '#(%s)#i';\n } else {\n // If there are HTML tags, we need to make sure we don't break them\n $regex = '#(?!<.*?)(%s)(?![^<>]*?>)#si';\n }\n\n $needle = (array) $needle;\n foreach ($needle as $needle_single) {\n $text = preg_replace(sprintf($regex, preg_quote($needle_single)), $start . '\\1' . $end, $text);\n }\n\n return $text;\n}", "title": "" }, { "docid": "3f81ebf6db10b1c6b793ce01067fe486", "score": "0.68993473", "text": "function _highlight_keywords($str = '')\n\t{\n\t\tif (ee()->TMPL->fetch_param('highlight_keywords') === FALSE OR empty($this->sess['search']['q']['keywords'])) return $str;\n\n\t\t$highlight_words_within_words\t= (! empty($this->sess['search']['q']['highlight_words_within_words']) AND $this->check_no($this->sess['search']['q']['highlight_words_within_words'])) ? FALSE: TRUE;\n\n\t\tee()->super_search_lib->set_property('highlight_words_within_words', $highlight_words_within_words);\n\n\t\treturn ee()->super_search_lib->highlight_keywords($str, $this->sess['search']['q']['keywords'], ee()->TMPL->fetch_param('highlight_keywords'));\n\t}", "title": "" }, { "docid": "4aec94729053f18e1e101f2919117f97", "score": "0.68349123", "text": "function ew_Highlight($src, $bkw) {\n\t\t$outstr = \"\";\n\t\tif (strlen($src) > 0 && (strlen($bkw) > 0)) \n\t\t{\n\t\t\t$x=0;\n\t\t\t$wrky = stripos($src, $bkw);\n\t\t\tif ($wrky !== FALSE) \n\t\t\t{\n\t\t\t\t$outstr .= substr($src, $x, $wrky) .\n\t\t\t\t\t\"<span class=\\\"ewHighlightSearch\\\">\" .\n\t\t\t\t\tsubstr($src, $wrky, strlen($bkw)) . \"</span>\";\n\t\t\t\t$x = $wrky + strlen($bkw);\n\t\t\t\t$outstr .= substr($src, $x, strlen($src));\n\t\t\t}\t\t\t\n\t\t} else {\n\t\t\t$outstr = $src;\n\t\t}\n\t\treturn $outstr;\n\t}", "title": "" }, { "docid": "abf549f0c5489b34aa7a90514ebd9c5c", "score": "0.67981356", "text": "function hightlight($str, $keywords = '')\n{\n$keywords = preg_replace('/\\s\\s+/', ' ', strip_tags(trim($keywords))); // filter\n\n$style = 'highlight';\n$style_i = 'highlight_important';\n\n/* Apply Style */\n\n$var = '';\n\nforeach(explode(' ', $keywords) as $keyword)\n{\n$replacement = \"<span class='\".$style.\"'>\".$keyword.\"</span>\";\n$var .= $replacement.\" \";\n\n$str = str_ireplace($keyword, $replacement, $str);\n}\n\n/* Apply Important Style */\n\n$str = str_ireplace(rtrim($var), \"<span class='\".$style_i.\"'>\".$keywords.\"</span>\", $str);\n\nreturn $str;\n}", "title": "" }, { "docid": "c5120baca5b2d2726f4c9d9eb2700a70", "score": "0.6760097", "text": "private function highlightText($text)\n {\n try {\n $this->injectCssClassToPage();\n $this->debug('[Highlight Text] ' . $text);\n $el = $this->webDriver->findElement(WebDriverBy::xpath(\"//*[text()[contains(., '{$text}')]]\"));\n $origHtml = $this->webDriver->executeScript(\"let origHtml = arguments[0].innerHTML; let hlghtHtml = arguments[0].innerHTML.replace(/({$text})/g, '<span class=\\\"{$this->cssClassName}\\\">$1</span>'); arguments[0].innerHTML = hlghtHtml; return origHtml;\", [$el]);\n $this->webDriverModule->wait($this->timeWait);\n $this->webDriver->executeScript(\"arguments[0].innerHTML = arguments[1];\", [$el, $origHtml]);\n } catch (Exception $e) {\n $this->debug(sprintf(\"[Highlight Exception] %s \\n%s\", $e->getMessage(), $e->getTraceAsString()));\n }\n }", "title": "" }, { "docid": "e9ecc82f56d0e1230e3fb8f971364009", "score": "0.6758814", "text": "function smarty_modifier_highlight(&$text='', $word='')\n{\n $new_text = $text;\n if($word)\n {\n $word = ucwords($word);\n $new_text = str_ireplace($word, \"<span class='hilight'>{$word}</span>\", $text);\n }\n return($new_text);\n}", "title": "" }, { "docid": "2e26f0d1d17cd1d315cd4f64ead36a75", "score": "0.66684306", "text": "public function highlight(string $string): string\n {\n $cursor = $this->tokenizer->tokenize($string);\n\n $return = '';\n\n while ($token = $cursor->next()) {\n $return .= $this->highlighter->highlightToken(\n $token->type(),\n $token->value()\n );\n }\n\n return $this->highlighter->output($return);\n }", "title": "" }, { "docid": "251f6826d399ee4f0f309e9e091267ce", "score": "0.66282475", "text": "function markup_searched_term($search_str, $string) {\n $search_str_markup = '<span class=\"search_markup\">' . $search_str . '</span>';\n $string_markedup = str_ireplace($search_str, $search_str_markup, $string);\n return $string_markedup;\n}", "title": "" }, { "docid": "9092e8ad63f8339c1859d82b585fe574", "score": "0.6543536", "text": "public static function highlightString($string, $return = true) {\n\t\treturn highlight_string($string, $return);\n\t}", "title": "" }, { "docid": "74098412205b21dbf875a739b38fe565", "score": "0.6540536", "text": "public static function highlight($str, $keywords)\n\t{\n\t\t// Trim, strip tags, and replace multiple spaces with single spaces\n\t\t$keywords = preg_replace('/\\s\\s+/', ' ', strip_tags(trim($keywords)));\n\n\t\t// Highlight partial matches\n\t\t$var = '';\n\n\t\tforeach (explode(' ', $keywords) as $keyword)\n\t\t{\n\t\t\t$replacement = '<span class=\"highlight-partial\">'.$keyword.'</span>';\n\t\t\t$var .= $replacement.\" \";\n\n\t\t\t$str = str_ireplace($keyword, $replacement, $str);\n\t\t}\n\n\t\t// Highlight full matches\n\t\t$str = str_ireplace(rtrim($var), '<span class=\"highlight\">'.$keywords.'</span>', $str);\n\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "ce9e88359befea9fb71c371016786e5b", "score": "0.65314084", "text": "public function highlight($text, $phrase, $options = array()) {\n\t\treturn $this->_engine->highlight($text, $phrase, $options);\n\t}", "title": "" }, { "docid": "12d544306aee8e4c48fb942c38d0f56c", "score": "0.6497659", "text": "function highlight_phrase($str, $phrase, $tag_open = '<mark>', $tag_close = '</mark>')\n\t{\n\t\treturn ($str !== '' && $phrase !== '')\n\t\t\t? preg_replace('/('.preg_quote($phrase, '/').')/i'.(UTF8_ENABLED ? 'u' : ''), $tag_open.'\\\\1'.$tag_close, $str)\n\t\t\t: $str;\n\t}", "title": "" }, { "docid": "6b784b72a6a932d304d6f9bd1df99daa", "score": "0.6490474", "text": "function highlight_text($text, $phrase, $highlighter = '<strong class=\"highlight\">\\\\1</strong>') {\n if (empty($text)) {\n return '';\n }\n\n if (empty($phrase)) {\n return $text;\n }\n\n if (is_array($phrase) or ($phrase instanceof sfOutputEscaperArrayDecorator)) {\n foreach ($phrase as $word) {\n $pattern[] = '/(' . preg_quote($word, '/') . ')/i';\n $replacement[] = $highlighter;\n }\n } else {\n $pattern = '/(' . preg_quote($phrase, '/') . ')/i';\n $replacement = $highlighter;\n }\n\n return preg_replace($pattern, $replacement, $text);\n }", "title": "" }, { "docid": "212fec7db88412a1276306d69e7e72f6", "score": "0.64870125", "text": "function highlightTargetWords($text) {\n\t\tif (empty($text)) {\n\t\t\treturn '&nbsp;';\n\t\t}\n\t\t$words = $this->searchQuery->getWords();\n\t\tforeach ($this->searchQuery->getPhrases() as $p) {\n\t\t\tforeach (explode(' ',$p) as $w) {\n\t\t\t\t$words[] = $w;\n\t\t\t}\n\t\t}\n\t\t$regexp = implode('|',$words);\n\t\treturn preg_replace('/('.str_replace('/', '\\/', $regexp).')/i','<span class=\"selected\">\\1</span>', $text);\n\t}", "title": "" }, { "docid": "1777a7bb49c84af4df46582e4058f60b", "score": "0.6389672", "text": "function search_excerpt_highlight() {\n // $excerpt = get_the_excerpt();\n $excerpt = get_the_content();\n $excerpt = strip_shortcodes($excerpt);\n $excerpt = preg_replace('/<img[^>]+./', '', $excerpt);\n $excerpt = strip_tags($excerpt);\n\n $keys = implode('|', explode(' ', get_search_query()));\n $excerpt = preg_replace('/(' . $keys .')/iu', '<strong class=\"search-highlight\">\\0</strong>', $excerpt);\n\n $excerpt = substr($excerpt, 0, 750);\n $excerpt .= ' [...]';\n\n echo '<p>' . $excerpt . '</p>';\n}", "title": "" }, { "docid": "141e418919e7fde07f5894490dc8bbfd", "score": "0.63164014", "text": "public static function highlight($fieldValue){\n if(is_string($fieldValue) && ($keyword = self::getKeyword()) !== null){\n return Text::emphasizeText($fieldValue, array('query' => $keyword));\n }\n return $fieldValue;\n }", "title": "" }, { "docid": "2f4974f723ecc2e52ff34fc3e3031a93", "score": "0.63072956", "text": "public function highlightMatch($haystack, $needle, $wrapWords = false)\n {\n $f = array('<span class=\"matchHighlight\">', '</span>');\n $r = array(chr(4), chr(7));\n $haystack = str_replace($f, $r, $haystack);\n\n if (is_array($needle)) {\n foreach ($needle as $n) {\n $haystack = $this->highlightMatch($haystack, $n, $wrapWords);\n }\n return str_replace($r, $f, $haystack);\n }\n if (trim($needle) == '') {\n return $haystack;\n }\n $needle = $this->_stripSearchParams($needle);\n\n if ($wrapWords == true && !preg_match('#&\\#[0-9]{1,5};#', $needle)) {\n $prefix = '\\b';\n $suffix = '\\b';\n $replace = '';\n } else {\n $prefix = $suffix = $replace = '';\n }\n /* Pre ACI-620 situation, explicitly uses word boundary\n $regexp = '/\\b(' .\n str_replace('*', $replace, $prefix . $needle . $suffix) . ')\\b/mi';\n */\n $regexp = '/(' .\n str_replace('*', $replace, $prefix . $needle . $suffix) . ')/mi';\n\n $haystack = preg_replace(\n $regexp,\n '<span class=\"matchHighlight\">$1</span>',\n $haystack\n );\n\n // Restore temporarily replaced tags\n return str_replace($r, $f, $haystack);\n }", "title": "" }, { "docid": "73d35dbaf351a88d22ad08757873afde", "score": "0.6294208", "text": "function smarty_modifier_highlight_keywords($text, $keywords)\n{\n\tif ($keywords)\n\t{\n\t\tforeach ($keywords as $keyword)\n\t\t{\n\t\t\t$text = str_ireplace($keyword, '<span class=\"highlight_keyword\">' . $keyword . '</span>', $text);\t\n\t\t}\n\t}\n\t\n return $text;\n}", "title": "" }, { "docid": "9809768a979aa6ea73ea088db97631f6", "score": "0.6256232", "text": "function highlight_text($text,$color1,$color2,$class=\"Fl\") {\n $text_array = explode(\" \",$text);\n $html = \"\";\n for ($i=0;$i<count($text_array);$i++) {\n if ($i==0) {\n $html = \"<div class='$class' style='color: $color1;'>\";\n }\n $firstletter = substr($text_array[$i],0,1);\n $otherletters = substr($text_array[$i],1,strlen($text_array[$i]));\n $html .= \"<span style='color: $color2;'>$firstletter</span>$otherletters \";\n if ($i == count($text_array)-1) {\n $html .= \"</div>\";\n }\n }\n echo $html;\n}", "title": "" }, { "docid": "d23fbc15fb8964d5bde299214ced166c", "score": "0.6249775", "text": "function phpdigHighlight($ereg='',$string='')\n{\n if ($ereg) {\n //return @eregi_replace($ereg,\"\\\\1<span class=\\\"phpdigHighlight\\\">\\\\2</span>\\\\3\",$string);\n $string = @eregi_replace($ereg,\"\\\\1<^#_>\\\\2</_#^>\\\\3\",@eregi_replace($ereg,\"\\\\1<^#_>\\\\2</_#^>\\\\3\",$string));\n $string = str_replace(\"^#_\",\"span class=\\\"phpdigHighlight\\\"\",str_replace(\"_#^\",\"span\",$string));\n return $string;\n } else {\n return $result;\n }\n}", "title": "" }, { "docid": "94fa6e2c730e0f0ef306ac9b7b685013", "score": "0.62142456", "text": "public function highlight($sentence, $expr, $css=null) {\r\n\t\tif ($css == null) {\r\n\t\t\t$style = 'color: red;';\r\n\t\t}\r\n\t\treturn preg_replace('/(' . $expr . ')/', '<span style=\"'.$style.'\" class=\"'.$css.'\">\\1</span>', $sentence);\r\n\t}", "title": "" }, { "docid": "829e3185111a7cb1b9cbc0d02381529c", "score": "0.6193339", "text": "protected function MARCsyntaxHighlight($input){\n\t\t\t$patterns = array('/\\</i','/\\>/i', '/&lt;/','/&gt;/');\n\t\t\t$patterns[4]='/(\\$.{1})/i';\n\t\t\t$patterns[5]='/(^[0-9]{3})(.*)/i';\n\t\t\t$replacements = array('&lt;','&gt;', '<span style=\\'color: green; background-color: #ddffee\\'>&lt;','&gt;</span>');\n\t\t\t$replacements[4]='<span style=\\'color: blue; background-color: #ddeeff\\'>${1}</span>';\n\t\t\t$replacements[5]='<span style=\\'color: red; background-color: #ffddee\\'>${1}</span> ${2}';\n\t\t\treturn preg_replace($patterns, $replacements, $input);\n\t}", "title": "" }, { "docid": "e98c7bcbf4e54e793c1cb3ecc904ea37", "score": "0.6189344", "text": "public function highlight($text, $words, $highlighter = '<strong class=\"highlight\">%s</strong>')\n\t{\n\t\t$highlight = str_replace('%s', $words, $highlighter);\n\t\treturn str_replace($words, $highlight, $text);\n\t}", "title": "" }, { "docid": "db76bff09569a35234368c4642b5e255", "score": "0.6165617", "text": "public function colorize($string)\n {\n $reset = $this->supportsColor ? self::COLOR_RESET : '';\n foreach ($this->highlightMap as $key => $color) {\n $pattern = sprintf('#<%s>(.*?)</%s>#s', $key, $key);\n $color = $this->supportsColor ? $color : '';\n $string = preg_replace($pattern, $color . '$1' . $reset, $string);\n }\n return $string;\n }", "title": "" }, { "docid": "ed5ae6253518a574e1ef06c8e16f6145", "score": "0.6109856", "text": "public function highlightMatches($inputHTML) {\n\t\t$doc = \\Core\\Search\\Lucene\\Document\\Html::loadHTML ( $inputHTML );\n\t\t\n\t\t$colorIndex = 0;\n\t\t$this->highlightMatchesDOM ( $doc, $colorIndex );\n\t\t\n\t\treturn $doc->getHTML ();\n\t}", "title": "" }, { "docid": "b53bf03e5eecb88080c69d7f70711102", "score": "0.60774416", "text": "public function highlight(\n $text,\n $phrase,\n $format = '<span class=\"highlight\">\\1</span>',\n $html = false,\n $regex = '|%s|iu'\n ) {\n if (empty($phrase)) {\n return $text;\n }\n\n if (is_array($phrase)) {\n $replace = [];\n $with = [];\n\n foreach ($phrase as $key => $segment) {\n $segment = '('.preg_quote($segment, '|').')';\n if ($html) {\n $segment = \"(?![^<]+>)$segment(?![^<]+>)\";\n }\n\n $with[] = (is_array($format)) ? $format[$key] : $format;\n $replace[] = sprintf($regex, $segment);\n }\n\n return preg_replace($replace, $with, $text);\n }\n\n $phrase = '('.preg_quote($phrase, '|').')';\n if ($html) {\n $phrase = \"(?![^<]+>)$phrase(?![^<]+>)\";\n }\n\n return preg_replace(sprintf($regex, $phrase), $format, $text);\n }", "title": "" }, { "docid": "162d5c654969c7c6a61479b05ccb234b", "score": "0.6073031", "text": "protected function getSearchWordHighlighted($hasTags, $searchWord)\n\t{\n\t\tif( !$hasTags )\n\t\t\treturn $this->addHighlightingSpan($searchWord);\n\t\t\n\t\t$highligntedSearchWord = \"\";\n\t\t$tagPattern = \"/(<[^=>]+\\s*(?:(?:[^=>]+=\\s*'[^']+'\\s*)|\".'(?:[^=>]+=\\s*\"[^\"]+\"\\s*)'.\")*>)/iU\";\n\t\t$searchWordArr = $this->getSplitStringWithCapturedDelimiters($tagPattern, $searchWord); \n\t\tforeach($searchWordArr as $item)\n\t\t{\n\t\t\tif( trim($item) && $item[0] != '<' && $item[ strlen($item) - 1 ] != '>' )\n\t\t\t{\n\t\t\t\t//remove tag fragments\n\t\t\t\t$newItem = preg_replace(\"/^.*>|<.*$/\", '', $item);\t\t\t\n\t\t\t\t$itemPattern = preg_quote($newItem,\"/\");\n\t\t\t\t$newItem = preg_replace('/('.$itemPattern.')/', $this->addHighlightingSpan('$1'), $newItem);\n\t\t\t}\n\t\t\t$highligntedSearchWord.= $newItem;\t\n\t\t}\n\t\treturn \t$highligntedSearchWord;\n\t}", "title": "" }, { "docid": "10b472400b570069b87a4b193603a06f", "score": "0.6007481", "text": "function highlight( $htmlString ) {\n\t\t$tags = implode('|', $this->validContainers);\n\t\t//yummy regex\n\t\t$pattern = '#(<('. $tags .')[^>]'.$this->langAttribute.'=[\"\\']+([^\\'\".]*)[\"\\']+>)(.*?)(</\\2\\s*>|$)#s';\n\t\t/*\n\t\t\tmatches[0] = whole string\n\t\t\tmatches[1] = open tag including lang attribute\n\t\t\tmatches[2] = tag name\n\t\t\tmatches[3] = value of lang attribute\n\t\t\tmatches[4] = text to be highlighted\n\t\t\tmatches[5] = end tag\n\t\t*/\t\n\t\t$html = preg_replace_callback($pattern, array($this, '_processCodeBlock'), $htmlString);\n\t\treturn $this->output( $html );\n\t}", "title": "" }, { "docid": "da237cf2d79ac8734233f8c0a968aa2a", "score": "0.5993662", "text": "function set_strings_highlighting ( $flag )\n\t{\n\t\t$this->lexic_permissions['STRINGS'] = ( $flag ) ? true : false;\n\t}", "title": "" }, { "docid": "c2a8d5595edbea85aa032959ef7971c3", "score": "0.5957232", "text": "public static function do_highlight( $in )\n\t{\n\t\t\n\t\t$tokenizer = new HTMLTokenizer( $in, false );\n\t\t$tokens = $tokenizer->parse();\n\t\t\n\t\t// fetch div, pre, code slices that have a class=\"highlight\"\n\t\t$slices = $tokens->slice( array('div','pre','code') , array( 'class' => 'highlight' ) );\n\t\t\n\t\t// iterate the found slices\n\t\tforeach ($slices as $slice) {\n\t\t\t// store the class to use once we've stripped the container\n\t\t\t$classAttr = $slice[0]['attrs']['class'];\n\t\t\t\n\t\t\t// unique name to use in the cache for this slice/markup\n\t\t\t$sliceCacheName = 'plugin.highlight.' . md5( (string)$slice ) . filemtime( __FILE__ );\n\t\t\t\n\t\t\t// trim off the div, and determine the value\n\t\t\t$slice->trim_container();\n\t\t\t$sliceValue = trim( (string)$slice );\n\t\t\t\n\t\t\t// see if it's already been cached\n\t\t\tif ( Cache::has( $sliceCacheName ) ) {\n\t\t\t\t$output = Cache::get( $sliceCacheName );\n\t\t\t} else {\n\t\t\t\t// trim off the CDATA wrapper, if applicable\n\t\t\t\tif ( substr( $sliceValue, 0, 9 ) == '<![CDATA[' && substr( $sliceValue, -3 ) == ']]>' ) {\n\t\t\t\t\t$sliceValue = substr( $sliceValue, 9, -3 );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$classes = array_filter( explode( ' ', trim( str_replace( 'highlight', '', $classAttr ) ) ) ); // ugly, refactor\n\t\t\t\t\n\t\t\t\t$geshi = new Geshi( trim( $sliceValue ), isset( $classes[0] ) ? $classes[0] : 'php', HighlightPlugin::$geshi_path . '/geshi/' );\n\t\t\t\t$geshi->set_header_type( GESHI_HEADER_PRE );\n\t\t\t\t$geshi->set_overall_class( 'geshicode' );\n\t\t\t\t$output = @$geshi->parse_code(); // @ is slow, but geshi is full of E_NOTICE\n\t\t\t\tCache::set( $sliceCacheName, $output );\n\t\t\t}\n\t\t\t$slice->tokenize_replace( $output );\n\t\t\t$tokens->replace_slice( $slice );\n\t\t}\n\t\treturn (string) $tokens;\n\t}", "title": "" }, { "docid": "20400289e8b22074ab4b5d206e44b30c", "score": "0.59246606", "text": "public function highlight($value, $field, $html = false) {\n $highlight = $this->getView()->get('highlight', []);\n if(!isset($highlight[$field]))\n return $value;\n\n return Lexicon::highlight($value, $highlight[$field], $html);\n }", "title": "" }, { "docid": "c11d4c85cc6cde89b74a1a13f32fb1e1", "score": "0.5916119", "text": "public function highlight($string, $words, $boundary = true, $opening = '<strong>', $closing = '</strong>')\n {\n foreach ((array)$words as $word) {\n $word = preg_quote($word, '/');\n $pattern = $boundary ? '/\\b(' . $word . ')\\b/i' : '/(' . $word . ')/i';\n $string = preg_replace($pattern, $opening . '\\\\1' . $closing, $string);\n }\n\n return $string;\n }", "title": "" }, { "docid": "381986f204aeddb0707162fd73db7893", "score": "0.5898137", "text": "public function getValueHighlighted($value, $highlightData) \n\t{\t\n\t\t$searchOpt = $highlightData['searchOpt'];\t\n\t\tif( $searchOpt == 'Equals' )\n\t\t\treturn $this->addHighlightingSpan($value);\n\t\t\n\t\t$flags = $this->useUTF8 ? \"iu\" : \"i\";\n\t\t$prefix = ($searchOpt == 'Starts with') ? \"^\" : \"\";\t\t\n\t\t//ungreedy tag pattern\n\t\t$tagPattern = \"/(<[^=>]+\\s*(?:(?:[^=>]+=\\s*'[^']+'\\s*)|\".'(?:[^=>]+=\\s*\"[^\"]+\"\\s*)'.\")*>)/iU\";\n\t\t\n\t\tforeach($highlightData['searchWords'] as $searchWord)\n\t\t{\t\n\t\t\t$searchWordParts = preg_split($tagPattern, $searchWord);\n\t\t\n\t\t\tif( count($searchWordParts) == 1 )\n\t\t\t{\n\t\t\t\t$res = \"\";\n\t\t\t\t$highlighted = false;\n\t\t\t\t//remove tag fragments\n\t\t\t\t$newSearchWord = preg_replace(\"/^.*>|<.*$/U\", '', $searchWord);\n\t\t\t\t$pattern = '/'.$prefix.'('.preg_quote($newSearchWord,\"/\").')/'.$flags;\n\t\t\t\t\n\t\t\t\t//the search word doesn't contain any tags\n\t\t\t\t$valueArr = $this->getSplitStringWithCapturedDelimiters($tagPattern, $value); \n\t\t\t\tforeach($valueArr as $item)\n\t\t\t\t{\n\t\t\t\t\tif( !strlen($item) )\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t//It's a tag or the tag inside a tag's attribute was matched\n\t\t\t\t\tif( $item[0] == '<' || $item[ strlen($item) - 1 ] == '>' || $highlighted )\n\t\t\t\t\t{\n\t\t\t\t\t\t$res.= $item;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\t\n\n\t\t\t\t\tif( !$this->hasHTMLEntities($item) )\n\t\t\t\t\t\t$replacedItem = preg_replace($pattern, $this->addHighlightingSpan('$1'), $item);\n\t\t\t\t\telse\n\t\t\t\t\t\t$replacedItem = $this->highlightValueWithHTMLEntities($item, $pattern);\n\t\t\t\t\t\n\t\t\t\t\tif( $searchOpt == 'Starts with' && $item != $replacedItem )\n\t\t\t\t\t\t$highlighted = true;\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$res.= $replacedItem;\t\n\t\t\t\t}\n\t\t\t\t$value = $res;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//the search word contains tags\t\n\t\t\tforeach($searchWordParts as $item)\n\t\t\t{\n\t\t\t\tif( trim($item) )\n\t\t\t\t{\n\t\t\t\t\tif($item[0] != '<' && $item[ strlen($item) - 1 ] != '>' )\n\t\t\t\t\t{\n\t\t\t\t\t\t//remove tag fragments\n\t\t\t\t\t\t$newItem = preg_replace(\"/^.*>|<.*$/\", '', $item);\n\t\t\t\t\t\t$itemPattern = preg_quote($newItem, \"/\");\n\t\t\t\t\t\t$pattern = '/(>[^>]*)('.$itemPattern.')([^<]*<)|^([^<>]*)('.$itemPattern.')(<)|(>)('.$itemPattern.')([^<>]*$)/U';\n\t\t\t\t\t\t//$patterns = array('/(>[^>]*)('.$itemPattern.')([^<]*<)/U' , '/^([^<>]*)('.$itemPattern.')(<)/', '/(>)('.$itemPattern.')([^<>]*$)/');\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$value = preg_replace($pattern, \"$1\".$this->addHighlightingSpan(\"$2\").\"$3\", $value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\t\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "7a51a80d393ad4540bfbb5c7a67e1952", "score": "0.5870166", "text": "function text_highlight($needles, $haystack, $options=array()){\n\textract($options);\n\tif(!$expandCount)$expandCount=5;\n\tif(!$interestingThreshold)$interestingThreshold=5;\n\n\tif(!is_array($needles))$needles=array($needles);\n\t$haystack=preg_split('/\\s+/', $prep_function ? $prep_function($haystack) : $haystack);\n\t//now recurse the haystack and get word-match indexes\n\tfor($i=0; $i<count($haystack); $i++){\n\t\tfor($j=0; $j<count($needles); $j++){\n\t\t\t//find out if we want the word to be searched on as a partial - this logic will grow but it's basically, \"if exact match, OR if interesting and starts like or ends like [or really interesting and middle-like]\"\n\t\t\t$interesting=(\n\t\t\t\tstrlen($needles[$j])>=$interestingThreshold || strtolower($needles[$j])<>$needles[$j] ? \n\t\t\t\ttrue : \n\t\t\t\tfalse\n\t\t\t);\n\t\t\tif(\n\t\t\t\tsubstr( strtolower(preg_replace('/[,.\\'\"]+/','',$haystack[$i])), 0, strlen($interesting ? $needles[$j] : $haystack[$i]))\n\t\t\t\t== \n\t\t\t\tstrtolower(preg_replace('/[,.\\'\"]+/','',$needles[$j]))\n\t\t\t){\n\t\t\t\t$k++;\n\t\t\t\t$positions[$k]=array(\n\t\t\t\t\t'position'=>$i,\n\t\t\t\t\t'word'=>$needles[$j]\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\tif($positions){\n\t\tfor($k=1; $k<=count($positions); $k++){\n\t\t\t//how far to left\n\t\t\tif($positions[$k-1]){\n\t\t\t\tif($positions[$k-1]['right']>$positions[$k]['position']-$expandCount){\n\t\t\t\t\t$positions[$k]['left']=$positions[$k-1]['right']+1;\n\t\t\t\t}else{\n\t\t\t\t\t$positions[$k]['left']=$positions[$k]['position']-$expandCount;\n\t\t\t\t}\n\t\t\t}else if($k==1){\n\t\t\t\tif($positions[$k]['position']-$expandCount<0){\n\t\t\t\t\t$positions[$k]['left']=0;\n\t\t\t\t}else{\n\t\t\t\t\t$positions[$k]['left']=$positions[$k]['position']-$expandCount;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//how far to right\n\t\t\tif($k==count($positions)){\n\t\t\t\tif($positions[$k]['position']+$expandCount>count($haystack)-1){\n\t\t\t\t\t$positions[$k]['right']=count($haystack)-1;\n\t\t\t\t}else{\n\t\t\t\t\t$positions[$k]['right']=$positions[$k]['position']+$expandCount;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif($positions[$k]['position']+$expandCount > $positions[$k+1]['position']){\n\t\t\t\t\t$positions[$k]['right']=$positions[$k+1]['position']-1;\n\t\t\t\t}else{\n\t\t\t\t\t$positions[$k]['right']=$positions[$k]['position']+$expandCount;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//now build the text output\n\t\tfor($k=1; $k<=count($positions); $k++){\n\t\t\t$v=$positions[$k];\n\t\t\textract($v);\n\t\t\t//left ellipsis if needed\n\t\t\tif($left<>0 && $positions[$k-1]['right']+1<$left)$str.= ' ... ';\n\t\t\t\n\t\t\tfor($m=$left; $m<=$right; $m++){\n\t\t\t\t$str.=' ';\n\t\t\t\tif($m==$position)$str.='<strong class=\"text_highlight\">';\n\t\t\t\t$str.=$haystack[$m];\n\t\t\t\tif($m==$position)$str.='</strong>';\n\t\t\t}\n\t\t\t\n\t\t\t//right ellipsis if needed\n\t\t\tif($k==count($positions) && $right<count($haystack))$str.=' ... ';\n\t\t\t\n\t\t}\n\t\t/*\n\t\t?><div style=\"border:1px solid #ccc;padding:25px;margin-bottom:5px;\"><?php echo implode(' ',$haystack);?></div><?php\n\t\t?><div style=\"border:1px solid #ccc;padding:25px;\"><?php echo ($str);?></div><?php\n\t\techo '<pre>';\n\t\tprint_r($positions);\n\t\t*/\n\t\treturn $str;\n\t}\n}", "title": "" }, { "docid": "0e60bd89cf2a5ccb7bf779d868faf6cd", "score": "0.5867974", "text": "function highlight_html($string, $decode = TRUE){\n $tag = '#0000ff';\n $att = '#ff0000';\n $val = '#8000ff';\n $com = '#34803a';\n $find = array(\n '~(\\s[a-z].*?=)~', // Highlight the attributes\n '~(&lt;\\!--.*?--&gt;)~s', // Hightlight comments\n '~(&quot;[a-zA-Z0-9\\/].*?&quot;)~', // Highlight the values\n '~(&lt;[a-z].*?&gt;)~', // Highlight the beginning of the opening tag\n '~(&lt;/[a-z].*?&gt;)~', // Highlight the closing tag\n '~(&amp;.*?;)~', // Stylize HTML entities\n );\n $replace = array(\n '<span style=\"color:'.$att.';\">$1</span>',\n '<span style=\"color:'.$com.';\">$1</span>',\n '<span style=\"color:'.$val.';\">$1</span>',\n '<span style=\"color:'.$tag.';\">$1</span>',\n '<span style=\"color:'.$tag.';\">$1</span>',\n '<span style=\"font-style:italic;\">$1</span>',\n );\n if($decode)\n $string = htmlentities($string);\n return '<pre>'.preg_replace($find, $replace, $string).'</pre>';\n}", "title": "" }, { "docid": "20f10388eb9509a8b83f94959ff5bbb6", "score": "0.5824603", "text": "function highlight_code($str)\n\t{\n\t\t/* The highlight string function encodes and highlights\n\t\t * brackets so we need them to start raw.\n\t\t *\n\t\t * Also replace any existing PHP tags to temporary markers\n\t\t * so they don't accidentally break the string out of PHP,\n\t\t * and thus, thwart the highlighting.\n\t\t */\n\t\t$str = str_replace(\n\t\t\tarray('&lt;', '&gt;', '<?', '?>', '<%', '%>', '\\\\', '</script>'),\n\t\t\tarray('<', '>', 'phptagopen', 'phptagclose', 'asptagopen', 'asptagclose', 'backslashtmp', 'scriptclose'),\n\t\t\t$str\n\t\t);\n\n\t\t// The highlight_string function requires that the text be surrounded\n\t\t// by PHP tags, which we will remove later\n\t\t$str = highlight_string('<?php '.$str.' ?>', TRUE);\n\n\t\t// Remove our artificially added PHP, and the syntax highlighting that came with it\n\t\t$str = preg_replace(\n\t\t\tarray(\n\t\t\t\t'/<span style=\"color: #([A-Z0-9]+)\">&lt;\\?php(&nbsp;| )/i',\n\t\t\t\t'/(<span style=\"color: #[A-Z0-9]+\">.*?)\\?&gt;<\\/span>\\n<\\/span>\\n<\\/code>/is',\n\t\t\t\t'/<span style=\"color: #[A-Z0-9]+\"\\><\\/span>/i'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'<span style=\"color: #$1\">',\n\t\t\t\t\"$1</span>\\n</span>\\n</code>\",\n\t\t\t\t''\n\t\t\t),\n\t\t\t$str\n\t\t);\n\n\t\t// Replace our markers back to PHP tags.\n\t\treturn str_replace(\n\t\t\tarray('phptagopen', 'phptagclose', 'asptagopen', 'asptagclose', 'backslashtmp', 'scriptclose'),\n\t\t\tarray('&lt;?', '?&gt;', '&lt;%', '%&gt;', '\\\\', '&lt;/script&gt;'),\n\t\t\t$str\n\t\t);\n\t}", "title": "" }, { "docid": "7ac9fb54dda7ce37b57c2e32f56bc2c6", "score": "0.581152", "text": "static function FindAndHighLight($str, $arrToFind)\n\t\t{\n\t\t\tif(is_numeric($str))\n\t\t\t{\n\t\t\t\tforeach($arrToFind as $word)\n\t\t\t\t{\n\t\t\t\t\t$str = preg_replace(\"/\\b$word\\b/i\", \"<FONT COLOR='#FF3300'>\".ucwords(strtolower($word)).\"</FONT>\", $str) ;\n\t\t\t\t}\n\t\t\t\treturn $str ;\n\t\t\t}\n\t\t\t\n\t\t\t$metaphone_str = CUtils::GetMetaphone($str) ;\n\t\t\t\n\t\t\tforeach($arrToFind as $word)\n\t\t\t{\n\t\t\t\tif (true)//(!function_exists('str_ireplace')) \n\t\t\t\t{\n\t\t\t\t\t//$str = preg_replace(\"/\\b$word\\b/i\", \"<FONT COLOR='#FF3300'>\".ucwords(strtolower($word)).\"</FONT>\", $str) ;\n\t\t\t\t\t$metaphone_str = preg_replace(\"/\\b\".metaphone($word).\"\\b/i\", \"##R007##\", $metaphone_str) ;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$metaphone_str = str_ireplace($word, \"<FONT COLOR='#FF3300'>\".ucwords(strtolower($word)).\"</FONT>\", $str);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$meta_ary = str_word_count($metaphone_str, 1, \"#07\") ;\n\t\t\t$str_ary = str_word_count($str, 1) ;\n\t\t\t\n\t\t\t$index = 0 ;\n\t\t\t$str = \"\" ;\n\t\t\tforeach ($meta_ary as $meta_word)\n\t\t\t{\n\t\t\t\tif(strcasecmp($meta_word, \"##R007##\") == 0)\n\t\t\t\t{\n\t\t\t\t\t$str .= \"<FONT COLOR='#FF3300'>\".$str_ary[$index].\"</FONT> \" ;\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t$str .= $str_ary[$index].\" \" ;\n\t\t\t\t}\n\t\t\t\t$index++ ;\n\t\t\t}\n\t\t\treturn $str ;\n\t\t}", "title": "" }, { "docid": "689052b2e8bef35845dee4f2b749f09a", "score": "0.5801512", "text": "public function EnableHighlighting($query = \"\") {\n assert(is_string($query));\n $this->getHighlightables = true;\n $this->highlightQuery = $query;\n }", "title": "" }, { "docid": "227f9cf18736a2d80d4d9d349c8fd73a", "score": "0.579704", "text": "function parsesearch($srctext, $srcfield, &$qval, &$boldify, $likefilter = true) {\n\tif ($likefilter) {\n\t\t$srctext = strtr($srctext, array('%' => '\\\\%', '_' => '\\\\_'));\n\t}\n\t\n\t// Get an array of non-empty words\n\t$words = explode(\" \", trim($srctext));\n\t$words = array_filter($words, function($x) { return $x !== ''; });\n\tif (!$words) \n\t\treturn \"\";\n\n\t// Iterate over each word to generate the SQL statement / query values / bold text regex\n\t$qsearch = \"\"; // Search query with placeholders\n\t$qval = array(); // Query values\n\t$boldify = array(); // Words to highlight (regex)\n\t$curword = \"\"; // Current processed word\n\tforeach ($words as $x) {\n\t\tif ($curword && ($x == 'AND' || $x == 'OR')) { // AND / OR are separators\n\t\t\t$qsearch .= \"{$srcfield} LIKE ? {$x} \";\n\t\t\t$curword = substr($curword, 1);\n\t\t\t$boldify[] = \"/\".preg_quote($curword, '/').\"/i\";\n\t\t\t$qval[] = \"%{$curword}%\";\n\t\t\t$curword = \"\";\n\t\t} else {\n\t\t\t$curword .= \" {$x}\";\n\t\t}\n\t}\n\t$qsearch .= \"{$srcfield} LIKE ?\";\n\t$curword = substr($curword, 1);\n\t$boldify[] = \"/\".preg_quote($curword, '/').\"/i\";\n\t$qval[] = \"%{$curword}%\";\n\t\n\treturn $qsearch;\n}", "title": "" }, { "docid": "df83f361d262a780fa1c24fc2c4f2a01", "score": "0.57840097", "text": "function debug_highlight($html) {\n return $html;\n $h = \" \".$html;\n\n $p = 0;\n $state = false;\n while (true) {\n if ($state==\"text\") {\n if ($p2=strpos($h,\"'\",$p)) {\n $h = str_replace_once(\"'\",\"'\".'</span>',$h,$p);\n $p = $p2 + 13;\n $state = false;\n } else break;\n } else {\n if ($p2=strpos($h,\"'\",$p)) {\n $h = str_replace_once(\"'\",\"<span class='debug_text'>\".\"'\",$h,$p);\n $p = $p2 + 26;\n $state = \"text\";\n } else break;\n }\n }\n if ($state) $h.= '</span>';\n\n $p = 0;\n $state = false;\n while (true) {\n if ($state==\"text\") {\n if ($p2=strpos($h,'&#39;',$p)) {\n $h = str_replace_once('&#39;','&#39;</span>',$h,$p);\n $p = $p2 + 13;\n $state = false;\n } else break;\n } else {\n if ($p2=strpos($h,'&#39;',$p)) {\n $h = str_replace_once('&#39;',\"<span class='debug_text'>\".'&#39;',$h,$p);\n $p = $p2 + 26;\n $state = \"text\";\n } else break;\n }\n }\n if ($state) $h.= '</span>';\n\n $p = 0;\n $state = false;\n while (true) {\n if ($state==\"text\") {\n if ($p2=strpos($h,'&quot;',$p)) {\n $h = str_replace_once('&quot;','&quot;</span>',$h,$p);\n $p = $p2 + 13;\n $state = false;\n } else break;\n } else {\n if ($p2=strpos($h,'&quot;',$p)) {\n $h = str_replace_once('&quot;',\"<span class='debug_text'>\".'&quot;',$h,$p);\n $p = $p2 + 26;\n $state = \"text\";\n } else break;\n }\n }\n if ($state) $h.= '</span>';\n\n $p = 0;\n $state = false;\n while (true) {\n if ($state==\"tag\") {\n if (($p2=strpos($h,\"&gt;\",$p))!==false) {\n $h = str_replace_once(\"&gt;\",\"&gt;</span>\",$h,$p);\n $p = $p2 + 11;\n $state = false;\n } else break;\n } else {\n if (($p2=strpos($h,\"&lt;\",$p))!==false) {\n $h = str_replace_once(\"&lt;\",\"<span class='debug_tag'>&lt;\",$h,$p);\n $p = $p2 + 28;\n $state = \"tag\";\n } else break;\n }\n }\n if ($state) $h.= '</span>';\n\n $h = substr($h,1);\n re($h); return $h;\n}", "title": "" }, { "docid": "493ceebf8ba884b42e17e7142b51bf6c", "score": "0.57336813", "text": "private function highlightTerms($term, $results)\n\t{\n\n\t\tforeach ($results as $result)\n\t\t{\n\t\t\tif (strpos($term, ' '))\n\t\t\t{\n\t\t\t\t$terms = explode(' ', $term);\n\t\t\t\tforeach ($terms as $term)\n\t\t\t\t{\n\t\t\t\t\t$result->introtext = preg_replace('/([a-zA-Z\\s])(' . $term . ')([a-zA-Z\\s])/i', '$1<i style=\"background: yellow\">$2</i>$3', $result->introtext);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$result->introtext = preg_replace('/([a-zA-Z\\s])(' . $term . ')([a-zA-Z\\s])/i', '$1<i style=\"background: yellow\">$2</i>$3', $result->introtext);\n\t\t}\n\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "f270ec0f45e8646d63d53a42098b86c5", "score": "0.572237", "text": "public static function highlightSql($sql)\r\n\t{\r\n\t\tstatic $keywords1 = 'SELECT|UPDATE|INSERT(?:\\s+INTO)?|REPLACE(?:\\s+INTO)?|DELETE|FROM|WHERE|HAVING|GROUP\\s+BY|ORDER\\s+BY|LIMIT|OFFSET|SET|VALUES|LEFT\\s+JOIN|INNER\\s+JOIN|TRUNCATE';\r\n\t\tstatic $keywords2 = 'ALL|DISTINCT|DISTINCTROW|AS|USING|ON|AND|OR|IN|IS|NOT|NULL|LIKE|TRUE|FALSE';\r\n\r\n\t\t// insert new lines\r\n\t\t$sql = \" $sql \";\r\n\t\t$sql = preg_replace(\"#(?<=[\\\\s,(])($keywords1)(?=[\\\\s,)])#i\", \"\\n\\$1\", $sql);\r\n\r\n\t\t// reduce spaces\r\n\t\t$sql = preg_replace('#[ \\t]{2,}#', \" \", $sql);\r\n\r\n\t\t$sql = wordwrap($sql, 100);\r\n\t\t$sql = preg_replace(\"#([ \\t]*\\r?\\n){2,}#\", \"\\n\", $sql);\r\n\r\n\t\t// syntax highlight\r\n\t\t$sql = htmlSpecialChars($sql);\r\n\t\t$sql = preg_replace_callback(\"#(/\\\\*.+?\\\\*/)|(\\\\*\\\\*.+?\\\\*\\\\*)|(?<=[\\\\s,(])($keywords1)(?=[\\\\s,)])|(?<=[\\\\s,(=])($keywords2)(?=[\\\\s,)=])#is\", function($matches) {\r\n\t\t\tif (!empty($matches[1])) // comment\r\n\t\t\t\treturn '<em style=\"color:gray\">' . $matches[1] . '</em>';\r\n\r\n\t\t\tif (!empty($matches[2])) // error\r\n\t\t\t\treturn '<strong style=\"color:red\">' . $matches[2] . '</strong>';\r\n\r\n\t\t\tif (!empty($matches[3])) // most important keywords\r\n\t\t\t\treturn '<strong style=\"color:blue\">' . $matches[3] . '</strong>';\r\n\r\n\t\t\tif (!empty($matches[4])) // other keywords\r\n\t\t\t\treturn '<strong style=\"color:green\">' . $matches[4] . '</strong>';\r\n\t\t}, $sql);\r\n\r\n\t\treturn '<pre class=\"dump\">' . trim($sql) . \"</pre>\\n\";\r\n\t}", "title": "" }, { "docid": "67a0d1340b6c34de665f6772073a78b4", "score": "0.57150304", "text": "function highlightTitle ($title, $highlight, $truncateSize) {\n $truncatedText = ($truncateSize === 0) ? $title : Text::truncateText($title, $truncateSize);\n return Formatter::highlight($truncatedText, $highlight);\n }", "title": "" }, { "docid": "1034e9e8b44170c3be3da97656306adb", "score": "0.57042897", "text": "function geshi_highlight ( $string, $language, $path, $return = false )\n\t{\n\t\t$geshi = new GeSHi($string, $language, $path);\n\t\t$geshi->set_header_type(GESHI_HEADER_DIV);\n\t\tif ( $return )\n\t\t{\n\t\t\treturn str_replace('<div>', '<code>', str_replace('</div>', '</code>', $geshi->parse_code()));\n\t\t}\n\t\techo str_replace('<div>', '<code>', str_replace('</div>', '</code>', $geshi->parse_code()));\n\t\tif ( $geshi->error() )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "e83d20c269e58701bce70952e5756d73", "score": "0.5700434", "text": "function highlight_func($atts, $content) {\n\textract(shortcode_atts(array(\n\t\t'type' => 'yellow',\n\t), $atts));\n\t\n\t$return_html = '';\n\t$return_html.= '<span class=\"highlight_'.$type.'\">'.strip_tags($content).'</span>';\n\n\treturn $return_html;\n}", "title": "" }, { "docid": "97d861c73339487a8ac834c2cb4c3179", "score": "0.56897324", "text": "function f_color_tag(&$txt, $class, $tag='') {\n// $txt must be a source code wich is a result of highlight_file().\n\n\t$z2 = '<span class=\"'.$class.'\">';\n\t$zo = '&lt;';\n\t$zc = '&gt;';\n\t$zc_len = strlen('&gt;');\n\t\n\t$all = ($tag===''); // color all remaing tags\n\n\tif ($all) $txt = str_replace($zc,$zc.'</span>',$txt);\n\n\tif (is_string($tag)) $tag = explode(',', $tag);\n\tforeach ($tag as $t) {\n\t\t$p = 0;\n\t\t$z = $zo.$t;\n\t\t$z_len = strlen($z);\n\t\tdo {\n\t\t\t$p = strpos($txt, $z, $p);\n\t\t\tif ($p!==false) {\n\t\t\t\tif ($all or (substr($txt,$p+$z_len,1)==='&')) { // the next char must be a ' ' or a '>'. In both case, it is converted by highlight_file() with a special char begining with '&'.\n\t\t\t\t\tif (($p>0) and (substr($txt,$p-2,2)!=='\">')) { // the tag must not be previsouly colored \n\t\t\t\t\t\t$p2 = strpos($txt, $zc, $p+$z_len);\n\t\t\t\t\t\tif ($p2!==false) {\n\t\t\t\t\t\t\t$x = substr($txt, $p, $p2 + $zc_len - $p);\n\t\t\t\t\t\t\t$x = str_replace('=\"','=<span class=\"v\">\"',$x); // color the value of attributes\n\t\t\t\t\t\t\t$x = str_replace('=\\'','=<span class=\"v\">\\'',$x); // color the value of attributes\n\t\t\t\t\t\t\t$x = str_replace('\"&','\"</span>&',$x);\n\t\t\t\t\t\t\t$x = $z2.$x.'</span>';\n\t\t\t\t\t\t\t$txt = substr($txt,0,$p).$x.substr($txt,$p2 + $zc_len);\n\t\t\t\t\t\t\t$p = $p + strlen($x);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$p = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$p = $p + $z_len;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$p = $p + $z_len;\n\t\t\t\t}\n\t\t\t}\n\t\t} while ($p!==false);\n\t\t$z = $zo.'/'.$t.$zc;\n\t\t$txt = str_replace($z,$z2.$z.'</span>',$txt);\n\t}\n\t\n}", "title": "" }, { "docid": "437367a8eba4a0bae51ed358cf3aabf3", "score": "0.5657716", "text": "abstract function search($string);", "title": "" }, { "docid": "b86d318b92b86523935e1c9d7f8cc7aa", "score": "0.56391746", "text": "function highlight($text, $words)\n{\n\t$replacements = array();\n\tforeach ($words as $key => $word) {\n\t\t$replacements[$key] = '<u>\\\\0</u>';\n\t\t$word = str_replace(array('.'), array('\\.'), $word);\n\t\t$words[$key] = \"/$word/i\";\n\t}\n\t$text = preg_replace($words, $replacements, $text);\n\treturn $text;\n}", "title": "" }, { "docid": "653a785e9ad28de7b55119ffc9e73feb", "score": "0.55962336", "text": "public function highlight(string $source): string\n {\n $result = '';\n $previous = [];\n foreach ($this->getTokens($source) as $token) {\n $result .= $this->r->token($token, $previous);\n $previous = $token;\n }\n\n return $result;\n }", "title": "" }, { "docid": "fdb0275913039ed99a5a89eeae5d119a", "score": "0.5592201", "text": "function xhtmlHighlightString($str, $return=false){\n\t\n\t$str = unhtmlentities($str, ENT_QUOTES);\n\t\n\tif(function_exists('stripslash')){\n\t\n\t\t$str = stripslash($str);\n\t\n\t}\n\t\n\t$str = trim($str);\n\t\n\t$open = $close = false;\n\t\n\tif(!(strpos(substr($str, 0, 3), '<?') === false)) $open = true;\n\t\n\tif(!(strpos(substr($str, -3), '?>') === false)) $close = true;\n\t\n\t// adds required PHP tags (at least with vers. 5.0.5 this is required)\n\t// xml is not THAT important ;-)\n\tif ( strpos($str,'?>') === false ){\n\t\n\t\t$str = \"<?php \".$str.\" ?>\";\n\t\t$r1 = '#&lt;\\?.*?(php)?.*?&nbsp;#s';\n\t\t$r2 = '#\\?&gt;#s';\n\t\t\n\t}elseif(strpos($str,'<?') !== false){\n\t\n\t\t$r1 = '--';\n\t\t$str = str_replace('<? ','<?php ',$str);\n\t\t\n\t}\n\t\n\t//trim some extra enters(\\n)\n\t$str = trim($str);\n\t\n\t$hlt = highlight_string(stripslashes($str), true);\n\t\n\tif ($r1 =='--') $str = preg_replace('#(&lt;\\?.*?)(php)?(.*?&nbsp;)#s','\\\\1\\\\3',$str);\n\t\n\t$fon = str_replace(array('<font ', '</font>'), array('<span ', '</span>'), $hlt);\n\t\n\t$ret = preg_replace('#color=\"(.*?)\"#', 'style=\"color: \\\\1\"', $fon);\n\t\n\t//Remove the OPEN PHP TAG\n\tif(empty($open)) $ret = substr_replace($ret, '', strpos($ret,'&lt;?php'), 8);\n\t\t\n\t//Remove the CLOSE PHP TAG\n\tif(empty($close)) $ret = substr_replace($ret, '', (strrpos($ret,'?&gt;')), 5);\n\t\n\t$ret = '<div class=\"codeblock\"><div class=\"codehead\">PHP Code</div><div class=\"code\">'.$ret.'</div></div>';\n\t\n\tif($return){\n\t\n\t\treturn $ret;\n\t\t\n\t}else{\n\t\n\t\techo $ret;\n\t\n\t\treturn true;\n\t\n\t}\n\t\n}", "title": "" }, { "docid": "7e0f82df49dac64d77b017fba4f54eb6", "score": "0.558588", "text": "function php0816Highlighter()\n{\n global $highlights; # <-- global highlights :D\n \n # SOMEONE SAID THIS WILL FIX IT, BUT PEOPLE CAN STILL SEE solution.php :( #\n $filename = str_replace(array('/', '\\\\', '..'), '', Common::getGet('src'));#\n \n if (false === ($text = @file_get_contents($filename)))\n {\n echo '<div>File not Found: '.htmlspecialchars($filename, ENT_QUOTES).'</div>';\n return false;\n }\n \n $text = htmlspecialchars($text, ENT_QUOTES);\n \n foreach ($highlights as $highlight)\n {\n $stlye = 'color:#CD7F32; background-color:white; padding: 0 8px;'; \n $text = str_replace($highlight, '<b style=\"'.$stlye.'\">'.$highlight.'</b>', $text);\n }\n \n echo '<pre>'.$text.'</pre>';\n}", "title": "" }, { "docid": "2e7ed31c54c3f4933c11206913729e5b", "score": "0.5539022", "text": "public static function highlight($string, $locale = 'fr')\n {\n $replacements = array(\n ' ' => '<span class=\"highlight-gray\"> </span>',\n '…' => '<span class=\"highlight-gray\">…</span>',\n );\n\n switch ($locale) {\n case 'fr':\n default:\n $replacements['&hellip;'] = '<span class=\"highlight-gray\">…</span>'; // right ellipsis highlight\n break;\n }\n\n return Strings::multipleStringReplace($replacements, $string);\n }", "title": "" }, { "docid": "aa233a66dd23ecd5d58f24935d38d369", "score": "0.55367064", "text": "public function getHighlight()\n {\n return $this->highlight;\n }", "title": "" }, { "docid": "ac7b86c098a34c9ab3b6e7ef23e1c1b8", "score": "0.55250967", "text": "function pp_highlight($atts, $content = null) {\r\n extract(shortcode_atts(array(\r\n 'style' => 'gray'\r\n ), $atts));\r\n return '<span class=\"highlight '.$style.'\">'.$content.'</span>';\r\n}", "title": "" }, { "docid": "99944f14247b1f8ceb7c001e5382a562", "score": "0.55047303", "text": "public static function highlight_sql( $sql, $color = false, $multiline = false )\n\t{\n\t\t$find = array(\n\t\t\t'/(\\s{2,})/',\n\n\t\t\t// NOTE: This commented line is the same as something in the color area\n/*\t\t\t'/(SELECT|UPDATE|INSERT|DELETE|GROUP_CONCAT|CONCAT_WS|CONCAT|COUNT|DISTINCT|IF|MAX|MIN|NULL|SUM|FROM|SET|LEFT JOIN|USING|ON|WHERE|GROUP BY|ORDER BY|ASC|DESC|HAVING|LIMIT|AS|UNIX_TIMESTAMP|SEPARATOR)/',*/\n\t\t\t);\n\t\t$replace = array(\n\t\t\t' ',\n/*\t\t\t'<b>$1</b>',*/\n\t\t\t);\n\t\t$sql = preg_replace( $find, $replace, $sql );\n\t\tif( $color )\n\t\t{\n\t\t\t$find = array(\n\t\t\t\t'/(\"[^\"]*\")/',\n\t\t\t\t'/(\\'[^\\']*\\')/',\n\t\t\t\t'/((?:t\\d.)?(?:`[^`]*`|\\*))/',\n\t\t\t\t'/(SELECT|UPDATE|INSERT|DELETE|GROUP_CONCAT|CONCAT_WS|CONCAT|COUNT|DISTINCT|IF|MAX|MIN|NULL|SUM|FROM|SET|LEFT JOIN|USING|ON|WHERE|GROUP BY|ORDER BY|ASC|DESC|HAVING|LIMIT|AS|UNIX_TIMESTAMP|SEPARATOR| AND | OR )/',\n\t\t\t\t);\n\t\t\t$replace = array(\n\t\t\t\t'<span style=\"color:#077\">$1</span>',\n\t\t\t\t'<span style=\"color:#077\">$1</span>',\n\t\t\t\t'<span style=\"color:#070\">$1</span>',\n\t\t\t\t'<span style=\"color:#707;font-weight:bold\">$1</span>',\n\t\t\t\t);\n\t\t\t$sql = preg_replace( $find, $replace, $sql );\n\t\t\t$sql = '<span style=\"color:#F0F\">' .$sql. '</span>';\n\t\t}\n\t\tif( $multiline )\n\t\t{\n\t\t\t$find = array(\n\t\t\t\t'/(FROM|SET|WHERE|GROUP BY|ORDER BY|HAVING|LIMIT)/',\n\t\t\t\t'/(LEFT JOIN| AND | OR )/',\n\t\t\t\t'/(,)/',\n\t\t\t\t'/([^C])(ON)/',\n\t\t\t\t);\n\t\t\t$replace = array(\n\t\t\t\t'<br/>$1',\n\t\t\t\t'<br/>&nbsp;&nbsp;&nbsp;&nbsp;$1',\n\t\t\t\t'$1<br/>&nbsp;&nbsp;&nbsp;&nbsp;',\n\t\t\t\t'$1<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$2',\n\t\t\t\t);\n\t\t\t$sql = preg_replace( $find, $replace, $sql );\n\t\t}\n\t\treturn $sql;\n\t}", "title": "" }, { "docid": "f1f66ed5903d664bf059a7633777c4b6", "score": "0.5477342", "text": "public function highlight($code) {\n\t\t$phpTagsAdded = false;\n\t\tif (StringUtil::indexOf($code, '<?') === false) {\n\t\t\t$phpTagsAdded = true;\n\t\t\t$content = '<?php '.$code.' ?>';\n\t\t}\n\t\t\n\t\t// do highlight\n\t\t$highlightedCode = highlight_string($code, true);\n\t\t\n\t\t// clear code\n\t\t$highlightedCode = str_replace('<code>', '', $highlightedCode);\n\t\t$highlightedCode = str_replace('</code>', '', $highlightedCode);\n\t\t\n\t\t// remove added php tags\n\t\tif ($phpTagsAdded) {\n\t\t\t$highlightedCode = preg_replace(\"/([^\\\\2]*)(&lt;\\?php&nbsp;)(.*)(&nbsp;.*\\?&gt;)([^\\\\4]*)/si\", \"\\\\1\\\\3\\\\5\", $highlightedCode);\n\t\t}\n\t\t\n\t\t// remove breaks\n\t\t$highlightedCode = str_replace(\"\\n\", \"\", $highlightedCode);\n\t\t$highlightedCode = str_replace('<br />', \"\\n\", $highlightedCode);\n\t\t// get tabs back\n\t\t$highlightedCode = str_replace('&nbsp;&nbsp;&nbsp;&nbsp;', \"\\t\", $highlightedCode);\n\t\t\n\t\t// replace double quotes by entity \n\t\treturn preg_replace('/(?<!\\<span style=)\"(?!\\>)/', '&quot;', $highlightedCode);\n\t}", "title": "" }, { "docid": "1185c65690e214467e48eaf46e2cb80f", "score": "0.5475378", "text": "protected abstract function getSearchString($search);", "title": "" }, { "docid": "04681f07dc045b70a31eb83b47130a46", "score": "0.54580116", "text": "public function underline(string $search, string $replace): MessageInterface;", "title": "" }, { "docid": "12a21a663683d3d570a8275b582d70f1", "score": "0.54445785", "text": "public function setHighlightAttribute(Highlight $value)\n {\n $this->highlight = $value;\n }", "title": "" }, { "docid": "97cfa55b3847170fd8b199aaa0ac3da7", "score": "0.5432973", "text": "function my_search_text( $text ) {\n\treturn esc_attr( 'Search Novak Codes' );\n}", "title": "" }, { "docid": "21b2111c4ec24b457ea375674828be4d", "score": "0.54239094", "text": "public function sphinx_highlight($text, $index, $query, $options = array())\n {\n $result = $this->searchd->getClient()->BuildExcerpts(array((string)$text), $index, $query, $options);\n\n if (!empty($result[0])) {\n return $result[0];\n } else {\n return '';\n }\n }", "title": "" }, { "docid": "b4727e66ab7f019acb17d52bd4cf70fb", "score": "0.53947514", "text": "public function highlight(string $source) : string\n {\n $highlighter = new \\FSHL\\Highlighter(\n new \\FSHL\\Output\\Html(),\n \\FSHL\\Highlighter::OPTION_TAB_INDENT | \\FSHL\\Highlighter::OPTION_LINE_COUNTER\n );\n $source = $highlighter->highlight($source, new \\FSHL\\Lexer\\Php());\n $sourceLines = explode(\"\\n\", $source);\n\n foreach ($sourceLines as $k => $v) {\n $sourceLines[$k] = str_replace('<span class=\"line\">', '<span id=\"L-'.($k+1).'\" class=\"line\">', $v);\n }\n $source = implode(\"\\n\", $sourceLines);\n\n return $source;\n }", "title": "" }, { "docid": "63d31004eeb77f0a1d23dd1a14c63406", "score": "0.53880346", "text": "private function emboldenQuery($str) {\n $tokens = $this->tokens;\n\n if (!$tokens) {\n return $str;\n }\n\n if (count($tokens) > 16) {\n return $str;\n }\n\n if (!strlen($str)) {\n return $str;\n }\n\n if (strlen($str) > 2048) {\n return $str;\n }\n\n $patterns = array();\n foreach ($tokens as $token) {\n $raw_token = $token->getToken();\n $operator = $raw_token->getOperator();\n\n $value = $raw_token->getValue();\n\n switch ($operator) {\n case PhutilSearchQueryCompiler::OPERATOR_SUBSTRING:\n case PhutilSearchQueryCompiler::OPERATOR_EXACT:\n $patterns[] = '(('.preg_quote($value).'))ui';\n break;\n case PhutilSearchQueryCompiler::OPERATOR_AND:\n $patterns[] = '((?<=\\W|^)('.preg_quote($value).')(?=\\W|\\z))ui';\n break;\n default:\n // Don't highlight anything else, particularly \"NOT\".\n break;\n }\n }\n\n // Find all matches for all query terms in the document title, then reduce\n // them to a map from offsets to highlighted sequence lengths. If two terms\n // match at the same position, we choose the longer one.\n $all_matches = array();\n foreach ($patterns as $pattern) {\n $matches = null;\n $ok = preg_match_all(\n $pattern,\n $str,\n $matches,\n PREG_OFFSET_CAPTURE);\n if (!$ok) {\n continue;\n }\n\n foreach ($matches[1] as $match) {\n $match_text = $match[0];\n $match_offset = $match[1];\n\n if (!isset($all_matches[$match_offset])) {\n $all_matches[$match_offset] = 0;\n }\n\n $all_matches[$match_offset] = max(\n $all_matches[$match_offset],\n strlen($match_text));\n }\n }\n\n // Go through the string one display glyph at a time. If a glyph starts\n // on a highlighted byte position, turn on highlighting for the number\n // of matching bytes. If a query searches for \"e\" and the document contains\n // an \"e\" followed by a bunch of combining marks, this will correctly\n // highlight the entire glyph.\n $parts = array();\n $highlight = 0;\n $offset = 0;\n foreach (phutil_utf8v_combined($str) as $character) {\n $length = strlen($character);\n\n if (isset($all_matches[$offset])) {\n $highlight = $all_matches[$offset];\n }\n\n if ($highlight > 0) {\n $is_highlighted = true;\n $highlight -= $length;\n } else {\n $is_highlighted = false;\n }\n\n $parts[] = array(\n 'text' => $character,\n 'highlighted' => $is_highlighted,\n );\n\n $offset += $length;\n }\n\n // Combine all the sequences together so we aren't emitting a tag around\n // every individual character.\n $last = null;\n foreach ($parts as $key => $part) {\n if ($last !== null) {\n if ($part['highlighted'] == $parts[$last]['highlighted']) {\n $parts[$last]['text'] .= $part['text'];\n unset($parts[$key]);\n continue;\n }\n }\n\n $last = $key;\n }\n\n // Finally, add tags.\n $result = array();\n foreach ($parts as $part) {\n if ($part['highlighted']) {\n $result[] = phutil_tag('strong', array(), $part['text']);\n } else {\n $result[] = $part['text'];\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "8f020a99609994455eed7d45a3f42dcd", "score": "0.5384577", "text": "function highlight($code)\n{\n // prepare data for highlight\n $data = \"<?php \" . $code . \" ?>\";\n\n $data = highlight_string($data, true);\n // eliminate php begin and closing tags\n $data = str_replace('&lt;?php&nbsp;', '', $data);\n $data = str_replace('?&gt;', '', $data);\n\n $data = str_replace(\"\\n\", '', $data);\n return $data;\n}", "title": "" }, { "docid": "d25fdd5f2194cd2651d19ca25e1db777", "score": "0.5374311", "text": "public function highlite($content, $searchWords) {\n \n if(strlen(trim($searchWords))==0)\n return $content;\n \n if(!is_array($searchWords))\n $searchWords = array($searchWords);\n \n foreach($searchWords as $word)\n $content = preg_replace('/(?!<[^<>])('.$word.')(?![^<>]*>)/i','<span class=found>$0</span>',$content);\n \n return $content;\n }", "title": "" }, { "docid": "b4f91f0ba1328810c76e07030907622c", "score": "0.53590375", "text": "public static function post_parse_highlight($inline, $color, $data='') {\n $color = trim(strtolower($color));\n $default = 'rgba(255,255,0,0.6)';\n $rgb['red'] = 'rgba(255,0,0,0.5)';\n $rgb['green'] = 'rgba(0,255,0,0.5)';\n $rgb['blue'] = 'rgba(0,0,255,0.5)';\n $rgb['yellow'] = 'rgba(255,255,0,0.6)';\n $rgb['cyan'] = 'rgba(0,255,255,0.5)';\n $rgb['magenta'] = 'rgba(255,0,255,0.5)';\n if ($color <> '') {\n if (isset($rgb[$color])) {\n $color = $rgb[$color];\n } elseif (preg_match('\"#\"', $color)) {\n $color = $color;\n }\n }\n if ($color == '') $color = $default;\n if ($inline) {\n return \"<span class='highlight' style='background-color:$color'>$data</span>\";\n } else {\n return \"<div class='highlight' style='background-color:$color'>\";\n }\n }", "title": "" }, { "docid": "7f34a5d3cc14571c2241c8be580d84ae", "score": "0.5356147", "text": "function highlightText($a_text, $proglang, $autoindent)\n\t{\n\n\t\tif (!$this->hasHighlighter($proglang))\n\t\t{\n\t\t\t$proglang=\"plain\";\n\t\t}\n\n\t\trequire_once(\"./Services/COPage/syntax_highlight/php/HFile/HFile_\".$proglang.\".php\");\n\t\t$classname = \"HFile_$proglang\";\n\t\t$h_instance = new $classname();\n\t\tif ($autoindent == \"n\") {\n\t\t\t$h_instance ->notrim = 1;\n\t\t\t$h_instance ->indent = array (\"\");\n\t\t\t$h_instance ->unindent = array (\"\");\n\t\t}\n\n\t\t$highlighter = new Core($h_instance, new Output_css());\n\t\t$a_text = $highlighter->highlight_text(html_entity_decode($a_text));\n\n\t\treturn $a_text;\n\t}", "title": "" }, { "docid": "7d3c6f5588f0d2f476e90d1f344dce47", "score": "0.53474444", "text": "public function setHighlight($highlight) {\n\t\t$this->highlight = $highlight;\n\t}", "title": "" }, { "docid": "a501bb73edd9b90bd44a563545c7b954", "score": "0.5346661", "text": "public function search($keyword);", "title": "" }, { "docid": "7981da1bfd985a0bdb07a65f9984b24c", "score": "0.5340828", "text": "function outline__replace($str, $search = '', $replace = '') { return str_replace($search, $replace, $str); }", "title": "" }, { "docid": "61b6b006e17e17a24ecb322e0970d58c", "score": "0.53007925", "text": "public function search(string $search) : String\n {\n return \"Pesquisando pelo IP \\\"{$search}\\\"\";\n }", "title": "" }, { "docid": "579f9e95f348822d04cc849f24a20580", "score": "0.5255387", "text": "public function highlightFile($file) {\n\t\treturn highlight_file($file, true);\n\t}", "title": "" }, { "docid": "6b3cee899804898c2802e4475d706df0", "score": "0.52373266", "text": "public static function colorize($str, $fg=null, $at=null, $bg=null){ }", "title": "" }, { "docid": "842b1dbf44b59c92fbb78a0863049b06", "score": "0.52212864", "text": "function display_highlight($lang = 'php', $code = null)\n{\n\n if (is_null($code)) {\n $code = trim(ob_get_contents());\n ob_end_clean();\n }\n\n if (class_exists('GeSHi')) {\n $geshi = new GeSHi($code, $lang);\n $geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS, 10);\n $geshi->set_line_style('background: #fcfcfc;', 'background: #f0f0f0;');\n $geshi->set_overall_style('width:750px;margin-bottom:10px;', true);\n echo $geshi->parse_code();\n\n //echo '<div style=\"width:750px;margin-bottom:10px;\" >'.$geshi->parse_code().'</div>';\n } else {\n echo '<pre style=\"width:750px;margin-bottom:10px;\" >' . htmlentities($code, ENT_QUOTES, 'utf-8') . '</pre>';\n }\n\n start_md();\n\n}", "title": "" }, { "docid": "3c6f9f2a3fe68a24744ffbb99d1c11a5", "score": "0.5192041", "text": "function mark($needle, $haystack)\n{\n $result = \"\";\n\n while (preg_match('/^(.*)('.preg_quote($needle).')(.*)$/i', $haystack, $matches)) {\n $result .= $matches[1].\"<span class='mark'>\".$matches[2].\"</span>\";\n $haystack = $matches[3];\n }\n\n return $result.$haystack;\n}", "title": "" }, { "docid": "eb53794421f3b1bbaac3a94937377ab3", "score": "0.5187018", "text": "public function highlight(string $text, array $options = []): string {\n\t\tif ($this->_config['debug']) {\n\t\t\t$this->_startTimer();\n\t\t}\n\t\t$highlightedText = $this->_getHighlighter()->highlight($text, $options);\n\t\tif ($this->_config['debug']) {\n\t\t\t$highlightedText .= $this->_timeElapsedFormatted($this->_endTimer());\n\t\t}\n\n\t\treturn $highlightedText;\n\t}", "title": "" }, { "docid": "ae2c65470a1962c7650d7e42fc59a33b", "score": "0.51821184", "text": "public function getHighlightAttribute()\n {\n return $this->highlight;\n }", "title": "" }, { "docid": "a233eb83934344675b7bd3f034ea0073", "score": "0.5176771", "text": "public function textColoring(string $code)\n {\n $this->start_html = $this->start_html . '<span class=\"mc-color mc-' . $code . '\">';\n $this->end_html = $this->end_html . '</span>';\n }", "title": "" }, { "docid": "cb5b0c21da2f19a15ef055d5842e0f92", "score": "0.5170988", "text": "public function search(string $q);", "title": "" }, { "docid": "8e336a9604a6dc27e9d9d1373dc146c3", "score": "0.51642823", "text": "public function highlight(array $match_details): string\n {\n // Keep track of which <pre> tag we're up to\n $this->cache_match_num++;\n // We haven't generated any new cache yet.\n $this->cache_generated = false;\n\n // Do we have cache? Serve it!\n if (isset($this->cache[$this->cache_match_num])) {\n return '<!-- from cache -->' . $this->cache[$this->cache_match_num] . '<!-- end from cahe -->';\n }\n\n $i = intval($match_details[1]);\n $match = $this->matches[$i];\n\n $highlighter = new Highlighter($match);\n\n $output = $highlighter->render();\n\n if ($this->cache_generate) {\n $this->cache_generated = true;\n $this->cache[$this->cache_match_num] = $output;\n }\n\n return $output;\n }", "title": "" }, { "docid": "e0781e62558a2231b9b160faec375ebf", "score": "0.516002", "text": "public function search( $search_string ) {\n\t\t\treturn $this->run( 'search', array( 'query' => $search_string ) );\n\t\t}", "title": "" }, { "docid": "ac158701241f56f539d3f72b5325dacf", "score": "0.5140532", "text": "public function highlightCourse(Course $course)\n {\n $sql = \"UPDATE courses SET highlight = :highlight WHERE course_id = :course_id\";\n $stmt = $this->pdo->prepare($sql);\n $stmt->execute([\n ':highlight' => $course->getHighlight(),\n ':course_id' => $course->getCourseId()\n ]);\n }", "title": "" }, { "docid": "bec97af6d0ac861692342ec907a3f1a8", "score": "0.5132586", "text": "function _codeContextHighlight ($code, array $regex_replacements = array(), $first_char_of_next_context = '')\n {\n geshi_dbg('GeSHiCodeContext::_codeContextHighlight(' . substr($code, 0, 15) . ', ' .\n (($regex_replacements) ? 'array(...)' : 'null') . ', ' . $first_char_of_next_context . ')');\n //$first_char_of_next_context = '';\n\n if (empty($this->_contextKeywordLookup)) {\n $this->_createContextKeywordLookup();\n }\n\n $result = array(0 => array('', ''));\n\n // If no code, don't bother\n if ('' == $code) {\n // Set context name\n $result[0][1] = $this->_contextName;\n return $result;\n }\n\n $result_pointer = 0;\n $length = strlen($code);\n $keyword_match_allowed = true;\n\n $keyword_cache = array();\n $next_keyword_pos = -1;\n $next_keyword_group = '';\n $next_keyword = '';\n $next_keyword_len = 0;\n // For each character\n for ($i = 0; $i < $length; $i++) {\n if (isset($regex_replacements[$i])) {\n geshi_dbg(' Regex replacements available at position ' . $i . ': ' . $regex_replacements[$i][0][0] . '...');\n // There's regular expressions expected to go here\n foreach ($regex_replacements[$i] as $replacement) {\n // should be .= ?????\n $result[++$result_pointer] = $replacement;\n }\n // Allow keyword matching immediately after regular expressions\n $keyword_match_allowed = true;\n }\n\n $char = $code[$i];\n if (\"\\0\" == $char) {\n // Not interested in null characters inserted by regex replacements\n continue;\n }\n\n // Take symbols into account before doing this\n if (!$this->_contextKeywordLookup) {\n $this->_checkForSymbol($char, $result, $result_pointer);\n continue;\n }\n\n geshi_dbg('@b Current char is: ' . str_replace(\"\\n\", '\\n', $char));\n\n // check keywords\n $matched_keyword = false;\n if ($keyword_match_allowed) {\n if ($next_keyword_pos < $i) {\n geshi_dbg(' check for new keyword position');\n $next_keyword_pos = $length;\n foreach ($this->_contextKeywordLookup as $group_key => $arr) {\n $min_len = $arr[1];\n if ($length - $i < $min_len) {\n continue;\n }\n foreach ($arr[0] as $regex_key => $regexp) {\n $match_i = false;\n if (isset($keyword_cache[$regex_key][$group_key]) &&\n ($keyword_cache[$regex_key][$group_key]['pos'] >= $i ||\n $keyword_cache[$regex_key][$group_key]['pos'] === false)) {\n // we have already matched something\n if ($keyword_cache[$regex_key][$group_key]['pos'] === false) {\n // this comment is never matched\n continue;\n }\n $match_i = $keyword_cache[$regex_key][$group_key]['pos'];\n $keyword = $keyword_cache[$regex_key][$group_key]['keyword'];\n } elseif (preg_match($regexp, $code, $match, PREG_OFFSET_CAPTURE, $i)) {\n $match_i = $match[0][1];\n $keyword = $match[0][0];\n $keyword_cache[$regex_key][$group_key] = array(\n 'pos' => $match_i,\n 'keyword' => $keyword\n );\n geshi_dbg(\" found match for keyword group $group_key at $match_i\");\n } else {\n $keyword_cache[$regex_key][$group_key]['pos'] = false;\n geshi_dbg(\" keywordgroup $group_key is never again matched\");\n continue;\n }\n $keyword_len = strlen($keyword);\n if (($match_i !== false && $match_i < $next_keyword_pos) ||\n ($match_i == $next_keyword_pos && $keyword_len > $next_keyword_len)) {\n $next_keyword_pos = $match_i;\n $next_keyword_group = $group_key;\n $next_keyword = $keyword;\n $next_keyword_len = $keyword_len;\n geshi_dbg(\" next keyword: $next_keyword (group $group_key) at pos $match_i (unless longer match is found)\");\n if ($match_i === $i) {\n break;\n }\n }\n }\n }\n }\n if ($i == $next_keyword_pos) {\n // there's a keyword match!\n geshi_dbg('Keyword matched:' . $next_keyword);\n\n $result[++$result_pointer] = array(\n $next_keyword,\n $this->_contextKeywords[$next_keyword_group][1],\n $this->_getURL($next_keyword, $next_keyword_group)\n );\n $matched_keyword = true;\n if (!$next_keyword) {\n var_dump($i, $next_keyword_pos);\n }\n $i += strlen($next_keyword) - 1;\n geshi_dbg(\"strlen of keyword is \" . $next_keyword_len . \" (pos is $i)\");\n $next_keyword_pos = false;\n $next_keyword_len = 0;\n }\n }\n if (!$matched_keyword) {\n // Check for a symbol instead\n $this->_checkForSymbol($char, $result, $result_pointer);\n /*foreach ($this->_contextSymbols as $symbol_data) {\n if (in_array($char, $symbol_data[0])) {\n $result[++$result_pointer] = array($char, $symbol_data[1], '');\n continue;\n }\n }*/\n //$result[++$result_pointer] = array($char, $this->_contextName);\n }\n\n /// If we move this to the end we might be able to get rid of the last one [DONE]\n /// The second test on the first line is a little contentious - allows functions that don't\n /// start with an alpha character to be within other words, e.g abc<?php, where <?php is a kw\n if (!isset($code[$i + 1])) {\n break;\n }\n $before_char = $code[$i + 1];\n $before_char_is_alnum = ctype_alnum($before_char);\n $keyword_match_allowed = (!$before_char_is_alnum || ($before_char_is_alnum && !ctype_alnum($char)));\n $keyword_match_allowed = ($keyword_match_allowed && !in_array($before_char,\n $this->_contextCharactersDisallowedBeforeKeywords));\n // Disallow underscores before keywords\n $keyword_match_allowed = ($keyword_match_allowed && ('_' != $before_char));\n geshi_dbg(' Keyword matching allowed: ' . $keyword_match_allowed);\n geshi_dbg(' [checked ' . substr($code, $i, 1) . ' against ' . print_r($this->_contextCharactersDisallowedBeforeKeywords, true));\n }\n\n unset($result[0]);\n //geshi_dbg('@b Resultant Parse Data:');\n //geshi_dbg(str_replace(\"\\n\", \"\\r\", print_r($result, true)));\n //return array(array($code, $this->_contextName));\n return $result;\n }", "title": "" }, { "docid": "21692d5e3661aa50721a0f6d95fd0ce9", "score": "0.5123477", "text": "public function search($term)\n\t{\n\t\treturn 'Hello Search';\n\t}", "title": "" }, { "docid": "9d7907d76aa6cb44bff9dc3e48b7c9dd", "score": "0.51165223", "text": "public function renderText($search, $replace)\n {\n return str_ireplace($search, $replace, $this->text);\n }", "title": "" }, { "docid": "fdb2ed90e3b3cf018fc1ecf7b2650602", "score": "0.51145655", "text": "function php_code($code){ //Colorisation de Code PHP\n$str = highlight_string(html_entity_decode($code[1]), true);\n\n return '<br><strong>Script PHP :</strong><div class=\"scroll\">' . highlight_string(html_entity_decode($code[1]), true) . '</div><br>';\n}", "title": "" }, { "docid": "870152ff1d84b988c0d79dd1bcf0553f", "score": "0.5079925", "text": "function set_regexps_highlighting ( $key, $flag )\n\t{\n\t\t$this->lexic_permissions['REGEXPS'][$key] = ( $flag ) ? true : false;\n\t}", "title": "" }, { "docid": "727fc6feee53f79489109267206c0137", "score": "0.5073733", "text": "private function _apply_highlight($a_json, $parts, $hl_class = 'bg-primary', $accent_insensitive = true) {\n\n\t\t$p = count($parts);\n\t\t$rows = count($a_json);\n\n\t\tfor($row = 0; $row < $rows; $row++) {\n\n\t\t\t$label = $a_json[$row][\"label\"];\n\t\t\tif($accent_insensitive) {\n\t\t\t\t$label_no_accents = $this->_removeAccents($label);\n\t\t\t}\n\t\t\t$a_label_match = array();\n\n\t\t\tfor($i = 0; $i < $p; $i++) {\n\n\t\t\t\t$part_len = mb_strlen($parts[$i]);\n\t\t\t\tif($accent_insensitive) {\n\t\t\t\t\t$a_match_start = $this->_mb_stripos_all($label_no_accents, removeAccents($parts[$i]));\n\t\t\t\t} else {\n\t\t\t\t\t$a_match_start = $this->_mb_stripos_all($label, $parts[$i]);\n\t\t\t\t}\n\n\t\t\t\tif(is_array($a_match_start)) {\n\t\t\t\t\tforeach($a_match_start as $part_pos) {\n\n\t\t\t\t\t\t$overlap = false;\n\t\t\t\t\t\tforeach($a_label_match as $pos => $len) {\n\t\t\t\t\t\t\tif($part_pos - $pos >= 0 && $part_pos - $pos < $len) {\n\t\t\t\t\t\t\t\t$overlap = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!$overlap) {\n\t\t\t\t\t\t\t$a_label_match[$part_pos] = $part_len;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(count($a_label_match) > 0) {\n\t\t\t\tksort($a_label_match);\n\n\t\t\t\t$label_highlight = '';\n\t\t\t\t$start = 0;\n\t\t\t\t$label_len = mb_strlen($label);\n\n\t\t\t\tforeach($a_label_match as $pos => $len) {\n\t\t\t\t\tif($pos - $start > 0) {\n\t\t\t\t\t\t$no_highlight = mb_substr($label, $start, $pos - $start);\n\t\t\t\t\t\t$label_highlight .= $no_highlight;\n\t\t\t\t\t}\n\t\t\t\t\t$highlight = '<span class=\"' . $hl_class . '\">' . mb_substr($label, $pos, $len) . '</span>';\n\t\t\t\t\t$label_highlight .= $highlight;\n\t\t\t\t\t$start = $pos + $len;\n\t\t\t\t}\n\n\t\t\t\tif($label_len - $start > 0) {\n\t\t\t\t\t$no_highlight = mb_substr($label, $start);\n\t\t\t\t\t$label_highlight .= $no_highlight;\n\t\t\t\t}\n\n\t\t\t\t$a_json[$row][\"label\"] = $label_highlight;\n\t\t\t}\n\n\t\t}\n\t\treturn $a_json;\n\n\t}", "title": "" }, { "docid": "ca14b70790a400c7ad37f798ea68512c", "score": "0.5047974", "text": "public function setAlteredHighlightedQueryString($val)\n {\n $this->_propDict[\"alteredHighlightedQueryString\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "3bd4a324542f3d800536e2bba49ddf1a", "score": "0.5041648", "text": "public function emphasis(string $search, string $replace): MessageInterface;", "title": "" }, { "docid": "58489b60e67385666ac1ad8424ccabb1", "score": "0.5016489", "text": "function insert_text( $search, $replace )\n\t{\n\t\t$this->text[ $search ] = $replace;\n\t}", "title": "" }, { "docid": "10cb91facfbcc55bb66b8c314b9f3f5a", "score": "0.5001704", "text": "public function setHighlight($highlight)\n {\n $this->highlight = $highlight;\n\n return $this;\n }", "title": "" }, { "docid": "77e8f4593055f94dcc670cdcbcff3f55", "score": "0.49837348", "text": "function set_keyword_group_highlighting ( $key, $flag = true )\n\t{\n\t\t$this->lexic_permissions['KEYWORDS'][$key] = ( $flag ) ? true : false;\n\t}", "title": "" }, { "docid": "c1a58bc959f876d46e7cb815093a4651", "score": "0.49771276", "text": "public function markQuery($text)\n {\n // Only mark the query if this feature is enabled\n if ( ! Settings::get('mark_results', true)) {\n return $text;\n }\n\n return (string)preg_replace('/(' . preg_quote($this->query, '/') . ')/iu', '<mark>$0</mark>', $text);\n }", "title": "" }, { "docid": "b7051fe3df9b123c1dc1de7ad0cda971", "score": "0.49650282", "text": "function searchText($word) {\n\t\t\t\t // highlight search key word\n\t\t\t\t\t$query = \"SELECT id_word FROM word where word LIKE '%$word%' \";\n\t\t\t\t\t$res = mysql_query ( $query );\n\t\t\t\t\tif (mysql_num_rows ( $res )) {\n\t\t\t\t\t\techo \"Words Table:\";\n\t\t\t\t\t\techo \"<table border='1'>\";\n\t\t\t\t\t\techo \"<tr>\";\n\t\t\t\t\t\techo \"<th>id_file</th> <th>word</th> <th>count</th>\";\n\t\t\t\t\t\techo \"</tr>\";\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile ( $row = mysql_fetch_row ( $res ) ) {\n\t\t\t\t\t\t\t$i = 0;\n\t\t\t\t\t\t\tforeach ( $row as $elem ) {\n\t\t\t\t\t\t\t\tif ($i == 0) {\n\t\t\t\t\t\t\t\t\t$wid = $elem;\n\t\t\t\t\t\t\t\t\t$i ++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tprintword ( $wid, $word );\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo \"</table>\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo \"<font size=5>no words contain that information in database!</font><br>\";\n\t\t\t\t\t}\n\t\t\t\t}", "title": "" } ]
84bfe82941441d4af4265bd1ce08a1a0
Test for engine validity
[ { "docid": "65e638e839b5497281d0b95a96937506", "score": "0.7039235", "text": "public static function isValidEngine(): bool\n {\n return extension_loaded('openssl') && static::class != __CLASS__;\n }", "title": "" } ]
[ { "docid": "dce08c70583f2935f107f50200fd156f", "score": "0.7233986", "text": "public static function isValidEngine(): bool\n {\n return static::class != __CLASS__;\n }", "title": "" }, { "docid": "12e58f511644769286a3262eb96854e4", "score": "0.67573065", "text": "private static function validEngine($engine)\n {\n return is_string($engine) && in_array($engine, self::$supportedEngines);\n }", "title": "" }, { "docid": "43bdf7007341e1c7636b853629fc999b", "score": "0.6661774", "text": "function isValidEngine($engine)\n {\n if ($engine == self::ENGINE_OPENSSL) {\n if (version_compare(PHP_VERSION, '5.3.7') < 0 && $this->key_length != 16) {\n return false;\n }\n if ($this->key_length < 16) {\n return false;\n }\n $this->cipher_name_openssl_ecb = 'bf-ecb';\n $this->cipher_name_openssl = 'bf-' . $this->_openssl_translate_mode();\n }\n return parent::isValidEngine($engine);\n }", "title": "" }, { "docid": "3ce97fa0395ad6321821b81b5eb55cba", "score": "0.6583724", "text": "private function isValidEngine(int $engine): bool\n {\n if (empty($engine)) {\n return false;\n }\n\n switch ($engine) {\n case self::ENGINE_OPENSSL:\n if ($this->block_size != 16) {\n return false;\n }\n $this->cipherNameOpensslEcb = 'aes-' . ($this->key_length << 3) . '-ecb';\n $this->cipherNameOpenssl = 'aes-' . ($this->key_length << 3) . '-' . $this->opensslTranslateMode();\n break;\n default:\n throw new LogicException('Unhandled engine.');\n }\n\n // prior to PHP 5.4.0 OPENSSL_RAW_DATA and OPENSSL_ZERO_PADDING were not defined.\n // instead of expecting an integer $options openssl_encrypt expected a boolean $raw_data.\n if (!defined('OPENSSL_RAW_DATA')) {\n $this->opensslOptions = true;\n } else {\n $this->opensslOptions = OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING;\n }\n\n $methods = openssl_get_cipher_methods();\n if (in_array($this->cipherNameOpenssl, $methods)) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "6a7406009617f864aa7fd7d946262b5f", "score": "0.63869256", "text": "public function isValid()\n {\n\n if (!$this->isActive())\n {\n throw new EngineNotInitialisedException('Simple CAPTCHA engine not initialised');\n }\n\n $key = $this->_dependencies->input->post('_bourbon_captcha_key', false);\n $answer = $this->_dependencies->session->read('_bourbon_captcha_' . $key);\n $user_answer = $this->_dependencies->input->post('_bourbon_captcha_value', false);\n $user_answer = strtoupper($user_answer);\n\n if (!is_null($key) AND !is_null($answer) AND $user_answer == $answer)\n {\n return true;\n }\n\n return false;\n\n }", "title": "" }, { "docid": "e252c48d14d8cc20fcbb1074c6e10877", "score": "0.630133", "text": "public function valid() {}", "title": "" }, { "docid": "e252c48d14d8cc20fcbb1074c6e10877", "score": "0.630133", "text": "public function valid() {}", "title": "" }, { "docid": "e252c48d14d8cc20fcbb1074c6e10877", "score": "0.630133", "text": "public function valid() {}", "title": "" }, { "docid": "e252c48d14d8cc20fcbb1074c6e10877", "score": "0.630133", "text": "public function valid() {}", "title": "" }, { "docid": "81f6fd8f10df89d33af9685953292214", "score": "0.62466484", "text": "function valid() {}", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.62341213", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.62341213", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.62341213", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.62341213", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.62341213", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.62341213", "text": "public function valid();", "title": "" }, { "docid": "519cee32220a868fa2831c6ccdbb58e4", "score": "0.620152", "text": "function validate_web_php_engine($engine)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n if (empty($engine))\n return;\n\n $retval = '';\n\n if (clearos_load_library('php_engines/PHP_Engines')) {\n $php = new \\clearos\\apps\\php_engines\\PHP_Engines();\n $retval = $php->validate_engine($engine);\n }\n\n return $retval;\n }", "title": "" }, { "docid": "f9d6567ec07548f5bf503237717b3e54", "score": "0.6080867", "text": "public function testEngineCanBeLoaded()\n {\n $fileLocator = $this->getFileLocator();\n $esprima = $this->getEsprima($fileLocator, 'esprima-2.0.0.js');\n\n $this->assertContains('esprima', $esprima->load());\n }", "title": "" }, { "docid": "d045875de1af8fb099d8c1d464a9343a", "score": "0.5984577", "text": "public function is_compliant();", "title": "" }, { "docid": "d94cac777201d2bf006253d6ce6039d0", "score": "0.5983322", "text": "private static function _valid()\n {\n return self::_send() == 'valid';\n }", "title": "" }, { "docid": "ff0222b63b71854916d7470e8f24270a", "score": "0.5923962", "text": "function validate_platform()\n\t\t{\n\t\t\t// Get database version\n\t\t\tif (!db_check_version())\n\t\t\t\tthrow new ConfigurationException(elgg_echo('ConfigurationException:BadDatabaseVersion'));\n\t\t\t\n\t\t\t// Now check PHP\n\t\t\tif (!php_check_version())\n\t\t\t\tthrow new ConfigurationException(elgg_echo('ConfigurationException:BadPHPVersion'));\n\t\t\t\t\n\t\t\t// TODO: Consider checking for installed modules etc\n\t\t\t\t\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "dd0e26a0f30f17365d7a298e41bd094e", "score": "0.5918834", "text": "function check_implementation() {\r\n\r\n\t\t$xtea = new XTEA(\"\");\r\n\t\t$vectors = array(\r\n\t\t\tarray(array(0x00000000,0x00000000,0x00000000,0x00000000), array(0x41414141,0x41414141), array(0xed23375a,0x821a8c2d)),\r\n\t\t\tarray(array(0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f), array(0x41424344,0x45464748), array(0x497df3d0,0x72612cb5)),\r\n\r\n\t\t);\r\n\r\n\t\t//Correct implementation?\r\n\t\t$correct = true;\r\n\t\t//Test vectors, see http://www.schneier.com/code/vectors.txt\r\n\t\tforeach($vectors AS $vector) {\r\n \t$key = $vector[0];\r\n\t\t\t$plain = $vector[1];\r\n\t\t\t$cipher = $vector[2];\r\n\r\n\t\t\t$xtea->key_setup($key);\r\n\t\t\t$return = $xtea->block_encrypt($vector[1][0],$vector[1][1]);\r\n\r\n\t\t\tif((int)$return[0] != (int)$cipher[0] || (int)$return[1] != (int)$cipher[1])\r\n\t\t\t\t$correct = false;\r\n\r\n\t\t}\r\n\r\n\t\treturn $correct;\r\n\r\n\t}", "title": "" }, { "docid": "5901c528527deac4edb0ff31e3d0adb9", "score": "0.58889234", "text": "public function valid(){ }", "title": "" }, { "docid": "1aa53de6aac92e5f022ea7a3197255cb", "score": "0.5867617", "text": "public function valid()\n {\n }", "title": "" }, { "docid": "1aa53de6aac92e5f022ea7a3197255cb", "score": "0.5867617", "text": "public function valid()\n {\n }", "title": "" }, { "docid": "1aa53de6aac92e5f022ea7a3197255cb", "score": "0.5867617", "text": "public function valid()\n {\n }", "title": "" }, { "docid": "1aa53de6aac92e5f022ea7a3197255cb", "score": "0.5867617", "text": "public function valid()\n {\n }", "title": "" }, { "docid": "1aa53de6aac92e5f022ea7a3197255cb", "score": "0.5867617", "text": "public function valid()\n {\n }", "title": "" }, { "docid": "1aa53de6aac92e5f022ea7a3197255cb", "score": "0.5867617", "text": "public function valid()\n {\n }", "title": "" }, { "docid": "e45374ea9d59640b0a5494b636a26c32", "score": "0.5849547", "text": "public function check();", "title": "" }, { "docid": "e45374ea9d59640b0a5494b636a26c32", "score": "0.5849547", "text": "public function check();", "title": "" }, { "docid": "e45374ea9d59640b0a5494b636a26c32", "score": "0.5849547", "text": "public function check();", "title": "" }, { "docid": "e45374ea9d59640b0a5494b636a26c32", "score": "0.5849547", "text": "public function check();", "title": "" }, { "docid": "a629bdd7b28ec7a37f85e858062f0907", "score": "0.5847036", "text": "abstract public function check();", "title": "" }, { "docid": "a629bdd7b28ec7a37f85e858062f0907", "score": "0.5847036", "text": "abstract public function check();", "title": "" }, { "docid": "519a2a9887bab8698b80eec5f763bc27", "score": "0.58292603", "text": "public function Valid();", "title": "" }, { "docid": "1be9aa23e08d1104da166a55fd5b8994", "score": "0.58247685", "text": "public function testEngines() {\n\t\t$this->assertInstanceOf('\\mjohnson\\decoda\\engines\\PhpEngine', $this->object->getEngine());\n\n\t\t$this->object->setEngine(new TestEngine());\n\n\t\t$this->assertInstanceOf('\\mjohnson\\decoda\\tests\\TestEngine', $this->object->getEngine());\n\t}", "title": "" }, { "docid": "560a22dd569d8ca6ff486a48b9d216b1", "score": "0.5817105", "text": "public function isValid() {}", "title": "" }, { "docid": "560a22dd569d8ca6ff486a48b9d216b1", "score": "0.5817105", "text": "public function isValid() {}", "title": "" }, { "docid": "560a22dd569d8ca6ff486a48b9d216b1", "score": "0.58162373", "text": "public function isValid() {}", "title": "" }, { "docid": "560a22dd569d8ca6ff486a48b9d216b1", "score": "0.58162373", "text": "public function isValid() {}", "title": "" }, { "docid": "560a22dd569d8ca6ff486a48b9d216b1", "score": "0.58162373", "text": "public function isValid() {}", "title": "" }, { "docid": "560a22dd569d8ca6ff486a48b9d216b1", "score": "0.58162373", "text": "public function isValid() {}", "title": "" }, { "docid": "560a22dd569d8ca6ff486a48b9d216b1", "score": "0.581608", "text": "public function isValid() {}", "title": "" }, { "docid": "03e242110f5d6c1889ff09a4bf8c26f7", "score": "0.58138543", "text": "public function assertValid()\n {\n }", "title": "" }, { "docid": "8e9346f4404016fbd01796bbf76ffcb3", "score": "0.5811613", "text": "function isValid() {\n return true;\n }", "title": "" }, { "docid": "f18e2443d186c7505cf891d7b7dff67d", "score": "0.58027244", "text": "public function is_valid();", "title": "" }, { "docid": "04657f53fbbc80c7fb7a064f78cfa8c0", "score": "0.57989454", "text": "public function valid()\n {\n return true;\n }", "title": "" }, { "docid": "04657f53fbbc80c7fb7a064f78cfa8c0", "score": "0.57989454", "text": "public function valid()\n {\n return true;\n }", "title": "" }, { "docid": "04657f53fbbc80c7fb7a064f78cfa8c0", "score": "0.57989454", "text": "public function valid()\n {\n return true;\n }", "title": "" }, { "docid": "04657f53fbbc80c7fb7a064f78cfa8c0", "score": "0.57989454", "text": "public function valid()\n {\n return true;\n }", "title": "" }, { "docid": "04657f53fbbc80c7fb7a064f78cfa8c0", "score": "0.57989454", "text": "public function valid()\n {\n return true;\n }", "title": "" }, { "docid": "04657f53fbbc80c7fb7a064f78cfa8c0", "score": "0.57989454", "text": "public function valid()\n {\n return true;\n }", "title": "" }, { "docid": "04657f53fbbc80c7fb7a064f78cfa8c0", "score": "0.57989454", "text": "public function valid()\n {\n return true;\n }", "title": "" }, { "docid": "04657f53fbbc80c7fb7a064f78cfa8c0", "score": "0.57989454", "text": "public function valid()\n {\n return true;\n }", "title": "" }, { "docid": "04657f53fbbc80c7fb7a064f78cfa8c0", "score": "0.57989454", "text": "public function valid()\n {\n return true;\n }", "title": "" }, { "docid": "04657f53fbbc80c7fb7a064f78cfa8c0", "score": "0.57989454", "text": "public function valid()\n {\n return true;\n }", "title": "" }, { "docid": "04657f53fbbc80c7fb7a064f78cfa8c0", "score": "0.57989454", "text": "public function valid()\n {\n return true;\n }", "title": "" }, { "docid": "95a1d58263645efea30f9ec8022afdc0", "score": "0.5775695", "text": "public function valid(): bool\n {\n return true;\n }", "title": "" }, { "docid": "f2214999b78d4eadae41635f24bb6272", "score": "0.5773147", "text": "abstract public function isValid();", "title": "" }, { "docid": "f2214999b78d4eadae41635f24bb6272", "score": "0.5773147", "text": "abstract public function isValid();", "title": "" }, { "docid": "f2214999b78d4eadae41635f24bb6272", "score": "0.5773147", "text": "abstract public function isValid();", "title": "" }, { "docid": "3cb9d75380861ead4afb33a5042480e6", "score": "0.57721287", "text": "function valid();", "title": "" }, { "docid": "bc708fe41ce803f57c616d75454f8784", "score": "0.5772074", "text": "public function isValid() \n\t{\n\t\t$valid = true;\n\t\t$previousHandler = set_error_handler(function($number, $message) use ($valid) {\n\t\t\t$valid = false;\n\t\t});\n\t\ttry {\n\t\t\t$instance = $this->instance();\n\t\t\t$instance->getVersion();\n\t\t} catch (\\Exception $ex) {\n\t\t\t$valid = false;\n\t\t}\n\t\t\n\t\tset_error_handler($previousHandler);\n\t\t\n\t\treturn $valid;\n\t}", "title": "" }, { "docid": "060ef49908c2cf5ca6964ddc7897c5dc", "score": "0.5768341", "text": "function isValid()\r\n\t{\t\t\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "e3316ef81ee41e37b532b086d137a549", "score": "0.575448", "text": "public function is_valid()\n {\n }", "title": "" }, { "docid": "e3316ef81ee41e37b532b086d137a549", "score": "0.57533914", "text": "public function is_valid()\n {\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "a630a3802f53adda8cf45fc122963626", "score": "0.57447445", "text": "public function valid()\n {\n\n return true;\n }", "title": "" }, { "docid": "e535542d3ebc5a12f81e4ffa262de820", "score": "0.57391626", "text": "protected function shouldBeValidated()\n {\n $license = $this->memory->get('license');\n return is_null($license) or ( (time() - strtotime($license)) / 3600) > $this->interval;\n }", "title": "" } ]
31c806facb95ccf114be3ee30dc58a14
How to use : onMergeCells('A1:D1');
[ { "docid": "e893057eacffb9adc08a58926348b6f5", "score": "0.6951078", "text": "public function onMergeCells($mergeCellRange)\n\t{\n\t\t$this->objPHPExcel->getActiveSheet()->mergeCells($mergeCellRange);\n\t}", "title": "" } ]
[ { "docid": "807ac84ac87804c0388bfc2e9d29af1b", "score": "0.6475257", "text": "public function applyMergedCells(): void\n {\n $sheet = $this->worksheetType->getWorksheet();\n $mergedCells = $this->worksheetType->getMergedCells();\n\n foreach ($mergedCells as $cells) {\n $sheet->mergeCells($cells)\n ->getStyle($cells)->getAlignment()->setHorizontal('center');\n }\n }", "title": "" }, { "docid": "e2f089410fdbe5a00ec213d0847c2888", "score": "0.5959536", "text": "public function registerEvents(): array{\n return [ \n AfterSheet::class => function(AfterSheet $event) {\n $letra = 'A';\n $anchos = [30,30,7,30,10,9,9,12,9.5];\n for ($i=0; $i < 9; $i++) { \n $event->sheet->getDelegate()->mergeCells($letra.'1:'.$letra.'2');\n $event->sheet->getDelegate()->getColumnDimension($letra)->setWidth($anchos[$i]);\n\n if($letra != 'I'){\n foreach ($this->rows_merge as $row) {\n if($row['inicio'] != $row['termino']){\n $event->sheet->getDelegate()->mergeCells($letra.$row['inicio'].':'.$letra.$row['termino']);\n }\n }\n }\n \n $letra++;\n }\n $letra = 'S';\n $anchos = [12,10,9,11,11,9.5,14,12,12,12];\n for ($i=0; $i < 10; $i++) { \n $event->sheet->getDelegate()->mergeCells($letra.'1:'.$letra.'2');\n $event->sheet->getDelegate()->getColumnDimension($letra)->setWidth($anchos[$i]);\n\n if($letra != 'S'){\n foreach ($this->rows_merge as $row) {\n if($row['inicio'] != $row['termino']){\n $event->sheet->getDelegate()->mergeCells($letra.$row['inicio'].':'.$letra.$row['termino']);\n }\n }\n }\n\n $letra++;\n }\n\n $event->sheet->getDelegate()->mergeCells('J1:L1'); //Sexo\n $event->sheet->getDelegate()->mergeCells('M1:O1'); //Inf. Respiratoria\n $event->sheet->getDelegate()->mergeCells('P1:R1'); //Covid\n\n /*\n \n $letra_control = $letra;\n for ($i=0; $i < $this->ronda_maxima; $i++) {\n $letra_rango = $letra_control;\n $event->sheet->getDelegate()->getColumnDimension($letra_rango)->setWidth(8.1);\n $letra_control++;\n }\n \n\n $letra = $letra_control;\n $anchos = [20.2, 24.8, 10];\n for ($i=0; $i < 3; $i++) {\n $letra_rango++;\n $event->sheet->getDelegate()->getColumnDimension($letra_rango)->setWidth($anchos[$i]);\n }\n $event->sheet->getDelegate()->mergeCells($letra.'1:'.$letra_rango.'1');*/\n\n $event->sheet->getDelegate()->getStyle('A1:'.($event->sheet->getHighestColumn()).($event->sheet->getHighestRow()))->getAlignment()->setWrapText(true);\n $event->sheet->styleCells(\n 'A1:'.($event->sheet->getHighestColumn()).'2',\n [\n 'alignment' => [\n 'horizontal' => \\PhpOffice\\PhpSpreadsheet\\Style\\Alignment::HORIZONTAL_CENTER,\n 'vertical' => \\PhpOffice\\PhpSpreadsheet\\Style\\Alignment::VERTICAL_CENTER,\n ],\n 'fill' => [\n 'fillType' => \\PhpOffice\\PhpSpreadsheet\\Style\\Fill::FILL_SOLID,\n 'color' => ['argb' => 'DDDDDD']\n ],\n 'borders' => [\n 'allBorders' => [\n 'borderStyle' => \\PhpOffice\\PhpSpreadsheet\\Style\\Border::BORDER_MEDIUM,\n 'color' => ['argb' => '666666'],\n ],\n ],\n 'font' => array(\n 'name' => 'Calibri',\n 'size' => 10,\n 'bold' => true,\n 'color' => ['argb' => '000000'],\n )\n ]\n );\n $event->sheet->styleCells(\n 'A3:'.($event->sheet->getHighestColumn()).($event->sheet->getHighestRow()),\n [\n 'alignment' => [\n 'horizontal' => \\PhpOffice\\PhpSpreadsheet\\Style\\Alignment::HORIZONTAL_CENTER,\n 'vertical' => \\PhpOffice\\PhpSpreadsheet\\Style\\Alignment::VERTICAL_CENTER,\n ],\n 'font' => array(\n 'name' => 'Calibri',\n 'size' => 10,\n 'bold' => true,\n 'color' => ['argb' => '000000'],\n )\n ]\n );\n $event->sheet->styleCells(\n 'A3:'.($event->sheet->getHighestColumn()).($event->sheet->getHighestRow()),\n [\n 'borders' => [\n 'allBorders' => [\n 'borderStyle' => \\PhpOffice\\PhpSpreadsheet\\Style\\Border::BORDER_MEDIUM,\n 'color' => ['argb' => '666666'],\n ],\n ]\n ]\n );\n /*\n $event->sheet->freezePane('A2', 'A2');\n */\n }\n ];\n }", "title": "" }, { "docid": "15a84b7f679f7c99099542b2acad187c", "score": "0.56882656", "text": "private function writeCellMerge(XMLWriter $objWriter, Cell $cell): void\n {\n if (!$cell->isMergeRangeValueCell()) {\n return;\n }\n\n $mergeRange = Coordinate::splitRange((string) $cell->getMergeRange());\n [$startCell, $endCell] = $mergeRange[0];\n $start = Coordinate::coordinateFromString($startCell);\n $end = Coordinate::coordinateFromString($endCell);\n $columnSpan = Coordinate::columnIndexFromString($end[0]) - Coordinate::columnIndexFromString($start[0]) + 1;\n $rowSpan = ((int) $end[1]) - ((int) $start[1]) + 1;\n\n $objWriter->writeAttribute('table:number-columns-spanned', (string) $columnSpan);\n $objWriter->writeAttribute('table:number-rows-spanned', (string) $rowSpan);\n }", "title": "" }, { "docid": "176d8b9dbd6403943909c40e45de6975", "score": "0.5626717", "text": "public function setMerge($row_start, $row_end, $column_start, $column_end) {\n\t}", "title": "" }, { "docid": "a0db05105e92b57fbddd4bf729e12b13", "score": "0.52498204", "text": "public function gpMergedDataProvider() {}", "title": "" }, { "docid": "c7fd45eef7f83cba98ec6ba688b6334c", "score": "0.50389045", "text": "protected function processCellData() : void\n {\n \n foreach ($this->cellData as $columnValue=>$cellValues) {\n\n if (isset($cellValues['width'])) {\n if ($cellValues['width'] === 'auto') {\n $this->activeSheet->getColumnDimension($columnValue)->setAutoSize(true);\n } else {\n $this->activeSheet->getColumnDimension($columnValue)->setWidth($cellValues['width']);\n }\n }\n\n foreach ($cellValues['data'] as $key=>$data) {\n \n $this->activeSheet->setCellValue($columnValue . $data[1], $data[0]);\n\n if ($data[2] !== '') {\n $this->activeSheet->mergeCells($columnValue . $data[1] . ':' . $data[2] . $data[1]);\n }\n\n if (array_key_exists('style', $data)) {\n if ($data[2] !== '') {\n $this->activeSheet->getStyle($columnValue . $data[1] . ':' . $data[2] . $data[1])->applyFromArray($data['style']);\n } else {\n $this->activeSheet->getStyle($columnValue . $data[1])->applyFromArray($data['style']);\n }\n }\n\n }\n }\n }", "title": "" }, { "docid": "ceada487c123df2e24bb3d01548a48d0", "score": "0.50382096", "text": "public function getMerge($row, $column) {\n\t}", "title": "" }, { "docid": "9de0ba1f0f36a63dcca260080ca05019", "score": "0.5026411", "text": "public function mergeCells(int $row1, int $col1, int $row2, int $col2, ?string $glue = null)\n {\n [$rowS1, $colS1] = $this->spanBase($row1, $col1);\n [$rowS2, $colS2] = $this->spanBase($row2, $col2);\n $vertical = ($colS1 === $colS2);\n $horizontal = ($rowS1 === $rowS2);\n if (($vertical && $horizontal) || (!$vertical && !$horizontal)) {\n return;\n }\n $colSpan1 = $this->_structure[$rowS1][$colS1]['attr']['colspan'] ?? 1;\n $rowSpan1 = $this->_structure[$rowS1][$colS1]['attr']['rowspan'] ?? 1;\n $colSpan2 = $this->_structure[$rowS2][$colS2]['attr']['colspan'] ?? 1;\n $rowSpan2 = $this->_structure[$rowS2][$colS2]['attr']['rowspan'] ?? 1;\n if (\n ($vertical && ($colSpan1 !== $colSpan2)) ||\n ($horizontal && ($rowSpan1 !== $rowSpan2))\n ) {\n return;\n }\n $firstCell = ($horizontal) ? ($colS2 > $colS1) : ($rowS2 > $rowS1);\n $c1 = $firstCell ? $colS1 : $colS2;\n $r1 = $firstCell ? $rowS1 : $rowS2;\n $c2 = $firstCell ? $colS2 : $colS1;\n $r2 = $firstCell ? $rowS2 : $rowS1;\n $cSpan1 = $firstCell ? $colSpan1 : $colSpan2;\n $rSpan1 = $firstCell ? $rowSpan1 : $rowSpan2;\n if (\n ($vertical && ($rowS1 + $rSpan1 !== $rowS2)) ||\n ($horizontal && ($colS1 + $cSpan1 !== $colS2))\n ) {\n return;\n }\n $glue = $glue ?? ($horizontal ? ' ' : '<br>');\n $glue = strlen($this->_structure[$r1][$c1]['contents']) ? $glue : '';\n if (strlen($this->_structure[$r2][$c2]['contents'])) {\n $this->_structure[$r1][$c1]['contents'] .= $glue . $this->_structure[$r2][$c2]['contents'];\n }\n if ($horizontal) {\n $this->_structure[$r1][$c1]['attr']['colspan'] = $colSpan1 + $colSpan2;\n } else {\n $this->_structure[$r1][$c1]['attr']['rowspan'] = $rowSpan1 + $rowSpan2;\n }\n $this->tidyAttr($this->_structure[$r1][$c1]);\n $this->tidyAttr($this->_structure[$r2][$c2]);\n $this->_structure[$r2][$c2] = '__SPANNED__';\n }", "title": "" }, { "docid": "76d20a6189fbf474ab2e4780be33fbf7", "score": "0.4853589", "text": "public function mergeFrom(array $data);", "title": "" }, { "docid": "ddd2084ee79260a7961499fcbe2840b7", "score": "0.47605562", "text": "protected function addMerge(Builder $builder)\n {\n $builder->macro('merge', function(Builder $builder, $to, $newAttributes)\n {\n $builder->withMerged();\n // $builder->where($this->getKeyName(), $this->getKey());\n\n return $builder->update(array(\n $builder->getModel()->getMergedAtColumn() => $to->freshTimestamp(),\n $builder->getModel()->getMergedToColumn() => Mergeable::getMergeToId($to)\n ));\n });\n }", "title": "" }, { "docid": "4873053a275ccf6ff7057963e8266981", "score": "0.47403133", "text": "public function arrayMergeKeepsIndexesAfterMerge() {}", "title": "" }, { "docid": "a7cde9578092c7a5133df51aa9f40d6f", "score": "0.45854563", "text": "function slider_calculation_merge_tags( $merge_tags, $form_id, $fields, $element_id ) {\n\n\t\t// check the type of merge tag dropdown\n\t\tif ( 'field_calculation_formula' != $element_id ) {\n\t\t\treturn $merge_tags;\n\t\t}\n\n\t\tforeach ( $fields as $field ) {\n\n\t\t\t// check the field type as we only want to generate merge tags for list fields\n\t\t\tif ( 'range' != $field->get_input_type() ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$merge_tags[] = array( 'label' => $field->label, 'tag' => '{' . $field->label . ':' . $field->id . '}' );\n\n\t\t}\n\n\t\treturn $merge_tags;\n\t}", "title": "" }, { "docid": "de98c78d4fdd6d92aab633baf28d5232", "score": "0.45608124", "text": "public function merge_all_scripts()\n {\n }", "title": "" }, { "docid": "d2989c01c4e2ff54e410d3e2278132fb", "score": "0.45529583", "text": "function AggregateListRow() {\n\t}", "title": "" }, { "docid": "8bb37140b005fa41a37aef3680c38ecd", "score": "0.45466265", "text": "function timespan_merge() {\n \n\n $this->showDebug($this->merge, __FUNCTION__ . \"() <br> this->merge start of function\" );\n $this->showDebug($this->from_date, __FUNCTION__ . \"() <br> this->from_date is below\" );\n\t\t$this->showDebug($this->to_date, __FUNCTION__ . \"() <br> this->to_date is below\" );\n $this->showDebug($this->only_date, __FUNCTION__ . \"() <br> this->only_date\" );\n \n $count = 1;\n\t\t//if (isset($this->only_date[$this->OP_ID])){\n\t\t\t//\t$this->merge[$this->OP_ID] = $this->only_date[$this->OP_ID];\n\n\t\t//}else{\n\t\t\t\tforeach ($this->from_date as $key => $value) {\n\t\t\t\t \n\t\t\t\t\t\tif ( isset($this->to_date[$key]['threshold']) && $this->to_date[$key]['threshold'] !=\"\" ){\n\t\t\t\t\t\t\t$this->merge[$key] = $value['threshold'] . \"-\" . $this->to_date[$key]['threshold'];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t/* TODO: When does this execute? March 8, 2016\n\t\t\t\t\t\t\techo \"There is no 'to_date'\"; */\n\t\t\t\t\t\t\tif ($this->from_date[$key]['thresholdType']==\"parsedDate>=\"){\n\t\t\t\t\t\t\t\t@ $this->merge[$key] = $value['threshold'] . \"-\" . '999999999999';\n\t\t\t\t\t\t\t\t $this->to_date[$key]['threshold']= '999999999999';\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//Only 1 date\n\t\t\t\tforeach ($this->only_date as $key => $value) {\n\t\t\t\t\t\n\t\t\t\t\t$newKey = $this->calculateArrayKey($this->merge,$key);\n\t\t\t\t\t\n\t\t\t\t\t $this->merge[$newKey] = $value['threshold'] . \"-\" . $value['threshold'];\n\t\t\t\t\t/*\n\t\t\t\t\tif (isset($this->merge[$key])){\n\t\t\t\t\t\t$this->merge[$count . \"_\" . $key] = $value . \"-\" . $value;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->merge[$key] = $value . \"-\" . $value;\n\t\t\t\t\t}\n\t\t\t\t\t*/\n\t\t\t\t}\n\t\t\tasort($this->merge);\n\n $this->showDebug($this->merge , \"End of \" . __FUNCTION__ . \"(). variable this->merge is below<br>\");\n \n\t\t \n }", "title": "" }, { "docid": "a5fba832a67e1a53d80473416551bea0", "score": "0.45427155", "text": "function copyPhpExcelWorkSheetRows ($sheet, $srcRow, $dstRow, $height, $width) {\r\r\n for ($row = 0;$row<$height;$row ++) {\r\r\n // cell format and value replication\r\r\n for ($col = 0;$col<$width;$col ++) {\r\r\n $cell = $sheet->getCellByColumnAndRow ($col, $srcRow + $row);\r\r\n $style = $sheet->getStyleByColumnAndRow ($col, $srcRow + $row);\r\r\n $dstCell = PHPExcel_Cell :: stringFromColumnIndex ($col). (string) ($dstRow + $row);\r\r\n $sheet->setCellValue ($dstCell, $cell->getValue ());\r\r\n $sheet->duplicateStyle ($style, $dstCell);\r\r\n }\r\r\n // Duplicate row height.\r\r\n $h = $sheet->getRowDimension ($srcRow + $row)->getRowHeight ();\r\r\n $sheet->getRowDimension ($dstRow + $row)->setRowHeight ($h);\r\r\n }\r\r\n // duplicate cell merge\r\r\n //-$mergeCell = \"AB12: AC15\" Restored by adding lines only to those in the replication range.\r\r\n //-$merge = \"AB16: AC19\"\r\r\n foreach ($sheet->getMergeCells () as $mergeCell) {\r\r\n $mc = explode (\":\", $mergeCell);\r\r\n $col_s = preg_replace (\"/ [0-9] * /\", \"\", $mc [0]);\r\r\n $col_e = preg_replace (\"/ [0-9] * /\", \"\", $mc [1]);\r\r\n $row_s = ((int) preg_replace (\"/ [A-Z] * /\", \"\", $mc [0]))-$srcRow;\r\r\n $row_e = ((int) preg_replace (\"/ [A-Z] * /\", \"\", $mc [1]))-$srcRow;\r\r\n // If it is a line range to copy to.\r\r\n if (0<= $row_s&&$row_s<$height) {\r\r\n $merge = $col_s. (string) ($dstRow + $row_s). \":\". $col_e. (string) ($dstRow + $row_e);\r\r\n $sheet->mergeCells ($merge);\r\r\n }\r\r\n }\r\r\n }", "title": "" }, { "docid": "a09d8175395446ba2980031352059b7f", "score": "0.45409438", "text": "protected function addOnlyMerged(Builder $builder)\n {\n $builder->macro('onlyMerged', function(Builder $builder)\n {\n $this->remove($builder);\n\n $builder->getQuery()->whereNotNull($builder->getModel()->getQualifiedMergedAtColumn());\n\n return $builder;\n });\n }", "title": "" }, { "docid": "4772f257c01491affebe9e6d08c985bb", "score": "0.4458354", "text": "public function merge(MergeAlbumsRequest $request, Merge $merge): void\n\t{\n\t\t$merge->do($request->album(), $request->albums());\n\t}", "title": "" }, { "docid": "2664155e169c77bae2c5d0ca921e9158", "score": "0.44551864", "text": "public function merge_with(&$other)\n {\n }", "title": "" }, { "docid": "c57524f045e256bc7298df3dcc8223c0", "score": "0.44356203", "text": "public function applyFormat($format) {\n\t\tif ($this->isSupervisor) {\n\t\t\t$range = $this->getSelectedCells();\n\n\t\t\t// Uppercase coordinate\n\t\t\t$range = strtoupper($range);\n\n\t\t\t// Is it a cell range or a single cell?\n\t\t\tif (strpos($range, ':') === false) {\n\t\t\t\t$rangeA = $range;\n\t\t\t\t$rangeB = $range;\n\t\t\t} else {\n\t\t\t\t$a = explode(':', $range);\n\t\t\t\t$rangeA = $a[0];\n\t\t\t\t$rangeB = $a[1];\n\t\t\t}\n\n\t\t\t// Calculate range outer borders\n\t\t\t$rangeStart = Coordinates::parse($rangeA);\n\t\t\t$rangeEnd = Coordinates::parse($rangeB);\n\n\t\t\t// SIMPLE MODE:\n\t\t\t// Selection type, inspect\n\t\t\tif (1 == preg_match('/^[A-Z]+1:[A-Z]+1048576$/sD', $range)) {\n\t\t\t\t$selectionType = 'COLUMN';\n\t\t\t} elseif (1 == preg_match('/^A[0-9]+:XFD[0-9]+$/sD', $range)) {\n\t\t\t\t$selectionType = 'ROW';\n\t\t\t} else {\n\t\t\t\t$selectionType = 'CELL';\n\t\t\t}\n\n\t\t\t// First loop through columns, rows, or cells to find out which styles\n\t\t\t// are affected by this operation\n\t\t\t$oldXfIndexes = /*. (boolean[int]) .*/ array();\n\t\t\tswitch ($selectionType) {\n\t\t\t\tcase 'COLUMN':\n//\t\t\t\t\tfor ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) {\n//\t\t\t\t\t\t$oldXfIndexes[$this->getActiveSheet()\n//\t\t\t\t\t\t\t\t->getColumnDimensionByColumn($col)\n//\t\t\t\t\t\t\t\t->getXfIndex()] = true;\n//\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ROW':\n//\t\t\t\t\tfor ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) {\n//\t\t\t\t\t\tif ($this->getActiveSheet()->getRowDimension($row)->getXfIndex() === null) {\n//\t\t\t\t\t\t\t$oldXfIndexes[0] = true; // row without explicit style should be formatted based on default style\n//\t\t\t\t\t\t} else {\n//\t\t\t\t\t\t\t$oldXfIndexes[$this->getActiveSheet()->getRowDimension($row)->getXfIndex()] = true;\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'CELL':\n\t\t\t\t\tfor ($col = $rangeStart->getColumnNumber(); $col <= $rangeEnd->getColumnNumber(); ++$col) {\n\t\t\t\t\t\tfor ($row = $rangeStart->getRow(); $row <= $rangeEnd->getRow(); ++$row) {\n\t\t\t\t\t\t\t$oldXfIndexes[$this->getActiveSheet()->getCellByColumnAndRow($col, $row)->getXfIndex()] = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: throw new \\RuntimeException();\n\t\t\t}\n\n\t\t\t// clone each of the affected styles, apply the style array, and add\n\t\t\t// the new styles to the workbook\n\t\t\t$workbook = $this->workbook;\n\t\t\t$newXfIndexes = /*. (int[int]) .*/ array();\n\t\t\tforeach ($oldXfIndexes as $oldXfIndex => $dummy) {\n\t\t\t\t$style = $workbook->getCellXfByIndex($oldXfIndex);\n\t\t\t\t$newStyle = clone $style;\n\t\t\t\t$newStyle->applyFormat($format);\n\n\t\t\t\t$existingStyle = $this->applyFormat_searchEqualXf($newStyle);\n\t\t\t\tif ($existingStyle !== NULL) {\n\t\t\t\t\t// there is already such cell Xf in our collection\n\t\t\t\t\t$newXfIndexes[$oldXfIndex] = $existingStyle->getIndex();\n\t\t\t\t} else {\n\t\t\t\t\t// we don't have such a cell Xf, need to add\n\t\t\t\t\t$workbook->addCellXf($newStyle);\n\t\t\t\t\t$newXfIndexes[$oldXfIndex] = $newStyle->getIndex();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Loop through columns, rows, or cells again and update the XF index\n\t\t\tswitch ($selectionType) {\n\t\t\t\tcase 'COLUMN':\n//\t\t\t\t\tfor ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) {\n//\t\t\t\t\t\t$columnDimension = $this->getActiveSheet()->getColumnDimensionByColumn($col);\n//\t\t\t\t\t\t$oldXfIndex = $columnDimension->getXfIndex();\n//\t\t\t\t\t\t$columnDimension->setXfIndex($newXfIndexes[$oldXfIndex]);\n//\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ROW':\n//\t\t\t\t\tfor ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) {\n//\t\t\t\t\t\t$rowDimension = $this->getActiveSheet()->getRowDimension($row);\n//\t\t\t\t\t\t$oldXfIndex = $rowDimension->getXfIndex() === null ?\n//\t\t\t\t\t\t\t\t0 : $rowDimension->getXfIndex(); // row without explicit style should be formatted based on default style\n//\t\t\t\t\t\t$rowDimension->setXfIndex($newXfIndexes[$oldXfIndex]);\n//\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'CELL':\n\t\t\t\t\tfor ($col = $rangeStart->getColumnNumber(); $col <= $rangeEnd->getColumnNumber(); ++$col) {\n\t\t\t\t\t\tfor ($row = $rangeStart->getRow(); $row <= $rangeEnd->getRow(); ++$row) {\n\t\t\t\t\t\t\t$cell = $this->getActiveSheet()->getCellByColumnAndRow($col, $row);\n\t\t\t\t\t\t\t$oldXfIndex = $cell->getXfIndex();\n\t\t\t\t\t\t\t$cell->setXfIndex($newXfIndexes[$oldXfIndex]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: throw new \\RuntimeException();\n\t\t\t}\n\t\t} else {\n\t\t\t$this->setFormatCode($format);\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "30e24164469de26186383b322b37fb26", "score": "0.4403717", "text": "function merge_rows($arr){\r\n $arr_new = array();\r\n $cur_row = '';\r\n $next_row = '';\r\n $cur_role = '';\r\n $next_role = '';\r\n $j=0;\r\n $preserve_row = '';\r\n for($i=0; $i < count($arr); $i++){\r\n //space in option is preserved\r\n if(get_role_by_row($arr[$i]) == 'option'){\r\n continue;\r\n }else{\r\n $arr[$i] = str_replace(' ', '', $arr[$i]);\r\n }\r\n }\r\n for($i=0; $i < count($arr)-1; $i++){\r\n //$cur_row = $arr[$i];\r\n //$next_row = $arr[$i+1];\r\n //' ' is reserved for option recognize, and is no use for row merge.\r\n $cur_row = $arr[$i];\r\n $next_row = $arr[$i+1];\r\n $next_next_row = get_row_by_index($arr, $i+2);\r\n $cur_role = get_role_by_row($cur_row);\r\n $next_role = get_role_by_row($next_row);\r\n //echo 'in merge rows:'.$cur_row.'['.$cur_role.']<br>';\r\n //如果本行是unknown,不论下一行是否unknown,将这两行合并,并将preserve_row加入arr_new.\r\n if($cur_role == \"unknown\"){\r\n if($next_role == \"unknown\"){ \r\n //if next row and next-next row can merge, it will be considered first.\r\n //1.\r\n //<1>、\r\n //【答案】 A\r\n if(get_role_by_row($next_row.$next_next_row) != \"unknown\"){\r\n if($preserve_row != ''){\r\n $arr_new[$j++] = $preserve_row;\r\n \t echo_notice('insert preserve_row:'.$preserve_row, 'merge_rows1');\r\n $preserve_row = '';\r\n }\r\n $preserve_row = $preserve_row.$next_row.$next_next_row;\r\n $i+=2; \r\n }\r\n else \r\n if(get_role_by_row($cur_row.$next_row) != \"unknown\"){\r\n if($preserve_row != ''){\r\n $arr_new[$j++] = $preserve_row;\r\n \t echo_notice('insert preserve_row:'.$preserve_row, 'merge_rows1');\r\n $preserve_row = '';\r\n }\r\n $preserve_row = $preserve_row.$cur_row.$next_row;\r\n $i++;\r\n }else{\r\n $preserve_row = $preserve_row.$cur_row;\r\n }\r\n }else{\r\n //$preserve_row is inserted before known row.\r\n \tif(get_role_by_row($cur_row.$next_row) != \"unknown\")\r\n \t{\r\n \t\tif($preserve_row != ''){\r\n $arr_new[$j++] = $preserve_row;\r\n echo_notice('insert preserve_row:'.$preserve_row, 'merge_rows2');\r\n $preserve_row = '';\r\n \t\t}\r\n \t\t//$arr_new[$j++] = $cur_row.$next_row;\r\n \t\t$preserve_row = $preserve_row.$cur_row.$next_row;\r\n \t\t$i++;\r\n \t}\r\n /*\r\n \t//答案:\r\n\t\t\t\t//A2.B\r\n \tif(($next_role == \"option\") && (get_role_by_row($cur_row.$next_row == \"answer\")))\r\n \t{\r\n \t\tif($preserve_row != ''){\r\n \t\t\t$arr_new[$j++] = $preserve_row;\r\n \techo_error('unknown row:'.$preserve_row, 'merge_rows');\r\n \t\t}\r\n \t\t$arr_new[$j++] = $cur_row.$next_row;\r\n \t\t$preserve_row = '';\r\n \t\t$i++;\r\n \t}\r\n \t*/\r\n \t/*\r\n \telse\r\n \t//141.\r\n \t//[答案]:C\r\n \tif(($next_role == \"answer\") && (get_role_by_row($cur_row.$next_row == \"answer\"))){\r\n \t if($preserve_row != ''){\r\n \t $arr_new[$j++] = $preserve_row;\r\n \t echo_error('unknown row:'.$preserve_row, 'merge_rows');\r\n \t }\r\n \t $arr_new[$j++] = $cur_row.$next_row;\r\n \t $preserve_row = '';\r\n \t $i++;\r\n \t}*/\r\n \telse{\r\n \t\tif($preserve_row != ''){\r\n $arr_new[$j++] = $preserve_row.$cur_row;\r\n echo_notice('insert preserve_row:'.$preserve_row, 'merge_rows2');\r\n $preserve_row = '';\r\n \t\t}\r\n \t\t//$arr_new[$j++] = $cur_row.$next_row;\r\n \t\t//$preserve_row = $preserve_row.$next_row;\r\n \t}\r\n }\r\n /*\r\n echo '<br><br>';\r\n echo 'current row:'.$cur_row.'['.$cur_role.']<br>';\r\n echo 'next row:'.$next_row.'['.$next_role.']<br>';\r\n echo 'merge role: '.$cur_row.$next_row.'['.get_role_by_row($cur_row.$next_row).']<br>';\r\n echo 'preserve_row:'.$preserve_row.'<br>';\r\n */\r\n }\r\n else\r\n //rows[unknown|analysis] follow analysis row will be add to current analysis.\r\n //[解析]:甲企业应纳税额=10000×60%×4=24000(元)\r\n //乙企业应纳税额=10000×40%×4=16000(元)\r\n //[该题针对“城镇土地使用税应纳税额的计算”知识点进行考核]\r\n //148.\r\n if(($cur_role == 'analysis') || ($cur_role == 'question') || ($cur_role == 'option')){\r\n //echo '$cur_row'.$cur_row.'<br>';\r\n $rows_follow_analysis = $cur_row;\r\n $find_rows = false;\r\n //if next row and next-next row can merge, it will be considered first.\r\n while(($next_role == 'unknown') && (get_role_by_row($next_row.$next_next_row) == \"unknown\")){\r\n \tif($preserve_row != ''){\r\n \t\t$arr_new[$j++] = $preserve_row;\r\n \techo_notice('insert preserve_row:'.$preserve_row, 'merge_rows3');\r\n \t $preserve_row = '';\r\n \t}\r\n \t$rows_follow_analysis = $rows_follow_analysis.'\\n'.$next_row;\r\n \t//$arr_new[$j++] = $cur_row.$next_row;\r\n \t$find_rows = true;\r\n \t$i++;\r\n \tif($i >= count($arr)){\r\n \t break;\r\n \t}\r\n $next_row = get_row_by_index($arr, $i+1);\r\n $next_next_row = get_row_by_index($arr, $i+2);\r\n $next_role = get_role_by_row($next_row);\r\n //echo $next_row.'['.$next_role.']'.'<br>';\r\n }\r\n if($find_rows){\r\n $arr_new[$j++] = $rows_follow_analysis;\r\n //$rows_follow_analysis = $cur_row;\r\n $find_rows = false;\r\n }else{\r\n if($preserve_row != ''){\r\n \t\t$arr_new[$j++] = $preserve_row;\r\n \techo_notice('insert preserve_row:'.$preserve_row, 'merge_rows4');\r\n \t $preserve_row = '';\r\n \t}\r\n $arr_new[$j++] = $rows_follow_analysis; \r\n }\r\n /*\r\n echo '<br><br>';\r\n echo 'arrive here. merge'.$rows_follow_analysis.'['.$cur_role.']<br>';\r\n echo 'current row:'.$cur_row.'['.$cur_role.']<br>';\r\n echo 'next row:'.$next_row.'['.$next_role.']<br>';\r\n echo 'length:'.strlen($arr[$i]).'<br>';\r\n echo 'preserve_row:'.$preserve_row.'<br>';\r\n */\r\n }\r\n else\r\n {\r\n if($preserve_row != ''){\r\n \t//if can merge current row and preserve row(rows above)\r\n //if(get_role_by_row($preserve_row.$cur_row) != \"unknown\"){\r\n // $arr_new[$j++] = $preserve_row.$cur_row;\r\n // $preserve_row='';\r\n //}else{\r\n $arr_new[$j++] = $preserve_row;\r\n echo_notice('insert preserve_row:'.$preserve_row, 'merge_rows5');\r\n $preserve_row = $arr[$i];\r\n //}\r\n }else{\r\n \t//merge current row and next row.\r\n \t//following case not need merge.\r\n //D.港口的码头用地\r\n //141.\r\n //[答案]:C&& (get_role_by_row($cur_row.$next_row) != \"unknown\")\r\n \tif(($next_role == \"unknown\") &&\r\n \t\t\t\t\t\t(get_role_by_row($next_row.$next_next_row) == \"unknown\")){ \t\t\r\n \t$arr_new[$j++] = $arr[$i].$arr[$i+1];\r\n \t$i++;\r\n \t}else{\r\n \t\t$arr_new[$j++] = $cur_row;//$arr[$i];\r\n \t}\r\n }\r\n /*\r\n echo '<br><br>';\r\n echo 'arrive here. insert'.$arr[$i].'['.$cur_role.']<br>';\r\n echo 'current row:'.$cur_row.'['.$cur_role.']<br>';\r\n echo 'next row:'.$next_row.'['.$next_role.']<br>';\r\n echo 'length:'.strlen($arr[$i]).'<br>';\r\n echo 'preserve_row:'.$preserve_row.'<br>';\r\n */\r\n }\r\n }\r\n //echo '<br><br>';\r\n //echo 'i:'.$i.'<br>';\r\n //echo 'count($arr):'.count($arr).'<br>';\r\n if($i < count($arr)){\r\n\t $cur_row = $arr[$i];\r\n\t $cur_role = get_role_by_row($cur_row);\r\n //echo 'current row:'.$cur_row.'['.$cur_role.']<br>';\r\n\t if($cur_role != \"unknown\"){\r\n\t if($preserve_row != ''){\r\n\t $arr_new[$j++] = $preserve_row;\r\n\t }\r\n\t $arr_new[$j++] = $cur_row ;\r\n\t }else{\r\n\t $preserve_row = $preserve_row.$cur_row;\r\n\t $arr_new[$j++] = $preserve_row;\r\n\t }\r\n }else{\r\n \tif($preserve_row != ''){\r\n \t\t$arr_new[$j++] = $preserve_row;\r\n \t}\r\n }\r\n return $arr_new;\r\n}", "title": "" }, { "docid": "5ffa2978a02aa05c8df55cdf2cfba5fd", "score": "0.43614304", "text": "function generarReporteExcelCalificacionvspremarcado($arregloCompleto)\r\n{\r\n $libro = new PhpOffice\\PhpSpreadsheet\\Spreadsheet();\r\n //Reporte de indicadores I1\r\n $libro->getActiveSheet()->mergeCells('A1:H1');\r\n $libro->getActiveSheet()->getStyle('A1:H2')->getFont()->setBold(true);\r\n $hoja = $libro->getActiveSheet();\r\n $libro->getSheet(0)->getColumnDimension('A')->setAutoSize(true);\r\n $libro->getSheet(0)->getColumnDimension('B')->setAutoSize(true);\r\n $libro->getSheet(0)->getColumnDimension('C')->setAutoSize(true);\r\n $libro->getSheet(0)->getColumnDimension('D')->setAutoSize(true);\r\n $libro->getSheet(0)->getColumnDimension('E')->setAutoSize(true);\r\n $libro->getSheet(0)->getColumnDimension('G')->setAutoSize(true);\r\n $libro->getSheet(0)->getColumnDimension('H')->setAutoSize(true);\r\n\r\n\r\n $hoja->setTitle('I1');\r\n $libro->getActiveSheet()->getStyle('A1:H2')->getFill()\r\n ->setFillType(\\PhpOffice\\PhpSpreadsheet\\Style\\Fill::FILL_SOLID)\r\n ->getStartColor()->setARGB('0070C0');\r\n $libro->getSheet(0)->getStyle('A1:H2')\r\n ->getFont()->getColor()->setARGB(\\PhpOffice\\PhpSpreadsheet\\Style\\Color::COLOR_WHITE);\r\n $hoja->setCellValue('A1', 'Calificacion vs premarcado');\r\n $hoja->setCellValue('A2', 'Dane');\r\n $hoja->setCellValue('B2', 'Colegio');\r\n $hoja->setCellValue('C2', 'Producto');\r\n $hoja->setCellValue('D2', 'Premarcado');\r\n $hoja->setCellValue('E2', 'Calificado');\r\n $hoja->setCellValue('F2', 'Distribuidor');\r\n $hoja->setCellValue('G2', 'Ciudad');\r\n $hoja->setCellValue('H2', 'Fecha de creacion');\r\n $iterador = 3;\r\n\r\n for ($i = 0; $i < count($arregloCompleto); $i++) {\r\n $hoja->setCellValue('A' . $iterador, $arregloCompleto[$i]['dane']);\r\n $hoja->setCellValue('B' . $iterador, $arregloCompleto[$i]['colegio']);\r\n for ($n = 0; $n < count($arregloCompleto[$i]['cantidad']); $n++) {\r\n $hoja->setCellValue('A' . $iterador, $arregloCompleto[$i]['dane']);\r\n $hoja->setCellValue('B' . $iterador, $arregloCompleto[$i]['colegio']);\r\n $hoja->setCellValue('C' . $iterador, $arregloCompleto[$i]['cantidad'][$n]['producto']);\r\n $hoja->setCellValue('D' . $iterador, $arregloCompleto[$i]['cantidad'][$n]['premarcado']);\r\n $hoja->setCellValue('E' . $iterador, $arregloCompleto[$i]['cantidad'][$n]['calificado']);\r\n $hoja->setCellValue('F' . $iterador, $arregloCompleto[$i]['cantidad'][$n]['distribuidor']);\r\n $hoja->setCellValue('G' . $iterador, $arregloCompleto[$i]['cantidad'][$n]['ciudad']);\r\n $hoja->setCellValue('H' . $iterador, $arregloCompleto[$i]['cantidad'][$n]['fechaCreacion']);\r\n $iterador++;\r\n }\r\n\r\n\r\n }\r\n $styleArray = [\r\n 'borders' => [\r\n 'allBorders' => [\r\n 'borderStyle' => \\PhpOffice\\PhpSpreadsheet\\Style\\Border::BORDER_THIN,\r\n 'color' => ['arg' => '000'],\r\n ],\r\n\r\n ],\r\n 'alignment' => [\r\n 'horizontal' => \\PhpOffice\\PhpSpreadsheet\\Style\\Alignment::HORIZONTAL_CENTER,\r\n ],\r\n ];\r\n\r\n $libro->getSheet(0)->getStyle('A1:H' . $iterador)->applyFromArray($styleArray);\r\n\r\n $excel = new \\PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx($libro);\r\n\r\n $excel->save('./App/public/excel/calificacionvspremarcado.xlsx');\r\n\r\n return '/excel/calificacionvspremarcado.xlsx';\r\n}", "title": "" }, { "docid": "72c84a013e27dd7827467ae611ca5094", "score": "0.43500155", "text": "public function extend(Builder $builder)\n {\n foreach ($this->extensions as $extension)\n {\n $this->{\"add{$extension}\"}($builder);\n }\n\n // $builder->onDelete(function(Builder $builder)\n // {\n // $column = $builder->getModel()->getMergedAtColumn();\n\n // return $builder->update(array(\n // $column => $builder->getModel()->freshTimestampString()\n // ));\n // });\n }", "title": "" }, { "docid": "e57df452cf2c5cf5bff7a5beadcdac10", "score": "0.43402988", "text": "protected function merge(array $data)\n {\n foreach ($data as $value) {\n DB::connection('c2')->table($this->table->to)\n ->where($this->table->matchKeys[1], $value[$this->table->matchKeys[0]])\n ->update($this->except($value, $this->table->matchKeys[0]));\n }\n }", "title": "" }, { "docid": "e148d7ebf926f3e0c9294387672b8989", "score": "0.43264633", "text": "function merge($array1, $array2) {\n return call_user_func_array(\"array_merge\", array_merge(array($this->a), func_get_args()));\n }", "title": "" }, { "docid": "2ccb1f659a80caf61707376f56404d6a", "score": "0.43252468", "text": "function sum_column($sheet, $endrrow, $endrow1, $calrow, $match_column, $coln, $highestRow, $value, $rowno)\r\n {\r\n if ($value == '') {\r\n // $rowno=$rowno+1;\r\n $sheet->setCellValue($coln . '1', \"=sum(\" . $coln . \"$calrow:\" . $coln . \"$highestRow)\");\r\n $cell = $sheet->getCell($coln . '1')->getCalculatedValue();\r\n $sheet->setCellValue($coln . '2', \"=(\" . $coln . \"$rowno<>\" . $coln . \"1)\");\r\n $cell1 = $sheet->getCell($coln . '2')->getCalculatedValue();\r\n return $cell1;\r\n } else {\r\n $sheet->setCellValue($coln . $endrrow, \"=sumif(\" . $match_column . $calrow . \":\" . $match_column . \"$highestRow\" . \",\" . '\"' . $value . '\"' . \",\" . $coln . \"$calrow:\" . $coln . \"$highestRow)\");\r\n // echo $coln.$endrrow.\"<br>\";\r\n $cell = $sheet->getCell($coln . $endrrow)->getCalculatedValue();\r\n $sheet->setCellValue($coln . $endrow1, \"=(\" . $coln . \"$rowno<>\" . $coln . \"$endrrow)\");\r\n // echo $coln.$endrow1.\"<br>\";\r\n $cell1 = $sheet->getCell($coln . $endrow1)->getCalculatedValue();\r\n return $cell1;\r\n }\r\n }", "title": "" }, { "docid": "7c84f77e8e9f478dfae4da4bfeafed32", "score": "0.43057093", "text": "function MyEvents_CellMethods_Init()\n {\n $this->CellMethods=\n array_merge\n (\n array\n (\n \"Event_Date_Span_Cell\" => TRUE,\n \"Event_Inscriptions_Date_Span_Cell\" => TRUE,\n \"NoOfInscriptionsCell\" => TRUE,\n \"Event_PreInscriptions_DateSpan\" => TRUE,\n \"Event_PreInscriptions_Status\" => TRUE,\n \"Events_Status_Cell\" => TRUE,\n \"Event_Title_Show\" => TRUE,\n \"Event_Period_Show\" => TRUE,\n \"Event_Place_Show\" => TRUE,\n \"Event_Inscriptions_Period_Show\" => True,\n \"Event_Inscription_Action\" => True,\n )\n );\n }", "title": "" }, { "docid": "1ad5a7e0dea66e97d5a870060d49c8a1", "score": "0.42984742", "text": "function populate(){\r\n\r\n $phpExcel = PHPExcel_IOFactory::load(\"test.xlsx\");\r\n\r\n $reserved_day = substr($this->data, 5, 5); //set the day for reservation\r\n $reserved_hour = substr($this->data,11,2); //set the hour for reservation\r\n\r\n //check the available hours\r\n foreach($this->hours as $cell_number => $value){ //extract the cell number\r\n $working_hours = substr($value,0,2); // extract only the hour without the minutes\r\n if($reserved_hour == $working_hours){ //check if the requested hour is in the working hours,\r\n //and extract the key=cell number, the row number\r\n $row = $cell_number;\r\n settype($row, \"string\");\r\n }\r\n }\r\n\r\n //check the date\r\n foreach($this->columns as $zi){\r\n $value = $phpExcel->getActiveSheet()->getCell($zi)->getValue(); //get the value of the working days\r\n if($reserved_day == $value){ //if work day is the same with the selected day\r\n $cell = substr($zi,0,1); //get the column id\r\n $cell .= $row; //create the cell number, concat the row with column,\r\n //to fill the apropiate day and hour selected\r\n\r\n\r\n //check if the cell is empty\r\n $cell_value = $phpExcel->getActiveSheet()->getCell($cell)->getValue();\r\n if(empty($cell_value)){ //if cell is empty, add the name and number of persons\r\n $phpExcel->setActiveSheetIndex(0)\r\n ->setCellValue($cell, \"{$this->nume}, {$this->nr}\\n\");\r\n $message = \"Message received! Thank you!\";\r\n echo \"<script type='text/javascript'>alert('$message');</script>\";\r\n }else{\r\n\r\n //check the total available numbers\r\n preg_match_all($this->regex, $cell_value, $this->matches, PREG_PATTERN_ORDER);\r\n foreach($this->matches[0] as $val){\r\n $this->total_number += $val; //sum all the previous reservations numbers of people\r\n }\r\n\r\n $this->total_number += $this->nr;\r\n\r\n if($this->total_number < $this->max_number){ //check the current sum number\r\n //with the max available number\r\n\r\n //add the name and number in the proper cell\r\n $phpExcel->setActiveSheetIndex(0)\r\n ->setCellValue($cell, \"$cell_value {$this->nume}, {$this->nr}\");\r\n //reservation completed\r\n $message = \"Message received! Thank you!\";\r\n echo \"<script type='text/javascript'>alert('$message');</script>\";\r\n }else{\r\n //error, not any available tables\r\n $message = \"Maximum number of 12 people, reached for this hour! Please check another hour!\";\r\n echo \"<script type='text/javascript'>alert('$message');</script>\";\r\n }\r\n }\r\n }\r\n }\r\n\r\n if($this->readyToRead(__FILE__)){\r\n $file = PHPExcel_IOFactory::createWriter($phpExcel, \"Excel2007\");\r\n $file->save('test.xlsx');\r\n }else{\r\n $message = \"Failed to send the message! Check again later!\";\r\n echo \"<script type='text/javascript'>alert('$message');</script>\";\r\n error_log(\"File is open, unable to update!\", 3, \"my-errors.log\");\r\n die();\r\n }\r\n }", "title": "" }, { "docid": "4874d558b21fcc14c8ec13edcb749516", "score": "0.4288345", "text": "function cellColor($cells,$color){\n\n global $objPHPExcel;\n\n\n\n $objPHPExcel->getActiveSheet()->getStyle($cells)->getFill()->applyFromArray(array(\n\n 'type' => PHPExcel_Style_Fill::FILL_SOLID,\n\n 'startcolor' => array(\n\n 'rgb' => $color\n\n )\n\n ));\n\n}", "title": "" }, { "docid": "4af0f45a6a1709edb1b0f65c183f9dac", "score": "0.42835245", "text": "protected function addWithMerged(Builder $builder)\n {\n $builder->macro('withMerged', function(Builder $builder)\n {\n $this->remove($builder);\n\n return $builder;\n });\n }", "title": "" }, { "docid": "f88cbfc62eb1c19e79f13bf69d365532", "score": "0.42779514", "text": "function merged_output()\n\t{\n\t\treturn $this->get_conflicts_content();\n\t}", "title": "" }, { "docid": "5842142f351db56ccbfef8335799d49e", "score": "0.42775738", "text": "public function registerEvents(): array\n {\n return [\n AfterSheet::class => function(AfterSheet $event) {\n // 合併單元格\n $event->sheet->getDelegate()->setMergeCells(['A1:J1']);\n // 凍結窗格\n $event->sheet->getDelegate()->freezePane('A3');\n // 設定單元格內容居中\n $event->sheet->getDelegate()->getStyle('A1')->getAlignment()->setHorizontal(\\PhpOffice\\PhpSpreadsheet\\Style\\Alignment::HORIZONTAL_CENTER);\n // 定義列寬度\n $widths = ['A' => 20, 'B' => 20, 'C' => 20, 'D' => 20];\n foreach ($widths as $k => $v) {\n // 設定列寬度\n $event->sheet->getDelegate()->getColumnDimension($k)->setWidth($v);\n }\n },\n ];\n }", "title": "" }, { "docid": "29fe3553fdafd13ac42a0b59a5b586c5", "score": "0.42754576", "text": "function AggregateListRowValues() {\r\n\t}", "title": "" }, { "docid": "42d11f3e15febf351868ceca0c78c30f", "score": "0.42580783", "text": "function AggregateListRowValues() {\n\t}", "title": "" }, { "docid": "42d11f3e15febf351868ceca0c78c30f", "score": "0.42580783", "text": "function AggregateListRowValues() {\n\t}", "title": "" }, { "docid": "42d11f3e15febf351868ceca0c78c30f", "score": "0.42580783", "text": "function AggregateListRowValues() {\n\t}", "title": "" }, { "docid": "42d11f3e15febf351868ceca0c78c30f", "score": "0.42580783", "text": "function AggregateListRowValues() {\n\t}", "title": "" }, { "docid": "5b610f167c0d63272178d6f4dcd34851", "score": "0.42427525", "text": "public function merge( Collection $merger )\n\t{\n\t\tforeach( $merger as $element )\n\t\t\t$this->add( $element );\n\t}", "title": "" }, { "docid": "2aa1611887b501588e2f72abf58de12d", "score": "0.42405275", "text": "function export_form_a(){\n\t\t$this->load->library('excel');\n\t\t//activate worksheet number 1\n\t\t$this->excel->setActiveSheetIndex(0);\n\t\t//name the worksheet\n\t\t$this->excel->getActiveSheet()->setTitle('FORM A');\n \n #reggion header\n $this->excel->getActiveSheet()->setCellValue('A1', \"KOP SURAT LEMBAGA KESEJAHTERAAN SOSIAL ANAK (LKSA)\");\n $this->excel->getActiveSheet()->mergeCells('A1:W1');\n $this->excel->getActiveSheet()->getStyle('A1:W1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->setCellValue('G2', \"PROPOSAL\");\n $this->excel->getActiveSheet()->setCellValue('G3', \"FORM A\");\n\n $this->excel->getActiveSheet()->getStyle('A1:W1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getRowDimension('7')->setRowHeight(105);\n $this->excel->getActiveSheet()->setCellValue('A4', \"KETERANGAN ANAK BINAAN LKSA\");\n $this->excel->getActiveSheet()->mergeCells('A4:W4');\n $this->excel->getActiveSheet()->getStyle('A4:W4')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('A4:W4')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n\n $this->excel->getActiveSheet()->setCellValue('A6', \"NO\");\n $this->excel->getActiveSheet()->mergeCells('A6:A7');\n $this->excel->getActiveSheet()->getStyle('A6:A7')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('A6:A7')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->setCellValue('B6', \"Provinsi\");\n $this->excel->getActiveSheet()->mergeCells('B6:B7');\n $this->excel->getActiveSheet()->getStyle('B6:B7')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('B6:B7')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); \n $this->excel->getActiveSheet()->setCellValue('C6', \"Kab/ Kota\");\n $this->excel->getActiveSheet()->mergeCells('C6:C7');\n $this->excel->getActiveSheet()->getStyle('C6:C7')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('C6:C7')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); \n $this->excel->getActiveSheet()->getStyle('C6:C7')->getAlignment()->setWrapText(true); \n $this->excel->getActiveSheet()->setCellValue('D6', \"Kecamatan\");\n $this->excel->getActiveSheet()->mergeCells('D6:D7');\n $this->excel->getActiveSheet()->getStyle('D6:D7')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('D6:D7')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getColumnDimension('D')->setWidth(12); \n $this->excel->getActiveSheet()->setCellValue('E6', \"Desa/ Kelurahan\");\n $this->excel->getActiveSheet()->mergeCells('E6:E7');\n $this->excel->getActiveSheet()->getStyle('E6:E7')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('E6:E7')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); \n $this->excel->getActiveSheet()->getStyle('E6:E7')->getAlignment()->setWrapText(true); \n $this->excel->getActiveSheet()->getColumnDimension('E')->setWidth(11);\n $this->excel->getActiveSheet()->setCellValue('F6', \"Alamat LKSA\");\n $this->excel->getActiveSheet()->mergeCells('F6:F7');\n $this->excel->getActiveSheet()->getStyle('F6:F7')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('F6:F7')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('F6:F7')->getAlignment()->setWrapText(true); \n $this->excel->getActiveSheet()->setCellValue('G6', \"Nama LKSA\");\n $this->excel->getActiveSheet()->mergeCells('G6:G7');\n $this->excel->getActiveSheet()->getStyle('G6:G7')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('G6:G7')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('G6:G7')->getAlignment()->setWrapText(true); \n $this->excel->getActiveSheet()->setCellValue('H6', \"Identitas Anak\");\n $this->excel->getActiveSheet()->mergeCells('H6:Y6');\n $this->excel->getActiveSheet()->getStyle('H6:H6')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('H6:H6')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); \n $this->excel->getActiveSheet()->setCellValue('H7', \"Nama Anak\");\n $this->excel->getActiveSheet()->mergeCells('H7:H7');\n $this->excel->getActiveSheet()->getStyle('H7:H7')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('H7:H7')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); \n $this->excel->getActiveSheet()->getStyle('H7:H7')->getAlignment()->setWrapText(true); \n $this->excel->getActiveSheet()->setCellValue('I7', \"No Induk Kependudukan\");\n $this->excel->getActiveSheet()->mergeCells('I7:I7');\n $this->excel->getActiveSheet()->getStyle('I7:I7')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('I7:I7')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); \n $this->excel->getActiveSheet()->getStyle('I7:I7')->getAlignment()->setWrapText(true);\n $this->excel->getActiveSheet()->setCellValue('J7', \"jenis Kelamin\");\n $this->excel->getActiveSheet()->mergeCells('J7:J7');\n $this->excel->getActiveSheet()->getStyle('J7:J7')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('J7:J7')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); \n $this->excel->getActiveSheet()->getStyle('J7:J7')->getAlignment()->setWrapText(true);\n $this->excel->getActiveSheet()->setCellValue('K7', \"Tempat Lahir\");\n $this->excel->getActiveSheet()->mergeCells('K7:K7');\n $this->excel->getActiveSheet()->getStyle('K7:K7')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('K7:K7')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); \n $this->excel->getActiveSheet()->getStyle('K7:K7')->getAlignment()->setWrapText(true);\n $this->excel->getActiveSheet()->setCellValue('L7', \"Tangal Lahir \\n \\n \\n Tgl/Bln/Thn\");\n $this->excel->getActiveSheet()->mergeCells('L7:L7');\n $this->excel->getActiveSheet()->getStyle('L7:L7')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('L7:L7')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); \n $this->excel->getActiveSheet()->getStyle('L7:L7')->getAlignment()->setWrapText(true);\n $this->excel->getActiveSheet()->getColumnDimension('L')->setWidth(20);\n $this->excel->getActiveSheet()->setCellValue('M7', \"Umur\");\n $this->excel->getActiveSheet()->mergeCells('M7:M7');\n $this->excel->getActiveSheet()->getStyle('M7:M7')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('M7:M7')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); \n $this->excel->getActiveSheet()->setCellValue('N7', \"Jenis Masalah\");\n $this->excel->getActiveSheet()->mergeCells('N7:N7');\n $this->excel->getActiveSheet()->getStyle('N7:N7')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('N7:N7')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); \n $this->excel->getActiveSheet()->getStyle('N7:N7')->getAlignment()->setWrapText(true);\n $this->excel->getActiveSheet()->setCellValue('O7', \"Keadaan Orang Tua\");\n $this->excel->getActiveSheet()->mergeCells('O7:O7');\n $this->excel->getActiveSheet()->getStyle('O7:O7')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('O7:O7')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('O7:O7')->getAlignment()->setWrapText(true); \n $this->excel->getActiveSheet()->setCellValue('P7', \"Apakah Anak Memiliki Akte Kelahiran Dari Kantor Catatan Sipil? Apakah Saya Bisa Melihatnya?\");\n $this->excel->getActiveSheet()->mergeCells('P7:P7');\n $this->excel->getActiveSheet()->getStyle('P7:P7')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('P7:P7')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); \n $this->excel->getActiveSheet()->getStyle('P7:P7')->getAlignment()->setWrapText(true);\n $this->excel->getActiveSheet()->getColumnDimension('P')->setWidth(20);\n $this->excel->getActiveSheet()->setCellValue('Q7', \"Dimanakah Anak Tinggal?\\n \\n \\n (1.Panti) (2.Keluarga)\");\n $this->excel->getActiveSheet()->mergeCells('Q7:Q7');\n $this->excel->getActiveSheet()->getStyle('Q7:Q7')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('Q7:Q7')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); \n $this->excel->getActiveSheet()->getStyle('Q7:Q7')->getAlignment()->setWrapText(true);\n $this->excel->getActiveSheet()->getColumnDimension('Q')->setWidth(20);\n $this->excel->getActiveSheet()->setCellValue('R7', \"Siapa Yang Mengasuh Anak Sebelum Masuk Panti\");\n $this->excel->getActiveSheet()->mergeCells('R7:R7');\n $this->excel->getActiveSheet()->getStyle('R7:R7')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('R7:R7')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); \n $this->excel->getActiveSheet()->getStyle('R7:R7')->getAlignment()->setWrapText(true);\n $this->excel->getActiveSheet()->getColumnDimension('R')->setWidth(20); \n $this->excel->getActiveSheet()->setCellValue('S7', \"Alasan Masuk Panti\");\n $this->excel->getActiveSheet()->mergeCells('S7:S7');\n $this->excel->getActiveSheet()->getStyle('S7:S7')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('S7:S7')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); \n $this->excel->getActiveSheet()->getStyle('S7:S7')->getAlignment()->setWrapText(true);\n $this->excel->getActiveSheet()->setCellValue('T7', \"Pendidikan Saat Ini\");\n $this->excel->getActiveSheet()->mergeCells('T7:T7');\n $this->excel->getActiveSheet()->getStyle('T7:T7')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('T7:T7')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); \n $this->excel->getActiveSheet()->getStyle('T7:T7')->getAlignment()->setWrapText(true);\n $this->excel->getActiveSheet()->setCellValue('U7', \"Nama Bapak\");\n $this->excel->getActiveSheet()->mergeCells('U7:U7');\n $this->excel->getActiveSheet()->getStyle('U7:U7')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('U7:U7')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); \n $this->excel->getActiveSheet()->getStyle('U7:U7')->getAlignment()->setWrapText(true);\n $this->excel->getActiveSheet()->setCellValue('V7', \"Nama Ibu\");\n $this->excel->getActiveSheet()->mergeCells('V7:V7');\n $this->excel->getActiveSheet()->getStyle('V7:V7')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('V7:V7')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); \n $this->excel->getActiveSheet()->getStyle('V7:V7')->getAlignment()->setWrapText(true);\n $this->excel->getActiveSheet()->setCellValue('W7', \"Alamat Orang Tua\");\n $this->excel->getActiveSheet()->mergeCells('W7:W7');\n $this->excel->getActiveSheet()->getStyle('W7:W7')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('W7:W7')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('W7:W7')->getAlignment()->setWrapText(true); \n #endreggion header\n #region rowdata\n $data =$this->model->get_data_fa();\n $i \t = 8;\n $tdk_ada ='-';\n if($data != null){\n $jk =array(\"L\"=>\"1\",\"P\"=>\"2\");\n foreach($data as $row){\n $no_registrasi_santri = $row->no_registrasi;\n \n //get data orangTua\n $ayah_kandung\t= $this->model->get_data_orgtua($no_registrasi_santri,'ayah');\n if ($ayah_kandung!=null) {\n $ayah = $ayah_kandung->nama;\n }else{ \n $ayah = \"Tidak Diketahui\";\n }\n $ibu_kandung\t\t\t= $this->model->get_data_orgtua($no_registrasi_santri,'ibu');\n if ($ibu_kandung!=null) {\n $ibu = $ibu_kandung->nama;\n }else{ \n $ibu = \"Tidak Diketahui\";\n }\n\n $this->excel->getActiveSheet()->setCellValue('A'.$i, $i-7);\n $this->excel->getActiveSheet()->setCellValue('B'.$i, $tdk_ada);\n $this->excel->getActiveSheet()->setCellValue('C'.$i, $tdk_ada);\n $this->excel->getActiveSheet()->setCellValue('D'.$i, $tdk_ada);\n $this->excel->getActiveSheet()->setCellValue('E'.$i, $tdk_ada);\n $this->excel->getActiveSheet()->setCellValue('F'.$i, $row->alamat);\n $this->excel->getActiveSheet()->setCellValue('G'.$i, $row->nama_donatur);\n $this->excel->getActiveSheet()->setCellValue('H'.$i, $row->nama_lengkap);\n $this->excel->getActiveSheet()->setCellValue('I'.$i, $row->nik);\n $this->excel->getActiveSheet()->setCellValue('J'.$i, $jk[$row->jenis_kelamin]);\n $this->excel->getActiveSheet()->setCellValue('K'.$i, $row->tempat_lahir);\n $this->excel->getActiveSheet()->setCellValue('L'.$i, $row->tgl_lahir);\n $this->excel->getActiveSheet()->setCellValue('M'.$i, $row->umur);\n $this->excel->getActiveSheet()->setCellValue('N'.$i, $tdk_ada);\n $this->excel->getActiveSheet()->setCellValue('O'.$i, $tdk_ada);\n $this->excel->getActiveSheet()->setCellValue('P'.$i, $tdk_ada);\n $this->excel->getActiveSheet()->setCellValue('Q'.$i, $tdk_ada);\n $this->excel->getActiveSheet()->setCellValue('R'.$i, $tdk_ada);\n $this->excel->getActiveSheet()->setCellValue('S'.$i, $tdk_ada);\n $this->excel->getActiveSheet()->setCellValue('T'.$i, $tdk_ada);\n $this->excel->getActiveSheet()->setCellValue('U'.$i, $ayah);\n $this->excel->getActiveSheet()->setCellValue('V'.$i, $ibu);\n $this->excel->getActiveSheet()->setCellValue('W'.$i, $tdk_ada);\n \n $i++;\n }\n }\n #endregion rowdata\n\n\t\t// for($col = 'A'; $col !== 'Y'; $col++) {\n\n\t\t// $this->excel->getActiveSheet()\n\t\t// ->getColumnDimension($col)\n\t\t// ->setAutoSize(true);\n\t\t// }\n\n\t\t$styleArray = array(\n\t\t 'borders' => array(\n\t\t 'allborders' => array(\n\t\t 'style' => PHPExcel_Style_Border::BORDER_THIN\n\t\t )\n\t\t )\n\t\t);\n\t\t$styleArray2 = array(\n\t\t 'borders' => array(\n\t\t 'allborders' => array(\n\t\t 'style' => PHPExcel_Style_Border::BORDER_THICK\n\t\t )\n\t\t )\n\t\t);\n\t\t$i = $i-1;\n\t\t$cell_to = \"W\".$i;\n\t\t$this->excel->getActiveSheet()->getStyle('A6:'.$cell_to)->applyFromArray($styleArray);\n\t\t$this->excel->getActiveSheet()->getStyle('G2:G3')->applyFromArray($styleArray2);\n\t\t$this->excel->getActiveSheet()->getStyle('A1:W4')->getFont()->setBold(true);\n\t\t$this->excel->getActiveSheet()->getStyle('A4:W4')->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID);\n\t\t$this->excel->getActiveSheet()->getStyle('A4:W4')->getFill()->getStartColor()->setRGB('2CC30B');\n\n\t\t$filename='FORM A.xls'; //save our workbook as this file name\n\t\theader('Content-Type: application/vnd.ms-excel'); //mime type\n\t\theader('Content-Disposition: attachment;filename=\"'.$filename.'\"'); //tell browser what's the file name\n\t\theader('Cache-Control: max-age=0');//no cache\n\n\t\t//save it to Excel5 format (excel 2003 .XLS file), change this to 'Excel2007' (and adjust the filename extension, also the header mime type)\n\t\t//if you want to save it as .XLSX Excel 2007 format\n\t\t$objWriter = PHPExcel_IOFactory::createWriter($this->excel, 'Excel5');\n\t\t//force user to download the Excel file without writing it to server's HD\n\t\t$objWriter->save('php://output');\n }", "title": "" }, { "docid": "01a88a10e7fce9df731ffe77743d5731", "score": "0.42304438", "text": "public function apply(Cell $cell)\n {\n }", "title": "" }, { "docid": "55fa5d447789e2352073557a4cb853eb", "score": "0.42269835", "text": "function cellToCell(){\n return \t'</td><td>';\n\n}", "title": "" }, { "docid": "5009283c2f2523ed3eaf618e3d82fc9d", "score": "0.42248434", "text": "public function joinWithDisasterAreas();", "title": "" }, { "docid": "c0656e054e0bad88d4a296a6567778e9", "score": "0.42157635", "text": "public function mergeByColumnAndRow(Workbook $oWorkbook, $iColumn, $iRow) {\n\t\tif (1 == $iColumn && 0 == $iRow) {\n\t\t\treturn 'B1:C1';\n\t\t} elseif (1 == $iColumn && 1 == $iRow) {\n\t\t\treturn 'B2:C3';\n\t\t} elseif (0 == $iColumn && 3 == $iRow) {\n\t\t\treturn 'A3:A4';\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "c8262ed2cd7463f5453307712af1e581", "score": "0.4209705", "text": "public function testTypeMergeParam()\n {\n // chart type merge param\n $this->chart->setMergeParams(array('cht' => 'foo'));\n $this->chart->render();\n }", "title": "" }, { "docid": "9394abff8b5b05609b717bfd7936baba", "score": "0.42093512", "text": "function merged_new_output()\n\t{\n\t\t$lines = array();\n\n\t\tfor ($i = 0, $size = count($this->_edits); $i < $size; $i++)\n\t\t{\n\t\t\t$edit = $this->_edits[$i];\n\n\t\t\tif ($edit->is_conflict())\n\t\t\t{\n\t\t\t\t$lines = array_merge($lines, $edit->final2);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$lines = array_merge($lines, $edit->merged());\n\t\t\t}\n\t\t}\n\n\t\treturn $lines;\n\t}", "title": "" }, { "docid": "4094f9dbced7d99278a73f21352285fd", "score": "0.42037585", "text": "public function merge($items);", "title": "" }, { "docid": "4df690e92cf4490fd720e98c7c4b80ac", "score": "0.4182075", "text": "function merge($p_archive_to_add)\n {\n }", "title": "" }, { "docid": "7e39b835e92685e62ad3c3afcb99b209", "score": "0.4180644", "text": "protected function setHeaders()\n {\n $row = 1; \n $this->objPHPExcel->getActiveSheet()->getColumnDimension('A')->setAutoSize(true);\n \n $mergeCells = 'A' . $row . ':' . 'E' . $row;\n $this->setCellValue('A' . $row, \"Differences between files.\");\n $this->objPHPExcel->getActiveSheet()->getStyle($mergeCells)->getFont()->setBold(true);\n $this->objPHPExcel->getActiveSheet()->mergeCells($mergeCells);\n $this->objPHPExcel->getActiveSheet()->getRowDimension($row)->setRowHeight(25);\n $this->objPHPExcel->getActiveSheet()->getStyle($mergeCells)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \n \n $row++;\n $cell = 'A' . $row;\n $this->setCellValue($cell, \"Comparing by: \");\n $this->objPHPExcel->getActiveSheet()->getStyle($cell)->getFont()->setBold(true);\n \n $mergeCells = 'B' . $row . ':' . 'C' . $row;\n $this->setCellValue('B' . $row, $this->getCompareTypeLabel()); \n $this->objPHPExcel->getActiveSheet()->mergeCells($mergeCells);\n \n \n $row++;\n $cell = 'A' . $row;\n $this->setCellValue($cell, \"Configuration: \");\n $this->objPHPExcel->getActiveSheet()->getStyle($cell)->getFont()->setBold(true);\n \n $mergeCells = 'B' . $row . ':' . 'M' . $row;\n $this->setCellValue('B' . $row, $this->settings['configuration']); \n $this->objPHPExcel->getActiveSheet()->mergeCells($mergeCells);\n \n $row += 5;\n $columns = $this->getColumns(); \n foreach ($columns as $columnName => $column) {\n $cell = $columnName . $row;\n $this->setCellValue($cell, $column['title']);\n $this->objPHPExcel->getActiveSheet()->getColumnDimension($columnName)->setAutoSize(true);\n $this->objPHPExcel->getActiveSheet()->getStyle($cell)->getFont()->setBold(true);\n }\n \n return $row;\n }", "title": "" }, { "docid": "4e6bd1c81ed934f4acd7002296b00125", "score": "0.41704795", "text": "public function report_data_college()\n{\n\n$user = $this->Muser->report_data_college();\n\n// Create new Spreadsheet object\n$spreadsheet = new Spreadsheet();\n\n//auto width cell\nforeach(range('A','I') as $columnID) {\n $spreadsheet->getActiveSheet()->getColumnDimension($columnID)\n ->setAutoSize(true);\n}\n\n// Set document properties\n$spreadsheet->getProperties()->setCreator('STMIK BANDUNG')\n->setLastModifiedBy('STMIK BANDUNG')\n->setTitle('Office 2007 XLSX Test Document')\n->setSubject('Office 2007 XLSX Test Document')\n->setDescription('Test document for Office 2007 XLSX, generated using PHP classes.')\n->setKeywords('office 2007 openxml php')\n->setCategory('result file');\n\n// Add some data\n$spreadsheet->setActiveSheetIndex(0)\n->setCellValue('A1', 'NO')\n->setCellValue('B1', 'NIM')\n->setCellValue('C1', 'NAMA')\n->setCellValue('D1', 'JURUSAN')\n->setCellValue('E1', 'ANGKATAN')\n->setCellValue('F1', 'EMAIL')\n->setCellValue('G1', 'JENIS KELAMIN')\n->setCellValue('H1', 'NO TELEPON')\n->setCellValue('I1', 'STATUS')\n\n;\n\n// Miscellaneous glyphs, UTF-8\n$i=2; $no=1; foreach($user as $data) {\n\n$spreadsheet->setActiveSheetIndex(0)\n->setCellValue('A'.$i, $no)\n->setCellValue('B'.$i, $data->nim)\n->setCellValue('C'.$i, $data->name)\n->setCellValue('D'.$i, $data->prodi)\n->setCellValue('E'.$i, $data->generation)\n->setCellValue('F'.$i, $data->email)\n->setCellValue('G'.$i, $data->gender)\n->setCellValue('H'.$i, $data->no_telp)\n->setCellValue('i'.$i, $data->status_user)\n\n;\n$i++;\n$no++;\n}\n\n\n// Rename worksheet\n$spreadsheet->getActiveSheet()->setTitle('Report Data Mahasiswa '.date('d-m-Y H'));\n\n// Set active sheet index to the first sheet, so Excel opens this as the first sheet\n$spreadsheet->setActiveSheetIndex(0);\n\n// Redirect output to a client’s web browser (Xlsx)\nheader('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\nheader('Content-Disposition: attachment;filename=\"Report Data Mahasiswa.xlsx\"');\nheader('Cache-Control: max-age=0');\n// If you're serving to IE 9, then the following may be needed\nheader('Cache-Control: max-age=1');\n\n// If you're serving to IE over SSL, then the following may be needed\nheader('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past\nheader('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified\nheader('Cache-Control: cache, must-revalidate'); // HTTP/1.1\nheader('Pragma: public'); // HTTP/1.0\n\n$writer = IOFactory::createWriter($spreadsheet, 'Xlsx');\n$writer->save('php://output');\nexit;\n}", "title": "" }, { "docid": "41aec5958cc55d2a2de60a7e67db2389", "score": "0.41685435", "text": "public function merge()\n\t{\n\t\t$lists = func_get_args();\n\n\t\tforeach ( $lists as $array )\n\t\t{\n\t\t\t$this->append( $array );\n\t\t}\n\t}", "title": "" }, { "docid": "829d39f937fab3dbe2eebaeb58801167", "score": "0.4167816", "text": "public function mergeData(array $data)\n {\n $this->data = array_merge($this->data, $data);\n }", "title": "" }, { "docid": "7b55fe280eb2dac56a09e65226e046d2", "score": "0.4142395", "text": "function tck_table_head_cells($cells) {\n $newcells['custom'] = yourls__('Custom Keyword');\n $newcells['actions'] = $cells['actions'];\n \n unset($cells['actions']);\n return array_merge($cells, $newcells);\n }", "title": "" }, { "docid": "084dd314ac6558edb1aa8a031896ed68", "score": "0.41302902", "text": "public static function _hashMerge(array $data, $merge) {\n $args = func_get_args();\n $return = current($args);\n\n while (($arg = next($args)) !== false) {\n foreach ((array)$arg as $key => $val) {\n if (!empty($return[$key]) && is_array($return[$key]) && is_array($val)) {\n $return[$key] = self::_hashMerge($return[$key], $val);\n } else {\n $return[$key] = $val;\n }\n }\n }\n return $return;\n }", "title": "" }, { "docid": "d0d3f6a146693316ba012def069d16d7", "score": "0.41271055", "text": "protected function setCellData() : array\n {\n $days = $this->period->getDays();\n $count = 0;\n\n $endingCell = 'D';\n\n foreach ($days as $date => $day) {\n\n $this->cellData[$this->cellMap[$count]] = [\n 'data' => [\n ['Statut', 5, '',\n 'style' => $this->getStyle('HORIZONTAL_CENTER')\n ],\n ['Statut', 14, '',\n 'style' => $this->getStyle('HORIZONTAL_CENTER')\n ],\n ['Statut', 18, '',\n 'style' => $this->getStyle('HORIZONTAL_CENTER')\n ],\n ['Statut', 22, '',\n 'style' => $this->getStyle('HORIZONTAL_CENTER')\n ],\n ['Statut', 26, '',\n 'style' => $this->getStyle('HORIZONTAL_CENTER')\n ],\n ['Statut', 30, '',\n 'style' => $this->getStyle('HORIZONTAL_CENTER')\n ],\n ['Statut', 34, '',\n 'style' => $this->getStyle('HORIZONTAL_CENTER')\n ],\n ['', 6, '', 'style' => $this->getStyle('HORIZONTAL_CENTER', self::BORDER_THIN)],\n ['', 7, '', 'style' => $this->getStyle('HORIZONTAL_CENTER', self::BORDER_THIN)],\n ['', 8, '', 'style' => $this->getStyle('HORIZONTAL_CENTER', self::BORDER_THIN)],\n ['', 9, '', 'style' => $this->getStyle('HORIZONTAL_CENTER', self::BORDER_THIN)],\n ['', 10, '', 'style' => $this->getStyle('HORIZONTAL_CENTER', self::BORDER_THIN)],\n ['', 11, '', 'style' => $this->getStyle('HORIZONTAL_CENTER', self::BORDER_THIN)],\n ['', 16, '', 'style' => $this->getStyle('HORIZONTAL_CENTER', self::BORDER_THIN)],\n ['', 20, '', 'style' => $this->getStyle('HORIZONTAL_CENTER', self::BORDER_THIN)],\n ['', 24, '', 'style' => $this->getStyle('HORIZONTAL_CENTER', self::BORDER_THIN)],\n ['', 28, '', 'style' => $this->getStyle('HORIZONTAL_CENTER', self::BORDER_THIN)],\n ['', 32, '', 'style' => $this->getStyle('HORIZONTAL_CENTER', self::BORDER_THIN)],\n ['', 36, '', 'style' => $this->getStyle('HORIZONTAL_CENTER', self::BORDER_THIN)],\n ],\n 'width' => '22'\n ];\n\n $this->cellData[$this->cellMap[$count + 1]] = [\n 'data' => [\n ['Notes', 5, '',\n 'style' => $this->getStyle('HORIZONTAL_LEFT')\n ],\n ['Notes', 14, '',\n 'style' => $this->getStyle('HORIZONTAL_LEFT')\n ],\n ['Notes', 18, '',\n 'style' => $this->getStyle('HORIZONTAL_LEFT')\n ],\n ['Notes', 22, '',\n 'style' => $this->getStyle('HORIZONTAL_LEFT')\n ],\n ['Notes', 26, '',\n 'style' => $this->getStyle('HORIZONTAL_LEFT')\n ],\n ['Notes', 30, '',\n 'style' => $this->getStyle('HORIZONTAL_LEFT')\n ],\n ['Notes', 34, '',\n 'style' => $this->getStyle('HORIZONTAL_LEFT')\n ],\n ['', 6, '', 'style' => $this->getStyle('HORIZONTAL_CENTER', ['right'=>'BORDER_MEDIUM'])],\n ['', 7, '', 'style' => $this->getStyle('HORIZONTAL_CENTER', ['right'=>'BORDER_MEDIUM'])],\n ['', 8, '', 'style' => $this->getStyle('HORIZONTAL_CENTER', ['right'=>'BORDER_MEDIUM'])],\n ['', 9, '', 'style' => $this->getStyle('HORIZONTAL_CENTER', ['right'=>'BORDER_MEDIUM'])],\n ['', 10, '', 'style' => $this->getStyle('HORIZONTAL_CENTER', ['right'=>'BORDER_MEDIUM'])],\n ['', 11, '', 'style' => $this->getStyle('HORIZONTAL_CENTER', ['right'=>'BORDER_MEDIUM', 'bottom'=>'BORDER_MEDIUM'])],\n ['', 15, '', 'style' => $this->getStyle('HORIZONTAL_CENTER', ['right'=>'BORDER_MEDIUM'])],\n ['', 16, '', 'style' => $this->getStyle('HORIZONTAL_CENTER', ['right'=>'BORDER_MEDIUM', 'bottom'=>'BORDER_MEDIUM'])],\n ['', 19, '', 'style' => $this->getStyle('HORIZONTAL_CENTER', ['right'=>'BORDER_MEDIUM'])],\n ['', 20, '', 'style' => $this->getStyle('HORIZONTAL_CENTER', ['right'=>'BORDER_MEDIUM', 'bottom'=>'BORDER_MEDIUM'])],\n ['', 23, '', 'style' => $this->getStyle('HORIZONTAL_CENTER', ['right'=>'BORDER_MEDIUM'])],\n ['', 24, '', 'style' => $this->getStyle('HORIZONTAL_CENTER', ['right'=>'BORDER_MEDIUM', 'bottom'=>'BORDER_MEDIUM'])],\n ['', 27, '', 'style' => $this->getStyle('HORIZONTAL_CENTER', ['right'=>'BORDER_MEDIUM'])],\n ['', 28, '', 'style' => $this->getStyle('HORIZONTAL_CENTER', ['right'=>'BORDER_MEDIUM', 'bottom'=>'BORDER_MEDIUM'])],\n ['', 31, '', 'style' => $this->getStyle('HORIZONTAL_CENTER', ['right'=>'BORDER_MEDIUM'])],\n ['', 32, '', 'style' => $this->getStyle('HORIZONTAL_CENTER', ['right'=>'BORDER_MEDIUM', 'bottom'=>'BORDER_MEDIUM'])],\n ['', 35, '', 'style' => $this->getStyle('HORIZONTAL_CENTER', ['right'=>'BORDER_MEDIUM'])],\n ['', 36, '', 'style' => $this->getStyle('HORIZONTAL_CENTER', ['right'=>'BORDER_MEDIUM', 'bottom'=>'BORDER_MEDIUM'])]\n ],\n 'width' => '50'\n ];\n\n if (count($days) > 1) {\n array_unshift(\n $this->cellData[$this->cellMap[$count]]['data'],\n [strtoupper($day), 4, '',\n 'style' => $this->getStyle('HORIZONTAL_CENTER')\n ]\n );\n }\n\n $endingCell = $this->cellMap[$count + 1];\n\n $count++;\n }\n\n $incidentTableData = [\n ['Détails', 39, $endingCell, 'style' => $this->getStyle('HORIZONTAL_LEFT', ['right'=>'BORDER_MEDIUM', 'bottom'=>'BORDER_THIN'], null, false, self::BLACK_COLOR)],\n ['', 40, $endingCell, 'style' => $this->getStyle('HORIZONTAL_CENTER', ['right'=>'BORDER_MEDIUM', 'bottom'=>'BORDER_THIN'])],\n ['', 41, $endingCell, 'style' => $this->getStyle('HORIZONTAL_CENTER', ['right'=>'BORDER_MEDIUM', 'bottom'=>'BORDER_THIN'])],\n ['', 42, $endingCell, 'style' => $this->getStyle('HORIZONTAL_CENTER', ['right'=>'BORDER_MEDIUM', 'bottom'=>'BORDER_THIN'])],\n ['', 43, $endingCell, 'style' => $this->getStyle('HORIZONTAL_CENTER', ['right'=>'BORDER_MEDIUM', 'bottom'=>'BORDER_MEDIUM'])]\n ];\n\n $incidentTableHeader = ['Incidents P1 en cours - Aucun', 38, $endingCell,\n 'style' => self::TITLE_STYLE_LEFT_ALIGNED\n ];\n\n if (isset($this->cellData['B'])) {\n foreach($incidentTableData as $tableData) {\n array_push($this->cellData['B']['data'], $tableData);\n }\n }\n\n if (isset($this->cellData['A'])) {\n array_push($this->cellData['A']['data'], $incidentTableHeader);\n }\n\n return $this->cellData;\n }", "title": "" }, { "docid": "41a442fe07d22af850b6a0c4cb2dff83", "score": "0.41221192", "text": "private function mapVertical()\n {\n $this->disabledCells = array_merge($this->disabledCells, $this->getRange());\n }", "title": "" }, { "docid": "d324b05968f42796cd8678e5c93db0db", "score": "0.4065016", "text": "public function apply(Builder $builder)\n {\n $model = $builder->getModel();\n\n $builder->whereNull($model->getQualifiedMergedAtColumn());\n\n $this->extend($builder);\n }", "title": "" }, { "docid": "e008573d735ce02a253110a71c9f00be", "score": "0.4064629", "text": "public function merge_data() {\n\n $primaryKey = 'uid';\n //Get the user records\n //$users = new Users();\n $result = $this->get_all_rgw();\n\n db_set_active('profiles');\n //Perform merge query;\n foreach ($result as $attribute => $value) {\n $key = array();\n $fields = array();\n \n $len = count((array)$value);\n $key = array_slice((array)$value, -$len, 1);\n $fields = array_slice((array) $value, 1);\n \n /*echo \"<pre>\";\n print_r($key);\n print_r($fields);\n echo \"</pre>\"; */\n \n try {\n $query = db_merge('users')\n ->key($key)\n ->fields($fields)\n ->execute();\n } catch (Exception $e) {\n print(\"Merge query error: \" . $e . \"<br />\");\n // Log the exception to watchdog.\n watchdog_exception('Merge Query', $e);\n }\n //die();\n }\n }", "title": "" }, { "docid": "fcba0126b39c00c2f990cc245ca6c085", "score": "0.40598148", "text": "protected function _dataMerge( $row )\n\t{\n\t\tif ( $row instanceof Zend_Db_Table_Row )\n\t\t\t$row = $row->toArray();\n\t\t\n\t\t$this->_data = array_merge($this->_data, $row);\n\t\t\n\t\tif (array_key_exists('user_id', $this->_data))\n\t\t\t$this->ownerUserId = $this->_data['user_id'];\n\t}", "title": "" }, { "docid": "d3dea58c9924cc437eac58209799fc00", "score": "0.4058606", "text": "public function export_lap_aging()\n\t{\n\n\t\t$branch_id = $this->uri->segment(3);\n\t\t$date = $this->uri->segment(4);\n\t\t$desc_date = substr($date,0,2).'/'.substr($date,2,2).'/'.substr($date,4,4);\n\t\t$date = substr($date,4,4).'-'.substr($date,2,2).'-'.substr($date,0,2);\n\t\tif($branch_id==\"00000\"){\n\t\t\t$branch_id = '';\n\t\t}\n\t\t$branch_data = $this->model_cif->get_branch_by_branch_id($branch_id);\n\t\t$branch_code = $branch_data['branch_code'];\n\t\t// Create new PHPExcel object\n\t\t$objPHPExcel = $this->phpexcel;\n\t\t// Set document properties\n\t\t$objPHPExcel->getProperties()->setCreator(\"MICROFINANCE\")\n\t\t\t\t\t\t\t\t\t ->setLastModifiedBy(\"MICROFINANCE\")\n\t\t\t\t\t\t\t\t\t ->setTitle(\"Office 2007 XLSX Test Document\")\n\t\t\t\t\t\t\t\t\t ->setSubject(\"Office 2007 XLSX Test Document\")\n\t\t\t\t\t\t\t\t\t ->setDescription(\"REPORT, generated using PHP classes.\")\n\t\t\t\t\t\t\t\t\t ->setKeywords(\"REPORT\")\n\t\t\t\t\t\t\t\t\t ->setCategory(\"Test result file\");\n\n\t\t$objPHPExcel->setActiveSheetIndex(0); \n\n\t\t$styleArray = array(\n \t\t'borders' => array(\n\t\t 'outline' => array(\n\t\t 'style' => PHPExcel_Style_Border::BORDER_THIN,\n\t\t 'color' => array('rgb' => '000000'),\n\t\t ),\n\t\t ),\n\t\t);\n\n\t\t/*set header*/\n\t\t$objPHPExcel->getActiveSheet()->mergeCells('A1:Q1');\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('A1',strtoupper($this->session->userdata('institution_name')));\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n\n\t\t$objPHPExcel->getActiveSheet()->mergeCells('A2:Q2');\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('A2',$branch_data['branch_name']);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A2')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n\t\t\n\t\t$objPHPExcel->getActiveSheet()->mergeCells('A3:Q3');\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('A3',\"Laporan Kolektibilitas\");\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A3')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n\n\t\t$objPHPExcel->getActiveSheet()->mergeCells('A4:Q4');\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('A4',\"Tanggal \".$desc_date);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A4')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A1:A3')->getFont()->setBold(true);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A1:A3')->getFont()->setSize(14);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A4')->getFont()->setBold(true);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A4')->getFont()->setSize(12);\n\n\t\t/* margined cell of header title */\n\t\t$objPHPExcel->getActiveSheet()->mergeCells('A6:A7');\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('A6',\"NO\");\n\t\t$objPHPExcel->getActiveSheet()->mergeCells('B6:C6');\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('B6',\"ANGGOTA\");\n\t\t$objPHPExcel->getActiveSheet()->mergeCells('D6:F6');\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('D6',\"PENCAIRAN\");\n\t\t$objPHPExcel->getActiveSheet()->mergeCells('G6:H6');\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('G6',\"ANGSURAN\");\n\t\t$objPHPExcel->getActiveSheet()->mergeCells('I6:J6');\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('I6',\"OUTSTANDING\");\n\t\t$objPHPExcel->getActiveSheet()->mergeCells('K6:N6');\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('K6',\"TUNGGAKKAN\");\n\t\t$objPHPExcel->getActiveSheet()->mergeCells('O6:O7');\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('O6',\"KOL\");\n\t\t$objPHPExcel->getActiveSheet()->mergeCells('P6:Q6');\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('P6',\"CPP\");\n\n\t\t/* unmargined cell of header title */\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('B7',\"No. Rekening\");\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('C7',\"Nama\");\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('D7',\"Pokok\");\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('E7',\"Margin\");\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('F7',\"Tanggal\");\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('G7',\"Pokok\");\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('H7',\"Margin\");\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('I7',\"Pokok\");\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('J7',\"Margin\");\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('K7',\"Hari\");\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('L7',\"Jml\");\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('M7',\"Pokok\");\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('N7',\"Margin\");\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('P7',\"%\");\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('Q7',\"Nominal\");\n\t\t\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A6:Q7')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A6:Q7')->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A6:Q7')->getFont()->setBold(true);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A6:Q7')->getFont()->setSize(10);\n\t\t\n\t\t/* set border header title */\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A6:A7')->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('B6:C6')->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('D6:F6')->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('G6:H6')->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('I6:J6')->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('K6:N6')->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('O6:O7')->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('P6:Q6')->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('P6:Q6')->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('B7')->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('C7')->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('D7')->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('E7')->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('F7')->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('G7')->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('H7')->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('I7')->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('J7')->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('K7')->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('L7')->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('M7')->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('N7')->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('P7')->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('Q7')->applyFromArray($styleArray);\n\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(4);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setWidth(16);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setWidth(20);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('D')->setWidth(13);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('E')->setWidth(13);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('F')->setWidth(13);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('G')->setWidth(13);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('H')->setWidth(13);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('I')->setWidth(13);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('J')->setWidth(13);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('K')->setWidth(4);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('L')->setWidth(4);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('M')->setWidth(13);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('N')->setWidth(13);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('O')->setWidth(5);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('P')->setWidth(5);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('Q')->setWidth(13);\n\n\t\t/**\n\t\t* [BEGIN] INSERT DATA TO CELL\n\t\t*/\n\n\t\t$data = $this->model_laporan_to_pdf->get_laporan_par_terhitung($date,$branch_code);\n\t\t$no = 0;\n\t\t$row = 7;\n\n\t\t/* declare total */\n\t\t$total_pokok=0;\n\t\t$total_margin=0;\n\t\t$total_saldo_pokok=0;\n\t\t$total_saldo_margin=0;\n\t\t$total_tunggakan_pokok=0;\n\t\t$total_tunggakan_margin=0;\n\t\t$total_cadangan_piutang=0;\n\n\t\tfor ( $i = 0 ; $i < count($data) ; $i++ )\n\t\t{\n\t\t\t$result = $data[$i];\n\t\t\t$no++;\n\t\t\t$row++;\n\n\t\t\t/* akumulasi total */\n\t\t\t$total_pokok+=$result['pokok'];\n\t\t\t$total_margin+=$result['margin'];\n\t\t\t$total_saldo_pokok+=$result['saldo_pokok'];\n\t\t\t$total_saldo_margin+=$result['saldo_margin'];\n\t\t\t$total_tunggakan_pokok+=$result['tunggakan_pokok'];\n\t\t\t$total_tunggakan_margin+=$result['tunggakan_margin'];\n\t\t\t$total_cadangan_piutang+=$result['cadangan_piutang'];\n\n\t\t\t/* set row value */\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,$no);\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('B'.$row,$result['account_financing_no'].' ');\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('C'.$row,$result['nama']);\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('D'.$row,number_format($result['pokok'],0,',','.').' ');\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('E'.$row,number_format($result['margin'],0,',','.').' ');\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('F'.$row,date('d-m-Y',strtotime($result['droping_date'])));\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('G'.$row,number_format($result['angsuran_pokok'],0,',','.').' ');\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('H'.$row,number_format($result['angsuran_margin'],0,',','.').' ');\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('I'.$row,number_format($result['saldo_pokok'],0,',','.').' ');\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('J'.$row,number_format($result['saldo_margin'],0,',','.').' ');\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('K'.$row,$result['hari_nunggak']);\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('L'.$row,$result['freq_tunggakan']);\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('M'.$row,number_format($result['tunggakan_pokok'],0,',','.').' ');\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('N'.$row,number_format($result['tunggakan_margin'],0,',','.').' ');\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('O'.$row,$result['par_desc']);\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('P'.$row,$result['par']);\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('Q'.$row,number_format($result['cadangan_piutang'],0,',','.').' ');\n\t\t\t\n\t\t\t/* set align right for currency */\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('D'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('E'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('G'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('H'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('I'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('J'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('M'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('N'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('Q'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);\n\n\t\t\t/* set align center */\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('F'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('K'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('L'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('O'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('P'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n\n\t\t\t/* set font size */\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':Q'.$row)->getFont()->setSize(10);\n\n\t\t\t/* set border */\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row)->applyFromArray($styleArray);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('B'.$row)->applyFromArray($styleArray);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('C'.$row)->applyFromArray($styleArray);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('D'.$row)->applyFromArray($styleArray);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('E'.$row)->applyFromArray($styleArray);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('F'.$row)->applyFromArray($styleArray);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('G'.$row)->applyFromArray($styleArray);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('H'.$row)->applyFromArray($styleArray);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('I'.$row)->applyFromArray($styleArray);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('J'.$row)->applyFromArray($styleArray);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('K'.$row)->applyFromArray($styleArray);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('L'.$row)->applyFromArray($styleArray);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('M'.$row)->applyFromArray($styleArray);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('N'.$row)->applyFromArray($styleArray);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('O'.$row)->applyFromArray($styleArray);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('P'.$row)->applyFromArray($styleArray);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('Q'.$row)->applyFromArray($styleArray);\n\t\t}\n\n\t\t/**\n\t\t* [END] INSERT DATA TO CELL\n\t\t*/\n\n\t\t$row++;\n\n\t\t/**\n\t\t* [BEGIN] INSERT TOTAL DATA TO CELL\n\t\t*/\n\n\t\t/* set row value */\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('D'.$row,number_format($total_pokok,0,',','.').' ');\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('E'.$row,number_format($total_margin,0,',','.').' ');\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('I'.$row,number_format($total_saldo_pokok,0,',','.').' ');\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('J'.$row,number_format($total_saldo_margin,0,',','.').' ');\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('M'.$row,number_format($total_tunggakan_pokok,0,',','.').' ');\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('N'.$row,number_format($total_tunggakan_margin,0,',','.').' ');\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('Q'.$row,number_format($total_cadangan_piutang,0,',','.').' ');\n\t\t\n\t\t/* set align right for currency */\n\t\t$objPHPExcel->getActiveSheet()->getStyle('D'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('E'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('I'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('J'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('M'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('N'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('Q'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);\n\n\t\t/* set font size */\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':Q'.$row)->getFont()->setSize(10);\n\n\t\t/* set border */\n\t\t$objPHPExcel->getActiveSheet()->getStyle('D'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('E'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('I'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('J'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('M'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('N'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('Q'.$row)->applyFromArray($styleArray);\n\n\n\t\t/**\n\t\t* [END] INSERT TOTAL DATA TO CELL\n\t\t*/\n\n\t\t// Redirect output to a client's web browser (Excel2007)\n\t\t// Save Excel 2007 file\n\n\t\theader('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n\t\theader('Content-Disposition: attachment;filename=\"REPORT-AGING.xlsx\"');\n\t\theader('Cache-Control: max-age=0');\n\n\t\t$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\n\t\t$objWriter->save('php://output');\n\n\t\t// ----------------------------------------------------------------------\n\t\t// [END] EXPORT SCRIPT\n\t\t// ----------------------------------------------------------------------\n\t}", "title": "" }, { "docid": "ad1a4aa0aa26fbedbb92b07857168689", "score": "0.40557694", "text": "function bb_merge($array1, $array2) {\r\n //init an empty output array\r\n $output = array();\r\n\r\n //loop through the arrays while at least one still has elements left in it\r\n while (!empty($array1) || !empty($array2))\r\n\r\n //one of the arrays is empty, so the last man standing wins...\r\n {\r\n if (empty($array1) || empty($array2)) {\r\n $output[] = (empty($array2)) ? array_shift($array1) : array_shift($array2);\r\n }\r\n\r\n //both arrays still have elements, looks like we have a showdown...\r\n else {\r\n $output[] = ($array1[0] <= $array2[0]) ? array_shift($array1) : array_shift($array2);\r\n }\r\n }\r\n\r\n //pass back the output array\r\n\r\n return $output;\r\n}", "title": "" }, { "docid": "06deeb67cb8eab07c946cddb0b1a7fde", "score": "0.40551904", "text": "public function merge_scripts() {\n\n\t\t//Init vars\n\t\t$args \t\t= array();\n\t\t$exceptions = array();\n\n\t\t//Get vars from config.php\n\t\tif( isset($this->theme_script_merge_args) ) {\n\t\t\t$args = $this->theme_script_merge_args;\n\t\t}\n\n\t\tif( isset($this->theme_script_merge_exceptions) ) {\n\t\t\t$exceptions = $this->theme_script_merge_exceptions;\n\t\t}\n\n\t\tif( isset($args['merged_path']) && !empty($args['merged_path']) ) {\n\n\t\t\t//Before calling the merge action prepend the theme's stylesheet dir and uri to args\n\t\t\t$args['merged_url'] = get_stylesheet_directory_uri() . $args['merged_path'];\n\t\t\t$args['merged_path'] = get_stylesheet_directory() . $args['merged_path'];\n\n\t\t\tdo_action( 'prso_minify_merge_scripts', $args, $exceptions );\n\t\t}\n\n\t}", "title": "" }, { "docid": "68b041213af32e5df2f6aad6f6cc4212", "score": "0.40448162", "text": "function merged_orig_output()\n\t{\n\t\t$lines = array();\n\n\t\tfor ($i = 0, $size = count($this->_edits); $i < $size; $i++)\n\t\t{\n\t\t\t$edit = $this->_edits[$i];\n\n\t\t\tif ($edit->is_conflict())\n\t\t\t{\n\t\t\t\t$lines = array_merge($lines, $edit->final1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$lines = array_merge($lines, $edit->merged());\n\t\t\t}\n\t\t}\n\n\t\treturn $lines;\n\t}", "title": "" }, { "docid": "db498d7a5a8586322511913774e7a157", "score": "0.40259653", "text": "public function merge($incoming)\n {\n }", "title": "" }, { "docid": "a2c8f06cd8faa30496b3327426007a4b", "score": "0.40249315", "text": "public static function mergeWheres($wheres, $bindings)\n {\n }", "title": "" }, { "docid": "1afcc41191ca176056f4aa1542a73631", "score": "0.40160835", "text": "function writeXlsxVenereDev2($data,$file_path,$anchor_cols=null)\r\n {\r\n\t\t$anchorCols = array_filter(explode(\",\", $anchor_cols)) ;\r\n /** PHPExcel */\r\n include_once INCLUDE_PATH.'/PHPExcel.php';\r\n \r\n /** PHPExcel_Writer_Excel2007 */\r\n include_once INCLUDE_PATH.'/PHPExcel/Writer/Excel2007.php';\r\n \r\n /* Create new PHPExcel object*/\r\n $objPHPExcel = new PHPExcel();\r\n \r\n /* Set properties*/\r\n $objPHPExcel->getProperties()->setCreator(\"Edit-Place\");\r\n \r\n /* Add some data */\r\n $objPHPExcel->setActiveSheetIndex(0);\r\n $columns_required = array('G','H','I','J','K','L');\r\n $rowCount=0;\r\n foreach ($data as $k=>$row)\r\n {\r\n $col = 'A';\r\n //echo \"<pre>\"; print_r ($row); echo \"</pre>\"; exit;\r\n $language = $row[0]; //exit;\r\n //echo \"<br />\";\r\n $col_k_value = \"\"; echo $k;\r\n foreach ($row as $key => $value)\r\n {\t\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t$value = write_docx_special_character_function($value,trim($language));\r\n\t\t\t\t\r\n \r\n if(in_array($col,$columns_required) && $rowCount > 0 && $key < sizeof($row)-1)\r\n {\r\n $col_k_value .= ($key < sizeof($row)-2) ? $col.($rowCount+1).\",CHAR(10),CHAR(10),\" : $col.($rowCount+1).\",CHAR(10),CHAR(10)\"; // create formula for last row\r\n }\r\n \r\n \r\n \r\n if($key == sizeof($row)-1 && $rowCount > 0){ \r\n\t\t\t\t $value = \"=CONCATENATE(\".$col_k_value.\")\"; // concatenate formula which all concat specific cells of row\r\n\t\t\t\t //echo \"<br />\";\r\n\t\t\t } \r\n \r\n $objPHPExcel->getActiveSheet()->setCellValue($col.($rowCount+1), $value);\r\n \r\n $col++;\r\n }\r\n //echo $col_k_value.\"<br />\";\r\n $rowCount++;\r\n }\r\n\r\n //exit;\r\n\r\n // Rename sheet\r\n $objPHPExcel->getActiveSheet()->setTitle(\"sheet1\");\r\n $objPHPExcel->getActiveSheet()->getStyle('1')->getFont()->setBold(true);\r\n \r\n // Save Excel 2007 file\r\n $objWriter = new PHPExcel_Writer_Excel2007($objPHPExcel);\r\n $objWriter->save($file_path);\r\n \r\n \r\n @chmod($file_path, 0777) ; \r\n \r\n if(file_exists($file_path))\r\n return true ;\r\n \r\n }", "title": "" }, { "docid": "cb2cf81e56ffb2cb94682aec606c59f4", "score": "0.40067467", "text": "function MultiAlignCell($w,$h,$text,$border=0,$ln=0,$align='L',$fill=false)\n{\n $x = $this->GetX() + $w;\n $y = $this->GetY();\n\n // Make a call to FPDF's MultiCell\n $this->MultiCell($w,$h,$text,$border,$align,$fill);\n\n // Reset the line position to the right, like in Cell\n if( $ln==0 )\n {\n $this->SetXY($x,$y);\n }\n}", "title": "" }, { "docid": "1f505948a63d6a2ae4ba0682f643f22c", "score": "0.40056482", "text": "function quickMod_merge($topic_data, $boards_can)\n{\n\tif (count($topic_data) < 2)\n\t\treturn;\n\n\t// We need to do some overriding.\n\tunset($_POST['topics']);\n\t$_REQUEST['sa'] = 'internal';\n\n\tloadSource('Merge');\n\tMergeExecute(array_keys($topic_data));\n}", "title": "" }, { "docid": "ae0ef8a7163d69ec836f7b00a265bca1", "score": "0.40031037", "text": "function mergeappend($keyname1,$keyname2) {\n\t\t$mergefieldnames[0] = fishdata($keyname1);\n\t\t$mergefieldnames[1] = fishdata($keyname2);\n\t\treturn $mergefieldnames;\n\t}", "title": "" }, { "docid": "06ad59033a46c24b3b9d911db95b6d71", "score": "0.40018687", "text": "public static function fix_acorn_gform_merge_tags() {\n\t\t$isGravityFormsEditPage = isset($_GET['page']) && 'gf_edit_forms' === $_GET['page'];\n\n\t\tif (!$isGravityFormsEditPage) {\n\t\t\treturn;\n\t\t} ?>\n\n\t\t<script type=\"text/javascript\">\n\t\t\tfunction MaybeAddSaveLinkMergeTag( mergeTags, elementId, hideAllFields, excludeFieldTypes, isPrepop, option ) {\n\t\t\t\tconst eventSelectEl = document.querySelector('select[name=\"_gform_setting_event\"]');\n\t\t\t\tif(!eventSelectEl) {\n\t\t\t\t\treturn mergeTags;\n\t\t\t\t}\n\n\t\t\t\tvar event = eventSelectEl.value;\n\t\t\t\tif (event === 'form_saved' || event === 'form_save_email_requested') {\n\t\t\t\t\tmergeTags['other'].tags.push({\n\t\t\t\t\t\ttag: '{save_link}',\n\t\t\t\t\t\tlabel: <?php echo json_encode(esc_html__('Save & Continue Link', 'gravityforms')); ?>\n\t\t\t\t\t});\n\t\t\t\t\tmergeTags['other'].tags.push({\n\t\t\t\t\t\ttag: '{save_token}',\n\t\t\t\t\t\tlabel: <?php echo json_encode(esc_html__('Save & Continue Token', 'gravityforms')); ?>\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn mergeTags;\n\t\t\t}\n\t\t</script>\n\t\t<?php\n\t}", "title": "" }, { "docid": "3ef8bc51437c370aaaf8f3bb715eb8aa", "score": "0.40007338", "text": "function sum_row($sheet, $nextcoln, $newnextcolumn, $rowno, $start_column, $highestColumn, $coln)\r\n {\r\n $sheet->setCellValue($nextcoln . $rowno, \"=sum(\" . $start_column . \"$rowno:\" . $highestColumn . \"$rowno)\");\r\n $cell = $sheet->getCell($nextcoln . $rowno)->getCalculatedValue();\r\n $sheet->setCellValue($newnextcolumn . $rowno, \"=(\" . $coln . \"$rowno<>\" . $nextcoln . \"$rowno)\");\r\n $cell1 = $sheet->getCell($newnextcolumn . $rowno)->getCalculatedValue();\r\n return $cell1;\r\n }", "title": "" }, { "docid": "2ab2b377e089bc51f1843ec5d9bc3ff7", "score": "0.4000037", "text": "function printMatrizRecords(PHPExcel &$objPhpExcel, $array) {\n $max = count($array);\n for ($i = 0; $i < $max; $i++) {\n $record = $array[$i];\n// echo \"<pre>\";\n// var_dump($record);\n// echo \"</pre>\";\n// echo $record->k_id_zona_geografica;\n //Se escriben las causas...\n if (is_array($record->causas)) {\n $numCausas = 0;\n foreach ($record->causas as $causa) {\n $objPhpExcel->getActiveSheet()->setCellValue(\"M\" . ($i + 6 + $numCausas), $record->n_proceso);\n $numCausas++;\n }\n //Se actualizan las celdas...\n if ($numCausas > 1) {\n $objPhpExcel->getActiveSheet()->mergeCells('A' . ($i + 6) . ':A' . ($i + 6 + $numCausas));\n $objPhpExcel->getActiveSheet()->mergeCells('B' . ($i + 6) . ':B' . ($i + 6 + $numCausas));\n $objPhpExcel->getActiveSheet()->mergeCells('C' . ($i + 6) . ':C' . ($i + 6 + $numCausas));\n $objPhpExcel->getActiveSheet()->mergeCells('D' . ($i + 6) . ':D' . ($i + 6 + $numCausas));\n $objPhpExcel->getActiveSheet()->mergeCells('E' . ($i + 6) . ':E' . ($i + 6 + $numCausas));\n $objPhpExcel->getActiveSheet()->mergeCells('F' . ($i + 6) . ':F' . ($i + 6 + $numCausas));\n $objPhpExcel->getActiveSheet()->mergeCells('G' . ($i + 6) . ':G' . ($i + 6 + $numCausas));\n $objPhpExcel->getActiveSheet()->mergeCells('H' . ($i + 6) . ':H' . ($i + 6 + $numCausas));\n $objPhpExcel->getActiveSheet()->mergeCells('I' . ($i + 6) . ':I' . ($i + 6 + $numCausas));\n $objPhpExcel->getActiveSheet()->mergeCells('J' . ($i + 6) . ':J' . ($i + 6 + $numCausas));\n $objPhpExcel->getActiveSheet()->mergeCells('K' . ($i + 6) . ':K' . ($i + 6 + $numCausas));\n $objPhpExcel->getActiveSheet()->mergeCells('L' . ($i + 6) . ':L' . ($i + 6 + $numCausas));\n $objPhpExcel->getActiveSheet()->mergeCells('O' . ($i + 6) . ':O' . ($i + 6 + $numCausas));\n $objPhpExcel->getActiveSheet()->mergeCells('P' . ($i + 6) . ':P' . ($i + 6 + $numCausas));\n $objPhpExcel->getActiveSheet()->mergeCells('N' . ($i + 6) . ':N' . ($i + 6 + $numCausas));\n $objPhpExcel->getActiveSheet()->getStyle('A' . ($i + 6) . ':R' . ($i + 6 + $numCausas))->applyFromArray(\n array(\n 'font' => array(\n 'bold' => false,\n 'size' => 13\n ),\n 'fill' => array(\n 'type' => PHPExcel_Style_Fill::FILL_SOLID,\n 'color' => array('rgb' => 'ffffff')\n ),\n 'alignment' => array(\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER,\n 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER,\n ),\n 'borders' => array(\n 'allborders' => array(\n 'style' => PHPExcel_Style_Border::BORDER_THIN\n )\n )\n ));\n// $objPhpExcel->getActiveSheet()->mergeCells('Q' . ($i + 6) . ':R' . ($i + 6 + $numCausas));\n }\n }\n// $objPhpExcel->getActiveSheet()->getRowDimension($i)->setRowHeight(30);\n $objPhpExcel->getActiveSheet()->setCellValue(\"A\" . ($i + 6), (($record->k_id_zona_geografica) ? $record->k_id_zona_geografica->n_nombre : \"Indefinido\"));\n $objPhpExcel->getActiveSheet()->setCellValue(\"B\" . ($i + 6), $record->n_macro_proceso);\n $objPhpExcel->getActiveSheet()->setCellValue(\"C\" . ($i + 6), $record->n_proceso);\n $objPhpExcel->getActiveSheet()->setCellValue(\"D\" . ($i + 6), $record->n_servicio);\n $objPhpExcel->getActiveSheet()->setCellValue(\"E\" . ($i + 6), $record->n_objetivo);\n $objPhpExcel->getActiveSheet()->setCellValue(\"F\" . ($i + 6), (($record->k_id_riesgo) ? $record->k_id_riesgo->nombre_riesgo : \"Indefinido\"));\n $objPhpExcel->getActiveSheet()->setCellValue(\"G\" . ($i + 6), (($record->k_id_riesgo) ? $record->k_id_riesgo->n_responsable : \"Indefinido\"));\n $objPhpExcel->getActiveSheet()->setCellValue(\"H\" . ($i + 6), (($record->k_id_riesgo) ? $record->k_id_riesgo->n_riesgo : \"Indefinido\"));\n $objPhpExcel->getActiveSheet()->setCellValue(\"I\" . ($i + 6), (($record->k_id_riesgo) ? $record->k_id_riesgo->n_riesgo_descripcion : \"Indefinido\"));\n $objPhpExcel->getActiveSheet()->setCellValue(\"J\" . ($i + 6), $record->n_tipo_activad);\n $objPhpExcel->getActiveSheet()->setCellValue(\"K\" . ($i + 6), (($record->k_id_tipo_evento_2) ? $record->k_id_tipo_evento_2->k_id_tipo_evento_1->n_descripcion : \"Indefinido\"));\n $objPhpExcel->getActiveSheet()->setCellValue(\"L\" . ($i + 6), (($record->k_id_tipo_evento_2) ? $record->k_id_tipo_evento_2->n_descripcion : \"Indefinido\"));\n $objPhpExcel->getActiveSheet()->setCellValue(\"O\" . ($i + 6), (($record->k_id_probabilidad) ? $record->k_id_probabilidad->n_descripcion : \"Indefinido\"));\n $objPhpExcel->getActiveSheet()->setCellValue(\"P\" . ($i + 6), (($record->k_id_impacto) ? $record->k_id_impacto->n_descripcion : \"Indefinido\"));\n $objPhpExcel->getActiveSheet()->setCellValue(\"Q\" . ($i + 6), (($record->n_severidad_riesgo_inherente) ? $record->n_severidad_riesgo_inherente->n_calificacion : \"Indefinido\"));\n $objPhpExcel->getActiveSheet()->mergeCells(\"Q\" . ($i + 6) . \":R\" . ($i + 6 + (($numCausas > 1 ? $numCausas : 0))));\n $objPhpExcel->getActiveSheet()->getStyle('Q' . ($i + 6) . ':R' . ($i + 6))->applyFromArray(\n array(\n 'font' => array(\n 'bold' => false,\n 'size' => 13\n ),\n 'fill' => array(\n 'type' => PHPExcel_Style_Fill::FILL_SOLID,\n 'color' => array('rgb' => (($record->n_severidad_riesgo_inherente->n_color) ? str_replace(\"#\", \"\", $record->n_severidad_riesgo_inherente->n_color) : \"ffffff\"))\n ),\n 'alignment' => array(\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER,\n 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER,\n ),\n 'borders' => array(\n 'allborders' => array(\n 'style' => PHPExcel_Style_Border::BORDER_THIN\n )\n )\n ));\n $objPhpExcel->getActiveSheet()->getStyle('A' . ($i + 6) . ':P' . ($i + 6))->applyFromArray(\n array(\n 'font' => array(\n 'bold' => false,\n 'size' => 13\n ),\n 'fill' => array(\n 'type' => PHPExcel_Style_Fill::FILL_SOLID,\n 'color' => array('rgb' => 'ffffff')\n ),\n 'alignment' => array(\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER,\n 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER,\n ),\n 'borders' => array(\n 'allborders' => array(\n 'style' => PHPExcel_Style_Border::BORDER_THIN\n )\n )\n ));\n $objPhpExcel->getActiveSheet()->getStyle('L5:L' . $objPhpExcel\n ->getActiveSheet()->getHighestRow())\n ->getAlignment()->setWrapText(true);\n }\n }", "title": "" }, { "docid": "f3a3fd792c2da474b56e9c1912772ec3", "score": "0.40000036", "text": "public function endUse(){\n return parent::completeMerge();\n }", "title": "" }, { "docid": "d0ce36648221e4dd6649d567a29c086d", "score": "0.39945376", "text": "static function merge(/*...*/){\n $ar = array_filter(func_get_args(),'is_array'); // remove non-arrays\n $nc = count($ar);\n if($nc==0) return(NULL);\n if($nc==1) return($ar[0]);\n $res = call_user_func_array('array_merge_recursive',$ar);\n $res = ops_narray::_merge_reduce($res);\n return($res);\n }", "title": "" }, { "docid": "c5268b075cf774d39e9f8a436bedb6d6", "score": "0.39941365", "text": "public function merge($image, $percentage = .2);", "title": "" }, { "docid": "de4600e965be83bce4cd9c0973f45695", "score": "0.3990674", "text": "public function merge($newItems);", "title": "" }, { "docid": "ca010ac5f708488da0b12ba6979f0961", "score": "0.39866087", "text": "abstract public function merge($in): TypedAbstract;", "title": "" }, { "docid": "6e9cc6f88f308c01b0e7a0357455087a", "score": "0.39803317", "text": "public function report_data_user($kode_role)\n{\nif($kode_role != 'ALL'){\n$user = $this->Muser->report_data_userbyrole($kode_role);\n}else{\n$user = $this->Muser->report_data_user();\n}\n// Create new Spreadsheet object\n$spreadsheet = new Spreadsheet();\n\n//auto width cell\nforeach(range('A','H') as $columnID) {\n $spreadsheet->getActiveSheet()->getColumnDimension($columnID)\n ->setAutoSize(true);\n}\n\n// Set document properties\n$spreadsheet->getProperties()->setCreator('STMIK BANDUNG')\n->setLastModifiedBy('STMIK BANDUNG')\n->setTitle('Office 2007 XLSX Test Document')\n->setSubject('Office 2007 XLSX Test Document')\n->setDescription('Test document for Office 2007 XLSX, generated using PHP classes.')\n->setKeywords('office 2007 openxml php')\n->setCategory('result file');\n\n// Add some data\n$spreadsheet->setActiveSheetIndex(0)\n->setCellValue('A1', 'NO')\n->setCellValue('B1', 'NIDN')\n->setCellValue('C1', 'NAMA')\n->setCellValue('D1', 'EMAIL')\n->setCellValue('E1', 'PRODI')\n->setCellValue('F1', 'NO TELEPON')\n->setCellValue('G1', 'JENIS KELAMIN')\n->setCellValue('H1', 'HAK AKSES')\n\n;\n\n// Miscellaneous glyphs, UTF-8\n$i=2; $no=1; foreach($user as $data) {\n\n$spreadsheet->setActiveSheetIndex(0)\n->setCellValue('A'.$i, $no)\n->setCellValue('B'.$i, $data->nidn)\n->setCellValue('C'.$i, $data->name)\n->setCellValue('D'.$i, $data->email)\n->setCellValue('E'.$i, $data->prodi)\n->setCellValue('F'.$i, $data->no_telp)\n->setCellValue('G'.$i, $data->gender)\n->setCellValue('H'.$i, $data->role)\n\n;\n$i++;\n$no++;\n}\n\n\n// Rename worksheet\n$spreadsheet->getActiveSheet()->setTitle('Report Data User '.date('d-m-Y H'));\n\n// Set active sheet index to the first sheet, so Excel opens this as the first sheet\n$spreadsheet->setActiveSheetIndex(0);\n\n// Redirect output to a client’s web browser (Xlsx)\nheader('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\nheader('Content-Disposition: attachment;filename=\"Report Data User.xlsx\"');\nheader('Cache-Control: max-age=0');\n// If you're serving to IE 9, then the following may be needed\nheader('Cache-Control: max-age=1');\n\n// If you're serving to IE over SSL, then the following may be needed\nheader('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past\nheader('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified\nheader('Cache-Control: cache, must-revalidate'); // HTTP/1.1\nheader('Pragma: public'); // HTTP/1.0\n\n$writer = IOFactory::createWriter($spreadsheet, 'Xlsx');\n$writer->save('php://output');\nexit;\n}", "title": "" }, { "docid": "3d00ba41c5deccfa49c74f567cc48768", "score": "0.39787576", "text": "function getMergedImage($imgname = 'output.tif') {\n\t\t$img = $this->base;\n\t\tforeach($this->genes as $g) {\n\t\t\t$t = $img[$g[0]];\n\t\t\t$img[$g[0]] = $img[$g[1]];\n\t\t\t$img[$g[1]] = $t;\n\t\t}\n\t\t$outimage = $this->im->imageMerge($img,$imgname);\n\t\treturn $outimage;\n\t}", "title": "" }, { "docid": "40b0b7fe61269244c24077bfc5249581", "score": "0.3974214", "text": "public function deleteMerge($row, $column) {\n\t}", "title": "" }, { "docid": "fa573f63aa6fcbcc56b1dac2d764a5b8", "score": "0.39740252", "text": "function mergesort(&$myArray, $left, $right) {\n if ($left < $right) { \n $mid = $left + (int)(($right - $left)/2);\n mergesort($myArray, $left, $mid);\n mergesort($myArray, $mid+1, $right);\n merge($myArray, $left, $mid, $right);\n }\n}", "title": "" }, { "docid": "82651a1014a20199bce64f2a43b88224", "score": "0.3973216", "text": "function itg_section_wise_breakup_table() {\n module_load_include('php' , 'itg_reports' , 'includes/pagination');\n module_load_include('inc' , 'itg_reports' , 'includes/itg_reports.helper');\n\n $start_date = isset($_GET['date_from']) ? $_GET['date_from'] : NULL;\n $end_date = isset($_GET['date_to']) ? $_GET['date_to'] : NULL;\n $start_date_two = isset($_GET['date_from_two']) ? $_GET['date_from_two'] : NULL;\n $end_date_two = isset($_GET['date_to_two']) ? $_GET['date_to_two'] : NULL;\n $type = isset($_GET['type']) ? $_GET['type'] : NULL;\n\n $start_date = strtotime('-1day' , $start_date);\n $end_date = strtotime('+1day' , $end_date);\n $start_date_two = strtotime('-1day' , $start_date_two);\n $end_date_two = strtotime('+1day' , $end_date_two);\n\n $table_data = itg_section_wise_breakup_mongo_data($start_date , $end_date , $type);\n $table_data_two = itg_section_wise_breakup_mongo_data($start_date_two , $end_date_two , $type);\n\n $all_sections = array_unique(array_merge(array_keys($table_data_two) , array_keys($table_data)));\n $full_table = array_unique(array_merge(array_keys($table_data) , array_keys($table_data_two)));\n\n $output_table_array = array();\n foreach ($full_table as $key => $unique_section) {\n $output_table_array[$unique_section] = array(\n \"DR_1\" => $table_data[$unique_section] ,\n \"DR_2\" => $table_data_two[$unique_section] ,\n );\n }\n\n foreach ($output_table_array as $section => $count) {\n $DR_1 = (int) $count['DR_1'] + 1;\n $DR_2 = (int) $count['DR_2'] + 1;\n if ($DR_1) {\n $percentage_growth = ((($DR_2 - $DR_1))/$DR_1)*100;\n }\n else {\n $percentage_growth = ($DR_2)*10;\n }\n $new_table_data[] = array(\n 'section' => $section ,\n 'viewed' => $DR_1 . '-' . $DR_2 ,\n 'count' => $percentage_growth . '%' ,\n );\n }\n $products = $new_table_data;\n // Create the pagination object\n $pagination = new pagination;\n $count = 0;\n $date_from_1 = date('d-m-Y' , $_GET['date_from']);\n $date_from_2 = date('d-m-Y' , $_GET['date_from_two']);\n $date_to_1 = date('d-m-Y' , $_GET['date_to']);\n $date_to_2 = date('d-m-Y' , $_GET['date_to_two']);\n $string = $date_from_1 . \" to \" . $date_from_2;\n $string .= \"<br/>\";\n $string .= $date_to_1 . \" to \" . $date_to_2;\n $header = array(\n array('data' => t('S.No')) ,\n array('data' => t('Section ID')) ,\n array('data' => t('Section')) ,\n array('data' => t(\"Node Viewed <br/>\" . $string)) ,\n array('data' => t('Actions')) ,\n );\n // If we have an array with items\n if (count($products)) {\n // Parse through the pagination class\n $item_per_page = isset($_GET['item_per_page']) ? $_GET['item_per_page'] : 20;\n $user_details_pages = $pagination->generate($products , $item_per_page);\n // Load users report data.\n // If we have items \n if (count($user_details_pages) != 0) {\n // Get pagination.\n $pageNumbers = '<div class=\"numbers\">' . $pagination->links() . '</div>';\n foreach ($user_details_pages as $row) {\n // Prepare rows as per pagination.\n $rows[] = array(\n array('data' => $count + 1) ,\n array('data' => $row['section']) ,\n array('data' => get_term_name_from_tid_for_report($row['section'])->name) ,\n array('data' => '<' . $row['viewed'] . '> ' . $row['count']) ,\n array('data' => l('View Section' , 'taxonomy/term/' . $row['section'] , array(\"attributes\" => array(\"target\" => array(\"_blank\"))))) ,\n );\n $count++;\n }\n\n $output = '<div class=\"view\"><div class=\"attachment\"><span class=\"count\">Count (' . count($table_data) . ') </span>';\n $output .= '</div></div>';\n $output .= theme('table' , array('header' => $header , 'rows' => $rows , 'attributes' => array('class' => array('views-table' , 'preview-log-table')) , 'empty' => 'No result found.'));\n // add the pager\n $output .= '<ul class=\"pager\">' . $pageNumbers . '</ul>';\n return $output;\n }\n }\n}", "title": "" }, { "docid": "0463ef63324a74ef456ac65d5537ad48", "score": "0.3971838", "text": "function formatRow(){\n $this->hook('formatRow');\n }", "title": "" }, { "docid": "6676e75f7950974b97c28c95a33398c1", "score": "0.39515713", "text": "public function importExecl($file){ \r\n if(!file_exists($file)){ \r\n return array(\"error\"=>0,'message'=>'file not found!');\r\n } \r\n Vendor(\"PHPExcel.PHPExcel.IOFactory\"); \r\n $objReader = PHPExcel_IOFactory::createReader('Excel5'); \r\n try{\r\n $PHPReader = $objReader->load($file);\r\n }catch(Exception $e){}\r\n if(!isset($PHPReader)) return array(\"error\"=>0,'message'=>'read error!');\r\n $allWorksheets = $PHPReader->getAllSheets();\r\n $i = 0;\r\n foreach($allWorksheets as $objWorksheet){\r\n $sheetname=$objWorksheet->getTitle();\r\n $allRow = $objWorksheet->getHighestRow();//how many rows\r\n $highestColumn = $objWorksheet->getHighestColumn();//how many columns\r\n $allColumn = PHPExcel_Cell::columnIndexFromString($highestColumn);\r\n $array[$i][\"Title\"] = $sheetname; \r\n $array[$i][\"Cols\"] = $allColumn; \r\n $array[$i][\"Rows\"] = $allRow; \r\n $arr = array();\r\n $isMergeCell = array();\r\n foreach ($objWorksheet->getMergeCells() as $cells) {//merge cells\r\n foreach (PHPExcel_Cell::extractAllCellReferencesInRange($cells) as $cellReference) {\r\n $isMergeCell[$cellReference] = true;\r\n }\r\n }\r\n for($currentRow = 1 ;$currentRow<=$allRow;$currentRow++){ \r\n $row = array(); \r\n for($currentColumn=0;$currentColumn<$allColumn;$currentColumn++){; \r\n $cell =$objWorksheet->getCellByColumnAndRow($currentColumn, $currentRow);\r\n $afCol = PHPExcel_Cell::stringFromColumnIndex($currentColumn+1);\r\n $bfCol = PHPExcel_Cell::stringFromColumnIndex($currentColumn-1);\r\n $col = PHPExcel_Cell::stringFromColumnIndex($currentColumn);\r\n $address = $col.$currentRow;\r\n $value = $objWorksheet->getCell($address)->getValue();\r\n if(substr($value,0,1)=='='){\r\n return array(\"error\"=>0,'message'=>'can not use the formula!');\r\n exit;\r\n }\r\n if($cell->getDataType()==PHPExcel_Cell_DataType::TYPE_NUMERIC){\r\n $cellstyleformat=$cell->getParent()->getStyle( $cell->getCoordinate() )->getNumberFormat();\r\n $formatcode=$cellstyleformat->getFormatCode();\r\n if (preg_match('/^([$[A-Z]*-[0-9A-F]*])*[hmsdy]/i', $formatcode)) {\r\n $value=gmdate(\"Y-m-d\", PHPExcel_Shared_Date::ExcelToPHP($value));\r\n }else{\r\n $value=PHPExcel_Style_NumberFormat::toFormattedString($value,$formatcode);\r\n } \r\n }\r\n if($isMergeCell[$col.$currentRow]&&$isMergeCell[$afCol.$currentRow]&&!empty($value)){\r\n $temp = $value;\r\n }elseif($isMergeCell[$col.$currentRow]&&$isMergeCell[$col.($currentRow-1)]&&empty($value)){\r\n $value=$arr[$currentRow-1][$currentColumn];\r\n }elseif($isMergeCell[$col.$currentRow]&&$isMergeCell[$bfCol.$currentRow]&&empty($value)){\r\n $value=$temp;\r\n }\r\n $row[$currentColumn] = $value; \r\n } \r\n $arr[$currentRow] = $row; \r\n } \r\n $array[$i][\"Content\"] = $arr; \r\n $i++;\r\n } \r\n spl_autoload_register(array('Think','autoload'));//must, resolve ThinkPHP and PHPExcel conflicts\r\n unset($objWorksheet); \r\n unset($PHPReader); \r\n unset($PHPExcel); \r\n unlink($file); \r\n return array(\"error\"=>1,\"data\"=>$array); \r\n }", "title": "" }, { "docid": "4826ca09c7d5e3b63e6fce076f9a9c37", "score": "0.39390066", "text": "function chocorocco_essential_grid_merge_styles($list) {\n\t\t$list[] = 'plugins/essential-grid/essential-grid.css';\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "bae5a9ee0b0b807e573f92e74e18ee54", "score": "0.393288", "text": "function export_form_b(){\n\t\t$this->load->library('excel');\n\t\t//activate worksheet number 1\n\t\t$this->excel->setActiveSheetIndex(0);\n\t\t//name the worksheet\n\t\t$this->excel->getActiveSheet()->setTitle('FORM A');\n \n #reggion header\n\t\t$this->excel->getActiveSheet()->setCellValue('D1', \"KOP SURAT LEMBAGA KESEJAHTERAAN SOSIAL ANAK (LKSA)\");\n\t\t$this->excel->getActiveSheet()->mergeCells('D1:K1');\n\t\t$this->excel->getActiveSheet()->getStyle('D1:K1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n\t\t$this->excel->getActiveSheet()->setCellValue('D2', \"DATA PEGAWAI LEMBAGA KESEJAHTERAAN SOSIAL ANAK (LKSA)\");\n\t\t$this->excel->getActiveSheet()->mergeCells('D2:K2');\n\t\t$this->excel->getActiveSheet()->getStyle('D2:K2')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n\t\t$this->excel->getActiveSheet()->setCellValue('B1', \"PROPOSAL\");\n\t\t$this->excel->getActiveSheet()->setCellValue('B2', \"FORM B\");\n $this->excel->getActiveSheet()->setCellValue('B3', \"Daftar Pegawai LKSA\");\n\n $this->excel->getActiveSheet()->getRowDimension('5')->setRowHeight(45);\n\n $this->excel->getActiveSheet()->setCellValue('A5', \"NO\");\n $this->excel->getActiveSheet()->mergeCells('A5:A5');\n $this->excel->getActiveSheet()->getStyle('A5:A5')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('A5:A5')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->setCellValue('B5', \"Nama\");\n $this->excel->getActiveSheet()->getColumnDimension('B')->setWidth(27);\n $this->excel->getActiveSheet()->getStyle('B5:B5')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('B5:B5')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); \n $this->excel->getActiveSheet()->setCellValue('C5', \"Nomor Induk Kependudukan\");\n $this->excel->getActiveSheet()->getColumnDimension('C')->setWidth(27);\n $this->excel->getActiveSheet()->getStyle('C5:C5')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('C5:C5')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); \n $this->excel->getActiveSheet()->getStyle('C5:C5')->getAlignment()->setWrapText(true); \n $this->excel->getActiveSheet()->setCellValue('D5', \"Jenis Kelamin\");\n $this->excel->getActiveSheet()->getStyle('D5:D5')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('D5:D5')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('D5:D5')->getAlignment()->setWrapText(true); \n $this->excel->getActiveSheet()->getColumnDimension('D')->setWidth(10); \n $this->excel->getActiveSheet()->setCellValue('E5', \"Tempat Lahir\");\n $this->excel->getActiveSheet()->getColumnDimension('C')->setWidth(15);\n $this->excel->getActiveSheet()->getStyle('E5:E5')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('E5:E5')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); \n $this->excel->getActiveSheet()->getStyle('E5:E5')->getAlignment()->setWrapText(true); \n $this->excel->getActiveSheet()->getColumnDimension('E')->setWidth(11);\n $this->excel->getActiveSheet()->setCellValue('F5', \"Tanggal Lahir\");\n $this->excel->getActiveSheet()->getColumnDimension('F')->setWidth(15);\n $this->excel->getActiveSheet()->getStyle('F5:F5')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('F5:F5')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('F5:F5')->getAlignment()->setWrapText(true); \n $this->excel->getActiveSheet()->setCellValue('G5', \"Mulai Bekerja Di Panti\");\n $this->excel->getActiveSheet()->getColumnDimension('G')->setWidth(11);\n $this->excel->getActiveSheet()->getStyle('G5:G5')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('G5:G5')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('G5:G5')->getAlignment()->setWrapText(true); \n $this->excel->getActiveSheet()->setCellValue('H5', \"Jabatan\");\n $this->excel->getActiveSheet()->getStyle('H5:H5')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('H5:H5')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); \n $this->excel->getActiveSheet()->setCellValue('I5', \"Status Kepegawaian\");\n $this->excel->getActiveSheet()->getColumnDimension('I')->setWidth(13);\n $this->excel->getActiveSheet()->getStyle('I5:I5')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('I5:I5')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); \n $this->excel->getActiveSheet()->getStyle('I5:I5')->getAlignment()->setWrapText(true);\n $this->excel->getActiveSheet()->setCellValue('J5', \"Latar Belakang Pendidikan Terakhir\");\n $this->excel->getActiveSheet()->getColumnDimension('J')->setWidth(20);\n $this->excel->getActiveSheet()->getStyle('J5:J5')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('J5:J5')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); \n $this->excel->getActiveSheet()->getStyle('J5:J5')->getAlignment()->setWrapText(true);\n $this->excel->getActiveSheet()->setCellValue('K5', \"Pelatihan Yang Pernah Diikuti\");\n $this->excel->getActiveSheet()->getColumnDimension('K')->setWidth(27);\n $this->excel->getActiveSheet()->getStyle('K5:K5')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('K5:K5')->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); \n $this->excel->getActiveSheet()->getStyle('K5:K5')->getAlignment()->setWrapText(true);\n #endreggion header\n #region rowdata\n // $data =$this->model->get_data_fa();\n // $i \t = 8;\n // $tdk_ada ='-';\n // if($data != null){\n // $jk =array(\"L\"=>\"1\",\"P\"=>\"2\");\n // foreach($data as $row){\n // $no_registrasi_santri = $row->no_registrasi;\n \n // //get data orangTua\n // $ayah_kandung\t= $this->model->get_data_orgtua($no_registrasi_santri,'ayah');\n // if ($ayah_kandung!=null) {\n // $ayah = $ayah_kandung->nama;\n // }else{ \n // $ayah = \"Tidak Diketahui\";\n // }\n // $ibu_kandung\t\t\t= $this->model->get_data_orgtua($no_registrasi_santri,'ibu');\n // if ($ibu_kandung!=null) {\n // $ibu = $ibu_kandung->nama;\n // }else{ \n // $ibu = \"Tidak Diketahui\";\n // }\n\n // $this->excel->getActiveSheet()->setCellValue('A'.$i, $i-7);\n // $this->excel->getActiveSheet()->setCellValue('B'.$i, $tdk_ada);\n // $this->excel->getActiveSheet()->setCellValue('C'.$i, $tdk_ada);\n // $this->excel->getActiveSheet()->setCellValue('D'.$i, $tdk_ada);\n // $this->excel->getActiveSheet()->setCellValue('E'.$i, $tdk_ada);\n // $this->excel->getActiveSheet()->setCellValue('F'.$i, $row->alamat);\n // $this->excel->getActiveSheet()->setCellValue('G'.$i, $row->nama_donatur);\n // $this->excel->getActiveSheet()->setCellValue('H'.$i, $row->nama_lengkap);\n // $this->excel->getActiveSheet()->setCellValue('I'.$i, $row->nik);\n // $this->excel->getActiveSheet()->setCellValue('J'.$i, $jk[$row->jenis_kelamin]);\n // $this->excel->getActiveSheet()->setCellValue('K'.$i, $row->tempat_lahir);\n // $this->excel->getActiveSheet()->setCellValue('L'.$i, $row->tgl_lahir);\n // $this->excel->getActiveSheet()->setCellValue('M'.$i, $row->umur);\n // $this->excel->getActiveSheet()->setCellValue('N'.$i, $tdk_ada);\n // $this->excel->getActiveSheet()->setCellValue('O'.$i, $tdk_ada);\n // $this->excel->getActiveSheet()->setCellValue('P'.$i, $tdk_ada);\n // $this->excel->getActiveSheet()->setCellValue('Q'.$i, $tdk_ada);\n // $this->excel->getActiveSheet()->setCellValue('R'.$i, $tdk_ada);\n // $this->excel->getActiveSheet()->setCellValue('S'.$i, $tdk_ada);\n // $this->excel->getActiveSheet()->setCellValue('T'.$i, $tdk_ada);\n // $this->excel->getActiveSheet()->setCellValue('U'.$i, $ayah);\n // $this->excel->getActiveSheet()->setCellValue('V'.$i, $ibu);\n // $this->excel->getActiveSheet()->setCellValue('W'.$i, $tdk_ada);\n \n // $i++;\n // }\n // }\n #endregion rowdata\n $i = 7; \n $ittd = $i+4; \n $this->excel->getActiveSheet()->setCellValue('J'.$ittd, \"TANDA TANGAN KEPALA LKSA\");\n $this->excel->getActiveSheet()->mergeCells('J'.$ittd.':K'.$ittd);\n $this->excel->getActiveSheet()->getStyle('J'.$ittd.':K'.$ittd)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('J'.$ittd.':K'.$ittd)->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $ictt = $i;\n $this->excel->getActiveSheet()->setCellValue('B'.$ictt, \"Catatan:\");\n $this->excel->getActiveSheet()->mergeCells('B'.$ictt.':C'.$ictt);\n $this->excel->getActiveSheet()->getStyle('B'.$ictt.':C'.$ictt)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_LEFT);\n $this->excel->getActiveSheet()->getStyle('B'.$ictt.':C'.$ictt)->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $istt = $i+2;\n $this->excel->getActiveSheet()->setCellValue('B'.$istt, \"*)Status Kepegawaian: 1.Tetap; 2.Kontrak; 3.Relawan\");\n $this->excel->getActiveSheet()->mergeCells('B'.$istt.':D'.$istt);\n $this->excel->getActiveSheet()->getStyle('B'.$istt.':D'.$istt)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $this->excel->getActiveSheet()->getStyle('B'.$istt.':D'.$istt)->getAlignment()->setVertical(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \n // for($col = 'A'; $col !== 'Y'; $col++) {\n \n // $this->excel->getActiveSheet()\n // ->getColumnDimension($col)\n // ->setAutoSize(true);\n // }\n \n $styleArray = array(\n 'borders' => array(\n 'allborders' => array(\n 'style' => PHPExcel_Style_Border::BORDER_THIN\n )\n )\n );\n $styleArray2 = array(\n 'borders' => array(\n 'allborders' => array(\n 'style' => PHPExcel_Style_Border::BORDER_THICK\n )\n )\n );\n \n\t\t$i = $i-1;\n\t\t$cell_to = \"K\".$i;\n\t\t$this->excel->getActiveSheet()->getStyle('A5:'.$cell_to)->applyFromArray($styleArray);\n\t\t$this->excel->getActiveSheet()->getStyle('B1:B2')->applyFromArray($styleArray2);\n\t\t$this->excel->getActiveSheet()->getStyle('D1:K1')->getFont()->setBold(true);\n\t\t// $this->excel->getActiveSheet()->getStyle('A4:Y4')->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID);\n\t\t// $this->excel->getActiveSheet()->getStyle('A4:Y4')->getFill()->getStartColor()->setRGB('2CC30B');\n\n\t\t$filename='FORM B.xls'; //save our workbook as this file name\n\t\theader('Content-Type: application/vnd.ms-excel'); //mime type\n\t\theader('Content-Disposition: attachment;filename=\"'.$filename.'\"'); //tell browser what's the file name\n\t\theader('Cache-Control: max-age=0');//no cache\n\n\t\t//save it to Excel5 format (excel 2003 .XLS file), change this to 'Excel2007' (and adjust the filename extension, also the header mime type)\n\t\t//if you want to save it as .XLSX Excel 2007 format\n\t\t$objWriter = PHPExcel_IOFactory::createWriter($this->excel, 'Excel5');\n\t\t//force user to download the Excel file without writing it to server's HD\n\t\t$objWriter->save('php://output');\n\t}", "title": "" }, { "docid": "8f29609840a7c31aa0c3bf75787102d7", "score": "0.39282042", "text": "function AggregateListRow() {\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}", "title": "" }, { "docid": "8f29609840a7c31aa0c3bf75787102d7", "score": "0.39282042", "text": "function AggregateListRow() {\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}", "title": "" }, { "docid": "8f29609840a7c31aa0c3bf75787102d7", "score": "0.39282042", "text": "function AggregateListRow() {\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}", "title": "" }, { "docid": "fdad66be0ebffd7c1b832d12790d8227", "score": "0.3925966", "text": "function layout_section($objPHPExcel, $access_code, $calls, $current_row, $current_itm){\n if(is_array($calls) && count($calls) > 0){\n\t $objPHPExcel->getActiveSheet()->getCell('A' . $current_row)->setValue(\"Division Name :\"); \n\t $objPHPExcel->getActiveSheet()->getCell('C' . $current_row)->setValue($calls['0']->inv_detail);\n\t $objPHPExcel->getActiveSheet()->mergeCells('A' . $current_row . ':B' . $current_row);\n\t $objPHPExcel->getActiveSheet()->mergeCells('C' . $current_row . ':G' . $current_row);\n\t $objPHPExcel->getActiveSheet()->getStyle('A' . $current_row . ':L' . $current_row)->applyFromArray($this->get_style_array('division_style_top'));\n\t $current_row++;\n\t $objPHPExcel->getActiveSheet()->getCell('A' . $current_row)->setValue(\"Access Code :\");\n\t $objPHPExcel->getActiveSheet()->getCell('C' . $current_row)->setValue($access_code);\n\t $objPHPExcel->getActiveSheet()->mergeCells('A' . $current_row . ':B' . $current_row);\n\t $objPHPExcel->getActiveSheet()->mergeCells('C' . $current_row . ':G' . $current_row);\n\t $objPHPExcel->getActiveSheet()->getStyle('A' . $current_row . ':L' . $current_row)->applyFromArray($this->get_style_array('division_style_bottom'));\n\t $current_row++;\n\t $first_row = $current_row;\n\t $call_count = 0;\n foreach($calls as $index => $call){\n $call_count++;\n PHPExcel_Cell::setValueBinder(new PHPExcel_Cell_AdvancedValueBinder());\n if($current_row %65 == 0){\n $objPHPExcel = $this->page_break($objPHPExcel, $current_row);\n $current_row = $current_row + 3;\n }\n $objPHPExcel->getActiveSheet()->getCell('A' . $current_row)->setValue($current_itm);\n $objPHPExcel->getActiveSheet()->getCell('B' . $current_row)->setValue('05-' . ($call->id + 11176));\n $objPHPExcel->getActiveSheet()->getCell('C' . $current_row)->setValue($call->inv_start);\n $objPHPExcel->getActiveSheet()->getStyle('C' . $current_row)->applyFromArray($this->get_style_array('format_date'));\n $objPHPExcel->getActiveSheet()->getCell('D' . $current_row)->setValue($call->inv_start);\n $objPHPExcel->getActiveSheet()->getStyle('D' . $current_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME3);\n $objPHPExcel->getActiveSheet()->getCell('E' . $current_row)->setValue($call->inv_end);\n $objPHPExcel->getActiveSheet()->getStyle('E' . $current_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME3);\n $objPHPExcel->getActiveSheet()->getCell('F' . $current_row)->setValue($call->language);\n $objPHPExcel->getActiveSheet()->getCell('G' . $current_row)->setValue($call->interpreter_id); \n $objPHPExcel->getActiveSheet()->getCell('H' . $current_row)->setValue($call->caller_name);\n $objPHPExcel->getActiveSheet()->getCell('I' . $current_row)->setValue($call->inv_phone != 0 ? $call->inv_phone:'Caller ID Blocked'); \n $objPHPExcel->getActiveSheet()->getStyle('I' . $current_row)->getNumberFormat()->setFormatCode(\"[<=9999999]###\\-####;#\\(###\\)\\ ###\\-####\");\n $objPHPExcel->getActiveSheet()->getCell('J' . $current_row)->setValue($call->rate_code);\n $end_start = \"(E\" . $current_row . \"-D\" . $current_row . \")*1440\";\n $no_add_clients = array('18662', '186621', '186622', '186623', '186624', '186625', '186626', '186627', '186637', '186632', '186642', '186633', '186643', '186644', '186645', '186646', '186647', '186650', '186653', '186656', '18670', '18673', '18676', '18679', '18682', '18685', '18688', '18691', '18694', '18697', '18700', '18703', '18706', '18709', '18712', '20503');\n if(in_array((string)$call->access_code, $no_add_clients)){\n $objPHPExcel->getActiveSheet()->getCell('K' . $current_row)->setValue(\"=ROUNDUP(\" . $end_start . \",0)\");\n } else{\n $objPHPExcel->getActiveSheet()->getCell('K' . $current_row)->setValue(\"=ROUNDUP(\" . $end_start . \",0)+1\");\n }\n $objPHPExcel->getActiveSheet()->getCell('L' . $current_row)->setValue(\"=K\" . $current_row . \"*M\" . $current_row);\n $objs['0']->inv_detail);\n\t $objPHPExcel->getActiveSheet()->mergeCells('A' . $current_row . ':B' . $current_row);\n\t $objPHPExcel->getActiveSheet()->mergeCells('C' . $current_row . ':G' . $current_row);\n\t $objPHPExcel->getActiveSheet()->getStyle('A' . $current_row . ':L' . $current_row)->applyFromArray($this->get_style_array('division_style_top'));\n\t $current_row++;\n\t $objPHPExcel->getActiveSheet()->getCell('A' . $current_row)->setValue(\"Access Code :\");\n\t $objPHPExcel->getActiveSheet()->getCell('C' . $current_row)->setValue($access_code);\n\t $objPHPExcel->getActiveSheet()->mergeCells('A' . $current_row . ':B' . $current_row);\n\t $objPHPExcel->getActiveSheet()->mergeCells('C' . $current_row . ':G' . $current_row);\n\t $objPHPExcel->getActiveSheet()->getStyle('A' . $current_row . ':L' . $current_row)->applyFromArray($this->get_style_array('division_style_bottom'));\n\t $current_row++;\n\t $first_row = $current_row;\n\t $call_count = 0;\n foreach($calls as $index => $call){\n $call_count++;\n PHPExcel_Cell::setValueBinder(new PHPExcel_Cell_AdvancedValueBinder());\n if($current_row %65 == 0){\n $objPHPExcel = $this->page_break($objPHPExcel, $current_row);\n $current_row = $current_row + 3;\n }\n $objPHPExcel->getActiveSheet()->getCell('A' . $current_row)->setValue($current_itm);\n $objPHPExcel->getActiveSheet()->getCell('B' . $current_row)->setValue('05-' . ($call->id + 11176));\n $objPHPExcel->getActiveSheet()->getCell('C' . $current_row)->setValue($call->inv_start);\n $objPHPExcel->getActiveSheet()->getStyle('C' . $current_row)->applyFromArray($this->get_style_array('format_date'));\n $objPHPExcel->getActiveSheet()->getCell('D' . $current_row)->setValue($call->inv_start);\n $objPHPExcel->getActiveSheet()->getStyle('D' . $current_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME3);\n $objPHPExcel->getActiveSheet()->getCell('E' . $current_row)->setValue($call->inv_end);\n $objPHPExcel->getActiveSheet()->getStyle('E' . $current_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME3);\n $objPHPExcel->getActiveSheet()->getCell('F' . $current_row)->setValue($call->language);\n $objPHPExcel->getActiveSheet()->getCell('G' . $current_row)->setValue($call->interpreter_id); \n $objPHPExcel->getActiveSheet()->getCell('H' . $current_row)->setValue($call->caller_name);\n $objPHPExcel->getActiveSheet()->getCell('I' . $current_row)->setValue($call->inv_phone != 0 ? $call->inv_phone:'Caller ID Blocked'); \n $objPHPExcel->getActiveSheet()->getStyle('I' . $current_row)->getNumberFormat()->setFormatCode(\"[<=9999999]###\\-####;#\\(###\\)\\ ###\\-####\");\n $objPHPExcel->getActiveSheet()->getCell('J' . $current_row)->setValue($call->rate_code);\n $end_start = \"(E\" . $current_row . \"-D\" . $current_row . \")*1440\";\n $no_add_clients = array('18662', '186621', '186622', '186623', '186624', '186625', '186626', '186627', '186637', '186632', '186642', '186633', '186643', '186644', '186645', '186646', '186647', '186650', '186653', '186656', '18670', '18673', '18676', '18679', '18682', '18685', '18688', '18691', '18694', '18697', '18700', '18703', '18706', '18709', '18712', '20503');\n if(in_array((string)$call->access_code, $no_add_clients)){\n $objPHPExcel->getActiveSheet()->getCell('K' . $current_row)->setValue(\"=ROUNDUP(\" . $end_start . \",0)\");\n } else{\n $objPHPExcel->getActiveSheet()->getCell('K' . $current_row)->setValue(\"=ROUNDUP(\" . $end_start . \",0)+1\");\n }\n $objPHPExcel->getActiveSheet()->getCell('L' . $current_row)->setValue(\"=K\" . $current_row . \"*M\" . $current_row);\n $objPHPExcel->getActiveSheet()->getStyle('L' . $current_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE);\n $objPHPExcel->getActiveSheet()->getCell('M' . $current_row)->setValue($call->rate);\n $objPHPExcel->getActiveSheet()->getCell('N' . $current_row)->setValue($call->access_code);\n $objPHPExcel->getActiveSheet()->getCell('O' . $current_row)->setValue($call->inv_detail);\n $objPHPExcel->getActiveSheet()->getCell('R' . $current_row)->setValue($call->inv_special);\n if($call->callout == 1 && $this->isTNClients($call)){\n \t$shifty = clone $call;\n \t$shifty->inv_start = date('Y-m-d H:i:s', strtotime($shifty->inv_start)+60);\n \t$shifty->inv_phone = $shifty->callout_number;\n \t$shifty->caller_name = 'LEP';\n \tarray_splice($calls, $index+1, 0, array($shifty));\n \t$times = array(strtotime($call->link_timestamp), strtotime($call->answer_timestamp), strtotime($call->start_timestamp));\n \tsort($times);\n \t$objPHPExcel->getActiveSheet()->getCell('D' . $current_row)->setValue(date('Y-m-d H:i:s', $times['0']));\n $objPHPExcel->getActiveSheet()->getStyle('D' . $current_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME3);\n }\n $current_row++;\n $current_itm++;\n }\n $current_row++;\n $sub_minutes = \"=sum(K\" . $first_row . \":K\" . ($current_row - 1) . \")\";\n $sub_cost = \"=sum(L\" . $first_row . \":L\" . ($current_row - 1) . \")\";\n $objPHPExcel->getActiveSheet()->getCell('J' . $current_row)->setValue('SUBTOTAL');\n $objPHPExcel->getActiveSheet()->getCell('K' . $current_row)->setValue($sub_minutes);\n $objPHPExcel->getActiveSheet()->getCell('L' . $current_row)->setValue($sub_cost);\n $objPHPExcel->getActiveSheet()->getStyle('L' . $current_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE);\n $objPHPExcel->getActiveSheet()->getStyle('J' . $current_row . ':L' . $current_row)->applyFromArray($this->get_style_array('total_style'));\n $current_row++;\n }\n\t return array($objPHPExcel, $current_row, $con_time_clients);\n }\n\n function page_break($objPHPExcel, $current_row){\n $objPHPExcel->getActiveSheet()->setBreak('A' . $current_row, PHPExcel_Worksheet::BREAK_ROW);\n $current_row++;\n $objPHPExcel->getActiveSheet()->getStyle('A' . $current_row)->applyFromArray($this->get_style_array('header_style'));\n $objPHPExcel->getActiveSheet()->getStyle('B' . $current_row)->applyFromArray($this->get_style_array('header_style'));\n $objPHPExcel->getActiveSheet()->getStyle('C' . $current_row)->applyFromArray($this->get_style_array('header_style'));\n $objPHPExcel->getActiveSheet()->getStyle('D' . $current_row)->applyFromArray($this->get_style_array('header_style'));\n $objPHPExcel->getActiveSheet()->getStyle('E' . $current_row)->applyFromArray($this->get_style_array('header_style'));\n $objPHPExcel->getActiveSheet()->getStyle('F' . $current_row)->applyFromArray($this->get_style_array('header_style'));\n $objPHPExcel->getActiveSheet()->getStyle('G' . $current_row)->applyFromArray($this->get_style_array('header_style'));\n $objPHPExcel->getActiveSheet()->getStyle('H' . $current_row)->applyFromArray($this->get_style_array('header_style'));\n $objPHPExcel->getActiveSheet()->getStyle('I' . $current_row)->applyFromArray($this->get_style_array('header_style'));\n $objPHPExcel->getActiveSheet()->getStyle('J' . $current_row)->applyFromArray($this->get_style_array('header_style'));\n $objPHPExcel->getActiveSheet()->getStyle('K' . $current_row)->applyFromArray($this->get_style_array('header_style'));\n $objPHPExcel->getActiveSheet()->getStyle('L' . $current_row)->applyFromArray($this->get_style_array('header_style'));\n\n $objPHPExcel->getActiveSheet()->getCell('A' . $current_row)->setValue(\"ITEM\");\n $objPHPExcel->getActiveSheet()->getCell('B' . $current_row)->setValue(\"JOB \\nNUMBER\");\n $objPHPExcel->getActiveSheet()->getStyle('B' . $current_row)->getAlignment()->setWrapText(true);\n $objPHPExcel->getActiveSheet()->getCell('C' . $current_row)->setValue(\"DATE\");\n $objPHPExcel->getActiveSheet()->getCell('D' . $current_row)->setValue(\"START \\nTIME\");\n $objPHPExcel->getActiveSheet()->getStyle('D' . $current_row)->getAlignment()->setWrapText(true);\n $objPHPExcel->getActiveSheet()->getCell('E' . $current_row)->setValue(\"END \\nTIME\");\n $objPHPExcel->getActiveSheet()->getStyle('E' . $current_row)->getAlignment()->setWrapText(true);\n $objPHPExcel->getActiveSheet()->getCell('F' . $current_row)->setValue(\"LANGUAGE\");\n $objPHPExcel->getActiveSheet()->getCell('G' . $current_row)->setValue(\"INTERPRETER \\nID\");\n $objPHPExcel->getActiveSheet()->getStyle('G' . $current_row)->getAlignment()->setWrapText(true);\n $objPHPExcel->getActiveSheet()->getCell('H' . $current_row)->setValue(\"CONTACT \\nPERSON\");\n $objPHPExcel->getActiveSheet()->getStyle('H' . $current_row)->getAlignment()->setWrapText(true);\n $objPHPExcel->getActiveSheet()->getCell('I' . $current_row)->setValue(\"CONTACT \\nNUMBER\");\n $objPHPExcel->getActiveSheet()->getStyle('I' . $current_row)->getAlignment()->setWrapText(true);\n $objPHPExcel->getActiveSheet()->getCell('J' . $current_row)->setValue(\"RATE CODE\");\n $objPHPExcel->getActiveSheet()->getCell('K' . $current_row)->setValue(\"MINUTES\");\n $objPHPExcel->getActiveSheet()->getCell('L' . $current_row)->setValue(\"CHARGE\");\n return $objPHPExcel;\n }\n\n function get_style_array($style){\n $hair_border = array('style' => PHPExcel_Style_Border::BORDER_HAIR);\n $thin_border = array('style' => PHPExcel_Style_Border::BORDER_THIN);\n $medm_border = array('style' => PHPExcel_Style_Border::BORDER_MEDIUM);\n $dobl_border = array('style' => PHPExcel_Style_Border::BORDER_DOUBLE);\n $grey_border = array('style' => PHPExcel_Style_Border::BORDER_HAIR, 'color' => array('argb' => 'C0C0C0'));\n $none_border = array('style' => PHPExcel_Style_Border::BORDER_NONE);\n\n $main_style = array(\n 'font' => array(\n 'name' => 'Arial', \n 'bold' => false, \n 'italic' => false, \n 'size' => 8), \n 'alignment' => array(\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER, \n 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER, \n 'wrap' => false)\n );\n //MAIN STYLE\n $all_styles = array('main_style' => $main_style);\n\n $all_styles['header_style'] = $main_style;\n $all_styles['header_style']['borders']['top'] = $thin_border;\n $all_styles['header_style']['borders']['bottom'] = $dobl_border;\n $all_styles['header_style']['borders']['left'] = $none_border;\n $all_styles['header_style']['borders']['right']= $none_border;\n\n $all_styles['duplicate_style'] = $main_style;\n $all_styles['duplicate_style']['borders']['top'] = $thin_border;\n $all_styles['duplicate_style']['borders']['bottom'] = $thin_border;\n $all_styles['duplicate_style']['borders']['left'] = $thin_border;\n $all_styles['duplicate_style']['borders']['right']= $thin_border;\n\n //TOTAL ROW STYLE\n $totals_template = $main_style;\n $totals_template['font']['bold'] = true;\n\n $all_styles['total_style'] = $totals_template;\n $all_styles['total_style']['borders']['top'] = $hair_border;\n $all_styles['total_style']['borders']['bottom'] = $thin_border;\n $all_styles['total_style']['borders']['left'] = $hair_border;\n $all_styles['total_style']['borders']['right']= $hair_border;\n\n $all_styles['summary_row_style'] = $totals_template;\n $all_styles['summary_row_style']['borders']['top'] 'MINUTES', \n\t\t\t\t\t\t\t'L' => 'CHARGES'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t));\n \t\tbreak;\n\n \t\tcase 'section_head':\n \t\t\tif(is_array($data)){\n \t\t\t\tarray_merge($invoice, array(\n \t\t\t\t\tarray(),\n \t\t\t\t\tarray(\n \t\t\t\t\t\t'merge' => array(array('A', 'B'), array('C', 'G')),\n \t\t\t\t\t\t'style' => array('division_style_top' => array('A', 'L')),\n \t\t\t\t\t\t'values' => array(\n\t \t\t\t\t\t\t'A' => \"Division Name :\",\n\t \t\t\t\t\t\t'C' => $data['division']\n\t \t\t\t\t\t)\n \t\t\t\t\t),\n \t\t\t\t\tarray(\n \t\t\t\t\t\t'merge' => array(array('A', 'B'), array('C', 'G')),\n \t\t\t\t\t\t'style' => array('division_style_bottom' => array('A', 'L')),\n \t\t\t\t\t\t'values' => array(\n\t \t\t\t\t\t\t'A' => \"Access Code :\",\n\t \t\t\t\t\t\t'C' => $data['access_code']\n \t\t\t\t\t\t)\n \t\t\t\t\t)\n \t\t\t\t)); \t\t\t\t\n \t\t\t}\n \t\tbreak;\n\n \t\tcase 'section_foot':\n \t\t\tarray_merge($invoice, array(\n \t\t\t\tarray(),\n \t\t\t\tarray( \t\t\t\t\n\t \t\t\t\t'style' => array('total_style' => array('J', 'L')),\n\t \t\t\t\t'format' => array('currency' => array('L')),\n\t \t\t\t\t'values' => array(\n\t\t \t\t\t\t'J' => 'SUBTOTAL',\n\t\t \t\t\t\t'K' => $data['call_count'],\n\t\t \t\t\t\t'L' => $data['call_count']\n\t \t\t\t\t)\n\t \t\t\t)\n\t \t\t));\n \t\tbreak;\n\n\t\t\tcase 'totals':\n \t\t\tarray_merge($invoice, array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'merge' => array(array('E', 'I')),\n\t\t\t\t\t\t'style' => array('summary_row2_style' => array('E', 'L')),\n\t\t\t\t\t\t'format' => array('currency' => array('L')),\n\t\t\t\t\t\t'values' => array(\n\t\t\t\t\t\t\t'E' => 'Over-the-phone Interpretation:',\n\t\t\t\t\t\t\t'K' => $data['minutes'],\n\t\t\t\t\t\t\t'L' => $data['charges']\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\tarray(),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'merge' => array(array('K', 'L'), array('H', 'L')),\n\t\t\t\t\t\t'style' => array('grand_total_style' => array('H', 'L')),\n\t\t\t\t\t\t'format' => array('currency' => array('K')),\n\t\t\t\t\t\t'values' => array(\n\t\t\t\t\t\t\t'I' => 'TOTAL CHARGES',\n\t\t\t\t\t\t\t'C' => $data['charges']\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\tarray(),\n\t\t\t\t\tarray()\n\t\t\t\t)); \n \t\tbreak;\n\n \t\tcase 'calls':\n \t\t\tif(isset($data)){\n \t\t\t\tforeach($data as $index => $call){\n \t\t\t\t\t$start_inv = $this->getStartInv($call);\n \t\t\t\t\t$end_t_inv = $this->getEndTmInv($call);\n \t\t\t\t\t$minutes = $this->getMinutes($call);\n \t\t\t\t\t$charges = $this->getCharges($call);\n \t\t\t\t\t$caller_number = $this->getCallerId($call);\n \t\t\t\t\t$date = $start_inv;\n \t\t\t\t\t$item = $index + 1;\n \t\t\t\t\t$job_number = '05-' . $call->job_number;\n \t\t\t\t\tarray_merge($invoice, array(\n\t\t\t\t\t\t\t'style' => array(\n\t\t\t\t\t\t\t\t'format_date' => array('C'), \n\t\t\t\t\t\t\t\t'summary_row2_style' => array('A', 'L')\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'format' => array(\n\t\t\t\t\t\t\t\t'time' => array('D', 'E'),\n\t\t\t\t\t\t\t\t'phone' => array('I'),\n\t\t\t\t\t\t\t\t'currency' => array('L')\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'values' => array(\n\t\t\t\t\t\t\t\t'A' => $item,\n\t\t\t\t\t\t\t\t'B' => $job_number,\n\t\t\t\t\t\t\t\t'C' => $date,\n\t\t\t\t\t\t\t\t'D' => $start_time_inv,\n\t\t\t\t\t\t\t\t'E' => $end_time_inv,\n\t\t\t\t\t\t\t\t'F' => $call->language,\n\t\t\t\t\t\t\t\t'G' => $call->intid,\n\t\t\t\t\t\t\t\t'H' => $call->rep_name,\n\t\t\t\t\t\t\t\t'I' => $caller_number,\n\t\t\t\t\t\t\t\t'J' => $call->rate_code,\n\t\t\t\t\t\t\t\t'K' => $minutes,\n\t\t\t\t\t\t\t\t'L' => $charges,\n\t\t\t\t\t\t\t\t'M' => $call->rate,\n\t\t\t\t\t\t\t\t'N' => $call->access_code\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\n \t\tbreak;\n\n \t\tdefault:\n \t\t\twhile ($data > 0){\n \t\t\t\t$data--;\n \t\t\t\tarray_merge($invoice, array());\n \t\t\t}\n \t\tbreak;\n \t}\n \treturn $invoice;\n }", "title": "" }, { "docid": "f9b82a054ba686ec957031dfe9e34e15", "score": "0.39196536", "text": "public function merge(array $config)\r\n {\r\n $this->ensureLoaded();\r\n $this->mergeSectionRecursive($this->config, $config, null);\r\n }", "title": "" }, { "docid": "bffe6132f078db52bcd0af362360ecc5", "score": "0.3899608", "text": "protected function doConcatenate() {}", "title": "" }, { "docid": "40d6e141bc39240dad486ee32a5ffc46", "score": "0.38962874", "text": "public function aggregateListRowValues()\n {\n }", "title": "" }, { "docid": "40d6e141bc39240dad486ee32a5ffc46", "score": "0.38962874", "text": "public function aggregateListRowValues()\n {\n }", "title": "" }, { "docid": "1bdae94a845eed353ab1d45725faa516", "score": "0.38940486", "text": "function getTranscriptOverlap($chrom_id,$chrom_start,$chrom_end,$strand){\n $query=\"select t.transcript_local_id,t.gene_id,td.accession_id,chromosome_id,transcript_start,transcript_end,\";\n $query.=\"transcript_strand from cgd_transcripts t,cgd_transcripts_desc td \";\n $query.=\" where td.transcript_local_id=t.transcript_local_id\";\n $query.=\" and chromosome_id=$chrom_id \";\n if(!empty($strand))$query.=\" and transcript_strand='$strand'\";\n $query.=\" and transcript_end >= $chrom_start and transcript_start<=$chrom_end order by transcript_start\";\n global $cgd_con;if(!$cgd_con)$cgd_con=getCgdConnection();\n $result = mysql_query($query,$cgd_con);\n // if(!$result)queryError($query,mysql_error());\n while($row= mysql_fetch_assoc($result)){\n $gene_id=$row[\"gene_id\"];\n $mgisymbol=getMGIGeneName($gene_id);if(!empty($mgisymbol))$mgisymbol=\" ($mgisymbol)\";\n $gene=getEnsGeneName($gene_id).$mgisymbol;\n $tx[]=array('transcript'=> array('id'=>$row[\"transcript_local_id\"],'name'=>$row[\"accession_id\"],\n 'gene'=>$gene,\n 'chromosome_id'=>$row[\"chromosome_id\"],'start'=>$row[\"transcript_start\"],\n 'end'=>$row[\"transcript_end\"],'strand'=>$row[\"transcript_strand\"]));\n }\n $txList['transcripts']=$tx;\n return $txList;\n}", "title": "" }, { "docid": "05a321f0abdbee0cdb7b35e9d01ae930", "score": "0.38875467", "text": "function merge_2_ipranges($iprange1,$iprange2)\n{\n\n\t$ipr1exploded = explode('_',$iprange1);\n\t$ipr2exploded = explode('_',$iprange2);\n\t\n\t$oct1 = explode('.',$ipr1exploded[0]);\n\t$oct2 = explode('.',$ipr2exploded[0]);\t\n\tif ($oct1[0] == $oct2[0] && $oct1[1] == $oct2[1] && $oct1[2] == $oct2[2]) {\t\n\t\n\t$ipr1s = ip2long($ipr1exploded[0]);\n\t$ipr1e = ip2long($ipr1exploded[1]);\n\t$ipr2s = ip2long($ipr2exploded[0]);\n\t$ipr2e = ip2long($ipr2exploded[1]);\n\t\n\tif ( ($ipr1e + 1) >= $ipr2s && $ipr1s <= ($ipr2e + 1) ){\n\t\tif ($ipr1s <= $ipr2s){ $ipr3s = $ipr1s; }else{ $ipr3s = $ipr2s; }\n\t\tif ($ipr1e <= $ipr2e){ $ipr3e = $ipr2e; }else{ $ipr3e = $ipr1e; }\n\t\t\n\t\tif ($ipr3s <= $ipr3e){\n\t\t\t$iprange3 = long2ip($ipr3s).\"_\".long2ip($ipr3e); \n\t\t\t#printf(\"Merging: %s and %s -> %s<br>\",$iprange1,$iprange2,$iprange3);\n\t\t\treturn $iprange3; \n\t\t}\n\t\telse{\n\t\t\t# printf(\"No Merging possible: %s and %s<br>\",$iprange1,$iprange2); \n\t\t\treturn 0; }\n\t}\n\telse{\n\t\t# printf(\"No Merging possible: %s and %s<br>\",$iprange1,$iprange2);\n\t\treturn 0;\n\t}\n\t}else{\n\t\t# printf(\"No Merging possible: %s and %s<br>Not same Subnet\",$iprange1,$iprange2);\n\t\treturn 0;\n\t}\n}", "title": "" }, { "docid": "0143fc7f0259c6b6cbee6f6407abd2b0", "score": "0.38821816", "text": "public function setaggregates( $param ) {\n\t\tif(is_array($param)) {\n\t\t\t$this->pivotoptions['aggregates'] = jqGridUtils::array_extend($this->pivotoptions['aggregates'],$param);\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "77dd5becf97ae40e1016f340a2966323", "score": "0.38819337", "text": "public function getCellForMerge(int $row, int $col) : Cell\n {\n\n // If it already exists - throw.\n if (isset($this->cells[$row][$col]) === true) {\n $cellRef = XlsxTools::convToCellRef($row, $col);\n throw new CellMergeConflictException($cellRef);\n }\n\n // Add to index.\n $cell = new Cell($this, $row, $col, true);\n $this->cells[$row][$col] = $cell;\n\n return $cell;\n }", "title": "" }, { "docid": "3c648853e57bd0216f4607ee416b5ce4", "score": "0.38798717", "text": "public function merge($page = 0) {\n $config = [];\n $config[PagingEnum::BASE_URL] = base_url() . \"index.php/block/merge\";\n $config[PagingEnum::TOTAL_ROWS] = $this->database->findGroupByFormulaCount();\n $config[PagingEnum::PER_PAGE] = CommonConstants::PAGING;\n\n $this->pagination->initialize($config);\n\n $data['results'] = $this->database->findMergeBlocks($page);\n $data[PagingEnum::LINKS] = $this->pagination->create_links();\n\n $this->load->view(Front::TEMPLATES_HEADER);\n $this->load->view(\"blocks/merge\", $data);\n $this->load->view(Front::TEMPLATES_FOOTER);\n }", "title": "" }, { "docid": "35002bcc60656e8aeb1a8832001212fb", "score": "0.38794604", "text": "function AggregateListRow() {\r\n\r\n\t\t// Call Row Rendered event\r\n\t\t$this->Row_Rendered();\r\n\t}", "title": "" }, { "docid": "10839e2879a170249d93043c8935a66b", "score": "0.38760403", "text": "function imagecopymerge_alpha($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h, $pct){\n\t$cut = imagecreatetruecolor($src_w, $src_h); \n\timagecopy($cut, $dst_im, 0, 0, $dst_x, $dst_y, $src_w, $src_h);\n\timagecopy($cut, $src_im, 0, 0, $src_x, $src_y, $src_w, $src_h);\n\timagecopymerge($dst_im, $cut, $dst_x, $dst_y, 0, 0, $src_w, $src_h, $pct); \n}", "title": "" } ]
c7a5abcbc7a8d73985b6a39b381c8844
Submits an error to the database for logging. Message preferably gives a hint as to where the error happened, arrDebugInfo contains parameters that may have caused it and will be dumped into a string as well.
[ { "docid": "5eacdc27a8bfe97cb1ccdc397de0b6f4", "score": "0.7196625", "text": "public function logError($message, $arrDebugInfo) {\n if ($this->dbHandler === NULL) {\n $this->connect();\n }\n\n $message = (string) $message;\n $arrDebugInfo = (array) $arrDebugInfo;\n\n try {\n $query = 'INSERT INTO ErrorLogging(message, debugInfo) VALUES(?, ?)';\n $stmt = $this->dbHandler->prepare($query);\n $stmt->execute([$message, var_export($arrDebugInfo, true)]);\n }\n catch (Exception $ex) {\n throw new Exception('How do you debug debugging? This takes us to a whole new level of stuff-uppery...');\n }\n }", "title": "" } ]
[ { "docid": "233290bb8d952610ad92e1a48af84139", "score": "0.6163226", "text": "function logErrorInDB($errorText, $error)\n{\n // ErrorLog -> id, readableMessage, errorMessage, dateGenerated\n $pdo = $GLOBALS['pdo'];\n $sql = \"INSERT INTO ErrorLog (readableMessage, errorMessage) VALUES (?, ?)\";\n $stmt = $pdo->prepare($sql);\n $stmt->bindValue(1, $errorText);\n $stmt->bindValue(2, $error);\n $stmt->execute();\n}", "title": "" }, { "docid": "2a588bc7a7fc50dd0be6c1f52218582f", "score": "0.60471565", "text": "function logPdoError($errorInfo) {\r\n $error = '[';\r\n $error .= 'SQLSTATE error code: ' . $errorInfo[0];\r\n $error .= ', Driver-specific error code: ' . $errorInfo[1];\r\n $error .= ', Driver-specific error message: ' . $errorInfo[2];\r\n $error .= ']';\r\n if ($this->log != null) {\r\n $this->log->critical(static::class . '.php', 'Database returned error: ' . $error);\r\n } else {\r\n echo static::class . '.php' . 'Database returned error: ' . $error;\r\n }\r\n }", "title": "" }, { "docid": "2401663b2da442a647cb696bd3144f54", "score": "0.60435957", "text": "function db_log_error($statement,array $args=null) {\n\tstatic $stm=null;\n\tif($stm==null){\n\t\t$db = db_get_connection();\n\t\tif(!$db){\n\t\t\tthrow new IllegalStateException('Failed to get a database object.');\n\t\t}\n\t\t$stm=$db->prepare('INSERT INTO errors (err_date, err_msg, err_query) VALUES (NOW(),:message,:query)');\n\t\tif(!$stm){\n\t\t\tthrow new IllegalStateException('Failed to prepare the error statement.');\n\t\t}\n\t}\n\tif(!is_object($statement)){\n\t\tthrow new IllegalArgumentException('$statement is not an object.');\n\t}\n\t$err=$statement->errorInfo();\n\t$params=array(\n\t\t\t':query'=>db_stm_to_string($statement->queryString,$args),\n\t\t\t':message'=>'Err array:'.var_export($err,true)\n\t);\n\ttry{\n\t\t$stm->execute($params);\n\t}catch(PDOException $e){\n\t\tif(db_debug()){\n\t\t\tthrow $e;\n\t\t}\n\t}\n\treturn $err;\n}", "title": "" }, { "docid": "fcc496d3e5d5040ae123b11d598101ba", "score": "0.6009414", "text": "protected function error ( $message = '' ) {\n\t\t$this->registerLog( 'error', __METHOD__.'() (MySQL #'.$this->error_code.') '.$this->error_message, 2 );\n\t\tswitch ( $this->error_code ) {\n\t\t\tcase 0: // no error_message occurred\n\t\t\t\t$this->registerLog( 'error', __METHOD__.'() (MySQL #'.$this->error_code.') '.$message, 2 );\n\t\t\t\tbreak;\n\t\t\tcase '42000':\t// 1049: // unknown database (not exists?)\n\t\t\t\t$this->registerLog( 'error', __METHOD__.'() (MySQL #'.$this->error_code.') unknown requested database (not exists?). [SQL: '.$this->sql.']', 2 );\n\t\t\t\tbreak;\n\t\t\tcase '42S22':\t// 1054: // unknown column (not exists?)\n\t\t\t\t$this->registerLog( 'error', __METHOD__.'() (MySQL #'.$this->error_code.') unknown requested column (not exists?). [SQL: '.$this->sql.']', 2 );\n\t\t\t\tbreak;\n\t\t\tcase '42S02':\t// 1146: // table does not exist\n\t\t\t\t$this->registerLog( 'error', __METHOD__.'() (MySQL #'.$this->error_code.') requested table does not exist. [SQL: '.$this->sql.']', 2 );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->registerLog( 'error', __METHOD__.'() (MySQL #'.$this->error_code.') '.$this->error_message.' [SQL: '.$this->sql.']', 2 );\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "1e9ad623c7a8db8ae940d7f1b53b5fa5", "score": "0.5914381", "text": "public function logDbErrors($error, $query)\n {\n if ($this->debug == true) {\n if ($this->send_to != null) {\n $message = \"<p>Error at \". date(\"Y-m-d H:i:s\").\":</p>\";\n $message .= \"<p>Query: \". htmlentities($query).\"<br />\";\n $message .= \"Error: {$error}<br />\";\n $message .= \"Page: \" . $_SERVER[\"REQUEST_URI\"] .\"<br />\";\n $message .= \"</p>\";\n\n $headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\n $headers .= \"Content-type: text/html; charset=iso-8859-1\" . \"\\r\\n\";\n $headers .= \"To: Admin <{$this->send_to}>\\r\\n\";\n $headers .= \"From: Admin <{$this->send_to}>\\r\\n\";\n\n mail($this->send_to, 'Database Error', $message, $headers);\n }\n\n if ($this->display_errors) {\n echo $error;\n }\n }\n }", "title": "" }, { "docid": "4c8b8680ecdeed2b2505d422ec161549", "score": "0.5830847", "text": "private function _log($msg)\n\t{\n\t\tob_start();\n\t\tvar_dump($_POST);\n\t\t$data=ob_get_clean();\n\n\t\t// Log it for later\n\t\t$sql='insert into sms_exception (error, data) values ('.$this->db->escape($msg).','.$this->db->escape($data).')';\n\t\t$this->db->query($sql);\n\t}", "title": "" }, { "docid": "98ed332fb6cef14958470e201162bddf", "score": "0.57109696", "text": "public function submitErrorLog( $SQLKey = null, $description = '' ) {\n\t\tif ( is_null( $SQLKey ) )\n\t\t\t$SQLKey = $this->curSQLkey;\n\t\t\n\t\t$query\t=\t'\n\t\t\tINSERT INTO\t\t' . SR_ERROR_LOG_TABLE . '\n\t\t\t( description, error, datelogged )\n\t\t\tVALUES\n\t\t\t( :description, :error, NOW() )'\n\t\t;\n\t\t$description = ( (!empty( $description )) ? 'Custom Message:' . \"\\n\" . $description . \"\\n\\n\" : '' ) . 'Associated Query:' . \"\\n\\n\" . $this->getCurQuery();\n\t\t$this->createQuery( $query );\n\t\t$this->bind( ':description', $description );\n\t\t$this->bind( ':error', $this->getErrorMsg( $SQLKey ) );\n\t\t$response = $this->runQuery();\n\t\t\n\t\tif ( $this->hasStopFlag() ) {\n\t\t\tdie( 'An unexpected error occurred. We are sorry for any inconvenience.' );\n\t\t}\n\t}", "title": "" }, { "docid": "758873c394a1b62d9c567b28bb8e968e", "score": "0.5644164", "text": "protected function reportError($sMessage, $bDebug = false)\r\n {\r\n echo \"<span style='color:red'><b>Database Error:</b> $sMessage</span>\";\r\n }", "title": "" }, { "docid": "223884c3746506051e127966fc74c4fc", "score": "0.5631217", "text": "public function insertErrorDebug ($msg){\n $log = new Logger('name');\n $log->pushHandler(new RotatingFileHandler(storage_path().'/logs/debug/debug.log',2,Logger::INFO));\n $log->info($msg);\n }", "title": "" }, { "docid": "20b12e690b720f5a03bccb8702395a00", "score": "0.56250083", "text": "public function LogError($user_id, $error_code, $debug_info)\n\t{\n\t\tApp::import('Model', 'Error');\n\t\t$Error = new Error();\n\t\t$Error->AddError($user_id, $error_code, json_encode($debug_info));\n\t}", "title": "" }, { "docid": "58280b1eee78cc8824fe1e22e4b6a288", "score": "0.5541031", "text": "public static function createDatabaseError () {\n\t\tself::createMessage(\n\t\t\t\tMessageType::Error,\n\t\t\t\t\"Er is iets mis gegaan bij het verwerken van de database.\"\n\t\t);\n\t\t\n\t}", "title": "" }, { "docid": "76f56f18e6b604aaa18bf9dfaee247c8", "score": "0.55366075", "text": "function sqlErrorLog($errorText, $errorSQL='')\n{\n\t//if $errorText is array\n\tif(is_array($errorText))\n\t{\n\t\t//get array keys\n\t\t$errorTextKeys = array_keys($errorText);\n\t\t$errorTextKeysCount = count($errorTextKeys);\n\n\t\t//loop on count of keys\n\t\tfor($x=0; $x<$errorTextKeysCount; $x++)\n\t\t\t$errorTextArr .= '['.$errorTextKeys[$x].'] '. $errorText[$errorTextKeys[$x]].' ';\n\n\t\t//copy the text from array\n\t\t$errorText = $errorTextArr;\n\t}//eof if\n\t//if log enable\n\tif(ERROR_LOG_ENABLED)\n\t{\n\t\t//request URI, decode if encoder is enabled\n\t\tif(URL_SECURITY)\n\t\t{\n\t\t\t$requestURI = $_SERVER['PHP_SELF'];\n\t\t\t$decodedParameter = flc_url_decode($_GET['a']);\n\n\t\t\t//if have parameter\n\t\t\tif($decodedParameter)\n\t\t\t\t$requestURI .= '?'.$decodedParameter;\n\t\t}//eof if\n\t\telse\n\t\t\t$requestURI = $_SERVER['REQUEST_URI'];\n\n\t\t//log info\n\t\t$logFile = 'error_sql.log';\n\t\t$logInitText = '['.date('d/m/Y H:i:s').'] ['.$_SESSION['userName'].': '.$requestURI.']';\n\t\t$logEndText = '------------------------------------------------------';\n\n\t\t//write log\n\t\tfile_put_contents($logFile, $logInitText.PHP_EOL.$errorText.PHP_EOL.$errorSQL.PHP_EOL.$logEndText.PHP_EOL, FILE_APPEND);\n\n\t\t//show nofitication\n\t\tshowNotificationError(ERROR_LOG_MSG);\n\t}//eof if\n\telse\n\t\techo $errorText.'<br>'.$errorSQL;\n}", "title": "" }, { "docid": "a0bcc5bb2c9f71606218e6c0bb4bedc0", "score": "0.55250424", "text": "public function logError(){\n AbstractLoggedException::$dbMessage .= \"Invalid GUIDE attempted to reset password; \";\n parent::log();\n \n // ALert system admin via slack\n parent::callSlack('Invalid GUIDE attempted to reset password - '.AbstractLoggedException::$errorMessage.' - detected');\n }", "title": "" }, { "docid": "b776ee952ce0c5c43b51171998da875d", "score": "0.55141056", "text": "function sendDBError() {\n $rsp = new SimpleXMLElement('<quippiApi/>');\n $rsp->addChild('operationStatus', 3);\n $rsp->addChild('discriptiion', 'Database originated error');\n errlog (\"xml to send\", $rsp->asXML());\n sendRsp($rsp->asXML());\n}", "title": "" }, { "docid": "89a58f089885dd06066a160d6cd006c7", "score": "0.5493166", "text": "function db_error_handler($params)\n {\n header(\"Location: /errors/internal\", true, 500);\n\n global $log;\n $log->error(\"Database erorr[Connection]: \" . $params['error']);\n\n if ($params['query']) {\n $log->error(\"Database error[Query]: \" . $params['query']);\n }\n die();\n }", "title": "" }, { "docid": "9ecf3d85b39bc7526d8213d025851773", "score": "0.5482028", "text": "private function ExceptionLog($message, $sql = \"\") {\n // $exception = 'Unhandled Exception. <br />';\n // $exception .= $message;\n // $exception .= \"<br /> You can find the error back in the log.\";\n if (!empty($sql)) {\n // Add the Raw SQL to the Log\n $message .= \"\\r\\nRaw SQL : \" . $sql;\n }\n // Write into log\n $this->log->write($message);\n \n // return $exception;\n }", "title": "" }, { "docid": "9d7a13d6e1cadef1bf71f33ba0dfedee", "score": "0.5458943", "text": "public static function logError($message=null,$data=null) {\n\t\t\t$Database = Registry::getKey('Database');\n\t\t\t$Core = Registry::getKey('Core');\n\t\t\t$Database->perform('error_log',\n\t\t\t\tarray(\n\t\t\t\t\t'message'=>$message,\n\t\t\t\t\t'json'=>json_encode($data)\n\t\t\t\t)\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "7e8254a63b255dc23e9a77c87129900a", "score": "0.5406168", "text": "function hb_record_error($sql_error,$sql_query)\r\n\t{\r\n\t\thb_send_error_reporting_mail($sql_error,$sql_query);\r\n\t\tglobal $global_user_id,$global_user_type,$db;\r\n\t\t$file_name = addslashes($_SERVER['PHP_SELF'].\"?\".$_SERVER['QUERY_STRING']);\r\n\t\t$sql_error = addslashes($sql_error);\r\n\t\t$sql_query = addslashes($sql_query);\r\n\t\t$ip_address = $_SERVER['REMOTE_ADDR'];\r\n\t\t$error_on = date('Y-m-d H:i');\r\n\t\t$hb_record_query = \"insert into `query_errors` set\r\n\t\t\t\t\t\t\t\t `file_name` = '$file_name',\r\n\t\t\t\t\t\t\t\t `sql_error` = '$sql_error',\r\n\t\t\t\t\t\t\t\t `sql_query` = '$sql_query',\r\n\t\t\t\t\t\t\t\t `ip_address` = '$ip_address',\r\n\t\t\t\t\t\t\t\t `error_on` = '$error_on',\r\n\t\t\t\t\t\t\t\t `user_id` = '$global_user_id',\r\n\t\t\t\t\t\t\t\t `user_type` = '$global_user_type'\";\r\n\t\tmysql_query($hb_record_query);\r\n\t\t//die(stripslashes($sql_error));\r\n\t\tdie(\"I'm sorry the information you were looking for could not be displayed.\");\r\n\t}", "title": "" }, { "docid": "8663976f1990ca94ff580b0284854549", "score": "0.53935015", "text": "public function submitCustomErrorLog( $description, $error_msg = '' ) {\n\t\t$query\t=\t'\n\t\t\tINSERT INTO\t\t' . SR_ERROR_LOG_TABLE . '\n\t\t\t( description, error, datelogged )\n\t\t\tVALUES\n\t\t\t( :description, :error, NOW() );\n\t\t';\n\t\t$this->createQuery( $query );\n\t\t$this->bind( ':description', $description );\n\t\t$this->bind( ':error', $error_msg );\n\t\t$response = $this->runQuery();\n\t\t\n\t\tif ( $this->hasStopFlag() ) {\n\t\t\t//die( $this->stopflagresponse . '<br />' . $this->query );\n\t\t\tdie( 'An unexpected error occurred. We are sorry for any inconvenience.' );\n\t\t}\n\t}", "title": "" }, { "docid": "c531abba7da1b3749d43adc4ec447dd7", "score": "0.5385715", "text": "public function query_failure()\n {\n $content = $this->get_date() . \"[error] query failed to execute!\" . PHP_EOL;\n $this->log_error($content);\n }", "title": "" }, { "docid": "f14cdfd42086542ba1714a609a22f161", "score": "0.53735757", "text": "protected function error($query, $error)\n {\n if (is_array($error)) {\n $error = print_r($error, true);\n }\n\n $this->logger->log($error . ' [' . $query . ']', LOG_DEBUG);\n\n $this->last_error = $error;\n }", "title": "" }, { "docid": "011b1657a8c3a5f321f05ce9a3ec258c", "score": "0.5369756", "text": "function handleDbError(PDOException $e) {\n print \"A database error occurred while running the application. \\n\\nError Code: \" . $e->getCode() . \"\\n\\nPlease contact your system administrator.\\n\\n \";\n $message = $e->getMessage();\n error_log(\"DB Error: $message\",0);\n}", "title": "" }, { "docid": "f66e6ba2fa4673d36a5384512398f8b3", "score": "0.5367408", "text": "public function error()\n {\n $connection = $this->connect();\n /* add mysql.log */\n $error = date('Y-m-d H:i:s') . ' - ERR: ';\n $error .= $connection->error;\n echo $error;\n $error .= \"\\n\";\n file_put_contents(__DIR__ . '/../../logs/mysql.log', $error, FILE_APPEND);\n }", "title": "" }, { "docid": "0c3107621eb7bb01b7925a655f21aa54", "score": "0.5349161", "text": "public static final\tfunction error($msg) {\t\n\t\tself::innerWriter(OrmTrace::$ERROR, 'error', $msg);\n\t}", "title": "" }, { "docid": "30f7d5ee08b3788324d4ee54a0e62935", "score": "0.5334683", "text": "function writeToLog($exception) {\r\n $link = getDefaultDBConnection();\r\n $message = \"File: \" . $exception->getFile() . \" [line \" . $exception->getLine() . \"]\\n\"\r\n . \"Message: \" . $exception->getMessage();\r\n $query = \"insert into error_log set message = '$message'\";\r\n mysqli_query($link, $query);\r\n}", "title": "" }, { "docid": "c4e314be45b227937f74edc3daccc87d", "score": "0.5334045", "text": "function pushError($msg = 'unknown error'){\n $result = 0;\n if (func_num_args() > 1) {\n $args = func_get_args();\n $format = array_shift($args);\n if (empty($args)) {\n $msg = $format;\n } else {\n foreach ($args as $i => $arg) {\n if (!is_scalar($arg)) {\n $args[$i] = gettype($arg);\n }\n }\n $msg = vsprintf($format, $args);\n }\n }\n $trace = null;\n if (function_exists('debug_backtrace')) {\n $trace = @debug_backtrace();\n }\n if (!is_array($trace)) {\n $trace = array();\n }\n $bt = array_pop($trace) + $this->getDefaultBackTrace();\n $code = $this->mapErrorObject($trace);\n $this->errors[] = array(\n 'msg' => $msg,\n 'line' => $bt['line'],\n 'file' => $bt['file'],\n 'code' => $code\n );\n }", "title": "" }, { "docid": "d3f421f2c8c5120d1f65f6826b9028d8", "score": "0.5323576", "text": "private function ExceptionLog($message , $sql = \"\")\r\n\t{\r\n\t\t$exception = 'Unhandled Exception. <br />';\r\n\t\t$exception .= $message;\r\n\t\t$exception .= \"<br /> You can find the error back in the log.\";\r\n\t\tif(!empty($sql)) {\r\n\t\t\t# Add the Raw SQL to the Log\r\n\t\t\t$message .= \"\\r\\nRaw SQL : \" . $sql;\r\n\t\t}\r\n\t\t\t# Write into log\r\n\t\t\t$this->log->write($message);\r\n\t\tthrow new Exception($message);\r\n\t\t#return $exception;\r\n\t}", "title": "" }, { "docid": "1a93bca2e864d0b6aeb96d956c8208d4", "score": "0.5303669", "text": "public function error($message){\n $this->_writeLogData($message, LogEntry::TYPE_ERROR);\n }", "title": "" }, { "docid": "2b993ff06920f363824153c5b78f714e", "score": "0.52682185", "text": "function log_message($dbh, $p_message, $p_message_type='ERROR') {\n\t$user_id = getUserId();\n\tif(empty($user_id)) $user_id = -1;\n\t$qry = \"insert into message_log \n\t\t\t\t\t\t\t(message_log_id, log_text, message_type\n\t\t\t\t\t\t\t, created_by, created_date, updated_by, updated_date, enabled\n\t\t\t\t\t\t\t) values (\n\t\t\t\t\t\t\tnull, ?, ?\n\t\t\t\t\t\t\t, ?, NOW(), ?, NOW(), 'Y'\n\t\t\t\t\t\t\t)\n\t\t\t\";\n\t$params = array($p_message, $p_message_type, $user_id, $user_id);\n\ttry {\n\t\t$log_id = runInsert($dbh, $qry, $params);\n\t} catch (PDOException $ex) {\n\t\tthrow $ex;\n\t}\n\treturn $log_id;\n}", "title": "" }, { "docid": "b73b0660346627f0b0a06599dc3c1494", "score": "0.52666277", "text": "private function logErrorMsg()\n\n\t{\n\n\t\t/*\n\n\t\t$message = \"time: \".date(\"j M y - g:i:s A (T)\", mktime()).\"\\n\";\n\n\t\t$message .= \"file: \".print_r( $this->errfile, true).\"\\n\";\n\n\t\t$message .= \"line: \".print_r( $this->errline, true).\"\\n\\n\";\n\n\t\t$message .= \"code: \".print_r( $this->errorNumbers[$this->errno], true).\"\\n\";\n\n\t\t$message .= \"message: \".print_r( $this->errstr, true).\"\\n\";\n\n\t\t$message .= \"##################################################\\n\\n\"; */\n\n\t\t\n\n\t\t$message = \"time: \".date(\"j M y - g:i:s A (T)\", time()).\"\\n\";\n\n\t\t$message .= \"file: \". $this->errfile.\"\\n\";\n\n\t\t$message .= \"line: \".$this->errline.\"\\n\\n\";\n\n\t\t$message .= \"code: \".$this->errorNumbers[$this->errno].\"\\n\";\n\n\t\t$message .= \"message: \". $this->errstr.\"\\n\";\n\n\t\t$message .= \"##################################################\\n\\n\";\n\n\t\t\t\n\n\t\tif ($this->logFile != '') {\n\n\t\t\terror_log($message, 3, $this->logFile);\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "77a96acbc28162d1d5bde38b2e2649b1", "score": "0.52655894", "text": "function log_error($e, $sqlst, $params, $log_name){\n\t\t$myFile = \"./bizDataLayer/logs/\".$log_name.\".log\";\n\t\t$fh = fopen($myFile, \"a+\") or die(\"can't open file\");\n\t\t\n\t\ttry {\n\t\t\tfwrite($fh, \"Exception caught @\".date(\"H:i:s m.d.y\").\"\\n\"); \n\t\t\tfwrite($fh, \" Message: \".$e->getMessage().\"\\n\");\n\t\t\tfwrite($fh, \" SQL: \".$sqlst.\"\\n\");\n\t\t\t\n\t\t\tif (is_array($params)) {\n\t\t\t\tfwrite($fh, \" Params: \".implode(\",\",$params).\"\\n\");\n\t\t\t}\n\n\t\t\tfwrite($fh, \" File: \".$e->getFile().\"\\n\");\n\t\t\tfwrite($fh, \" Line: \".$e->getLine().\"\\n\");\n\t\t\tfwrite($fh, \" Trace: \".$e->getTraceAsString().\"\\n\");\n\t\t\tfwrite($fh, \"===========================================\\n\");\n\t\t\tfclose($fh);\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\techo \"error\";\n\t\t}\n\t}", "title": "" }, { "docid": "ca501c686c4f362f0fd0fcc372aa5680", "score": "0.5259748", "text": "private function logError()\n\n\t{\n\n\t\tswitch($this->logType)\n\n\t\t{\n\n\t\t\tcase 1: // log error\n\n\t\t\t\t$this->logErrorMsg();\n\n\t\t\t\tbreak;\n\n\t\t\tcase 2://send Email to the administrator about the error\n\n\t\t\t\t$this->sendErrorMsg();\n\n\t\t\t\tbreak;\n\n\t\t\tcase 3: // log and send email to the administrator about the error\n\n\t\t\t\t$this->logErrorMsg();\n\n\t\t\t\t$this->sendErrorMsg();\n\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\n\t\t\t\t$this->logErrorMsg();\n\n\t\t\t\tbreak;\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "f1abfd2a528c2ff153bc8185a2b59a51", "score": "0.52592814", "text": "function raise_error($error_message = '')\r\n {\r\n if ($this->recent_link)\r\n {\r\n $this->error = $this->error($this->recent_link);\r\n $this->errno = $this->errno($this->recent_link);\r\n }\r\n\r\n if ($error_message == '')\r\n {\r\n $this->sql = \"Error in SQL query:\\n\\n\" . rtrim($this->sql) . ';';\r\n $error_message =& $this->sql;\r\n }\r\n else\r\n {\r\n $error_message = $error_message . ($this->sql != '' ? \"\\n\\nSQL:\" . rtrim($this->sql) . ';' : '');\r\n }\r\n\r\n $message = \"<textarea rows=\\\"10\\\" cols=\\\"80\\\">MySQL Error:\\n\\n\\n$error_message\\n\\nError: {$this->error}\\nError #: {$this->errno}\\nFilename: \" . $this->_get_error_path() . \"\\n</textarea>\";\r\n\r\n if (!$this->show_errors)\r\n {\r\n $message = \"<!--\\n\\n$message\\n\\n-->\";\r\n }\r\n die(\"There seems to have been a slight problem with our database, please try again later.<br /><br />\\n$message\");\r\n }", "title": "" }, { "docid": "6bb84a86d9b6d33c8deb1439c32a4f4e", "score": "0.525792", "text": "public static function error()\n\t{\n\t\tstatic::prepare();\n\n\t\t$args = func_get_args();\n\n\t\tsyslog( LOG_ERR, $msg = call_user_func_array( 'sprintf', $args ) );\n\n\t\treturn $msg;\n\t}", "title": "" }, { "docid": "78d1f59b87fcffb5a497bf4d86472304", "score": "0.52389324", "text": "public function setDebugError($message) {\n\t\t// validate the parameters\n\t\tif ($message === \"\") {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->debug_errors[] = $message;\n\t}", "title": "" }, { "docid": "39948e78ff9c166ee931e5e9cbb38cfc", "score": "0.52318597", "text": "protected function getQueryError(string $error, string $sql, array $params)\n\t{\n\t\t$error = $error . \"\\n\\n\" . $sql;\n\t\tif ($params) {\n\t\t\t$error.= \"\\n\\n\" . print_r($params, true);\n\t\t}\n\n\t\treturn $error;\n\t}", "title": "" }, { "docid": "b32479dbf18e8ae8cc9dda3437e35ca0", "score": "0.522875", "text": "function raise_error($error_message = '') \n { \n if ($this->recent_link) \n { \n $this->error = $this->error($this->recent_link); \n $this->errno = $this->errno($this->recent_link); \n } \n\n if ($error_message == '') \n { \n $this->sql = \"Error in SQL query:\\n\\n\" . rtrim($this->sql) . ';'; \n $error_message =& $this->sql; \n } \n else \n { \n $error_message = $error_message . ($this->sql != '' ? \"\\n\\nSQL:\" . rtrim($this->sql) . ';' : ''); \n } \n\n $message = \"<textarea rows=\\\"10\\\" cols=\\\"80\\\">MySQL Error:\\n\\n\\n$error_message\\n\\nError: {$this->error}\\nError #: {$this->errno}\\nFilename: \" . $this->_get_error_path() . \"\\n</textarea>\"; \n\n if (!$this->show_errors) \n { \n $message = \"<!--\\n\\n$message\\n\\n-->\"; \n } \n die(\"There seems to have been a slight problem with our database, please try again later.<br /><br />\\n$message\"); \n }", "title": "" }, { "docid": "dd50091d522633aa38169047c1551f38", "score": "0.5222278", "text": "public function log($e){\n\t\tif($e instanceof PDOException){\n\t\t\t$code = $e->getCode();\n\t\t\t$message = $e->getMessage();\n\t\t\t$file = $e->getFile();\n\t\t\t$line = $e->getLine();\n\t\t} else {\n\t\t\t$code = (isset($e->code)) ? $e->code : null;\n\t\t\t$message = (isset($e->message)) ? $e->message : null;\n\t\t\t$file = (isset($e->file)) ? $e->file : null;\n\t\t\t$line = (isset($e->line)) ? $e->line : null;\n\t\t}\n\n\t\ttry {\n\t\t\t$sql = \"INSERT INTO `log` (`eid`, `code`, `message`, `file`, `line`) VALUES (NULL, '$code', '$message', '$file', '$line')\";\n\t\t\t$result = $this->db->prepare($sql);\n\t\t\t$result->execute();\n\t\t} catch(PDOException $e){\n\t\t\tdie($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "f440f033fdb5b40bab11ae95e7660a8d", "score": "0.5183411", "text": "private static function recordError($error_string)\r\n {\r\n\t\t$fh = fopen($_SERVER['DOCUMENT_ROOT'].'/_includes/_central/mysql_log.txt', 'a+');\r\n\t\tfwrite($fh, date(\"d/m/Y H:i:s\", time()).\" - \".$error_string.\"\\n\"); \r\n\t\tfclose($fh); \r\n\t\tdie(\"Unfortunately a server error has occurred. Please try again later.\");\r\n }", "title": "" }, { "docid": "6169b305fb1ddccb36b42b5a71d63bd5", "score": "0.5167991", "text": "private static function throwDbError(array $errorInfo) {\n throw new Exception('DB error [' . $errorInfo[0] . ', ' . $errorInfo[1] . ']: ' . $errorInfo[2]);\n }", "title": "" }, { "docid": "6169b305fb1ddccb36b42b5a71d63bd5", "score": "0.5167991", "text": "private static function throwDbError(array $errorInfo) {\n throw new Exception('DB error [' . $errorInfo[0] . ', ' . $errorInfo[1] . ']: ' . $errorInfo[2]);\n }", "title": "" }, { "docid": "6169b305fb1ddccb36b42b5a71d63bd5", "score": "0.5167991", "text": "private static function throwDbError(array $errorInfo) {\n throw new Exception('DB error [' . $errorInfo[0] . ', ' . $errorInfo[1] . ']: ' . $errorInfo[2]);\n }", "title": "" }, { "docid": "6169b305fb1ddccb36b42b5a71d63bd5", "score": "0.5167991", "text": "private static function throwDbError(array $errorInfo) {\n throw new Exception('DB error [' . $errorInfo[0] . ', ' . $errorInfo[1] . ']: ' . $errorInfo[2]);\n }", "title": "" }, { "docid": "0190549b8d78f0f44d464fc58f6400b6", "score": "0.5157335", "text": "public function dumpSQL()\n {\n $this->_errorQuery->debugBumpParams();\n }", "title": "" }, { "docid": "cc71017768cfda0568ffd16087a823de", "score": "0.5118125", "text": "public static function LogError( $message ) {\n\n if(is_array( $message ))\n {\n $message = json_encode( $message );\n }\n\n Log::error(\"\\n\" . str_repeat(\"-\", 80) . \"\\n\\n\" . $message . \"\\n\\n\" . str_repeat(\"=\", 80 ) . \"\\n\\n\\n\");\n }", "title": "" }, { "docid": "d7a48b63f9262a6a1b2e80d9b63b61b9", "score": "0.5076961", "text": "function handle_sql_errors($query, $error_message)\n\t{\n\t\techo '<pre>';\n\t\techo $query;\n\t\techo '</pre>';\n\t\techo $error_message;\n\t\tdie;\n\t}", "title": "" }, { "docid": "b6c591090ae23fcc8fcd78bcac3ad659", "score": "0.5076409", "text": "private function ExceptionLog($e, $sql = \"\") {\n \n if (!$this->bLog) {\n return;\n }\n \n $ret = '';\n \n $trace = $e->getTrace();\n $trace = array_pop($trace);\n \n $ret .= \"<div style='font-family: verdana; border: 1px solid #CCCCCC; margin: 25px;'>\";\n $ret .= \"<h3 style='border-bottom: 1px solid #CCCCCC; padding: 0px 0px 15px 15px; '>A Database Error Occurred</h3>\";\n $ret .= '<div style=\"line-height: 45px; padding: 0px 0px 15px 15px;\">';\n $ret .= \"<b>Error number:</b> \".$e->errorInfo[1].\"<br>\";\n $ret .= $e->errorInfo[2].\"<br>\";\n $ret .= $e->getMessage().\"<br>\";\n\n if (!empty($sql)) {\n $ret .= $sql.\"<br>\";\n }\n $ret .= \"<b>Filename:</b> \".$trace['file'].\"<br>\";\n $ret .= \"<b>Line Number:</b> \".$trace['line'].\"<br>\";\n $ret .= \"</div>\";\n $ret .= \"</div>\";\n \n \n $message = $e->getMessage();\n if (!empty($sql)) {\n $message .= \"\\r\\nRaw SQL : \" . $sql;\n }\n $message .= \"\\r\\nFile : \" . $trace['file'] . \" : \" . $trace['line'];\n $this->log->write($message);\n\n return $ret;\n }", "title": "" }, { "docid": "787972ee2753e6b51cfbdad13b94e5fb", "score": "0.50626177", "text": "private function log($type, $db, $error, $code, $info = '')\r\n {\r\n if(stristr($error,\"Operation now in progress\")) $error = \"Timeout ($error)\";\r\n\r\n $message = \" MONGO \". \\MongoClient::VERSION . \" \" . $type . \" ERROR \" . $code . \" \\\"\" . $error .\r\n \"\\\" AT '\" . __FILE__ . \"' \" . $db . \" \" . $info;\r\n Weblog::write(Weblog::WEBLOG_ERROR, $message);\r\n }", "title": "" }, { "docid": "272fa111f2fcb5af0b4b1e0746e0a651", "score": "0.5035754", "text": "public function sendError($userID, $th): void\n {\n if($userID < 0)\n $userID = 0;\n try {\n $time = time();\n $message = $th->getMessage();\n\n $report = $this->db->prepare(\"INSERT INTO reportederrors VALUES(null, $userID, :e, $time);\");\n $report->bindValue(\":e\", $message);\n $report->execute();\n } catch (\\Throwable $th) {\n }\n }", "title": "" }, { "docid": "97e61b5dff5f977889562c30fb980de7", "score": "0.5034167", "text": "public static function addErrorLog($error) {\n $model = new \\backend\\modules\\ezforms2\\models\\SystemError();\n \n $model->id = SDUtility::getMillisecTime();\n $model->code = $error->getCode();\n $model->name = $error->getName();\n $model->message = $error->getMessage();\n $model->line = $error->getLine();\n $model->file = $error->getFile();\n $model->trace_string = $error->getTraceAsString();\n $model->created_by = Yii::$app->user->id;\n $model->created_at = new \\yii\\db\\Expression('NOW()');\n \n $model->save();\n }", "title": "" }, { "docid": "b1b801a2218e1670547b48301d85c2e1", "score": "0.50328183", "text": "function print_log_error($back_trace, $query, $app){\n if(!$this->add_myoptime_errors) return;\n if($this->error_ocurred) return;\n\n $back_trace =array_reverse($back_trace);\n\n $var_approot=str_replace(\"/\",\"\\\\\",APPROOT);\n $arr_vars=array('file','line','class','function');\n for($i=0,$max=count($back_trace); $i<$max; $i++){\n foreach($arr_vars as $key=>$value){\n if($value=='file'){\n $arr_tree[$i][$value]=str_replace(array($var_approot,\"\\\\\"),array(DOMAIN_ROOT,\"/\"),$back_trace[$i][$value]).\"<br>\";\n continue;\n }\n $arr_tree[$i][$value]=$back_trace[$i][$value];\n }\n }\n $arr_tree[0]['mysql_errno']=mysql_errno($this->DBconnection[$app]);\n $arr_tree[0]['mysql_error']=str_replace('\\'','\"',mysql_error($this->DBconnection[$app]));\n $arr_tree[0]['query']=nl2br($query);\n $arr_tree[0]['user_name']=self::$DBsession->read('s_first_name').\" \".self::$DBsession->read('s_last_name');\n $arr_tree[0]['date'] = date(\"Y-m-d h:i:s\");\n $id_error = $this->register_SQL_error(serialize($arr_tree), $app);\n $arr_tree[0]['id_error'] = $id_error;\n\n if(defined(\"SEND_SQL_ERRORS_EMAIL\") && SEND_SQL_ERRORS_EMAIL==1){\n $vars=$this->contruct_body_error($arr_tree);\n if(defined(\"SEND_SQL_ERRORS_MYOPT\") && SEND_SQL_ERRORS_MYOPT==1){\n $obj_myoptime = new cls_myoptime;\n $vars['##myoptime_id##'] = $obj_myoptime->ins_myoptime('',\"Bug Track # \".$id_error, $vars['##message##'].\"<br />\".$vars['##error_detail##'],'','');\n }\n $arr_email=$this->get_list_notif_error($app);\n /* Instaciación del nuevo objeto Email */\n\t\t\t\t$objemail = new Email(array('smtpServer'=>EMAIL_SERVER_HOST,'smtpUser'=>EMAIL_SERVER_USER,'smtpPassword'=>EMAIL_SERVER_PASS,'appDomainRoot'=>DOMAIN_ROOT,'skeletonFile'=>APPROOT.'lib/common/email_skeleton.php','emailEngine'=>EMAIL_ENGINE,'transGroupID'=>EMAIL_TRANSACTIONAL_GROUP_ID),array('debug'=>0,'emailDebug'=>EMAIL_DEBUG));\n\t\t\t\tforeach($vars as $varstr => $varvalue){\n\t\t\t\t\t$objemail->setVariable($varstr, $varvalue);\n\t\t\t\t}\n\t\t\t\t$objemail->send($from=array('name'=>EMAIL_FROM_NAME,'email'=>EMAIL_FROM), $to=/* $notify_email */$arr_email, \"BUG_TRACK\", 1);\n }\n $this->error_ocurred=true;\n\n if(!headers_sent()){\n header(\"location: \".DOMAIN_ROOT.\"pages/app_error.php?code=\".$id_error);\n exit;\n } else {\n include(COREROOT.\"lib/common/app_mysql_error.php\");\n }\n }", "title": "" }, { "docid": "cbb03d63f6acd0a1de41ffd4da2245eb", "score": "0.50195944", "text": "function error_message($error_message)\n {\n $db_connection = $GLOBALS['db_connection'];\n return \"{$error_message} \" . urlencode(mysqli_error($db_connection)) . \"<br/>\";\n }", "title": "" }, { "docid": "97abaeb44c11a7f1c283fd1351d2e59a", "score": "0.50097793", "text": "public static function error($message)\n\t{\n\t\tself::$logger->error($message);\n\t}", "title": "" }, { "docid": "ee81f4dda797e99a33bb684ac60ad6b5", "score": "0.50083834", "text": "private function showError($error_info)\n\t{\n\t\t$error = isset($error_info[2]) ? $error_info[2] : '';\n\n\t\t$this->last_error = $error . \" SQL: \" . $this->last_query;\n\t\t$msg = array(\n\t\t\t'error' => $error,\n\t\t\t'sql' => $this->last_query,\n\t\t\t'backtrace' => array()\n\t\t);\n\n\t\t$backtrace_array = debug_backtrace();\n\t\tarray_shift($backtrace_array);\n\t\t$backtrace = array();\n\t\tforeach ($backtrace_array as $backtrace_resource) {\n\t\t\t$backtrace[] = \"{$backtrace_resource['file']}:{$backtrace_resource['line']}\";\n\t\t}\n\t\tkrsort($backtrace);\n\t\t$msg['backtrace'] = $backtrace;\n\n\t\tE($msg);\n\t\tdie;\n\t}", "title": "" }, { "docid": "d00ebf75d03ca1ded05eec356e57b919", "score": "0.50035805", "text": "public function errorLog($msg='',$query='',$die=false){\n\t\t$text = \"Addr:\".getenv(\"REMOTE_ADDR\");\n\t\t$text .= \"\\r\\nData:\".date(\"Y-m-d H:i:s\");\n\t\t$text .= \"\\r\\nCode:\".PDO::errorCode();\n\t\t$text .= \"\\r\\nPage:\".$_SERVER['PHP_SELF'];\n\t\t$text .= \"\\r\\nWarning:\".$msg;\n\t\t$text .= \"\\r\\nQuery:\".$query.\"\\r\\n\\r\\n\";\n\n\t\t$path = $_SERVER['DOCUMENT_ROOT'].'/logs/';\n\t\tif (!file_exists($path)){\n\t\t\tmkdir($path, 0777);\n\t\t}\n\t\t$logfile = $path.'conn.log';\n\t\tif(file_exists($logfile)){\n\t\t\tif(filesize($logfile) > 2*1024*1024){\n\t\t\t\trename($file, $path.\"conn\".date(\"Y-m-d\",time()).\".log\");\n\t\t\t}\n\t\t}\n\t\terror_log($text, 3, $logfile);\n\t\tif($die){\n\t\t\texit(\"Server busy, please try again later!\");\n\t\t}\n\t}", "title": "" }, { "docid": "5965c049bc2ab015a98511db93829a9f", "score": "0.5002317", "text": "public function logDebug($message);", "title": "" }, { "docid": "f170ff56d4109a2243a75e383bf379e3", "score": "0.49831328", "text": "public function insert($message);", "title": "" }, { "docid": "6a0cbcfdde0c0fa8321dbc7a6443d413", "score": "0.4976897", "text": "public static function debug($message)\n {\n if (self::$debug) {\n self::error($message);\n return;\n }\n }", "title": "" }, { "docid": "c4b567b0ebdaffda06c70b7380e4335d", "score": "0.49748674", "text": "function error_log(string $message, int $message_type = 0, ?string $destination, ?string $additional_headers): bool {}", "title": "" }, { "docid": "ea5aa0c00b84f67282ce02766a394430", "score": "0.4966296", "text": "protected function addErrorFlashMessage() {}", "title": "" }, { "docid": "9cd43224cabf14cd29d351d4defca477", "score": "0.4963488", "text": "function raiseError()\r\n {\r\n\t \t$this->errorInformation = array_merge($this->errorInformation, array(\r\n\t \t\t'error_no'\t\t\t\t=> @mysql_errno( $this->connectionId ) != null ? mysql_errno( $this->connectionId ) : mysql_errno(),\r\n\t \t\t'error_message'\t\t\t=> @mysql_error( $this->connectionId ) != null ? mysql_error( $this->connectionId ) : mysql_error(),\r\n\t \t));\r\n\t \t\r\n\t \t$error = \"\";\r\n\t \tif (! empty( $this->lastExecutedStatement ) )\r\n\t \t{\r\n\t \t\t$error .= $this->lastExecutedStatement . \"\\n\\n\";\r\n\t \t}\r\n\t \t\r\n\t \t$error .= \"Database ( type MySQL ) error: \". $this->errorInformation['error_message'] . \"\\n\";\r\n\t \t$error .= \"Error Date: \".date(\"l dS of F Y h:i:s A\");\r\n\t \t\r\n\t \t$out = <<<EOF\r\n<!DOCTYPE html>\r\n<html>\r\n<head>\r\n <title>PearCMS Database Error</title>\r\n<style type=\"text/css\">\r\na\r\n{\r\n\ttext-decoration: none;\r\n\tcolor: #000000;\r\n}\r\n\r\na:hover\r\n{\r\n\ttext-decoration: underline;\r\n}\r\n\r\nbody\r\n{\r\n\tmargin: 0px;\r\n width: 100%;\r\n font-family: Arial;\r\n font-size: 11px;\r\n\tbackground-color: #ffffff;\r\n}\r\n\r\nh1\r\n{\r\n\tfont-size: 16px;\r\n\tmargin: 0px;\r\n\tmargin-bottom: 10px;\r\n\tfilter: progid:DXImageTransform.Microsoft.gradient(group_prefixolorstr='#4b4b4b', group_suffixolorstr='#272727');\r\n\tbackground: -webkit-gradient(linear, left bottom, left top, from(#4b4b4b), to(#272727));\r\n\tbackground: -moz-linear-gradient(bottom, #4b4b4b, #272727);\r\n\tcolor: #ffffff;\r\n\tfont-weight: bold;\r\n\tfont-style: italic;\r\n\tpadding: 6px;\r\n\tpadding-left: 8px;\r\n\ttext-shadow: #eeeeee;\r\n\tborder-bottom: 1px solid #0e0e0e;\r\n}\r\n\r\nh1.red\r\n{\r\n\tmargin-bottom: 0px;\r\n\tfilter: progid:DXImageTransform.Microsoft.gradient(group_prefixolorstr='#a31320', group_suffixolorstr='#6c0c14');\r\n\tbackground: -webkit-gradient(linear, left bottom, left top, from(#a31320), to(#6c0c14));\r\n\tbackground: -moz-linear-gradient(bottom, #a31320, #6c0c14);\r\n\tborder: 1px solid #49080e;\r\n\ttext-shadow: #49080e;\r\n}\r\n\r\ndiv.container\r\n{\r\n\tmargin: 10px;\r\n\tpadding: 5px;\r\n\tpadding-left: 8px;\r\n\tpadding-right: 8px;\r\n\tfilter: progid:DXImageTransform.Microsoft.gradient(group_prefixolorstr='#ffffff', group_suffixolorstr='#f1f1f1');\r\n\tbackground: -webkit-gradient(linear, left bottom, left top, from(#f1f1f1), to(#ffffff));\r\n\tbackground: -moz-linear-gradient(bottom, #f1f1f1, #ffffff);\r\n\tborder: 1px solid #dedede;\r\n}\r\n\r\ndiv.container h3\r\n{\r\n\tfont-size: 14px;\r\n\tfont-style: italic;\r\n}\r\n\r\np\r\n{\r\n\tmargin-bottom: 5px;\r\n}\r\n\r\n</style>\r\n</head>\r\n<body>\r\n\r\nEOF;\r\n\r\n\t \tif ( $this->errorInformation['fail_to_cache'] ) \r\n\t \t{\r\n\t \t\tprint \"<h1 class='red'>Couldn't create error log file (Did you gave the path \" . PEAR_ROOT_PATH . PEAR_CACHE_DIRECTORY . PEAR_DB_CACHE_FILES_DIRECTORY . \" writing permissions?).</h1>\";\r\n\t\t}\r\n\t \t\r\n\t \t$out .= <<<EOF\r\n<h1>\r\n\tPearCMS SQL Database Driver Error\r\n</h1>\r\n<div class=\"container\">\r\n\t<p>\r\n\t\tThe site MySQL database has encountered a problem.<br />\r\n\t\tA database error can be caused by serveral reasons such as invalid query, server administration problems etc.</p>\r\n\t<p>\r\n\t\tPlease try the following actions\r\n\t\t<ul>\r\n\t\t\t<li>\r\n\t\t\t\tTry to refresh the page.</li>\r\n\t\t\t<li>\r\n\t\t\t\tTry to navigate to the site home page and check for other pages availablity.</li>\r\n\t\t\t<li>\r\n\t\t\t\tClick on the browsers back button.</li>\r\n\t\t</ul></p>\r\n</div>\r\n<div class=\"container\" style=\"text-align: center; font-size: 14px;\">\r\n\t<a href=\"javascript:document.execCommand('Refresh');\">Click here to refresh the page</a></div>\r\nEOF;\r\n\t\r\n\t \t//---------------------------------\r\n\t \t//\tDo we need to print the error?\r\n\t \t//---------------------------------\r\n\t \t\r\n\t \tif ( $this->displayErrorDescription )\r\n\t \t{\r\n\t \t\t$error = nl2br(trim($error));\r\n\t \t\t$out .= <<<EOF\r\n<br />\r\n<div class=\"container\">\r\n\t<h3>Debug Output</h3>\r\n <pre style=\"white-space:normal;\">\r\n \t{$error}\r\n \t</pre>\r\n</div>\t\r\nEOF;\r\n \t\t}\r\n \t\r\n\t\t$out .= <<<EOF\r\n</body>\r\n</html>\r\nEOF;\r\n \t\t \r\n \r\n print $out;\r\n exit(0);\r\n }", "title": "" }, { "docid": "3b5f5b518b037921e2fe8fea31cf695e", "score": "0.49492416", "text": "public function error($message, $extraData = null);", "title": "" }, { "docid": "698607cf85bc40dcbf0a8aea781c7c91", "score": "0.49358886", "text": "public function exception($error, ?string $sql = null, array $params = []) : DatabaseException\n {\n return DatabaseException::from('db:'.$this->name(), $error, $sql, $params)->db($this);\n }", "title": "" }, { "docid": "5db046baafe1cae05e19a7f030f43023", "score": "0.49342725", "text": "private final static function _log($query) {\n\n\t\t$thd = mysqli_thread_id(DB::$cur);\n\n\t\tif (!mysqli_ping(DB::$cur)) {\n\t\t\t$msg = 'SQL Error: Connection lost!';\n\t\t} else if ($thd !== mysqli_thread_id(DB::$cur)) {\n\t\t\t$msg = 'SQL Warning: Connection restarted...';\n\t\t} else {\n\t\t\t$msg = 'SQL Error: ' . mysqli_error(DB::$cur) . ' (' . $query . ') @(' . mysqli_get_host_info(DB::$cur) . ')';\n\t\t}\n\n\t\tif (isset($_SERVER['REQUEST_URI'])) {\n\t\t\t$msg.= ' in ' . $_SERVER['REQUEST_URI'];\n\t\t}\n\n\t\tif (class_exists('FB')) {\n\t\t\tFB::error($msg);\n\t\t} else {\n\t\t\terror_log($msg);\n\t\t}\n\t}", "title": "" }, { "docid": "eb3d532b89cf8b92cb2b474c1d48e719", "score": "0.49285686", "text": "public function printErrorLog() {}", "title": "" }, { "docid": "98e8b54a525cc188d544ad1d060960f1", "score": "0.49256438", "text": "public function addError($message);", "title": "" }, { "docid": "d211cec97bd7db70c29db89380270899", "score": "0.49201655", "text": "protected function error($msg){\r\n \r\n error_log($msg);\r\n }", "title": "" }, { "docid": "b9cbd049ab662e9f25e8c5d7372c2815", "score": "0.49143156", "text": "function reportDBError ($exception) {\r\n\t$file = fopen(\"log.txt\", \"a\"); \r\n\tfwrite($file, date(DATE_RSS));\r\n\tfwrite($file, \"\\n\");\r\n\tfwrite($file, $exception->getMessage());\r\n\tfwrite($file, $exception->getTraceAsString());\r\n\tfwrite($file, \"\\n\");\r\n\tfwrite($file, \"\\n\");\r\n\tfclose($file);\r\n\trequire \"registrationError.php\";\r\n\texit();\r\n}", "title": "" }, { "docid": "69cc2e4103bc0b8998bb9f78229879a1", "score": "0.49042273", "text": "function _set_error($m) {\n\t\t$this->error_msg = $m;\n\t\tif ($this->print_errors) echo(\"<br><b>DATABASE ERROR:</b> $m<br>\");\n\t}", "title": "" }, { "docid": "422eac045a46c65b523542b7c384e851", "score": "0.49023664", "text": "public function logQuery($message, $sql, $args, $queryTime);", "title": "" }, { "docid": "0a5ca491efb540c731417ac510b4f2c4", "score": "0.4891819", "text": "function handleDbErrors($error_obj) {\n\n\t$display_str = $error_obj->getMessage().\"<br>\".$error_obj->getDebugInfo();\n\t$log_str = date(\"d/m/Y H:i\").\" :: \".$error_obj->getMessage().\"\\n\".$error_obj->getDebugInfo().\"\\n------------------------------------------------------\\n\";\n\n\tswitch (DEBUG_MODE) {\n\t\tcase 0:// just exit\n\t\t\t\texit;\n\t\t break;\n\t\tcase 1:// display errors\n\t\t exit($display_str);\n\t\t break;\n\t\tcase 2:// log errors\n\t\t error_log($log_str, 3, '../logs/dberror.log');\n\t\t\t\texit;\n\t\t break;\n\t\tcase 3:// display&log errors\n\t\t error_log($log_str, 3, '../logs/dberror.log');\n\t\t exit($display_str);\n\t\t break;\n\t}//switch\n}", "title": "" }, { "docid": "68cd8ff0d0d74c7e3cf3514f451045ad", "score": "0.48899016", "text": "public static function php_error_handler($errno, $errstr, $file, $errline, $data)\n {\n try\n {\n \n // Connecting to database\n $dsn = DBMS_NAME.':dbname='.DB_DATABASENAME.';host='.DB_HOST.';port='.DB_PORT;\n $dbh = new PDO($dsn, DB_USER, DB_PASS, array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \\'UTF8\\''));\n $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n $errorType = array ('ERROR', 'WARNING', 'PARSING ERROR', 'NOTICE', 'CORE ERROR', 'CORE WARNING', 'COMPILE ERROR', 'COMPILE WARNING', 'USER ERROR', 'USER WARNING', 'USER NOTICE','STRICT NOTICE','RECOVERABLE ERROR');\n $errorType = isset($errorType[$errno])?$errorType[$errno]:$errno;\n $message = $dbh->quote(\"$errorType on line $errline: $errstr\");\n $type = \"'PHP'\";\n $file = $dbh->quote($file);\n $data = $dbh->quote(print_r($data,1));\n\n // If already there are this error, just remembering it happened again\n $query = $dbh->query(\"SELECT `id_record`,`num_cases` FROM `\".DB_DATABASENAME_LOG.\"`.`log` WHERE `project`=\".$dbh->quote(PR_NAME).\" AND `file`=$file AND `type`=$type AND `message`=$message\");\n if($p = $query->fetch())\n {\n $id_record = $p['id_record'];\n $num_cases = $p['num_cases'];\n $dbh->query(\"UPDATE `\".DB_DATABASENAME_LOG.\"`.`log` SET `num_cases`=\".($num_cases+1).\" WHERE `id_record`=$id_record\");\n }\n // Else writting this error to database\n else\n {\n $dbh->query(\"INSERT INTO `\".DB_DATABASENAME_LOG.\"`.`log`(`project`,`file`,`type`,`message`,`data`,`date`) VALUES(\".$dbh->quote(PR_NAME).\", $file,$type,$message,$data,NOW())\");\n $id_record = $dbh->lastInsertId();\n }\n\n // If project in live mode, not printing error, but only it id\n if(PR_MODE===1)\n echo 'There are unexpected error, id error: '.$id_record;\n else\n echo 'Error('.$type.') in file '.$file.': '.$message;\n\n die;\n }\n \n catch (PDOException $e)\n {\n // If project in live mode, not printing error\n if(PR_MODE===1)\n die('Houston, we have a problem!');\n else\n die($e->getMessage());\n }\n }", "title": "" }, { "docid": "e4bc067e8aa560926178eca63c2cad6e", "score": "0.48874176", "text": "public function logError($text);", "title": "" }, { "docid": "a2b5c9bfb4ab21382999f22b849f5822", "score": "0.48873127", "text": "public function errorDB(&$row, $sql = '')\n {\n //\tLOS ERRORES A PARTIR DEL USO DE LA PDO DE PHP\n // SON MANEJADOS MEDIANTE EXCEPCIONES\n\n /* if ($this->db->isError($row))\n {\n $error = \"<br><br>--- class \" . $this->className . \"--<br> \" . $sql . \"--<br>\n No se pudo realizar la consulta<br>\";\n $error .= $row->getMessage() . '<br><br>';\n $error .= $row->getDebugInfo() . '<br>';\n $error .= $row->getType() . '<br>';\n echo $error;\n trigger_error($error, E_USER_ERROR);\n $row = array();\n } */\n }", "title": "" }, { "docid": "32f1a6988a08a4a11988c7aef01c8689", "score": "0.488328", "text": "public function storeMessage(\n\t\tarray $message,\n\t\tstring $originalQueue,\n\t\tstring $error = '',\n\t\tstring $trace = '',\n\t\t$retryDate = null\n\t): int {\n\t\t$now = UtcDate::getUtcTimestamp();\n\t\t$originalDate = UtcDate::getUtcDatabaseString(\n\t\t\tDateFields::getOriginalDateOrDefault( $message, $now )\n\t\t);\n\n\t\t$dbRecord = [\n\t\t\t'original_date' => $originalDate,\n\t\t\t'damaged_date' => UtcDate::getUtcDatabaseString(),\n\t\t\t'original_queue' => $originalQueue,\n\t\t\t'error' => $error,\n\t\t\t'trace' => $trace,\n\t\t\t'message' => json_encode( $message ),\n\t\t];\n\t\tif ( $retryDate ) {\n\t\t\t$dbRecord['retry_date'] = UtcDate::getUtcDatabaseString(\n\t\t\t\t$retryDate\n\t\t\t);\n\t\t}\n\n\t\t// These fields have their own columns in the database\n\t\t// Copy the values from the message to the record\n\t\t$indexedFields = [\n\t\t\t'gateway', 'gateway_txn_id', 'order_id'\n\t\t];\n\n\t\tforeach ( $indexedFields as $fieldName ) {\n\t\t\tif ( isset( $message[$fieldName] ) ) {\n\t\t\t\t$dbRecord[$fieldName] = $message[$fieldName];\n\t\t\t}\n\t\t}\n\n\t\tlist( $fieldList, $paramList ) = self::formatInsertParameters(\n\t\t\t$dbRecord\n\t\t);\n\n\t\t$insert = \"INSERT INTO damaged ( $fieldList )\n\t\t\tVALUES ( $paramList );\";\n\n\t\t$this->prepareAndExecute( $insert, $dbRecord );\n\n\t\treturn $this->getDatabase()->lastInsertId();\n\t}", "title": "" }, { "docid": "7edff7462d4a38c6797fd52ac53aa7fc", "score": "0.48822173", "text": "private function errorMessage($message){\n\t\techo $message; \n\t\t$this->dbObj->close();\n\t\treturn false;\n\t}", "title": "" }, { "docid": "434deb74ff0adeb95562c00fe9d385a3", "score": "0.4872153", "text": "public function error($message, array $context = [])\n {\n $this->insert('error', $message, array_get($context, 'loggable_type', null), array_get($context, 'loggable_id', null));\n $this->log->error($message, $context);\n }", "title": "" }, { "docid": "0d266bf116fff8121be93d7c9da21a45", "score": "0.48719907", "text": "public function debug($message) {\n\t\t\tif($this->isLogFileSet() == TRUE) {\n\t\t\t\terror_log($this->_prepareMessage($message), 3, $this->_logFile);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b78a897ddb741107458b84d1fc7a6d0e", "score": "0.4865103", "text": "protected function errorMessage($message) {\n \techo $message . \"\\n\";\n \tif(self::SAVE_ERROR_MESSAGES) {\n \t\t$file = sprintf(self::ERROR_MESSAGE_FILE, date('m_d_Y'));\n \t\tif(!is_dir(Yii::getPathOfAlias('application.runtime.logs'))) {\n \t\t\t@mkdir(Yii::getPathOfAlias('application.runtime.logs'));\n \t\t}\n \t\t$comment = sprintf(\"[%s] %s\\n\", date('D M Y H.i'), $message);\n \t\tfile_put_contents( Yii::getPathOfAlias('application.runtime.logs') . '/' . $file, $comment, FILE_APPEND );\n \t}\n }", "title": "" }, { "docid": "70487352656ab21076b83f8924f880fc", "score": "0.4863033", "text": "protected function databasefail()\n\t{\n\t\t$changesToMake = $this->_databaseChecker();\n\t\t\t\t\n\t\t\\IPS\\Output::i()->httpHeaders['X-IPS-FormNoSubmit'] = \"true\";\n\t\t\n\t\tif ( isset( \\IPS\\Request::i()->run ) )\n\t\t{\n\t\t\t$erroredQueries = array();\n\t\t\t$errors = array();\n\t\t\tforeach ( $changesToMake as $query )\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t\\IPS\\Db::i()->query( $query['query'] );\n\t\t\t\t}\n\t\t\t\tcatch ( \\Exception $e )\n\t\t\t\t{\n\t\t\t\t\t$erroredQueries[] = $query['query'];\n\t\t\t\t\t$errors[] = $e->getMessage();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( \\count( $erroredQueries ) )\n\t\t\t{\n\t\t\t\t\\IPS\\Output::i()->output = \\IPS\\Theme::i()->getTemplate( 'support' )->fixDatabase( $erroredQueries, $errors );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\\IPS\\Output::i()->redirect( \\IPS\\Http\\Url::internal('app=core&module=support&controller=support') );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$queries = array();\n\t\t\tforeach ( $changesToMake as $query )\n\t\t\t{\n\t\t\t\t$queries[] = $query['query'];\n\t\t\t}\n\t\t\t\n\t\t\tif ( \\count( $queries ) )\n\t\t\t{\n\t\t\t\t\\IPS\\Output::i()->output = \\IPS\\Theme::i()->getTemplate( 'support' )->fixDatabase( $queries, NULL );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\\IPS\\Output::i()->redirect( \\IPS\\Http\\Url::internal('app=core&module=support&controller=support') );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "72bc29a51740c72d4cad3794cdf8dc4f", "score": "0.48502266", "text": "function db_error() {\r\n\t\treturn \"<p>\".db_error_num().\": \".db_error_msg().\"<p>\";\r\n\t}", "title": "" }, { "docid": "1b5c57bcdd710e2eee553a586f290b4f", "score": "0.48493", "text": "public function error($code,$message) {\n if ($this->_debug) {\n trigger_error($message,E_USER_ERROR);\n }\n }", "title": "" }, { "docid": "598422ed6e164d0d22c3e6c6f6b4927a", "score": "0.48403537", "text": "public function lastSqlError();", "title": "" }, { "docid": "1ddaf4254beee86e59a68997b6c0c0c0", "score": "0.48327026", "text": "public function error(string|array $message);", "title": "" }, { "docid": "f459c3258c0cbca1dfb32d9203c827ac", "score": "0.48053956", "text": "public function debug() {\n $errorToreturn = '';\n if ($this->debug && $this->hasError()) {\n $message = $this->getMessage();\n $trace = $this->getTrace();\n $critical = $this->getCritical();\n\n for ($i = 0, $count = count($message); $i < $count; $i++) {\n\n if ($critical[$i]) {\n echo '<strong style=\"color:red\">';\n }\n else {\n continue;\n }\n\n CheckoutapiUtilityUtilities::dump($message[$i] . '==> { ');\n\n foreach ($trace[$i] as $errorIndex => $errors) {\n echo \"<pre>\";\n echo $errorIndex . \"=> \";\n print_r($errors);\n\n echo \"</pre>\";\n }\n\n if ($critical[$i]) {\n echo '</strong>';\n }\n\n CheckoutapiUtilityUtilities::dump('} ');\n\n }\n\n }\n return $errorToreturn;\n\n }", "title": "" }, { "docid": "5efdfadc8ca314cf0c55ac2f98484370", "score": "0.47962588", "text": "private function _log(string $message)\n {\n if ($this->_debug === true) {\n error_log(\n sprintf(\n \"%s; %s; %s\\n\",\n date(\"Y-m-d H:i:s\"),\n $this->_id,\n $message\n ),\n 3,\n $this->_logFile\n );\n }\n }", "title": "" }, { "docid": "b5d80028ace44864e67cb211a98ecef9", "score": "0.47940353", "text": "public function error ($message)\n\t{\n\t\t$this->add (Logger::CLASS_ERROR, $message);\n\t}", "title": "" }, { "docid": "f48c217436e6bae895081221c7def381", "score": "0.47922385", "text": "private function addError(){}", "title": "" }, { "docid": "6b9329bbfa49f9cca851753304a85171", "score": "0.47921222", "text": "function error_function($error_message, $error_file, $error_line, $error_function,$err_query) \n\t{\n\t\t$errors = debug_backtrace();\n\t\t$error_message = $error_message ? $error_message : mysqli_error($this->link);\n\t\t$msg = \"<h2>A SQL Error was encountered</h2><br><br>\";\n\t\t$msg .= \"<b>IP</b> : \".$_SERVER['REMOTE_ADDR'].\"<br><br>\";\n\t\t$msg .= \"<b>URL</b> : \".SITE_URL.$_SERVER['REQUEST_URI'].\"<br><br>\";\n\t\t$msg .= \"<b>Referer URL</b> : \".$_SERVER['HTTP_REFERER'].\"<br><br>\";\n\t\t$msg .= \"<b>Query Sring</b> : \".$_SERVER['QUERY_STRING'].\"<br><br>\";\n\t\t$msg .= \"<b>Message</b>: \".$error_message.\"<br><br>\";\n\t\t$msg .= \"<b>Query</b>: \".$err_query.\"<br><br>\";\n\t\t$msg .= \"<b>File Name</b>: \".$errors[1]['file'].\"<br><br>\";\n\t\t$msg .= \"<b>Line Number</b>: \".$errors[1]['line'].\"<br><br>\";\n\t\t$msg .= \"<b>Function Name</b>: \".$errors[1]['function'].\"<br><br>\";\n\t\t\n\t\t$headers = \"MIME-Version: 1.0;\\n\";\n\t\t$headers .= \"Content-type: text/html; charset=iso-8859-1\\n\";\n\t\t$headers .= \"From: Admin <[email protected]>\\n\";\n\t\tif(1===DEVELOPMENT_MODE || 2===DEVELOPMENT_MODE)\n\t\t{\n\t\t\techo $msg;\n\t\t\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo $msg;\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "c8ece615ad203acbe0bc737d7beeeed6", "score": "0.4788", "text": "public function error(string $message): void;", "title": "" }, { "docid": "a51d22e66d69d852d579743a91058749", "score": "0.4787183", "text": "public function debug($message);", "title": "" }, { "docid": "a51d22e66d69d852d579743a91058749", "score": "0.4787183", "text": "public function debug($message);", "title": "" }, { "docid": "a51d22e66d69d852d579743a91058749", "score": "0.4787183", "text": "public function debug($message);", "title": "" }, { "docid": "068a4181a588e8ab0a3a9a3419068f74", "score": "0.4786735", "text": "private function logError($query,$errno,$type='non-fatal',$error) {\n $query_num = count($this->LiveStats);\n if (is_array($error)) $error_string = $error[2];\n else $error_string = $error;\n if (empty($error_string)) $error_string = '(not specified)';\n else if ($type == 'non-fatal') $complete_error = '[NOTICE] '.$error_string;\n else {\n $complete_error = '[ERROR] '.$error_string;\n $this->rollback = TRUE;\n }\n if ($this->in_transaction === TRUE) $in_transaction = 'TRUE';\n else $in_transaction = 'FALSE';\n $this->errors[$query_num] = array('query_number' => $query_num,'query' => $query,'in_transaction' => $in_transaction, 'errno' => $errno,'type' => $type,'error' => $complete_error);\n if ($type == 'fatal') { \n $this->error = '['.$errno.'] '.$error[2];\n $this->results = 0;\n }\n return TRUE;\n }", "title": "" }, { "docid": "37a93b2aaddf0b32089c0d974e9992d2", "score": "0.47860852", "text": "abstract protected function _printError($message);", "title": "" }, { "docid": "7714ee38372ee5b40359109c4bba8c42", "score": "0.47838983", "text": "protected function logError() {\n\n \t$this->err++;\n\n }", "title": "" }, { "docid": "5b215ac607146e8ebad9510144a632a8", "score": "0.4779795", "text": "public static function error( $message ) {\n\t\tself::log( $message, LogLevel::LEVEL_ERROR );\n\t}", "title": "" }, { "docid": "3dcdd6fbe42201cb44291a5cfcd5e1ed", "score": "0.47795674", "text": "function display_db_error($error_message) {\n global $app_path;\n include 'errors/db_error.php';\n debug_print_backtrace();\n exit;\n}", "title": "" }, { "docid": "db199edfbe58344fc73d0272771954fc", "score": "0.4773291", "text": "public function DBErrorCatcher()\n {\n try{\n $this->DBConnectionInitializer();\n return \"Connection Successfully\";\n }\n catch (PDOException $e) {\n return \"Connection Failed\". $e->getMessage();\n }\n }", "title": "" }, { "docid": "28c3b89e57da431c2feb45f0414e3733", "score": "0.47713932", "text": "public function log($message, $data=null) {\n\t\tif(is_array($data) || is_object($data)) {\n\t\t\t$message.=\" \".print_r($data, true);\n\t\t}\n\t\t$id = uniqid('',true);\n\t\t$timestamp = date(\"Y-m-d H:i:s\");\n\t\tif($this->do_write) {\n\t\t\t$this->db->insert($this->table, array('id'=>$id, 'message'=>$message, 'timestamp'=>$timestamp));\n\t\t\treturn $message;\n\t\t}\n\t}", "title": "" } ]
c944f59d16b2ebbf9eb823491e0c4310
Method for sheduled backups, called via asynservice
[ { "docid": "64e4747382ea5cf930e668cf32dc3f79", "score": "0.58100706", "text": "function do_backup()\n\t{\n\t\t$this->db_backup = new db_backup();\n\n \t\tif (($f = $this->db_backup->fopen_backup()))\n \t\t{\n\t\t\t$this->db_backup->backup($f);\n\t\t\tif(is_resource($f))\n\t\t\t\tfclose($f);\n\t\t\t/* Remove old backups. */\n\t\t\t$this->db_backup->housekeeping();\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "b54f5ef61a6441391591357b0030537a", "score": "0.6861664", "text": "abstract function PerformBackup();", "title": "" }, { "docid": "719a608f3cd2039f6a39bff134ad7e72", "score": "0.6574327", "text": "public function cron()\n\t\t{\n\t\t\t$this->layout = null;\n\t\t\t\n\t\t\tif (Core_CronManager::access_allowed())\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tSystem_Backup_Archive::backup(true, true);\n\t\t\t\t\techo \"Success\";\n\t\t\t\t}\n\t\t\t\tcatch (Exception $ex)\n\t\t\t\t{\n\t\t\t\t\techo $ex->getMessage();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "2d55f2f34ac66ec587d887ce3ec5d331", "score": "0.64813614", "text": "function hmbkp_request_do_backup() {\n\n\t// Are we sure\n\tif ( !isset( $_GET['action'] ) || $_GET['action'] !== 'hmbkp_backup_now' || hmbkp_is_in_progress() || !hmbkp_possible() )\n\t\treturn false;\n\n\t// Schedule a single backup\n\twp_schedule_single_event( time(), 'hmbkp_schedule_single_backup_hook' );\n\n\t// Remove the once every 60 seconds limitation\n\tdelete_transient( 'doing_cron' );\n\n\t// Fire the cron now\n\tspawn_cron();\n\n\t// Redirect back\n\twp_redirect( remove_query_arg( 'action' ) );\n\texit;\n\n}", "title": "" }, { "docid": "cee1924e6617f1eda32c96330d0a071c", "score": "0.64796424", "text": "public function schedule()\n {\n $this->daily('purgeOutdatedArchives', null, self::HIGH_PRIORITY);\n\n // general data purge on invalidated archive records, executed daily\n $this->daily('purgeInvalidatedArchives', null, self::LOW_PRIORITY);\n\n // lowest priority since tables should be optimized after they are modified\n $this->daily('optimizeArchiveTable', null, self::LOWEST_PRIORITY);\n\n if(SettingsPiwik::isInternetEnabled() === true){\n $this->weekly('updateSpammerBlacklist');\n }\n }", "title": "" }, { "docid": "cc1c283f3ed257915f7f5a703536adf2", "score": "0.64702725", "text": "function auto_backup_timer_handler($discard) {\n\tsetOption('last_backup_run',time());\n\t$curdir = getcwd();\n\t$folder = SERVERPATH . \"/\" . BACKUPFOLDER;\n\tif (!is_dir($folder)) {\n\t\tmkdir ($folder, CHMOD_VALUE);\n\t}\n\tchdir($folder);\n\t$filelist = safe_glob('*'.'.zdb');\n\t$list = array();\n\tforeach($filelist as $file) {\n\t\t$list[$file] = filemtime($file);\n\t}\n\tchdir($curdir);\n\tasort($list);\n\t$list = array_flip($list);\n\t$keep = getOption('backups_to_keep');\n\twhile (count($list) >= $keep) {\n\t\t$file = array_shift($list);\n\t\tunlink(SERVERPATH . \"/\" . BACKUPFOLDER.'/'.$file);\n\t}\n\n\tcron_starter(\tSERVERPATH.'/'.ZENFOLDER.'/'.UTILITIES_FOLDER.'/backup_restore.php',\n\t\t\t\t\t\t\t\tarray('backup'=>1, 'compress'=>sprintf('%u',getOption('backup_compression')),'XSRFTag'=>'backup')\n\t\t\t\t\t\t\t);\n\treturn $discard;\n}", "title": "" }, { "docid": "08de0c8c9578d18c0aafa331764801db", "score": "0.6428612", "text": "function wi_create_daily_backup_schedule()\n{\n $timestamp = wp_next_scheduled('wi_create_daily_backup');\n\n //If $timestamp == false schedule daily backups since it hasn't been done previously\n if ($timestamp == false)\n {\n //Schedule the event for right now, then to repeat daily using the hook 'wi_create_daily_backup'\n wp_schedule_event(time() , 'daily', 'wi_create_daily_backup');\n }\n}", "title": "" }, { "docid": "0f18ca195bf594da157766882b550f30", "score": "0.63992685", "text": "abstract public function scheduledTask();", "title": "" }, { "docid": "8e89ea78e877fe55af2b5835c51547a5", "score": "0.6356237", "text": "public function scheduled_backup() {\n\t\t$sceduled_backup = false;\n\n\t\treturn apply_filters( 'itsec_scheduled_external_backup', $sceduled_backup );\n\t}", "title": "" }, { "docid": "da257c56cf64c5917f2b284e5aa1fb9f", "score": "0.6130514", "text": "public function cron_jobs() {\n\n // Process the subscriptions\n (new MidrubBasePaymentsCollectionPaypalControllers\\Cron)->subscriptions(); \n \n }", "title": "" }, { "docid": "81c2462cdac899acc1de1b56bf9b1af7", "score": "0.61230975", "text": "public function historyBackup()\n {\n $today = date('Y-m-d');\n $date_to_process = date('Y-m-d', strtotime($today . ' - 105 days'));\n $params = array('date' => $date_to_process);\n $this->db_historyBackup($params);\n\n }", "title": "" }, { "docid": "20d40308cbdb97eb3eee58c0e8c21d2b", "score": "0.6066462", "text": "public static function fetch_backups() {\n global $CFG, $DB, $USER;\n\n // Log cron_started event.\n $info = get_string('eventcronstarted', 'tool_coursebank') . '.';\n coursebank_logging::log_event(\n $info,\n 'cron_started',\n get_string('eventcronstarted', 'tool_coursebank'),\n coursebank_logging::LOG_MODULE_COURSE_BANK,\n SITEID,\n '',\n $USER->id,\n array()\n );\n $starttime = time();\n\n // Cancel any old backups that are in the coursebank table\n // which have not been completely transferred.\n self::cancel_old_backups();\n\n // Get backups that are less than 2 days old.\n $maxbackuptime = time() - (self::MAX_BACKUP_DAYS * DAYSECS);\n // Get a list of the course backups.\n $sqlcommon = \"SELECT tcs.id,\n tcs.uniqueid,\n tcs.backupfilename,\n tcs.fileid,\n tcs.chunksize,\n tcs.totalchunks,\n tcs.chunknumber,\n tcs.timecreated,\n tcs.timecompleted,\n tcs.timechunksent,\n tcs.timechunkcompleted,\n tcs.chunkretries,\n tcs.status,\n tcs.isbackedup,\n f.id AS f_fileid,\n f.contenthash,\n f.pathnamehash,\n f.filename,\n f.userid,\n f.filesize,\n f.timecreated AS filetimecreated,\n f.timemodified AS filetimemodified,\n cr.id AS courseid,\n cr.fullname AS coursefullname,\n cr.shortname AS courseshortname,\n cr.category,\n cr.startdate AS coursestartdate,\n cc.id as categoryid,\n cc.name as categoryname\n FROM {files} f\n INNER JOIN {context} ct on f.contextid = ct.id\n INNER JOIN {course} cr on ct.instanceid = cr.id\n INNER JOIN {course_categories} cc on cr.category = cc.id\";\n\n $sqlselect = \"SELECT tcs.id,\n tcs.uniqueid,\n tcs.backupfilename,\n tcs.fileid,\n tcs.chunksize,\n tcs.totalchunks,\n tcs.chunknumber,\n tcs.timecreated,\n tcs.timecompleted,\n tcs.timechunksent,\n tcs.timechunkcompleted,\n tcs.chunkretries,\n tcs.status,\n tcs.isbackedup,\n f.id AS f_fileid,\n tcs.contenthash,\n tcs.pathnamehash,\n f.filename,\n tcs.userid,\n tcs.filesize,\n tcs.filetimecreated,\n tcs.filetimemodified,\n tcs.courseid,\n tcs.coursefullname,\n tcs.courseshortname,\n cr.category,\n tcs.coursestartdate,\n tcs.categoryid,\n tcs.categoryname\n FROM {files} f\n INNER JOIN {context} ct on f.contextid = ct.id\n INNER JOIN {course} cr on ct.instanceid = cr.id\n INNER JOIN {course_categories} cc on cr.category = cc.id\";\n\n $sql = $sqlcommon . \"\n LEFT JOIN {tool_coursebank} tcs on tcs.fileid = f.id\n WHERE tcs.id IS NULL\n AND ct.contextlevel = :contextcourse1\n AND f.mimetype IN ('application/vnd.moodle.backup', 'application/x-gzip')\n AND f.timecreated >= :maxbackuptime1\n AND f.component <> 'tool_recyclebin'\n AND f.filename <> :tmp_bkp_filename\n UNION\n \" . $sqlselect . \"\n INNER JOIN {tool_coursebank} tcs on tcs.fileid = f.id\n WHERE ct.contextlevel = :contextcourse2\n AND f.mimetype IN ('application/vnd.moodle.backup', 'application/x-gzip')\n AND tcs.status IN (:statusnotstarted2, :statusinprogress2, :statuserror2)\n AND f.timecreated >= :maxbackuptime2\n AND f.component <> 'tool_recyclebin'\n UNION\n \" . $sqlselect . \"\n RIGHT JOIN {tool_coursebank} tcs on tcs.fileid = f.id\n WHERE f.id IS NULL\n AND tcs.isbackedup = 1\n AND tcs.status IN (:statusnotstarted3, :statusinprogress3, :statuserror3)\n AND f.timecreated >= :maxbackuptime3\n ORDER BY timecreated\";\n // This could possibly be done better... But moodle expects each instance of the variable to be provided separately,\n // so we have this.\n $params = array('statusnotstarted2' => self::STATUS_NOTSTARTED,\n 'statuserror2' => self::STATUS_ERROR,\n 'statusinprogress2' => self::STATUS_INPROGRESS,\n 'statusnotstarted3' => self::STATUS_NOTSTARTED,\n 'statuserror3' => self::STATUS_ERROR,\n 'statusinprogress3' => self::STATUS_INPROGRESS,\n 'contextcourse1' => CONTEXT_COURSE,\n 'contextcourse2' => CONTEXT_COURSE,\n 'maxbackuptime1' => $maxbackuptime,\n 'maxbackuptime2' => $maxbackuptime,\n 'maxbackuptime3' => $maxbackuptime,\n 'tmp_bkp_filename' => TEMP_BACKUP_FILE_NAME,\n );\n $recordset = $DB->get_recordset_sql($sql, $params);\n\n $insertfields = array('filesize', 'filetimecreated',\n 'filetimemodified', 'courseid', 'contenthash',\n 'pathnamehash', 'userid', 'coursefullname',\n 'courseshortname', 'coursestartdate', 'categoryid',\n 'categoryname'\n );\n $insertcount = 0;\n foreach ($recordset as $coursebackup) {\n if (!isset($coursebackup->status)) {\n // The record hasn't been input in the course bank table yet.\n $cs = new stdClass();\n $cs->uniqueid = self::generate_uuid();\n $cs->backupfilename = $coursebackup->filename;\n $cs->fileid = $coursebackup->f_fileid;\n $cs->chunksize = self::get_config_chunk_size();\n $cs->totalchunks = self::calculate_total_chunks($cs->chunksize, $coursebackup->filesize);\n $cs->chunknumber = 0;\n $cs->status = self::STATUS_NOTSTARTED;\n $cs->isbackedup = 0; // No copy has been created yet.\n $cs->timecreated = time();\n foreach ($insertfields as $field) {\n $cs->$field = $coursebackup->$field;\n }\n $DB->insert_record('tool_coursebank', $cs);\n $insertcount++;\n }\n }\n\n // Log transfer_queue populated event.\n $info = get_string(\n 'event_transfer_queue_populated',\n 'tool_coursebank',\n $insertcount\n );\n coursebank_logging::log_event(\n $info,\n 'transfer_queue_populated',\n 'Transfer queue populated',\n coursebank_logging::LOG_MODULE_COURSE_BANK,\n SITEID,\n '',\n $USER->id,\n array('queuecount' => $insertcount)\n );\n $recordset->close();\n\n // Get all backups that are pending transfer, attempt to transfer them.\n $sql = 'SELECT * FROM {tool_coursebank}\n WHERE status IN (:notstarted, :inprogress, :error)\n AND filetimecreated >= :maxbackuptime ORDER BY id';\n $contstatus = array(\n 'notstarted' => self::STATUS_NOTSTARTED,\n 'inprogress' => self::STATUS_INPROGRESS,\n 'error' => self::STATUS_ERROR,\n 'maxbackuptime' => $maxbackuptime,\n );\n $transferrs = $DB->get_recordset_sql($sql, $contstatus);\n\n foreach ($transferrs as $coursebackup) {\n $idparam = array('id' => $coursebackup->id);\n $status = $DB->get_field(\n 'tool_coursebank',\n 'status',\n $idparam,\n MUST_EXIST\n );\n // Skip this course if its status is on-hold or cancelled.\n if (!in_array($status, $contstatus)) {\n mtrace(\"Skipping transfer of backup with Course Bank ID \" .\n \"$coursebackup->id and status code $status\" .\n \" (Course ID: $coursebackup->courseid).\");\n continue;\n }\n $result = self::send_backup($coursebackup, $starttime);\n if ($result == self::SEND_SUCCESS) {\n // Delete file from the designated storage area.\n $delete = self::delete_backup($coursebackup, true);\n if (!$delete) {\n $delfail = get_string(\n 'deletefailed',\n 'tool_coursebank',\n $coursebackup->backupfilename\n );\n // Log it.\n coursebank_logging::log_delete_backup($delfail);\n mtrace($delfail . \"\\n\");\n }\n // Delete file from the automated backups storage area.\n $localdelete = self::delete_moodle_backup($coursebackup);\n if (!$localdelete) {\n $delfail = get_string(\n 'localdeletefailed',\n 'tool_coursebank',\n $coursebackup->backupfilename\n );\n // Log it.\n coursebank_logging::log_delete_backup($delfail);\n mtrace($delfail . \"\\n\");\n }\n } else if ($result == self::SEND_CRON_TIMEOUT) {\n $crontimeout = get_string(\n 'crontimeout',\n 'tool_coursebank'\n );\n coursebank_logging::log_cron_timeout(\n $crontimeout,\n $coursebackup->courseid\n );\n break;\n } else {\n $bufail = get_string(\n 'backupfailed',\n 'tool_coursebank',\n $coursebackup->backupfilename\n );\n // Log it.\n coursebank_logging::log_send_backup($bufail);\n mtrace($bufail . \"\\n\");\n // Stop sending backups until this one is resolved.\n break;\n }\n }\n $transferrs->close();\n\n // Log cron_completed event.\n $info = get_string('eventcroncompleted', 'tool_coursebank') . '.';\n coursebank_logging::log_event(\n $info,\n 'cron_completed',\n get_string('eventcroncompleted', 'tool_coursebank'),\n coursebank_logging::LOG_MODULE_COURSE_BANK,\n SITEID,\n '',\n $USER->id,\n array()\n );\n }", "title": "" }, { "docid": "14b4e3815b5023e3ca77f9b45fbe6208", "score": "0.59988177", "text": "function backup_daily_cron_handler($hook, $type, $returnvalue, $params) {\n global $CONFIG;\n\n $site = $CONFIG->site_guid;\n $retention = elgg_get_plugin_setting('retention', 'backup');\n if (!$retention) {\n $retention = BACKUP_DEFAULT_RETENTION;\n }\n\n $date = mktime(date('i'), date('i'), date('s'), date('n'), date('j')-$retention, date('Y'));\n $query = \"DELETE FROM {$CONFIG->dbprefix}backup WHERE site_guid=$site AND time_created < \" . $date;\n\n if (delete_data($query) >= 0) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "a85917ce211b110ab3b02a47ea6b13e5", "score": "0.592745", "text": "protected function schedule(Schedule $schedule)\n {\n $date = Carbon::now();\n $schedule->command('tatuco:backup_bd');\n // ->hourly();\n $host = config('database.connections.pgsql.host');\n $user = config('database.connections.pgsql.username');\n $pass = config('database.connections.pgsql.password');\n $bd = config('database.connections.pgsql.database');\n $port = config('database.connections.pgsql.port');\n $schedule->exec('/usr/bin/pg_dump --host '.$host.' --port '.$port.' --username \"'.$user.'\" --no-password \"'.$bd.'\"')\n ->sendOutputTo('/home/zippyttech/Documentos/backup_tatuco-'.$date.'.backup');\n\n \n /* $schedule->execute('/usr/bin/pg_dump --host {$host} --port {$port} --username \"{$user}\" --no-password --format custom --blobs --verbose --file \"/home/maria/laravel-tatuco/laravel\" \"laravel-tatuco\"')*/\n // ->daily()\n //->sendOutputTo('directorio');\n }", "title": "" }, { "docid": "cd1d535ea12fc2b1205d798b7519002c", "score": "0.5888088", "text": "function backupAction(){\n\t\t$this->_helper->layout->disableLayout();\n\t\t$this->_helper->viewRenderer->setNoRender(true);\n\t\t$session = SessionWrapper::getInstance();\n\t\t$config = Zend_Registry::get('config'); \n\t\t$formvalues = $this->_getAllParams();\n\t\t$result = array();\n\t\t$showverbose = true;\n\t\t$detect = '';\n\t\tif(!isEmptyString($this->_getParam('triggered'))){\n\t\t\t$showverbose = false;\n\t\t}\n\t\tif($this->_getParam('autocron') == 'yes'){\n\t\t\t$detect = '_cron';\n\t\t}\n\t\t\n\t\t# get the database connection parameters \n\t\t$db_params = Zend_Controller_Front::getInstance()->getParam(\"bootstrap\")->getPluginResource('db')->getParams(); debugMessage($db_params);\n\t\t\n\t\t# configure your database variables below:\n\t\t$host_array = explode(\":\", $db_params['host']);\n\t\t$dbhost = $host_array[0]; # Server address of your MySQL Server\n\t\t$dbuser = 'admin'; # Username to access MySQL database\n\t\t$dbpass = '1nf0trade'; # Password to access MySQL database\n\t\t$dbname = 'farmis'; # Database Name\n\t\t$dbport = '3306'; \n\t\t// exit();\n\t\t\n\t\t# Optional Options You May Optionally Configure\n\t\t$use_gzip = $config->backup->usegzip; # Set to No if you don't want the files sent in .gz format\n\t\t$remove_sql_file = $config->backup->removesqlfile; # Set this to yes if you want to remove the .sql file after gzipping. Yes is recommended.\n\t\t$remove_gzip_file = $config->backup->removegzipfile; # Set this to yes if you want to delete the gzip file also. I recommend leaving it to \"no\"\n\t\t\n\t\t# Configure the path that this script resides on your server.\n\t\t// $savepath = APPLICATION_PATH.$config->backup->scriptfolder; # Full path to this directory. Do not use trailing slash!\n\t\t$savepath = BASE_PATH.DIRECTORY_SEPARATOR.'backup'; // debugMessage($savepath); \n\t\t$send_email = $config->backup->sendemail; # Do you want this database backup sent to your email? Fill out the next 2 lines\n\t\t# email address\n\t\t$backupemail = $config->backup->backupemail;\n\t\tif(!isEmptyString($this->_getParam('email'))){\n\t\t\t$backupemail = $this->_getParam('email');\n\t\t}\n\t\t# attachment mime type - default for a text attachment \n\t\t$attachment_mime_type = \"text/plain\"; \n\t\t\n\t\t# set the maximum execution time to ensure that the backup is completed \n\t\tini_set(\"max_execution_time\", 600);\n\t\t\n\t\t$date = date(\"dMy_Hi\");\n\t\t# sql backup filename\n\t\t$sqlattachmentname = $dbname.$detect.\"_\".$date.\".sql\";\n\t\t# zipped backup filename\n\t\t$gzipattachmentname = $dbname.\"_\".$date.\".tar.gz\";\n\t\t# sql backup path\n\t\t$sqlscriptpath = $savepath.DIRECTORY_SEPARATOR.$sqlattachmentname;\n\t\t# zipped backup path\n\t\t$zipfilepath = $savepath.DIRECTORY_SEPARATOR.$gzipattachmentname;\n\t\t\n\t\t# before backingup, move all current files at root to the archive folder\n\t\t$sqlfiles = glob($savepath.DIRECTORY_SEPARATOR.'*.sql'); \n\t\t$tarfiles = glob($savepath.DIRECTORY_SEPARATOR.'*.tar.gz'); \n\t\t$archivefiles = glob($savepath.DIRECTORY_SEPARATOR.'archive'.DIRECTORY_SEPARATOR.'*');\n\t\t \n\t\t// debugMessage($sqlfiles);\n\t\tforeach ($sqlfiles as $afile){\n\t\t\t$afile_filename = basename($afile);\n\t\t\trename($afile, $savepath.DIRECTORY_SEPARATOR.'archive'.DIRECTORY_SEPARATOR.$afile_filename);\n\t\t}\n\t\tforeach ($tarfiles as $afile){\n\t\t\t$afile_filename = basename($afile);\n\t\t\trename($afile, $savepath.DIRECTORY_SEPARATOR.'archive'.DIRECTORY_SEPARATOR.$afile_filename);\n\t\t}\n\t\t\n\t\t$time = time();\n\t\tforeach($archivefiles as $file){\n\t\t\tif(is_file($file)){\n\t\t\t\t$seconds = 60*60*24*7;\n\t\t\t\t// $seconds = 60; // debugMessage($time - filemtime($file));\n\t\t\t\tif($time - filemtime($file) >= $seconds){ // 2 days\n\t\t\t\t\t// debugMessage($file);\n\t\t\t\t\tunlink($file);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$backupcommand = \"mysqldump -R --add-drop-table --complete-insert --add-locks --quote-names --lock-tables -h \".$dbhost.\" -P \".$dbport.\" -u \".$dbuser.\" -p\".$dbpass.\" \".$dbname.' -q > \"'.$sqlscriptpath.'\"'; debugMessage($backupcommand); // exit();\n\t\tpassthru($backupcommand);\n\t\t\n\t\tif($showverbose){\n\t\t\tdebugMessage(\"FARMIS Database backup completed to \".$sqlscriptpath);\t\n\t\t}\n\t\t\n\t\t# create tar archive\n\t\tif($use_gzip==\"yes\"){\t\t\n\t\t\t$zipline = \"tar -czf \".$zipfilepath.\" \".$sqlscriptpath;\n\t\t\tshell_exec($zipline); debugMessage($zipline);\n\t\t\tdebugMessage(\"Gzip of backup completed\");\n\t\t}\n\t\t// exit();\n\t\t# set email attachment name and path depending on weather to form zip or not\n\t\tif($use_gzip==\"yes\"){\n\t\t\t$attachmentpath = $zipfilepath;\n\t\t\t$attachmentname = $gzipattachmentname;\n\t\t\t$attachment_mime_type = \"application/gzip\"; \n\t\t} else {\n\t\t\t$attachmentpath = $sqlscriptpath;\n\t\t\t$attachmentname = $sqlattachmentname;\n\t\t}\n\t\t\n\t\t# send an email with a copy of the backup\t\n\t\tif($send_email == \"yes\" ){\n\t\t\t$mail = Zend_Registry::get('mail');\n\t\t\t# build the mailer class \n\t\t\t// $mail->addTo($config->get(APPLICATION_ENV)->get(\"databasebackupemail\"));\n\t\t\t$mail->addTo($backupemail);\n\t\t\t$mail->setFrom($config->notification->emailmessagesender, $config->notification->notificationsendername);\n\t\t\t$mail->setSubject(sprintf($this->_translate->_(\"database_backup_subject\"), getAppName(), date(\"j F Y h:iA\"))); # Subject in the email to be sent.\n\t\t\t$mail->setBodyHtml(sprintf($this->_translate->_(\"database_backup_body\"), getAppName())); # Brief Message.\n\t\t\t\n\t\t\t# attachmentpath is the full path to the file and attachmentname is the name of the file\n\t\t\t$at = new Zend_Mime_Part(file_get_contents($attachmentpath));\n\t\t\t$at->filename = $attachmentname; \n\t\t\t$at->disposition = Zend_Mime::DISPOSITION_INLINE;\n\t\t\t$at->encoding = Zend_Mime::ENCODING_BASE64;\n\t\t\t$at->type = $attachment_mime_type; \n\t\t\t$mail->addAttachment($at);\n\t\t\t// $mail->send(); \n\t\t\t\n\t\t\ttry {\n\t\t\t\t$mail->send();\n\t\t\t\t$message = getAppName().\" Database backup sent to \".$backupemail;\n\t\t\t\tif($showverbose){\n\t\t\t\t\tdebugMessage($message);\n\t\t\t\t} else {\n\t\t\t\t\t$result['message'] = $message;\n\t\t\t\t\t$result['result'] = 1;\n\t\t\t\t}\n\t\t\t} catch (Exception $e) {\n\t\t\t\t$message = 'Email notification not sent! '.$e->getMessage();\n\t\t\t\tif($showverbose){\n\t\t\t\t\tdebugMessage($message);\n\t\t\t\t} else {\n\t\t\t\t\tdebugMessage($message);\n\t\t\t\t\t$result['message'] = $message;\n\t\t\t\t\t$result['result'] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$mail->clearRecipients();\n\t\t\t$mail->clearSubject();\n\t\t\t$mail->setBodyHtml('');\n\t\t\t$mail->clearFrom();\n\t\t}\n\t\t\n\t\t# remove sql file if condition is set\n\t\tif($remove_sql_file==\"yes\"){\n\t\t\texec(\"rm -rf \".$sqlscriptpath);\n\t\t}\n\t\t# remove tar file if condition is set\n\t\tif($remove_gzip_file==\"yes\"){\n\t\t\texec(\"rm -rf \".$attachmentpath);\n\t\t}\n\t\t\n\t\tif(!$showverbose){\n\t\t\techo json_encode($result);\n\t\t}\n\t}", "title": "" }, { "docid": "4adb71f3d84a436c4f4b6a79c351eb40", "score": "0.588636", "text": "public function start()\n {\n $this->setStartDate(time());\n $this->setRelativebackupdirectory();\n LogEntry::logEntry('Starting Backup');;\n }", "title": "" }, { "docid": "a3db5c964cab8dac4e04fd631c63ead5", "score": "0.579986", "text": "private function backup_local(string $type)\n{ \n\n // Get database info\n $dbinfo = registry::$redis->hgetall('config:db_master');\n\n // Define .sql dump file\n $sqlfile = SITE_PATH . '/dump.sql';\n if (file_exists($sqlfile)) { @unlink($sqlfile); }\n\n // Dump mySQL database\n $dump_cmd = \"mysqldump -u\" . $dbinfo['dbuser'] . \" -p\" . $dbinfo['dbpass'] . \" -h\" . $dbinfo['dbhost'] . \" -P\" . $dbinfo['dbport'] . \" \" . $dbinfo['dbname'] . \" > $sqlfile\";\n system($dump_cmd);\n\n // Get filename\n $secs = (date('H') * 3600) + (date('i') * 60) + date('s');\n $archive_file = $type . '-' . date('Y-m-d_') . $secs . '.tar';\n io::create_dir(SITE_PATH . '/data/backups');\n chdir(SITE_PATH);\n\n // Archive the system\n $backup_source = $type == 'db' ? \"./dump.sql\" : \"./\";\n $tar_cmd = \"tar --exclude='data/backups/*' -cf \" . SITE_PATH . '/data/backups/' . $archive_file . \" $backup_source\";\n system($tar_cmd);\n system(\"gzip \" . SITE_PATH . \"/data/backups/$archive_file\");\n // Return\n return $archive_file . '.gz';\n\n}", "title": "" }, { "docid": "fa2b74a77374b66a93567485c4dba64a", "score": "0.57771415", "text": "public function schedule();", "title": "" }, { "docid": "6577f09d94a01f1baf6a9d68b09ab716", "score": "0.5771866", "text": "function backup_interface()\n\t{\n\t\t$title=get_page_title('BACKUP');\n\n\t\trequire_javascript('javascript_ajax');\n\n\t\t$last_backup=intval(get_value('last_backup'));\n\t\tif ($last_backup==0)\n\t\t{\n\t\t\t$text=do_lang_tempcode('NO_LAST_BACKUP');\n\t\t}\n\t\telseif (date('Y/m/d',utctime_to_usertime($last_backup))==date('Y/m/d',utctime_to_usertime()))\n\t\t{\n\t\t\t$text=do_lang_tempcode('LAST_BACKUP_TODAY');\n\t\t}\n\t\telseif (date('Y/m/d',utctime_to_usertime($last_backup))==date('Y/m/d',utctime_to_usertime(time()-60*60*24)))\n\t\t{\n\t\t\t$text=do_lang_tempcode('LAST_BACKUP_YESTERDAY');\n\t\t} else\n\t\t{\n\t\t\t$text=do_lang_tempcode('LAST_BACKUP',\n\t\t\t\tinteger_format(\n\t\t\t\t\tintval(round(\n\t\t\t\t\t\t(time()-$last_backup)/(60*60*24)\n\t\t\t\t\t))\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t$url=build_url(array('page'=>'_SELF','type'=>'make_backup'),'_SELF');\n\n\t\t$max_size=intval(get_value('backup_max_size'));\n\t\tif ($max_size==0) $max_size=100;\n\n\t\trequire_code('form_templates');\n\t\t$content=new ocp_tempcode();\n\t\t$content->attach(form_input_radio_entry('b_type','full',true,do_lang_tempcode('FULL_BACKUP')));\n\t\t$content->attach(form_input_radio_entry('b_type','incremental',false,do_lang_tempcode('INCREMENTAL_BACKUP')));\n\t\t$content->attach(form_input_radio_entry('b_type','sql',false,do_lang_tempcode('SQL_BACKUP')));\n\t\t$fields=form_input_radio(do_lang_tempcode('TYPE'),do_lang_tempcode('BACKUP_TYPE'),'b_type',$content);\n\t\t$fields->attach(form_input_integer(do_lang_tempcode('MAXIMUM_SIZE_INCLUSION'),do_lang_tempcode('MAX_FILE_SIZE'),'max_size',$max_size,false));\n\t\tif (addon_installed('calendar'))\n\t\t{\n\t\t\t$fields->attach(form_input_date__scheduler(do_lang_tempcode('SCHEDULE_TIME'),do_lang_tempcode('DESCRIPTION_SCHEDULE_TIME'),'schedule',true,true,true));\n\t\t\t$_recurrence_days=get_value('backup_recurrance_days');\n\t\t\t$recurrance_days=is_null($_recurrence_days)?NULL:intval($_recurrence_days);\n\t\t\tif (cron_installed()) $fields->attach(form_input_integer(do_lang_tempcode('RECURRANCE_DAYS'),do_lang_tempcode('DESCRIPTION_RECURRANCE_DAYS'),'recurrance_days',$recurrance_days,false));\n\t\t}\n\n\t\t$javascript='';\n\t\tif (addon_installed('calendar'))\n\t\t{\n\t\t\tif (cron_installed()) $javascript='var d_ob=[document.getElementById(\\'schedule_day\\'),document.getElementById(\\'schedule_month\\'),document.getElementById(\\'schedule_year\\'),document.getElementById(\\'schedule_hour\\'),document.getElementById(\\'schedule_minute\\')]; var hide_func=function () { document.getElementById(\\'recurrance_days\\').disabled=((d_ob[0].selectedIndex+d_ob[1].selectedIndex+d_ob[2].selectedIndex+d_ob[3].selectedIndex+d_ob[4].selectedIndex)>0); }; d_ob[0].onchange=hide_func; d_ob[1].onchange=hide_func; d_ob[2].onchange=hide_func; d_ob[3].onchange=hide_func; d_ob[4].onchange=hide_func; hide_func();';\n\t\t}\n\n\t\t$form=do_template('FORM',array('_GUID'=>'64ae569b2cce398e89d1b4167f116193','HIDDEN'=>'','JAVASCRIPT'=>$javascript,'TEXT'=>'','FIELDS'=>$fields,'SUBMIT_NAME'=>do_lang_tempcode('BACKUP'),'URL'=>$url));\n\n\t\t$results=$this->get_results();\n\n\t\treturn do_template('BACKUP_LAUNCH_SCREEN',array('_GUID'=>'26a82a0627632db79b35055598de5d23','TITLE'=>$title,'TEXT'=>$text,'RESULTS'=>$results,'FORM'=>$form));\n\t}", "title": "" }, { "docid": "e470f20cb5b3fbca3e7d5fd7b9bdd8a5", "score": "0.5771197", "text": "public function cron() {\n $this->state = \\Drupal::state();\n $now = \\Drupal::time()->getRequestTime();\n\n $jcc_config = \\Drupal::config('jcc_subscriptions.settings');\n\n if ($jcc_config->get('newslink_digest_debug')) {\n \\Drupal::logger('jcc_subscriptions')->notice('Subscriptions --- Newslink digest debug enabled.');\n // $this->sendDigest();\n $this->queueTasks();\n }\n\n if ($this->shouldRun($now, $jcc_config->get('newslink_digest_time'))) {\n // Checks if there is any news item to send.\n $view = Views::getView('news_digest');\n $view->get_total_rows = TRUE;\n $view->execute('default');\n $rows = $view->total_rows;\n\n if ($rows != 0) {\n $this->queueTasks();\n $this->state->set('jcc_subscriptions.last_cron', $now);\n $log_message = 'Subscriptions --- Newslink digest ran with ' . $rows . ' results, at ' . $now;\n \\Drupal::logger('jcc_subscriptions')->notice($log_message);\n }\n else {\n $this->state->set('jcc_subscriptions.last_cron', $now);\n \\Drupal::logger('jcc_subscriptions')->notice('No new newslink item are queued for email today.');\n }\n }\n\n //Test if cron should run a follow up (in case initial digest failed)\n $end_of_checks_temp = strtotime($jcc_config->get('newslink_digest_time')) + 60*60; // Adding 1hour to check for that failed queueworder\n $end_of_checks = date('H:i', $end_of_checks_temp);\n\n if ($this->shouldRun($now, $end_of_checks)) {\n $subscriptionQueue = \\Drupal::queue('send_subscriptions_queue');\n if ($subscriptionQueue->numberOfItems() != 0) {\n $subscriptionQueue->claimItem(9000); // will try to execute this task for 15mins\n \\Drupal::logger('jcc_subscriptions')->notice('Subscriptions --- Tried to execute existing Digest queue worker');\n }\n }\n }", "title": "" }, { "docid": "be8154028f4c3f3fbb1846d0b83bb83a", "score": "0.5763986", "text": "function backupAction(){\r\n\t\t// disable rendering of the view and layout so that we can just echo the AJAX output\r\n\t\t$this->_helper->layout->disableLayout();\r\n\t\t$this->_helper->viewRenderer->setNoRender(true);\r\n\t\t\r\n\t\t// the config object instance\r\n\t\t$config = Zend_Registry::get('config'); \r\n\t\t\r\n\t\t // get the database connection parameters \r\n\t\t$db_params = Zend_Controller_Front::getInstance()->getParam(\"bootstrap\")->getPluginResource('db')->getParams();\r\n\t\t\r\n\t\t# configure your database variables below:\r\n\t\t$host_array = explode(\":\", $db_params['host']); \r\n\t\t$dbhost = $host_array[0]; # Server address of your MySQL Server\r\n\t\t$dbuser = $db_params['username']; # Username to access MySQL database\r\n\t\t$dbpass = $db_params['password']; # Password to access MySQL database\r\n\t\t$dbname = $db_params['dbname']; # Database Name\r\n\t\t$dbport = isArrayKeyAnEmptyString(1, $host_array) ? \"3306\" : \"3356\"; \r\n\t\t\r\n\t\t# Optional Options You May Optionally Configure\r\n\t\t$use_gzip = $config->backup->usegzip; # Set to No if you don't want the files sent in .gz format\r\n\t\t$remove_sql_file = $config->backup->removesqlfile; # Set this to yes if you want to remove the .sql file after gzipping. Yes is recommended.\r\n\t\t$remove_gzip_file = $config->backup->removegzipfile; # Set this to yes if you want to delete the gzip file also. I recommend leaving it to \"no\"\r\n\t\t\r\n\t\t# Configure the path that this script resides on your server.\r\n\t\t$savepath = APPLICATION_PATH.$config->backup->scriptfolder; # Full path to this directory. Do not use trailing slash!\r\n\t\t$send_email = $config->backup->sendemail; # Do you want this database backup sent to your email? Fill out the next 2 lines\r\n\t\t\r\n\t\t# attachment mime type - default for a text attachment \r\n\t\t$attachment_mime_type = \"text/plain\"; \r\n\t\t\r\n\t\t# set the maximum execution time to ensure that the backup is completed \r\n\t\tini_set(\"max_execution_time\", 600);\r\n\t\t\r\n\t\t$date = date(\"dMy-Hi\");\r\n\t\t# sql backup filename\r\n\t\t$sqlattachmentname = $dbname.\"-\".$date.\".sql\";\r\n\t\t# zipped backup filename\r\n\t\t$gzipattachmentname = $dbname.\"-\".$date.\".tar.gz\";\r\n\t\t# sql backup path\r\n\t\t$sqlscriptpath = $savepath.DIRECTORY_SEPARATOR.$sqlattachmentname;\r\n\t\t# zipped backup path\r\n\t\t$zipfilepath = $savepath.DIRECTORY_SEPARATOR.$gzipattachmentname;\r\n\t\t\r\n\t\t$backupcommand = \"mysqldump -R --add-drop-table --complete-insert --add-locks --quote-names --lock-tables -h \".$dbhost.\" -P \".$dbport.\" -u \".$dbuser.\" -p\".$dbpass.\" \".$dbname.' -q > \"'.$sqlscriptpath.'\"';\r\n\t\tpassthru($backupcommand);\r\n\t\tdebugMessage(\"backup completed to \".$sqlattachmentname);\t\r\n\t\t\r\n\t\t# create tar archive\r\n\t\tif($use_gzip==\"yes\"){\t\t\r\n\t\t\t$zipline = \"tar czf \".$zipfilepath.\" \".$sqlscriptpath;\r\n\t\t\tshell_exec($zipline);\r\n\t\t\tdebugMessage(\"Gzip of backup completed\");\r\n\t\t}\r\n\t\t# set email attachment name and path depending on weather to form zip or not\r\n\t\tif($use_gzip==\"yes\"){\r\n\t\t\t$attachmentpath = $zipfilepath;\r\n\t\t\t$attachmentname = $gzipattachmentname;\r\n\t\t\t$attachment_mime_type = \"application/gzip\"; \r\n\t\t} else {\r\n\t\t\t$attachmentpath = $sqlscriptpath;\r\n\t\t\t$attachmentname = $sqlattachmentname;\r\n\t\t}\r\n\t\t\r\n\t\t# send an email with a copy of the backup\t\r\n\t\tif($send_email == \"yes\" ){\r\n\t\t\t\r\n\t\t\t$mail = Zend_Registry::get('mail');\r\n\t\t\t# build the mailer class \r\n\t\t\t$mail->addTo($config->get(APPLICATION_ENV)->get(\"databasebackupemail\"));\r\n\t\t\t\r\n\t\t\t$mail->setSubject(sprintf($this->_translate->_(\"database_backup_subject\"), date(\"j F Y h:i:s A\"))); # Subject in the email to be sent.\r\n\t\t\t$mail->setBodyHtml($this->_translate->_(\"database_backup_body\")); # Brief Message.\r\n\t\t\t\r\n\t\t\t# attachmentpath is the full path to the file and attachmentname is the name of the file\r\n\t\t\t$at = new Zend_Mime_Part(file_get_contents($attachmentpath));\r\n\t\t\t$at->filename = $attachmentname; \r\n\t\t\t$at->disposition = Zend_Mime::DISPOSITION_INLINE;\r\n\t\t\t$at->encoding = Zend_Mime::ENCODING_BASE64;\r\n\t\t\t$at->type = $attachment_mime_type; \r\n\t\t\t$mail->addAttachment($at);\r\n\t\t\t$mail->send(); \r\n\t\t\tdebugMessage(\"backup sent via email\");\r\n\t\t}\r\n\t\t\r\n\t\t# remove sql file if condition is set\r\n\t\tif($remove_sql_file==\"yes\"){\r\n\t\t\texec(\"rm -rf \".$sqlscriptpath);\r\n\t\t}\r\n\t\t# remove tar file if condition is set\r\n\t\tif($remove_gzip_file==\"yes\"){\r\n\t\t\texec(\"rm -rf \".$attachmentpath);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "cc2f8a2e00c926b546380f98e5ea8faf", "score": "0.5758227", "text": "function run()\n\t{\n\t\trequire_lang('backups');\n\n\t\t$GLOBALS['HELPER_PANEL_PIC']='pagepics/backups';\n\t\t$GLOBALS['HELPER_PANEL_TUTORIAL']='tut_backup';\n\t\t$GLOBALS['HELPER_PANEL_TEXT']=comcode_lang_string('DOC_BACKUPS_2');\n\n\t\tif (get_file_base()!=get_custom_file_base()) warn_exit(do_lang_tempcode('SHARED_INSTALL_PROHIBIT'));\n\n\t\tdecache('main_staff_checklist');\n\n\t\trequire_code('backup');\n\n\t\t$type=get_param('type','misc');\n\n\t\tif ($type=='make_backup') return $this->make_backup();\n\t\tif ($type=='confirm_delete') return $this->confirm_delete();\n\t\tif ($type=='delete') return $this->delete();\n\t\tif ($type=='misc') return $this->backup_interface();\n\n\t\treturn new ocp_tempcode();\n\t}", "title": "" }, { "docid": "253b8a26eb9ce569b0590fe69460612e", "score": "0.5748747", "text": "public function queueTasks() {\n $log_message_sendgrid = 'Subscriptions --- QUEUETASKS() START';\n \\Drupal::logger('jcc_subscriptions')->notice($log_message_sendgrid);\n $this->sendDigest();\n $this->flagNewsItems();\n $log_message_sendgrid = 'Subscriptions --- QUEUETASKS() END';\n \\Drupal::logger('jcc_subscriptions')->notice($log_message_sendgrid);\n }", "title": "" }, { "docid": "94060b6c4ba2419b56dc8a4f3b5df384", "score": "0.5647482", "text": "function make_backup()\n\t{\n\t\t$title=get_page_title('BACKUP');\n\n\t\tbreadcrumb_set_parents(array(array('_SELF:_SELF:misc',do_lang_tempcode('BACKUP'))));\n\t\tbreadcrumb_set_self(do_lang_tempcode('START'));\n\n\t\t$b_type=post_param('b_type','full');\n\t\tif ($b_type=='full')\n\t\t{\n\t\t\t$file='Backup_full_'.date('Y-m-d',utctime_to_usertime()).'__'.get_rand_password(); // The last bit is unfortunate, but we need to stop URL guessing\n\t\t\t/*if (\n\t\t\t\t (file_exists(get_custom_file_base().'/exports/backups/'.$file)) ||\n\t\t\t\t (file_exists(get_custom_file_base().'/exports/backups/'.$file.'.txt')) ||\n\t\t\t\t (file_exists(get_custom_file_base().'/exports/backups/'.$file.'.tar')) ||\n\t\t\t\t (file_exists(get_custom_file_base().'/exports/backups/'.$file.'.gz'))\n\t\t\t\t)\n\t\t\t\t$file='Backup_full_'.get_rand_password();*/\n\t\t}\n\t\telseif ($b_type=='incremental')\n\t\t{\n\t\t\t$file='Backup_incremental'.date('Y-m-d',utctime_to_usertime()).'__'.get_rand_password(); // The last bit is unfortunate, but we need to stop URL guessing\n\t\t\t/*if (\n\t\t\t\t (file_exists(get_custom_file_base().'/exports/backups/'.$file)) ||\n\t\t\t\t (file_exists(get_custom_file_base().'/exports/backups/'.$file.'.txt')) ||\n\t\t\t\t (file_exists(get_custom_file_base().'/exports/backups/'.$file.'.tar')) ||\n\t\t\t\t (file_exists(get_custom_file_base().'/exports/backups/'.$file.'.gz'))\n\t\t\t\t)\n\t\t\t\t$file='Backup_incremental_'.get_rand_password();*/\n\t\t}\n\t\telseif ($b_type=='sql')\n\t\t{\n\t\t\t$file='Backup_database'.date('Y-m-d',utctime_to_usertime()).'__'.get_rand_password(); // The last bit is unfortunate, but we need to stop URL guessing\n\t\t\t/*if (\n\t\t\t\t (file_exists(get_custom_file_base().'/exports/backups/'.$file)) ||\n\t\t\t\t (file_exists(get_custom_file_base().'/exports/backups/'.$file.'.txt')) ||\n\t\t\t\t (file_exists(get_custom_file_base().'/exports/backups/'.$file.'.tar')) ||\n\t\t\t\t (file_exists(get_custom_file_base().'/exports/backups/'.$file.'.gz'))\n\t\t\t\t)\n\t\t\t\t$file='Backup_database_'.get_rand_password();*/\n\t\t}\n\t\telse exit();\n\n\t\t$max_size=post_param_integer('max_size',0);\n\t\tif (($max_size==0) || (!is_numeric($max_size))) $max_size=1000000000;\n\n\t\tif (addon_installed('calendar'))\n\t\t{\n\t\t\t$schedule=get_input_date('schedule');\n\t\t\tif (!is_null($schedule))\n\t\t\t{\n\t\t\t\tset_value('backup_schedule_time',strval($schedule));\n\t\t\t\tset_value('backup_recurrance_days',strval(post_param_integer('recurrance_days',0)));\n\t\t\t\tset_value('backup_max_size',strval($max_size));\n\t\t\t\tset_value('backup_b_type',$b_type);\n\t\t\t\treturn inform_screen($title,do_lang_tempcode('SUCCESSFULLY_SCHEDULED_BACKUP'));\n\t\t\t}\n\t\t}\n\n\t\t$instant=get_param_integer('keep_backup_instant',0); // Toggle this to true when debugging\n\t\t$max_time=intval(round(floatval(ini_get('max_execution_time'))/1.5));\n\t\tif ($max_time<60*4)\n\t\t{\n\t\t\tif (function_exists('set_time_limit')) @set_time_limit(0) OR warn_exit(do_lang_tempcode('SAFE_MODE'));\n\t\t}\n\t\tif ($instant==1)\n\t\t{\n\t\t\tmake_backup_2($file,$b_type,$max_size);\n\t\t} else\n\t\t{\n\t\t\tglobal $MB2_FILE,$MB2_B_TYPE,$MB2_MAX_SIZE;\n\t\t\t$MB2_FILE=$file;\n\t\t\t$MB2_B_TYPE=$b_type;\n\t\t\t$MB2_MAX_SIZE=$max_size;\n\t\t\t@ignore_user_abort(true);\n\t\t\tregister_shutdown_function('make_backup_2');\n\t\t}\n\n\t\t$url=build_url(array('page'=>'_SELF'),'_SELF');\n\t\tredirect_screen($title,$url,do_lang_tempcode('BACKUP_INFO_1',$file));\n\t\treturn new ocp_tempcode();\n\t}", "title": "" }, { "docid": "a59c4f71a7a9f4771a99d10ec97f5c0b", "score": "0.56284493", "text": "public function cron_handler() {\n\t\t\n\t}", "title": "" }, { "docid": "e05bdea10cbe31df956823b88458f6fa", "score": "0.5624467", "text": "public static function background_updater() {\n $cron_jobs = _sumo_pp()->query->get( array (\n 'type' => 'sumo_pp_cron_jobs' ,\n 'status' => 'publish' ,\n ) ) ;\n\n if ( empty( $cron_jobs ) ) {\n return ;\n }\n\n //Loop through each Scheduled Job Query post and check whether time gets elapsed\n foreach ( $cron_jobs as $job_id ) {\n $jobs = get_post_meta( $job_id , '_scheduled_jobs' , true ) ;\n\n if ( ! is_array( $jobs ) ) {\n continue ;\n }\n\n foreach ( $jobs as $payment_id => $payment_jobs ) {\n foreach ( $payment_jobs as $job_name => $job_args ) {\n if ( ! is_array( $job_args ) ) {\n continue ;\n }\n\n foreach ( $job_args as $job_timestamp => $args ) {\n if ( ! is_int( $job_timestamp ) || ! $job_timestamp ) {\n continue ;\n }\n //When the time gets elapsed then do the corresponding job.\n if ( _sumo_pp_get_timestamp() >= $job_timestamp ) {\n do_action( \"sumopaymentplans_fire_{$job_name}\" , array_merge( array (\n 'payment_id' => $payment_id\n ) , $args ) ) ;\n\n //Refresh job.\n $jobs = get_post_meta( $job_id , '_scheduled_jobs' , true ) ;\n\n //Clear the Job when the corresponding job is done.\n if ( did_action( \"sumopaymentplans_fire_{$job_name}\" ) ) {\n unset( $jobs[ $payment_id ][ $job_name ][ $job_timestamp ] ) ;\n }\n }\n }\n //Flush the meta once the timestamp is not available for the specific job\n if ( empty( $jobs[ $payment_id ][ $job_name ] ) ) {\n unset( $jobs[ $payment_id ][ $job_name ] ) ;\n }\n }\n }\n //Get updated scheduled jobs.\n if ( is_array( $jobs ) ) {\n update_post_meta( $job_id , '_scheduled_jobs' , $jobs ) ;\n }\n }\n }", "title": "" }, { "docid": "d14730780beb8c9a9700277c1f5a6a9b", "score": "0.5622852", "text": "public function activateCronJob();", "title": "" }, { "docid": "a8a4df884163a8b6cc9c00112cc9e5cd", "score": "0.5615144", "text": "public function cronAction()\n {\n if(Wpjb_Project::getInstance()->conf(\"cron_lock\", \"1970-01-01\") == date(\"Y-m-d\")) {\n exit;\n }\n\n $query = new Daq_Db_Query();\n $select = $query->select();\n $select->from(\"Wpjb_Model_Job t\");\n $select->where(\"DATE(job_expires_at) = DATE_ADD(CURDATE(), INTERVAL 5 DAY)\");\n\n $result = $select->execute();\n\n foreach($result as $job) {\n Wpjb_Utility_Messanger::send(5, $job);\n }\n\n $instance = Wpjb_Project::getInstance();\n $instance->setConfigParam(\"cron_lock\", date(\"Y-m-d\"));\n $instance->saveConfig();\n\n exit;\n }", "title": "" }, { "docid": "3c62cd2c0af2cd094f32afd7bd6f3eef", "score": "0.5613202", "text": "protected function schedule(Schedule $schedule)\n {\n if (!app()->env === 'production') {\n $schedule->command('backup:run --only-to-disk=local')->daily()->at('03:15');\n } else {\n $schedule->command('backup:run')->daily()->at('03:15');\n }\n $schedule->command('backup:clean')->daily()->at('03:30');\n }", "title": "" }, { "docid": "b6d4da1f70d2133bd74319908c38adda", "score": "0.5612311", "text": "public function cron_exec() {\n\n\t\t$jetpack = Jetpack::init();\n\n\t\t/*\n\t\t * This should run daily. Figuring in for variances in\n\t\t * WP_CRON, don't let it run more than every 23 hours at most.\n\t\t *\n\t\t * i.e. if it ran less than 23 hours ago, fail out.\n\t\t */\n\t\t$last = (int) Jetpack_Options::get_option( 'last_heartbeat' );\n\t\tif ( $last && ( $last + DAY_IN_SECONDS - HOUR_IN_SECONDS > time() ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * Check for an identity crisis\n\t\t *\n\t\t * If one exists:\n\t\t * - Bump stat for ID crisis\n\t\t * - Email site admin about potential ID crisis\n\t\t */\n\n\t\t// Coming Soon!\n\n\t\tforeach ( self::generate_stats_array( 'v2-' ) as $key => $value ) {\n\t\t\t$jetpack->stat( $key, $value );\n\t\t}\n\n\t\tJetpack_Options::update_option( 'last_heartbeat', time() );\n\n\t\t$jetpack->do_stats( 'server_side' );\n\n\t\t/**\n\t\t * Fires when we synchronize all registered options on heartbeat.\n\t\t *\n\t\t * @since 3.3.0\n\t\t */\n\t\tdo_action( 'jetpack_heartbeat' );\n\t}", "title": "" }, { "docid": "56ba371a342c158b5646f3ea34b7ef88", "score": "0.56051046", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('krc:log')->hourly();\n $schedule->command('krc:log')->everyFiveMinutes();\n \n $schedule->command('krc:presence')->everyTenMinutes();\n\n $schedule->command('krc:mail:daily')->dailyAt('7:00');\n $schedule->command('krc:mail:weekly')->weekly()->sundays()->at('7:00');\n $schedule->command('krc:mail:monthly')->monthly()->at('7:00');\n\n $schedule->command('db:backup --database=mysql --compression=null --destination=dropbox --destinationPath=`date +\\%Y-%m-%d`-production.sql')->dailyAt('16:15');\n }", "title": "" }, { "docid": "2569483966f29c3d8cc24fcfa699bd62", "score": "0.5599277", "text": "function gsd_create_add_video_schedule() {\n $timestamp = wp_next_scheduled('gsd_your_cron_hook_name_here');\n\n //If $timestamp == false schedule daily backups since it hasn't been done previously\n if ($timestamp == false) {\n //Schedule the event for right now, then to repeat daily using the hook 'wi_create_daily_backup'\n wp_schedule_event(time(), 'daily', 'gsd_your_cron_hook_name_here');\n }\n}", "title": "" }, { "docid": "486c59122a88610252a1b4924398a38b", "score": "0.55868614", "text": "public function cron_job()\n {\n if ($item = htmltopdf_queue::where(['status >=' => 0, 'status <>' => 100])->first()) {\n var_dump($item = $item->getAttributes());\n exit(\"Another cron already runing! [{$item['id']}/{$item['status']}% -- {$item['updated_at']}\".PHP_EOL);\n }\n\n // Find new jobs\n $jobs = htmltopdf_queue::where(['status'=>-1])->get();\n foreach ($jobs as $k => $job) {\n $job = $job->getAttributes();\n echo \"Starting: \".$job['id'].PHP_EOL;\n htmltopdf_queue::where('id',$job['id'])->update(['status'=>0]);\n self::exec_job($job);\n echo \"Done: \".$job['id'].PHP_EOL;\n echo \"----------------------------\".PHP_EOL;\n }\n echo \"List done!\";\n }", "title": "" }, { "docid": "46dc68504984fcf12cf75b36464ff71e", "score": "0.5582706", "text": "public function backup () {\n\t\t$this->_verify_access('monitor.system.backup:create.backup');\n\n\t\t$general_files = array(\n\t\t\tSystem_Model::get_nagios_etc_path().'nagios.cfg',\n\t\t\tSystem_Model::get_nagios_etc_path().'cgi.cfg',\n\t\t\tSystem_Model::get_nagios_base_path().'/var/*.log',\n\t\t\tSystem_Model::get_nagios_base_path().'/var/status.sav',\n\t\t\tSystem_Model::get_nagios_base_path().'/var/archives', # Isn't this a config backup?\n\t\t\tSystem_Model::get_nagios_base_path().'/var/errors', # Then why would we want these?\n\t\t\tSystem_Model::get_nagios_base_path().'/var/traffic',\n\t\t\t'/etc/op5/*.yml'\n\t\t);\n\n\t\t$backup = array();\n\t\tforeach ($general_files as $path) {\n\t\t\tforeach (glob($path) as $file) {\n\t\t\t\t$backup[] = $file;\n\t\t\t}\n\t\t}\n\n\t\t$system = System_Model::parse_config_file($this->nagios_cfg_path. 'nagios.cfg');\n\t\t$searches = array('cfg_file', 'resource_file', 'cfg_dir');\n\t\t$result = array();\n\n\t\tforeach ($searches as $item) {\n\t\t\tif (!isset($system[$item])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tforeach ((array) $system[$item] as $file) {\n\t\t\t\t$file = ($file[0] !== '/') ? $this->nagios_cfg_path . $file : $file;\n\t\t\t\t$backup[] = $file;\n\t\t\t}\n\t\t}\n\n\t\t$this->auto_render = true;\n\n\t\t$file = strftime('backup-%Y-%m-%d_%H.%M.%S') . self::BACKUP_EXTENSION;\n\n\t\t$command_line = array_merge(array('/usr/bin/asmonitor', '-q', '/opt/monitor/op5/backup/backup', $this->backup_directory .'/'. $file), $backup);\n\t\tproc::open($command_line, $stdout, $stderr, $status);\n\n\t\tif ($status) {\n\t\t\t$this->template = json::fail_view(array(\n\t\t\t\t\"message\" => \"Could not backup the current configuration\",\n\t\t\t\t\"debug\" => $stderr\n\t\t\t));\n\t\t\treturn;\n\t\t}\n\t\t$this->template = json::ok_view($file);\n\t}", "title": "" }, { "docid": "6a6bc9af28da39d8b0ee62bbf3ec108b", "score": "0.5534287", "text": "private function crons()\n {\n add_filter('cron_schedules', '\\Moloni\\Crons::addCronInterval');\n add_action('moloniProductsSync', '\\Moloni\\Crons::productsSync');\n\n if (!wp_next_scheduled('moloniProductsSync')) {\n wp_schedule_event(time(), 'everyficeminutes', 'moloniProductsSync');\n }\n }", "title": "" }, { "docid": "42ec07d3571413d3511b427e841f0498", "score": "0.5532002", "text": "public function BD_Backup(){\n }", "title": "" }, { "docid": "b9276bff63533809e192d4425a305345", "score": "0.5497207", "text": "public function backup(): BackupSync;", "title": "" }, { "docid": "269151780c1e67af18a7f96210519ee4", "score": "0.5477892", "text": "static function pmpro_cron_mpesa_subscription_updates()\r\n {\r\n }", "title": "" }, { "docid": "1c455855f91d5b5a22d99e854e42cd57", "score": "0.5473178", "text": "public function sheduleCronExteranally($restApi);", "title": "" }, { "docid": "13eb4bd9e5289e4905d368c36d3b0112", "score": "0.54423094", "text": "function pfblockerng_sync_cron() {\n\tglobal $config, $pfb, $pfbarr;\n\n\t$hour = date('G');\n\t$dow = date('N');\n\t$pfb['update_cron'] = FALSE;\n\t$log = \" CRON PROCESS START [ \" . pfb_pkg_ver() . \" ] [ NOW ]\\n\";\n\tpfb_logger(\"{$log}\", 1);\n\n\t$list_type = array('pfblockernglistsv4' => '_v4', 'pfblockernglistsv6' => '_v6', 'pfblockerngdnsbl' => '_v4');\n\tforeach ($list_type as $ltype => $vtype) {\n\t\tif (!empty($config['installedpackages'][$ltype]['config'])) {\n\t\t\tforeach ($config['installedpackages'][$ltype]['config'] as $list) {\n\t\t\t\tif (isset($list['row']) && $list['action'] != 'Disabled' && $list['cron'] != 'Never') {\n\t\t\t\t\tforeach ($list['row'] as $row) {\n\t\t\t\t\t\tif (!empty($row['url']) && $row['state'] != 'Disabled') {\n\n\t\t\t\t\t\t\tif ($ltype == 'pfblockerngdnsbl') {\n\t\t\t\t\t\t\t\t$header = \"{$row['header']}\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$header = \"{$row['header']}{$vtype}\";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (empty(pfb_filter($header, PFB_FILTER_WORD, 'php'))) {\n\t\t\t\t\t\t\t\tpfb_logger(\"\\n Invalid Header:{$row['header']} *skipping*\", 1);\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Determine folder location for alias (return array $pfbarr)\n\t\t\t\t\t\t\tpfb_determine_list_detail($list['action'], '', '', '');\n\t\t\t\t\t\t\t$pfbfolder\t= $pfbarr['folder'];\n\t\t\t\t\t\t\t$pfborig\t= $pfbarr['orig'];\n\n\t\t\t\t\t\t\t// Bypass update if state is defined as 'Hold' and list file exists\n\t\t\t\t\t\t\tif ($row['state'] == 'Hold' && file_exists(\"{$pfbfolder}/{$header}.txt\")) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Attempt download, when a previous 'fail' file marker is found.\n\t\t\t\t\t\t\tif (file_exists(\"{$pfbfolder}/{$header}.fail\")) {\n\t\t\t\t\t\t\t\tpfb_update_check($header, $row['url'], $pfbfolder, $pfborig, $pflex, $row['format'], $vtype);\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Allow cURL SSL downgrade if user configured.\n\t\t\t\t\t\t\t$pflex = FALSE;\n\t\t\t\t\t\t\tif ($row['state'] == 'Flex') {\n\t\t\t\t\t\t\t\t$pflex = TRUE;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tswitch ($list['cron']) {\n\t\t\t\t\t\t\t\tcase 'EveryDay':\n\t\t\t\t\t\t\t\t\tif ($hour == $pfb['24hour']) {\n\t\t\t\t\t\t\t\t\t\tpfb_update_check($header, $row['url'], $pfbfolder, $pfborig, $pflex, $row['format'], $vtype);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'Weekly':\n\t\t\t\t\t\t\t\t\tif ($hour == $pfb['24hour'] && $dow == $list['dow']) {\n\t\t\t\t\t\t\t\t\t\tpfb_update_check($header, $row['url'], $pfbfolder, $pfborig, $pflex, $row['format'], $vtype);\n\t\t\t\t\t\t\t\t\t}\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\t$pfb_sch = pfb_cron_base_hour($list['cron']);\n\t\t\t\t\t\t\t\t\tif (in_array($hour, $pfb_sch)) {\n\t\t\t\t\t\t\t\t\t\tpfb_update_check($header, $row['url'], $pfbfolder, $pfborig, $pflex, $row['format'], $vtype);\n\t\t\t\t\t\t\t\t\t}\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\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// If no lists require updates, check if Continents are configured and update accordingly.\n\tif (!$pfb['update_cron']) {\n\t\tforeach ($pfb['continents'] as $continent => $pfb_alias) {\n\t\t\tif (isset($config['installedpackages']['pfblockerng' . strtolower(str_replace(' ', '', $continent))]['config'])) {\n\t\t\t\t$continent_config = $config['installedpackages']['pfblockerng' . strtolower(str_replace(' ', '', $continent))]['config'][0];\n\t\t\t\tif ($continent_config['action'] != 'Disabled') {\n\t\t\t\t\t$pfb['update_cron'] = TRUE;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif ($pfb['update_cron']) {\n\t\tsync_package_pfblockerng('cron');\n\t\t$pfb['update_cron'] = FALSE;\n\t} else {\n\t\tsync_package_pfblockerng('noupdates');\n\t\t$log = \"\\n No Updates required.\\n CRON PROCESS ENDED\\n UPDATE PROCESS ENDED\\n\";\n\t\tpfb_logger(\"{$log}\", 1);\n\t}\n\n\t// Call log mgmt function\n\t// If Update GUI 'Manual view' is selected. Last output will be missed. So sleep for 5 secs.\n\tsleep(5);\n\tpfb_log_mgmt();\n}", "title": "" }, { "docid": "6a7cee38605cb099e7193f52e3e131b4", "score": "0.54395723", "text": "public function perform_backup(string $type = 'full')\n{ \n\n // Check if backups enabled\n if (registry::config('core:backups_enabled') != 1) { \n return false;\n }\n\n // Perform local backup\n $archive_file = $this->backup_local($type);\n\n // Upload to remote server, if needed\n if (registry::config('backups_remote_service') == 'aws') { \n $this->upload_aws($archive_file);\n } elseif (registry::config('backups_remote_service') == 'dropbox') { \n $this->upload_dropbox($archive_file);\n } elseif (registry::config('backups_remote_service') == 'google_drive') { \n $this->upload_google_drive($archive_file);\n }\n\n // Delete local file, if needed\n if (registry::config('core:backups_save_locally') != 1) { \n @unlink(SITE_PATH . '/data/backups/' . $archive_file);\n }\n\n // Return\n return $archive_file;\n\n}", "title": "" }, { "docid": "2b8da6aca6a2eaea4a93cebaaa4f4d31", "score": "0.54377586", "text": "public function testStartBackup()\n {\n\n }", "title": "" }, { "docid": "6a8db661b309e6535210a17b60a91f93", "score": "0.5428558", "text": "public function createBackup()\n {\n if (! Auth::user()->can(config('backup-api.permissions.create_backup'))) {\n return response()->json([\n 'status' => 'failed',\n 'status_code' => Response::HTTP_FORBIDDEN,\n 'message' => 'You don\\'t have a permission to create system/database backup.',\n ], Response::HTTP_FORBIDDEN);\n }\n\n /*\n * Process the request to create a backup\n */\n dispatch(new CreateBackupJob())\n ->onQueue(config('backup-api.queue'))\n ->afterResponse();\n\n return response()->json([\n 'status' => 'success',\n 'status_code' => Response::HTTP_OK,\n 'record_count' => null,\n 'message' => 'Creating a new backup in background. Check the list Backup to get the recent backup',\n 'data' => null,\n ], Response::HTTP_OK);\n\n }", "title": "" }, { "docid": "03405f03d37cee4ebb8bf905753b006c", "score": "0.54235417", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command('horizon:snapshot')->everyFiveMinutes();\n }", "title": "" }, { "docid": "029decae0939093349f1ac047a973c15", "score": "0.5409776", "text": "protected function schedule(Schedule $schedule)//new schadual\n {\n// $schedule->exec('touch foo.txt')->everyFiveMinutes();\n// $schedule->command('inspire')\n// ->hourly() //envoyer Url mide\n// ->sendOutputTo('txt')->emailOutputTo(\"[email protected]\")->thenPing(\"URL\");//after save you send\n// ->emailWrittenOutputTo(\"[email protected]\");//jast send email \n// ->daily();\n// ->at(\"23:40\");\n// ->dailyAt('10:20');\n }", "title": "" }, { "docid": "11238e17d65a4d0aafb82166a1a85911", "score": "0.53926325", "text": "public function execCron() { }", "title": "" }, { "docid": "4aada7acb41a7ddebb6d2c69a3a2d4aa", "score": "0.5375677", "text": "public function scheduleNextJobs(){\n\t\tif ($this->_preventScheduling) return;\n\n\t\t$scheduler = Mage::getModel('customweb_subscription/scheduler');\n\t\ttry {\n\t\t\t$dueDate = $this->getSubscription()->getPlan()->getNextDueDate();\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\t$dueDate = null;\n\t\t}\n\t\tif ($dueDate !== null) {\n\t\t\t$scheduler->createJob($this->getSubscription(), $dueDate, 'pay');\n\t\t\t$scheduler->createJob($this->getSubscription(), $this->getCheckDate($dueDate), 'check', Mage::helper('customweb_subscription')->toDateString($dueDate));\n\n\t\t\tforeach ($this->getSubscription()->getReminders() as $reminder) {\n\t\t\t\t$scheduler->createJob($this->getSubscription(), $reminder->getRemindDate($dueDate), 'remind', $reminder->getEmailTemplate());\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "d24b99a43f3300ffd32f34128bc7de6d", "score": "0.5373841", "text": "public function cron_activation(): void {\n if ( ! wp_next_scheduled( self::WP_PLUGIN_SKELETON_CRON_SCHEDULE_ID ) ) {\n wp_schedule_event( strtotime('00:40:00'), 'every_12_hours', self::WP_PLUGIN_SKELETON_CRON_SCHEDULE_ID );\n }\n\t}", "title": "" }, { "docid": "b4bd5be0305fba74bd7ee3fb71c2d4f2", "score": "0.53626233", "text": "function cron_queue_process() {\n\t\t$queue_limit = $this->_config->get_integer( 'cdn.queue.limit' );\n\t\treturn $this->get_admin()->queue_process( $queue_limit );\n\t}", "title": "" }, { "docid": "7ab014929ffce71f5d34b65136bfc9ae", "score": "0.5359872", "text": "protected function manageHourly(): void\n {\n $allFiles = $this->getAllFileNamesInFolder('hourly');\n\n if (count($allFiles) === 0) {\n $dumper = new Dumper($this->config, $this->S3Client, $this->outputter);\n $dumper->dump();\n } else {\n // Find the most recent hourly backup\n $newestFileName = $this->getNewestFileName($allFiles);\n\n // Check how old it is (in seconds)\n $diff = $this->getTimeDiffFromFileName($newestFileName);\n\n // If it's been more than an hour, then create a new dump.\n // We use 59 minutes to account for lag time during processing\n if ($diff >= 60 * 59) {\n $dumper = new Dumper($this->config, $this->S3Client, $this->outputter);\n $dumper->dump();\n }\n }\n }", "title": "" }, { "docid": "8f7fed1333e554168ce06c98e1e0b2a7", "score": "0.53535026", "text": "function br_allfunc_cron(){\n\t\t//require(JPATH_SITE.DS.'administrator'.DS.'components'.DS.'com_broadcast'.DS.'config'.DS.'config.php');\n\t\t$params=JComponentHelper::getParams('com_broadcast');\n\t\t$pkey = JRequest::getVar('pkey', '');\n\t\tif($pkey!=$params->get('private_key_cronjob'))\n\t\t{\n\t\t\techo JText::_(\"CRON_KEY_MSG\");\n\t\t\treturn;\n\t\t}\n\n\t\t$func = JRequest::getVar('func');\n\t\tif($func)\n\t\t\t$this->$func();\n\t\telse{\n\t\t\t$funcs = array ('get_status','set_status');\t /*add the function names you need to add here*/\n\t\t\tforeach ($funcs as $func){\n\t\t\techo '<br>***************************************<br>';\n\t\t\t\t$this->$func();\n\t\t\techo '<br>***************************************<br>';\n\t\t\t}\n\t\t}\n\n\t\trequire_once(JPATH_SITE.DS.\"components\".DS.\"com_broadcast\".DS.\"controllers\".DS.\"rss.php\");\n\t\t$rssobj=new BroadcastControllerrss;\n\t\t$rssobj->getrssdata();\n\t}", "title": "" }, { "docid": "b30da13f7ca6da82c9f14dbc49af0f24", "score": "0.5348437", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->call(function () {\n $db = DB::table('notifications')->get();\n foreach ($db as $user){\n $noti = DB::table('notifications')->where('target',$user->target)->orderBy('created_at','desc')->get();\n if($noti->count() > 5){\n foreach ($noti as $uu ) {\n if((time()-strtotime($uu->created_at))>593056){\n DB::table('notifications')->where('id',$uu->id)->delete();\n }\n }\n\n }\n }\n\n $db2 = DB::table('users')->get();\n foreach ($db2 as $user) {\n $loc = 'py/rescale.py';\n $filenameUp = $user->imgpath;\n\n shell_exec(\"python $loc $filenameUp\");\n }\n })->everyMinute();\n }", "title": "" }, { "docid": "7fa20206d7c6759b88bc0f86f1577ffe", "score": "0.5346866", "text": "protected function schedule(Schedule $schedule) //:TODO refactoring !!!!!!\n {\n //data from store\n $schedule->command('sync:import-store-brands')\n ->cron('00 6,7,8,9,10,11,12,13,14,15,16,17,18 * * *')\n ->between('6:00', '22:00');\n $schedule->command('sync:import-store-products')\n ->cron('02 6,7,8,9,10,11,12,13,14,15,16,17,18 * * *')\n ->between('6:00', '22:00');\n\n // import suppliers\n $schedule->command('sync:import supplier1')\n ->cron('05 6,7,8,9,10,11,12,13,14,15,16,17,18 * * *')\n ->between('6:00', '22:00');\n $schedule->command('sync:import supplier2')\n ->cron('10 6,7,8,9,10,11,12,13,14,15,16,17,18 * * *')\n ->between('6:00', '22:00');\n $schedule->command('sync:import supplier3')\n ->cron('15 6,7,8,9,10,11,12,13,14,15,16,17,18 * * *')\n ->between('6:00', '22:00');\n $schedule->command('sync:import supplier4')\n ->cron('20 6,7,8,9,10,11,12,13,14,15,16,17,18 * * *')\n ->between('6:00', '22:00');\n\n // delete (mark product)\n $schedule->command('sync:enable-deleted-product')\n ->cron('22 6,7,8,9,10,11,12,13,14,15,16,17,18 * * *')\n ->between('6:00', '22:00');\n\n $schedule->command('sync:delete-product')\n ->cron('25 6,7,8,9,10,11,12,13,14,15,16,17,18 * * *')\n ->between('6:00', '22:00');\n\n // update products in store\n $schedule->command('sync:update-product supplier1')\n ->cron('25 6,7,8,9,10,11,12,13,14,15,16,17,18 * * *')\n ->between('6:00', '22:00');\n $schedule->command('sync:update-product supplier2')\n ->cron('26 6,7,8,9,10,11,12,13,14,15,16,17,18 * * *')\n ->between('6:00', '22:00');\n $schedule->command('sync:update-product supplier3')\n ->cron('27 6,7,8,9,10,11,12,13,14,15,16,17,18 * * *')\n ->between('6:00', '22:00');\n $schedule->command('sync:update-product supplier4')\n ->cron('28 6,7,8,9,10,11,12,13,14,15,16,17,18 * * *')\n ->between('6:00', '22:00');\n\n //data from store\n $schedule->command('sync:import-store-brands')\n ->cron('35 6,7,8,9,10,11,12,13,14,15,16,17,18 * * *')\n ->between('6:00', '22:00');\n $schedule->command('sync:import-store-products')\n ->cron('40 6,7,8,9,10,11,12,13,14,15,16,17,18 * * *')\n ->between('6:00', '22:00');\n }", "title": "" }, { "docid": "d81eb364a1ac23cb10b85d0be3b48322", "score": "0.5345432", "text": "function sddl_add_cron($schedules)\n{\n\tglobal $sddl_options;\n\t$interval = $sddl_options['auto_update_round_value'] * $sddl_options['auto_update_round_unit'];\n\tif($interval <= 0)\n\t\treturn $schedules;\n\t$schedules['updatesddl'] = array(\n\t\t'interval'\t=>\t$interval,\n\t\t'display'\t=>\t__('Customed cycle for automatically updating skydrive links', 'skydrive-directlink')\n\t);\n\treturn $schedules;\n}", "title": "" }, { "docid": "efe2bac92990037037dcf35381c23739", "score": "0.53427804", "text": "public function backup()\n {\n $manager = new Backup\\Manager($this->app);\n $backup = new Backup\\Backup($this->app['files'], $this->app['db'], $manager);\n $backup->save();\n }", "title": "" }, { "docid": "02234fee49ae152e0c762dadf1b98aff", "score": "0.53418946", "text": "protected function schedule(Schedule $schedule)\n {\n \n $schedule->call(function () {\n $path = config('app.path_warc_staging');\n $crawls = Crawl::where('id', 1)->get();\n\n foreach ($crawls as $crawl) {\n if($crawl->schedule) {\n $schedule = $crawl->schedule;\n if($schedule->status_id == 1) {\n $file_name = $crawl->metadata->code.'-'.$schedule->id;\n $url = $crawl->metadata->url;\n\n $cmd = \"wget -c -mpckr -l 5 -H --user-agent= -e robots=off -o\".$path.\"/\".$file_name.\".log --warc-file=\".$path.\"/\".$file_name.\" --warc-cdx \".$url.\" --directory-prefix='\".$path.\"/\".$file_name.\"'\";\n shell_exec($cmd);\n\n $schedule = Schedules::find($schedule->id);\n $schedule->status_id = 4;\n $schedule->save();\n\n $crawl = Crawl::find($crawl->id);\n $crawl->status_id = 4;\n $crawl->save();\n }\n }else{\n $schedule = new Schedules;\n $schedule->status_id = 2;\n $schedule->crawl_id = $crawl->id;\n $schedule->save();\n $file_name = $crawl->metadata->code.'-'.$schedule->id;\n $url = $crawl->metadata->url;\n\n $cmd = \"wget -mpckr -l 5 -H --user-agent= -e robots=off -o\".$path.\"/\".$file_name.\".log --warc-file=\".$path.\"/\".$file_name.\" --warc-cdx \".$url.\" --directory-prefix='\".$path.\"/\".$file_name.\"'\";\n shell_exec($cmd);\n\n $schedule = Schedules::find($schedule->id);\n $schedule->status_id = 4;\n $schedule->save();\n\n $crawl = Crawl::find($crawl->id);\n $crawl->status_id = 4;\n $crawl->save();\n }\n }\n })->everyMinute();\n }", "title": "" }, { "docid": "90932624cc23615ec2d18ec935b9f907", "score": "0.5327791", "text": "public function on_cron_job_runs() {\n\t\t$manager = new BTM_Notification_Manager( $this->get_recurrence() );\n\t\t$to_report = $manager->create_task();\n\t\tBTM_Task_Manager::get_instance()->register_simple_task( $to_report );\n\t}", "title": "" }, { "docid": "1a61c6bf6fc2d0779098d7673435d4d4", "score": "0.53269154", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')->hourly();\n\n if(env(\"CRAWLING\") == 0) return;\n\n #Log::info(\"every mins\");\n $schedule->call(function (){\n Redis::flushall();\n })->dailyAt(\"08:00\");\n\n $schedule->call(function () {\n\n $r = SelectedVendor::login();\n Log::debug(\"Vendor Login\" .json_encode($r));\n })->dailyAt(\"09:00\");\n\n $schedule->call(function () {\n $r = SelectedVendor::logout();\n Log::debug(\"Vendor Logout\" .json_encode($r));\n })->dailyAt(\"14:30\");\n\n #Log::info(\"Every minute run\");\n\n\n $schedule->call(function () {\n\n Redis::set(\"is_holiday\", StockHelper::isHoliday());\n if(StockHelper::isHoliday()){\n Log::info(\"Holiday\");\n }\n })->name(\"is_holiday_today\")\n ->dailyAt(\"01:00\");\n\n /**\n * Crawl realtime data\n */\n\n $schedule->call(function (){CrawlRealtimeGeneral::dispatchNow();})\n ->name(\"get_realtime_general\")\n ->weekdays()\n ->when(function () {\n return !(bool)Redis::get(\"is_holiday\");\n })\n ->everyMinute()\n ->between(\"9:00\", \"13:35\")\n ->withoutOverlapping()\n ->runInBackground();\n\n /**\n * DL2D FBS 1\n */\n $schedule->call(function (){\n $url = StockHelper::get_Dl2D_URL();\n if(isset($url[0])){\n Log::info(\"FBS play DL2D: {$url[0]}\");\n CrawlRealtimeStock::dispatchNow($url[0]);\n }\n })\n ->name(\"FBS_DL02D_1\")\n ->weekdays()\n ->when(function () {\n return !(bool)Redis::get(\"is_holiday\") && env(\"STRATEGY\") == \"DL0_2D\";\n })\n ->everyMinute()\n ->between(\"9:00\", \"13:30\")\n ->withoutOverlapping()\n ->runInBackground();\n\n\n /**\n * DL2D FBS 2\n */\n $schedule->call(function (){\n $url = StockHelper::get_Dl2D_URL();\n if(isset($url[1])){\n Log::info(\"FBS play DL2D: {$url[1]}\");\n CrawlRealtimeStock::dispatchNow($url[1]);\n }\n })\n ->name(\"FBS_DL02D_2\")\n ->weekdays()\n ->when(function () {\n return !(bool)Redis::get(\"is_holiday\") && env(\"STRATEGY\") == \"DL0_2D\";\n })\n ->everyMinute()\n ->between(\"9:00\", \"13:30\")\n ->withoutOverlapping()\n ->runInBackground();\n\n /**\n * DL2D FBS 3\n */\n $schedule->call(function (){\n $url = StockHelper::get_Dl2D_URL();\n if(isset($url[2])){\n Log::info(\"FBS play DL2D: {$url[2]}\");\n CrawlRealtimeStock::dispatchNow($url[2]);\n }\n })\n ->name(\"FBS_DL02D_3\")\n ->weekdays()\n ->when(function () {\n return !(bool)Redis::get(\"is_holiday\") && env(\"STRATEGY\") == \"DL0_2D\";\n })\n ->everyMinute()\n ->between(\"9:00\", \"13:30\")\n ->withoutOverlapping()\n ->runInBackground();\n\n\n /**\n * DL2D FBS 4\n */\n $schedule->call(function (){\n $url = StockHelper::get_Dl2D_URL();\n if(isset($url[3])){\n Log::info(\"FBS play DL2D: {$url[3]}\");\n CrawlRealtimeStock::dispatchNow($url[3]);\n }\n })\n ->name(\"FBS_DL02D_4\")\n ->weekdays()\n ->when(function () {\n return !(bool)Redis::get(\"is_holiday\") && env(\"STRATEGY\") == \"DL0_2D\";\n })\n ->everyMinute()\n ->between(\"9:00\", \"13:30\")\n ->withoutOverlapping()\n ->runInBackground();\n\n /**\n * Monitor orders\n */\n $schedule->job(new MonitorOrder, \"medium\")\n ->weekdays()\n ->when(function () {\n return !(bool)Redis::get(\"is_holiday\");\n })\n ->everyMinute()\n ->between(\"9:00\", \"13:30\");\n\n $schedule->call(function (){\n StockHelper::getGeneralData();\n })->weekdays()\n ->at(\"19:48\")\n ->when(function () {\n return !(bool)Redis::get(\"is_holiday\");\n });\n\n /**\n * Crawl dl data\n */\n $schedule->job(new CrawlDL, \"high\")\n ->weekdays()\n ->at(\"17:05\")\n ->when(function () {\n return !(bool)Redis::get(\"is_holiday\");\n });\n\n /**\n * Crawl arav data\n */\n $schedule->job(new CrawlARAV, \"high\")\n ->weekdays()\n ->at(\"17:10\")\n ->when(function () {\n return !(bool)Redis::get(\"is_holiday\");\n });\n\n /**\n * Crawl xz and agency\n */\n $schedule->job(new CrawlLargeTrade, \"high\")\n ->weekdays()\n ->at(\"18:10\")\n ->when(function () {\n return !(bool)Redis::get(\"is_holiday\");\n });\n\n\n /**\n * Re crawl agency\n */\n $schedule->call(function (){\n file_get_contents(route(\"re_crawl_agency\"));\n })\n ->weekdays()\n ->at(\"18:20\")\n ->when(function () {\n return !(bool)Redis::get(\"is_holiday\");\n });\n\n $schedule->call(function (){\n file_get_contents(route(\"re_crawl_agency\"));\n })\n ->weekdays()\n ->at(\"12:10\");\n\n\n $schedule->call(function (){\n file_get_contents(route(\"re_crawl_agency\"));\n })\n ->weekdays()\n ->at(\"01:22\");\n\n /**\n * Crawl holiday\n */\n $schedule->job(new CrawlHoliday, \"high\")\n ->name(\"holiday\")\n ->weekly();\n }", "title": "" }, { "docid": "54c9f1abcfa789521f3fe37ad4b88ac4", "score": "0.53183246", "text": "function analyzer_cron_job_activation()\n{\n\tif(!wp_next_scheduled('analyzer_data_migration'))\n\t{\n\t\twp_schedule_event(current_time('timestamp'), 'everyminute', 'analyzer_data_migration');\n\t}\n}", "title": "" }, { "docid": "4cc5ee412bbcfa2005ea0151dbc1af50", "score": "0.531586", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->call(function(){\n $datetime = new Carbon('now', new \\DateTimeZone(\"UTC\"));\n $date=$datetime->toDateTimeString();\n\n$sql = \"WITH expiresSubscription AS\n( SELECT * from purchases where expire_date < ?) UPDATE expiresSubscription SET status = ?\";\nDB::select($sql,[$date,self::statusExpired]);\n })->everyFiveMinutes();\n }", "title": "" }, { "docid": "95b543b1ceb94252bae7234aa03ff1d4", "score": "0.52927244", "text": "public function run() {\n if ($this->config->db['allow']) {\n try {\n $dir = $this->config->backupPath . 'db/';\n // create backup directory if not exists\n if (!is_dir($dir)) {\n try {\n mkdir($dir, 0777, true);\n } catch (\\Exception $e) {\n return [\n 'status' => 400,\n 'success' => false,\n 'message' => \"Permission denied while creating database backup directory : \" . $e->getMessage(),\n 'file_name' => null,\n ];\n }\n }\n\n $dateTime = date('Y-m-d-H-i-s');\n // set the filename for the db file\n $databaseFile = $dir . \"backup-$dateTime.sql\";\n\n switch ($this->config->db['connection']) {\n case 'mysql':\n // MySQL database configuration\n $command = \"/usr/bin/mysqldump --opt --host={$this->config->db['host']} --user={$this->config->db['username']} --password='{$this->config->db['password']}' {$this->config->db['name']} > {$databaseFile}\";\n break;\n case 'mongodb';\n // MongoDB database configuration\n $command = \"/usr/bin/mongodump --host {$this->config->db['host']} --port {$this->config->db['port']} --username {$this->config->db['username']} --password '{$this->config->db['password']}' --db {$this->config->db['name']} --out $databaseFile\";\n case 'pgsql';\n // PostgreSQL database configuration\n $command = \"/usr/bin/pg_dump --host=$this->config->db['host']} --port={$this->config->db['port']} --username={$this->config->db['username']} --password='{$this->config->db['password']}' --dbname={$this->config->db['name']} --file=$databaseFile\";\n default:\n break;\n }\n // execute export command line\n shell_exec($command);\n // compress the database file\n $compressBackupFilesDirectory = $this->config->projectPath . \"/storage/backup-sentry/compressed/db/db-$dateTime.zip\";\n $filename = $this->compress->zip($compressBackupFilesDirectory, $databaseFile, $this->config->compressedPassword, $this->config->configFile['backup']['keep_original_backup_folders'], $this->config->configFile['options']['encryption'])['file_name'];\n\n return [\n 'status' => 200,\n 'success' => true,\n 'message' => \"Database Exported Successfully.\",\n 'file_name' => $filename,\n ];\n } catch (\\Exception $e) {\n return [\n 'status' => 400,\n 'success' => false,\n 'message' => \"Fail on exporting database : \" . $e->getMessage(),\n 'file_name' => null,\n ];\n }\n } else {\n return [\n 'status' => 201,\n 'success' => true,\n 'message' => \"Database not exported base on user configuration.\",\n 'file_name' => null,\n ];\n }\n }", "title": "" }, { "docid": "3484bc012dcd01b8243ae89cb8e451e9", "score": "0.52882284", "text": "public function scheduleSub($date) {\n $this->lastSubbed[] = $date;\n }", "title": "" }, { "docid": "b26971c9478f4284f38d35b4bd113a44", "score": "0.5282547", "text": "public function run() {\n $quesql = \"INSERT INTO {{CronLog}} (Start_DateTime) VALUES('\" . Date('y-m-d h:i:s') . \"')\";\n $result = Yii::app()->db->createCommand($quesql)->query();\n $id = Yii::app()->db->lastInsertID;\n //18/06/2014 End\n\n $clang = Yii::app()->lang;\n $this->prnst();\n $dr = CronJobs::model()->getQue('resendemail');\n while (($row = $dr->read()) !== false) {\n echo '<p>Checking <span>' . $row['frequency'] . '</span> commands<p/>';\n $this->executeJob($row);\n echo '<hr/>';\n }\n $this->prned();\n \n //18/06/2014 Add By Hari\n $quesql = \"UPDATE {{CronLog}} SET End_DateTime='\" . Date('y-m-d h:i:s') . \"' WHERE CronLogID='\" . $id . \"'\";\n $result = Yii::app()->db->createCommand($quesql)->query();\n //18/06/2014 End\n }", "title": "" }, { "docid": "143688da92bb97cfecbfb9b6db11009c", "score": "0.52802825", "text": "function ManageSchedules()\n\t{\n\t\t$user = &GetUser();\n\t\t$jobsApi = $this->GetApi('Jobs');\n\n\t\t$settingsApi = $this->GetApi('Settings');\n\t\t$cron_check = $settingsApi->CheckCron();\n\n\t\t$cron_run1 = $settingsApi->Get('cronrun1');\n\t\t$cron_run2 = $settingsApi->Get('cronrun2');\n\n\t\tif ($cron_run1 > 0 && $cron_run2 > 0) {\n\t\t\t$schedule = $settingsApi->Get('Schedule');\n\t\t\t$send_schedule = $schedule['send'];\n\t\t\t$cron_diff = SENDSTUDIO_CRON_SEND * 60;\n\n\t\t\t$next_run = $send_schedule['lastrun'] + ($cron_diff);\n\n\t\t\t$now = time();\n\t\t\t$time_to_wait = $next_run - $now;\n\t\t\t$update_cron_time = 'true';\n\t\t} else {\n\t\t\t$time_to_wait = GetLang('Unknown');\n\t\t\t$cron_diff = 0;\n\t\t\t$next_run = 0;\n\t\t\t$update_cron_time = 'false';\n\t\t}\n\n\t\t$this->DisplayCronWarning(false);\n\n\t\tif ($update_cron_time && $cron_diff > 0) {\n\t\t\twhile ($time_to_wait < 0) {\n\t\t\t\t$time_to_wait += $cron_diff;\n\t\t\t}\n\t\t}\n\n\t\t$GLOBALS['UpdateCronTime'] = $update_cron_time;\n\t\t$GLOBALS['CronTimeLeft'] = $time_to_wait;\n\t\t$GLOBALS['CronTimeDifference'] = $cron_diff;\n\n\t\t$perpage = $this->GetPerPage();\n\n\t\t$DisplayPage = $this->GetCurrentPage();\n\t\t$start = 0;\n\t\tif ($perpage != 'all') {\n\t\t\t$start = ($DisplayPage - 1) * $perpage;\n\t\t}\n\n\t\t$lists = $user->GetLists();\n\n\t\t$listids = array_keys($lists);\n\n\t\tif ($user->HasAccess('Newsletters', 'Send')) {\n\t\t\t$GLOBALS['Newsletters_SendButton'] = $this->ParseTemplate('Newsletter_Send_Button', true, false);\n\t\t}\n\n\t\t$include_unapproved = false;\n\t\tif ($user->Admin()) {\n\t\t\t$include_unapproved = true;\n\t\t\t$numJobs = $jobsApi->GetJobList('send', 'newsletter', $listids, true, 0, 0, $include_unapproved, false);\n\t\t} else {\n\t\t\t$numJobs = $jobsApi->GetJobList('send', 'newsletter', $listids, true, 0, 0, $include_unapproved, false, $user->userid);\n\t\t}\n\n\t\tif ($numJobs < 1) {\n\t\t\tif ($user->HasAccess('Newsletters', 'Send')) {\n\t\t\t\t$msg = $this->PrintSuccess('Schedule_Empty', GetLang('NoSchedules_HasAccess'));\n\t\t\t} else {\n\t\t\t\t$msg = $this->PrintSuccess('Schedule_Empty', '');\n\t\t\t}\n\t\t\tif (!isset($GLOBALS['Message'])) {\n\t\t\t\t$GLOBALS['Message'] = '';\n\t\t\t}\n\t\t\t$GLOBALS['Message'] .= $msg;\n\t\t\techo $this->ParseTemplate('Schedule_Manage_Row_Empty', true, false);\n\t\t\treturn;\n\t\t}\n\n\t\tif ($user->Admin()) {\n\t\t\t$jobs = $jobsApi->GetJobList('send', 'newsletter', $listids, false, $start, $perpage, $include_unapproved, false);\n\t\t} else {\n\t\t\t$jobs = $jobsApi->GetJobList('send', 'newsletter', $listids, false, $start, $perpage, $include_unapproved, false, $user->userid);\n\t\t}\n\t\t$this->SetupPaging($numJobs, $DisplayPage, $perpage);\n\t\t$GLOBALS['FormAction'] = 'Action=ProcessPaging';\n\t\t$paging = $this->ParseTemplate('Paging', true, false);\n\n\t\t$manage_row = '';\n\n\t\t$timenow = AdjustTime();\n\n\t\t$rid = 0;\n\n\t\tforeach ($jobs as $p => $details) {\n\t\t\t$rid++;\n\t\t\t$GLOBALS['JobID'] = (int)$details['jobid'];\n\t\t\t$GLOBALS['Status'] = $jobsApi->GetJobStatus($details['jobstatus']);\n\t\t\t$GLOBALS['JobTime'] = $this->PrintTime($details['jobtime'], true);\n\t\t\t$GLOBALS['ListName'] = htmlspecialchars($details['listname'], ENT_QUOTES, SENDSTUDIO_CHARSET);\n\t\t\t$GLOBALS['NewsletterName'] = htmlspecialchars($details['name'], ENT_QUOTES, SENDSTUDIO_CHARSET);\n\n\t\t\t$GLOBALS['NewsletterSubject'] = '';\n\t\t\tif ($details['subject'] !== null) {\n\t\t\t\t$GLOBALS['NewsletterSubject'] = ' - ' . htmlspecialchars($details['subject'], ENT_QUOTES, SENDSTUDIO_CHARSET);\n\t\t\t}\n\n\t\t\t$GLOBALS['NewsletterType'] = GetLang('Schedule_NewsletterType_Newsletter');\n\t\t\tif ($details['jobdescription'] !== null) {\n\t\t\t\t$GLOBALS['NewsletterType'] = htmlspecialchars($details['jobdescription'], ENT_QUOTES, SENDSTUDIO_CHARSET);\n\t\t\t}\n\n\t\t\t$action = sprintf(GetLang('Schedule_ViewNewsletter'), 'index.php?Page=Newsletters&Action=View&id=' . (int)$details['newsletterid']);\n\t\t\tif ($details['jobtype'] != 'send') {\n\t\t\t\t$action = '';\n\t\t\t}\n\n\t\t\t$GLOBALS['RowID'] = $rid;\n\n\t\t\t$GLOBALS['RefreshLink'] = $GLOBALS['AlreadySent'] = '';\n\n\t\t\t/**\n\t\t\t * If a job is not 'p'aused or 'c'omplete, or 'i'n progress,\n\t\t\t * show the \"countdown\" for when it will send.\n\t\t\t *\n\t\t\t * This allows addons to have their own \"status\" and still show a countdown for when it will send.\n\t\t\t */\n\t\t\tif (!in_array($details['jobstatus'], array ('p', 'c', 'i'))) {\n\t\t\t\tif ($details['jobstatus'] == 'w' && ($user->Admin() && $details['approved'] <= 0)) {\n\t\t\t\t\t$GLOBALS['TipName'] = $this->GetRandomId();\n\t\t\t\t\t$GLOBALS['ScheduleTip'] = GetLang('WaitingForApproval_Description');\n\n\t\t\t\t\t$need_approval_tip = $this->ParseTemplate('Schedule_Needs_Approval_Tip', true, false);\n\t\t\t\t\t$GLOBALS['Status'] = $need_approval_tip;\n\n\t\t\t\t\t$action .= $this->ParseTemplate('Schedule_Manage_Row_ApproveLink', true, false);\n\n\t\t\t\t\t$action .= $this->ParseTemplate('Schedule_Manage_Row_DeleteLink', true, false);\n\n\t\t\t\t\t$GLOBALS['Action'] = $action;\n\n\t\t\t\t\t$manage_row .= $this->ParseTemplate('Schedule_Manage_Row', true, false);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ($next_run > 0) {\n\t\t\t\t\t$details['jobtime'] = FixBrokenGMTTime($details['jobtime']);\n\t\t\t\t\t$send_in_time_difference = $details['jobtime'] - time();\n\n\t\t\t\t\t// if we're below 0, that means we should send next time cron runs.\n\t\t\t\t\tif ($send_in_time_difference < 0) {\n\t\t\t\t\t\t$send_in_time_difference = $time_to_wait;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($next_run > 0 && $details['jobtime'] <= $next_run) {\n\t\t\t\t\t\t$send_in_time_difference = $next_run - time();\n\t\t\t\t\t}\n\n\t\t\t\t\twhile ($send_in_time_difference < 0) {\n\t\t\t\t\t\t$send_in_time_difference += $cron_diff;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($send_in_time_difference > 0) {\n\t\t\t\t\t\t$have_refreshed = (isset($_GET['R'])) ? 1 : 0;\n\n\t\t\t\t\t\t$GLOBALS['RefreshLink'] = \"<script>UpdateMyTimer('\" . $GLOBALS['JobID'] . \"_\" . $rid . \"', \" . (int)$send_in_time_difference . \", \" . $have_refreshed . \");</script>\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ($details['jobstatus'] == 'w') {\n\t\t\t\t\t\t\t$GLOBALS['Status'] = GetLang('WaitingToSend');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ($details['jobstatus'] == 'w') {\n\t\t\t\t\t\t$GLOBALS['Status'] = GetLang('WaitingToSend');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($details['jobstatus'] == 'i') {\n\t\t\t\tif ($user->Admin() && $details['approved'] <= 0) {\n\t\t\t\t\t$GLOBALS['TipName'] = $this->GetRandomId();\n\t\t\t\t\t$GLOBALS['ScheduleTip'] = GetLang('WaitingForApproval_Description');\n\n\t\t\t\t\t$need_approval_tip = $this->ParseTemplate('Schedule_Needs_Approval_Tip', true, false);\n\t\t\t\t\t$GLOBALS['Status'] = $need_approval_tip;\n\n\t\t\t\t\t$action .= $this->ParseTemplate('Schedule_Manage_Row_ApproveLink', true, false);\n\n\t\t\t\t\t$action .= $this->ParseTemplate('Schedule_Manage_Row_DeleteLink', true, false);\n\n\t\t\t\t\t$GLOBALS['Action'] = $action;\n\n\t\t\t\t\t$manage_row .= $this->ParseTemplate('Schedule_Manage_Row', true, false);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$queueinfo = $jobsApi->GetJobQueueSize($details['jobid']);\n\n\t\t\t\tif (!empty($queueinfo)) {\n\t\t\t\t\t$GLOBALS['AlreadySent'] = sprintf(GetLang('AlreadySentTo'), $this->FormatNumber($queueinfo['totalsent']), $this->FormatNumber($queueinfo['sendsize']));\n\t\t\t\t}\n\t\t\t\t$GLOBALS['RefreshDisplayPage'] = $DisplayPage;\n\t\t\t\t$action .= $this->ParseTemplate('Schedule_Manage_Row_RefreshLink', true, false);\n\t\t\t}\n\n\t\t\t// if the job is paused, we can resume it.\n\t\t\tif ($details['jobstatus'] == 'p') {\n\t\t\t\t$action .= $this->ParseTemplate('Schedule_Manage_Row_ResumeLink', true, false);\n\t\t\t}\n\n\t\t\t// if the job is in progress we can pause it.\n\t\t\t// or if it's in progress.\n\t\t\t// that will allow us to delay it without losing all of the info....\n\t\t\tif ($details['jobstatus'] == 'i' || $details['jobstatus'] == 'w') {\n\t\t\t\t$action .= $this->ParseTemplate('Schedule_Manage_Row_PauseLink', true, false);\n\t\t\t}\n\n\t\t\t// if it's not in progress, we can edit or delete the scheduled event.\n\t\t\t// but only if it has not started yet (the queueid will be > 0 for started events).\n\t\t\tif ($details['jobstatus'] != 'i') {\n\t\t\t\tif ($details['queueid'] == 0 && $details['jobstatus'] != 'c') {\n\t\t\t\t\t$action .= $this->ParseTemplate('Schedule_Manage_Row_EditLink', true, false);\n\t\t\t\t}\n\t\t\t\t$action .= $this->ParseTemplate('Schedule_Manage_Row_DeleteLink', true, false);\n\t\t\t}\n\n\t\t\t$GLOBALS['Action'] = $action;\n\n\t\t\t$manage_row .= $this->ParseTemplate('Schedule_Manage_Row', true, false);\n\t\t}\n\n\t\t$template = $this->ParseTemplate('Schedule_Manage', true, false);\n\t\t$template = str_replace('%%TPL_Schedule_Manage_Row%%', $manage_row, $template);\n\n\t\t$template = str_replace('%%TPL_Paging%%', $paging, $template);\n\t\t$template = str_replace('%%TPL_Paging_Bottom%%', $GLOBALS['PagingBottom'], $template);\n\n\t\techo $template;\n\t}", "title": "" }, { "docid": "cebfbe2b78d821f54dfbad005613d2bc", "score": "0.5276912", "text": "public function backup($client) { }", "title": "" }, { "docid": "4bcf06cc240cb22504d18422e939fc59", "score": "0.52720517", "text": "function do_daily_schedule_expire_session(){\r\n\t/* Post EXPIRY SETTINGS CODING START */\r\n\tglobal $wpdb;\r\n\t$table_name = $wpdb->prefix.\"post_expire_session\";\r\n\t$transaction_db_table_name = $wpdb->prefix.'transactions'; \r\n\t$current_date = date_i18n('Y-m-d');\t\r\n\tif($wpdb->query(\"SHOW TABLES LIKE '\".$table_name.\"'\")==1):\r\n\t\r\n\t\t$today_executed = $wpdb->get_var(\"select session_id from $table_name where execute_date='\".$current_date.\"' LIMIT 0,1\");\r\n\t\t\r\n\t\tif($today_executed && $today_executed>0){\r\n\t\t\t/* if one time execution in a day is done then do nothing */\r\n\t\t}else{\r\n\r\n\t\t\t\t$tmpdata = get_option('templatic_settings');\r\n\t\t\t\t$listing_email_notification = @$tmpdata['listing_email_notification'];\r\n\t\t\t\tif($listing_email_notification != \"\"){\r\n\t\t\t\t\t$number_of_grace_days = $listing_email_notification;\r\n\t\t\t\t\t$postid_str = $wpdb->get_results(\"select p.ID,p.post_author,p.post_date, p.post_title,t.payment_date,t.post_id from $wpdb->posts p,$transaction_db_table_name t where p.ID = t.post_id and p.post_status='publish' AND (t.package_type is NULL OR t.package_type=0) and datediff('\".$current_date.\"',date_format(t.payment_date,'%Y-%m-%d')) = (select DISTINCT meta_value from $wpdb->postmeta pm where post_id=p.ID and meta_key='alive_days')-$number_of_grace_days and t.status=1 and t.package_id = (select DISTINCT meta_value from $wpdb->postmeta pm where post_id=p.ID and meta_key='package_select') group by p.ID \");\r\n\t\t\t\t\tforeach($postid_str as $postid_str_obj)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$ID = $postid_str_obj->ID;\r\n\t\t\t\t\t\t/*fetch current date*/\r\n\t\t\t\t\t\t$current_day = strtotime(date('Y-m-d h:i:s'));\r\n\t\t\t\t\t\t/*fetch payment date*/\r\n\t\t\t\t\t\t$payment_date = strtotime($postid_str_obj->payment_date);\r\n\t\t\t\t\t\t/*fetch post alive days*/\r\n\t\t\t\t\t\t$alive_days = get_post_meta($ID,'alive_days',true);\r\n\t\t\t\t\t\t/*fetch post package id*/\r\n\t\t\t\t\t\t$package_select = get_post_meta($ID,'package_select',true);\r\n\t\t\t\t\t\t/*check package is recurring or not*/\r\n\t\t\t\t\t\t$recurring = get_post_meta($package_select,'recurring',true);\r\n\t\t\t\t\t\t/*fetch billing cycle for recurring price package*/\r\n\t\t\t\t\t\t$billing_cycle = get_post_meta($package_select,'billing_cycle',true);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$seconds_diff = $current_day - $payment_date;\r\n\t\t\t\t\t\t/*day difference between current date and post date*/\r\n\t\t\t\t\t\t$post_day = floor($seconds_diff/3600/24);\r\n\t\t\t\t\t\t/*fetch package type for particular post*/\r\n\t\t\t\t\t\t$package_type = get_post_meta($package_select,'package_type',true);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t/*fetch post date*/\r\n\t\t\t\t\t\t$publish_date = strtotime(get_post_meta($ID,'publish_date',true));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$recurring_seconds_diff = $current_day - $publish_date;\r\n\t\t\t\t\t\t/*day difference between current date and post date*/\r\n\t\t\t\t\t\t$recurring_post_day = floor($recurring_seconds_diff/3600/24);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t/*if current post is recurring than does not send mail to user until price package gets expired*/\r\n\t\t\t\t\t\tif(@$recurring == 1 && $post_day <= (($alive_days * $billing_cycle )-$number_of_grace_days) && $package_type == 2 )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(@$recurring == 1 && $recurring_post_day < (($alive_days * $billing_cycle )-$number_of_grace_days) && $package_type == 1 )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$paid_date = $wpdb->get_var(\"select payment_date from $transaction_db_table_name t where post_id = '\".$ID.\"' AND (t.package_type is NULL OR t.package_type=0) order by t.trans_id DESC\"); /* change it to calculate expired day as per transactions */\r\n\t\t\t\t\t\t$auth_id = $postid_str_obj->post_author;\r\n\t\t\t\t\t\t$post_author = $postid_str_obj->post_author;\r\n\t\t\t\t\t\t$post_date = date_i18n(get_option('date_format'),strtotime($postid_str_obj->post_date));\r\n\t\t\t\t\t\t$paid_on = date_i18n(get_option('date_format'),strtotime($paid_date));\r\n\t\t\t\t\t\t$post_title = $postid_str_obj->post_title;\r\n\t\t\t\t\t\t$userinfo = $wpdb->get_results(\"select user_email,display_name,user_login from $wpdb->users where ID=$auth_id LIMIT 0,1\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdo_action('tmpl_post_expired_beforemail',$postid_str_obj);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$user_email = $userinfo[0]->user_email;\r\n\t\t\t\t\t\t$display_name = $userinfo[0]->display_name;\r\n\t\t\t\t\t\t$user_login = $userinfo[0]->user_login;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$fromEmail = get_site_emailId_plugin();\r\n\t\t\t\t\t\t$fromEmailName = get_site_emailName_plugin();\r\n\t\t\t\t\t\t$store_name = '<a href=\"'.home_url().'\">'.get_option('blogname').'</a>';\r\n\t\t\t\t\t\t$alivedays = get_post_meta($ID,'alive_days',true);\r\n\t\t\t\t\t\t$productlink = get_permalink($ID);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$store_login='';\r\n\t\t\t\t\t\t$loginurl='';\r\n\t\t\t\t\t\tif(function_exists('get_tevolution_login_permalink')){\r\n\t\t\t\t\t\t\t$store_login = '<a href=\"'.get_tevolution_login_permalink().'\">'.__('Click Login','templatic').'</a>';\r\n\t\t\t\t\t\t\t$loginurl = get_tevolution_login_permalink();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$siteurl = home_url();\r\n\t\t\t\t\t\t$client_message = $tmpdata['listing_expiration_content'];\r\n\t\t\t\t\t\tif(!$client_message)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$client_message =\"<p>Dear [#user_login#],<p><p>Your listing -<b>[#post_title#]</b> posted on [#post_date#] and paid on [#transection_date#] for [#alivedays#] days.</p><p>Is going to expire in [#days_left#] day(s). Once the listing expires, it will no longer appear on the site.</p><p> In case you wish to renew this listing, please login to your member area on our site and renew it as soon as it expires. You can login on the following link [#site_login_url_link#].</p><p>Your login ID is <b>[#user_login#]</b> and Email ID is <b>[#user_email#]</b>.</p><p>Thank you,<br />[#site_name#].</p>\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$search_array = array('[#user_login#]','[#post_link#]','[#post_title#]','[#post_date#]','[#transection_date#]','[#alivedays#]','[#days_left#]','[#site_login_url_link#]','[#user_login#]','[#user_email#]','[#site_name#]','[#site_login_url#]');\r\n\t\t\t\t\t\t$replace_array = array($user_login,$productlink,$post_title,$post_date,$paid_on,$alivedays,$number_of_grace_days,$loginurl,$user_login,$user_email,$store_name,$store_login);\r\n\t\t\t\t\t\t$client_message=str_replace($search_array,$replace_array,$client_message);\r\n\t\t\t\t\t\t$subject = $tmpdata['listing_expiration_subject'];\r\n\t\t\t\t\t\tif(!$subject)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$subject = \"Listing expiration Notification\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttempl_send_email($fromEmail,$fromEmailName,$user_email,$display_name,$subject,stripslashes($client_message),$extra='');\r\n\t\t\t\t\t\tdo_action('tmpl_post_expired_aftermail');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$postid_str = $wpdb->get_var(\"select group_concat(p.ID),t.payment_date,t.post_id from $wpdb->posts p,$transaction_db_table_name t where p.ID = t.post_id and p.post_status='publish' and datediff('\".$current_date.\"',date_format(t.payment_date,'%Y-%m-%d')) = (select DISTINCT meta_value from $wpdb->postmeta pm where post_id=p.ID and meta_key='alive_days') and t.status=1 and t.package_id = (select DISTINCT meta_value from $wpdb->postmeta pm where post_id=p.ID and meta_key='package_select')\");\r\n\t\t\r\n\t\t\t\tif($postid_str)\r\n\t\t\t\t{\r\n\t\t\t\t\t$tmpdata = get_option('templatic_settings');\r\n\t\t\t\t\t$listing_ex_status = $tmpdata['post_listing_ex_status'];\r\n\t\t\t\t\tif($listing_ex_status=='')\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$listing_ex_status = 'draft';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$wpdb->query(\"update $wpdb->posts set post_status=\\\"$listing_ex_status\\\" where ID in ($postid_str)\");\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\t$wpdb->query(\"insert into $table_name (execute_date,is_run) values ('\".$current_date.\"','1')\");\r\n\t\t\t\r\n\t\t}\r\n\tendif;\r\n}", "title": "" }, { "docid": "d4c70ce39e6d1906ad3a8a20b41ed9f0", "score": "0.5270445", "text": "public function flushNotificationToArchive()\n {\n try {\n $limitPriod = (int)SiteSetting::module('Notifications and Announcements', 'flush_notifications_days_limit');\n $time_line = Carbon::today()->subDay((int)$limitPriod)->timestamp;\n Notification::getDeleteFlushedNotification($time_line);\n } catch (Exception $e) {\n Log::info('Cron - Flush Notification To Arc failed - ' . $e->getMessage());\n }\n }", "title": "" }, { "docid": "b1753e30e4dbb2fff71408ffe41f6202", "score": "0.52667373", "text": "function swsctp_activation() {\n\twp_schedule_event(strtotime('today 16:00 EDT'), 'hourly', 'swsctp_cron_jobs');\n}", "title": "" }, { "docid": "1f6a82018cb6a517cd00921e227fe4fb", "score": "0.5265853", "text": "public function run()\n {\n self::$db->prepared_query(\"\n SELECT pth.periodic_task_id, pth.periodic_task_history_id, pth.launch_time, pt.name\n FROM periodic_task_history pth\n INNER JOIN periodic_task pt USING (periodic_task_id)\n WHERE pth.status = 'running'\n AND pth.launch_time < now() - INTERVAL 15 MINUTE\n AND pt.is_enabled IS TRUE\n \");\n $tasks = self::$db->to_array(false, MYSQLI_ASSOC);\n\n foreach ($tasks as $task) {\n [$id, $historyId, $launchTime, $name] = array_values($task);\n $duration = Time::diff(time() - strtotime($launchTime) + time(), 2, false);\n\n Irc::sendMessage(LAB_CHAN, \"Marking stuck task $name ($duration) as insane\");\n $this->processed++;\n $this->info(\"Marking stuck task $name ($duration) as insane\", $id);\n\n self::$db->prepared_query('\n UPDATE periodic_task SET\n is_sane = FALSE\n WHERE periodic_task_id = ?\n ', $id\n );\n\n self::$db->prepared_query(\"\n UPDATE periodic_task_history SET\n status = 'failed'\n WHERE periodic_task_history_id = ?\n \", $historyId\n );\n }\n\n if ($this->processed > 0) {\n self::$cache->delete_value(\\Gazelle\\Schedule\\Scheduler::CACHE_TASKS);\n }\n }", "title": "" }, { "docid": "8b2f77b9a87bd717ad21b0effa597c64", "score": "0.5265619", "text": "function AutoCancelationTrip_BK(){\n\t\t// Test cron\n\t\t// $current_date_time = strtotime(date('Y-m-d H:i:s'));\n\t\t// $cronRes = $this->webservices_model->save_data(array('dExecuteTime'=> date('Y-m-d H:i:s'),'vNote'=>'AutoCancelationTrip'), 'cron_test');\n\t\t/*$all_trips = $this->webservices_model->get_all_pending_trips();\n\n\t\tforeach ($all_trips as $key_all => $value_all) {\n\t\t\t$source_city = $this->webservices_model->cityDetailByTripID($value_all['iTripId']);\n\t\t\t$tmpDate = new DateTime(\"now\", new DateTimeZone($source_city['vTimeZone']));\n\t\t\t$current_date_time = strtotime($tmpDate->format('Y-m-d H:i:s'));\n\t\t\t$bookingdatetime = strtotime($value_all['dTripDate']);\n\t\t\t\n\t\t\tif ($value_all['eTripLocation']=='Local' || $value_all['eType']=='Fixride' || ($value_all['eTripLocation']=='Outstation' && $value_all['eTripType']=='Round')){\n\t\t\t\tif($value_all['eDriverAssign']=='No'){\n\t\t\t\t\t$finalmins = round(abs($current_date_time - $bookingdatetime) / 60,2);\n\t\t\t\t\tif(($value_all['eBookType']=='Now' && $finalmins>2) || ($value_all['eBookType']=='Later' && $value_all['eBookLaterNotification']=='Yes' && ($finalmins<118 && $finalmins>115))){\n\t\t\t\t\t\t// cancel and send notification to customer\n\t\t\t\t\t\t$totdelrows = $this->webservices_model->delete_trip_drivers($value_all['iTripId']);\n\t\t\t\t\t\t$cancelRes = $this->webservices_model->cancel_trip_by_no_service_available($value_all['iTripId']);\n\t\t\t\t\t\t$client_device = $this->webservices_model->get_client_device_details($value_all['iClientId']);\n\t\t\t\t\t\t$pushNotificationData['action'] = 'sendNotification';\n\t\t\t\t\t\t$pushNotificationData['msg'] = \"No Service Available At This Time, Please Try Again Later\";\n\t\t\t\t\t\t$pushNotificationData['vDeviceid'] = $client_device;\n\t\t\t\t\t\t$pushNotificationData['eUserType'] = \"Rider\";\n\t\t\t\t\t\t$datapush = $this->pushNotification($pushNotificationData);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($value_all['eTripLocation']=='Outstation' && $value_all['eTripType']=='One Way'){\n\t\t\t\t// outstation and one way\n\t\t\t\tif($value_all['eDriverAssign']=='No'){\n\t\t\t\t\t$finalmins = round(abs($current_date_time - $bookingdatetime) / 60,2);\n\t\t\t\t\tif($value_all['eOutstationNotification']=='Yes'){\n\t\t\t\t\t\tif(($value_all['eBookType']=='Now' && ($finalmins < 4 && $finalmins>2)) || ($value_all['eBookType']=='Later' && $value_all['eBookLaterNotification']=='Yes' && ($finalmins<118 && $finalmins>115))){\n\t\t\t\t\t\t\t// first remove other drivers from trip_drivers\n\t\t\t\t\t\t\t$totdelrows = $this->webservices_model->delete_trip_drivers($value_all['iTripId']);\n\t\t\t\t\t\t\t// check for source city if out-station / both drivers are available\n\t\t\t\t\t\t\t$cityDetail = $this->webservices_model->get_one_city_details_byid($value_all['iCityId']);\n\t\t\t\t\t\t\t$qurVar = ($cityDetail['eRadiusUnit']=='KMs') ? 6371 : 3959;\n\t\t\t\t\t\t\t$source_city_lat_long = explode('|', $cityDetail['tCityLatLong']);\n\t\t\t\t\t\t\t// check drivers available in source city\n\t\t\t\t\t\t\t$drivers = $this->webservices_model->get_all_drivers_within_city($source_city_lat_long[0],$source_city_lat_long[1],$cityDetail['fRadius'],$qurVar,array('Outstation','Both'),$value_all['iVehicleCompanyId']);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($drivers) {\n\t\t\t\t\t\t\t\t$driverCtr=0;\n\t\t\t\t\t\t\t\tforeach ($drivers as $dkey => $dvalue) {\n\t\t\t\t\t\t\t\t\t$countRunningTrip = $this->webservices_model->checkRunningTripByDriver($dvalue['iDriverId']);\n\t\t\t\t\t\t\t\t\tif($countRunningTrip==0){\n\t\t\t\t\t\t\t\t\t\t// get device of driver\n\t\t\t\t\t\t\t\t\t\t$driver_device_details = $this->webservices_ridein_model->get_driver_device_details($nearest_driver_id);\n\t\t\t\t\t\t\t\t\t\tif($driver_device_details){\n\t\t\t\t\t\t\t\t\t\t\t$pushNotificationData['action'] = 'sendNotification';\n\t\t\t\t\t\t\t\t\t\t\t$pushNotificationData['msg'] = \"OneTocuhCab found a new pickup request for your service! ||||| \".$value_all['iTripId'];\n\t\t\t\t\t\t\t\t\t\t\t$pushNotificationData['vDeviceid'] = $driver_device_details['device_id'];\n\t\t\t\t\t\t\t\t\t\t\t$pushNotificationData['eUserType'] = \"Driver\";\n\t\t\t\t\t\t\t\t\t\t\t$datapush = $this->pushNotification($pushNotificationData);\n\t\t\t\t\t\t\t\t\t\t\t$driverCtr++;\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\tif($driverCtr==0){\n\t\t\t\t\t\t\t\t\t// cancel the trip and send notification to customer\n\t\t\t\t\t\t\t\t\t$totdelrows = $this->webservices_model->delete_trip_drivers($value_all['iTripId']);\n\t\t\t\t\t\t\t\t\t$client_device = $this->webservices_model->get_client_device_details($value_all['iClientId']);\n\t\t\t\t\t\t\t\t\t$pushNotificationData['action'] = 'sendNotification';\n\t\t\t\t\t\t\t\t\t$pushNotificationData['msg'] = \"No Service Available At This Time, Please Try Again Later\";\n\t\t\t\t\t\t\t\t\t$pushNotificationData['vDeviceid'] = $client_device;\n\t\t\t\t\t\t\t\t\t$pushNotificationData['eUserType'] = \"Rider\";\n\t\t\t\t\t\t\t\t\t$datapush = $this->pushNotification($pushNotificationData);\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// cancel the trip and send notification to customer\n\t\t\t\t\t\t\t\t$totdelrows = $this->webservices_model->delete_trip_drivers($value_all['iTripId']);\n\t\t\t\t\t\t\t\t$client_device = $this->webservices_model->get_client_device_details($value_all['iClientId']);\n\t\t\t\t\t\t\t\t$pushNotificationData['action'] = 'sendNotification';\n\t\t\t\t\t\t\t\t$pushNotificationData['msg'] = \"No Service Available At This Time, Please Try Again Later\";\n\t\t\t\t\t\t\t\t$pushNotificationData['vDeviceid'] = $client_device;\n\t\t\t\t\t\t\t\t$pushNotificationData['eUserType'] = \"Rider\";\n\t\t\t\t\t\t\t\t$datapush = $this->pushNotification($pushNotificationData);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(($value_all['eBookType']=='Now' && $finalmins >= 4) || ($value_all['eBookType']=='Later' && $value_all['eBookLaterNotification']=='Yes' && ($finalmins<115 && $finalmins>112))){\n\t\t\t\t\t\t\t// cancel and send notification to customer\n\t\t\t\t\t\t\t$totdelrows = $this->webservices_model->delete_trip_drivers($value_all['iTripId']);\n\t\t\t\t\t\t\t$cancelRes = $this->webservices_model->cancel_trip_by_no_service_available($value_all['iTripId']);\n\t\t\t\t\t\t\t$client_device = $this->webservices_model->get_client_device_details($value_all['iClientId']);\n\t\t\t\t\t\t\t$pushNotificationData['action'] = 'sendNotification';\n\t\t\t\t\t\t\t$pushNotificationData['msg'] = \"No Service Available At This Time, Please Try Again Later\";\n\t\t\t\t\t\t\t$pushNotificationData['vDeviceid'] = $client_device;\n\t\t\t\t\t\t\t$pushNotificationData['eUserType'] = \"Rider\";\n\t\t\t\t\t\t\t$datapush = $this->pushNotification($pushNotificationData);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif($value_all['eOutstationNotification']=='No'){\n\t\t\t\t\t\tif(($value_all['eBookType']=='Now' && $finalmins>2) || ($value_all['eBookType']=='Later' && $value_all['eBookLaterNotification']=='Yes' && ($finalmins<118 && $finalmins>115))){\n\t\t\t\t\t\t\t// cancel and send notification to customer\n\t\t\t\t\t\t\t$totdelrows = $this->webservices_model->delete_trip_drivers($value_all['iTripId']);\n\t\t\t\t\t\t\t$cancelRes = $this->webservices_model->cancel_trip_by_no_service_available($value_all['iTripId']);\n\t\t\t\t\t\t\t$client_device = $this->webservices_model->get_client_device_details($value_all['iClientId']);\n\t\t\t\t\t\t\t$pushNotificationData['action'] = 'sendNotification';\n\t\t\t\t\t\t\t$pushNotificationData['msg'] = \"No Service Available At This Time, Please Try Again Later\";\n\t\t\t\t\t\t\t$pushNotificationData['vDeviceid'] = $client_device;\n\t\t\t\t\t\t\t$pushNotificationData['eUserType'] = \"Rider\";\n\t\t\t\t\t\t\t$datapush = $this->pushNotification($pushNotificationData);\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\techo 'Finish';exit;\n\t}", "title": "" }, { "docid": "7fbe6abfd08f8f5c4f4e449f6591d3c2", "score": "0.5259154", "text": "abstract function getDbBackup();", "title": "" }, { "docid": "9ae0bcb702501dfca4520a41ee3001dd", "score": "0.52551943", "text": "public function testUpdateBackupConfiguration()\n {\n\n }", "title": "" }, { "docid": "b68e85560d13b12deaf632c4d918ae1e", "score": "0.52548593", "text": "public function run()\n {\n \t\n $tasks = Task::all();\n\n foreach ( $tasks as $task ) {\n\n \tTask::updateSchedule( $task->id );\n\n }\n \n }", "title": "" }, { "docid": "a3640041a40b8dae7bda2d324eb3a330", "score": "0.52366936", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n $schedule->call(function(){\n $query = DB::table('active_comics')->where('updated_at', '<=' , Carbon::now()->subDay());\n// $query = DB::table('active_comics'); // just for test\n foreach($query->get() as $old_comic){\n Image::where('comic_id', $old_comic->id)->delete();\n File::deleteDirectory(gallery_dir.$old_comic->id);\n error_log(\"cancellato \".gallery_dir.\"/$old_comic->id\");\n }\n\n $query->delete();\n error_log(\"old comics deleted\");\n })\n// ->everyMinute(); //just for test\n ->daily();\n\n/*\n $scan = $schedule->job(JobStatus::find(ScannerJob::make()), 'scan');\n if(!ScannerJob::started())\n switch (config('settings.scan_frequency.value')) {\n case 'daily':\n error_log('dealy');\n $scan->daily();\n break;\n case 'weekly':\n error_log('weekly');\n $scan->weekly();\n break;\n case 'monthly':\n error_log('monthly');\n $scan->monthly();\n break;\n }\n/*\n $schedule->job(JobStatus::find(ScannerJob::make()), 'scan')->everyMinute();\n*/\n\n }", "title": "" }, { "docid": "ccff7e94669fe41ab33043a9b5881a7a", "score": "0.523437", "text": "public function backup(): void\n {\n\n // Report all errors\n error_reporting(E_ALL);\n // Set script max execution time\n set_time_limit(900); // 15 minutes\n\n if (php_sapi_name() != \"cli\") {\n echo '<div style=\"font-family: monospace;\">';\n }\n\n $backupDatabase = new Backup(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME, CHARSET);\n $result = $backupDatabase->backupTables(TABLES, BACKUP_DIR) ? 'OK' : 'KO';\n $backupDatabase->obfPrint('Backup result: ' . $result, 1);\n\n // Use $output variable for further processing, for example to send it by email\n $output = $backupDatabase->getOutput();\n\n if (php_sapi_name() != \"cli\") {\n echo '</div>';\n }\n\n }", "title": "" }, { "docid": "30014d25a79b3827e397641c5d94bdda", "score": "0.5233513", "text": "public function testUpdateScheduledPlan()\n {\n }", "title": "" }, { "docid": "f8be87ee6adf5664206a908bae635bdb", "score": "0.5228754", "text": "function run_task()\r\n\t{\r\n\t\t// How old\r\n\t\t$cutoff = time() - ( 60 * 60 * $this->hours );\r\n\t\t\r\n\t\t$this->ipsclass->DB->do_delete( 'downloads_sessions', \"dsess_id < {$cutoff}\" );\r\n\t\t\r\n\t\t$deleted = intval( $this->ipsclass->DB->get_affected_rows() );\r\n\t\t\r\n\t\t//-----------------------------------------\r\n\t\t// Log to log table - modify but dont delete\r\n\t\t//-----------------------------------------\r\n\t\t\r\n\t\t$this->class->append_task_log( $this->task, $deleted . ' uncleared IP.Downloads sessions cleared' );\r\n\t\t\r\n\t\t//-----------------------------------------\r\n\t\t// Unlock Task: DO NOT MODIFY!\r\n\t\t//-----------------------------------------\r\n\t\t\r\n\t\t$this->class->unlock_task( $this->task );\r\n\t}", "title": "" }, { "docid": "a92ce6eaba2f1502d601e0ae5ee5d431", "score": "0.52165395", "text": "function __sincronizar(){\n\t\t$this->config = $this->Setting->getConfig();\n\t\t$syncStatus = Cache::read(\"sync_billboard_status\");\n\n\t\tif($syncStatus['running']){\n\t\t\t$this->out(\"Running\");\n\t\t\treturn false;\n\t\t}\n\t\t$this->syncStatus = $syncStatus;\n\t\t#$this->out(print_r($syncStatus));\n\t\t#$this->hr();\n\t\t#$this->out(date(\"Y-m-d H:i:s\",mktime($this->config['sync_hour'],0,0,date(\"m\"),date(\"d\"),date(\"Y\"))).\" - \".date(\"Y-m-d H:i:s\",strtotime(\"now\")));\n\t\t/*$sync_hour = mktime($this->config['sync_hour'],0,0,date(\"m\"),date(\"d\"),date(\"Y\"));\n\t\tif(($sync_hour <= strtotime(\"now\")) && mktime($this->config['sync_hour'],0,0,date(\"m\"),date(\"d\"),date(\"Y\")) > strtotime($syncStatus['date'])){\n\t\t\treturn true;\n\t\t}*/\n\t\t#$this->out(date(\"Y-m-d H:i:s\",strtotime($syncStatus['date'])).\" - \".date(\"Y-m-d H:i:s\",strtotime(\"-\".$this->config['sync_error_interval'].\" min\")));\n\t\tif(!empty($syncStatus) && $syncStatus['fail'] && strtotime($syncStatus['date']) <= strtotime(\"-\".$this->config['sync_interval'].\" min\")){\n\t\t\treturn true;\n\t\t}\n\n\t\treturn empty($syncStatus);\n\n\t}", "title": "" }, { "docid": "56743c77ebce2c0cb5bd42420162dfe2", "score": "0.5206788", "text": "public function CronJob(){\n\t\t\n\t\t\n\t\t$table = MOVE_TO_CAREHOME . ' as mvtc';\n $match = \"mvtc.status = 1\";\n $fields = array(\"mvtc.*\");\n $data['move_care_home_data'] = $this->common_model->get_records($table, $fields, '', '', $match);\n\t\t/* pr($data['move_care_home_data']);\n\t\tdie; */\n\t\tforeach($data['move_care_home_data'] as $move_data){\n\t\t\t$today_date=explode('-',$move_data['move_date']);\n\t\t\t$final_today_date=$today_date['2'].'/'.$today_date['1'].'/'.$today_date['0'];\n\t\t\t$data = array(\n\t\t\t\t\t'status' => 1,\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\t$where = array('id' => $move_data['id']);\n\t\t\t$this->common_model->update(MOVE_TO_CAREHOME, $data, $where);\n\t\tif (date(\"d/m/Y\") == $final_today_date) {\n\t\t\t\n\t\t\t$match = array(\"yp_id\" =>$move_data['yp_id']);\n $fields = array(\"*\");\n $data['YP_details'] = $this->common_model->get_records(YP_DETAILS, $fields, '', '', $match);\n\t\t\t\n\t\t\t $postdata = array(\n\t\t\t\t\t'yp_id' => ucfirst($data['YP_details'][0]['yp_id']),\n\t\t\t\t\t'yp_fname' => ucfirst($data['YP_details'][0]['yp_fname']),\n\t\t\t\t\t'yp_lname' => ucfirst($data['YP_details'][0]['yp_lname']),\n\t\t\t\t\t'care_home' => $move_data['move_care_home'],\n\t\t\t\t\t'care_home_admission_date' => dateformat($move_data['move_date']), \n\t\t\t\t\t'modified_date' => datetimeformat(),\n\t\t\t\t\t'updated_by' => $this->session->userdata['LOGGED_IN']['ID'],\n\t\t\t\t);\n\t\t\t\t$is_cron=1;\n\t\t\t\t$this->updatedata($postdata,$is_cron);\n\t\t\t\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t\t}\n\t\t\n\t\t\n\t\n\t\t\n\t}", "title": "" }, { "docid": "ecca2b8929fbc02463069dd72ff6fa87", "score": "0.5206303", "text": "function do_cron() {\n global $files_dir;\n ct_log(\"Cron-Job started.\", 2, -1, 'cron');\n\n //delete temporary files (and sessions) older than one day\n $tempDir = $files_dir . '/tmp/';\n foreach (array_slice(scandir($tempDir), 2) as $file) {\n $path = $tempDir . $file;\n if (is_file($path) && filemtime($path) < time() - (3600 * 24)) {\n unlink($path);\n }\n }\n //launch the cronjobs of the individual CT modules\n $modulesSorted = churchcore_getModulesSorted(false, false);\n foreach ($modulesSorted as $key) {\n include_once (constant(strtoupper($key)) . \"/$key.php\");\n if (function_exists($key . \"_cron\") && getConf($key . \"_name\")) {\n call_user_func($key . \"_cron\");\n }\n }\n ct_sendPendingNotifications();\n\n ct_log(\"Cron-Job finished.\", 2, -1, 'cron');\n}", "title": "" }, { "docid": "81b6f01aa054eef70f4ceeca3b150a1b", "score": "0.52055657", "text": "public function cron_cb(){\n\t\t\t\n\t\t\tdo_action( 'nn_cron' );\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "3fe20918ce2ef227f11d0fbad7ebe79c", "score": "0.52046007", "text": "function do_Backup ($lang)\n {\n global $vnT, $func, $DB, $conf;\n $filename = trim($vnT->input['filename']);\n $file = \"../db_backup/data/\" . $filename . \".zip\";\n $archive = new PclZip($file);\n if ($vnT->input['ck_backup_time']) {\n $dirarray = array();\n $tmp = explode(\"/\", $vnT->input['date_start']);\n $time_start = mktime(0, 0, 0, $tmp[1], $tmp[0], $tmp[2]);\n $tmp1 = explode(\"/\", $vnT->input['date_end']);\n $time_end = mktime(0, 0, 0, $tmp1[1], $tmp1[0], $tmp1[2]);\n $dirarray = get_folder_backup(DIR_BACKUP, $time_start, $time_end);\n /*echo \"<pre>\";\n\t\t\tprint_r($dirarray);\n\t\t\techo \"</pre>\";\n\t\t\t*/\n $v_list = $archive->create($dirarray);\n } else {\n $v_list = $archive->create(DIR_BACKUP);\n }\n if ($v_list == 0) {\n die(\"Error : \" . $archive->errorInfo(true));\n }\n $mess = \"Backup file \" . $filename . \".zip Success !!!!\";\n $url = $this->linkUrl;\n $func->html_redirect($url, $mess);\n }", "title": "" }, { "docid": "de59895d2f07afba52f5098f71d5b521", "score": "0.51952976", "text": "static function cron_callback() {\r\n\r\n\t\tself::delete_old_spam();\r\n\t\tself::spam_pending_by_url_pattern();\r\n\t\tself::spam_pending_by_known_ip();\r\n\t\tself::spam_pending_by_ip_pattern();\r\n\t\tself::$options->known_sites = self::get_top_spam_hosts( 10 );\r\n\t}", "title": "" }, { "docid": "adf8df8e7d9e4c8629a300750d16fec4", "score": "0.5191765", "text": "public function dispatch() {\n\t\t$schedules = $this->getPendingSchedules ();\n\t\t$scheduleLifetime = $this->cron_schedule_lifetime * 60;\n\t\t$now = time ();\n\n\t\tforeach ( $schedules as $schedule ) {\n\t\t\t$jobConfig = $this->cron_schedule [$schedule ['job_code']];\n\t\t\tif (! $jobConfig || ! $jobConfig ['run']) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$runConfig = $jobConfig ['run'];\n\t\t\t$time = strtotime ( $schedule ['scheduled_at'] );\n\t\t\t\n\t\t\tif ($time > $now) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\t$errorStatus = self::STATUS_ERROR;\n\t\t\t\t$errorMessage = 'Unknown error.';\n\t\t\t\t\n\t\t\t\tif ($time < $now - $scheduleLifetime) {\n\t\t\t\t\t$errorStatus = self::STATUS_MISSED;\n\t\t\t\t\tthrow new Exception ( 'Too late for the schedule.' );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (! isset ( $runConfig ['filepath'] ) or ! isset ( $runConfig ['filename'] )) {\n\t\t\t\t\tthrow new Exception ( 'No filepath or filename found.' );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$filepath = APPPATH . $runConfig ['filepath'] . '/' . $runConfig ['filename'];\n\t\t\t\t\n\t\t\t\tif (! file_exists ( $filepath )) {\n\t\t\t\t\tthrow new Exception ( 'No cron schedule file found.' );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$class = FALSE;\n\t\t\t\t$function = FALSE;\n\t\t\t\t$params = '';\n\t\t\t\t\n\t\t\t\tif (isset ( $runConfig ['class'] ) and $runConfig ['class'] != '') {\n\t\t\t\t\t$class = $runConfig ['class'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (isset ( $runConfig ['function'] )) {\n\t\t\t\t\t$function = $runConfig ['function'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (isset ( $runConfig ['params'] )) {\n\t\t\t\t\t$params = $runConfig ['params'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($class === FALSE and $function === FALSE) {\n\t\t\t\t\tthrow new Exception ( 'No cron schedule function found.' );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$result = $this->CI->db->where ( 'schedule_id', $schedule ['schedule_id'] )->where ( 'status', self::STATUS_PENDING )->update ( $this->cron_schedule_table_name, array (\n\t\t\t\t\t'status' => self::STATUS_RUNNING \n\t\t\t\t) );\n\t\t\t\t\n\t\t\t\tif (! $result) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->updateSchedule ( $schedule ['schedule_id'], array (\n\t\t\t\t\t'status' => self::STATUS_RUNNING,\n\t\t\t\t\t'executed_at' => strftime ( '%Y-%m-%d %H:%M:%S', time () ) \n\t\t\t\t) );\n\t\t\t\t\n\t\t\t\tif ($class !== FALSE) {\n\t\t\t\t\tif (! class_exists ( $class )) {\n\t\t\t\t\t\trequire ($filepath);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$SCHEDULE = new $class ();\n\t\t\t\t\t$SCHEDULE->$function ( $params );\n\t\t\t\t} else {\n\t\t\t\t\tif (! function_exists ( $function )) {\n\t\t\t\t\t\trequire ($filepath);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$function ( $params );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->updateSchedule ( $schedule ['schedule_id'], array (\n\t\t\t\t\t'status' => self::STATUS_SUCCESS,\n\t\t\t\t\t'finished_at' => strftime ( '%Y-%m-%d %H:%M:%S', time () ) \n\t\t\t\t) );\n\t\t\t} catch ( Exception $e ) {\n\t\t\t\t$this->updateSchedule ( $schedule ['schedule_id'], array (\n\t\t\t\t\t'status' => $errorStatus,\n\t\t\t\t\t'messages' => $e->__toString () \n\t\t\t\t) );\n\t\t\t}\n\t\t}\n\t\t$this->generate ();\n\t\t$this->cleanup ();\n\t}", "title": "" }, { "docid": "4236035545ff2801b58c4f28e3b1c66d", "score": "0.518599", "text": "public function startTableBackup($data) {\n\t}", "title": "" }, { "docid": "bdbdae839a1b8b58b735aac0b37ae3c2", "score": "0.51848066", "text": "public function db_backups()\n {\n $backup = $this->services['backups'];\n $backups = $backup->setBackupPath($this->settings['working_directory'])->getAllBackups($this->settings['storage_details']);\n $backup_meta = $backup->getBackupMeta($backups);\n \n $variables = array(\n 'settings' => $this->settings,\n 'backup_meta' => $backup_meta,\n 'backups' => $backups,\n 'errors' => $this->errors,\n 'view_helper' => $this->view_helper,\n 'url_base' => $this->url_base,\n 'menu_data' => $this->backup_lib->getDashboardViewMenu(),\n 'section' => 'db_backups',\n 'theme_folder_url' => plugin_dir_url(self::name)\n );\n \n $template = 'admin/views/database_backups';\n $this->renderTemplate($template, $variables);\n }", "title": "" }, { "docid": "aac81563085236fc8585ede70a6f01ca", "score": "0.51834524", "text": "public function deletePendingJobs(){\n\t\tMage::getModel('customweb_subscription/schedule')->getResource()->deleteBySubscription($this->getSubscription()->getId());\n\t}", "title": "" }, { "docid": "bcdf3163123fd689f1d42a72a17918c0", "score": "0.51793104", "text": "public function runDailyTasks() {\n\t\t$cronService = $this->getCtx()->getCronService();\t\n\t\t$cronService->runTasks(\"daily\");\n\t}", "title": "" }, { "docid": "09351fb6bc838cec20bbede37ab2078b", "score": "0.5172823", "text": "protected function schedule(Schedule $schedule)\n {\n// $schedule->command('weather:cache')->cron('0 */12 * * *');\n $schedule->command('backup:clean')->daily()->at('01:00');\n $schedule->command('backup:run')->daily()->at('02:00');\n $schedule->command('sitemap:generate')->daily()->at('03:00');\n }", "title": "" }, { "docid": "e1165c818d8649a3ada439d92e8ee148", "score": "0.51668346", "text": "public function backup(array $params)\n {\n }", "title": "" }, { "docid": "65a0eaf5664e9a477f4b11733ed59865", "score": "0.516344", "text": "function edd_pup_delete_cron_schedule(){\n\n\twp_clear_scheduled_hook( 'edd_pup_cron_clear_queue' );\n\n}", "title": "" }, { "docid": "45626ae87f2db27f1ab3ccdc1f3d7b2f", "score": "0.5152338", "text": "public function callback_sitemap_cron_hook() {\n\t\t$sitemap_builder = new Jetpack_Sitemap_Builder();\n\t\t$sitemap_builder->update_sitemap();\n\t}", "title": "" }, { "docid": "17f8b4aea114df830f36242870949394", "score": "0.5151328", "text": "public static function run() {\n\n $now = time();\n $lastRun = Configuration::get('SHOP_MAINTENANCE_LAST_RUN');\n\n if ($now - $lastRun > 86400) {\n // Run daily tasks.\n static::adjustThemeHeaders();\n static::optinShop();\n static::cleanAdminControllerMessages();\n\n Configuration::updateGlobalValue('SHOP_MAINTENANCE_LAST_RUN', $now);\n }\n\n }", "title": "" }, { "docid": "8ab96bda95c3a9d587a0a2d83da43999", "score": "0.5145571", "text": "function mailstream_cron($a, $b) {\n\t// we want to give mailstream_post_remote_hook a fair chance to\n\t// send the email itself before cron jumps in. Only if\n\t// mailstream_post_remote_hook fails for some reason will this get\n\t// used, and in that case it's worth holding off a bit anyway.\n\t$ms_item_ids = q(\"SELECT `mailstream_item`.`message-id`, `mailstream_item`.`uri`, `item`.`id` FROM `mailstream_item` JOIN `item` ON (`mailstream_item`.`uid` = `item`.`uid` AND `mailstream_item`.`uri` = `item`.`uri` AND `mailstream_item`.`contact-id` = `item`.`contact-id`) WHERE `mailstream_item`.`completed` IS NULL AND `mailstream_item`.`created` < DATE_SUB(NOW(), INTERVAL 1 HOUR) AND `item`.`visible` = 1 ORDER BY `mailstream_item`.`created` LIMIT 100\");\n\tLogger::debug('mailstream_cron processing ' . count($ms_item_ids) . ' items');\n\tforeach ($ms_item_ids as $ms_item_id) {\n\t\tif (!$ms_item_id['message-id'] || !strlen($ms_item_id['message-id'])) {\n\t\t\tLogger::info('mailstream_cron: Item ' . $ms_item_id['id'] . ' URI ' . $ms_item_id['uri'] . ' has no message-id');\n\t\t}\n\t\t$item = Item::selectFirst([], ['id' => $ms_item_id['id']]);\n\t\t$users = q(\"SELECT * FROM `user` WHERE `uid` = %d\", intval($item['uid']));\n\t\t$user = $users[0];\n\t\tif ($user && $item) {\n\t\t\tmailstream_send($a, $ms_item_id['message-id'], $item, $user);\n\t\t}\n\t\telse {\n\t\t\tLogger::info('mailstream_cron: Unable to find item ' . $ms_item_id['id']);\n\t\t\tq(\"UPDATE `mailstream_item` SET `completed` = now() WHERE `message-id` = %d\", intval($ms_item['message-id']));\n\t\t}\n\t}\n\tmailstream_tidy();\n}", "title": "" }, { "docid": "a9aaff15bae99ecc62f1afbe53734474", "score": "0.5143005", "text": "protected function collectBackups()\n {\n $listBlobsOptions = new ListBlobsOptions();\n $listBlobsOptions->setPrefix($this->getPrefix($this->path->getPathThatIsNotChanging()));\n $listBlobsOptions->setMaxResults(10);\n\n do {\n $blobList = $this->client->listBlobs($this->containerName, $listBlobsOptions);\n foreach ($blobList->getBlobs() as $blob) {\n if ($this->isFileMatch($blob->getName())) {\n $file = new BlobFile($this->client, $this->containerName, $blob);\n $index = $this->getFileIndex($file);\n $this->files[$index] = $file;\n }\n }\n $listBlobsOptions->setContinuationToken($blobList->getContinuationToken());\n } while ($blobList->getContinuationToken());\n }", "title": "" }, { "docid": "36b690427eef285b7e7d0cc0e5f08dec", "score": "0.5135219", "text": "public function schedule(){\n\t\t\t\n\t\t\tadd_filter( 'cron_schedules', array( $this, 'add_cron_interval' ) );\n\t\t\t\n\t\t\tadd_action( 'nn_cron_check', array( $this, 'cron_cb' ) );\n\t\t\t\n\t\t\tif ( ! wp_next_scheduled( 'nn_cron_check' ) ) {\n\t\t\t\twp_schedule_event( time(), 'five_minutes', 'nn_cron_check' );\n\t\t\t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "71fbd9838ffe97ba4642e799ca29d8bb", "score": "0.5132976", "text": "protected function collectBackups()\n {\n $items = $this->disk->getResource($this->path->getPathThatIsNotChanging());\n foreach ($items->toArray()['items'] as $item) {\n if (($item instanceof Disk\\Resource\\Closed) && $this->isFileMatch($item->getPath())) {\n $file = new File\\YandexDisk($this->disk, $item);\n $index = $this->getFileIndex($file);\n $this->files[$index] = $file;\n }\n }\n }", "title": "" }, { "docid": "c335320790a292c6c66ccc6086a2958a", "score": "0.5129821", "text": "protected function schedule(Schedule $schedule)\n {\n\n // $schedule->command('inspire')\n // ->hourly();\n $schedule->command(\"m3:broadcast\")->everyMinute(); // 4gekkman's\n $schedule->command(\"m5:email_cleartable\")->cron(\"*/15 * * * * *\"); // 4gekkman's\n $schedule->command(\"m5:phone_cleartable\")->cron(\"*/15 * * * * *\"); // 4gekkman's\n $schedule->command(\"m5:delnotverifiedemail\")->hourly(); // 4gekkman's\n $schedule->command(\"m5:delnotverifiedphone\")->hourly(); // 4gekkman's\n $schedule->command(\"m5:auth_clear_expired\")->daily(); // 4gekkman's\n $schedule->command(\"m5:email_authcodes_clear\")->cron(\"*/15 * * * * *\"); // 4gekkman's\n $schedule->command(\"m5:phone_authcodes_clear\")->cron(\"*/15 * * * * *\"); // 4gekkman's\n $schedule->command(\"m11:start\")->cron(\"*/1 * * * * *\"); // 4gekkman's\n $schedule->command(\"m12:update_faq\")->withoutOverlapping()->hourly(); // 4gekkman's\n //$schedule->command(\"m1:run_light\")->cron(\"*/10*****\"); // 4gekkman's\n $schedule->command(\"m14:update_all_bots_goods\")->cron(\"*/15 * * * * *\"); // 4gekkman's\n $schedule->command(\"m14:update_tos_goods\")->cron(\"*/15 * * * * *\"); // 4gekkman's\n $schedule->command(\"m15:reset_statuses\")->cron(\"0 0 * * * *\"); // 4gekkman's\n $schedule->command(\"m15:get_time_until_next_day\")->cron(\"* * * * * *\"); // 4gekkman's\n $schedule->command(\"m9:get_stats_luckyoftheday\")->cron(\"*/5 * * * * *\"); // 4gekkman's\n $schedule->command(\"m9:update_top_cache 1\")->cron(\"*/15 * * * * *\"); // 4gekkman's\n $schedule->command(\"m10:sync_rooms\")->cron(\"*/10 * * * * *\"); // 4gekkman's\n $schedule->command(\"m10:clear_expired_or_extra_messages\")->cron(\"*/10 * * * * *\"); // 4gekkman's\n //$schedule->command(\"m8:update_bots_inventory_count\")->cron(\"*/10*****\"); // 4gekkman's\n //$schedule->command(\"m8:update_bots_authorization_statuses\")->cron(\"*/10*****\"); // 4gekkman's\n //$schedule->command(\"m8:update_bots_apikeys\")->hourly(); // 4gekkman's\n //$schedule->command(\"m8:update_prices_all\")->dailyAt(\"04:00\");$schedule->command(\"m8:update_prices_csgofast\")->dailyAt(\"04:00\"); // 4gekkman's\n \n\n }", "title": "" }, { "docid": "8d1ecad68f851232fc90ca97bac553e0", "score": "0.5125494", "text": "function backup($vid){\n\t\t\n\t\t//MAKE the Request\n\t\t$post['cbackup'] = 1;\n\t\t$res = $this->call('index.php?svs='.$vid.'&act=backup', $post);\n\t\t\n\t\t//DID it finish?\n\t\tif (!empty($res['done'])){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "30d067d020e42e8d237a673a64f1b80b", "score": "0.5120988", "text": "protected function schedule(Schedule $schedule)\n {\n// $schedule->call(function(){\n// DB::table(\"student\")->delete();\n// })->everyMinute();\n $schedule->call(function(){\n $response = $this->getOpenId();\n file_put_contents(\"/wwwroot/month12/laravel/logs/weixin.log\",$response.\"\\n\\r\",FILE_APPEND);\n })->everyMinute();\n\n// $schedule->command(\"echo:time\")->everyMinute();\n// $schedule->exec('curl \"http://wechar.lab993.com/send\"')->everyMinute();\n }", "title": "" }, { "docid": "96cc8e084ce871656c4b9a013a89b2dd", "score": "0.51208276", "text": "public function file_backups()\n {\n $backup = $this->services['backups'];\n $backups = $backup->setBackupPath($this->settings['working_directory'])->getAllBackups($this->settings['storage_details']);\n $backup_meta = $backup->getBackupMeta($backups);\n \n $variables = array(\n 'settings' => $this->settings,\n 'backup_meta' => $backup_meta,\n 'backups' => $backups,\n 'errors' => $this->errors,\n 'view_helper' => $this->view_helper,\n 'url_base' => $this->url_base,\n 'menu_data' => $this->backup_lib->getDashboardViewMenu(),\n 'section' => 'file_backups',\n 'theme_folder_url' => plugin_dir_url(self::name)\n );\n \n $template = 'admin/views/file_backups';\n $this->renderTemplate($template, $variables);\n }", "title": "" } ]
06c3af0c8b9457a26927e5589f6f04bb
Displays a single Checkout model.
[ { "docid": "e1db9d8c78d52b65de8b8c7ea57830a1", "score": "0.0", "text": "public function actionView($id)\n {\n return $this->render('view', [\n 'model' => $this->findModel($id),\n ]);\n }", "title": "" } ]
[ { "docid": "0e3146ebb5fd427f68ab4cdf3a06563c", "score": "0.7103643", "text": "public function checkout()\n {\n return view('web.checkout');\n }", "title": "" }, { "docid": "c8ac955f3a41ca38b8eefaf3aeca05bf", "score": "0.7050291", "text": "public function show(CheckOut $checkout)\n {\n $totalReleases = ViewTotalReleaseItemPerStock::where('check_out_id', $checkout->id)->get();\n $toners = Toner::where('status','1')->pluck('model_name', 'id')->sortByDesc('model_name');\n $delivery_statuses = DeliveryStatus::where('id', '<', '3')->pluck('name', 'id')->sortByDesc('name');\n\n return view('checkouts.show', compact('checkout', 'toners', 'totalReleases', 'delivery_statuses'));\n\n }", "title": "" }, { "docid": "b72b90dc9ec25c76cc99684427ede2b4", "score": "0.6945299", "text": "public function actionIndex()\n {\n $searchModel = new CheckoutSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "6b637330a56a76ab7cc4d6cd2ba8f297", "score": "0.6880813", "text": "public function checkout()\n {\n return view('checkout');\n }", "title": "" }, { "docid": "6556d12c3d8c862db4cb9d3c6f8183db", "score": "0.6863077", "text": "public function checkOut()\n {\n return view('paymob::checkout');\n }", "title": "" }, { "docid": "0b397eda2101f5fa2edbb78400c27f45", "score": "0.68561524", "text": "public function checkout()\n { \n return view('FrontEnd.checkout');\n }", "title": "" }, { "docid": "c1522c98acb76f300a1a77b1f01afef7", "score": "0.67825216", "text": "public function index()\n {\n return view('web.checkout');\n }", "title": "" }, { "docid": "3c445356a28433c440df32563f72fcc3", "score": "0.6779811", "text": "public function checkout(){\n return view('checkout');\n }", "title": "" }, { "docid": "4ab11b06da025bd6f97790e3adec24de", "score": "0.6766372", "text": "public function actionView()\n {\n\n $secret_key = Yii::app()->request->getParam('secret_key');\n $model = Order::model()\n //->cache($this->cacheTime)\n ->find('secret_key=:key', array(':key' => $secret_key));\n\n if (!$model)\n $this->error404(Yii::t('CartModule.default', 'ERROR_ORDER_NO_FIND'));\n\n\n $this->pageName = Yii::t('CartModule.default', 'VIEW_ORDER', array('{id}' => $model->id));\n $this->pageTitle = $this->pageName;\n $this->breadcrumbs = array(\n Yii::t('ShopModule.default', 'BC_SHOP') => array('/shop'),\n // Yii::t('CartModule.default', 'MODULE_NAME') => array('/cart'),\n $this->pageName);\n\n\n $this->render('view', array(\n 'model' => $model,\n ));\n }", "title": "" }, { "docid": "b4cfe164948bb44f7b0740cc60884a69", "score": "0.674721", "text": "public function index()\n {\n return View('checkout');\n }", "title": "" }, { "docid": "a2e03888aa151b0d7dfcbc1aabd429fe", "score": "0.67137223", "text": "public function show($id)\n {\n $model = Checkin::find($id);\n return view('backend.checkin.detail',['model'=>$model]);\n }", "title": "" }, { "docid": "05464d6f619f6c1f623a915321516be2", "score": "0.65757143", "text": "public function checkout(){\n\n $carts = $this->cartService->get();\n return view('cart::checkout.view', compact('carts'));\n }", "title": "" }, { "docid": "3ec31d13f0b93803f90182bf366818a0", "score": "0.65232885", "text": "public function show($id)\n {\n // not implemented. I don't see needs to create this option.\n //echo 'Not implemented :\\'(';\n return view('checkout');\n }", "title": "" }, { "docid": "f534c89c116e18db112b2538fcd4993e", "score": "0.6516552", "text": "public function checkout(){\n\n $this->load->view('checkout');\n }", "title": "" }, { "docid": "623428b7856ca241609ab999f424d323", "score": "0.6483311", "text": "public function checkout()\n {\n $products = Product::all();\n $categories = Category::all();\n return view('checkout.checkout', compact('categories', 'products'));\n }", "title": "" }, { "docid": "a2275f28e138eb54bcb5825df6054787", "score": "0.6412296", "text": "public function checkoutss(){\n return view('account.pages.checkoutss');\n }", "title": "" }, { "docid": "8021dbdfa427b3634b70438cb845ae3a", "score": "0.638726", "text": "public function index()\n {\n $cart = Cart::content();\n return view('user.cart.checkout', compact('cart'));\n }", "title": "" }, { "docid": "a36caeb85eb47672d3ca0ccca8be551f", "score": "0.63804525", "text": "public function index()\n {\n return view('checkout.index');\n }", "title": "" }, { "docid": "f12ef33b8415901b86160354aebe4933", "score": "0.63441634", "text": "public function show()\n {\n $data = Order_details::all();\n return view('payment', ['items'=>$data]);\n }", "title": "" }, { "docid": "158e1ef127a89b832c966ee29b3da8f1", "score": "0.62677604", "text": "public function showTransaction(Checkout $checkout)\n {\n $this->authorize('store', $checkout);\n\n return view('checkouts.show', compact('checkout'));\n }", "title": "" }, { "docid": "f12763a9098c95912dff0267d3e7e918", "score": "0.62676454", "text": "public function index() {\n $cartItems = \\Cart::getcontent(); \n return view('pages.checkout', compact('cartItems'));\n }", "title": "" }, { "docid": "b58e82646a179211aab85624b3caea52", "score": "0.62604195", "text": "public function actionView()\n\t{\n\t\t$secret_key = Yii::app()->request->getParam('secret_key');\n\t\t$model = Order::model()->find('secret_key=:secret_key', array(':secret_key'=>$secret_key));\n\n\t\tif(!$model)\n\t\t\tthrow new CHttpException(404, Yii::t('OrdersModule.core', 'Ошибка. Заказ не найден.'));\n\n\t\t$this->render('view', array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "37f0dd6d0a564c29e9785cc9100a57bb", "score": "0.62532663", "text": "public function checkout()\n {\n //check ember\n if ( !Session::has('member_id') ) return Redirect( url('member/login?next='.urlencode( url('keranjang/proses') )) );\n\n $this->dataView['title'] = 'Checkout | '.config('app.title');\n\n $this->dataView['cart'] = $this->_getRowItem();\n\n if ( !val($this->dataView['cart'], 'data') ) return Redirect(url('keranjang'));\n\n return view($this->tmpl . 'checkout', $this->dataView);\n }", "title": "" }, { "docid": "d5aeae16d8c79e928db0466a4821cad4", "score": "0.6249787", "text": "public function actionView()\n {\n $model = $this->loadModel();\n $this->render('view', array(\n 'model' => $model,\n ));\n }", "title": "" }, { "docid": "6e7e4cb644be4b2d0d8a2a991a2f37af", "score": "0.62258285", "text": "public function actionView()\r\n {\r\n $model = $this->loadModel();\r\n $this->render('view', array(\r\n 'model' => $model,\r\n ));\r\n }", "title": "" }, { "docid": "b82c562ecb181d89eeeec271cb72be14", "score": "0.62247264", "text": "public function create()\n {\n return view('checkout');\n }", "title": "" }, { "docid": "b16b457b261fd80cbc1d366cf591676c", "score": "0.6216768", "text": "public function index()\n {\n $model = Checkin::where('status','0')->orderBy('tgl','desc')->get();\n return view('backend.checkin.manage',[\n 'model'=>$model\n ]);\n }", "title": "" }, { "docid": "9ae5a09673076a324294228b984f5624", "score": "0.62162775", "text": "public function create()\n {\n return view('checkout');\n\n }", "title": "" }, { "docid": "ac825dc8ad329dbfa7493730fd6f777a", "score": "0.6180053", "text": "public function actionView()\n\t{\n\t\t$model = $this->loadModel();\n\t\t$this->render('view',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "ac825dc8ad329dbfa7493730fd6f777a", "score": "0.6180053", "text": "public function actionView()\n\t{\n\t\t$model = $this->loadModel();\n\t\t$this->render('view',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "d7b606753a5b8267762ec99d51011aa8", "score": "0.616519", "text": "public function actionCreate()\n {\n $model = new Checkout();\n $value = CartSearch::find()->select(['c.id as cId', 'c.userId as cUserId', 'c.productId as cProductId', 'p.*'])->from(['cart as c'])->where(['c.userId' => Yii::$app->user->id])->join('LEFT JOIN', 'products as p', 'p.id = c.productId')->asArray()->all();\n $total = 0;\n foreach ($value as $item) {\n $total += floatval($item['price']);\n }\n $model->userId = Yii::$app->user->id;\n $model->value = $total * Currency::getCurrency();\n if ($model->save()) {\n CartSearch::deleteAll(['userId' => Yii::$app->user->id]);\n $user = Users::findOne(['id' => Yii::$app->user->id]);\n Yii::$app->mailer->compose()\n ->setFrom('[email protected]')\n ->setTo($user->username)\n ->setSubject('Billing information')\n ->setTextBody(\"Thanks for buying with us, the total price is {$total}.\")\n ->setHtmlBody(\"<b>Thanks for buying with us, the total price is {$total}, you can pay with credit card. Thanks again, INBOX Team.</b>\")\n ->send();\n return $this->redirect(['view', 'id' => $model->id]);\n }\n return $this->redirect(Yii::$app->request->referrer);\n }", "title": "" }, { "docid": "6e29db36a090cd753212beaa99fa9671", "score": "0.6154212", "text": "public function checkout_bill_summary()\n\t{\n\t\t$this->load->view('web/checkout_bill_summary');\n\t}", "title": "" }, { "docid": "eadfdafb8cd26321dea180745d47059a", "score": "0.6152681", "text": "public function stripe()\n\t{\n\t return view('pages.checkout.show');\n\t}", "title": "" }, { "docid": "8dba13cc8ffd4959df8df1c8d6e844e7", "score": "0.61312896", "text": "public function index()\n {\n $carts = Cart::with('product')->get();\n return view('pages.checkout.index')->with('carts', $carts);\n }", "title": "" }, { "docid": "d45a1e8bf44ce3ac20ddb7e6e68d7967", "score": "0.6126738", "text": "public function actionViewout($id)\n\t{\n\t\t$this->render('viewout',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t\t));\n\t}", "title": "" }, { "docid": "e9dfb644f2b60ea896e19c9b9e05ea1e", "score": "0.61250657", "text": "public function actionView() {\n if( !$this->getModel() )\n return $this->redirect( 'index' );\n\n return $this->render('view', [\n 'model' => $this->getModel()\n ]);\n }", "title": "" }, { "docid": "989ee34f95fbf05a6c7b70a93481aea8", "score": "0.6124205", "text": "public function index()\n {\n $data = Check::where('users_id', session('user')->id)->get();\n \n return view('home.checkout.index', ['title'=>'申请退换货','data'=>$data]);\n\n }", "title": "" }, { "docid": "dd0da3c662334d453885df363291517e", "score": "0.6123964", "text": "public function index()\n\t\t{\n\t\t\tSesion::cekBelum();\n\n\t\t\tif($_SESSION['lev_name'] != 'Administrator')\n\t\t\t{\n\t\t\t\tredirect(base_url);\t\t\t\n\t\t\t}\n\n\t\t\t// Payment Method data\n\t\t\t$order = new Checkout;\n\t\t\t$data = $order->select('*')\n\t\t\t->leftJoin('user', 'user.user_id', 'checkout.check_user_id')\n\t\t\t->where('check_status_value','Sent')\n\t\t\t->get();\n\n\t\t\t// Load view\n\t\t\tview('admin/main-page', [\n\t\t\t\t'page' => 'sales/order-list',\n\t\t\t\t'title' => 'Orders',\n\t\t\t\t'records' => $data,\n\t\t\t\t'plugin' => 'datatables',\n\t\t\t\t'navigation' => ['Sales'],\n\t\t\t\t'breadcrumb_1' => 'Dashboard',\n\t\t\t\t'breadcrumb_2' => 'Sales',\n\t\t\t\t'breadcrumb_3' => 'Orders',\n\t\t\t\t'breadcrumb_1_url' => base_url . 'admin/dashboard',\n\t\t\t\t'breadcrumb_2_url' => '#',\n\t\t\t\t'breadcrumb_3_url' => '#',\n\t\t\t]);\n\t\t}", "title": "" }, { "docid": "a8ff397a619732ced17260d92f76a604", "score": "0.61022407", "text": "public function actionView() {\n $this->render('view', array(\n 'model' => $this->loadModel(),\n ));\n }", "title": "" }, { "docid": "f489a81d359fe9a7f3e20d005652ee42", "score": "0.61003953", "text": "public function index()\n {\n //\n $coins = CoinPackage::all();\n\n return view('admin.coinpackage.index' , compact('coins'));\n }", "title": "" }, { "docid": "fffe0d9ec66df5be6b84dd9a25d82761", "score": "0.6097016", "text": "public function index()\n {\n $checkoutpolicys = CheckOutPolicy::all();\n return view('admin.checkoutpolicy.checkoutpolicy',compact('checkoutpolicys'));\n }", "title": "" }, { "docid": "53090c3bdd6e02fba5f0648dffce808b", "score": "0.60914874", "text": "public function show($id)\n {\n //\n $orderNumber = Order::find($id);\n return view('payment',compact('orderNumber')); \n }", "title": "" }, { "docid": "46e9c411cb99e7703aee26c318a04e81", "score": "0.60750186", "text": "public function main() \n { \n\t\treturn view('mensk.bank')->with('cost', $this->cost);\n }", "title": "" }, { "docid": "fa3549cd7b4d7e0e8c0fbb1d3c651554", "score": "0.6073651", "text": "public function index()\n {\n $page_title = 'Check-out';\n $locations = Location::where('status','1')->orderBy('name')->pluck('name', 'id');\n $suppliers = Supplier::where('status','1')->orderBy('name')->pluck('name', 'id');\n\n // $delivery_statuses = DeliveryStatus::pluck('name', 'id')->sortByDesc('name');\n $checkouts = CheckOut::orderBy('created_at','DESC')->orderBy('updated_at','DESC')->limit(100)->paginate(50);\n return view('checkouts.index', compact('page_title', 'locations', 'checkouts', 'suppliers'));\n }", "title": "" }, { "docid": "11b3221733a5cc7460908052db93a35f", "score": "0.60718477", "text": "public function index()\r\n {\r\n $totalInCart = $this->getGrandTotalInCart();\r\n $virtual = $this->checkVirtualProducts(session('cart'));\r\n\r\n if (! isset(Auth::user()->id)) {\r\n return view('checkout', compact(self::viewShareVarsGuestCheckout));\r\n } else {\r\n $addresses = $this->UserAddressesRepository->getAddressesByUserId(Auth::user()->id);\r\n return view('checkout', compact(self::viewShareVarsCheckout));\r\n }\r\n }", "title": "" }, { "docid": "7cfa724185c8e73b4e20268f769b7c1d", "score": "0.606748", "text": "public function indexAction()\n\t{\n\t\t$params = $this->get( 'aimeos_page' )->getSections( 'checkout-index' );\n\t\treturn $this->render( 'AimeosShopBundle:Checkout:index.html.twig', $params );\n\t}", "title": "" }, { "docid": "d6c7258d9b8da48cd175aab07e9f41ee", "score": "0.6046908", "text": "public function index()\n {\n if (auth()->user() && request()->is('guestCheckout')) {\n return redirect()->route('checkout.index');\n }\n\n return view('checkout');\n }", "title": "" }, { "docid": "b2e219aa231e11458a41810b18cec2a1", "score": "0.6022903", "text": "public function index()\r\n {\r\n $data['purchases'] = $this->purchase_dao->retrieveAll();\r\n View::render('admin/purchases', $data);\r\n }", "title": "" }, { "docid": "1b6ff9d35dae5212b5aa4b66861e07fe", "score": "0.6000099", "text": "public function show(Checkout $checkout)\n {\n $this->authorize('view', $checkout);\n\n return view('checkouts.show', compact('checkout'));\n }", "title": "" }, { "docid": "2937abff4a3ec18a41100fb6837962ef", "score": "0.59881186", "text": "public function checkout()\n {\n $cart = Cart::getContent()->toArray();\n sort($cart);\n $data['title'] = \"Shop Checkout\";\n $data['cart'] = $cart;\n // dd($cart);\n return view('content.checkout' , $data);\n }", "title": "" }, { "docid": "b7e3aa011243e25f311eb96da70c0126", "score": "0.59809977", "text": "public function show($id)\n {\n $stock_out = StockOut::find($id);\n return view('stock_outs.show')->with('stock_out', $stock_out);\n }", "title": "" }, { "docid": "8c1476530bcaf421c6e7c9662a785623", "score": "0.5977903", "text": "public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}", "title": "" }, { "docid": "8c1476530bcaf421c6e7c9662a785623", "score": "0.5977903", "text": "public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}", "title": "" }, { "docid": "27bc1707afd6c31076766d86d35de76d", "score": "0.5971045", "text": "public function actionView()\r\n {\r\n\t $model = $this->loadModel();\r\n\t $this->render($this->actionViewTemplate,array(\r\n 'model'=> $model,\r\n ));\r\n }", "title": "" }, { "docid": "2a5645139fed2902dfd630ed3471f4a9", "score": "0.59662074", "text": "public function show()\n {\n $carts = null;\n $user_id = auth() -> user()->id;\n $user = User::find($user_id);\n if ($user) {\n $carts = Cart::where('user_id', $user_id)->get();\n }\n return view('orders.cart')->with('carts', $carts);\n }", "title": "" }, { "docid": "020a192f38b713a08d10bbb2ed48cd6a", "score": "0.5965114", "text": "public function index()\n {\n $user = Auth::user();\n $currencies = Currency::all();\n $paymentPlatforms = PaymentPlatform::all();\n $addresses = Address::with(['user'])->get();\n if (!Session::has('cart')) {\n return redirect('index');\n } else {\n $currentCart = Session::has('cart') ? Session::get('cart') : null;\n $cart = new Cart($currentCart);\n $cart = $cart->products;\n return view('checkout', compact('addresses', 'cart', 'currencies', 'paymentPlatforms', 'user'));\n }\n }", "title": "" }, { "docid": "8438364cf8c796848d7d773cb90fd392", "score": "0.5962826", "text": "public function actionView() {\n $id = isset($_GET['id']) ? (int)($_GET['id']) : 0;\n $model_name = \"Game\";\n $model = GxcHelpers::loadDetailModel($model_name, $id);\n $this->render('view', array(\n \"model\" => $model\n ));\n }", "title": "" }, { "docid": "030d7d5794b8681cce7e7c1c625c5020", "score": "0.5961917", "text": "public function show($id)\n {\n try {\n $order = Order::where('id',$id)->where('user_id', Auth::id())->first();\n $orderProduct = OrderProduct::whereNotNull('po_id')\n ->where('po_id',$id)\n ->where('user_id', Auth::id())\n ->latest()->get();\n return view('checkout-detail', compact('orderProduct','order'));\n } catch (Exception $ex) {\n return $ex->getMessage();\n }\n }", "title": "" }, { "docid": "381a73fbf65a197669c56936cbfa624a", "score": "0.59592885", "text": "public function index()\n {\n /** @var User $user */\n $user = \\Sentinel::check();\n\n $cart = $user->cart;\n\n if ($cart->count() == 0) {\n \\Toastr::warning(\"U heeft geen producten in de winkelwagen liggen\");\n \n return \\Redirect::action('CartController@index');\n }\n\n $business = $user->business;\n $shipping = $business->shipping;\n $billing = $business->billing;\n\n $total = $cart->map(function($item, $key){\n return $item->price * $item->pivot->amount;\n })->sum();\n\n $tax = $cart->map(function($item, $key){\n return $item->tax->value * $item->price * $item->pivot->amount / 100;\n })->sum();\n\n return view('checkout', compact('cart', 'total', 'tax', 'business', 'shipping', 'billing'));\n }", "title": "" }, { "docid": "7534fb372fa28bb9561464583a84cede", "score": "0.5935102", "text": "public function show($id)\n {\n $cashOut = CashOut::findOrFail($id);\n $title = $cashOut->voucher.' | Zam Zam';\n //dd($cashOut->cheque_date);\n return view('cashOut.show',compact('title','cashOut'));\n }", "title": "" }, { "docid": "ef7ad337878fda879d07dec59fd8bebf", "score": "0.5931446", "text": "public function checkout()\n {\n // $show = false;\n // if (!empty($pesanan)) {\n // if ($pesanan->status == 0) {\n // $show = true;\n // $pesanan_detail = PesananDetail::where('pesanan_id', $pesanan->id)->where('status', 0)->get();\n // dd($pesanan_detail);\n // } else {\n // $pesanan_detail = null;\n // }\n // }\n\n $pesanan = Pesanan::where('user_id', Auth::user()->id)->where('status', 0)->first();\n if (!empty($pesanan)) {\n $pesanan_detail = PesananDetail::where('pesanan_id', $pesanan->id)->get();\n } elseif ($pesanan == null) {\n $pesanan_detail = null;\n }\n\n return view('pesan.checkout', compact('pesanan', 'pesanan_detail'));\n }", "title": "" }, { "docid": "89142a57bca3cc54738e1e65a4f9a0b3", "score": "0.5928628", "text": "public function getCheckout()\n {\n return Checkout::create();\n }", "title": "" }, { "docid": "96129b6492f4cd0b71c575388b13e3a3", "score": "0.5926037", "text": "public function show($id)\n {\n $driversPayout = $this->driversPayoutRepository->findWithoutFail($id);\n\n if (empty($driversPayout)) {\n Flash::error('Drivers Payout not found');\n\n return redirect(route('driversPayouts.index'));\n }\n\n return view('drivers_payouts.show')->with('driversPayout', $driversPayout);\n }", "title": "" }, { "docid": "55785831f1ecaadd426802e79623e8c2", "score": "0.59215", "text": "public function show() {\n if ( ! session('order')) {\n return redirect('/');\n }\n\n $order = Order::find(session()->get('order'));\n\n return view('orders.order_finish')->with('order', $order);\n }", "title": "" }, { "docid": "08022a0ab7f301516cb5df965186bec2", "score": "0.59198886", "text": "public function checkout() {\n $checkout = view('client.pages.checkout');\n $menu_vertical = view('client.pages.menu_vertical');\n $menu_main = view('client.pages.menu_main');\n\n return view('client.client_master')\n ->with('client_content', $checkout)\n ->with('menu_vertical', $menu_vertical)\n ->with('menu_main', $menu_main);\n }", "title": "" }, { "docid": "2638906f58536da1ffca23be0c3b2051", "score": "0.59175354", "text": "public function create()\n {\n $title = 'Cash Out';\n $repository = $this->repository;\n return view('cashOut.create',compact('title','repository'));\n }", "title": "" }, { "docid": "8b2c4ebfc4673684d9051ea16c1bb685", "score": "0.5913855", "text": "public function actionView($id)\n {\n $taxOrgInfo = new TaxOrgInfo();\n $taxPayerInfo = new TaxPayerInfo(); \n $bccArrearsInfo = new BccArrearsInfo();\n \n \n return $this->render('view', [\n 'financeInfoModel' => $this->findModel($id), \n 'taxOrgInfoModel' => $taxOrgInfo,\n 'taxPayerInfoModel' => $taxPayerInfo,\n 'bccArrearsInfoModel' => $bccArrearsInfo,\n ]);\n }", "title": "" }, { "docid": "01c37226fd2e2f5958001fb1568e008b", "score": "0.5909536", "text": "public function checkout()\n {\n $provinsis = Provinsi::orderBy('created_at', 'DESC')->get();\n $carts = $this->getCarts(); //MENGAMBIL DATA CART\n //MENGHITUNG SUBTOTAL DARI KERANJANG BELANJA (CART)\n $subtotal = collect($carts)->sum(function($q) {\n return $q['qty'] * $q['produk_harga'];\n });\n //ME-LOAD VIEW CHECKOUT.BLADE.PHP DAN PASSING DATA PROVINsiS, CARTS DAN SUBTOTAL\n return view('ecommerce.checkout', compact('provinsis', 'carts', 'subtotal'));\n }", "title": "" }, { "docid": "c215993f0fca292bf1fca77d8a3d4101", "score": "0.58961475", "text": "public function index()\n {\n $checkins = Checkin::all();\n return view('dashboard.checkins.index', compact('checkins'));\n }", "title": "" }, { "docid": "9e294aab32bea9779c53c3fe4ac7ef62", "score": "0.589492", "text": "public function actionView($id)\n {\n $query = OrderCompany::find();\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n return $this->render('view', [\n 'model' => $this->findModel($id),\n 'dataProvider' => $dataProvider\n ]);\n }", "title": "" }, { "docid": "08e2d0bf250645b178ac6731e00eded5", "score": "0.5891935", "text": "public function index()\n\t{\n\t\treturn view('purchases.index');\n\t}", "title": "" }, { "docid": "4e4b8feefcf1d8b6072bb8f527a0b570", "score": "0.5871372", "text": "public function actionView()\n {\n $session = Yii::$app->session;\n $session->open();\n $order = new Order();\n\n if ($order->load(Yii::$app->request->post())) {\n $order->quantity = $session['cart.qtyTotal'];\n $order->amount = $session['cart.amount'];\n if ($order->save()) {\n OrderItems::saveOrderItems($session['cart'], $order->order_id);\n Yii::$app->session->setFlash('success', 'Ваше замовлення прийнято. \n Менеджер зв`яжеться із Вами найближчим часом.');\n return $this->redirect(['/cart/pay']);\n } else {\n Yii::$app->session->setFlash('error', 'Помилка оформлення замовлення.\n Спробуйте ще раз або напишіть менеджеру через форму зворотнього зв`язку.');\n }\n }\n\n return $this->render('view', compact('session', 'order'));\n }", "title": "" }, { "docid": "8046cfa10233a2cce769edf131912c10", "score": "0.5858351", "text": "public function actionView($id)\r\n\t{\r\n\t\tif(NULL == $this->loadModel($id)->paytime)\r\n\t\t\t$this->redirect(array('pay','id'=>$id));\r\n\t\t\r\n\t\t$this->layout='//layouts/column1';\r\n\t\t\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "dd9fdebc3f6479bd66305e14bf11ef30", "score": "0.5853932", "text": "public function actionView($id)\n\t{\n\t\t\n\t\t\n\t\t$model = Issuance::model()->findByPk($id);\n\t\t\n\t\t$this->render('view',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "c456c376b0463b5e573588858ebcc387", "score": "0.5852177", "text": "public function actionView($id) {\n// AccCoa::model()->checkAccess();\n\n cs()->registerCss('', '@page { size:22cm 14cm;margin: 0.4cm;}');\n\n $cashOutDetail = AccCashOutDet::model()->findAll(array(\n 'condition' => 'acc_cash_out_id= ' . $id,\n 'order' => 'id ASC'\n ));\n $approveDetail = AccApproval::model()->findAll(array(\n 'condition' => 'acc_cash_out_id= ' . $id,\n 'order' => 'id DESC'\n ));\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n 'cashOutDet' => $cashOutDetail,\n 'approveDetail' => $approveDetail,\n ));\n }", "title": "" }, { "docid": "66f1b34be0e97f2a5877b45e12967839", "score": "0.5848024", "text": "public function viewAction()\n {\n \t// Get incident id from url.\n \t$id = $this->_request->getParam('id');\n \t\n \t// Fetch incident \n $mapper = new Application_Model_IncidentMapper();\n $this->view->model = $mapper->find($id);\n }", "title": "" }, { "docid": "5722f74c68856ae04b84daf23959f341", "score": "0.5844418", "text": "public function showModel()\n {\n $CarRepository = new CarRepository();\n \n /**\n * Hier wird wieder geschaut ob \"$__GET['model]\" leer ist oder nicht falls nicht wird der Wert in die Variable \"$model\" geschrieben.\n */\n \n if (isset($_GET['model'])) {\n $model = htmlspecialchars($_GET['model']);\n } else {\n $model = \"index\";\n }\n \n $view = new View(\"carmodel\");\n $view->title = htmlspecialchars($_GET['model']) . \"- Carsell\";\n $view->heading = '';\n $view->image = htmlspecialchars($_GET['model']);\n $view->autos = $CarRepository->showByModel(htmlspecialchars($_GET['model']));\n $view->display();\n }", "title": "" }, { "docid": "4d08bdf8d40528e1643e0783d0c21716", "score": "0.58387524", "text": "public function index()\n {\n $total = 0;\n $driver_id = Auth::user()->driver->id;\n $carts = Cart::all()->where('driver_id',$driver_id);\n for ($i =0; $i < count($carts); $i++) {\n $item = Item::find($carts[$i]->item_id);\n $total += $item->price;\n }\n return view('checkout', compact('total', $total));\n }", "title": "" }, { "docid": "271630d2746e7b0186ea0542a798293a", "score": "0.58333623", "text": "public function show()\n {\n if(!\\Session::get('customer')) {\n return view('template.login');\n } else {\n $id_cust = \\Session::get('customer.0')['id_cust'];\n $transaksi = \\App\\transaksi::where('id_cust', $id_cust)->where('status', 'pending')->get();\n //liat dah ada transaksi aktif ato belom\n if ($transaksi->count() == 0) {\n $id_trans = \\DB::table('transaksis')->select('id_trans')->where('id_cust', $id_cust)->where('status', 'pending')->first();\n } else {\n $id_trans = \\DB::table('transaksis')->select('id_trans')->where('id_cust', $id_cust)->where('status', 'pending')->first()->id_trans;\n }\n $carts = \\DB::table('transaksi_details')\n ->join('produks', 'transaksi_details.id_produk', '=', 'produks.id_produk')->select('produks.*', 'transaksi_details.*')->where('id_trans', $id_trans)->get();\n \n return view('template.checkout', ['carts' => $carts]);\n }\n }", "title": "" }, { "docid": "6bc338c95038dfbbb291e2bf7e646118", "score": "0.5827709", "text": "public function details() {\n $model = new TicketingModel();\n\n $model->loadData($this->request->all());\n\n $model = $model->readOne($model);\n\n echo $this->view(\"ticketDetails\", \"main\", $model);\n }", "title": "" }, { "docid": "6a0230a2b94310f5e8d92b7ee0b36a60", "score": "0.5823423", "text": "public function index()\n {\n $Coupon = Coupon::latest()->get();\n return view('backend.admin.coupon.index', compact('Coupon'));\n }", "title": "" }, { "docid": "74073be0858c5feb97916b9d9d4c6705", "score": "0.5810428", "text": "public function actionShow()\n {\n $cartItems = $this->cartModel->getCartItemsWithTitle();\n $totalQuantity = $this->cartModel->getTotalQuantity();\n $totalCost = $this->cartModel->getTotalCost();\n return $this->render('show', [\n 'cartItems' => $cartItems, \n 'totalCost' => $totalCost, \n 'totalQuantity' => $totalQuantity\n ]);\n }", "title": "" }, { "docid": "93c5503ffdc695f9b585683bdc1d40aa", "score": "0.5793667", "text": "public function index()\n {\n if (!Session::has('deliveryinfo')) {\n return redirect()->route('checkout.create')->with('alert', 'Provide delivery information before proceeding!');\n }\n $cartItems = \\Cart::getContent();\n $deliverydetails = Shipping::find(Session::get('deliveryinfo'));\n return view('checkout.index', compact('cartItems', 'deliverydetails'));\n }", "title": "" }, { "docid": "3f413f211067da46dc2e7394c52de480", "score": "0.57925254", "text": "public function show($id)\n {\n $data['transaction'] = $this->model::search(['id' => $id, 'sales_ownership' => true])->firstOrFail();\n return view('transactions::backend/transactions/sales/show', $data);\n }", "title": "" }, { "docid": "21dc12fa7b089c5e222644d5901f33d0", "score": "0.5789382", "text": "public function show(Buypackage $buypackage)\n {\n //\n }", "title": "" }, { "docid": "371f03fba2baf420690b4ea056a6f6af", "score": "0.5776272", "text": "public function show(Cash $cash)\n {\n //\n }", "title": "" }, { "docid": "c6564ffbeb06482b4fde157c2c3e7693", "score": "0.5776089", "text": "public function actionIndex()\n {\n $checkins = Checkin::find()->where(['user_id' => \\Yii::$app->user->id])->all();\n\n return $this->render('index', [\n 'checkins' => $checkins,\n 'chackedin'=>$this->isCheckined()\n ]);\n }", "title": "" }, { "docid": "1331ebdd2ecf323a432028d002c4de2b", "score": "0.5771068", "text": "public function show()\n {\n $workday_id = Cache::get(Workday::WORKDAY_ID_KEY);\n $workday = false;\n\n if($workday_id) {\n $workday = Workday::with('orders')->find($workday_id);\n }\n\n return view('cash.manager.index', [\n 'workday' => $workday\n ]);\n }", "title": "" }, { "docid": "b2b6981dce5d29557bbc2597ed0eb3fa", "score": "0.5770808", "text": "public function actionView($id)\n\t{\n\t\t$nav = \"Discount Voucher >> View\";\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),'nav'=>$nav,\n\t\t));\n\t}", "title": "" }, { "docid": "f73716a8d94abe0fac3ebb221a5a06fc", "score": "0.5766275", "text": "public function show()\n {\n\n $data['cart'] = $this->cart->contents();\n\n\n\n $this->load->template('cart/cart',$data);\n }", "title": "" }, { "docid": "ec0294a72a665f5e78a67a95e9a10042", "score": "0.5765354", "text": "public function actionView($id)\n {\n return $this->render('view', [\n 'order' => $this->getModel($id),\n ]);\n }", "title": "" }, { "docid": "dc5deeb181d70a33c1b00519ed836855", "score": "0.57653236", "text": "public function index(){\n\t\t$order_id = $this->o->add();\n\t\t$this->session->set_userdata('oid', $order_id);\n\t\t$this->o->updatePaymentMode($this->session->userdata('oid'),'Credit Card');\n\t\t$this->outputData['delivery_cust'] = $this->s->getByUserId($this->session->userdata('uid'));\n\t\t$this->outputData['billing_cust'] = $this->b->getByUserId($this->session->userdata('uid'));\n\t\t$this->load->view('payment_check', $this->outputData);\n\t}", "title": "" }, { "docid": "e97d017c8fb80d977db08739f6d43b82", "score": "0.57611066", "text": "public function show()\n {\n\n $userID = Auth::id(); // the user ID to bind the cart contents\n $products = \\Cart::session($userID)->getContent();\n $subTotal = \\Cart::session($userID)->getSubTotal();\n $total = \\Cart::session($userID)->getTotal();\n $condition = \\Cart::session($userID)->getCondition('Delivery');\n return view('cart')->with(['products'=>$products, 'subTotal' => $subTotal , 'total'=> $total, 'condition'=>$condition]);\n }", "title": "" }, { "docid": "9415d586eaaa560744b32106cfee2b63", "score": "0.5758207", "text": "public function show(CheckIn $checkIn)\n {\n $this->authorize('view', $checkIn);\n return view('checkIn.show', compact('checkIn'));\n }", "title": "" }, { "docid": "4b839e3f7bd93b8c22eabf3edc815f4a", "score": "0.5749797", "text": "public function checkoutShow()\n {\n $cart = $this->setCart();\n $data['cartTotal'] = $cart['grandTotal'];\n $data['payments'] = $this->payment->find(session()->get('payment'));\n $data['shippings'] = $this->shipping->find(session()->get('delivery'));\n $data['customer'] = session()->all();\n $data['vat_total'] = $this->vat();\n $data['finalTotal'] = $cart['grandTotal'] + $data['shippings']->rate + $data['vat_total'];\n return $data;\n }", "title": "" }, { "docid": "323037c88aa6d2eefe2ecffdcea0ba89", "score": "0.57446986", "text": "public function create()\n {\n $About= About::all();\n $Cart= Cart::all();\n return view('checkout',compact('About','Cart'));\n }", "title": "" }, { "docid": "4b910b9dc88dcc73e80d7ee46c74c692", "score": "0.57435167", "text": "public function __invoke(): View\n {\n return view('checkouts.success');\n }", "title": "" }, { "docid": "e336b24a949984eb180a0bb446df473e", "score": "0.57420933", "text": "public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id), 'apoderados' => new Apoderados(), 'beneficiarios' => new Beneficiarios(),\n ));\n }", "title": "" }, { "docid": "df6fbea9404621702ebbb88059d14e6b", "score": "0.5730338", "text": "public function showAction(){\t\t\n\t\t\n\t\t View::renderTemplate('Summary/show.html', [\n\t\t\t'user' => $this->user\t\t\t\n\t\t ]);\n\t }", "title": "" }, { "docid": "379694203b34847d89b9fc2b2804ce36", "score": "0.57252944", "text": "public function index()\n {\n\n /*\n \\Stripe\\Stripe::setApiKey('sk_test_51IO24XIadbaPhcttk6KVmDROPN8Qp1wa6U7SWUYqJATVNA75ZM7M5PIS0OT8ov2NxqyS3znrQLGOnRocGqMvkw6r009MwoaA6p');\n $session = \\Stripe\\Checkout\\Session::create([\n 'payment_method_types' => ['card'],\n 'line_items' => [[\n 'price_data' => [\n 'currency' => 'usd',\n 'product_data' => [\n 'name' => 'T-shirt',\n ],\n 'unit_amount' => 2000,\n ],\n 'quantity' => 1,\n ]],\n 'mode' => 'payment',\n 'success_url' => 'https://example.com/success',\n 'cancel_url' => 'https://example.com/cancel',\n ]);\n \n $checkout = $user->checkoutCharge(1200, 'T-Shirt', 5);\n\n return view('checkout', [\n 'checkout' => $checkout,\n ]);\n */\n }", "title": "" }, { "docid": "88f27a4009b8d21821fb2461fd58477c", "score": "0.5725011", "text": "public function show(Payment $payment)\n {\n //\n }", "title": "" } ]
04bb76483596f7c2a62e93f492ea29cc
Uploading of excel and import data to table.
[ { "docid": "290a21a34004ea0aec9122d33496a7f0", "score": "0.632374", "text": "public function Upload_OTAllowance(Request $request)\n {\n // Data validation of the system.\n $rules = [\n 'date_from' => 'required',\n 'date_to' => 'required',\n 'allowance' => 'required',\n 'upload' => 'required|mimes:xls,xlsx',\n 'reviewed_by' => 'required',\n 'approved_by' => 'required'\n ];\n $validator = Validator::make($request->all(),$rules);\n if ($validator->fails()) {\n return response()->json(['error' => true,'message'=>$validator->messages()]);\n }\n else{\n // Insertion of data to allowanceGenerated Table and it will get the inserted ID.\n $id = $this->generatedAll->insertGetId([\n 'date_from'=>$request->get('date_from'),\n 'date_to'=>$request->get('date_to'),\n 'allowance'=>$request->get('allowance'),\n 'allowance_type'=>'OT',\n 'status'=>0,\n 'prepared_by'=>$request->get('prepared_by'),\n 'prepared_date'=>Carbon\\Carbon::now(),\n 'reviewed_by'=>$request->get('reviewed_by'),\n 'status_review'=>0,\n 'approved_by'=>$request->get('approved_by'),\n 'status_approve'=>0,\n 'date_created'=>Carbon\\Carbon::now(),\n 'created_by'=>Auth::user()->username\n ]);\n // Get the excel file path\n $path = $request->file('upload')->getRealPath();\n // This code will set reading of the to row 3\n config(['excel.import.startRow' => 3 ]);\n // Reading of all data\n $data = Excel::load($path)->get();\n // Transferring of data to array form\n if ($data->count() > 0) {\n foreach ($data->toArray() as $key => $value) {\n // $value['ColumnNameOnExcel'] change the uppercase to lowercase then all white space convert it to underscore\n $insert_data[] = array(\n 'EmpNo' => $value['employee_id'],\n 'allowance' => $request->get('allowance'),\n 'total_days' => $value['number_of_days'],\n 'total_allowance' => $value['number_of_days'] * $request->get('allowance'),\n 'allowanceType' => 'OT',\n 'allowanceGenID' => $id,\n 'date_generated' => Carbon\\Carbon::now(),\n 'created_by' => Auth::user()->username\n );\n }\n }\n if (!empty($insert_data)) {\n // Getting of all data\n $insert_data = collect($insert_data);\n // Slice the data into 1\n $slice = $insert_data->chunk(1);\n // Change the execution for 360 seconds\n ini_set('max_execution_time',360);\n // insertion of data per employee into AllowancePending Table\n foreach ($slice as $chop) {\n $this->allpen->insert($chop->toArray());\n }\n // Will count the total employee of generated Allowance.\n $get_total_count = $this->allpen->where('allowanceGenID','=',$id)->count();\n // Sum of all employee allowance.\n $sum_allowance = $this->allpen->where('allowanceGenID','=',$id)->sum('total_allowance');\n // Update AllowanceGenerated table for the total employee and sum of all allowance on that generation request.\n $update = $this->generatedAll->where('id','=',$id)->update([\n 'total_emp'=> $get_total_count,\n 'total_allowance'=> $sum_allowance\n ]);\n // Email Notification for the reviewer and approver\n $this->mail->sendNotif($request->get('reviewed_by'),$id);\n $this->mail->sendNotif($request->get('approved_by'),$id);\n // Activity log save.\n activity_logs(\"Generate OT Allowance\",Auth::user()->username,Carbon\\Carbon::now());\n return response()->json(['error' => false,'message'=>['Generation of OT Meal Allowance is Complete']]);\n }\n else{\n return response()->json(['error' => True,'message'=>['Failed to Generate OT Allowance']]);\n }\n }\n }", "title": "" } ]
[ { "docid": "9e9d31a1e886ae9c251417c89fa3406b", "score": "0.7064325", "text": "public function import(Request $request){\n $this->validate($request, array(\n 'file' => 'required'\n ));\n \n if($request->hasFile('file')){\n $extension = File::extension($request->file->getClientOriginalName());\n if ($extension == \"xlsx\" || $extension == \"xls\" || $extension == \"csv\") {\n \n $path = $request->file->getRealPath();\n $data = Excel::load($path, function($reader) {\n })->get();\n if(!empty($data) && $data->count()){\n\n foreach ($data as $key => $value) {\n \n $insert = Exprofile::create([\n 'Foto' => $value->foto,\n 'File_Foto' => $value->file_foto,\n 'Nama_Lengkap'=> $value->nama_lengkap,\n 'NIP'=> $value->nip,\n 'Grade'=> $value->grade,\n 'Jenjang'=> $value->jenjang,\n 'Education_1'=> $value->education_1,\n 'Education_2'=> $value->education_2,\n 'Kota_Lahir'=> $value->kota_lahir,\n 'tgl_lahir'=> $value->tgl_lahir,\n 'Gender'=> $value->gender,\n 'Religion'=> $value->religion,\n 'Kota_Domisili_Utama'=> $value->kota_domisili_utama,\n 'Alamat_Tinggal_Saat_Ini' => $value->alamat_tinggal_saat_ini,\n 'email_korporat'=> $value->email_korporat,\n 'handphone'=> $value->handphone,\n 'Akun_Facebook'=> $value->akun_facebook,\n 'Akun_Twitter'=> $value->akun_twitter,\n 'Akun_Instagram'=> $value->akun_instagram,\n 'Akun_LinkedIn'=> $value->akun_linkedin,\n 'Jabatan_Saat_ini'=> $value->jabatan_saat_ini,\n 'Divisi_Satuan' => $value->divisi_satuan,\n 'Area_of_Expertise_1' => $value->area_of_expertise_1,\n 'Area_of_Expertise_2' => $value->area_of_expertise_2,\n 'Area_of_Expertise_3' => $value->area_of_expertise_3,\n 'Career_Interest_1' => $value->career_interest_1,\n 'Career_Interest_2' => $value->career_interest_2,\n 'Career_Interest_3' => $value->career_interest_3,\n 'Professional_Certification_1' => $value->professional_certification_1,\n 'Professional_Certification_2' => $value->professional_certification_2,\n 'Professional_Certification_3' => $value->professional_certification_3,\n 'Masterpiece_1' => $value->masterpiece_1,\n 'Masterpiece_2' => $value->masterpiece_2,\n 'Masterpiece_3' => $value->masterpiece_3,\n 'About_and_Experience_1' => $value->about_and_experience_1,\n 'About_and_Experience_2' => $value->about_and_experience_2,\n 'About_and_Experience_3' => $value->about_and_experience_3,\n ]);\n\n }\n\n foreach ($data as $key => $value) {\n $user = User::create([\n 'email' => $value->nip,\n 'password' => Hash::make($value->tgl_lahir),\n ]);\n \n $role = UserRole::create([\n 'role_id' => '4',\n 'user_id' => $user->id,\n ]);\n }\n\n if(!empty($insert)){\n\n // $insertData = DB::table('exprofiles')->insert($insert);\n // $insertData = Exprofile::insert($insert);\n\n if ($insert) {\n Session::flash('success', 'Your Data has successfully imported');\n }else { \n Session::flash('error', 'Error inserting the data..');\n return back();\n }\n }\n }\n \n return back();\n \n }else {\n Session::flash('error', 'File is a '.$extension.' file.!! Please upload a valid xls/csv file..!!');\n return back();\n }\n }\n }", "title": "" }, { "docid": "0ea779fc7c03f74145c94662133f8ad6", "score": "0.7053355", "text": "public function importExcel()\n {\n // if(!checkACL('manager')) {\n // // Save entry to log file of failure\n // Log::warning(Auth::user()->username . \" (\" . Auth::user()->id . \") tried to access :: Admin / Articles / Import\");\n // return view('errors.403');\n // }\n\n if(Input::hasFile('import_file')){\n $path = Input::file('import_file')->getRealPath();\n $data = Excel::load($path, function($reader) {\n })->get();\n if(!empty($data) && $data->count()){\n foreach ($data as $key => $value) {\n $insert[] = [\n 'title' => $value->title,\n 'category_id' => $value->category_id,\n 'description_eng'=> $value->description_eng,\n 'description_fre'=> $value->description_fre,\n 'user_id' => $value->user_id,\n 'created_at' => $value->created_at,\n 'updated_at' => $value->updated_at,\n ];\n }\n if(!empty($insert)){\n DB::table('articles')->insert($insert);\n\n // Save entry to log file of failure\n //Log::warning(Auth::user()->username . \" (\" . Auth::user()->id . \") imported :: articles\");\n\n Session::flash('Success','Import was successfull!');\n return redirect()->route('articles.index');\n }\n }\n }\n return back();\n }", "title": "" }, { "docid": "cb07ba85f357a12cc054878bdd999435", "score": "0.6962483", "text": "public function upload (){\n date_default_timezone_set('Europe/Berlin');\n // Include library for excel reader\n include PLUGIN_DIR_PATH . '/libraries/PHPExcel/IOFactory.php';\n\n $error_count = 0; // count errors of insert to post\n\n /*\n *\n * CUSTOMIZE ERROR MESSAGES\n *\n */\n // Error Messages\n $error_message_01 = __('Wrong File, please use XLSX or CSV', 'importer');\n $error_message_02 = __('Error loading file', 'importer' );\n $error_message_03 = __('Error insert fish nr', 'importer' );\n\n // Success Message\n $success_message_start = __( 'Succeed to import', 'importer' );\n $success_message_end = __( 'fishes', 'importer' );\n\n\n\n if(isset($_FILES['file']['name'])){\n\n $file_name = $_FILES['file']['name'];\n $ext = pathinfo($file_name, PATHINFO_EXTENSION);\n\n //Checking the file extension\n if($ext == \"xlsx\" || $ext == \"csv\" ){\n\n $file_name = $_FILES['file']['tmp_name'];\n $inputFileName = $file_name;\n\n /**********************PHPExcel Script to Read Excel File**********************/\n // Read your Excel workbook\n try {\n $inputFileType = PHPExcel_IOFactory::identify($inputFileName); //Identify the file\n $objReader = PHPExcel_IOFactory::createReader($inputFileType); //Creating the reader\n $objPHPExcel = $objReader->load($inputFileName); //Loading the file\n }\n catch (Exception $e) {\n die('<div class=\"error notice\"><p style=\"color:red;\">' . $error_message_02 . ' \"' . pathinfo($inputFileName, PATHINFO_BASENAME)\n . '\"</p></div><br><br><div class=\"error notice\">' . $e->getMessage() . '</p></div>');\n }\n\n // Get worksheet dimensions\n $sheet = $objPHPExcel->getSheet(0); //Selecting sheet 0\n $highestRow = $sheet->getHighestRow(); //Getting number of rows\n $highestColumn = $sheet->getHighestColumn(); //Getting number of columns\n\n // Loop through each row of the worksheet in turn\n for ($row = 1; $row <= $highestRow; $row++) {\n\n // Read a row of data into an array\n $rowData = $sheet->rangeToArray('A' . $row . ':' . $highestColumn . $row, NULL, TRUE, FALSE);\n\n /*\n *\n * CHANGES HERE FOR CUSTOUMIZE INSERT VARIABLES\n *\n */\n\n // Values from flie\n $art = $rowData[0][2];\n $color = $rowData[0][3];\n\n // Post Content can't be null\n if ( $rowData[0][6] != null ) {\n $content = $rowData[0][6];\n }\n else {\n $content = ' ';\n }\n\n // Custom Post Metas\n $meta1 = $rowData[0][0];\n $meta2 = $rowData[0][4];\n $meta3 = $rowData[0][5];\n\n // Post Title\n $title = $art . ' ' . $color;\n\n /*\n * CHANGE HERE TO INSERT INTO POST\n */\n $postarr = array(\n 'post_title' => $title,\n 'post_content' => $content,\n 'post_status' => 'publish',\n 'post_type' => 'post',\n 'meta_input' => array(\n 'meta_1' => $meta1,\n 'meta_2' => $meta2,\n 'meta_3' => $meta3,\n ),\n );\n\n $post = wp_insert_post( $postarr, true );\n\n // Error and success messages\n if (is_wp_error( $post )) {\n $error_count++;\n echo '<div class=\"error notice\"><p>' . $error_message_03 . ' ' . $row . '</p></div>';\n }\n if ($row == $highestRow) {\n $success_count = $row - $error_count;\n echo '<div class=\"updated notice\"><p>' . $success_message_start . ' ' . $success_count . '/' . $row . ' ' . $success_message_end . '</p></div>';\n }\n\n }\n\n }\n else {\n echo '<div class=\"error notice\"><p style=\"color:red;\">' . $error_message_01 . '</p></div>';\n }\n\n }\n\n }", "title": "" }, { "docid": "3e5e55e3de418dc2323eb317326e1edc", "score": "0.6955774", "text": "public function importExcelFile()\n {\n if(Input::hasFile('import_file')){\n\t\t\t$path = Input::file('import_file')->getRealPath();\n $loc_name = Session::get('loc_name');\n\n\t\t\t$data = Excel::load($path, function($reader) {\n\t })->get();\n\t\t\tif(!empty($data) && $data->count()){\n\t\t\t\tforeach ($data as $key => $value) {\n\t\t\t\t\t$insert[] = [\n 'loc_name' => $loc_name,\n 'prod_id' => $value->id, \n 'prod_name' => $value->name,\n 'prod_desc' => $value->description, \n 'camera_type' => $value->camera,\n 'weight' => $value->weight,\n 'storage_size' => $value->maxstorage, \n 'price' => $value->price\n ];\n\t\t\t\t}\n\t\t\t\tif(!empty($insert)){\n\t\t\t\t\tDB::table('prod_info')->insert($insert);\n\t\t\t\t\treturn Redirect::to('/prodinfo');\n\t\t\t\t}\n\t\t\t} \n\n\t\t} \n }", "title": "" }, { "docid": "267131f1add7abb7d5def445834dc736", "score": "0.6913202", "text": "public function importExcel(Request $request){\n $this->validate($request, array(\n 'file' => 'required'\n ));\n \n if($request->hasFile('file')){\n $extension = File::extension($request->file->getClientOriginalName());\n if ($extension == \"xlsx\" || $extension == \"xls\" || $extension == \"csv\") {\n \n $path = $request->file->getRealPath();\n $data = Excel::load($path, function($reader) {\n })->get();\n dd($data);\n if(!empty($data) && $data->count()){\n \n foreach ($data as $key => $value) {\n $insert[] = [\n 'name' => $value->name,\n 'empcode' => $value->empcode,\n 'tic' => $value->tic,\n ];\n }\n \n if(!empty($insert)){\n \n $insertData = DB::table('students')->insert($insert);\n if ($insertData) {\n $request->session()->flash('status', 'Your Data has successfully imported!'); // 5.7 v\n // Session::flash('success', 'Your Data has successfully imported.'); // ~ 5.4 v laravel\n }else { \n $request->session()->flash('error', 'Error inserting the data..'); \n // Session::flash('error', 'Error inserting the data..');\n return back();\n }\n }\n }\n \n return back();\n \n }else {\n $request->session()->flash('error', 'File is a '.$extension.' file.!! Please upload a valid xls/csv file..!!'); \n // Session::flash('error', 'File is a '.$extension.' file.!! Please upload a valid xls/csv file..!!');\n return back();\n }\n }\n }", "title": "" }, { "docid": "89f717e351c10b90c6a4bc068334f129", "score": "0.679971", "text": "public function massImport(Request $request, Excel $excel)\n {\n $rules = [\n 'file' => 'required|max:2048|mimetypes:application/vnd.ms-excel,text/plain,text/csv,text/tsv,application/excel,\n application/vnd.ms-excel,application/vnd.msexcel',\n 'pictures' => 'file|max:32768'\n ];\n $this->validate($request, $rules, ['file.mimetypes' => 'only Excel and CSV files are allowed']);\n\n if ($request->hasFile('file')) {\n $path = $request->file('file')->getRealPath();\n $data = $excel->load($path)->get();\n \n if (!empty($data) && $data->count()) {\n $zip = false; \n \n //extract pictures, if there's zip of pictures\n if ($request->hasFile('pictures')) {\n //get pictures zip path\n $zipPath = $request->file('pictures')->getRealPath(); \n $zip = new ZipArchive();\n //attempt opening the file\n if( $zip->open($zipPath) === TRUE )\n {\n $tempDir = $this->getTempDir();\n Storage::makeDirectory($tempDir, 0711, true, true); \n $zip->extractTo($tempDir);\n $tempPictures = Storage::disk('local')->allFiles($tempDir);\n $tempPictures = array_values(array_diff(scandir($tempDir), array('.', '..', '__MACOSX')));\n //$zip->close(); \n } else {\n $zip = false; \n }\n }\n\n $count = 0;\n foreach ($data->toArray() as $row) {\n if (!empty($row)) {\n $message = ($count > 0)? ' Some of your data have been added. Review your books and delete from your import file, to avoid duplicates':'';\n //remove empty array fields\n $row = array_filter(array_map('trim', $row), 'strlen');\n $rules = Config::get('apiauth.create_book.validation_rules');\n //validate each row\n $validator = Validator::make($row, $rules);\n if ($validator->fails()) {\n if ($count > 0) {\n continue; \n } else {\n return new Response([\n 'error' => [\n 'message'=> 'validation failed',\n 'status_code' => 401,\n 'errors' => $validator->errors()\n ]], 401);\n } \n }\n //validate categories\n if (!$categories = $this->validateCategory($row['category'])) {\n //if this is the first iteration, just stop\n if ($count > 0) {\n continue; \n } else {\n throw new StoreResourceFailedException('some provided categories are invalid. format document correctly and try again.'.$message);\n }\n }\n \n $_row = array_except($row, ['category']);\n //create book\n if (!$book = Book::create($_row)) {\n if ($count > 0) {\n continue; \n } else {\n throw new StoreResourceFailedException('an error occured, please try again'.$message);\n }\n }\n //add categories\n $book->categories()->sync($categories, false);\n\n //grab pictures\n if($zip && array_key_exists('pictures', $row)) {\n $picturesArray = $this->getPicturesFromString($row['pictures']);\n $this->attachPictureArrayBooks($tempPictures, $picturesArray, $book);\n } \n $count++;\n }\n }\n $total = count($data->toArray());\n $failed = $this->getUploadFailedMessage($total, $count);\n if ($zip) {\n $zip->close(); \n //delete picture tmp folder\n Storage::deleteDirectory($tempDir); \n } \n \n return new Response([\n 'status' => 'batch import completed.',\n 'successful' => \"$count\",\n 'failed' => \"$failed\",\n ], 201);\n }\n }\n\n throw new StoreResourceFailedException('import failed. please check your file and try again');\n }", "title": "" }, { "docid": "d4980a6a17ca09d549b4adbc92788468", "score": "0.6792244", "text": "public function uploadcategoryexcelAction() {\n if (isset($_POST['import_file'])) {\n $user_file = $_FILES[\"data_import_file\"][\"name\"];\n if ((!empty($_FILES[\"data_import_file\"])) && ($_FILES['data_import_file']['error'] == 0)) {\n $filename = basename($_FILES['data_import_file']['name']);\n $ext = substr($filename, strrpos($filename, '.') + 1);\n if (($ext == \"csv\" ) && ($_FILES[\"data_import_file\"][\"size\"] < 500000000)) {\n $newname = UPLOAD_FILE_PATH . '/bulkdata/' . $filename; //VENDOR_BULK_DATA_FILE. $filename;\n if (!file_exists($newname)) {\n //Attempt to move the uploaded file to it's new place\n if ((move_uploaded_file($_FILES['data_import_file']['tmp_name'], $newname))) {\n // echo $newname; die;\n $rslt = $this->fileRead($newname);\n if (empty($rslt))\n $this->view->msg = \"<p style='color:green'>It's done! The file data has been insterted in database</p>\";\n else {\n $this->view->errorRows = implode(',', $rslt);\n $this->view->msg = \"<p style='color:green'>It's partially done! The below mentioned rows data has some data format issue so please insert these data manually.</p>\";\n }\n } else {\n $this->view->msg = \"<p style='color:red'>Error: A problem occurred during file upload!</p>\";\n }\n } else {\n $this->view->msg = \"<p style='color:red'>Error: File \" . $_FILES[\"data_import_file\"][\"name\"] . \" already exists</p>\";\n }\n } else {\n $this->view->msg = \"<p style='color:red'>Error: Only .XLS files under 200000Kb are accepted for upload</p>\";\n }\n } else {\n $this->view->msg = \"<p style='color:red'>Error: No file uploaded</p>\";\n }\n }\n echo $this->view->msg;\n echo $this->view->errorRows;\n }", "title": "" }, { "docid": "1bcdad3ef9cf3e29f81c64793cb698b0", "score": "0.67908686", "text": "public function importExcel(Request $request)\n {\n\n if ($request->hasFile('import_file')) {\n $path = $request->file('import_file')->getRealPath();\n\n $data = Excel::load($path, function ($reader) {})->get();\n\n if (!empty($data)) {\n $insert = $data->toArray();\n\n if (!empty($insert)) {\n try {\n allocation::insert($insert);\n return back()->with('success', 'Records Inserted successfully.');\n\n } catch (\\Exception $e) {\n //Item::rollback();\n return back()->with('error', 'Duplicate entry in the database, please check the file and try again.');\n }\n }\n }\n return back()->with('error', 'There is no data in the file, Check file and try again.');\n }\n return back()->with('error', 'Please Check your file, Something is wrong there.');\n }", "title": "" }, { "docid": "8fc7fa86aaf53ed700f4335b788a35c7", "score": "0.6771214", "text": "public function import(Request $request){\n $this->validate($request, array(\n 'file' => 'required'\n ));\n \n if($request->hasFile('file')){\n $extension = File::extension($request->file->getClientOriginalName());\n if ($extension == \"xlsx\" || $extension == \"xls\" || $extension == \"csv\") {\n \n $path = $request->file->getRealPath();\n $data = Excel::load($path, function($reader) {\n })->get();\n if(!empty($data) && $data->count()){\n \n foreach ($data as $key => $value) {\n $insert[] = [\n 'name' => $value->name,\n 'email' => $value->email,\n 'phone_no' => $value->phone_no,\n 'country' => $value->country, \n 'course' => $value->course, \n 'intake' => $value->intake, \n 'advert' => $value->advert, \n 'comment' => $value->comment, \n 'enquiry_date' => $value->enquiry_date, \n \n\n ];\n }\n \n if(!empty($insert)){\n \n $insertData = DB::table('Inquiries')->insert($insert);\n if ($insertData) {\n return response()->json($insertData);\n }else { \n return response()->json(['status' => 'error', 'message' => $e->getMessage()]);\n return back();\n }\n\n\n \n }\n }\n \n return back();\n \n }else {\n Session::flash('error', 'File is a '.$extension.' file.!! Please upload a valid xls/csv file..!!');\n return back();\n }\n }\n }", "title": "" }, { "docid": "9f7818cdbb7408afda132f2937cb9dfc", "score": "0.67088497", "text": "public function importProduct() {\n //$this->load->library('Excel');\n $this->load->library('ItfExcelReader','itfexcelreader');\n $this->load->library('upload');\n //echo \"<pre>wQww\";print_r($this->itfexcelreader);die;\n if (isset($_FILES['tmpdocuments']) && $_FILES['tmpdocuments']) {\n $config['upload_path'] = PUBLIC_UPLOADPATH . \"importusers/\";\n $config['allowed_types'] = 'xlsx|xls';\n $config['max_size'] = '20000000';\n $config['max_width'] = '2024';\n $config['max_height'] = '2024';\n $this->load->library('upload');\n $this->upload->initialize($config);\n\n $result = $this->upload->do_upload('tmpdocuments');\n if ($result >= 1) {\n $imageinfo = $this->upload->data();\n\n $filename = $imageinfo['full_path'];\n $this->itfexcelreader->load($filename);\n $objPHPExcel = $this->itfexcelreader->infodata();\n //echo \"<pre>\";print_r($objPHPExcel);die; \n $failed = 0;\n $success = 0;\n $id = array();\n $updatecounter = 0;\n $insertcounter = 0;\n foreach ($objPHPExcel as $key => $value) {\n //echo \"<pre>\";print_r($)\n if (empty($value['Product Name']))\n continue;\n $productdata = array();\n $productdata['name'] = $value['Product Name'];\n \n //now check for existence of product\n $productid = (array)$this->products->getProductInfoByName($productdata['name']);\n if(isset($productid['id']) && (!empty($productid['id']))){\n //update query\n $updatedata = array();\n if(!empty($value['Price']))\n {\n $updatedata['price']=$value['Price']; \n }\n if(!empty($value['Weight']))\n {\n $updatedata['weight']=$value['Weight']; \n }\n if(!empty($value['Timeduration']))\n {\n $updatedata['timeduration']=$value['Timeduration']; \n }\n if(!empty($value['Type (1,2,3,4)']))\n {\n $updatedata['product_type']=$value['Type (1,2,3,4)']; \n }\n $where = array('id'=>$productid['id']);\n $this->products->updateProduct($updatedata,$where);\n $updatecounter++;\n \n }else{\n //insert query\n $insertdata = array();\n $insertdata['name']=$value['Product Name']; \n if(!empty($value['Price']))\n {\n $insertdata['price']=$value['Price']; \n }\n if(!empty($value['Weight']))\n {\n $insertdata['weight']=$value['Weight']; \n }\n if(!empty($value['Timeduration']))\n {\n $insertdata['timeduration']=$value['Timeduration']; \n }\n if(!empty($value['Type (1,2,3,4)']))\n {\n $insertdata['product_type']=$value['Type (1,2,3,4)']; \n }\n $where=array();\n $this->products->updateProduct($insertdata);\n $insertcounter++;\n }\n \n //echo \"$$$@@@@<pre>\";print_r($userdata);die;\n \n }//echo \"#####<pre>\";print_r($user_id);die;\n $this->messages->flash('Product imported successfully. New ('.$insertcounter.\") and Updated (\".$updatecounter.\")\");\n }\n else {\n\n $data[\"error_msg\"] = $this->upload->display_errors('<span>', '</span>');\n return false;\n }\n //echo \"##<pre>\";print_r($lastinsertedId);die;\n }\n $this->template->headingtitle = \"Import / Update Product\";\n $this->template->set_breadcrumb(\"PRODUCT LISTING\", site_url(\"admin/product/index\"));\n $this->template->set_breadcrumb(\"IMPORT PRODUCT\", \"\");\n $data = array();\n $this->template->build('excel_import', array('frmdata' => $data));\n }", "title": "" }, { "docid": "fb9974885fad21199035d1c7a05f001d", "score": "0.6672378", "text": "public function import(Request $request){\n $this->validate($request, [\n 'file' => 'required'\n ]);\n \n if($request->hasFile('file')) {\n $extension = File::extension($request->file->getClientOriginalName());\n if ($extension == \"xlsx\" || $extension == \"xls\" || $extension == \"csv\") {\n \n $path = $request->file->getRealPath();\n $data = Excel::load($path, function($reader) {})->get();\n\n if(!empty($data) && $data->count()) {\n \n foreach ($data as $key => $value) {\n\n $field = CategoryField::firstOrCreate(['category_field' => $value->category_field]);\n $domain = CategoryDomain::firstOrCreate([\n 'category_domain' => $value->category_domain,\n 'category_field_id' => $field->id,\n ]);\n $subdomain = CategorySubdomain::firstOrCreate([\n 'category_subdomain' => $value->category_subdomain,\n 'category_domain_id' => $domain->id,\n ]);\n }\n }\n \n return back();\n \n } else {\n Session::flash('error', 'File is a '.$extension.' file! Please upload a valid xls/csv file!');\n return back();\n }\n }\n }", "title": "" }, { "docid": "fddd4db3bdaf51b9414c56bc84d383fe", "score": "0.6671451", "text": "public function proses_import(){\n include APPPATH.'third_party/PHPExcel/PHPExcel.php';\n \n $excelreader = new PHPExcel_Reader_Excel2007();\n $loadexcel = $excelreader->load('excel/'.$this->filename.'.xlsx'); // Load file yang telah diupload ke folder excel\n $sheet = $loadexcel->getActiveSheet()->toArray(null, true, true ,true);\n \n // Buat sebuah variabel array untuk menampung array data yg akan kita insert ke database\n $data = [];\n \n $numrow = 1;\n foreach($sheet as $row){\n // Cek $numrow apakah lebih dari 1\n // Artinya karena baris pertama adalah nama-nama kolom\n // Jadi dilewat saja, tidak usah diimport\n if($numrow > 1){\n // Kita push (add) array data ke variabel data\n array_push($data, [\n 'ID_NILAI'=>$row['A'], // Insert data nis dari kolom A di excel\n 'KODE_MK'=>$row['B'], // Insert data nama dari kolom B di excel\n 'NIM'=>$row['C'], // Insert data jenis kelamin dari kolom C di excel\n 'NAMA'=>$row['D'], // Insert data alamat dari kolom D di excel\n\t\t 'TUGAS_1'=>$row['E'],\n\t\t 'TUGAS_2'=>$row['F'],\n\t\t 'TUGAS_3'=>$row['G'],\n\t\t 'TUGAS_4'=>$row['H'],\n\t\t 'TUGAS_5'=>$row['I'],\n\t\t 'PRESENSI'=>$row['J'],\n\t\t 'UTS'=>$row['K'],\n\t\t 'UAS'=>$row['L'],\n\t\t 'PRAKTIKUM'=>$row['M'],\n\t\t 'NILAI'=>$row['N'],\n\t\t 'GRADE'=>$row['O']\n\t\t \n ]);\n }\n \n $numrow++; // Tambah 1 setiap kali looping\n }\n // Panggil fungsi insert_multiple yg telah kita buat sebelumnya di model\n $this->Database_Nilai->insert($data);\n \n redirect(\"Admin_NilaiController/nilai_view\"); // Redirect ke halaman awal (ke controller siswa fungsi index)\n }", "title": "" }, { "docid": "c5d89a3e4ce1094962bcc84e55396360", "score": "0.66485155", "text": "public function excel_upload_submit(Request $req){\n $data = \\Excel::load($req['file'])->toObject();\n \n // print_r($data);exit();\n foreach ($data as $key => $value) {\n //foreach ($value as $k => $val) {\n \n if($value->id!=null ||$value->utr_no!=null || $value->amount_paid!=null || $value->processed_by!=null || $value->processed_on!=null || $value->remark!=null){\n \t$this->insertexcel($value->id,$value->utr_no,$value->amount_paid,$value->processed_by,$value->processed_on,$value->remark); \n }\n }\n return redirect('dashboard');\n\t}", "title": "" }, { "docid": "8b87bc5678e4ac52dcccbcd973b84492", "score": "0.6609739", "text": "function importFile()\n {\n try {\n //recibir el request\n $fileName = false;\n $registersNoInsert = [];\n $config['upload_path'] = './uploads/';\n $config['allowed_types'] = 'xlsx|xls|ods';\n $config['max_size'] = 200;\n $this->load->library('upload', $config);\n //validar request\n\n if (!$this->upload->do_upload('uploadFile')) {\n throw new Exception($this->upload->display_errors());\n }\n //procesar request\n $data = array('upload_data' => $this->upload->data());\n $inputFileName = $data[\"upload_data\"][\"full_path\"];\n $inputFileType = IOFactory::identify($inputFileName);\n $objReader = IOFactory::createReader($inputFileType);\n $objPhpOffice = $objReader->load($inputFileName);\n \n $allDataInSheet = $objPhpOffice->getActiveSheet()->toArray(true, true, true, true);\n $i = 0;\n $cod_mifare_prev = $allDataInSheet[1]['A'];\n $spreadsheet = new Spreadsheet();\n \n $fileName = \"tarjetas_proceso_\".microtime(true);\n foreach ($allDataInSheet as $j=> $value) {\n \n $cod_mifare = $value['A'];\n $cod_barra = $value['B'];\n $spreadsheet->getActiveSheet()->setCellValue('A' . ($j+1), $cod_mifare);\n $spreadsheet->getActiveSheet()->setCellValue('B' . ($j+1), $cod_barra);\n if (!preg_match('/^[0-9A-Za-z]{8}$/', $cod_mifare)) {\n $registersNoInsert[] = [\"codigo\" => $cod_mifare, \"description\" => \"Codigo Mifare no es valido, debe ser de 8 caracteres\"];\n $spreadsheet->getActiveSheet()->setCellValue('C' . ($j+1), \"Codigo Mifare no es valido, debe ser de 8 caracteres\");\n continue;\n }\n if ($i > 0) {\n if ($cod_mifare == $cod_mifare_prev) {\n $registersNoInsert[] = [\"codigo\" => $cod_mifare, \"description\" => \"Codigo Mifare duplicado en el archivo\"];\n $spreadsheet->getActiveSheet()->setCellValue('C' . ($j+1), \"Codigo Mifare duplicado en el archivo\");\n \n continue;\n }\n $cod_mifare_prev = $cod_mifare;\n }\n $qty = $this->Tarjeta_Model->findByCodMifare($cod_mifare)->num_rows();\n if ($qty == 0) {\n $inserdata[$i]['COD_MIFARE'] = $cod_mifare;\n $inserdata[$i]['CODIGO_BARRA'] = $cod_barra;\n $spreadsheet->getActiveSheet()->setCellValue('C' . ($j+1), \"exitoso\");\n $i++;\n } else {\n $registersNoInsert[] = [\"codigo\" => $cod_mifare, \"description\" => \"Codigo Mifare ya existe en la base de datos\"];\n $spreadsheet->getActiveSheet()->setCellValue('C' . ($j+1), \"Codigo Mifare ya existe en la base de datos\");\n }\n }\n $writer = IOFactory::createWriter($spreadsheet, 'Xlsx'); \n //$writer->save('./biblioteca_mifare/temp/'.$fileName. '.xlsx');\n $writer->save('C:/tmp/'.$fileName. '.xlsx');\n $result = false;\n if (isset($inserdata)) {\n $result = $this->Tarjeta_Model->importData($inserdata);\n }\n //revisar esta logica\n if (!$result) {\n throw new Exception(\"Proceso culminado satisfactoriamente, los registros ya existen en la base de datos\");\n }\n echo json_encode([\"status\" => true, \"message\" => \"Proceso culminado satisfactoriamente, se procesaron \" . $i . \" registros \", \"No_Insertados\" => $registersNoInsert, \"fileName\" => $fileName]);\n } catch (Exception $e) {\n echo json_encode([\"status\" => false, \"message\" => $e->getMessage(), \"No_Insertados\" => $registersNoInsert, \"fileName\" => $fileName]);\n }\n }", "title": "" }, { "docid": "992b5984c053014d7b2e964189d1720e", "score": "0.65642995", "text": "function convert_excel(){\n $file = $_FILES['file']['tmp_name'];\n $handle = fopen($file, \"r\");\n $c = 0;\n $sql = \"\";\n while(($filesop = fgetcsv($handle, 1000, \",\")) !== false) {\n if($c == 0){\n $c++;\n continue;\n }\n $sql .= \"INSERT INTO `lel` (`id`, `name`, `email`, `phone`, `address`, `city`, `state`, `zip`, `country`, `company`, `website`, `industry`, `revenue`, `employees`, `description`, `date`) VALUES ('\".$filesop[0].\"', '\".$filesop[1].\"', '\".$filesop[2].\"', '\".$filesop[3].\"', '\".$filesop[4].\"', '\".$filesop[5].\"', '\".$filesop[6].\"', '\".$filesop[7].\"', '\".$filesop[8].\"', '\".$filesop[9].\"', '\".$filesop[10].\"', '\".$filesop[11].\"', '\".$filesop[12].\"', '\".$filesop[13].\"', '\".$filesop[14].\"', '\".$filesop[15].\"');\";\n }\n fclose($handle);\n $result = mysql_query($sql);\n if($result){\n echo \"Successfully imported\";\n }else{\n echo \"Problem in Importing\";\n }\n}", "title": "" }, { "docid": "5cc46d29c7a7b2dfc6dd66611f140dad", "score": "0.65008646", "text": "public function upload(){\n $this->load->library(array('PHPExcel','PHPExcel/IOFactory'));\n $this->load->model(\"model_anggota\",\"anggota\");\n if(1 > 0 ){\n $fileName = time().$_FILES['file_anggota']['name'];\n\n $config['upload_path'] = './assets/xls_file/'; //buat folder dengan nama assets di root folder\n $config['file_name'] = $fileName;\n $config['allowed_types'] = 'xls|xlsx|csv';\n $config['max_size'] = 10000;\n\n $this->load->library('upload');\n $this->upload->initialize($config);\n\n if(! $this->upload->do_upload('file_anggota') )\n $this->upload->display_errors();\n\n $media = $this->upload->data('file_anggota');\n $inputFileName = \"assets/xls_file/\".$fileName;\n \n try {\n $inputFileType = IOFactory::identify($inputFileName);\n $objReader = IOFactory::createReader($inputFileType);\n $objPHPExcel = $objReader->load($inputFileName);\n \n } catch(Exception $e) {\n die('Error loading file \"'.pathinfo($inputFileName,PATHINFO_BASENAME).'\": '.$e->getMessage());\n }\n\n $sheet = $objPHPExcel->getSheet(0);\n $highestRow = $sheet->getHighestRow();\n $highestColumn = $sheet->getHighestColumn();\n \n for ($row = 2; $row <= $highestRow; $row++){\n // Read a row of data into an array \n $rowData = $sheet->rangeToArray('A' . $row . ':' . $highestColumn . $row,\n NULL,\n TRUE,\n FALSE);\n \n //Sesuaikan sama nama kolom tabel di database\n $tgl_lahir = date('Y-m-d',PHPExcel_Shared_Date::ExcelToPHP($rowData[0][3]));\n $data = array(\n 'nama'=>$rowData[0][0],\n 'jk'=>$rowData[0][1],\n 'tempat_lahir'=>$rowData[0][2],\n 'tgl_lahir'=>$tgl_lahir,\n 'alamat'=>$rowData[0][4],\n 'no_hp'=>$rowData[0][5],\n 'email'=>$rowData[0][6],\n 'tahun_krn'=>$rowData[0][7],\n 'asal_krn'=>$rowData[0][8],\n 'asal_text_krn'=>$rowData[0][9],\n 'status_krn'=>$rowData[0][10],\n 'penugasan_krn'=>$rowData[0][11],\n 'penugasan_text_krn'=>$rowData[0][12],\n );\n //sesuaikan nama dengan nama tabel\n $this->anggota->save_anggota($data);\n \n }\n unlink($inputFileName);\n echo json_encode(array(\"status\"=>\"berhasil\"));\n }\n }", "title": "" }, { "docid": "e9f4630ecffa4128503aa8bae658f8ef", "score": "0.649698", "text": "public function store(Request $request)\n {\n // Validate the request...\n $file = request()->file('file');\n $date = request()->input('date');\n $eventType = request()->input('type');\n $reader = new \\PhpOffice\\PhpSpreadsheet\\Reader\\Xlsx();\n $spreadsheet = $reader->load($file->path());\n $worksheet = $spreadsheet->getActiveSheet();\n $import = new Import;\n $currentTime = (!$date || $date === '') ? Carbon::now()->toDateString() : $date;\n $import->date = $currentTime;\n $import->file_name = $file->getClientOriginalName();\n $import->save();\n $importId = $import->id;\n foreach ($worksheet->getRowIterator() as $row) {\n $rowValues = [$importId,$currentTime];\n $cellIterator = $row->getCellIterator();\n $cellIterator->setIterateOnlyExistingCells(FALSE); // This loops through all cells\n foreach ($cellIterator as $cell) {\n $value = $cell->getValue();\n $rowValues[] = $value;\n }\n $this->eventService->make($rowValues, $eventType);\n }\n return 'Import successful';\n }", "title": "" }, { "docid": "fd932386a3ae0949dc44f2d1808f60ac", "score": "0.6486052", "text": "function import(){\n\t\t \tinclude APPPATH.'third_party/PHPExcel/PHPExcel.php';\n\t\t \n\t\t $csvreader = PHPExcel_IOFactory::createReader('CSV');\n\t\t $loadcsv = $csvreader->load('csv/'.$this->filename.'.csv'); // Load file yang tadi diupload ke folder csv\n\t\t $sheet = $loadcsv->getActiveSheet()->getRowIterator();\n\t\t \n\t\t // Buat sebuah variabel array untuk menampung array data yg akan kita insert ke database\n\t\t $data = [];\n\t\t \n\t\t $numrow = 1;\n\t\t foreach($sheet as $row){\n\t\t // Cek $numrow apakah lebih dari 1\n\t\t // Artinya karena baris pertama adalah nama-nama kolom\n\t\t // Jadi dilewat saja, tidak usah diimport\n\t\t if($numrow > 1){\n\t\t // START -->\n\t\t // Skrip untuk mengambil value nya\n\t\t $cellIterator = $row->getCellIterator();\n\t\t $cellIterator->setIterateOnlyExistingCells(false); // Loop all cells, even if it is not set\n\t\t \n\t\t $get = array(); // Valuenya akan di simpan kedalam array,dimulai dari index ke 0\n\t\t foreach ($cellIterator as $cell) {\n\t\t array_push($get, $cell->getValue()); // Menambahkan value ke variabel array $get\n\t\t }\n\t\t // <-- END\n\t\t \n\t\t // Ambil data value yang telah di ambil dan dimasukkan ke variabel $get\n\t\t $nrp = $get[0]; // Ambil data NIS dari kolom A di csv\n\t\t $nama = $get[1]; // Ambil data nama dari kolom B di csv\n\t\t $jenjang = $get[2]; \n\t\t\t\t$prodi = $get[3]; \n\t\t\t\t$bidang_keahlian = $get[4]; \n\t\t\t\t$jenis_beasiswa = $get[5]; \n\t\t\t\t$angkatan = $get[6]; \n\t\t\t\t$periode_angkatan = $get[7]; \n\t\t\t\t$durasi_beasiswa = $get[8]; \n\t\t\t\t$file_pks = $get[9]; \n\t\t\t\t$lama_studi = $get[10]; \n\t\t\t\t$status_perkuliahan = $get[11]; \n\t\t\t\t$status_beasiswa = $get[12]; \n\t\t\t\t$bank = $get[13]; \n\t\t\t\t$norek = $get[14]; \n\t\t\t\t\n\t\t \n\t\t // Kita push (add) array data ke variabel data\n\t\t array_push($data, [\n\t\t 'nrp'=>$nim, // Insert data nis\n\t\t 'nama'=>$nama, // Insert data nama\n\t\t 'jenjang'=>$jenjang, \n\t\t\t\t 'prodi'=>$prodi, \n\t\t\t\t 'bidang_keahlian'=>$bidang_keahlian,\n\t\t\t\t 'jenis_beasiswa'=>$jenis_beasiswa, \n\t\t\t\t 'angkatan'=>$angkatan, \n\t\t\t\t 'periode_angkatan'=>$periode_angkatan, \n\t\t\t\t 'durasi_beasiswa'=>$durasi_beasiswa, \n\t\t\t\t 'file_pks'=>$file_pks, \n\t\t\t\t 'lama_studi'=>$lama_studi, \n\t\t\t\t 'status_perkuliahan'=>$status_perkuliahan, \n\t\t\t\t 'status_beasiswa'=>$status_beasiswa, \n\t\t\t\t 'bank'=>$bank, \n\t\t\t\t 'norek'=>$norek, \n\t\t ]);\n\t\t }\n\t\t \n\t\t $numrow++; // Tambah 1 setiap kali looping\n\t\t }\n\t\t // Panggil fungsi insert_multiple yg telah kita buat sebelumnya di model\n\t\t $this->model_mahasiswa->insert_multiple($data);\n\t\t \n\t\t redirect(\"mahasiswa\"); // Redirect ke halaman awal (ke controller siswa fungsi index)\n\t\t }", "title": "" }, { "docid": "02b7d033ee6d6b46e6208642b4bcd823", "score": "0.64794487", "text": "public function ExcelDataAddFoodmenusIngredients()\n {\n $company_id = $this->session->userdata('company_id');\n $user_id = $this->session->userdata('user_id');\n if ($_FILES['userfile']['name'] != \"\") {\n if ($_FILES['userfile']['name'] == \"Food_Menu_Ingredients_Upload.xlsx\") {\n //Path of files were you want to upload on localhost (C:/xampp/htdocs/ProjectName/uploads/excel/)\n $configUpload['upload_path'] = FCPATH . 'asset/excel/';\n $configUpload['allowed_types'] = 'xls|xlsx';\n $configUpload['max_size'] = '5000';\n $this->load->library('upload', $configUpload);\n if ($this->upload->do_upload('userfile')) {\n $upload_data = $this->upload->data(); //Returns array of containing all of the data related to the file you uploaded.\n $file_name = $upload_data['file_name']; //uploded file name\n $extension = $upload_data['file_ext']; // uploded file extension\n //$objReader =PHPExcel_IOFactory::createReader('Excel5'); //For excel 2003\n $objReader = PHPExcel_IOFactory::createReader('Excel2007'); // For excel 2007\n //Set to read only\n $objReader->setReadDataOnly(true);\n //Load excel file\n $objPHPExcel = $objReader->load(FCPATH . 'asset/excel/' . $file_name);\n $totalrows = $objPHPExcel->setActiveSheetIndex(0)->getHighestRow(); //Count Numbe of rows avalable in excel\n $objWorksheet = $objPHPExcel->setActiveSheetIndex(0);\n //loop from first data untill last data\n $totalFoodMenuToUpload = 0;\n\n if ($totalrows > 2) {\n $arrayerror = '';\n for ($i = 3; $i <= $totalrows; $i++) {\n $menuOrIngredient = htmlspecialchars(trim($objWorksheet->getCellByColumnAndRow(0, $i)->getValue()));\n //it counts total number of food menus\n if($menuOrIngredient=='FM'){\n $totalFoodMenuToUpload++;\n }\n }\n if($totalFoodMenuToUpload<10){\n for ($i = 3; $i <= $totalrows; $i++) {\n $menuOrIngredient = htmlspecialchars(trim($objWorksheet->getCellByColumnAndRow(0, $i)->getValue()));\n $menuOrIngredientName = htmlspecialchars(trim($objWorksheet->getCellByColumnAndRow(1, $i)->getValue()));\n $consumption = null;\n\n $currentRowFor = ''; //it hold current row wether menu or ingredient\n //it counts total number of food menus\n if($menuOrIngredient=='FM'){\n $totalFoodMenuToUpload++;\n $record = $this->Common_model->getMenuByMenuName($menuOrIngredientName);\n $currentRowFor = 'Menu';\n }else{\n $consumption = htmlspecialchars(trim($objWorksheet->getCellByColumnAndRow(2, $i)->getValue()));\n $record = $this->Common_model->getIngredientByIngredientName($menuOrIngredientName);\n $currentRowFor = 'Ingredient';\n }\n\n //get next menu or ingredient\n $isNextMenuOrIngredient = htmlspecialchars(trim($objWorksheet->getCellByColumnAndRow(0, $i+1)->getValue()));\n\n // if any record is not found then set this message\n if ($record==NULL) {\n if ($arrayerror == '') {\n $arrayerror.=\"Row Number $i column B required & must be valid menu or ingredient name\";\n } else {\n $arrayerror.=\"<br>Row Number $i column B required & must be valid menu or ingredient name\";\n }\n }\n\n\n // //it sets message when it's not menu and ingredient as well\n if ($menuOrIngredient!=\"FM\" && $menuOrIngredient!=\"IG\") {\n if ($arrayerror == '') {\n $arrayerror.=\"Row Number $i column A required & must be 'FM' or 'IG'\";\n } else {\n $arrayerror.=\"<br>Row Number $i column A required & must be 'FM' or 'IG'\";\n }\n }\n\n if ($menuOrIngredient == 'IG' && ($consumption == null || $consumption == '' || !is_numeric($consumption))) {\n if ($arrayerror == '') {\n $arrayerror.=\" $i Row Number column C required, it must be numeric\";\n } else {\n $arrayerror.=\"<br> $i Row Number column C required, it must be numeric\";\n }\n }\n\n //it sets message when food menu number is greater than 10\n if ($totalFoodMenuToUpload>10) {\n if ($arrayerror == '') {\n $arrayerror.=\"You can not upload more than 10 food menus at a time.\";\n } else {\n $arrayerror.=\"<br>You can not upload more than 10 food menus at a time.\";\n }\n }\n\n //it checks next one is food menu or ingredient. if current one is food menu and next one\n //is food menu then it means current food menu doesn't have ingredients\n if($menuOrIngredient=='FM' && $isNextMenuOrIngredient=='FM'){\n if ($arrayerror == '') {\n $arrayerror.=\"row number $i is a Food Menu, no ingredient found for $menuOrIngredientName\";\n } else {\n $arrayerror.=\"<br>row number $i is a Food Menu, no ingredient found for $menuOrIngredientName\";\n }\n }\n }\n if ($arrayerror == '') {\n if(!is_null($this->input->post('remove_previous'))){\n $this->db->query(\"TRUNCATE table `tbl_food_menus_ingredients`\");\n }\n for ($i = 3; $i <= $totalrows; $i++) {\n $menuOrIngredient = htmlspecialchars(trim($objWorksheet->getCellByColumnAndRow(0, $i)->getValue()));\n $menuOrIngredientName = htmlspecialchars(trim($objWorksheet->getCellByColumnAndRow(1, $i)->getValue()));\n $consumption = null;\n if($menuOrIngredient=='FM'){\n $food_menu_record = $this->Common_model->getMenuByMenuName($menuOrIngredientName);\n $info_session['food_id_custom'] = $food_menu_record->id;\n $this->session->set_userdata($info_session);\n }else{\n $ingredient_record = $this->Common_model->getIngredientByIngredientName($menuOrIngredientName);\n $consumption = htmlspecialchars(trim($objWorksheet->getCellByColumnAndRow(2, $i)->getValue()));\n $food_menu_ingredient_info = array();\n $food_menu_ingredient_info['ingredient_id'] = $ingredient_record->id;\n $food_menu_ingredient_info['consumption'] = $consumption;\n $food_menu_ingredient_info['food_menu_id'] = $this->session->userdata('food_id_custom');\n $food_menu_ingredient_info['user_id'] = $this->session->userdata('user_id');\n $food_menu_ingredient_info['company_id'] = $this->session->userdata('company_id');\n $food_menu_ingredient_info['del_status'] = 'Live';\n $this->Common_model->insertInformation($food_menu_ingredient_info, \"tbl_food_menus_ingredients\");\n }\n }\n unlink(FCPATH . 'asset/excel/' . $file_name); //File Deleted After uploading in database .\n $this->session->set_flashdata('exception', 'Imported successfully!');\n redirect('foodMenu/foodMenus');\n } else {\n unlink(FCPATH . 'asset/excel/' . $file_name); //File Deleted After uploading in database .\n $this->session->set_flashdata('exception_err', \"Required Data Missing:$arrayerror\");\n }\n }else{\n unlink(FCPATH . 'asset/excel/' . $file_name); //File Deleted After uploading in database .\n $this->session->set_flashdata('exception_err', \"You can not upload more than 10 food menus at a time.\");\n }\n } else {\n unlink(FCPATH . 'asset/excel/' . $file_name); //File Deleted After uploading in database .\n $this->session->set_flashdata('exception_err', \"No entry found.\");\n }\n } else {\n $error = $this->upload->display_errors();\n $this->session->set_flashdata('exception_err', \"$error\");\n }\n } else {\n $this->session->set_flashdata('exception_err', \"We can not accept other files, please download the sample file 'Food_Menu_Ingredients_Upload.xlsx', fill it up properly and upload it or rename the file name as 'Food_Menu_Ingredients_Upload.xlsx' then fill it.\");\n }\n } else {\n $this->session->set_flashdata('exception_err', 'File is required');\n }\n redirect('foodMenu/uploadFoodMenuIngredients');\n }", "title": "" }, { "docid": "5e190b0c6470b355d4461588152de448", "score": "0.6450716", "text": "function file_import_execute() {\n\t\t$this->load->library('excel_reader');\n\n\t\t// Set output Encoding.\n\t\t$this->excel_reader->setOutputEncoding('CP1251');\n\n\t\t$this->excel_reader->read($this->session->userdata('file_upload'));\n\n\t\t// Sheet 1\n\t\t$excel = $this->excel_reader->sheets[0] ;\n\n\t\t// is it utensil template file?\n\t\tif($excel['cells'][1][1] == 'Purchase Req. No' && $excel['cells'][1][3] == 'Material No.') {\n\n\t\t\t$this->db->trans_start();\n\n\t\t\t$j = 0; // utensil_header number, started from 1, 0 assume no data\n\t\t\tfor ($i = 2; $i <= $excel['numRows']; $i++) {\n\t\t\t\t$x = $i - 1; // to check, is it same utensil header?\n\n\t\t\t \t$item_group_code = 'all';\n $request_reason = $excel['cells'][$i][2];\n\t\t\t\t\t$material_no = $excel['cells'][$i][3];\n\t\t\t\t\t$requirement_qty = $excel['cells'][$i][4];\n\n\n\n\t\t\t\t// check utensil header\n\t\t\t\tif($excel['cells'][$i][1] != $excel['cells'][$x][1]) {\n if($utensil_header_temp = $this->m_general->sap_item_groups_select_all_utensil($this->l_general->leftstr($request_reason,1))) {\n $j++;\n $object['utensil_headers'][$j]['created_date'] = $this->m_general->posting_date_select_max();\n $object['utensil_headers'][$j]['request_reason'] = $request_reason;\n \t$object['utensil_headers'][$j]['plant'] = $this->session->userdata['ADMIN']['plant'];\n \t\t\t$object['utensil_headers'][$j]['id_utensil_plant'] = $this->m_utensil->id_utensil_plant_new_select($object['utensil_headers'][$j]['plant'],$object['utensil_headers'][$j]['created_date']);\n \t\t\t$object['utensil_headers'][$j]['storage_location'] = $this->session->userdata['ADMIN']['storage_location'];\n \t\t\t$object['utensil_headers'][$j]['status'] = '1';\n \t\t\t$object['utensil_headers'][$j]['item_group_code'] = $item_group_code;\n \t\t\t$object['utensil_headers'][$j]['id_user_input'] = $this->session->userdata['ADMIN']['admin_id'];\n \t\t\t$object['utensil_headers'][$j]['filename'] = $upload['file_name'];\n\n\t\t\t\t\t\t$id_utensil_header = $this->m_utensil->utensil_header_insert($object['utensil_headers'][$j]);\n \t$utensil_header_exist = TRUE;\n\t\t\t\t\t\t$k = 1; // utensil_detail number\n\t\t\t\t\t\t} else {\n \t $utensil_header_exist = FALSE;\n\t\t\t\t\t\t}\n }\n\n\t\t\t\tif($utensil_header_exist) {\n if ($utensil_detail_temp = $this->m_general->sap_item_select_by_item_code($material_no)){\n\t\t\t\t\t \t$object['utensil_details'][$j][$k]['id_utensil_header'] = $id_utensil_header ;\n\t\t\t\t\t \t$object['utensil_details'][$j][$k]['id_utensil_h_detail'] = $k;\n\n\t\t\t\t\t\t\t$object['utensil_details'][$j][$k]['material_no'] = $material_no;\n\t\t\t\t\t\t\t$object['utensil_details'][$j][$k]['material_desc'] = $utensil_detail_temp['MAKTX'];\n\n $item_lead_time = $this->m_utensil->sap_item_lead_time_select($material_no);\n\t\t\t\t\t\t\t$object['utensil_details'][$j][$k]['lead_time'] = $item_lead_time['LEAD_TIME'];\n $delivery_date = date(\"Y-m-d H:i:s\");\n $delivery_date = $this->l_general->str_to_date(date(\"d-m-Y\",strtotime($delivery_date) + ($item_lead_time['LEAD_TIME'] * (60 * 60 * 24))));\n\t\t\t\t\t\t\t$object['utensil_details'][$j][$k]['delivery_date'] = $delivery_date;\n\n\t\t\t\t\t\t $object['utensil_details'][$j][$k]['requirement_qty'] = $requirement_qty;\n\t\t\t\t\t\t\t$object['utensil_details'][$j][$k]['uom'] = $utensil_detail_temp['UNIT'];\n\t\t\t\t\t\t$id_utensil_detail = $this->m_utensil->utensil_detail_insert($object['utensil_details'][$j][$k]);\n\n\t\t\t\t\t\t$k++;\n }\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t$this->db->trans_complete();\n\n\t\t\t$object['refresh'] = 1;\n\t\t\t$object['refresh_text'] = 'Data Utensil berhasil di-upload';\n\t\t\t$object['refresh_url'] = $this->session->userdata['PAGE']['utensil_browse_result'];\n\t\t\t//redirect('member_browse');\n\n\t\t\t$this->template->write_view('content', 'refresh', $object);\n\t\t\t$this->template->render();\n\n\t\t} else {\n\n\t\t\t\t$object['refresh_text'] = 'File Excel yang Anda upload bukan file Utensil atau file tersebut rusak. Umumnya karena di dalam file diberi warna baik pada teks maupun cell. Harap periksa kembali file Excel Anda.<br><br>SARAN: Coba pilih semua teks dan ubah warna menjadi \"Automatic\". Sebaiknya tidak ada warna pada teks, kolom dan baris dalam file Excel Anda.';\n\t\t\t\t$object['refresh_url'] = 'utensil/browse_result/0/0/0/0/0/0/0/10';\n\t\t\t\t$object['jag_module'] = $this->jagmodule;\n\t\t\t\t$object['error_code'] = '010';\n\t\t\t\t$object['page_title'] = 'Error '.strtoupper($object['jag_module']['web_module']).': '.$object['jag_module']['web_trans'];\n\t\t\t\t$this->template->write_view('content', 'errorweb', $object);\n\t\t\t\t$this->template->render();\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "b8ffef1772bbead0cc4c8701da54d2c7", "score": "0.64504296", "text": "public function import(){\n try{\n if(\\Storage::disk('local')->exists('/public/facultades.xls')){\n Excel::load('public/storage/facultades.xls', function($reader) {\n foreach ($reader->get() as $book) {\n $facultad = new Faculty();\n $facultad->nombre = $book->nombre;\n $facultad->university_id = intval($book->university_id);\n $facultad->save();\n }\n });\n\n \\Alert::message('Facultades importadas exitosamente', 'success');\n return redirect('/facultades');\n }else{\n \\Alert::message('El archivo facultades.csv no existe, importalo por favor', 'danger');\n return redirect('/facultades');\n }\n }catch(Exception $e){\n \\Alert::message('ocurrio un error, por favor revise el log', 'danger');\n \n $archivo = fopen(\"storage/facultades_log.txt\", \"a\");\n fwrite($archivo, \"===================== ERROR ===========================\");\n fwrite($archivo, \"\\r\\n\". $e->getMessage().\"\\r\\n\");\n fwrite($archivo, \"=======================================================\");\n fclose($archivo);\n return redirect('/facultades');\n }\n }", "title": "" }, { "docid": "d753ee1ec4b4238ee41dd43e19a09331", "score": "0.64255965", "text": "public function importExcel2(Request $request)\n {\n $asuransi = DB::table('asuransi')->where('kode_prod', $request->jenis_asuransi)->first();\n // $kode_prod = $request->jenis_asuransi;\n // $kode_asu = $asuransi->kode_asu;\n // $kode_broker = $asuransi->kode_broker;\n // $namaasuransi = $asuransi->nama;\n $isFieldExist = !empty($request->tanggal_upload);\n $file = $request->file('file_upload_polis');\n config(['excel.import.startRow' => 2 ]);\n $dataSheet = Excel::load($request->file('file_upload_polis'))->get();\n // $insert = array();\n\n $insertRowExist = array();\n $insert = array();\n foreach ($dataSheet as $key => $value) {\n if($value[\"no._polis\"] != null){\n DB::table('produksi_ajk')->where('debitur', $value[\"debitur\"])->update([\n \"no_polis\"=>$value[\"no._polis\"],\n 'tgl_polis' => date('Y-m-d'),\n 'sts_polis' => 1,\n 'posisi' => 4,\n ]);\n }\n }\n $response = array(\n 'status' => 'success',\n 'message' => 'Sukses Update Polis',\n );\n return response()->json($response); \n \t}", "title": "" }, { "docid": "a8384bd5083be5d82e857f4524c2c399", "score": "0.6416122", "text": "private function import(){\n Bundle::start('iapplication');\n \n $src = path('app').'\\data\\immigration.csv';\n $row = 0;\n if (($handle = fopen($src, 'r')) !== FALSE){\n \n while (($data = fgetcsv($handle, 1000, \",\")) !== FALSE){\n $row++;\n if ($row == 1)\n continue;\n \n if(count($data) == 11){\n $application_filed = $data[1];\n $application_filed = date('Y-m-d', strtotime($application_filed));\n $cash_out = $this->convertDate($data[2]);\n $file_number = $this->convertDate($data[3]);\n $me = $this->convertDate($data[4]);\n $mes = $this->convertDate($data[5]);\n $mer = $this->convertDate($data[6]);\n $office = $data[7];\n $transfer = $data[8];\n $pr = $this->convertDate($data[9]);\n $type = $data[10];\n \n //save the record\n ImmigrationApplication::create(array('user_id' => 0, 'type' => $type, 'genuine' => 1, 'amplified' => 0,\n 'sent' => $application_filed, 'co' => $cash_out, 'fn' => $file_number, 'me' => $me,\n 'mes' => $mes, 'mer' => $mer, 'office' => $office, 'transfer' => $transfer, 'pr' => $pr,\n ));\n }\n }\n }\n fclose($handle);\n }", "title": "" }, { "docid": "1c1692b3a305803a185ac58def8064b7", "score": "0.6411466", "text": "public function doImport(Request $request) {\n if(!$this->model) abort(404);\n try {\n $validator = Validator::make($request->all(), [\n 'file' => 'required|file|mimes:csv,txt'\n ]);\n\n if ($validator->fails()) {\n return redirect($this->table_name.'/import')->with('error', $validator->errors()->first());\n }\n $filename = $this->table_name;\n $data = $this->csv_to_array($request->file);\n\n $this->model->insert($data);\n return redirect($this->table_name.'/import')->with('success', Str::title(Str::singular($this->table_name)).' imported!');\n } catch (Exception $e) {\n return redirect($this->table_name.'/import')->with('error', $e->getMessage());\n }\n }", "title": "" }, { "docid": "704917267666740c137dd46775e38cbe", "score": "0.6409986", "text": "public function ExcelDataAddFoodmenus() {\n $company_id = $this->session->userdata('company_id');\n if ($_FILES['userfile']['name'] != \"\") {\n if ($_FILES['userfile']['name'] == \"Food_Menu_Upload.xlsx\") {\n //Path of files were you want to upload on localhost (C:/xampp/htdocs/ProjectName/uploads/excel/)\n $configUpload['upload_path'] = FCPATH . 'asset/excel/';\n $configUpload['allowed_types'] = 'xls|xlsx';\n $configUpload['max_size'] = '5000';\n $this->load->library('upload', $configUpload);\n if ($this->upload->do_upload('userfile')) {\n $upload_data = $this->upload->data(); //Returns array of containing all of the data related to the file you uploaded.\n $file_name = $upload_data['file_name']; //uploded file name\n $extension = $upload_data['file_ext']; // uploded file extension\n //$objReader =PHPExcel_IOFactory::createReader('Excel5'); //For excel 2003\n $objReader = PHPExcel_IOFactory::createReader('Excel2007'); // For excel 2007\n //Set to read only\n $objReader->setReadDataOnly(true);\n //Load excel file\n $objPHPExcel = $objReader->load(FCPATH . 'asset/excel/' . $file_name);\n $totalrows = $objPHPExcel->setActiveSheetIndex(0)->getHighestRow(); //Count Numbe of rows avalable in excel\n $objWorksheet = $objPHPExcel->setActiveSheetIndex(0);\n\n //loop from first data untill last data\n if ($totalrows > 2 && $totalrows < 54) {\n $arrayerror = '';\n for ($i = 4; $i <= $totalrows; $i++) {\n $name = htmlspecialchars(trim($objWorksheet->getCellByColumnAndRow(0, $i)->getValue()));\n $code = htmlspecialchars(trim($objWorksheet->getCellByColumnAndRow(1, $i)->getValue())); //Excel Column 1\n $category = htmlspecialchars(trim($objWorksheet->getCellByColumnAndRow(2, $i)->getValue())); //Excel Column 2\n $sale_prices = htmlspecialchars(trim($objWorksheet->getCellByColumnAndRow(3, $i)->getValue())); //Excel Column 3\n $vat_name = htmlspecialchars(trim($objWorksheet->getCellByColumnAndRow(4, $i)->getValue())); //Excel Column 4\n $vat_percent = htmlspecialchars(trim($objWorksheet->getCellByColumnAndRow(5, $i)->getValue())); //Excel Column 5\n $description = htmlspecialchars(trim($objWorksheet->getCellByColumnAndRow(6, $i)->getValue())); //Excel Column 5\n $isVegItem = htmlspecialchars(trim($objWorksheet->getCellByColumnAndRow(7, $i)->getValue())); //Excel Column 7\n $isBeverage = htmlspecialchars(trim($objWorksheet->getCellByColumnAndRow(8, $i)->getValue())); //Excel Column 8\n $isBar = htmlspecialchars(trim($objWorksheet->getCellByColumnAndRow(9, $i)->getValue())); //Excel Column 8\n\n if ($name == '') {\n if ($arrayerror == '') {\n $arrayerror.=\"Row Number $i column A required\";\n } else {\n $arrayerror.=\"<br>Row Number $i column A required\";\n }\n }\n\n if ($code == '') {\n if ($arrayerror == '') {\n $arrayerror.=\"Row Number $i column B required\";\n } else {\n $arrayerror.=\"<br>Row Number $i column B required\";\n }\n }\n\n if ($category == '') {\n if ($arrayerror == '') {\n $arrayerror.=\"Row Number $i column C required\";\n } else {\n $arrayerror.=\"<br>Row Number $i column C required\";\n }\n }\n\n if ($sale_prices == '' || !is_numeric($sale_prices)) {\n if ($arrayerror == '') {\n $arrayerror.=\"Row Number $i column D required or can not be text\";\n } else {\n $arrayerror.=\"<br>Row Number $i column D required or can not be text\";\n }\n }\n $tmp_vat_name = explode(',',$vat_name);\n $tmp_vat_percent = explode(',',$vat_percent);\n\n if ($vat_name || $tmp_vat_percent) {\n if(sizeof($tmp_vat_name) != sizeof($tmp_vat_percent))\n\n if ($arrayerror == '') {\n $arrayerror.=\"Row Number $i column E & F does not match\";\n } else {\n $arrayerror.=\"<br>Row Number $i column E & F does not match\";\n }\n }\n\n if (($isVegItem == '')) {\n if ($arrayerror == '') {\n $arrayerror.=\"Row Number $i column H required\";\n } else {\n $arrayerror.=\"<br>Row Number $i column H required\";\n }\n }\n\n if (($isVegItem != 'Veg Yes') && ($isVegItem != 'Veg No')) {\n if ($arrayerror == '') {\n $arrayerror.=\"Row Number $i column H required or should be Veg Yes or Veg No\";\n } else {\n $arrayerror.=\"<br>Row Number $i column required H required or should be Veg Yes or Veg No\";\n }\n }\n\n if (($isBeverage == '')) {\n if ($arrayerror == '') {\n $arrayerror.=\"Row Number $i column H required\";\n } else {\n $arrayerror.=\"<br>Row Number $i column H required\";\n }\n }\n\n if (($isBeverage != 'Bev Yes') && ($isBeverage != 'Bev No')) {\n if ($arrayerror == '') {\n $arrayerror.=\"Row Number $i column H required or should be Bev Yes or Bev No\";\n } else {\n $arrayerror.=\"<br>Row Number $i column required H required or should be Bev Yes or Bev No\";\n }\n }\n\n if (($isBar == '')) {\n if ($arrayerror == '') {\n $arrayerror.=\"Row Number $i column H required\";\n } else {\n $arrayerror.=\"<br>Row Number $i column H required\";\n }\n }\n\n if (($isBar != 'Bar Yes') && ($isBar != 'Bar No')) {\n if ($arrayerror == '') {\n $arrayerror.=\"Row Number $i column H required or should be Bar Yes or Bar No\";\n } else {\n $arrayerror.=\"<br>Row Number $i column required H required or should be Bar Yes or Bar No\";\n }\n }\n }\n if ($arrayerror == '') {\n if(!is_null($this->input->post('remove_previous'))){\n $this->db->query(\"TRUNCATE table `tbl_food_menus`\");\n }\n\n $company = getCompanyInfo();\n $outlet_taxes = json_decode($company->tax_setting);\n\n for ($i = 4; $i <= $totalrows; $i++) {\n $name = htmlspecialchars(trim($objWorksheet->getCellByColumnAndRow(0, $i)->getValue()));\n $code = htmlspecialchars(trim($objWorksheet->getCellByColumnAndRow(1, $i)->getValue())); //Excel Column 1\n $category = htmlspecialchars(trim($objWorksheet->getCellByColumnAndRow(2, $i)->getValue())); //Excel Column 2\n $sale_prices = htmlspecialchars(trim($objWorksheet->getCellByColumnAndRow(3, $i)->getValue())); //Excel Column 3\n $vat_name = htmlspecialchars(trim($objWorksheet->getCellByColumnAndRow(4, $i)->getValue())); //Excel Column 4\n $vat_percent = htmlspecialchars(trim($objWorksheet->getCellByColumnAndRow(5, $i)->getValue())); //Excel Column 5\n $description = htmlspecialchars(trim($objWorksheet->getCellByColumnAndRow(6, $i)->getValue())); //Excel Column 5\n $isVegItem = htmlspecialchars(trim($objWorksheet->getCellByColumnAndRow(7, $i)->getValue())); //Excel Column 5\n $isBeverage = htmlspecialchars(trim($objWorksheet->getCellByColumnAndRow(8, $i)->getValue())); //Excel Column 5\n $isBar = htmlspecialchars(trim($objWorksheet->getCellByColumnAndRow(9, $i)->getValue())); //Excel Column 5\n $image = htmlspecialchars(trim($objWorksheet->getCellByColumnAndRow(10, $i)->getValue())); //Excel Column 5\n\n $tmp_vat_name = explode(',',$vat_name);\n $tmp_vat_percent = explode(',',$vat_percent);\n\n $tax_information = array();\n foreach($outlet_taxes as $key=>$value){\n foreach($tmp_vat_name as $key1=>$value1){\n if($value->tax==$value1){\n $get_tax = isset($tmp_vat_percent[$key1]) && $tmp_vat_percent[$key1]?$tmp_vat_percent[$key1]:0;\n $single_info = array(\n 'tax_field_id' => $value->id,\n 'tax_field_outlet_id' => 0,\n 'tax_field_company_id' => 1,\n 'tax_field_name' => $value->tax,\n 'tax_field_percentage' => $get_tax\n );\n array_push($tax_information,$single_info);\n }\n }\n }\n $ct_id = $this->get_foodmenu_ct_id_byname($category);\n $fmc_info = array();\n $fmc_info['name'] = $name;\n $fmc_info['code'] = $code;\n $fmc_info['category_id'] = $ct_id;\n $fmc_info['sale_price'] = $sale_prices;\n $fmc_info['description'] = $description;\n $fmc_info['veg_item'] = $isVegItem;\n $fmc_info['beverage_item'] = $isBeverage;\n $fmc_info['bar_item'] = $isBar;\n if($image){\n $fmc_info['photo'] = $image;\n }\n $fmc_info['tax_information'] = json_encode($tax_information);\n $fmc_info['user_id'] = $this->session->userdata('user_id');\n $fmc_info['company_id'] = $this->session->userdata('company_id');\n $this->Common_model->insertInformation($fmc_info, \"tbl_food_menus\");\n }\n unlink(FCPATH . 'asset/excel/' . $file_name); //File Deleted After uploading in database .\n $this->session->set_flashdata('exception', 'Imported successfully!');\n redirect('foodMenu/foodMenus');\n } else {\n unlink(FCPATH . 'asset/excel/' . $file_name); //File Deleted After uploading in database .\n $this->session->set_flashdata('exception_err', \"Required Data Missing:$arrayerror\");\n }\n } else {\n unlink(FCPATH . 'asset/excel/' . $file_name); //File Deleted After uploading in database .\n $this->session->set_flashdata('exception_err', \"Entry is more than 50 or No entry found.\");\n }\n } else {\n $error = $this->upload->display_errors();\n $this->session->set_flashdata('exception_err', \"$error\");\n }\n } else {\n $this->session->set_flashdata('exception_err', \"We can not accept other files, please download the sample file 'Food_Menu_Upload.xlsx', fill it up properly and upload it or rename the file name as 'Food_Menu_Upload.xlsx' then fill it.\");\n }\n } else {\n $this->session->set_flashdata('exception_err', 'File is required');\n }\n redirect('foodMenu/uploadFoodMenu');\n }", "title": "" }, { "docid": "bf081f30c57f37fbecdcae55900c5e74", "score": "0.6382379", "text": "function import(){\n\n if(isset($_FILES[\"file\"][\"name\"])){\n\n $path = $_FILES[\"file\"][\"tmp_name\"];\n\n //object baru dari php excel\n $object = PHPExcel_IOFactory::load($path);\n\n //perulangan untuk membaca file excel\n foreach($object->getWorksheetIterator() as $worksheet){\n //row tertinggi\n $highestRow = $worksheet->getHighestRow();\n //colom tertinggi\n $highestColumn \n = $worksheet->getHighestColumn();\n\n for($row=3; $row<=$highestRow; $row++){\n //baca data dari excel berdasar matrik kolom dan baris (kolom,baris)\n $kd_mesin = $worksheet->getCellByColumnAndRow(0, $row)->getValue();\n \n $no_mesin = $worksheet->getCellByColumnAndRow(1, $row)->getValue();\n\n $merk = $worksheet->getCellByColumnAndRow(2, $row)->getValue();\n\n $trak = $worksheet->getCellByColumnAndRow(3, $row)->getValue();\n\n $no_seri = $worksheet->getCellByColumnAndRow(4, $row)->getValue();\n\n $tahun = $worksheet->getCellByColumnAndRow(5, $row)->getValue();\n\n $diameter = $worksheet->getCellByColumnAndRow(6, $row)->getValue();\n\n $gauge = $worksheet->getCellByColumnAndRow(7, $row)->getValue();\n\n $feeder = $worksheet->getCellByColumnAndRow(8, $row)->getValue();\n\n $jml_jarum = $worksheet->getCellByColumnAndRow(9, $row)->getValue();\n\n $kd_benang = $worksheet->getCellByColumnAndRow(10, $row)->getValue();\n\n $status_mesin= $worksheet->getCellByColumnAndRow(11, $row)->getValue();\n\n $data[] = array(\n\n 'kd_mesin' => $kd_mesin,\n\n 'no_mesin' => $no_mesin,\n \n 'merk' => $merk,\n\n 'trak' => $trak,\n\n 'no_seri' => $no_seri,\n \n 'tahun' => $tahun,\n\n 'diameter' => $diameter,\n\n 'gauge' => $gauge,\n \n 'feeder' => $feeder,\n\n 'jml_jarum' => $jml_jarum,\n\n 'kd_benang' => $kd_benang,\n \n 'status_mesin' => $status_mesin\n\n\n );\n\n }\n\n }\n\n $this->MMesin->insertMesin($data);\n\n }\n\n }", "title": "" }, { "docid": "99fc03bb908894c7a102ff8014aaaa43", "score": "0.63792115", "text": "public function assetTemplateimport(Request $request)\n {\n $message = \"\";\n $updated=0;\n //Save excel employees\n if ($request->isMethod('post')) {\n\n //Download\n if ($request->input('catype')==\"Download\") {\n $edata = $request->all();\n if(empty($edata['site_id'])) return redirect()->route('commassets.import')->withErrors('Community Required');\n if(empty($edata['category_id'])) return redirect()->route('commassets.import')->withErrors('Category Required');\n if(empty($edata['asset_id'])) return redirect()->route('commassets.import')->withErrors('Asset Required');\n\n $asset = Asset::where('id',$edata['asset_id'])->first();\n if(!$asset) return redirect()->route('commassets.index')->withErrors('Asset not found');\n\n $template = Template::where('id',$asset->template_id)->first();\n if(!$template) return redirect()->route('commassets.index')->withErrors('Asset Template not found');\n\n $invoicesArray = [];\n // Generate and return the spreadsheet\n Excel::create('asset', function($excel) use ($template) {\n\n // Set the spreadsheet title, creator, and description\n $excel->setTitle('Community Asset');\n $excel->setCreator('Laravel')->setCompany('APARNA');\n $excel->setDescription('Data import file');\n\n $assetArray = []; \n // Define the Excel spreadsheet headers\n //Fields\n $fields = TemplateField::select('label')->where('template_id',$template->id)->where('itype','<>','9')->orderBy('section_id', 'asc')->orderBy('sort', 'asc')->orderBy('label', 'asc')->get(); \n if($fields) {\n $headers = array('Code','Location');\n foreach($fields as $fval) {\n $headers[]=$fval->label;\n }\n $assetArray[] = $headers;\n }\n // Build the spreadsheet, passing in the payments array\n $excel->sheet('sheet1', function($sheet) use ($assetArray) {\n $sheet->fromArray($assetArray, null, 'A1', false, false);\n });\n\n })->download('xlsx');\n }\n\n //Import\n if ($request->input('catype')==\"Upload\") {\n $edata = $request->all();\n $uid = Auth::user()->id;\n\n if(empty($edata['site_id'])) return redirect()->route('commassets.import')->withErrors('Community Required');\n if(empty($edata['category_id'])) return redirect()->route('commassets.import')->withErrors('Category Required');\n if(empty($edata['asset_id'])) return redirect()->route('commassets.import')->withErrors('Asset Required');\n if(!isset($edata['file'])) return redirect()->route('commassets.import')->withErrors('Asset excel required');\n\n $asset = Asset::where('id',$edata['asset_id'])->first();\n if(!$asset) return redirect()->route('commassets.index')->withErrors('Asset not found');\n\n $template = Template::where('id',$asset->template_id)->first();\n if(!$template) return redirect()->route('commassets.index')->withErrors('Asset Template not found'); \n\n //asset fields \n $fields = TemplateField::select('id','itype','ivalids','label','sort')\n ->where('template_id',$template->id)\n ->where('itype','<>','9')\n ->orderBy('section_id', 'asc')\n ->orderBy('sort', 'asc')\n ->orderBy('label', 'asc')->get();\n if(!$fields) return redirect()->route('commassets.index')->withErrors('Asset Template fields not found');\n \n $asset_fields = array();\n if($fields) {\n foreach($fields as $fval) {\n $asset_fields[]=array('id'=>$fval->id,'itype'=>$fval->itype,'ivalids'=>$fval->ivalids);\n }\n }\n\n $filename = 'asset-'.$uid.'-'.uniqid();\n $extension = $request->file('file')->getClientOriginalExtension();\n $extension = strtolower($extension);\n //check extentions xls or xlsx \n if($extension<>\"xls\" && $extension<>\"xlsx\") return redirect()->route('commassets.import')->withErrors('Only xls or xlsx file is allowed!!'); \n\n $file = $request->file('file')->move('tmp',$filename.\".\".$extension);\n $filename_extension = 'tmp/'.$filename.'.'.$extension;\n\n //$filename_extension = 'tmp/emp-5a8bfc2b9f690.xls';\n //$filename_extension = 'tmp/emp-sample.xlsx';\n $updated = 0;\n Config::set('excel.import.heading', 'false');\n $xls_datas = Excel::load($filename_extension, function($reader) { })->toArray();\n\n $cms = array();\n\n if(count($xls_datas) > 0) {\n //echo \"<pre>\";print_r($xls_datas);echo \"</pre>\";\n\n /*\n 0 - Code\n 1 - Location\n */\n $n=0;\n $indx=0;\n //if($xls_datas[0]) $indx=0;\n //else if($xls_datas[1]) $indx=1;\n\n //loop excel\n foreach($xls_datas as $xval) {\n //code\n if(empty($xval[0])) continue;\n //print_r($xval);\n $caID = 0;\n $comm_asset = CommunityAsset::where('site_id',$edata['site_id'])->where('category_id',$edata['category_id'])->where('code', $xval[0])->first();\n if($comm_asset) $caID = $comm_asset->id;\n\n //Save asset\n $etData = [\n 'code' => $xval[0],\n 'name' => $xval[1]?$xval[1]:'',\n 'category_id' => $edata['category_id'],\n 'asset_id' => $edata['asset_id'],\n 'site_id' => $edata['site_id'],\n 'user_id' => Auth::user()->id,\n 'created_at' => date('Y-m-d H:i:s')\n ];\n //print_r($etData);\n //continue;\n if($caID) $comm_asset->update($etData);\n else $caID = CommunityAsset::insertGetId($etData);\n\n //echo \" <br> CAID: $caID <br>\";\n\n //Asset Template Data saving\n $rcols = count($xval);\n //print_r($xval);\n //print_r($asset_fields);\n for($c=2;$c<$rcols;$c++) {\n if(!isset($xval[$c])) continue; \n if(!isset($asset_fields[$c-2])) continue; \n $catfid = $asset_fields[$c-2]['id'];\n //echo \" <br> $c: {$xval[$c]} $catfid \";\n $fval = $xval[$c]?$xval[$c]:'';\n $atval = AssetTemplateValue::where('asset_id',$caID)->where('field_id',$catfid);\n if($atval->count()) {\n $atval->delete();\n }\n if($asset_fields[$c-2]['itype']==\"6\") {\n if($fval) {\n $dt = explode(\"/\", $fval);//d-m-y 012-210\n if(count($dt)==3)$fval=$dt[2].'-'.$dt[1].'-'.$dt[0];\n } \n } else if($asset_fields[$c-2]['itype']==\"7\") {\n if($fval) {\n $dte = explode(\" \", $fval);//d-m-y 012-210\n $dt = explode(\"/\", $dte[0]);//d-m-y 012-210\n if(count($dt)==3) $fval=$dt[2].'-'.$dt[1].'-'.$dt[0].\" \".$dte[1].\":00\";\n } \n }\n $etData = [\n 'asset_id' => $caID,\n 'field_id' => $catfid,\n 'value' => $fval,\n 'created_at' => date('Y-m-d H:i:s')\n ];\n //print_r($etData);\n AssetTemplateValue::create($etData); \n }\n }\n }\n //delete file\n $excelfile = public_path().'/'.$filename_extension;\n if(file_exists($excelfile)) @unlink($excelfile);\n $message = 'Community Assets Uploaded'; \n }\n }\n $assets = array(''=>'Please select');\n $categories = \\App\\AssetType::get()->pluck('name', 'id')->prepend('Please select', '');\n $communities = \\App\\Site::get()->pluck('name', 'id')->prepend('Please select', '');\n return view('community_assets.import', compact('message','communities','categories','assets'));\n }", "title": "" }, { "docid": "e306709414e51a65135cc4e72e2c1242", "score": "0.63746804", "text": "public function importexcel(Request $request){\n $waktu = date('Y-m-d');\n $slice = explode('-',$waktu);\n $hasil = join('',$slice);\n\n $validext = ['xls','xlsx'];\n $extensions = explode('.',$request->file('file')->getClientOriginalName())[1];\n if(!in_array($extensions,$validext)){\n return redirect('/admin/datasiswa')->with('status','Kesalahan File Ekstension,Gagal Import');\n }\n\n //menangkap file dan memasukan ke variable file\n $file = $request->file('file');\n //random nama file\n $namafile = $hasil.$file->getClientOriginalName();\n //upload file ke folder public\n $file->move('file_import',$namafile);\n //import data\n $attr = Excel::import(new DataSiswaImport,public_path('/file_import/'.$namafile));\n if($attr){\n return redirect('/admin/datasiswa')->with('status','Import Berhasil');\n }else{\n return redirect('/admin/datasiswa')->with('status','Import Gagal');\n }\n }", "title": "" }, { "docid": "5d1c66c392bdd85343321bee05a527ac", "score": "0.63688076", "text": "public function importTranslation() {\n\n $uploadedPath = '';\n $titleRow = $dataArray = $updateArray = $insertArray = [];\n $dataKeys = ['0' => 'code'];\n //$filepath = WWW_ROOT . DS . \"TRANSLATIONS.xls\"; // for testing purpose \n $allowedMimeTypes = ['xls' => 'application/vnd.ms-excel', 'xls2' => 'application/vnd.ms-office',\n 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'];\n\n $validateUploadProcess = AppServiceUtil::processFileUpload($_FILES, $allowedMimeTypes); //validate uploaded file \n\n if (isset($validateUploadProcess['error'])) {\n return AppServiceUtil::errResponse($validateUploadProcess['error']); // returns error code if any error exists \n } else {\n $uploadedPath = $validateUploadProcess[0];\n }\n $objPHPExcel = AppServiceUtil::readXlsOrCsv($uploadedPath, false); // return object after reading xls file\n\n $langList = $this->LanguagesObj->getList(['id', 'code'], []); // get list of language codes\n $translationsCodes = $this->TransTblObj->getList(['id', 'code'], []); // get list of translation codes\n $langCodeList = array_merge($dataKeys, $langList);\n $user = $this->Auth->user();\n\n // Iterate through Worksheets\n foreach ($objPHPExcel->getWorksheetIterator() as $worksheet) {\n\n $highestRow = $worksheet->getHighestRow(); // e.g. 10\n $highestColumn = $worksheet->getHighestColumn(); // e.g 'F'\n $highestColumnIndex = \\PHPExcel_Cell::columnIndexFromString($highestColumn);\n $startRows = 1;\n\n // get prepared data for all rows\n for ($row = $startRows; $row <= $highestRow; ++$row) {\n for ($col = 0; $col < $highestColumnIndex; ++$col) {\n $cell = $worksheet->getCellByColumnAndRow($col, $row);\n $val = $cell->getValue();\n\n if ($row == 1) {\n $titleRow[] = strtolower($val);\n } else if ($row > $startRows) {\n $dataArray[$row][] = $val;\n } else {\n continue;\n }\n }\n // validate format of sheet at row 1 \n if ($row == 1) {\n $errorFormat = $this->validateSheetFormat($titleRow, $langCodeList);\n if (isset($errorFormat['error'])) {\n return AppServiceUtil::errResponse($errorFormat['error']);\n }\n }\n\n // code is mandatory title in sheet \n if ($row > $startRows) {\n // Attach column names to their values\n $dataArray[$row] = array_combine(array_replace($titleRow, $dataKeys), $dataArray[$row]);\n // Only pick existing language columns in DB and neglect others \n $dataArray[$row] = array_intersect_key($dataArray[$row], array_flip($langCodeList));\n $dataArray[$row]['modified_user_id'] = $user['id'];\n\n if (!empty($dataArray[$row]['code'])) {\n if (in_array($dataArray[$row]['code'], $translationsCodes)) { // MODIFY/UPDATE case \n $dataArray[$row]['id'] = array_search($dataArray[$row]['code'], $translationsCodes);\n $this->TransTblObj->updateTranslation($dataArray[$row]);\n } else { // INSERT case \n $dataArray[$row]['created_user_id'] = $user['id'];\n $this->TransTblObj->insertTranslation($dataArray[$row]);\n }\n }\n }\n }\n }\n\n\n return true;\n }", "title": "" }, { "docid": "c0232171480f6079678c90af1f636dfa", "score": "0.6368537", "text": "function ImportFromExcel($uploadfile, $strOriginalTableName, $ext, $keys, &$keys_present, &$total_records, &$error_message, &$goodlines, $pageObject, $cipherer)\n{\n\tglobal $conn, $strTableName;\n\t\n\t$autoinc = false;\n\t$ret = 1;\n\t\n\t$data = openImportExcelFile($uploadfile);\n\t\n\t// populate field names array\n\t\n\t$fields = array();\n\t\n\t$fields = getImportExcelFields($data);\n\t\n\t$fields = getFieldNamesByHeaders($fields, $strOriginalTableName, $ext);\t\n\tif($fields == null) // if error happened\n\t\treturn;\n\t\n\t$keys_present=1;\n\t\n\tfor($k=0; $k<count($keys); $k++)\n\t{\n\t\tif (!in_array(RemoveFieldWrappers($keys[$k]),$fields))\n\t\t{\n\t\t\t$keys_present=0;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t\tif(in_array(\"Id\",$fields))\n\t\t$autoinc=true;\n\t\t\t\t\t\n\t\t\t$ret = getImportExcelData($data, $fields, $error_message, $goodlines, $keys, $keys_present, $strOriginalTableName, $pageObject, $cipherer, $autoinc, $total_records);\n\t\t\n\t\n\treturn $ret;\n\n}", "title": "" }, { "docid": "d594d51cf41977f8b0037d8a5a0dc03d", "score": "0.63575464", "text": "public function import_excel($dataarray)\r\n {\r\n for($i=1;$i<count($dataarray);$i++){\r\n $h = $_SESSION['uname'];\r\n $i = date('Y-m-d H:i:s');\r\n $data = array(\r\n 'veh_name'=>$dataarray[$i]['veh_name'],\r\n 'veh_type'=>$dataarray[$i]['veh_type'],\r\n 'veh_insert' => $i,\r\n 'veh_update' => $i,\r\n 'veh_user' => $h\r\n );\r\n $this->db->insert('vehicles', $data);\r\n }\r\n }", "title": "" }, { "docid": "17fe69dff9c850847da248563076fc13", "score": "0.6329375", "text": "public function upload(Request $request) {\n dispatch(new ExcelImportJob())->onQueue('read_file_excel');\n return back()->with('success','Job ejecutado Correctamente');\n }", "title": "" }, { "docid": "aa71ec984c226f9cf8d89e565ec0a2bc", "score": "0.6319337", "text": "function file_import_execute() {\n\t\t$this->load->library('excel_reader');\n\n\t\t// Set output Encoding.\n\t\t$this->excel_reader->setOutputEncoding('CP1251');\n\n\t\t$this->excel_reader->read($this->session->userdata('file_upload'));\n\n\t\t// Sheet 1\n\t\t$excel = $this->excel_reader->sheets[0] ;\n\n\t\t// is it pr template file?\n\t\t \tif($excel['cells'][1][1] == 'Purchase Req. No' && $excel['cells'][1][2] == 'Request reason' && $excel['cells'][1][3] == 'Material No.') {\n\n\t\t\t$this->db->trans_start();\n\n\t\t\t$j = 0; // pr_header number, started from 1, 0 assume no data\n\t\t\tfor ($i = 2; $i <= $excel['numRows']; $i++) {\n\t\t\t\t$x = $i - 1; // to check, is it same pr header?\n\n\t\t\t \t$item_group_code = 'all';\n $request_reason = $excel['cells'][$i][2];\n\t\t\t\t\t$material_no = $excel['cells'][$i][3];\n\t\t\t\t\t$quantity = $excel['cells'][$i][4];\n\n\n\n\t\t\t\t// check pr header\n\t\t\t\tif($excel['cells'][$i][1] != $excel['cells'][$x][1]) {\n\n $j++;\n\t\t\t\t \tif($pr_detail_temp = $this->m_general->sap_item_groups_select_all_pr()) {\n\n \t\t\t\t\t \t$object['pr_headers'][$j]['created_date'] = $this->m_general->posting_date_select_max();\n $object['pr_headers'][$j]['request_reason'] = $request_reason;\n\t\t\t\t\t\t\t$object['pr_headers'][$j]['plant'] = $this->session->userdata['ADMIN']['plant'];\n\t\t\t\t\t\t\t$object['pr_headers'][$j]['id_pr_plant'] = $this->m_pr->id_pr_plant_new_select($object['pr_headers'][$j]['plant'],$object['pr_headers'][$j]['created_date']);\n\t\t\t\t\t\t\t$object['pr_headers'][$j]['storage_location'] = $this->session->userdata['ADMIN']['storage_location'];\n\t\t\t\t\t\t\t$object['pr_headers'][$j]['status'] = '1';\n $delivery_date = date(\"Y-m-d H:i:s\");\n $delivery_date = $this->l_general->str_to_date(date(\"d-m-Y\",strtotime($delivery_date)));\n $object['pr_headers'][$j]['delivery_date'] = $delivery_date;\n\t\t\t\t\t\t\t$object['pr_headers'][$j]['item_group_code'] = $item_group_code;\n\t\t\t\t\t\t\t$object['pr_headers'][$j]['id_user_input'] = $this->session->userdata['ADMIN']['admin_id'];\n\t\t\t\t\t\t\t$object['pr_headers'][$j]['filename'] = $upload['file_name'];\n\n\t\t\t\t\t\t$id_pr_header = $this->m_pr->pr_header_insert($object['pr_headers'][$j]);\n\n \t$pr_header_exist = TRUE;\n\t\t\t\t\t\t$k = 1; // pr_detail number\n\n\t\t\t\t\t} else {\n \t$pr_header_exist = FALSE;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif($pr_header_exist) {\n\n\t\t\t\t\tif($pr_detail_temp = $this->m_general->sap_item_select_by_item_code($material_no)) {\n $object['pr_details'][$j][$k]['id_pr_header'] = $id_pr_header;\n\t\t\t\t\t\t$object['pr_details'][$j][$k]['id_pr_h_detail'] = $k;\n\n\t\t\t\t\t\t\t$object['pr_details'][$j][$k]['material_no'] = $material_no;\n\t\t\t\t\t\t\t$object['pr_details'][$j][$k]['material_desc'] = $pr_detail_temp['MAKTX'];\n\t\t\t\t\t\t $object['pr_details'][$j][$k]['requirement_qty'] = $quantity;\n\t\t\t\t\t\t // $object['pr_details'][$j][$k]['price'] = $price;\n\t\t\t\t\t\t\t$object['pr_details'][$j][$k]['uom'] = $pr_detail_temp['UNIT'];\n\n\n\t\t\t\t\t\t$id_pr_detail = $this->m_pr->pr_detail_insert($object['pr_details'][$j][$k]);\n\n\t\t\t\t\t\t$k++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t$this->db->trans_complete();\n\n\t\t\t$object['refresh'] = 1;\n\t\t\t$object['refresh_text'] = 'Data Standard Stock berhasil di-upload';\n\t\t\t$object['refresh_url'] = $this->session->userdata['PAGE']['pr_browse_result'];\n\t\t\t//redirect('member_browse');\n\n\t\t\t$this->template->write_view('content', 'refresh', $object);\n\t\t\t$this->template->render();\n\n\t\t} else {\n\n\t\t\t\t$object['refresh_text'] = 'File Excel yang Anda upload bukan file Request Standard Stock atau file tersebut rusak. Umumnya karena di dalam file diberi warna baik pada teks maupun cell. Harap periksa kembali file Excel Anda.<br><br>SARAN: Coba pilih semua teks dan ubah warna menjadi \"Automatic\". Sebaiknya tidak ada warna pada teks, kolom dan baris dalam file Excel Anda.';\n\t\t\t\t$object['refresh_url'] = 'pr/browse_result/0/0/0/0/0/0/0/10';\n\t\t\t\t$object['jag_module'] = $this->jagmodule;\n\t\t\t\t$object['error_code'] = '011';\n\t\t\t\t$object['page_title'] = 'Error '.strtoupper($object['jag_module']['web_module']).': '.$object['jag_module']['web_trans'];\n\t\t\t\t$this->template->write_view('content', 'errorweb', $object);\n\t\t\t\t$this->template->render();\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "3c6661eed517d0cef6f37e5a82ecf0bb", "score": "0.6303784", "text": "public function importExcel()\n {\n //di bladenya <input type=\"hidden\" name=\"_token\" value=\"{{csrf_token()}}\"></input> csrf_token untuk mengijinkan import di laravel\n \n if(Input::hasFile('import_file'))//mengecek file sudah masuk atau belum\n {\n \n $same=0;\n $path= Input::file('import_file')->getRealPath(); //ambil location file ada dimana\n $data=Excel::load($path,function($reader){})->get();//load data \n if(!empty($data)&&$data->count())//jika ada jalanin looping buat masukin data ke model\n {\n foreach($data as $key=>$val){ //ambil data value dari object\n $same=0;\n $dataproduk=produk::all();\n foreach($dataproduk as $tampil)\n {\n if($tampil->nama==$val->nama && $tampil->id_distributor==Sentinel::getUser()->id)\n {\n $same=1;\n }\n\n \n }\n if($same==1)\n {\n $dataproduk=produk::select('id')->where('nama', $val->nama)->value('id');\n $updateproduk=produk::find($dataproduk);\n \n $updateproduk->quantity=$updateproduk->quantity+$val->quantity;\n $updateproduk->description=$val->description;\n if($val->kategori==\"Buku\")\n {\n $updateproduk->id_kategori=1;\n }\n else\n {\n $updateproduk->id_kategori=2;\n }\n $updateproduk->harga=$val->harga;\n $updateproduk->save();\n $qty=(string)$val->quantity;\n $transaksi=new transaksi;\n $transaksi->nama=\"Pemasukan barang\".\" \".$updateproduk->nama.\" \".\"Sebanyak\".\" \".$qty.\" buah\";\n $transaksi->id_barang=$updateproduk->id;\n $transaksi->kode_transaksi=1;\n $transaksi->id_user=0;\n $transaksi->barang_masuk=$qty;\n $transaksi->barang_keluar=0;\n $transaksi->id_distributor=Sentinel::getUser()->id;\n $transaksi->save();\n\n }\n else\n {\n\n $data=new produk;\n $data->nama=$val->nama;\n $data->quantity=$val->quantity;\n $data->description=$val->description;\n if($val->kategori==\"Buku\")\n {\n $data->id_kategori=1;\n }\n else\n {\n $data->id_kategori=2;\n }\n $data->harga=$val->harga;\n $data->terjual=0;\n $data->id_distributor=Sentinel::getUser()->id;\n $data->gambar=\"C:\\xampp\\htdocs\\projectakhir\\public\\images\\no_image.jpg\";\n $data->namagambar=\"no_image.jpg\";\n $data->save();\n $transaksi=new transaksi;\n $qty=(string)$data->quantity;\n $transaksi->nama=\"Pemasukan barang\".\" \".$data->nama.\" \".\"Sebanyak\".\" \".$qty.\" buah\";\n $transaksi->id_barang=$data->id;\n $transaksi->kode_transaksi=1;\n $transaksi->id_user=0;\n $transaksi->barang_masuk=$qty;\n $transaksi->barang_keluar=0;\n $transaksi->id_distributor=Sentinel::getUser()->id;\n $transaksi->save();\n\n\n }\n }\n }\n }\n return back();\n }", "title": "" }, { "docid": "ea738640ce9bc4c22cbde0385ae77b7c", "score": "0.63010323", "text": "public function importFile(Request $request)\r\n {\r\n $busines_id = $request->business_id;\r\n $type = $request->type;\r\n\r\n try {\r\n if ($type == 'account_list') {\r\n Excel::import(new AccountImport($this->transactionUtil, $busines_id), request()->file('file'));\r\n }\r\n if ($type == 'account_types') {\r\n Excel::import(new AccountTypeImport($busines_id), request()->file('file'));\r\n }\r\n if ($type == 'account_groups') {\r\n Excel::import(new AccountGroupImport($busines_id), request()->file('file'));\r\n }\r\n\r\n $output = [\r\n 'success' => 1,\r\n 'msg' => __('superadmin::lang.success')\r\n ];\r\n\r\n return redirect()->back()->with('status', $output);\r\n } catch (\\Exception $e) {\r\n Log::emergency('File: ' . $e->getFile() . 'Line: ' . $e->getLine() . 'Message: ' . $e->getMessage());\r\n $output = [\r\n 'success' => 0,\r\n 'msg' => __('messages.something_went_wrong')\r\n ];\r\n\r\n return redirect()->back()->with('status', $output);\r\n }\r\n }", "title": "" }, { "docid": "ae8de8ece1dd5090a5b43fb83eb9dc1e", "score": "0.6298164", "text": "static public function ctrImportarAbono(){\n\n if(isset($_POST[\"importAbono\"])){\n\t\t\t\t\n\t\t\t\tinclude \"/../vistas/reportes_excel/Excel/reader.php\";\n\t\t\t\t$directorio=\"vistas/abonos/\".$_FILES[\"nuevoAbono\"][\"name\"];\n\t\t\t\t$archivo=move_uploaded_file($_FILES[\"nuevoAbono\"]['tmp_name'], $directorio);\n\t\t\t\t$data = new Spreadsheet_Excel_Reader();\n\t\t\t\t$data->setOutputEncoding('CP1251');\n\t\t\t\t$data->read(\"vistas/abonos/\".$_FILES[\"nuevoAbono\"][\"name\"]);\n\t\t\t\t$con=ControladorUsuarios::ctrMostrarConexiones(\"id\",1);\n\t\t\t\t$conexion = mysql_connect($con[\"ip\"], $con[\"user\"], $con[\"pwd\"]) or die(\"No se pudo conectar: \" . mysql_error());\n\t\t\t\tmysql_select_db($con[\"db\"], $conexion);\n\t\t\t\tfor ($i = 6; $i <= $data->sheets[0]['numRows']; $i++) {\n\t\t\t\t\tfor ($j = 1; $j <= 1; $j++) {\n $fecha=$data->sheets[0]['cells'][$i][1];\n $descripcion=$data->sheets[0]['cells'][$i][3];\n $monto=$data->sheets[0]['cells'][$i][4];\n\t\t\t\t\t\t$montoConv=str_replace(\",\",\"\",$monto);\n $agencia=$data->sheets[0]['cells'][$i][6];\n $operacion=$data->sheets[0]['cells'][$i][7];\n\t\t\t\t\t\tif(substr($descripcion,0,3) != \"LET\"){\n\t\t\t\t\t\t\t$sqlInsertar = mysql_query(\"INSERT INTO abonosjf (fecha,descripcion,monto,agencia,num_ope) values('\".substr($fecha,6,4).\"-\".substr($fecha,3,2).\"-\".substr($fecha,0,2).\"','\".$descripcion.\"',\".$montoConv.\",'\".$agencia.\"','\".$operacion.\"')\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\techo'<script>\n\n\t\t\t\tswal({\n\t\t\t\t\ttype: \"success\",\n\t\t\t\t\ttitle: \"Las abonos han sido importados correctamente\",\n\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\t\t\t\t\t}).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"abonos\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\t\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "ddc185aa79207017b82e2e0d4e42ac92", "score": "0.62909955", "text": "public\tfunction ExcelDataAdd()\t{\n $configUpload['upload_path'] = FCPATH.'uploads/excel/';\n $configUpload['allowed_types'] = 'xls|xlsx|csv';\n $configUpload['max_size'] = '5000';\n $this->load->library('upload', $configUpload);\n $this->upload->do_upload('userfile');\n $upload_data = $this->upload->data(); //Returns array of containing all of the data related to the file you uploaded.\n $file_name = $upload_data['file_name']; //uploded file name\n $extension=$upload_data['file_ext']; // uploded file extension\n\n //$objReader =PHPExcel_IOFactory::createReader('Excel5'); //For excel 2003\n $objReader= PHPExcel_IOFactory::createReader('Excel2007');\t// For excel 2007\n //Set to read only\n $objReader->setReadDataOnly(true);\n //Load excel file\n $objPHPExcel=$objReader->load(FCPATH.'uploads/excel/'.$file_name);\n $totalrows=$objPHPExcel->setActiveSheetIndex(0)->getHighestRow(); //Count Numbe of rows avalable in excel\n $objWorksheet=$objPHPExcel->setActiveSheetIndex(0);\n //loop from first data untill last data\n for($i=2;$i<=$totalrows;$i++)\n {\n $id_profil =$objWorksheet->getCellByColumnAndRow(0,$i)->getValue();\n $nip =$objWorksheet->getCellByColumnAndRow(1,$i)->getValue();\n $id_eselon =$objWorksheet->getCellByColumnAndRow(2,$i)->getValue();\n $id_gol =$objWorksheet->getCellByColumnAndRow(3,$i)->getValue();\n $id_jabatan =$objWorksheet->getCellByColumnAndRow(4,$i)->getValue();\n $id_jabatan_atasan =$objWorksheet->getCellByColumnAndRow(5,$i)->getValue();\n $id_unit =$objWorksheet->getCellByColumnAndRow(6,$i)->getValue();\n $id_unit_kerja =$objWorksheet->getCellByColumnAndRow(7,$i)->getValue();\n $id_satuan_kerja=$objWorksheet->getCellByColumnAndRow(8,$i)->getValue();\n $id_jfu =$objWorksheet->getCellByColumnAndRow(9,$i)->getValue();\n $id_pendidikan =$objWorksheet->getCellByColumnAndRow(10,$i)->getValue();\n $tgl_riwayat =$objWorksheet->getCellByColumnAndRow(11,$i)->getValue();\n $password =$objWorksheet->getCellByColumnAndRow(12,$i)->getValue();\n\n $data=array(\n 'id_profil'=>$id_profil,\n 'nip'=>$nip,\n 'id_eselon'=>$id_eselon,\n 'id_gol'=>$id_gol,\n 'id_jabatan'=>$id_jabatan,\n 'id_jabatan_atasan'=>$id_jabatan_atasan,\n 'id_unit'=>$id_unit,\n 'id_unit_kerja'=>$id_unit_kerja,\n 'id_satuan_kerja'=>$id_satuan_kerja,\n 'id_jfu'=>$id_jfu,\n 'id_pendidikan'=>$id_pendidikan,\n 'tgl_riwayat'=>$tgl_riwayat,\n 'password'=>md5($password)\n\n );\n //echo \"progress\".$nip.\"<br />\";\n $this->M_excel_data_insert_model->Add_Profil($data);\n\n\n }\n unlink('././uploads/excel/'.$file_name); //File Deleted After uploading in database .\n redirect(base_url() . \"Pegawai\");\n\n\n }", "title": "" }, { "docid": "9bfb97a26ffa8eaf4986542c6bf8f5e4", "score": "0.6276928", "text": "public function import(Request $request)\n {\n $validation = Validator::make($request->all(), [\n \"data_siswa\" => \"required|mimes:xlsx,xls\"\n ])->validate();\n\n try {\n Excel::import(new StudentsImport, $request->file('data_siswa'));\n } catch (ValidationException $e) {\n $failures = $e->failures();\n $error = $failures[0]->errors()[0];\n return redirect()->route(\"students.index\")->with('error', $error);\n }\n\n return redirect()->route(\"students.index\")->with('success', 'Data berhasil ditambahkan');\n }", "title": "" }, { "docid": "2fc43387c0782a0a149600a521b3be96", "score": "0.62761754", "text": "public function importUserList(Request $request)\n {\n $exploded = explode(',', $request->list);\n $decoded = base64_decode($exploded[1]);\n if(str_contains($exploded[0], 'sheet'))\n $extension = 'xlsx';\n else\n $extension = 'xls';\n $fileName = uniqid().'.'.$extension;\n $county = County::find(1)->name; // Remember to change this\n $folder = '/uploads/participants/';\n if(!is_dir(public_path().$folder))\n File::makeDirectory(public_path().$folder, 0777, true);\n file_put_contents(public_path().$folder.$fileName, $decoded);\n\n // Handle the import\n // Get the results\n // Import a user provided file\n // Convert file to csv\n $data = Excel::load('public/uploads/participants/'.$fileName, function($reader) {})->get();\n\n if(!empty($data) && $data->count())\n {\n foreach ($data->toArray() as $key => $value) \n {\n if(!empty($value))\n {\n $tname = NULL;\n $tuid = NULL;\n $tprogram = NULL;\n $tphone = NULL;\n $tfacility = NULL;\n $temail = NULL;\n foreach ($value as $mike => $ross) \n {\n if(strcmp($mike, \"tester_name\") === 0)\n $tname = $ross;\n if(strcmp($mike, \"bar_code\") === 0)\n $tuid = $ross;\n if(strcmp($mike, \"program\") === 0)\n $tprogram = $ross;\n if(strcmp($mike, \"testerphone\") === 0)\n $tphone = $ross;\n if(strcmp($mike, \"facility_name\") === 0)\n $tfacility = $ross;\n if(strcmp($mike, \"email\") === 0)\n $temail = $ross;\n }\n if(count($tphone) != 0)\n {\n $tphone = ltrim($tphone, '0');\n $tphone = \"+254\".$tphone;\n $tphone = trim($tphone);\n }\n if(!$tuid)\n $tuid = uniqid();\n $facility_id = Facility::idByName(trim($tfacility));\n $program_id = Program::idByTitle(trim($tprogram));\n $role_id = Role::idByName('Participant');\n // Prepare to save participant details\n $tester = new User;\n $tester->password = Hash::make(User::DEFAULT_PASSWORD);\n\n $tester->name = $tname;\n $tester->gender = User::MALE;\n $tester->email = $temail;\n $tester->phone = $tphone;\n $tester->username = $tuid;\n $tester->uid = $tuid;\n $tester->save();\n // prepare to save role-user\n $ru = DB::table('role_user')->where('user_id', $tester->id)->where('role_id', $role_id)->count();\n if($ru == 0)\n {\n DB::table('role_user')->insert([\"user_id\" => $tester->id, \"role_id\" => $role_id, \"tier\" => $facility_id, \"program_id\" => $program_id]);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "0422199cfbeacdafad1a584900598d07", "score": "0.6244308", "text": "public function import(){\n include APPPATH.'third_party/PHPExcel/PHPExcel.php';\n \n $csvreader = PHPExcel_IOFactory::createReader('CSV');\n\t\t$loadcsv = $csvreader->load('csv/'.$this->filename.'.csv'); // Load file yang tadi diupload ke folder csv\n\t\t$sheet = $loadcsv->getActiveSheet()->getRowIterator();\n \n // Buat sebuah variabel array untuk menampung array data yg akan kita insert ke database\n $data = [];\n $datamhs = [];\n $datascan = [];\n $numrow = 1;\n foreach($sheet as $row){\n // Cek $numrow apakah lebih dari 1\n // Artinya karena baris pertama adalah nama-nama kolom\n // Jadi dilewat saja, tidak usah diimport\n if($numrow > 1){\n $cellIterator = $row->getCellIterator();\n $cellIterator->setIterateOnlyExistingCells(false); // Loop all cells, even if it is not set\n \n $get = array(); // Valuenya akan di simpan kedalam array,dimulai dari index ke 0\n foreach ($cellIterator as $cell) {\n array_push($get, $cell->getValue()); // Menambahkan value ke variabel array $get\n }\n // <-- END\n // Ambil data value yang telah di ambil dan dimasukkan ke variabel $get\n $nim = $get[1]; // Ambil data NIS dari kolom A di csv\n $nama = ucwords(strtolower($get[2])); // Ambil data nama dari kolom B di csv\n $id_jadwal= $this->input->post('id_jadwal');\n $id_scan = $this->input->post('id_scan');\n $a = explode(' ',trim($nama));\n $alias = $a[0];\n\n if($id_jadwal==\"- Pilih Mata Kuliah -\"){\n echo \"<script>alert('Mata Kuliah Belum Diisi');history.go(-1);</script>\";\n }\n else{\n array_push($datascan,[\n 'alias'=>$alias\n ]);\n array_push($datamhs, [\n 'nim'=>$nim,\n 'nama_mhs'=>$nama,\n 'id_prodi'=>\"\",\n 'id_scan'=>$id_scan\n ]);\n array_push($data, [\n 'nim'=>$nim,\n 'id_jadwal'=>$id_jadwal\n ]);\n }\n }\n $numrow++; // Tambah 1 setiap kali looping\n }\n $res = $this->m_mhsmatkul->cekmhs($datascan,$datamhs,$data);\n if($res==true)\n\t\t{\n\t\t\t$this->session->set_flashdata('true', \"Berhasil Mengimpor Data\"); \n redirect('mhsmatkul/matkul');\n }\n else{\n\t\t\t$this->session->set_flashdata('err', \"Gagal Mengimpor Data\");\n redirect('mhsmatkul/matkul');\n }\t \n }", "title": "" }, { "docid": "7cd56c15db213a0b3de009a7da6a8072", "score": "0.6235291", "text": "public function postPersonsImport(Request $request)\n {\n if ($request->file('persons')) {\n\n Excel::load(Input::file('persons'), function($reader){\n\n foreach ($reader->get() as $result) {\n\n Persona::create([\n 'nombres' => $result->nombres,\n 'apellidos' => $result->apellidos,\n 'tipo_doc' => $result->tipo_doc,\n 'num_doc' => $result->num_doc,\n 'genero' => $result->genero,\n 'fecha_nac' => $result->fecha_nac,\n 'email' => $result->email,\n 'direccion' => $result->direccion,\n 'telefono' => $result->telefono\n ]);\n\n }\n\n });\n Session::flash('message','Se importaron los datos');\n }else{\n Session::flash('message_danger','Error al Importar');\n }\n\n return redirect()->back();\n }", "title": "" }, { "docid": "ede1c5e2e3c1d50bcef4abdd352ad21b", "score": "0.61928976", "text": "private function processFile()\n {\n try {\n $this->excel_data = Excel::toArray('',$this->file);\n } catch (\\Exception $e) {\n $this->error = $e->getMessage();\n }\n }", "title": "" }, { "docid": "4dca136c5d615fe80bd8f92cae2ac740", "score": "0.61829215", "text": "public function importJadwalDosenExcel(Request $request)\n {\n $file = $request->file('file');\n $namaFile = $file->getClientOriginalName();\n $file->move('DataJadwalDosen', $namaFile);\n Excel::import(new ImpotrJadwalDosen, public_path('/DataJadwalDosen/' . $namaFile));\n return redirect('/jadwalDosen')->with('alert-success', 'Jadwal Berhasil Diimport');\n }", "title": "" }, { "docid": "8eb1ae7ab06053563d74a97efbe8a5b6", "score": "0.6179836", "text": "function bulkUploadCourses($filePath){\n\t\t$this->load->library('excel');\n\t\n\t\ttry{\n\t\t\t$objPHPExcel \t= PHPExcel_IOFactory::load($filePath);\n\t\t\t$sheetData \t\t= $objPHPExcel->getActiveSheet()->toArray(null,true,true,true);\n\t\t} catch(Exception $e) {\n die('Error loading file \"'.pathinfo($inputFileName,PATHINFO_BASENAME).'\": '.$e->getMessage());\n }\n\n $data \t\t\t= array();\n $errorMessage \t= '';\n\t\t$failedRows = 0;\n\t\t$successfulRows = 0;\n\t\t$totalRows = count($sheetData) - 1;\n\n\t\tforeach($sheetData as $key =>$row){\n\t\t\tif($key == 1) continue;\n\t\t\t\n\t\t\t$vendorName = generateSlug( strtolower( $this->reskilling_model->getVendorNameById($this->vendorId) ) );\n\t\t\t$slug \t\t= $vendorName . '/' . generateSlug( strtolower( $row[\"G\"] ) );\n\t\t\t\n\t\t\t$data = array( \n 'vendor_id' \t\t\t\t\t=> $this->vendorId,\n\t\t\t 'reskilling_mode_type_id' \t=> (\"online\" == strtolower($row[\"E\"])) ? 1 : 0,\n\t\t\t 'title' \t\t\t\t\t\t=> $row[\"G\"],\n\t\t\t 'slug' \t\t\t\t\t\t=> $slug,\n\t\t\t 'logo' \t\t\t\t\t\t=> generateSlug( strtolower( $row[\"G\"] ) ) . '.png',\n\t\t\t 'instructor_name' \t\t\t=> '',\n\t\t\t 'city' \t\t\t\t\t\t=> \"\",\n\t\t\t 'address' \t\t\t\t\t=> '' ,\n\t\t\t 'description' \t\t\t\t=> $row[\"I\"],\n\t\t\t 'price' \t\t\t\t\t\t=> $row[\"N\"],\n\t\t\t 'offer_price' \t\t\t\t=> '0.0',\n\t\t\t 'offer_start_date_time' \t\t=> '',\n\t\t\t 'offer_end_date_time' \t\t=> '',\n\t\t\t 'external_link' \t\t\t\t=> $row[\"K\"],\n\t\t\t 'take_aways' \t\t\t\t\t=> $row[\"J\"],\n\t\t\t 'details' \t\t\t\t\t=> $row[\"L\"],\n\t\t\t 'terms_and_conditions'\t\t=> $row[\"Q\"],\n\t\t\t 'remarks' \t\t\t\t\t=> '',\n\t\t\t 'start_date_time' \t\t\t=> date(\"Y-m-d H:i:s\"),\n\t\t\t 'end_date_time' \t\t\t\t=> date('Y-m-d H:m:s', strtotime(\"+365 days\")),\n\t\t\t 'is_paid_course' \t\t\t\t=> (\"yes\" == strtolower( $row[\"T\"] ) ) ? 1 : 0,\n\t\t\t 'is_featured'\t\t\t\t\t=> 0,\n\t\t\t 'accept_payment_on_jfh' \t\t=> 0,\n\t\t\t 'is_certification_provided' \t=> (true == empty($row[\"U\"])) ? \"\" : $row[\"U\"],\n\t\t\t 'reskilling_level_type_id' \t=> (true == empty($row[\"V\"])) ? \"\" : $row[\"V\"],\n\t\t\t 'jfh_costing' \t\t\t\t=> '0.0',\n\t\t\t 'revenue_type_id'\t\t\t\t=> 2,\n\t\t\t 'status_type_id' \t\t\t\t=> 2,\n\t\t\t 'youtube_video_url' \t\t\t=> $row[\"W\"],\n\t\t\t 'created_date_time' \t\t\t=> date(\"Y-m-d H:i:s\"),\n\t\t\t 'modified_date_time' \t\t\t=> date(\"Y-m-d H:i:s\"),\n\t\t\t 'priority_order' \t\t\t\t=> 1,\n\t\t\t 'created_by' \t\t\t\t\t=> 999 \n );\n \t$functionalAreaId = $this->getFunctionalAreaByName($row['B']);\n\t\t\t$courseId = $this->db->insert( 'courses', $data );\n \n if($courseId){\n\t\t\t\t$this->load->model('reskilling_model');\n\t\t\t\t$this->reskilling_model->updateFunctionalAreaByEntityIdByEntityTypeId( $functionalAreaId, $courseId, COURSE_TYPE_ID );\n\t\t\t}\n\n if( false == $courseId ) { \n \t$dbError = $this->db->error()['message'];\n \t$errorMessage .= 'Row ' . $key . ' was not inserted due to error - ' . $dbError . ' <br/>'; \n \t$failedRows += 1;\n \tcontinue; \n }\n\n $successfulRows += 1;\n\t\t}\n\n\t\t$this->data['totalRows'] \t\t= $totalRows;\n\t\t$this->data['failedRows'] \t\t= $failedRows;\n\t\t$this->data['successfulRows'] \t= $successfulRows;\n\t\t$this->data['errorMessage'] \t= $errorMessage;\n\t\t$this->data['page_title'] \t\t= 'Bulk Upload Notification';\n\t\t$this->data['pageName'] \t\t= 'reskilling-bulk-upload-notification';\n\n\t\t$this->logBulkUploadData(15013,$filePath,$totalRows,$successfulRows,$failedRows);\n\n\t\t$this->displayPages('partner/offerings/bulkUploadNotification', $this->data,true );\t\t\n\t\n\t}", "title": "" }, { "docid": "48fffe9a2ddf9fa9059c3396b2abf647", "score": "0.61716986", "text": "public function importAction()\n {\n if (!$this->files && !$this->database) {\n $this->_die(\n 'No files and no database? Don\\'t have anything more to import!'\n );\n }\n\n $this->setup();\n\n if ($this->database) {\n $this->importDatabase();\n }\n\n if ($this->files) {\n $this->importFiles();\n }\n\n $this->finish();\n }", "title": "" }, { "docid": "b5a0508e7cd4807a5644dd5903f4592e", "score": "0.6167103", "text": "public function store(ImportSubjectRequest $request)\n {\n //dd($request->validated('file'));\n //Excel::import(new SubjectsImport, $request->file('file'));\n Excel::import(new SubjectsImport, $request->file('file'));\n }", "title": "" }, { "docid": "c786fea874343412b94adfaee9f96e85", "score": "0.61666316", "text": "public function doUploadExcel()\n {\n $request = request();\n $str_move_fail = '';\n $str_fail = '';\n $str_uploaded = '';\n $session = false;\n if (\\Session::has('woo_store')) {\n $session = \\Session::get('woo_store');\n }\n //kiểm tra xem có tồn tại file upload hay không\n if($request->hasFile('excel_file')) {\n $allowedfileExtension=['csv','xls','xlsx'];\n $files = $request->excel_file;\n // kiểm tra tất cả các files xem có đuôi mở rộng đúng không\n foreach($files as $key => $file) {\n $extension = $file->getClientOriginalExtension();\n $check=in_array($extension,$allowedfileExtension);\n //kiểm tra xem có đúng định dạng không\n if(!$check) {\n $str_fail .= $file->getClientOriginalName().\", \";\n unset($files[$key]);\n }\n }\n $str_fail = substr(trim($str_fail), 0, -1);\n //kiểm tra nếu đúng định dạng\n if (sizeof($files) > 0)\n {\n\n $title = $request->excel_title;\n $note = $request->excel_note;\n $userId = Auth::user()->id;\n $user_name = Auth::user()->name;\n $data = [];\n foreach ($files as $file) {\n $date = date(\"Y_m_d_His\");\n $file_name = $file->getClientOriginalName();\n $name=$date.'_'.$file_name;\n $path = public_path().'/files/'.$name;\n if ($file->move(public_path().'/files/', $name))\n {\n $str_uploaded .= $file_name.\", \";\n $data[] = array(\n 'name' => $name,\n 'path' => $path,\n 'title' => $title,\n 'note' => $note,\n 'woo_info_id' => $session['woo_id'],\n 'user_id' => $userId,\n 'user_name' => $user_name,\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\")\n );\n }\n else\n {\n $str_move_fail .= $file_name.', ';\n }\n }\n $str_move_fail = substr(trim($str_move_fail), 0, -1);\n $str_uploaded = substr(trim($str_uploaded), 0, -1);\n //Nếu move file thành công. Thực hiện lưu vào database\n if (sizeof($data) > 0)\n {\n DB::table('excels')->insert($data);\n $mess = \"Upload successfuly files: \".$str_uploaded;\n $mess .= (strlen($str_move_fail) > 0)? ' ---> But can not upload files: '.$str_move_fail : ' <---';\n \\Session::flash('success', $mess);\n }\n else\n {\n \\Session::flash('error', 'Fail to upload. Please try again this files : '.$str_move_fail);\n }\n }\n else\n {\n \\Session::flash('error', 'Fail to upload. Only accept csv, xls, xlsx file. Wrong extension file : '.$str_fail);\n }\n }\n }", "title": "" }, { "docid": "5d44234dffde5abf1af581891d587fc8", "score": "0.6165221", "text": "public function importCrossword(Request $request){\n if(Input::hasFile('import_file')){\n $path = Input::file('import_file')->getRealPath();\n $data = Excel::load($path, function($reader) {\n })->get();\n //dd($data);\n if(!empty($data) && $data->count()){\n foreach ($data as $key => $value) {\n $insert[] = [\n 'id' => intval($value->id),\n 'user_id' => 1,\n 'content' => $value->content,\n 'width' => intval($value->width),\n 'height' => intval($value->height),\n 'level' => intval($value->level),\n 'helps' => intval($value->helps),\n 'price' => intval($value->price),\n 'difficulty_level' => intval($value->locked_by),\n 'goal_time' => 2500,\n\n ];\n }\n if(!empty($insert)){\n if (DB::table('crosswords')->insert($insert)){\n return \"OK\";\n }\n dd('some errors in '. __FILE__);\n }\n }\n }\n\n }", "title": "" }, { "docid": "835e18beea990b3f60e3cb648cf118a0", "score": "0.6143182", "text": "public function prosesimport()\n {\n include APPPATH.'third_party/PHPExcel/PHPExcel.php';\n\n $config['upload_path'] = realpath('excel');\n $config['allowed_types'] = 'xlsx|xls|csv';\n $config['max_size'] = '10000';\n $config['encrypt_name'] = true;\n\n $this->load->library('upload', $config);\n\n if (!$this->upload->do_upload()) {\n\n //upload gagal\n $this->session->set_flashdata('notif', '<div class=\"alert alert-danger\"><b>PROSES IMPORT GAGAL!</b> '.$this->upload->display_errors().'</div>');\n //redirect halaman\n redirect('item');\n\n } else {\n\n $data_upload = $this->upload->data();\n\n $excelreader = new PHPExcel_Reader_Excel2007();\n $loadexcel = $excelreader->load('excel/'.$data_upload['file_name']); // Load file yang telah diupload ke folder excel\n $sheet = $loadexcel->getActiveSheet()->toArray(null, true, true ,true);\n\n $data = array();\n\n $numrow = 1;\n foreach($sheet as $row){\n if($numrow > 1){\n array_push($data, array(\n 'id_item' => $row['A'],\n 'barcode' => $row['B'],\n 'name' => $row['C'],\n 'jenis' => $row['D'],\n 'merk' => $row['E'],\n 'hpp' => $row['F'],\n 'fob' => $row['G'],\n 'koleksi' => $row['H'],\n 'stock' => $row['I'],\n ));\n }\n $numrow++;\n }\n $this->db->insert_batch('t_item', $data);\n //delete file from server\n unlink(realpath('excel/'.$data_upload['file_name']));\n\n //upload success\n $this->session->set_flashdata('notif', '<div class=\"alert alert-success\"><b>PROSES IMPORT BERHASIL!</b> Data berhasil diimport!</div>');\n //redirect halaman\n redirect('item');\n\n }\n }", "title": "" }, { "docid": "47826dc6e4f9cede815fbb1dee1f2c0e", "score": "0.61414206", "text": "public function importExcelRefund(Request $request)\n {\n // $asuransi = DB::table('asuransi')->where('kode_prod', $request->jenis_asuransi)->first();\n // $kode_prod = $request->jenis_asuransi;\n // $kode_asu = $asuransi->kode_asu;\n // $kode_broker = $asuransi->kode_broker;\n // $namaasuransi = $asuransi->nama;\n $isFieldExist = !empty($request->tanggal_upload);\n $file = $request->file('file_upload_polis');\n config(['excel.import.startRow' => 2 ]);\n $dataSheet = Excel::load($request->file('file_upload_polis'))->get();\n // $insert = array();\n\n $insertRowExist = array();\n $insert = array();\n foreach ($dataSheet as $key => $value) {\n if($value[\"no._sertifikat\"] != null){\n $cek = DB::table('produksi_ajk')->where([['debitur', $value[\"debitur\"]],['no_polis',$value[\"no._sertifikat\"]]])->first();\n if($cek != null){\n DB::table('refund')->where('id_prod_ajk', $cek->id_prod_ajk)->update([\n \"dibayar\"=>$value[\"refund\"],\n 'tgl_refund' => date('Y-m-d'),\n 'tgl_bayar' => date('Y-m-d', strtotime($value[\"tanggal_bayar\"])),\n 'keterangan' => $value[\"keterangan_refund\"],\n // 'posisi' => 4,\n ]);\n }\n // DB::table('produksi_ajk')->where('debitur', $value[\"debitur\"])->update([\n // \"no_polis\"=>$value[\"no._polis\"],\n // 'tgl_polis' => date('Y-m-d'),\n // 'sts_polis' => 1,\n // 'posisi' => 4,\n // ]);\n }\n }\n $response = array(\n 'status' => 'success',\n 'message' => 'Sukses Update Refund',\n );\n return response()->json($response); \n }", "title": "" }, { "docid": "58afd9e8f7c517294b5aea0b10ec10db", "score": "0.61409795", "text": "public function userDatasImport(Request $request)\n {\n if($request->hasFile('userDatas')){\n $path = $request->file('userDatas')->getRealPath();\n $data = Excel::load($path)->get();\n if($data->count()){\n foreach ($data as $key => $value) {\n $userData_list[] = [\n 'user_rut' => $value->rutuser,\n 'first_name' => $value->primernombre,\n 'middle_name' => $value->segundonombre,\n 'last_pat_name' => $value->primerapellido,\n 'last_mat_name' => $value->segundoapellido,\n 'born' => $value->fechanacimiento,\n 'region' => $value->region,\n 'city' => $value->ciudad,\n 'address' => $value->direccion,\n 'civil_state' => $value->estadocivil,\n 'lic' => $value->licenciaconducir,\n 'lic_exp' => $value->licenciaexpira,\n 'particular_email' => $value->mailparticular,\n 'phone_fij' => $value->telefonofijo,\n 'phone_movil' => $value->telefonomovil,\n 'prev_sal' => $value->previsionsalud,\n 'prev_pen' => $value->previsionpension,\n 'created_at' => DB::raw('NOW()'),\n 'updated_at' => DB::raw('NOW()'),\n 'slug' => $value->slug,\n ];\n }\n if( !empty($userData_list)){\n DB::table('user_datas')->insert($userData_list);\n Session::flash('success','Archivo cargado correctamente.');\n }\n }\n }else{\n Session::flash('warnning','Archivo no encontrado.');\n }\n return back();//->with(['userPoint_list' => $userPoint_list]);\n }", "title": "" }, { "docid": "c2f4b87555eaf8c5726187ddb3dfdc9b", "score": "0.61202896", "text": "public function store(Request $request){\n\t\t $this->validate($request, [ \n\t\t \t'id_fuente' => 'required',],\n\t\t \t['id_fuente.required' => 'Debe seleccionar una fuente',\n\t\t\t]); \n\t\t\t\n\t\t\t$validator = Validator::make( \n\t\t\t\t['archivo' => Input::file('archivo')], \n\t\t\t\t['archivo' => 'mimes:xls,xlsx'] \n\t\t\t);\n\n\t\t\t// Comprobacion de validacion \n\t\t\tif($validator->passes()){\n\t\t\t \n\t\t\t // Guardado del archivo de excel // ruta storage y nombre \n\t\t\t $ruta_archivo = $request->file('archivo')->storeAs('public',$request->file('archivo')->getClientOriginalName()); \n\t\t\t \n\t\t\t // Obtencion del nombre original del archivo \n\t\t\t $nombreDocumento = $request->file('archivo')->getClientOriginalName(); \n\t\t\t $usuario = User::find(Auth::id()); \n\t\t\t $consecutivo = ImportacionPerfil::where('id_estado', '=',$usuario->id_estado)->count() + 1;\n\t\t\t \n\t\t\t //Creacion de los datos de importacion \n\t\t\t $importacion_perfiles = ImportacionPerfil::create([ \n\t\t\t \t'nombre' => $nombreDocumento, \n\t\t\t \t'identificador' => 'I-'. $usuario->id_estado . '-' . $consecutivo, \n\t\t\t \t'id_fuente' => $request->id_fuente, \n\t\t\t \t'id_usuario' => Auth::id(), \n\t\t\t \t'numero_de_perfiles' => 0, \n\t\t\t \t'numero_de_marcadores' => 0, \n\t\t\t \t'tipo_de_muestra' => $request->tipo_de_muestra, \n\t\t\t \t'observaciones' => $request->observaciones, \n\t\t\t \t'titulo' => $request->titulo, \n\t\t\t \t'id_estado' => $usuario->id_estado, \n\t\t\t ]); \n\n\t\t\t //Lectura del archivo Excel \n\t\t\t \\Excel::load('storage/app/'.$ruta_archivo, function ($reader) use(&$request) { \n\t\t\t \t$filas = $reader->get(); \n\t\t\t \t$contador = 0; // Contador para determinar el numero de marcadores maximos usados por cada perfil\n\t\t\t \t$numero_de_marcadores = 0; // aumentara en uno cada vez que el contador le supere\n\t\t\t \t$importacion = ImportacionPerfil::all(); \n\t\t\t \t$id_importacion = $importacion->last()->id; // se busca el id de la importacion creada \n\t\t\t \t$perfil_genetico; // se mantiene el valor hasta que se cambie de fila \n\t\t\t \t$usuario = User::find(Auth::id());\n\t\t\t \t\n\t\t\t \t/* Recorrido de cada fila del documento*/ \n\t\t\t \tforeach ($filas as $fila) { \n\t\t\t \t\t$contador = 0; // Se inicializa el contador que enumera los marcadores por perfil \n\t\t\t \t\t$consecutivoPerfil = PerfilGenetico::where('id_estado', '=',$usuario->id_estado)->count() + 1;\n\t\t\t \t\t$numero_de_homocigotos = 0;\n\t\t\t \t\t/*Extraccion del valor de la columna y su valor*/ \n\t\t\t \t\tforeach ($fila as $key => $value) { \n\t\t\t \t\t\t$value = trim($value); \n\t\t\t \t\t\t// si el valor de una celda esta vacio no se guarda nada \n\t\t\t \t\t\tif($value <> null){ \n\t\t\t \t\t\t// se busca el marcador entre los existentes para determinar si es o no un metadato \n\t\t\t \t\t\t\t$marcador = Marcador::where('nombre', '=', $key)->first(); \n\t\t\t \t\t\t\t// si existe se pasa a la creacion de los alelos del perfil genetico \n\t\t\t \t\t\t\tif( $marcador <> null){ \n\t\t\t \t\t\t\t\t// se obtienen los 2 valores posibles de los alelos del perfil \n\t\t\t \t\t\t\t\t$alelos = explode(',', $value); \n\t\t\t \t\t\t\t\tif($marcador->id_tipo_de_marcador == 1 && $marcador->nombre <> 'yindel' || $marcador->nombre == 'dys385' ){ \n\t\t\t\t \t\t\t\t\tif(count($alelos) == 1){ \n\t\t\t\t \t\t\t\t\t\t$value = $value . ',' . $value; \n\t\t\t\t \t\t\t\t\t\t$alelos = explode(',', $value);\n\t\t\t\t \t\t\t\t\t} \n\t\t\t\t \t\t\t\t} \n\t\t\t\t \t\t\t\t// si hay mas de un valor en los alelos se crean los 2 registros en la base \n\t\t\t\t \t\t\t\t \n\t\t\t\t \t\t\t\tif(count($alelos)>1){ \n\t\t\t\t \t\t\t\t\tif(count($alelos)==2){ \n\t\t\t\t\t \t\t\t\t\t$alelo = Alelo::create([ \n\t\t\t\t\t \t\t\t\t\t\t'id_perfil_genetico' => $perfil_genetico->id, \n\t\t\t\t\t \t\t\t\t\t\t'id_marcador' => $marcador->id, \n\t\t\t\t\t \t\t\t\t\t\t// 'alelo_1' => trim($alelos[0]), \n\t\t\t\t\t \t\t\t\t\t\t// 'alelo_2' => trim($alelos[1]),\n\t\t\t\t\t \t\t\t\t\t\t'alelo_1' => trim(strtoupper($alelos[0])), \n\t\t\t\t\t \t\t\t\t\t\t'alelo_2' => trim(strtoupper($alelos[1])), \n\t\t\t\t\t \t\t\t\t\t]);\n\t\t\t\t\t \t\t\t\t\tif(trim($alelos[0]) == trim($alelos[1]) && $marcador->id_tipo_de_marcador == 1 && $marcador->nombre <> 'yindel' || $marcador->nombre == 'dys385'){\n\t\t\t\t\t \t\t\t\t\t\t$numero_de_homocigotos++;\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\telse{ \n\t\t\t\t\t \t\t\t\t\tif(count($alelos)==3){ \n\t\t\t\t\t \t\t\t\t\t\t$alelo = Alelo::create([ \n\t\t\t\t\t\t \t\t\t\t\t\t'id_perfil_genetico' => $perfil_genetico->id, \n\t\t\t\t\t\t \t\t\t\t\t\t'id_marcador' => $marcador->id, \n\t\t\t\t\t\t \t\t\t\t\t\t'alelo_1' => trim($alelos[0]), \n\t\t\t\t\t\t \t\t\t\t\t\t'alelo_2' => trim($alelos[1]), \n\t\t\t\t\t\t \t\t\t\t\t\t'alelo_3' => trim($alelos[2]), \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\telse{ \n\t\t\t\t\t\t \t\t\t\t\tif(count($alelos)==4){ \n\t\t\t\t\t\t\t \t\t\t\t\t$alelo = Alelo::create([ \n\t\t\t\t\t\t\t \t\t\t\t\t\t'id_perfil_genetico' => $perfil_genetico->id,\n\t\t\t\t\t\t\t \t\t\t\t\t\t'id_marcador' => $marcador->id, \n\t\t\t\t\t\t\t \t\t\t\t\t\t'alelo_1' => trim($alelos[0]), \n\t\t\t\t\t\t\t \t\t\t\t\t\t'alelo_2' => trim($alelos[1]), \n\t\t\t\t\t\t\t \t\t\t\t\t\t'alelo_3' => trim($alelos[2]), \n\t\t\t\t\t\t\t \t\t\t\t\t\t'alelo_4' => trim($alelos[3]),\n\t\t\t\t\t\t\t \t\t\t\t\t]); \n\t\t\t\t\t\t\t \t\t\t\t} \n\t\t\t\t\t\t\t \t\t\t\telse{ \n\t\t\t\t\t\t\t \t\t\t\t\t$alelo = Alelo::create([ \n\t\t\t\t\t\t\t \t\t\t\t\t\t'id_perfil_genetico' => $perfil_genetico->id,\n\t\t\t\t\t\t\t \t\t\t\t\t\t'id_marcador' => $marcador->id,\n\t\t\t\t\t\t\t \t\t\t\t\t\t'alelo_1' => trim($alelos[0]), \n\t\t\t\t\t\t\t \t\t\t\t\t\t'alelo_2' => trim($alelos[1]), \n\t\t\t\t\t\t\t \t\t\t\t\t\t'alelo_3' => trim($alelos[2]), \n\t\t\t\t\t\t\t \t\t\t\t\t\t'alelo_4' => trim($alelos[3]), \n\t\t\t\t\t\t\t \t\t\t\t\t\t'alelo_5' => trim($alelos[4]), \n\t\t\t\t\t\t\t \t\t\t\t\t]); \n\t\t\t\t\t\t\t \t\t\t\t}\n\t\t\t\t\t\t\t \t\t\t} \n\t\t\t\t\t\t\t \t\t} \n\t\t\t\t\t\t\t \t} \n\t\t\t\t\t\t\t \telse{ \n\t\t\t\t\t\t\t \t\t$alelo = Alelo::create([ \n\t\t\t\t\t\t\t \t\t\t'id_perfil_genetico' => $perfil_genetico->id, \n\t\t\t\t\t\t\t \t\t\t'id_marcador' => $marcador->id, \n\t\t\t\t\t\t\t \t\t\t'alelo_1' => trim($alelos[0]), \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// suma 1 el contador por cada marcador no vacio detectado en el perfil\n\t\t\t\t\t\t\t \t$contador++;\n\n\t\t\t\t\t\t\t \t// si el contador supera al valor de numero de marcadores suma 1 \n\t\t\t\t\t\t\t \tif($numero_de_marcadores < $contador){\n\t $numero_de_marcadores++; \n\t }\n\t } \n\n\t // si no es marcador se verifica si la columna es el identificador externo\n\t\t\t\t\t\t\t\telse{ \n\t\t\t\t\t\t\t\t\t// si es el identificador se registra el perfil genetico \n\t\t\t\t\t\t\t\t\tif($key == 'identifier'){ \n\t\t\t\t\t\t\t\t\t\t$perfil_genetico = PerfilGenetico::create([ \n\t\t\t\t\t\t\t\t\t\t'id_importacion' => $id_importacion, \n\t\t\t\t\t\t\t\t\t\t'identificador' => 'CNB-'. $usuario->id_estado . '-' . $consecutivoPerfil,\n\t\t\t\t\t\t\t\t\t\t'id_usuario' => Auth::id(),\n\t\t\t\t\t\t\t\t\t\t'id_fuente' => $request->id_fuente, \n\t\t\t\t\t\t\t\t\t\t'id_externo' => $value, \n\t\t\t\t\t\t\t\t\t\t'id_estado' => $usuario->id_estado, \n\t\t\t\t\t\t\t\t\t]);\n\n\t\t\t\t\t\t\t\t\tif($request->etiquetas<>null){\n\t\t\t\t\t\t\t\t\t\tforeach($request->etiquetas as $etiqueta){ \n\t\t\t\t\t\t\t\t\t\t\t$id_etiqueta = Etiqueta::find($etiqueta); \n\t\t\t\t\t\t\t\t\t\t\t$etiqueta_asignada = EtiquetaAsignada::create([ \n\t\t\t\t\t\t\t\t\t\t\t\t'id_etiqueta' => $id_etiqueta->id, \n\t\t\t\t\t\t\t\t\t\t\t\t'id_perfil_genetico' => $perfil_genetico->id, \n\t\t\t\t\t\t\t\t\t\t\t]); \n\t\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t// si no es el identificador se determina que es un metadato \n\t\t\t\t\t\t\t\telse{ \n\t\t\t\t\t\t\t\t\t// se busca si existe el tipo de metadato en la base \n\t\t\t\t\t\t\t\t\t$tipo_de_metadato = TipoDeMetadato::where('nombre','=',$key)->first(); \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// si no existe se crea un nuevo tipo de metadato \n\t\t\t\t\t\t\t\t\tif($tipo_de_metadato == null){\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$tipo_de_metadato = TipoDeMetadato::create([ \n\t\t\t\t\t\t\t\t\t\t\t'nombre' => $key, \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// si existe unicamente si obtiene su id para generar el metadato del perfil \n\t\t\t\t\t\t\t\t$metadato = Metadato::create([ \n\t\t\t\t\t\t\t\t\t'id_perfil_genetico' => $perfil_genetico->id, \n\t\t\t\t\t\t\t\t\t'id_tipo_de_metadato' => $tipo_de_metadato->id, \n\t\t\t\t\t\t\t\t\t'dato' => $value, \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\n\t\t\t\t$perfil_genetico->numero_de_homocigotos = $numero_de_homocigotos; \n\t\t\t\t$perfil_genetico->save(); \n\t\t\t\t\n\t\t\t\tif($perfil_genetico->numero_de_homocigotos>5){ \n\t\t\t\t\t$perfil_genetico->requiere_revision = 1; \n\t\t\t\t\t$perfil_genetico->save(); \n\t\t\t\t} \n\t\t\t\t$perfil_genetico->numero_de_marcadores = $contador; \n\t\t\t\t$perfil_genetico->save(); \n\t\t\t\t\n\t\t\t\tif($perfil_genetico->numero_de_marcadores<13){ \n\t\t\t\t\t$perfil_genetico->requiere_revision = 1; \n\t\t\t\t\t$perfil_genetico->save(); \n\t\t\t\t} \n\n\t\t\t\t$datos_perfil = array();\n\n\t\t foreach ($perfil_genetico->alelos->sortBy('id_marcador') as $perfil) {\n\t\t array_push( $datos_perfil, $perfil->id_marcador, $perfil->alelo_1, $perfil->alelo_2); \n\t\t }\n\n\t\t $datos_perfil = implode($datos_perfil);\n\t\t $perfil_genetico->cadena_unica = $datos_perfil;\n\t\t $perfil_genetico->save();\n\n\t\t // d = 0 && r =0\n\t\t $genotipo_repetido = PerfilGenetico::where('desestimado', '=', 0)->where('cadena_unica', '=', $perfil_genetico->cadena_unica)->orWhere('es_perfil_repetido', '=' , 0)->where('cadena_unica', '=', $perfil_genetico->cadena_unica)->where('desestimado', '=', 0)->first(); \n\t\t \n\t\t if($genotipo_repetido <> null){\n\t\t if($genotipo_repetido->id <> $perfil_genetico->id){\n\t\t $perfil_genetico->es_perfil_repetido = 1;\n\t\t $perfil_genetico->id_perfil_original = $genotipo_repetido->id;\n\t\t $perfil_genetico->id_estado_perfil_original = $genotipo_repetido->id_estado;\n\t\t $perfil_genetico->save(); \n\t\t }\n\t\t } \n\t\t\t}\n\n\t\t\t$importacion = ImportacionPerfil::find($id_importacion); \n\t\t\t$importacion->numero_de_perfiles = $importacion->perfiles_geneticos->count(); \n\t\t\t$importacion->numero_de_marcadores = $numero_de_marcadores; \n\t\t\t$importacion->save();\n\n\t $log = Log::create([\n\t 'id_usuario' => $usuario->id,\n\t 'id_estado' => $usuario->estado->id,\n\t 'actividad' => 'Importo los perfiles desde el archivo: ' . $importacion->nombre,\n\t ]); \n\n\t\t\tflash('El archivo fue importado', 'success'); \n\t\t}); \n\t\treturn redirect()->route('importaciones_perfiles.index'); \n\t\t} \n\t\telse{ \n\t\t\tflash('El formato del archivo no es correcto', 'warning'); \n\t\t\treturn redirect()->route('importaciones_perfiles.index');\n\t\t} \n\t}", "title": "" }, { "docid": "d70912dd8a5fa4632e41cec0a19378e9", "score": "0.61194134", "text": "public function action_import_data() {\n $this->check_action_permission('add_update');\n $this->load->helper('demo');\n if (is_on_demo_host()) {\n $msg = lang('common_excel_import_disabled_on_demo');\n echo json_encode(array('success' => false, 'message' => $msg));\n return;\n }\n $this->load->model('Attribute');\n $entity_type = 'item_kits';\n $check_duplicate_field = $this->input->post('check_duplicate_field');\n $field_parts = explode(':', $check_duplicate_field);\n if (count($field_parts) == 2) {\n $check_duplicate_field_type = $field_parts[0];\n $check_duplicate_field_name = $field_parts[1];\n }\n $attribute_set_id = $this->input->post('attribute_set_id');\n $columns = $this->input->post('columns');\n $rows = $this->input->post('rows');\n $selected_rows = $this->input->post('selected_rows');\n if (empty($rows) || empty($selected_rows)) {\n $msg = lang('common_error');\n echo json_encode(array('success' => false, 'message' => $msg));\n return;\n }\n $stored_rows = 0;\n $error_rows = array();\n foreach ($rows as $index => $row) {\n if (!isset($selected_rows[$index])) {\n continue;\n }\n $data = array('attribute_set_id' => $attribute_set_id);\n $extend_data = $extend_rows = array();\n foreach ($columns as $excel_column => $field_column) {\n if (!empty($field_column) && !empty($row[$excel_column])) {\n $field_parts = explode(':', $field_column);\n\n /* Set Basic Attributes */\n if (count($field_parts) == 2) {\n if ($field_parts[0] == 'basic') {\n $data[$field_parts[1]] = $row[$excel_column];\n } else {\n $extend_data = array(\n 'entity_type' => $entity_type,\n 'attribute_id' => $field_parts[1],\n 'entity_value' => $row[$excel_column],\n );\n $extend_rows[] = $extend_data;\n }\n }\n }\n }\n try {\n /* Check duplicate item */\n $exists_row = false;\n if (isset($check_duplicate_field_type) && isset($check_duplicate_field_name)) {\n if ($check_duplicate_field_type == 'basic') {\n if (!empty($data[$check_duplicate_field_name])) {\n $exists_row = $this->Item_kit->exists_by_field($entity_type, $check_duplicate_field_name, $data[$check_duplicate_field_name]);\n }\n } else {\n if (!empty($extend_data['entity_value'])) {\n $exists_row = $this->Attribute->exists_by_value($entity_type, $extend_data['attribute_id'], $extend_data['entity_value']);\n }\n }\n }\n if (!$exists_row) {\n $item_kit_id = $this->Item_kit->save($data);\n if (!empty($item_kit_id)) {\n $stored_rows++;\n /* Set extended attributes */\n if (!empty($extend_rows)) {\n foreach ($extend_rows as $extend_data) {\n $extend_data['entity_id'] = $item_kit_id;\n $this->Attribute->set_attributes($extend_data);\n }\n }\n }\n } else {\n $error_rows[] = $row;\n }\n } catch (Exception $ex) {\n $error_rows[] = $row;\n continue;\n }\n }\n $error_html = '';\n if (!empty($error_rows)) {\n $error_html = $this->load->view('import/error/rows', array('num_rows' => count($error_rows), 'rows' => $error_rows, 'columns' => $columns), true);\n }\n if (!empty($stored_rows)) {\n $msg = $stored_rows . ' ' . lang('common_record_stored');\n echo json_encode(array('success' => true, 'message' => $msg, 'error_html' => $error_html));\n return;\n }\n $msg = $stored_rows . ' ' . lang('common_record_stored');\n echo json_encode(array('success' => false, 'message' => $msg, 'error_html' => $error_html));\n }", "title": "" }, { "docid": "00a41345f2daf32e57a6316c0531420d", "score": "0.61180836", "text": "public function store(Request $request, Excel $excel, Impromptu $impromptu, ImpromptuOld $impromptuold)\n\t{\n if (Input::hasFile('impromptu')){\n //empty impromptu_old\n ImpromptuOld::truncate();\n //move the info from the new to the old table\n DB::insert(DB::raw('INSERT INTO impromptu_old SELECT * FROM impromptu'));\n Impromptu::truncate();\n\n //Get the new info and put it in the new table\n $toinsert=array();\n Excel::load(Input::file('impromptu')->getRealPath(),function($reader){\n $results = $reader->get();\n $results->each(function($result){\n //Get the project string into an array\n list( $grant_code, $funding_type,$fiscal_year,$program, , , $short_award_number) =str_getcsv($result->project_number,\".\");\n if ($program==35 OR $program==67) {\n $this->toinsert[] = array(\n 'grant_code' => $grant_code,\n 'funding_type' => $funding_type,\n 'fiscal_year' => $fiscal_year,\n 'program' => $program,\n 'short_award_number' => $short_award_number*1,\n 'project_string' => $result->project_number,\n 'agency_funded' => $result->aagencyfunded,\n 'expended' => $result->bctd_direct_indirect_exp,\n 'outstanding_encumbered' => $result->coutstandingemcumbrances,\n 'total_obligation' => $result->dtotal_oblig_contr_adward,\n 'award_expended' => $result->ectd_award_contract_exp,\n 'award_reserve' => $result->fos_award_contr_reserves,\n 'load_balance' => $result->gos_award_contr_res_load,\n 'remaining_balance' => $result->iremainingbalance\n );\n }\n });\n });\n\n DB::table('impromptu')->insert($this->toinsert);\n }\n\n return Redirect::route('funding_sources.index')->with('message', 'Impromptu file imported successfully');\n\t}", "title": "" }, { "docid": "0b59658f9190d79a1027f5830bbfbc45", "score": "0.61092275", "text": "public function importFile(){\n\n // Validation\n $input = $this->validate([\n 'file' => 'uploaded[file]|max_size[file,1024]|ext_in[file,csv],'\n ]);\n\n if (!$input) { // Not valid\n session()->setFlashdata('message', 'File not imported.');\n session()->setFlashdata('alert-class', 'alert-danger');\n\n return redirect()->to('/test');\n }else{ // Valid\n if($file = $this->request->getFile('file')) {\n $db = \\Config\\Database::connect();\n $builder = $db->table('test');\n $builder->truncate();\n if ($file->isValid() && ! $file->hasMoved()) {\n\n // Get random file name\n $newName = $file->getRandomName();\n\n // Store file in public/csvfile/ folder\n $file->move('../public/csvfile', $newName);\n\n // Reading file\n $file = fopen(\"../public/csvfile/\".$newName,\"r\");\n $i = 0;\n $numberOfFields = 4; // Total number of fields\n\n $importData_arr = array();\n\n // Initialize $importData_arr Array\n while (($filedata = fgetcsv($file, 1000, \",\")) !== FALSE) {\n $num = count($filedata);\n\n // Skip first row & check number of fields\n if($i > 0 && $num == $numberOfFields){ \n \n // Key names are the insert table field names - name, email, city, and status\n $importData_arr[$i]['name'] = $filedata[0];\n $importData_arr[$i]['email'] = $filedata[1];\n $importData_arr[$i]['city'] = $filedata[2];\n $importData_arr[$i]['status'] = $filedata[3];\n\n }\n\n $i++;\n\n }\n fclose($file);\n \n // Insert data\n $count = 0;\n foreach($importData_arr as $userdata){\n $users = new test();\n\n // Check record\n $checkrecord = $users->where('email',$userdata['email'])->countAllResults();\n\n if($checkrecord == 0){\n\n ## Insert Record\n if($users->insert($userdata)){\n $count++;\n }\n }\n\n }\n\n // Set Session\n session()->setFlashdata('message', $count.' Record inserted successfully!');\n session()->setFlashdata('alert-class', 'alert-success');\n\n }else{\n // Set Session\n session()->setFlashdata('message', 'File not imported.');\n session()->setFlashdata('alert-class', 'alert-danger');\n }\n }else{\n // Set Session\n session()->setFlashdata('message', 'File not imported.');\n session()->setFlashdata('alert-class', 'alert-danger');\n }\n\n }\n\n return redirect()->to('/test'); \n }", "title": "" }, { "docid": "0c295d6a6f94313cc23e9c3f333e879e", "score": "0.61072963", "text": "public function importFile(Request $request){\n\n if($request->hasFile('sample_file')){\n\n $path = $request->file('sample_file')->getRealPath();\n\n $data = \\Excel::load($path)->get();\n\n\n\n if($data->count()){\n\n foreach ($data as $key => $value) {\n\n $slug = SlugService::createSlug(Company::class, 'slug', $value->company_name, ['unique' => true]);\n\n $company = new Company;\n\n $arr[] = ['company_name' => $value->company_name,\n 'location' => $value->location,\n 'slug' => $slug,\n 'company_phone' => $value->company_phone,\n 'company_email' => $value->company_email,\n 'company_website' => $value->company_website,\n 'year_founded' => $value->year_founded,\n 'company_size' => $value->company_size,\n 'company_description' => $value->company_description,\n 'city' => $value->city,\n 'industry_id' => $value->industry_id,\n 'user_id' => 0,\n 'status' => 1,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ];\n\n }\n if(!empty($arr)){\n $duplicates = 0;\n $added = 0;\n $dup_arr = array();\n foreach($arr as $comp) {\n if($company->exist('company_name', $comp['company_name']) || $company->exist('slug', $comp['slug'])) {\n $duplicates++;\n $dup_arr[] = ['company_name' => $comp['company_name'], 'company_phone' => $comp['company_phone']];\n continue;\n }\n\n $added++;\n\n DB::table('companies')->insert($comp);\n $comp_id = Company::where('company_name', $comp['company_name'])->pluck('id');\n DB::table('cloudsearch_queues')->insert([\n 'entry_id' => $comp_id[0],\n 'entry_type' => 'App\\Company',\n 'action' => 'update',\n 'status' => 0,\n 'created_at' => Carbon::now()->getTimestamp(),\n ]);\n\n\n }\n\n session()->flash('success', 'File imported, ' . $added . ' companies imported, ' . $duplicates . ' duplicates found.' );\n if($duplicates > 0) {\n \\Excel::create('companies_'.$duplicates.'_duplicates', function($excel) use ($dup_arr) {\n\n $excel->sheet('Companies Duplicates Sheet', function($sheet) use ($dup_arr)\n\n {\n\n $sheet->fromArray($dup_arr);\n\n });\n\n })->download('xls');\n }\n\n \\Excel::create('companies_'.$duplicates.'_duplicates', function($excel) use ($dup_arr) {\n\n $excel->sheet('Companies Duplicates Sheet', function($sheet) use ($dup_arr)\n\n {\n\n $sheet->fromArray($dup_arr);\n\n });\n\n })->download('xls');\n }\n\n }\n\n }\n\n session()->flash('error', 'Request data does not have any files to import.');\n\n return back(); \n\n }", "title": "" }, { "docid": "d32ea046cc1d347159cb1a1c45e17a2e", "score": "0.6103854", "text": "public function importExcel(\\Illuminate\\Http\\Request $request)\n {\n $request->validate([\n 'import_file' => 'required|file|mimetypes:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'\n ]);\n Excel::import(new \\App\\Imports\\MahasiswaImport, $request->file('import_file'));\n return Helper::redirectSuccess(route('mahasiswas.index'), __('Impor berhasil dilakukan'));\n }", "title": "" }, { "docid": "d62468fec8fe839c891c5be69c60cf6b", "score": "0.6099588", "text": "public function import()\n {\n // I moved the connection data to lib/MySQLDatabase.php\n /*\n * Import data into a SQL database\n */\n\n $this->thingsMapper->saveAll($this->things);\n }", "title": "" }, { "docid": "949a978d9bba013f42825e98e961cd53", "score": "0.6097825", "text": "public function importMahasiswa() {\n $fileExcel = Input::file('excel');\n if (empty($fileExcel)) { \n return Redirect::to('administrator/mahasiswa')\n ->with('msge','Input tidak boleh kosong.');\n } else {\n $excels = Excel::selectSheetsByIndex(0)->load($fileExcel, function ($reader) {\n\n })->get();\n\n #validation data\n $rules = array(\n 'nim' => 'required',\n 'nama_mahasiswa' => 'required',\n 'tempat_lahir' => 'required',\n 'tanggal_lahir' => 'required',\n 'alamat' => 'required',\n 'telepon' => 'required',\n 'jenis_kelamin' => 'required',\n 'agama' => 'required',\n 'angkatan' => 'required', \n 'kode_prodi' => ' required'\n );\n $counter = 0;\n\n foreach ($excels as $key => $excel) {\n $validation = Validator::make($excel->toArray(), $rules);\n $cekada = Mahasiswa::find($excel->nim);\n\n if ($cekada) {\n continue;\n }\n if ($validation->fails()) {\n continue;\n }\n $mahasiswa = array(\n 'nim' => $excel->nim,\n 'nama_mahasiswa' => $excel->nama_mahasiswa,\n 'tempat_lahir' => $excel->tempat_lahir,\n 'tanggal_lahir' => $excel->tanggal_lahir,\n 'alamat' => $excel->alamat,\n 'telepon' => $excel->telepon,\n 'jenis_kelamin' => $excel->jenis_kelamin,\n 'agama' => $excel->agama,\n 'angkatan' => $excel->angkatan, \n 'kode_prodi' => $excel->kode_prodi\n );\n\n $tambah = Mahasiswa::create($mahasiswa);\n if ($tambah) {\n $counter++;\n }\n }\n if ($counter > 0) { \n return Redirect::to('administrator/mahasiswa')\n ->with('msgs', '<b>' . $counter . '</b> Data mahasiswa berhasil diimport.');\n } else {\n\n return Redirect::to('administrator/mahasiswa')\n ->with('msge', 'Tidak ada data yang di import.');\n }\n }\n }", "title": "" }, { "docid": "c27ba0869b17df057b175a94085c2bad", "score": "0.6088494", "text": "public function importToDB(){\n $file=resource_path('pendingfiles/*.csv');\n //Get CSV PendingFiles from resource path\n $files=glob($file);\n \n //Set Max Execution Time\n ini_set('max_execution_time','1800');\n \n //Loop through each pending files.\n foreach ($files as $file) {\n ProcessCSVUpload::dispatch($file);\n }\n }", "title": "" }, { "docid": "7c97f34b5c10b4776c104deaa6ad7f63", "score": "0.6032456", "text": "public function uploadTimeEntries()\n {\n request()->validate([\n 'time_entry' => 'required|file'\n ]);\n\n $fileName = now()->toDateTimeString();\n\n Storage::disk('backup')->put($fileName.'.ods', file_get_contents(request()->file('time_entry')));\n\n Excel::import(new TimeEntriesImport, 'backup/'.$fileName.'.ods');\n\n return back()->with([\n 'message' => 'Time Entries Uploaded successfully'\n ]);\n }", "title": "" }, { "docid": "e84b996e34bb35e375a418f7304ceb7f", "score": "0.603059", "text": "public function uploadAction() \n {\n $form = new FormUpload( $this->queryManager );\n\n if( $this->getRequest()->isPost() ) {\n\n // Make certain to merge the files info!\n $request = $this->getRequest();\n\n /* you should remember three things: 1) merge $_POST and $_FILES super-global arrays \n before you pass them to the form's setData() method; 2) use isValid() form's method \n to check uploaded files for correctness (run validators); 3) use getData() form's method \n to run file filters. */ \n $data = array_merge_recursive(\n $request->getPost()->toArray(), //getting data from Post of Elements\n $request->getFiles()->toArray() //getting data from Files Elements (like: name of the file, etc )\n );\n\n // Pass data to form.\n $form->setData($data);\n\n // Execute file validators. INVERSE TO THE NORMAL PROCESS \n if ($form->isValid()) { \n $data = $form->getData();\n\n $inputFileName = $data['file']['tmp_name']; //recovering from the route defined\n\n //reading from file\n $sheetData = $this->wlManager->readExcelFile( $inputFileName );\n\n //result['valid'] : data ready for updating and result['invalid'] : inconsistency data\n if (!empty( $sheetData )) {\n $result = $this->parseExcelFile( $sheetData );\n } \n\n $existPartsToInsert = !empty( $result['valid'] ); // are there some Parts ready for being inserted?\n $existInc = !empty($result['novalid']); // are there inconsistencies???\n\n if ( $existPartsToInsert ) {\n $inserted = $this->insertValid( $result['valid'] );\n\n if ( $inserted ) { \n $this->flashMessenger()->addInfoMessage(\"The PARTS from file: [\".$data['file']['name'].\"] were uploaded.[ \".count($result['valid']).\" ] item(s) was(were) uploaded.\");\n } else {\n $this->flashMessenger()->addErrorMessage(\"Oopss!! Error trying uploading files.\");\n }\n }\n\n /* CREATE INCONSISTENCY EXCEL */\n if ( $existInc ) {\n $this->wlManager->writeErrorsToExcel( $result['novalid'] );\n $this->session->inconsistency = true;\n\n $urlInc = './data/upload/wishlist_inc.xls'; \n $message = !$existPartsToInsert ? 'No PARTS were uploaded' : '';\n $this->flashMessenger()->addErrorMessage(\"Oopss!!! [\".count($result['novalid']).\"] inconsistencies were found. \". $message); \n }\n\n $options = ['urlinc'=> $urlInc];\n return $this->redirect()->toRoute('wishlist', ['action'=>'index'], $options, $options); \n\n } else {\n $form->get('file')->setMessages(['Oops!!! Invalid file format']); \n }//ENDIF isValid the File???\n\n }//ENDIF checking isPost() \n\n // Render the page.\n return new ViewModel([\n 'form' => $form\n ]); \n }", "title": "" }, { "docid": "93215ea82c0baf5eaf352e0d587a471b", "score": "0.6027967", "text": "public function importCsv()\n {\n if(Input::hasFile('usersImport')){\n $path = Input::file('usersImport')->getRealPath();\n $data = Excel::load($path, function($reader) {\n })->get();\n if(!empty($data) && $data->count()){\n foreach ($data as $key => $value) {\n if (count($value) > 0) { \n $groups = Group::whereNull('deleted_at')->where('name',$value->group)->first();\n $roles = Role::whereNull('deleted_at')->where('name',$value->role)->first();\n $user = new User;\n $user->prefix = $value->prefix;\n $user->firstname = $value->firstname;\n $user->lastname = $value->lastname;\n $user->code = strval($value->code);\n $user->email = strval($value->email);\n $user->password = Hash::make(strval($value->password));\n $user->department = $value->department;\n $user->position = $user->position;\n $user->allowCreateForm = 0;\n $user->save();\n \n if (count($roles) > 0) {\n $user->attachRole($roles->_id);\n } if (count($groups) > 0) {\n $groups->users()->attach([\n 'user_id' => $user->_id,\n 'status' => '0'\n ]);\n }\n }\n }\n Session::flash('message', \"Import Success\");\n return Redirect::back();\n } else {\n Session::flash('message', \"Error\");\n return Redirect::back();\n }\n }\n }", "title": "" }, { "docid": "83272bc65de34302e1ba5c7d4d4ee6af", "score": "0.6025866", "text": "public function importStore(Request $request)\n {\n $request->validate([\n 'file' => 'required|file|mimes:csv,xlsx,xls,ods|max:2048',\n ]);\n\n try{\n\n Excel::import(new SDGTopicImport, $request->file('file')->store('temp'));\n\n return response()->json([\n 'status' => 'success',\n 'message' => 'All data successfully imported!',\n ], 200);\n\n }catch(Exception $e){\n\n return response()->json([\n 'status' => 'error',\n 'message' => $e->getMessage(),\n ], 400);\n\n }\n\n }", "title": "" }, { "docid": "cd9dca88c6c3c4a0b320617026650a91", "score": "0.6023965", "text": "public function handle()\n\t{\n\t\tProvider::flushEventListeners();\n\t\tProvider::getEventDispatcher();\n\n\t\t$entity = \"fornecedores\";\n\n\t\t$this->info( '* Import FORNECEDORES' );\n\t\t$start = microtime(true);\n\n\t\t$filename = $entity . '.xls';\n\n\t\t$this->info( \"*** Iniciando o Upload (\" . $entity . \") ***\");\n//\t $file = 'storage' . DIRECTORY_SEPARATOR . 'imports' . DIRECTORY_SEPARATOR . $filename;\n\t\t$file = storage_path('imports' . DIRECTORY_SEPARATOR . 'exports' . DIRECTORY_SEPARATOR . $filename);\n\n\t\tset_time_limit(3600);\n\n\t\t$reader = Excel::load($file, function ($sheet) {\n\t\t\t// Loop through all sheets\n\t\t\t$sheet->each(function ($row) {\n\n\t\t\t\t$segment = Segment::whereDescription($row->segment_name)->first();\n\t\t\t\tif($segment == NULL){\n\t\t\t\t\t$this->alert('SEM SEGMENTO: ' . $row->segment_name . ', idfornecedor: ' . $row->idfornecedor);\n\t\t\t\t\tif($row->segment_name != NULL){\n\t\t\t\t\t\t$segment = Segment::create([\n\t\t\t\t\t\t\t'description' => $row->segment_name\n\t\t\t\t\t\t]);\n\t\t\t\t\t\t$this->alert('SEGMENTO NOVO: ' . $row->segment_name . ', idfornecedor: ' . $row->idfornecedor);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t\t$state = CepStates::whereShortName($row->state_name)->first();\n\t\t\t\tif($state == NULL){\n\t\t\t\t\t$state = CepStates::whereName($row->state_name)->first();\n\t\t\t\t}\n\t\t\t\tif($state == NULL){\n\t\t\t\t\t$this->alert('SEM ESTADO: ' . $row->state_name . ', idfornecedor: ' . $row->idfornecedor);\n\t\t\t\t}\n\n\t\t\t\t$city = CepCities::whereName($row->city_name);\n\t\t\t\tif($state != NULL) {\n\t\t\t\t\t$city = $city->whereStateId($state->id);\n\t\t\t\t}\n\t\t\t\t$city->first();\n\t\t\t\tif($city == NULL){\n\t\t\t\t\t$this->alert('SEM CIDADE: ' . $row->city_name . ', idfornecedor: ' . $row->idfornecedor);\n\t\t\t\t}\n\n//\t\t\t $now = \\Carbon\\Carbon::now();\n//\n//\t\t\t $security = [\n//\t\t\t\t 'creator_id' => 1,\n//\t\t\t\t 'validator_id' => 1,\n//\t\t\t\t 'verb' => 'IMPORT',\n//\t\t\t\t 'validated_at' => $now->toDateTimeString(),\n//\t\t\t ];\n//\t\t\t $security = Security::create($security);\n\t\t\t\t/*\n\t\t\t\t'state_id',\n\t\t\t\t'city_id',\n\t\t\t\t'city_code',\n\t\t\t\t'zip',\n\t\t\t\t'district',\n\t\t\t\t'street',\n\t\t\t\t'number',\n\t\t\t\t'complement'\n\t\t\t\t * */\n\t\t\t\t$address = [\n\t\t\t\t\t'state_id' => optional($state)->id,\n\t\t\t\t\t'city_id' => optional($city)->id,\n\t\t\t\t\t'city_code' => strval($row->city_code),\n\t\t\t\t\t'zip' => intval($row->zip),\n\t\t\t\t\t'district' => strval($row->district),\n\t\t\t\t\t'street' => strval($row->street),\n\t\t\t\t\t'number' => strval($row->number),\n\t\t\t\t\t'complement' => strval($row->complement),\n\t\t\t\t];\n\t\t\t\t$address = Address::create($address);\n\n\t\t\t\t/*\n\t\t\t\t'phone',\n\t\t\t\t'cellphone',\n\t\t\t\t'skype',\n\t\t\t\t'email',\n\t\t\t\t * */\n\t\t\t\t$contact = [\n\t\t\t\t\t'phone' => strval($row->phone),\n\t\t\t\t\t'cellphone' => strval($row->cellphone),\n\t\t\t\t\t'skype' => strval($row->skype),\n\t\t\t\t\t'email' => strval($row->email),\n\t\t\t\t];\n\t\t\t\t$contact = Contact::create($contact);\n\n\t\t\t\t$legal_person = NULL;\n\t\t\t\t$cpf = NULL;\n\t\t\t\tif($row->type == 'legal_person'){\n\t\t\t\t\t/*\n\t\t\t\t\t'cnpj',\n\t\t\t\t\t'ie',\n\t\t\t\t\t'exemption_ie',\n\t\t\t\t\t'social_reason',\n\t\t\t\t\t'fantasy_name',\n\t\t\t\t\t'ativ_economica',\n\t\t\t\t\t'sit_cad_vigente',\n\t\t\t\t\t'sit_cad_status',\n\t\t\t\t\t'data_sit_cad',\n\t\t\t\t\t'reg_apuracao',\n\t\t\t\t\t'data_credenciamento',\n\t\t\t\t\t'ind_obrigatoriedade',\n\t\t\t\t\t'data_ini_obrigatoriedade'\n\t\t\t\t\t */\n\t\t\t\t\t$legal_person = [\n\t\t\t\t\t\t'cnpj' => strval($row->cnpj),\n\t\t\t\t\t\t'ie' => strval($row->ie),\n\t\t\t\t\t\t'exemption_ie' => strval($row->exemption_ie),\n\t\t\t\t\t\t'social_reason' => strval($row->social_reason),\n\t\t\t\t\t\t'fantasy_name' => strval($row->fantasy_name),\n\t\t\t\t\t\t'ativ_economica' => strval($row->ativ_economica),\n\t\t\t\t\t\t'sit_cad_vigente' => strval($row->sit_cad_vigente),\n\t\t\t\t\t\t'sit_cad_status' => strval($row->sit_cad_status),\n\t\t\t\t\t\t'data_sit_cad' => DataHelper::getPrettyDate($row->data_sit_cad),\n\t\t\t\t\t\t'reg_apuracao' => strval($row->reg_apuracao),\n\t\t\t\t\t\t'data_credenciamento' => DataHelper::getPrettyDate($row->data_credenciamento),\n\t\t\t\t\t\t'ind_obrigatoriedade' => strval($row->ind_obrigatoriedade),\n\t\t\t\t\t\t'data_ini_obrigatoriedade' => DataHelper::getPrettyDate($row->data_ini_obrigatoriedade),\n\t\t\t\t\t];\n\t\t\t\t\t$legal_person = LegalPerson::create($legal_person);\n\t\t\t\t} else {\n\t\t\t\t\t$cpf = strval($row->cpf);\n\t\t\t\t}\n//\t\t\t dd($legal_person);\n\n\t\t\t\t/*\n\t\t\t\t\t'address_id',\n\t\t\t\t\t'contact_id',\n\t\t\t\t\t'segment_id',\n\t\t\t\t\t'legal_person_id',\n\t\t\t\t\t'budget_email',\n\t\t\t\t\t'group',\n\t\t\t\t\t'responsible_name',\n\t\t\t\t\t'cpf',\n\t\t\t\t * */\n\t\t\t\t$provider = [\n\t\t\t\t\t'created_at' => $row->created_at,\n//\t\t\t\t 'security_id' => $security->id,\n\t\t\t\t\t'idfornecedor' => intval($row->idfornecedor),\n\t\t\t\t\t'address_id' => $address->id,\n\t\t\t\t\t'contact_id' => $contact->id,\n\t\t\t\t\t'segment_id' => optional($segment)->id,\n\t\t\t\t\t'legal_person_id' => optional($legal_person)->id,\n\t\t\t\t\t'budget_email' => $row->budget_email,\n\t\t\t\t\t'group' => $row->group,\n\t\t\t\t\t'responsible_name' => $row->responsible_name,\n\t\t\t\t\t'cpf' => $cpf,\n\t\t\t\t];\n\n\t\t\t\t$id = DB::table('providers')->insertGetId($provider);\n\n\n\t\t\t\t$this->info( \"****************** (\" . $id . \") ******************\");\n\n\t\t\t});\n\t\t})->ignoreEmpty();\n\n\t\t$this->alert( 'Import FINISHED in ' . round((microtime(true) - $start), 3) . \"s ***\");\n\t}", "title": "" }, { "docid": "2888ded02af90d772dfd95d1d2e3d42b", "score": "0.6022768", "text": "public function uploadExcel($file){\r\r\n $marketing_person_id = Auth::guard('marketing_person')->user()->id;\r\r\n\r\r\n $path = $file->getRealPath();\r\r\n $excel = Excel::load($path, function($reader){})->get();\r\r\n\r\r\n if(!empty($excel) && $excel->count()){\r\r\n $i = 1;\r\r\n $c = 0;\r\r\n foreach($excel as $exl){\r\r\n if($i>1000){\r\r\n break;\r\r\n }\r\r\n\r\r\n if($exl->phone_number && $exl->enquiry_source){\r\r\n $data = new EnquiryLeads;\r\r\n\r\r\n $excl = [];\r\r\n $excl['student_name'] = $exl->student_name;\r\r\n $excl['phone'] = $exl->phone_number;\r\r\n $excl['enquiry_src'] = $exl->enquiry_source;\r\r\n $excl['course'] = $exl->course;\r\r\n\r\r\n if(!$data->validate($excl,\"add\")){\r\r\n $enquiry_src_arr = explode(':',$excl['enquiry_src']);\r\r\n $course_arr = explode(':',$excl['course']);\r\r\n\r\r\n if(EnquirySrc::where('id',$enquiry_src_arr[0])->where('status','0')->where('is_deleted','0')->exists() && Course::where('id',$course_arr[0])->where('status','0')->where('is_deleted','0')->exists()){\r\r\n $data->student_name = $excl['student_name'];\r\r\n $data->phone = $excl['phone'];\r\r\n $data->enquiry_src = $enquiry_src_arr[0];\r\r\n $data->course = $course_arr[0];\r\r\n $data->added_by = $marketing_person_id;\r\r\n $data->save();\r\r\n\r\r\n $c++;\r\r\n }\r\r\n }\r\r\n\r\r\n $i++;\r\r\n }\r\r\n }\r\r\n\r\r\n return $c;\r\r\n }else{\r\r\n return -1;\r\r\n }\r\r\n }", "title": "" }, { "docid": "d1f9eca4afae2bc588fa861204870da1", "score": "0.6009583", "text": "public function importar()\n {\n\n try {\n\n /**\n * Recebe dados somente via POST\n */\n if (!$this->request->is('post')) {\n throw new \\InvalidArgumentException(ERROR_PROCESS, E_USER_WARNING);\n }\n\n $this->arquivo = isset($_FILES['arquivo']) ? $_FILES['arquivo'] : false;\n\n\n //UTF-8\n $this->ExcelReader->setOutputEncoding('UTF-8');\n $this->ExcelReader->setUTFEncoder('mb');\n /**\n * Leia o arquivo Excel. Nota: apenas caminhos relativos parecem funcionar\n */\n $this->read = $this->ExcelReader->Spreadsheet_Excel_Reader($this->arquivo['tmp_name']);\n\n if (!v::type('bool')->validate($this->read) && $this->read === false) {\n throw new \\InvalidArgumentException(ERROR_PROCESS, E_USER_WARNING);\n }\n\n if (!v::arrayVal()->notEmpty()->validate($this->ExcelReader->sheets[0]['cells'])) {\n throw new \\InvalidArgumentException(ERROR_PROCESS, E_USER_WARNING);\n }\n\n self::transactionProdutoImportacao();\n\n\n\n// if (v::type('bool')->validate($this->ok_update)) {\n//\n// if (count($this->Session->read('total_produto_atualizado')) > 0) {\n// $this->setMsgAlertSuccess('Dados de ' . count($this->Session->read('total_produto_atualizado')) . ' produtos foram atualizados com sucesso.');\n// } else {\n// $this->setMsgAlertSuccess('Dados de ' . count($this->Session->read('total_produto_atualizado')) . ' produto foram atualizados com sucesso.');\n// }\n//\n// $this->Session->delete('total_produto_atualizado');\n// return $this->redirect(array('controller' => 'catalogo', 'action' => 'produto', 'listar'));\n//\n// }\n//\n// if (v::type('bool')->validate($this->ok)) {\n//\n// $this->setMsgAlertSuccess('Foram importados o total de ' . $this->total_cadastrado . ' produtos com sucesso. <br /> Por favor, revise os dados de cada produto importado na lista abaixo.');\n// unset($this->total_cadastrado);\n// $this->Session->delete('total_produto_cadastrado');\n// return $this->redirect(array('controller' => 'catalogo', 'action' => 'produto', 'listar'));\n//\n// } else {\n// throw new \\RuntimeException(\"Error: Houve uma falha ao importar os registros!\", E_USER_WARNING);\n// }\n\n\n } catch (\\NotFoundException $e) {\n\n $this->setMsgAlertError($e->getMessage());\n\n } catch (\\InvalidArgumentException $e) {\n\n $this->setMsgAlertError($e->getMessage());\n\n } catch (\\RuntimeException $e) {\n\n $this->setMsgAlertError($e->getMessage());\n \\Exception\\VialojaDatabaseException::errorHandler($e);\n\n\n// if (strpos($e->getMessage(), 'image')) {\n//\n// $this->setMsgAlertWarning(\n// 'Atenção! O arquivo foi processado e os dados foram inseridos parcialmente!\n// <br /> Atenção! A imagem do produto \"' . $this->nome_produto . '\" está corrompida e a importação foi abortada.\n// <br/> Corrija a imagem através do upload manual, ou <a href=\"/admin/catalogo/produto/importar\">Clique Aqui</a> para enviar o arquivo novamente!'\n// );\n//\n// } else {\n//\n// $this->setMsgAlertWarning('Atenção! O arquivo foi processado e os dados foram inseridos parcialmente!');\n// return $this->redirect($this->referer());\n//\n// }\n//\n// unset($this->total_cadastrado);\n// $this->Session->delete('total_produto_cadastrado');\n// return $this->redirect(array('controller' => 'catalogo', 'action' => 'produto', 'listar'));\n\n\n } finally {\n\n $this->arquivo = false;\n return $this->redirect($this->referer());\n\n }\n\n }", "title": "" }, { "docid": "07c2ecc07a0c9c047789e080a3aa2fbf", "score": "0.6003063", "text": "public function import(Request $request)\n {\n $request->validate([\n 'import_file' => 'required|file'\n ]);\n\n $path = $request->file('import_file');\n $data = Excel::import(new ContactsImport, $path);\n \n //return $collection = (new ContactsImport)->toCollection($path);\n\n return response()->json(['message' => 'uploaded successfully'], 200);\n }", "title": "" }, { "docid": "b008062ba42fdff6b5cdbde9fb0ff4bb", "score": "0.6002133", "text": "public function importEMP($destfile){\n Excel::load($destfile,function($reader){\n $rules=[\n //\n 'number'=>'required|unique:employees',\n 'company_id'=>'required|exists:companies,id',\n 'bank_account'=>'required|unique:employees',\n 'phone_number'=>'required'\n ];\n $sheetsCount=$reader->getSheetCount();\n\n for($i=0;$i<$sheetsCount;$i++){\n $sheets=$reader->getSheet($i)->toArray();\n $company_name=$reader->getSheet($i)->getTitle();\n $dept['company_id']=Company::where('name',$company_name)->value('id');\n $sheetCount=count($sheets);\n for($j=6;$j<$sheetCount;$j++){\n // Get Department ID;\n $employee['department_name']=trim($sheets[$j][1]);\n $employee['costcenter']=trim($sheets[$j][10]);\n $employee['company_id']= $dept['company_id'];\n\n $employee['name']=trim($sheets[$j][2]);\n $employee['number']=$sheets[$j][3];\n\n\n $level_credit=trim($sheets[$j][6]);\n if($level_credit=='实报实销'){\n $employee['level_id']=5;\n }elseif(intval($level_credit)<200){\n $employee['level_id']=1;\n }elseif(intval($level_credit)>400){\n $employee['level_id']=3;\n }else{\n $employee['level_id']=2;\n }\n\n\n $employee['phone_number']=trim($sheets[$j][4]);\n $employee['category_id']=2;\n $employee['status_id']=1;\n $employee['bank_info']=trim($sheets[$j][9]);\n $employee['bank_account']=str_replace('-','',trim($sheets[$j][8]));\n\n $emp_v=\\Validator::make($employee,$rules);\n if($emp_v->fails()){\n\n }else{\n Employee::create($employee);\n }\n }\n }\n\n\n\n //END\n });\n }", "title": "" }, { "docid": "6810522a135e189009203841b14168aa", "score": "0.5995251", "text": "public function saveSalesAgentBulkUpload(Request $request)\n {\n Log::info(\"In saveSalesAgentBulkUpload function for import sheet data in db.\");\n \n // For check extension of uploaded file is correct or not.\n $validator = \\Validator::make(\n [\n 'upload_file' => $request->hasFile('upload_file')? strtolower($request->file('upload_file')->getClientOriginalExtension()) : null,\n ],\n [\n 'upload_file' => 'required|in:csv,xlsx,xls',\n ]\n );\n if ($validator->fails()) {\n Log::info(\"Uploaded file is in wrong extension.\");\n Log::info($validator->errors()->messages());\n return response()->json(['status' => 'error', 'errors' => $validator->errors()->messages()], 422);\n }\n Log::info(\"Uploaded file is in correct extension.\");\n\n try {\n\n Log::info(\"Load Excel from it's real path.\");\n $path = $request->file('upload_file')->getRealPath();\n $data = Excel::load($path, function($reader) {\n $columns= [\n \"client\",\n \"sales_center\",\n \"location\",\n \"first_name\",\n \"last_name\",\n \"email\",\n \"password\",\n \"agent_type\",\n \"certified\",\n \"certification_date\",\n \"certification_exp_date\",\n \"state_test\",\n \"state\",\n \"background_check\",\n \"drug_check\",\n \"external_id\",\n \"phone_number\",\n \"restrict_state\",\n ];\n $reader->select($columns);\n })\n ->ignoreEmpty()\n ->get()\n ->toArray();\n\n $errors = $valid_data = array();\n if (empty($data)) {\n $errors[1][] = 'The file is empty or invalid data.';\n Log::info(\"The file is empty or invalid data.\");\n $view = view('client.errors.file-errors', compact('errors'))->render();\n return response()->json(['status' => 'dataErrors', 'errors' => $view], 422);\n }\n\n // For check duplicate email exists or not in uploaded sheet, if duplicate email is exist than throw the error message with email list\n $getEmails = Excel::load($path, function($reader) {\n $columns = ['email'];\n $reader->select($columns);\n })\n ->get()\n ->toArray();\n $allEmails = array_column($getEmails, 'email');\n $duplicateEmails = array();\n foreach(array_count_values($allEmails) as $val => $r){\n if($r > 1){\n $duplicateEmails[] = $val;\n }\n }\n if (!empty($duplicateEmails)) {\n $explodeEmail = implode(', ', $duplicateEmails);\n $errors[1][] = 'Duplicate email error :- Please use an email only once, Following email(s) are used more than one times : '.$explodeEmail;\n Log::info('Duplicate email error :- Following email(s) are used more than one times : '.$explodeEmail);\n $view = view('client.errors.file-errors', compact('errors'))->render();\n return response()->json(['status' => 'dataErrors', 'errors' => $view], 422);\n }\n\n Log::info(\"For fetch and validate sheet data.\");\n foreach ($data as $key => $agent_data) {\n // For check Client\n $clientName = \"\";\n if (isset($agent_data['client']) && !empty($agent_data['client'])) {\n $clientName = $agent_data['client'];\n }\n $checkClient = Client::where('name', '=', $clientName)\n ->where('status', '=', 'active')\n ->first();\n $clientId = !empty($checkClient) ? $checkClient->id : null;\n\n // For check SalesCenter\n $salesCenterName = \"\";\n if (isset($agent_data['sales_center']) && !empty($agent_data['sales_center'])) {\n $salesCenterName = $agent_data['sales_center'];\n }\n $checkSalesCenter = Salescenter::where('name', '=', $salesCenterName)\n ->where('status', '=', 'active')\n ->where('client_id', '=', $clientId)\n ->first();\n $salesCenterId = !empty($checkSalesCenter) ? $checkSalesCenter->id : null; \n \n // For check Location\n $locationName = \"\";\n if (isset($agent_data['location']) && !empty($agent_data['location'])) {\n $locationName = $agent_data['location'];\n }\n $location = Salescenterslocations::where('name', '=', $locationName)\n ->where('client_id', '=', $clientId)\n ->where('salescenter_id', $salesCenterId)\n ->first();\n $locationId = !empty($location) ? $location->id : null;\n\n // Data validation\n $dataValidator = Validator::make($agent_data,\n [\n 'client' => ['required', 'max:255',\n Rule::exists('clients','name')],\n 'sales_center' => ['required', 'max:255',\n Rule::exists('salescenters','name')->where(function ($query) use ($clientId) {\n $query->where('client_id', $clientId);\n })],\n 'location' => ['required','max:255',\n Rule::exists('salescenterslocations','name')->where(function ($query) use ($clientId, $salesCenterId) {\n $query->where('salescenter_id',$salesCenterId)->where('client_id', $clientId);\n })],\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email',\n 'password' => 'required|max:255|min:6',\n 'agent_type' => ['required',\n Rule::exists('location_channels','channel')->where(function ($query) use ($locationId) {\n $query->where('location_id', $locationId);\n })],\n 'certified' => 'required|in:0,1',\n 'state_test' => 'required|in:0,1',\n 'background_check' => 'required|in:0,1',\n 'drug_check' => 'required|in:0,1',\n 'phone_number' => 'nullable|numeric',\n 'restrict_state' => 'nullable|max:255',\n ]\n );\n \n if ($dataValidator->fails()) {\n foreach ($dataValidator->messages()->all() as $value) {\n $errors[$key + 1][] = $value;\n }\n } else {\n $valid_data[$key]['client_id'] = $checkClient->id;\n $valid_data[$key]['salescenter_id'] = $checkSalesCenter->id;\n $valid_data[$key]['sales_center'] = $checkSalesCenter->name;\n\n $valid_data[$key]['first_name'] = $agent_data['first_name'];\n $valid_data[$key]['last_name'] = $agent_data['last_name'];\n $valid_data[$key]['email'] = $agent_data['email'];\n $valid_data[$key]['password'] = $agent_data['password'];\n $valid_data[$key]['agent_type'] = $agent_data['agent_type'];\n $valid_data[$key]['certified'] = $agent_data['certified'];\n $valid_data[$key]['passed_state_test'] = $agent_data['state_test'];\n $valid_data[$key]['state'] = $agent_data['state'];\n $valid_data[$key]['location_id'] = $locationId;\n $valid_data[$key]['backgroundcheck'] = $agent_data['background_check'];\n $valid_data[$key]['drugtest'] = $agent_data['drug_check'];\n $valid_data[$key]['external_id'] = isset($agent_data['external_id']) ? $agent_data['external_id'] : '';;\n \n if(!empty($agent_data['certification_date'])) {\n $valid_data[$key]['certification_date'] = date('Y-m-d',strtotime($agent_data['certification_date']));\n }\n if(!empty($agent_data['certification_exp_date'])) {\n $valid_data[$key]['certification_exp_date'] = date('Y-m-d',strtotime($agent_data['certification_exp_date']));\n }\n \n $valid_data[$key]['phone_number'] = isset($agent_data['phone_number']) ? $agent_data['phone_number'] : null;\n $valid_data[$key]['restrict_state'] = isset($agent_data['restrict_state']) ? $agent_data['restrict_state'] : null;\n }\n }\n \n if (!empty($errors)) {\n Log::info(\"Bulk Upload is failed,\");\n Log::info($errors);\n $view = view('client.errors.file-errors', compact('errors'))->render();\n return response()->json(['status' => 'dataErrors', 'errors' => $view], 422);\n } else {\n\n Log::info(\"For get valid data and store in the database.\");\n foreach ($valid_data as $key => $agent_data1) {\n\n $verification_code = str_random(20);\n $data['client_id'] = $agent_data1['client_id'];\n $data['first_name'] = $agent_data1['first_name'];\n $data['last_name'] = $agent_data1['last_name'];\n $data['email'] = $agent_data1['email'];\n $data['salescenter_id'] = $agent_data1['salescenter_id'];\n $data['access_level'] = 'salesagent';\n $data['status'] = 'active';\n $data['verification_code'] = $verification_code ;\n $data['password'] = Hash::make($agent_data['password']);\n \n // Store in users table\n $user = User::create($data);\n $user->userid = strtolower($agent_data1['first_name'][0]).$user->id;\n $user->save();\n \n // Create data array for store agents details\n $agent_details['user_id'] = $user->id;\n $agent_details['passed_state_test'] = $agent_data1['passed_state_test'];\n $agent_details['state'] = $agent_data1['state'];\n $agent_details['certified'] = $agent_data1['certified'];\n $agent_details['backgroundcheck'] = $agent_data1['backgroundcheck'];\n $agent_details['drugtest'] = $agent_data1['drugtest'];\n $agent_details['added_by'] = Auth::id();\n $agent_details['location_id'] = $agent_data1['location_id'];\n $agent_details['agent_type'] = $agent_data1['agent_type'];\n $agent_details['external_id'] = isset($agent_data1['external_id']) ? $agent_data1['external_id'] : null;\n if(!empty($agent_data1['certification_date'])) {\n $agent_details['certification_date'] = $agent_data1['certification_date'];\n }\n if(!empty($agent_data1['certification_exp_date'])) {\n $agent_details['certification_exp_date'] = $agent_data1['certification_exp_date'];\n }\n $agent_details['phone_number'] = $agent_data1['phone_number'];\n $agent_details['restrict_state'] = $agent_data1['restrict_state'];\n\n // Store data in salesagent_details table\n Salesagentdetail::create($agent_details);\n }\n \n // Redirect to the sales agent listing page\n $url = \\URL::route('admin.sales.agents');\n // session()->put('success', 'Sales agents successfully imported.');\n Log::info(\"Sales agents successfully imported.\");\n return response()->json(['status' => 'success', 'message' =>'Sales agents successfully imported.', 'url' =>$url], 200);\n }\n } catch(\\Exception $e) {\n Log::info(\"In Exception of saveSalesAgentBulkUpload : Something went wrong!\");\n Log::error($e);\n return response()->json(['status' => 'error', 'message' => $e->getMessage()], 500);\n }\n }", "title": "" }, { "docid": "ac9264425b1fbbb218aa039b066dd22e", "score": "0.5989823", "text": "public function import($request){\n\n $this->model->saveFile($request);\n\n $this->view->redirectToMain();\n }", "title": "" }, { "docid": "0a659445e2deec727aacaea5ef777bfc", "score": "0.5983896", "text": "public function import(Request $request)\n {\n Excel::load($request->file('file'), function($reader) {\n $reader->each(function ($item) {\n $visiMisi = $this->visiMisiRepository->create($item->toArray());\n });\n });\n\n Flash::success('Visi Misi saved successfully.');\n\n return redirect(route('visiMisis.index'));\n }", "title": "" }, { "docid": "36d509d98d6f8bf1229319284d9093ba", "score": "0.5980917", "text": "public function uploadAndImport($object)\n {\n $this->_behavior = $object->getRequest()->getPost('behavior');\n $importFile = $_FILES['import_file'];\n if (empty($importFile['tmp_name'])) {\n return ;\n }\n \n $csvFile = $importFile['tmp_name'];\n\n $this->_importErrors = array();\n $this->_importedRows = 0;\n\n $io = new Varien_Io_File();\n $info = pathinfo($csvFile);\n $io->open(array('path' => $info['dirname']));\n $io->streamOpen($info['basename'], 'r');\n \n // check and skip headers\n $headers = $io->streamReadCsv();\n if ($headers === false || count($headers) < 19) {\n $io->streamClose();\n Mage::throwException(Mage::helper('archana_storelocator')->__('Invalid Stores File Format'));\n }\n \n $adapter = $this->_getWriteAdapter();\n $adapter->beginTransaction();\n try {\n $rowNumber = 1;\n $importData = array();\n \n while (false !== ($csvLine = $io->streamReadCsv())) {\n $rowNumber ++;\n\n if (empty($csvLine)) {\n continue;\n }\n\n $row = $this->_getImportRow($csvLine, $rowNumber);\n \n if ($row !== false) {\n $importData[] = $row;\n }\n\n if (count($importData) == 5000) {\n $this->_saveImportData($importData);\n $importData = array();\n }\n }\n \n if ($this->_importErrors) {\n $error = Mage::helper('archana_storelocator')->__('File has not been imported. See the following list of errors: <br>%s', implode(\" <br>\", $this->_importErrors));\n Mage::throwException($error);\n }\n \n if(empty($this->_importErrors)){\n $this->_saveImportData($importData);\n }\n \n $io->streamClose();\n } catch (Mage_Core_Exception $e) {\n $adapter->rollback();\n $io->streamClose();\n Mage::throwException($e->getMessage());\n } catch (Exception $e) {\n $adapter->rollback();\n $io->streamClose();\n Mage::logException($e);\n Mage::throwException(Mage::helper('archana_storelocator')->__('An error occurred while import stores csv.'));\n }\n \n $adapter->commit();\n \n //add success message\n Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('archana_storelocator')->__($this->_importedRows.' - Rows imported successfully.'));\n return $this;\n }", "title": "" }, { "docid": "2d5871ce225654377f3909a3176284c2", "score": "0.59769034", "text": "public function importProducts(Request $request)\n {\n Excel::load($request->file('file'), function($reader) {\n // Getting all results\n $results = $reader->get();\n\n foreach ($results as $result) {\n if($result->marca_producto){\n $brand = Brand::where('title', $result->marca_producto)->first();\n if($brand){\n $brand_id = $brand->id;\n }else{\n $brand_id = Brand::create(['title' => $result->marca_producto, 'description' => $result->marca_producto])->id;\n }\n }\n\n if($result->categoria_producto){\n $category = Category::where('title', $result->categoria_producto)->first();\n if($category){\n $category_id = $category->id;\n }else{\n $category_id = Brand::create(['title' => $result->categoria_producto, 'description' => $result->categoria_producto])->id;\n }\n }\n\n $exists = Product::where('title', $result->titulo_producto)->first();\n if(!$exists){\n $photo_url = 'http://artificestore.mx/archivos/imagenes/'.$result->id_foto.'_image_'.$result->nombre_foto;\n $file = @file_get_contents($photo_url);\n $save = Storage::put('public/products/'.$result->nombre_foto, $file);\n $picture = Picture::create([\n 'original_name' => $result->nombre_foto,\n 'url' => str_replace('/storage/', '', Storage::url('products/'.$result->nombre_foto))\n ]);\n\n $product = Product::create([\n 'title' => $result->titulo_producto,\n 'description' => $result->titulo_producto,\n 'code' => $result->sku_producto,\n 'stock' => 10,\n 'regular_price' => $result->precio_producto,\n 'sale_price' => null,\n 'brand_id' => (isset($brand_id)) ? $brand_id : null,\n 'category_id' => (isset($category_id)) ? $category_id : null,\n ]);\n\n $product->pictures()->sync([$picture->id]);\n }\n }\n\n session()->flash('flash_message', 'Se han importado '.$results->count().' productos');\n\n });\n return redirect('productos');\n }", "title": "" }, { "docid": "eba2e8ec202ebf6778aa21661d50e60c", "score": "0.5958721", "text": "public function uplEmp(){\r\n\t\t if($_SERVER['REQUEST_METHOD']==\"POST\"){\r\n\t\t\t if($_POST['importSubmit']){\t\t\t\t\t\t//validate whether uploaded file is a csv file\r\n\t\t\t\t $csvMimes = array('text/x-comma-separated-values',\r\n\t\t\t\t\t 'text/comma-separated-values',\r\n\t\t\t\t\t 'application/octet-stream',\r\n\t\t\t\t\t 'application/vnd.ms-excel',\r\n\t\t\t\t\t 'application/x-csv',\r\n\t\t\t\t\t 'text/x-csv',\r\n\t\t\t\t\t 'text/csv',\r\n\t\t\t\t\t 'application/csv',\r\n\t\t\t\t\t 'application/excel',\r\n\t\t\t\t\t 'application/vnd.msexcel',\r\n\t\t\t\t\t 'text/plain');\r\n\r\n\t\t\t\t if(!empty($_FILES['upemp']['name']) && in_array($_FILES['upemp']['type'],$csvMimes)){\r\n\t\t\t\t\t \r\n\t\t\t\t\t if($_FILES['upemp']['tmp_name']){\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\t $csvFile = fopen($_FILES['upemp']['tmp_name'], 'r');\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\t while(($line = fgetcsv($csvFile)) !== FALSE){\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t if($line[0]!='' && $line[0]!='Employee No.'){\r\n\t\t\t\t\t\t\t\t $user_id = $this->session->userdata('loggedin')->user_id;\r\n\t\t\t\t\t\t\t\t $time = date('Y-m-d h:i:s');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//echo\"<pre>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//var_dump($line);\r\n\t\t\t\t\t\t\t\t $data = array(\r\n\t\t\t\t\t\t\t\t\t \"emp_no\" \t\t => $line[0],\r\n \t\t\t\t\t\t\t\t\t \"emp_name\"\t\t => $line[1],\r\n\t\t\t\t \t\t\t \t\t \"emp_catg\" \t => 0,\r\n\t\t\t\t\t\t \t\t\t \"designation\"\t => $line[2],\r\n\t\t\t \t\t\t \t\t\t \"sector\"\t\t => $line[3],\r\n\t\t\t\t\t\t \t\t\t \"date_of_joining\"\t => $line[4],\t\t \r\n\t\t\t\t\t \t \t\t\t \"status_flag\" \t => 1,\r\n\t\t\t \t\t\t \t\t\t \"date_of_termination\" => NULL,\r\n\t\t\t\t\t\t \t\t\t \"pan_no\"\t\t => $line[5],\r\n\t\t\t\t\t\t \t\t\t \"bank_ac_no\" \t => $line[6],\r\n\t\t\t\t\t\t \t\t\t \"pf_ac_no\"\t\t => $line[7],\r\n\t\t\t\t\t\t \t\t\t \"esi_no\"\t\t => $line[8],\r\n\t\t\t\t\t\t \t\t\t \"created_by\" \t => $user_id,\r\n\t\t\t\t\t\t\t\t\t \"created_dt\" \t => $time,\r\n\t\t\t\t\t\t\t\t\t \"modified_by\" => NULL,\r\n\t\t\t\t\t\t\t\t\t \"modified_dt\" => NULL\r\n\t\t\t\t\t \t\t\t );\r\n\t\t\t\t\t \t $this->PayrollModel->insert_data('mm_employee',$data);\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 $this->session->set_flashdata('msg', 'Successfully Added!');\r\n\t\t\t\t\t\t redirect('payroll/employee');\t\t\t\r\n\t\t\t\t\t\t fclose($csvFile);\r\n\t\t\t\t\t\t $qstring = '?status=succ';\r\n\t\t\t\t\t }else{\r\n\t\t\t\t\t\t $qstring = '?status=err';\r\n\t\t\t\t\t }\r\n\t\t\t\t }else{\r\n\t\t\t\t\t $qstring = '?status=invalid_file';\r\n\t\t\t\t }\t\t\t \t\t\t\t \r\n\t\t\t }\r\n\t\t }else{ \r\n\t\t\t $title['title'] = 'Claim-Upload Employee Details';\r\n \t\t $title['total_claim'] = $this->AdminProcess->countClaim('mm_manager');\r\n \t\t $title['total_payment'] = $this->AdminProcess->countRow('tm_payment');\r\n \t\t $title['total_reject'] = $this->Process->countRejClaim('tm_claim');\r\n \t\t $this->load->view('templetes/welcome_header',$title);\r\n \t\t $this->load->view('employee/uploadEmp');\r\n\t\t\t $this->load->view('templetes/welcome_footer');\r\n\t\t }\t\r\n\t }", "title": "" }, { "docid": "8b6a681c961b0ccf45d94c22eb9ff427", "score": "0.59563553", "text": "public function store(Request $request)\n {\n ini_set('memory_limit', -1);\n set_time_limit(-1);\n $destinationPath = storage_path().'/excels';\n $extension = $request->file('file')->getClientOriginalExtension();\n $filename = uniqid('file').'.'.$extension;\n $request->file('file')->move($destinationPath, $filename);\n try {\n $import = new Xls2Csv2Db;\n $import->originalName = $request->file('file')->getClientOriginalName();\n $import->filename = $filename;\n $import->load($destinationPath.'/'.$filename);\n return response()->json(\n [\n 'reportName' => explode('.', $import->originalName)[0],\n 'filename' => $import->table_name,\n 'variables' => array_values($import->variables),\n 'dimensions' => array_values($import->dimensions),\n 'associatedValues' => $import->associatedValues,\n ], 200\n );\n } catch (\\Exception $err) {\n return response()->json($err->getMessage(), 400);\n }\n }", "title": "" }, { "docid": "4778595a18c4752803a1d38bb0f382f7", "score": "0.59499073", "text": "public function import_process() {\n if (!$this->import) show_404();\n set_time_limit(0);\n\n $requiredFields = ManagerHolder::get($this->entityName)->getRequiredFields();\n\n $transactionStarted = FALSE;\n $ignoreErrors = (isset($_POST['ignore_errors']) && $_POST['ignore_errors'] == 1) ? TRUE : FALSE;\n\n $entityObject = new $this->entityName;\n $addCount = 0;\n $editCount = 0;\n try {\n $rowNum = 0;\n\n $zipRes = array();\n\n if (isset($_POST['zip']) && $_POST['zip'] == 1) {\n $zipRes = $this->import_zip_process();\n }\n\n $images = array();\n $uploadResult = FALSE;\n if (!empty($zipRes)) {\n $fileInfo = $zipRes['csv'];\n $images = $zipRes['images'];\n $uploadResult = TRUE;\n } else {\n $this->fileoperations->set_upload_lib_config_value(\"allowed_types\", 'csv');\n $uploadResult = $this->fileoperations->upload('import_file', TRUE, './web');\n $fileInfo = $this->fileoperations->file_info;\n }\n\n if ($uploadResult) {\n $importFilters = array();\n $postFields = array();\n foreach ($_POST as $k => $v) {\n if (strpos($k, 'importfilter_') !== FALSE) {\n $kk = str_replace('importfilter_', '', $k);\n if (strpos($kk, '_') !== FALSE) {\n $kkk = str_replace('_', '.', $kk);\n if (isset($this->filters[$kkk])) {\n $importFilters[$kkk] = array($v);\n } else {\n $importFilters[$kk] = $v;\n }\n } else {\n $importFilters[$kk] = $v;\n }\n } else {\n if ($v == 1) {\n if (strpos($k, '_') !== FALSE) {\n $kk = str_replace('_', '.', $k);\n if (isset($this->fields[$kk])) {\n $postFields[$kk] = $this->fields[$kk];\n } else if (isset($this->fields[$k])) {\n $postFields[$k] = $this->fields[$k];\n }\n } else {\n if (isset($this->fields[$k])) {\n $postFields[$k] = $this->fields[$k];\n }\n }\n }\n }\n }\n\n // Add required fields\n foreach ($requiredFields['all'] as $addField) {\n if (!isset($postFields[$addField])) {\n $postFields[$addField] = $this->fields[$addField];\n }\n }\n\n\n // foreignKeys\n $foreignKeys = ManagerHolder::get($this->managerName)->getForeignKeys();\n $foreignKeysAliases = array();\n foreach($foreignKeys as $alias => $fk) {\n $foreignKeysAliases[$fk['local']] = $alias;\n }\n $tmpImportFilters = array();\n // Add import filters fields\n foreach ($importFilters as $k => $v) {\n if(isset($foreignKeysAliases[$k])) {\n $k = $foreignKeysAliases[$k];\n }\n if (!isset($postFields[$k]) && isset($this->fields[$k])) {\n $postFields[$k] = $this->fields[$k];\n }\n $tmpImportFilters[$k] = $v;\n }\n $importFilters = $tmpImportFilters;\n\n // Form the translation for fields\n $ftrans = array();\n $field['name'] = 'id';\n $field['key'] = 'id';\n $field['val']['type'] = 'input_integer';\n $ftrans[] = $field;\n foreach ($this->fields as $f => $val) {\n $field['name'] = trim(html_entity_decode(lang('admin.add_edit.' . strtolower($this->entityName) . '.' . str_replace('.*', '', $f))));\n $field['key'] = trim(str_replace('.*', '', $f));\n $field['val'] = $val;\n $ftrans[] = $field;\n }\n\n // Load CSV Library\n $this->load->library('common/csv');\n\n // Read CSV File\n $this->csv->readFile($fileInfo['file_path'] . $fileInfo['file_name']);\n\n // Header\n $header = $this->csv->readRow();\n if (!$header || count($header) < 1) {\n set_flash_error('admin.import.error.wrong_file_format');\n $this->redirectToReffer();\n }\n if ($header[0] != 'id' && $_POST['import_type'] != 'add_only') {\n set_flash_error('admin.import.error.first_column_must_be_id');\n $this->redirectToReffer();\n }\n\n foreach($header as &$h) {\n $h = mb_strtoupper($h, 'UTF-8');\n }\n\n\n if($_POST['import_type'] != 'edit_only') {\n foreach ($ftrans as $f) {\n if (in_array($f['key'], $requiredFields['simple']) && !in_array($f['key'], array_keys($importFilters))) {\n if (!in_array(mb_strtoupper($f['name'], 'UTF-8'), $header)) {\n set_flash_error('admin.import.error.missing_required_fields', array('fname' => $f['name']));\n $this->redirectToReffer();\n }\n }\n }\n }\n\n // Set Indexes\n foreach ($ftrans as $k => &$fs) {\n $index = array_key_by_value(mb_strtoupper($fs['name'], 'UTF-8'), $header, TRUE);\n if ($index !== null) {\n $fs['index'] = $index;\n }\n }\n\n ManagerHolder::get($this->entityName)->startTransaction();\n $transactionStarted = TRUE;\n while (($row = $this->csv->readRow()) !== FALSE) {\n $row = $this->preProcessImportRow($row);\n $rowNum += 1;\n // Check for empty row\n $columns = count($row);\n $emptyColumns = 0;\n foreach ($row as $k => &$v) {\n $v = trim($v);\n if (empty($v)) {\n $emptyColumns++;\n }\n }\n if ($columns == $emptyColumns) {\n continue;\n }\n\n $entity = array();\n foreach ($ftrans as $field) {\n\n // Skip lines with no ID for EDIT ONLY\n if ($field['key'] == 'id' && $_POST['import_type'] == 'edit_only') {\n if (!isset($row[$field['index']]) || empty($row[$field['index']])) {\n continue 2;\n }\n }\n\n // Do not process import filters when they are referenced entities\n foreach ($importFilters as $fk => $fv) {\n if (strpos($fk, '.') !== FALSE && $field['key'] == strtok($fk, '.')) {\n continue 2;\n }\n }\n\n // Field found in import\n if (isset($field['index']) && isset($row[$field['index']])) {\n $rowProcessValue = $this->processImportRow($field, $row, $importFilters);\n\n if ($rowProcessValue !== null) {\n $row[$field['index']] = $rowProcessValue;\n } else {\n // Check for double\n if ($field['val']['type'] == 'input_double') {\n $row[$field['index']] = (double)str_replace(',', '.', $row[$field['index']]);\n }\n // Check for double/interger\n if ($row[$field['index']] === '' && ($field['val']['type'] == 'input_double' || $field['val']['type'] == 'input_integer')) {\n $row[$field['index']] = null;\n }\n // Check for Enum\n if ($field['val']['type'] == 'enum') {\n $enumValues = ManagerHolder::get($this->entityName)->getEnumValues($field['key']);\n foreach ($enumValues as $enval) {\n $lng = lang('enum.' . strtolower($this->entityName) . '.' . $field['key'] . '.' . $enval);\n if (trim($row[$field['index']]) == $lng) {\n $row[$field['index']] = $enval;\n break;\n }\n }\n }\n\n // Check for multiple select and select\n if (($field['val']['type'] == 'multipleselect' || $field['val']['type'] == 'multipleselect_chosen' || $field['val']['type'] == 'select' || $field['val']['type'] == 'select2') && !empty($row[$field['index']])) {\n\n if ($field['val']['type'] != 'enum') {\n $values = array();\n\n if (!isset($importFilters[$field['key']]) || empty($importFilters[$field['key']])) {\n\n $resultValues = array();\n $isOne = FALSE;\n if (get_class($entityObject[$field['key']]) != 'Doctrine_Collection') {\n $isOne = TRUE;\n foreach ($entityObject->getTable()->getRelations() as $relName => $relObject) {\n if ($field['key'] == $relObject->getLocal() || $field['key'] == $relObject->getAlias()) {\n $refEntityName = $relObject->getTable()->getOption('name');\n $values = array($row[$field['index']]);\n $nameField = ManagerHolder::get($refEntityName)->getNameField();\n break;\n }\n }\n } else {\n $refEntityName = $entityObject[$field['key']]->getTable()->getOption('name');\n $values = explode(',', $row[$field['index']]);\n $nameField = ManagerHolder::get($refEntityName)->getNameField();\n }\n\n foreach ($values as $val) {\n $val = trim($val);\n if (!empty($val)) {\n\n if (ManagerHolder::get($refEntityName) instanceof BaseTreeManager ) {\n $refEnt = ManagerHolder::get($refEntityName)->getOneWhere(array($nameField => $val), 'id, root_id, lft, rgt, level, ' . $nameField);\n } else {\n $refEnt = ManagerHolder::get($refEntityName)->getOneWhere(array($nameField => $val), 'id, ' . $nameField);\n }\n if ($refEnt) {\n if (!in_array($refEnt['id'], $resultValues)) {\n $resultValues[] = $refEnt['id'];\n }\n } else {\n if (ManagerHolder::get($refEntityName) instanceof BaseTreeManager) {\n $nodeId = ManagerHolder::get($refEntityName)->insert(array($nameField => $val));\n $resultValues[] = $nodeId;\n $nodeEnt = ManagerHolder::get($refEntityName)->getFullById($nodeId);\n ManagerHolder::get($refEntityName)->getTree()->createRoot($nodeEnt);\n $nodeEnt = $nodeEnt->toArray();\n if (array_key_exists('priority', $nodeEnt)) {\n $maxPr = ManagerHolder::get($refEntityName)->getMaxPriority();\n ManagerHolder::get($refEntityName)->updateById($nodeId, 'priority', $maxPr + 1);\n }\n } else {\n $resultValues[] = ManagerHolder::get($refEntityName)->insert(array($nameField => $val));\n }\n }\n }\n }\n if ($isOne) {\n $resultValues = array_pop($resultValues);\n }\n $row[$field['index']] = $resultValues;\n }\n }\n }\n // Check for images\n if (($field['val']['type'] == 'image')) {\n $imgName = $row[$field['index']];\n $image = array();\n foreach ($images as $img) {\n if ($img['file_name'] == $imgName) {\n $image = $img;\n break;\n }\n }\n $imageId = null;\n if (!empty($image)) {\n\n $imageInfo = @getimagesize($image['file_path'] . $image['file_name']);\n if(is_not_empty($imageInfo['mime'])) {\n $mime = $imageInfo['mime'];\n $isAllowedMime = $this->fileoperations->is_allowed_file_mime($mime);\n }\n\n if(!isset($mime) || $isAllowedMime) {\n $this->fileoperations->set_base_dir('./web/images');\n $folder = $this->session->userdata(self::FOLDER_SESSION_KEY);\n $newPath = $this->fileoperations->copy_file($image, $folder, TRUE);\n $this->fileoperations->get_file_info($newPath);\n $image = $this->fileoperations->file_info;\n $thumbs = $this->config->item(strtolower($this->entityName . '_' . $field['key']), 'thumbs');\n if(!$thumbs) {\n // for backward compatibility\n $thumbs = $this->config->item(strtolower($this->entityName), 'thumbs');\n }\n $thumbs['_admin'] = $this->config->item('_admin', 'all');\n $this->fileoperations->createImageThumbs(array($image), $thumbs);\n\n $imageId = ManagerHolder::get('Image')->insert($image);\n }\n }\n $row[$field['index']] = $imageId;\n }\n }\n\n $entity[$field['key']] = $row[$field['index']];\n }\n }\n\n // Import Filters\n foreach ($importFilters as $fk => $fv) {\n $entity[$fk] = $fv;\n }\n\n\n //image hack\n if(isset($entity['image'])) {\n $entity['image_id'] = $entity['image'];\n unset($entity['image']);\n }\n\n try {\n if (count(array_keys($entity)) > 1) {\n if ($_POST['import_type'] == 'add_only') {\n unset($entity['id']);\n }\n if (isset($entity['id']) || !empty($entity['id'])) {\n ManagerHolder::get($this->entityName)->update($entity);\n $this->addAdminLogRecord($entity, 'edit', NULL, 'import');\n $editCount++;\n } else {\n ManagerHolder::get($this->entityName)->insert($entity);\n $this->addAdminLogRecord($entity, 'add', NULL, 'import');\n $addCount++;\n }\n }\n } catch (Exception $e) {\n if (!$ignoreErrors) {\n throw $e;\n }\n }\n }\n\n ManagerHolder::get($this->entityName)->commitTransaction();\n }\n $this->fileoperations->delete_file($fileInfo['file_name'], $fileInfo['file_path']);\n } catch (Exception $e) {\n if ($transactionStarted) {\n ManagerHolder::get($this->entityName)->rollbackTransaction();\n }\n $errors = array();\n // if ($addCount > 0 || $editCount > 0) {\n // $errors[] = kprintf(lang('admin.import.message.imported'), array('added' => $addCount, 'edited' => $editCount));\n // }\n if ($e->getCode() == DOCTRINE_DUPLICATE_ENTRY_EXCEPTION_CODE) {\n $errors[] = 'admin.import.' . strtolower($this->entityName) . '.error.duplicate';\n }\n if ($rowNum > 0) {\n $errors[] = kprintf(lang('admin.import.error.on_line'), array('line' => $rowNum + 1));\n }\n $message = $e->getMessage();\n if ($message == 'Failed to refresh. Record does not exist.') {\n $message = kprintf(lang('admin.import.error.falied_to_refresh'), array('id' => $entity['id']));\n }\n $errors[] = $message;\n set_flash_error($errors);\n log_message('error', $e->getMessage());\n $this->redirectToReffer();\n }\n\n set_flash_notice('admin.import.message.imported', array('added' => $addCount, 'edited' => $editCount));\n $this->redirectToReffer();\n }", "title": "" }, { "docid": "e03d68d9d6f288ff56a4b4e83bd313d6", "score": "0.5948602", "text": "public function uploadGebruikersExcel()\n {\n $config['upload_path'] = './uploads/';\n $config['allowed_types'] = 'xlsx|xls';\n $this->load->library('upload', $config);\n\n if (!$this->upload->do_upload('excelFile'))\n {\n redirect('Opleidingsmanager/gebruikerBeheer/fout');\n }\n else\n {\n $upload_data = $this->upload->data();\n $fileName = $upload_data['file_name'];\n $newName = 'gebruikers.xls';\n if(substr($fileName, -4) == \"xlsx\") {\n $newName = \"gebruikers.xlsx\";\n }\n rename('./uploads/' . $fileName, './uploads/' . $newName);\n\n // Excel file koppelen\n $this->load->library('excel');\n $file = './uploads/' . $newName;\n $excelFile = PHPExcel_IOFactory::load($file);\n\n // Excel file nakijken\n $A1 = $excelFile->getActiveSheet()->getCell('A1')->getValue();\n $B1 = $excelFile->getActiveSheet()->getCell('B1')->getValue();\n if(strtolower($A1) == \"naam\" && strtolower($B1) == \"nummer\") {\n\n // Studenten verwijderen indien aangeduid\n $deleteUsers = $this->input->post('deleteUsersExcel');\n if($deleteUsers == true) {\n $this->persoon_model->deleteWhereType(1);\n }\n\n // Alleen ingevulde cellen selecteren\n $cell_collection = $excelFile->getActiveSheet()->getCellCollection();\n\n // Omzetten naar array\n foreach ($cell_collection as $cell) {\n $column = $excelFile->getActiveSheet()->getCell($cell)->getColumn();\n $row = $excelFile->getActiveSheet()->getCell($cell)->getRow();\n $cell_value = $excelFile->getActiveSheet()->getCell($cell)->getValue();\n\n if($row != 1) {\n $gebruikers[$row][$column] = $cell_value;\n }\n }\n\n // Array naar database\n $this->load->model('persoon_model');\n $toegevoegd = 0;\n $totaal = 0;\n foreach ($gebruikers as $object) {\n $gebruiker = new stdClass();\n $gebruiker->naam = $object[\"A\"];\n $gebruiker->nummer = $object[\"B\"];\n\n $gebruiker->id = 0;\n $gebruiker->typeId = $this->input->post('gebruikerTypeExcel');\n\n if($this->persoon_model->getWhereNummer($gebruiker->nummer) == null) {\n $this->persoon_model->insert($gebruiker);\n $toegevoegd++;\n }\n $totaal++;\n }\n\n // Redirect naar overzicht gebruikers\n redirect('Opleidingsmanager/gebruikerBeheer/' . $toegevoegd . ' van de ' . $totaal);\n } else {\n redirect('Opleidingsmanager/gebruikerBeheer/fout');\n }\n }\n }", "title": "" }, { "docid": "2309d5631b3d58387bb404caabe59d72", "score": "0.59463626", "text": "function loadToDB($inputData){\r\n // file handle pointing to uploaded file\r\n $fh = fopen($inputData['path'], \"r\");\r\n \r\n //\r\n while (($data = fgetcsv($fh)) !== FALSE) {\r\n $fData = array('data' => $data,\r\n 'timeStamp' => $inputData['timeStamp']);\r\n inputToTable($fData);\r\n }\r\n \r\n \r\n}", "title": "" }, { "docid": "7032e40ff2fc0154f7c4b7d4dae125c7", "score": "0.5928111", "text": "public function import(Request $request) \n {\n $import = Excel::import(new KpiImport, request()->file('excel'));\n \n if($import){\n return redirect()\n ->route('kpi.index')\n ->with('flash_notification', [\n 'level' => 'info',\n 'message' => 'Berhasil import KPI!'\n ]);\n }else{\n return redirect()\n ->route('kpi.index')\n ->with('flash_notification', [\n 'level' => 'warning',\n 'message' => 'Gagal import KPI!'\n ]);\n }\n }", "title": "" }, { "docid": "b5255ca4fbaf8ebb3ab52a10da6a8942", "score": "0.59243166", "text": "public function importLeads(Request $request){\n \n try{\n\n $user_id = 1; //Auth::user()->id;\n $user = User::find($user_id);\n\n //Validate the request data\n $validator = Validator::make($request->all(), [\n 'file' => 'required|mimes:xlsx',\n ]);\n\n if ($validator->fails()) { //some of request data are missing or invalid\n //return the validation errors\n return $this->validationErrorsResponse($validator->errors());\n }\n\n //get the leads file\n $path = $_FILES['file']['tmp_name'];\n //prep. the date\n $spreadsheet = \\PhpOffice\\PhpSpreadsheet\\IOFactory::load($path); \n $leads = $spreadsheet->getActiveSheet()->toArray(null,true,true,true);\n \n //Make sure the file contains first name, second name, porject name, and lead phone in the header of the file with the same order\n //1- If the file does not contains [A, B, C, D, or E] put empty string as a default value\n // ignore whitespace and convert to the letters strtolower\n $first_name = strtolower(preg_replace('/\\s*/',\"\", isset($leads[1]['A'])?$leads[1]['A']:''));\n $second_name = strtolower(preg_replace('/\\s*/',\"\", isset($leads[1]['B'])?$leads[1]['B']:''));\n $project_name = strtolower(preg_replace('/\\s*/',\"\", isset($leads[1]['C'])?$leads[1]['C']:''));\n $country_code = strtolower(preg_replace('/\\s*/',\"\", isset($leads[1]['D'])?$leads[1]['D']:''));\n $lead_phone = strtolower(preg_replace('/\\s*/',\"\", isset($leads[1]['E'])?$leads[1]['E']:''));\n \n //2- must be first name, second name, porject name, country .code, and lead phone in the header of the file with the same order\n if($first_name != 'firstname' || \n $second_name != 'secondname' || \n $project_name != 'porjectname' || \n $country_code != 'countrycode' ||\n $lead_phone != 'leadphone')\n {\n //build the response\n $code = 401; \n $status = 'error';\n $message = \"Wrong headersm it must be first name, second name, porject name, country .code, and lead phone in the header of the file with the same order\";\n $dataContent = '';\n\n return $this->returnApiResult($code, $status, $message, $dataContent);\n }\n\n //determine if the lead_type is data or lead\n if($user->hasPermission('team_leader')){\n $lead_type = 'data';\n }else{\n $lead_type = 'lead';\n }\n \n $firstHeaderRow = true;\n\n foreach($leads as $lead){\n \n //To ignore the header row \n if($firstHeaderRow == true){\n $firstHeaderRow = false;\n continue;\n }\n \n \n //Store the lead\n $newLead = new Lead;\n $newLead->first_name = $lead['A'];\n $newLead->second_name = $lead['B'];\n $newLead->project_name = $lead['C'];\n $newLead->country_code = $lead['D'];\n $newLead->lead_phone = $lead['E'];\n $newLead->lead_status = 'New';\n $newLead->lead_type = $lead_type;\n $newLead->assigned_to = $user_id;\n $newLead->reassigned_to = $user_id;\n $newLead->reassigned_by = $user_id;\n $newLead->created_by = $user_id;\n $newLead->save();\n \n }\n\n //build the response\n $code = 200; //successful Request:\n $status = 'success';\n $message = \"The data has been added successfully\";\n $dataContent = '';\n\n return $this->returnApiResult($code, $status, $message, $dataContent);\n\n }catch(Exception $e){\n \n //log what happend\n Log::channel('system_exceptions')->info('Exceptions:', [$e]);\n\n //Unknown error happened\n return $this->unknownErrorHappenedMsg();\n }\n \n }", "title": "" }, { "docid": "f58bb3c0cca05f32333c674bd5ee5977", "score": "0.5921358", "text": "public function importFile($request){\n\n if($request->hasFile('sample_file')){\n\n $path = $request->file('sample_file')->getRealPath();\n\n $data = \\Excel::load($path)->get();\n\n if($data->count()){\n \n foreach ($data as $key => $value) {\n\n $arr[] = ['phone' => $value->so_dien_thoai];\n }\n\n if(!empty($arr)){\n return $arr;\n }\n\n }\n\n }\n }", "title": "" }, { "docid": "51e5cda92681ec47fe58c44915c5ba53", "score": "0.5911035", "text": "public function import()\n {\n $tables = func_get_args();\n\n if (empty($tables))\n throw new \\Exception(\"No table was specified for import\");\n\n foreach ($tables as $table_name)\n {\n // Find class name and metadata etc\n $class_name = \\Admin::getClassForTable($table_name);\n if ($class_name === false) {\n $this->writeAndLog(\"Import error: Class could not be found for table '$table_name'\", \"error\");\n continue;\n }\n\n // Import the data\n \\Cli::write(\"Importing $table_name...\");\n try {\n $import_result = \\CMF\\Utils\\Importer::importUrl($class_name, \\Input::post('import_url'));\n\n if (@$import_result['success']) {\n $this->writeAndLog(\"Successfully imported $table_name\", \"info\", \"green\");\n } else {\n $this->writeAndLog(\"Error importing $table_name: \".@$import_result['message'] ?: \"Unknown error importing $table_name\", \"error\");\n }\n\n } catch (\\Exception $e) {\n $this->writeAndLog(\"Error importing $table_name: \".$e->getMessage(), \"error\");\n }\n\n }\n }", "title": "" }, { "docid": "874503263dcc0acf3ce2576f0276c671", "score": "0.59025073", "text": "function importExcel($col1, $col2, $col3, $col4, $col5, $col6, $col7, $col8, $col9, $col10, $col11, $col12, $col13, $col14, $col15, $col16, $col17){\n\t\t\t$pdo = new Connection();\n\n\t\t\t$query = $pdo->prepare(\"\n\t\t\t\tInsert Into webcafe_modtelefonia_usuarios\n\t\t\t\t\t(`idUsuario`, `nome`, `telefone`, `celular`, `cep`, `endereco`, `bairro`, `cidade`, `uf`, `rg`, `profissao`, `cpf`, `observacoes`, `dataCadastro`, `userAdd`, `dataAlteracao`, `userLastChange` ) \n\t\t\t\tValues \n\t\t\t\t\t('\".$col1.\"','\".$col2.\"','\".$col3.\"','\".$col4.\"','\".$col5.\"','\".$col6.\"','\".$col7.\"','\".$col8.\"','\".$col9.\"','\".$col10.\"','\".$col11.\"','\".$col12.\"','\".$col13.\"', '\".$col14.\"', '\".$col15.\"', '\".$col16.\"', '\".$col17.\"')\");\n\t\t\t$query->execute();\n\t\t}", "title": "" }, { "docid": "24e92e9e018cd076922007f7dcddac45", "score": "0.59001786", "text": "function do_projects_import()\r\n\t{\r\n\t\tif(isset($_FILES['import_csv']))\r\n\t\t{\r\n\t\t\tif(is_uploaded_file($_FILES['import_csv']['tmp_name']))\r\n\t\t\t{\r\n\t\t\t\t//import products from excel \r\n\t\t\t\t$response = $this->projects_model->import_csv_projects($this->csv_path);\r\n\t\t\t\t\r\n\t\t\t\tif($response == FALSE)\r\n\t\t\t\t{\r\n\t\t\t\t\t$v_data['import_response_error'] = 'Something went wrong. Please try again.';\r\n\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\tif($response['check'])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$v_data['import_response'] = $response['response'];\r\n\t\t\t\t\t}\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$v_data['import_response_error'] = $response['response'];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$v_data['import_response_error'] = 'Please select a file to import.';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\telse\r\n\t\t{\r\n\t\t\t$v_data['import_response_error'] = 'Please select a file to import.';\r\n\t\t}\r\n\t\t\r\n\t\t$v_data['title'] = $data['title'] = $this->site_model->display_page_title();\r\n\t\t\r\n\t\tredirect ('gbm-administration/projects');\r\n\t\t//$data['content'] = $this->load->view('projects/all_projects', $v_data, true);\r\n\t\t//$this->load->view('admin/templates/general_page', $data);\r\n\t}", "title": "" }, { "docid": "36a08b4b37c2a29e935ca9f781fee0cd", "score": "0.58928424", "text": "public function store(Request $request)\n {\n $this->validate($request, [\n 'attendance_date' => 'required',\n 'attendance_file' => 'required|mimes:xlsx'\n ]);\n\n Excel::import(new AttendanceImport($request), request()->file('attendance_file'));\n\n toastr()->success('Employee Import successfully');\n return back();\n }", "title": "" }, { "docid": "9222c02e6d7e388238e5a78e3ba2153a", "score": "0.58922154", "text": "function tabla(){\n\tif($_FILES['file']['name'] != '')\n\t{\n\t\t\n\t\trequire_once 'reader/Classes/PHPExcel/IOFactory.php';\n\n\t\t//Funciones extras\n\t\t\n\t\tfunction get_cell($cell, $objPHPExcel){\n\t\t\t//select one cell\n\t\t\t$objCell = ($objPHPExcel->getActiveSheet()->getCell($cell));\n\t\t\t//get cell value\n\t\t\treturn $objCell->getvalue();\n\t\t}\n\t\t\n\t\tfunction pp(&$var){\n\t\t\t$var = chr(ord($var)+1);\n\t\t\treturn true;\n\t\t}\n\n\t\t$name\t = $_FILES['file']['name'];\n\t\t$tname \t = $_FILES['file']['tmp_name'];\n\t\t$type \t = $_FILES['file']['type'];\n\t\t\t\n\t\tif($type == 'application/vnd.ms-excel')\n\t\t{\n\t\t\t// Extension excel 97\n\t\t\t$ext = 'xls';\n\t\t}\n\t\telse if($type == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet')\n\t\t{\n\t\t\t// Extension excel 2007 y 2010\n\t\t\t$ext = 'xlsx';\n\t\t}else{\n\t\t\t// Extension no valida\n\t\t\techo -1;\n\t\t\texit();\n\t\t}\n\n\t\t$xlsx = 'Excel2007';\n\t\t$xls = 'Excel5';\n\n\t\t//creando el lector\n\t\t$objReader = PHPExcel_IOFactory::createReader($$ext);\n\t\t\n\t\t//cargamos el archivo\n\t\t$objPHPExcel = $objReader->load($tname);\n\n\t\t$dim = $objPHPExcel->getActiveSheet()->calculateWorksheetDimension();\n\n\t\t// list coloca en array $start y $end\n\t\tlist($start, $end) = explode(':', $dim);\n\t\t\t\n\t\tif(!preg_match('#([A-Z]+)([0-9]+)#', $start, $rslt)){\n\t\t\treturn false;\n\t\t}\n\t\tlist($start, $start_h, $start_v) = $rslt;\n\t\tif(!preg_match('#([A-Z]+)([0-9]+)#', $end, $rslt)){\n\t\t\treturn false;\n\t\t}\n\t\tlist($end, $end_h, $end_v) = $rslt;\n\n\t\t//empieza lectura vertical\n\t\t$table = \"<table border='1'>\";\n\t\t$numh=0; //para etiquetas ubicadas horizontalmente;\n\t\t$numv=0; //para etiquetas ubicadas verticalmente;\n\t\t$etiquetas1;\n\t\t$etiquetas2;\n\t\t$valores;\n\t\tfor($v=$start_v; $v<=$end_v; $v++){\n\t\t\t//empieza lectura horizontal\n\t\t\t$table .= \"<tr>\";\n\t\t\tfor($h=$start_h; ord($h)<=ord($end_h); pp($h)){\n\t\t\t\t$cellValue = get_cell($h.$v, $objPHPExcel);\n\t\t\t\t//echo $cellValue.\"-\";\n\t\t\t\t\n\t\t\t\tif($numh<1){\n\t\t\t\t\n\t\t\t\t$etiquetas1[]=$cellValue;\n\t\t\t\t};\n\t\t\t\tif($numv<1){\n\t\t\t\t$etiquetas2[]=$cellValue;\n\t\t\t\t}else{\n\t\t\t\t\t$valores[$numh][$numv]= $cellValue;\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\t$numv=$numv+1;\n\t\t\t\t\n\t\t\t\t$table .= \"<td>\";\n\t\t\t\tif($cellValue !== null){\n\t\t\t\t\t$table .= $cellValue;\n\t\t\t\t}\n\t\t\t\t$table .= \"</td>\";\n\t\t\t}\n\t\t\t$numh=$numh+1;\n\t\t\t$numv=0;\n\t\t\t\n\t\t\t$table .= \"</tr>\";\n\t\t}\n\t\t\n\t\t\n\t\t\tfor($i=1; $i<$numh ;$i++){\n\t\t\t\t$fbd1 = FachadaBD::getInstance();\n\t\t\t\t$fbd1 -> agregarCaracMarchaEtiquetasBD($etiquetas2[$i]);\n\t\t\t\tfor($j=1;$j<=$i;$j++){\n\t\t\t\t\n\t\t\t\t\t//echo \"++\".$etiquetas2[$i].\"-\".$etiquetas1[$j].\"-\".$valores[$i][$j].\"<br>\";\n\t\t\t\t\t$fbd = FachadaBD::getInstance();\n\t\t\t\t\t$caract = NEW etiqueta_t();\n\t\t\t\t\t$caract->setDom('Carac_Marcha');\n\t\t\t\t\t$caract->setEt1($etiquetas2[$i]);\n\t\t\t\t\t$caract->setEt2($etiquetas1[$j]);\n\t\t\t\t\t$caract->setGrado($valores[$i][$j]);\n\t\t\t\t\t$fbd -> agregarCaracMarchaBD($caract);\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};\n\t\t\n\t\t$table .= \"</table>\";\n\t\t\t\n\t\techo $table;\t\t\n\t}\n}", "title": "" }, { "docid": "f0f29b3b358b0cce03132907c2013b24", "score": "0.5891949", "text": "public function uploadLessenExcel() {\n $this->load->model('les_model');\n $this->load->model('persoonLes_model');\n $this->load->model('klas_model');\n\n $config['upload_path'] = './uploads/';\n $config['allowed_types'] = 'xlsx|xls';\n $this->load->library('upload', $config);\n\n if (!$this->upload->do_upload('excelFile'))\n {\n redirect('Opleidingsmanager/lesBeheer/fout');\n }\n else\n {\n // Alle persoonLessen verwijderen indien aangeduid\n $deletePersoonLessen = $this->input->post('deletePersoonLessenExcel');\n if($deletePersoonLessen == true) {\n $this->persoonLes_model->deleteAll();\n }\n\n // Alle lessen verwijderen indien aangeduid\n $deleteLessen = $this->input->post('deleteLessenExcel');\n if($deleteLessen == true) {\n $this->les_model->deleteAll();\n }\n\n $upload_data = $this->upload->data();\n $fileName = $upload_data['file_name'];\n $newName = 'lessen.xls';\n if(substr($fileName, -4) == \"xlsx\") {\n $newName = \"lessen.xlsx\";\n }\n rename('./uploads/' . $fileName, './uploads/' . $newName);\n\n // Excel file koppelen\n $this->load->library('excel');\n $file = './uploads/' . $newName;\n $excelFile = PHPExcel_IOFactory::load($file);\n\n // Semester 1 inlezen\n $semester = $excelFile->getSheet(0)->getCell('A2')->getValue();\n $semester = str_replace(' ', '', $semester);\n if(strtolower($semester) == \"semester1\") {\n // Teller init\n $toegevoegd = 0;\n $totaal = 0;\n\n // Bestand inlezen\n $row = 3;\n $lastColumn = $excelFile->getSheet(0)->getHighestColumn();\n $lastColumn++;\n for ($column = 'A'; $column != $lastColumn; $column++) {\n $cell_value = $excelFile->getSheet(0)->getCell($column.$row)->getValue();\n if($cell_value != null) {\n $klasnaam = preg_replace(\"/[^A-Za-z0-9 ]/\", '', $cell_value);\n $klasnaam = str_replace(' ', '', $klasnaam);\n\n $lessen = new stdClass();\n $klas = $this->klas_model->getWhereNaam($klasnaam);\n $lessen->klas = $klas;\n\n // Maandag\n for($i = 4; $i <= 8; $i++) {\n $blok = 'MA' . $excelFile->getSheet(0)->getCell('B' . $i)->getValue();\n $lessen->$blok = $excelFile->getSheet(0)->getCell($column.$i)->getValue();\n\n if ($excelFile->getSheet(0)->getCell($column.$i)->isInMergeRange()) {\n // Deel van een merged cell\n $mergeRange = $excelFile->getSheet(0)->getCell($column.$i)->getMergeRange();\n $masterCell = substr($mergeRange, 0, strpos($mergeRange, ':'));\n $lessen->$blok = $excelFile->getSheet(0)->getCell($masterCell)->getValue();;\n }\n\n $pos = strpos($lessen->$blok, ' of ');\n if ($pos != false) {\n $origineel = $lessen->$blok;\n $lessen->$blok = substr($origineel, 0, $pos);\n $blokDubbel = $this->renameForDB(substr($origineel, $pos + 4, strlen($origineel)));\n if($this->addInDB($blokDubbel, 'maandag', 1, $blok, $lessen->klas)) {\n $toegevoegd++;\n }\n $totaal++;\n }\n\n if($lessen->$blok != null) {\n if($this->addInDB($this->renameForDB($lessen->$blok), 'maandag', 1, $blok, $lessen->klas)) {\n $toegevoegd++;\n }\n $totaal++;\n }\n }\n // Dinsdag\n for($i = 10; $i <= 14; $i++) {\n $blok = 'DI' . $excelFile->getSheet(0)->getCell('B' . $i)->getValue();\n $lessen->$blok = $excelFile->getSheet(0)->getCell($column.$i)->getValue();\n\n if ($excelFile->getSheet(0)->getCell($column.$i)->isInMergeRange()) {\n // Deel van een merged cell\n $mergeRange = $excelFile->getSheet(0)->getCell($column.$i)->getMergeRange();\n $masterCell = substr($mergeRange, 0, strpos($mergeRange, ':'));\n $lessen->$blok = $excelFile->getSheet(0)->getCell($masterCell)->getValue();;\n }\n\n $pos = strpos($lessen->$blok, ' of ');\n if ($pos != false) {\n $origineel = $lessen->$blok;\n $lessen->$blok = substr($origineel, 0, $pos);\n $blokDubbel = $this->renameForDB(substr($origineel, $pos + 4, strlen($origineel)));\n if($this->addInDB($blokDubbel, 'dinsdag', 1, $blok, $lessen->klas)) {\n $toegevoegd++;\n }\n $totaal++;\n }\n\n if($lessen->$blok != null) {\n if($this->addInDB($this->renameForDB($lessen->$blok), 'dinsdag', 1, $blok, $lessen->klas)) {\n $toegevoegd++;\n }\n $totaal++;\n }\n }\n // Woensdag\n for($i = 16; $i <= 20; $i++) {\n $blok = 'WO' . $excelFile->getSheet(0)->getCell('B' . $i)->getValue();\n $lessen->$blok = $excelFile->getSheet(0)->getCell($column.$i)->getValue();\n\n if ($excelFile->getSheet(0)->getCell($column.$i)->isInMergeRange()) {\n // Deel van een merged cell\n $mergeRange = $excelFile->getSheet(0)->getCell($column.$i)->getMergeRange();\n $masterCell = substr($mergeRange, 0, strpos($mergeRange, ':'));\n $lessen->$blok = $excelFile->getSheet(0)->getCell($masterCell)->getValue();;\n }\n\n $pos = strpos($lessen->$blok, ' of ');\n if ($pos != false) {\n $origineel = $lessen->$blok;\n $lessen->$blok = substr($origineel, 0, $pos);\n $blokDubbel = $this->renameForDB(substr($origineel, $pos + 4, strlen($origineel)));\n if($this->addInDB($blokDubbel, 'woensdag', 1, $blok, $lessen->klas)) {\n $toegevoegd++;\n }\n $totaal++;\n }\n\n if($lessen->$blok != null) {\n if($this->addInDB($this->renameForDB($lessen->$blok), 'woensdag', 1, $blok, $lessen->klas)) {\n $toegevoegd++;\n }\n $totaal++;\n }\n }\n // Donderdag\n for($i = 22; $i <= 26; $i++) {\n $blok = 'DO' . $excelFile->getSheet(0)->getCell('B' . $i)->getValue();\n $lessen->$blok = $excelFile->getSheet(0)->getCell($column.$i)->getValue();\n\n if ($excelFile->getSheet(0)->getCell($column.$i)->isInMergeRange()) {\n // Deel van een merged cell\n $mergeRange = $excelFile->getSheet(0)->getCell($column.$i)->getMergeRange();\n $masterCell = substr($mergeRange, 0, strpos($mergeRange, ':'));\n $lessen->$blok = $excelFile->getSheet(0)->getCell($masterCell)->getValue();;\n }\n\n $pos = strpos($lessen->$blok, ' of ');\n if ($pos != false) {\n $origineel = $lessen->$blok;\n $lessen->$blok = substr($origineel, 0, $pos);\n $blokDubbel = $this->renameForDB(substr($origineel, $pos + 4, strlen($origineel)));\n if($this->addInDB($blokDubbel, 'donderdag', 1, $blok, $lessen->klas)) {\n $toegevoegd++;\n }\n $totaal++;\n }\n\n if($lessen->$blok != null) {\n if($this->addInDB($this->renameForDB($lessen->$blok), 'donderdag', 1, $blok, $lessen->klas)) {\n $toegevoegd++;\n }\n $totaal++;\n }\n }\n // Vrijdag\n for($i = 28; $i <= 32; $i++) {\n $blok = 'VR' . $excelFile->getSheet(0)->getCell('B' . $i)->getValue();\n $lessen->$blok = $excelFile->getSheet(0)->getCell($column.$i)->getValue();\n\n if ($excelFile->getSheet(0)->getCell($column.$i)->isInMergeRange()) {\n // Deel van een merged cell\n $mergeRange = $excelFile->getSheet(0)->getCell($column.$i)->getMergeRange();\n $masterCell = substr($mergeRange, 0, strpos($mergeRange, ':'));\n $lessen->$blok = $excelFile->getSheet(0)->getCell($masterCell)->getValue();;\n }\n\n $pos = strpos($lessen->$blok, ' of ');\n if ($pos != false) {\n $origineel = $lessen->$blok;\n $lessen->$blok = substr($origineel, 0, $pos);\n $blokDubbel = $this->renameForDB(substr($origineel, $pos + 4, strlen($origineel)));\n if($this->addInDB($blokDubbel, 'vrijdag', 1, $blok, $lessen->klas)) {\n $toegevoegd++;\n }\n $totaal++;\n }\n\n if($lessen->$blok != null) {\n if($this->addInDB($this->renameForDB($lessen->$blok), 'vrijdag', 1, $blok, $lessen->klas)) {\n $toegevoegd++;\n }\n $totaal++;\n }\n }\n }\n }\n\n // Semester 2 inlezen\n $semester = $excelFile->getSheet(1)->getCell('A1')->getValue();\n $semester = str_replace(' ', '', $semester);\n if(strtolower($semester) == \"semester2\") {\n // Bestand inlezen\n $row = 2;\n $lastColumn = $excelFile->getSheet(1)->getHighestColumn();\n $lastColumn++;\n for ($column = 'A'; $column != $lastColumn; $column++) {\n $cell_value = $excelFile->getSheet(1)->getCell($column.$row)->getValue();\n if($cell_value != null) {\n $klasnaam = preg_replace(\"/[^A-Za-z0-9 ]/\", '', $cell_value);\n $klasnaam = str_replace(' ', '', $klasnaam);\n\n $lessen = new stdClass();\n $klas = $this->klas_model->getWhereNaam($klasnaam);\n $lessen->klas = $klas;\n\n // Maandag\n for($i = 3; $i <= 7; $i++) {\n $blok = 'MA' . $excelFile->getSheet(1)->getCell('B' . $i)->getValue();\n $lessen->$blok = $excelFile->getSheet(1)->getCell($column.$i)->getValue();\n\n if ($excelFile->getSheet(1)->getCell($column.$i)->isInMergeRange()) {\n // Deel van een merged cell\n $mergeRange = $excelFile->getSheet(1)->getCell($column.$i)->getMergeRange();\n $masterCell = substr($mergeRange, 0, strpos($mergeRange, ':'));\n $lessen->$blok = $excelFile->getSheet(1)->getCell($masterCell)->getValue();;\n }\n\n $pos = strpos($lessen->$blok, ' of ');\n if ($pos != false) {\n $origineel = $lessen->$blok;\n $lessen->$blok = substr($origineel, 0, $pos);\n $blokDubbel = $this->renameForDB(substr($origineel, $pos + 4, strlen($origineel)));\n if($this->addInDB($blokDubbel, 'maandag', 1, $blok, $lessen->klas)) {\n $toegevoegd++;\n }\n $totaal++;\n }\n\n if($lessen->$blok != null) {\n if($this->addInDB($this->renameForDB($lessen->$blok), 'maandag', 1, $blok, $lessen->klas)) {\n $toegevoegd++;\n }\n $totaal++;\n }\n }\n // Dinsdag\n for($i = 9; $i <= 13; $i++) {\n $blok = 'DI' . $excelFile->getSheet(1)->getCell('B' . $i)->getValue();\n $lessen->$blok = $excelFile->getSheet(1)->getCell($column.$i)->getValue();\n\n if ($excelFile->getSheet(1)->getCell($column.$i)->isInMergeRange()) {\n // Deel van een merged cell\n $mergeRange = $excelFile->getSheet(1)->getCell($column.$i)->getMergeRange();\n $masterCell = substr($mergeRange, 0, strpos($mergeRange, ':'));\n $lessen->$blok = $excelFile->getSheet(1)->getCell($masterCell)->getValue();;\n }\n\n $pos = strpos($lessen->$blok, ' of ');\n if ($pos != false) {\n $origineel = $lessen->$blok;\n $lessen->$blok = substr($origineel, 0, $pos);\n $blokDubbel = $this->renameForDB(substr($origineel, $pos + 4, strlen($origineel)));\n if($this->addInDB($blokDubbel, 'dinsdag', 1, $blok, $lessen->klas)) {\n $toegevoegd++;\n }\n $totaal++;\n }\n\n if($lessen->$blok != null) {\n if($this->addInDB($this->renameForDB($lessen->$blok), 'dinsdag', 1, $blok, $lessen->klas)) {\n $toegevoegd++;\n }\n $totaal++;\n }\n }\n // Woensdag\n for($i = 15; $i <= 19; $i++) {\n $blok = 'WO' . $excelFile->getSheet(1)->getCell('B' . $i)->getValue();\n $lessen->$blok = $excelFile->getSheet(1)->getCell($column.$i)->getValue();\n\n if ($excelFile->getSheet(1)->getCell($column.$i)->isInMergeRange()) {\n // Deel van een merged cell\n $mergeRange = $excelFile->getSheet(1)->getCell($column.$i)->getMergeRange();\n $masterCell = substr($mergeRange, 0, strpos($mergeRange, ':'));\n $lessen->$blok = $excelFile->getSheet(1)->getCell($masterCell)->getValue();;\n }\n\n $pos = strpos($lessen->$blok, ' of ');\n if ($pos != false) {\n $origineel = $lessen->$blok;\n $lessen->$blok = substr($origineel, 0, $pos);\n $blokDubbel = $this->renameForDB(substr($origineel, $pos + 4, strlen($origineel)));\n if($this->addInDB($blokDubbel, 'woensdag', 1, $blok, $lessen->klas)) {\n $toegevoegd++;\n }\n $totaal++;\n }\n\n if($lessen->$blok != null) {\n if($this->addInDB($this->renameForDB($lessen->$blok), 'woensdag', 1, $blok, $lessen->klas)) {\n $toegevoegd++;\n }\n $totaal++;\n }\n }\n // Donderdag\n for($i = 21; $i <= 25; $i++) {\n $blok = 'DO' . $excelFile->getSheet(1)->getCell('B' . $i)->getValue();\n $lessen->$blok = $excelFile->getSheet(1)->getCell($column.$i)->getValue();\n\n if ($excelFile->getSheet(1)->getCell($column.$i)->isInMergeRange()) {\n // Deel van een merged cell\n $mergeRange = $excelFile->getSheet(1)->getCell($column.$i)->getMergeRange();\n $masterCell = substr($mergeRange, 0, strpos($mergeRange, ':'));\n $lessen->$blok = $excelFile->getSheet(1)->getCell($masterCell)->getValue();;\n }\n\n $pos = strpos($lessen->$blok, ' of ');\n if ($pos != false) {\n $origineel = $lessen->$blok;\n $lessen->$blok = substr($origineel, 0, $pos);\n $blokDubbel = $this->renameForDB(substr($origineel, $pos + 4, strlen($origineel)));\n if($this->addInDB($blokDubbel, 'donderdag', 1, $blok, $lessen->klas)) {\n $toegevoegd++;\n }\n $totaal++;\n }\n\n if($lessen->$blok != null) {\n if($this->addInDB($this->renameForDB($lessen->$blok), 'donderdag', 1, $blok, $lessen->klas)) {\n $toegevoegd++;\n }\n $totaal++;\n }\n }\n // Vrijdag\n for($i = 27; $i <= 31; $i++) {\n $blok = 'VR' . $excelFile->getSheet(1)->getCell('B' . $i)->getValue();\n $lessen->$blok = $excelFile->getSheet(1)->getCell($column.$i)->getValue();\n\n if ($excelFile->getSheet(1)->getCell($column.$i)->isInMergeRange()) {\n // Deel van een merged cell\n $mergeRange = $excelFile->getSheet(1)->getCell($column.$i)->getMergeRange();\n $masterCell = substr($mergeRange, 0, strpos($mergeRange, ':'));\n $lessen->$blok = $excelFile->getSheet(1)->getCell($masterCell)->getValue();;\n }\n\n $pos = strpos($lessen->$blok, ' of ');\n if ($pos != false) {\n $origineel = $lessen->$blok;\n $lessen->$blok = substr($origineel, 0, $pos);\n $blokDubbel = $this->renameForDB(substr($origineel, $pos + 4, strlen($origineel)));\n if($this->addInDB($blokDubbel, 'vrijdag', 1, $blok, $lessen->klas)) {\n $toegevoegd++;\n }\n $totaal++;\n }\n\n if($lessen->$blok != null) {\n if($this->addInDB($this->renameForDB($lessen->$blok), 'vrijdag', 1, $blok, $lessen->klas)) {\n $toegevoegd++;\n }\n $totaal++;\n }\n }\n }\n }\n\n // Redirect naar overzicht gebruikers\n redirect('Opleidingsmanager/lesBeheer/' . $toegevoegd . ' van de ' . $totaal);\n } else {\n redirect('Opleidingsmanager/lesBeheer/fout');\n }\n } else {\n redirect('Opleidingsmanager/lesBeheer/fout');\n }\n }\n }", "title": "" }, { "docid": "efd57861d637d4cf9d802763d38dc008", "score": "0.58629817", "text": "public function import()\n {\n if ($this->import === null) {\n return;\n }\n \n $defaults = ['datasource'=>'default','model'=>null,'table'=>null,'records'=>false];\n\n $options = array_merge($defaults, $this->import);\n \n // Load information from model is specified\n if ($options['model']) {\n $className = Resolver::className($options['model'], 'Model');\n if ($className) {\n $model = new $className();\n $options['datasource'] = $model->datasource;\n $options['table'] = $model->table;\n } else {\n $options['table'] = Inflector::tableize($options['model']); // for dynamic models fall back\n }\n }\n // Table is not specified or could not find model\n if (empty($options['table'])) {\n throw new Exception('Undefined table');\n }\n\n $connection = ConnectionManager::get($options['datasource']);\n $schema = $connection->schema($options['table']);\n \n /**\n * Imports records\n */\n if ($options['records']) {\n $connection->execute('SELECT * from ' . $options['table']);\n $this->records = $connection->fetchAll();\n }\n \n $connection = ConnectionManager::get($this->datasource);\n $sql = $connection->adapter()->createTable($this->table, $schema);\n return $connection->execute($sql);\n }", "title": "" }, { "docid": "689752e6735b51d4f65547e971eeecc8", "score": "0.5858644", "text": "public function store(Request $request)\n {\n if($request->file('template')) {\n $file = $request->file('template');\n $file_name = time() . $file->getFileName() . '.' . $file->getClientOriginalExtension();\n $extension = $request->file('template')->getClientOriginalExtension();\n $request->flash();\n if ($extension == \"xls\") {\n $time = time();\n $name = File::name(str_replace(' ', '_',$request->file('template')->getClientOriginalName())) . '_' . $time . '.' . $extension;\n $folder_name = \"society_conveyance_documents\";\n $path = '/' . $folder_name . '/' . $name;\n\n $count = 0;\n $sc_excel_headers = [];\n Excel::load($request->file('template')->getRealPath(), function ($reader)use(&$count, &$sc_excel_headers) {\n if(count($reader->toArray()) > 0){\n $excel_headers = $reader->first()->keys()->toArray();\n $sc_excel_headers = config('commanConfig.sc_excel_headers');\n\n foreach($excel_headers as $excel_headers_key => $excel_headers_val){\n if(isset($sc_excel_headers[$excel_headers_key])){\n $excel_headers_value = strtolower(str_replace(str_split('\\\\/- '), '_', $sc_excel_headers[$excel_headers_key]));\n if($excel_headers_value == $excel_headers_val){\n $count++;\n }else{\n $exploded = explode('_', $excel_headers_value);\n foreach($exploded as $exploded_key => $exploded_value){\n if(!empty(strpos($excel_headers_val, $exploded_value))){\n $count++;\n }\n }\n }\n }\n }\n }\n });\n\n if($count != 0){\n if($count == count($sc_excel_headers)){\n $fileUpload = $this->CommonController->ftpFileUpload($folder_name, $request->file('template'), $name);\n $input = $request->all();\n $input['first_flat_issue_date'] = date('Y-m-d', strtotime($request->first_flat_issue_date));\n $input['society_registration_date'] = date('Y-m-d', strtotime($request->society_registration_date));\n $input['template_file'] = $path;\n unset($input['layout_id'], $input['template'], $input['_token'], $input['sc_application_master_id']);\n\n $sc = new SocietyConveyance;\n $sc_application_form = $sc->getFillable();\n\n $sc_form_last_id = '';\n $sc_appn = new scApplication;\n $sc_application = array_slice($sc_appn->getFillable(), 0, 5);\n\n $input_sc_application = array(\n \"sc_application_master_id\" => $request->sc_application_master_id,\n \"application_no\" => str_pad($sc_form_last_id, 5, '0', STR_PAD_LEFT),\n \"society_id\" => $request->society_id,\n \"form_request_id\" => $sc_form_last_id,\n \"layout_id\" => $request->layout_id\n );\n $sc_application_last_id = '';\n $role_id = Role::where('name', config('commanConfig.dycdo_engineer'))->first();\n $user_ids = RoleUser::where('role_id', $role_id->id)->get();\n $layout_user_ids = LayoutUser::where('layout_id', $request->input('layout_id'))->whereIn('user_id', $user_ids)->get();\n\n foreach ($layout_user_ids as $key => $value) {\n $select_user_ids[] = $value['user_id'];\n }\n $users = User::whereIn('id', $select_user_ids)->get();\n\n if(count($sc_application_form) > count($input) && count($sc_application) == count($input_sc_application) && count($users) > 0){\n $insert_arr = array(\n 'users' => $users\n );\n $input_id = SocietyConveyance::create($input);\n $input_sc_application['application_no'] = config('commanConfig.mhada_code').str_pad($input_id->id, 5, '0', STR_PAD_LEFT);\n $input_sc_application['form_request_id'] = $input_id->id;\n $sc_application = scApplication::create($input_sc_application);\n\n $inserted_application_log = $this->CommonController->sc_application_status_society($insert_arr, config('commanConfig.conveyance_status.pending'), $sc_application);\n\n $sc_document_status = new SocietyConveyanceDocumentStatus;\n $sc_document_status_arr = array_flip($sc_document_status->getFillable());\n $sc_document_status_arr['application_id'] = $sc_application->id;\n $sc_document_status_arr['society_flag'] = 1;\n $sc_document_status_arr['document_id'] = 1;\n $sc_document_status_arr['document_path'] = $path;\n\n SocietyConveyanceDocumentStatus::create($sc_document_status_arr);\n\n if($inserted_application_log == true){\n return redirect()->route('society_conveyance.show', encrypt($sc_application->id));\n }\n }\n }else{\n return redirect()->route('society_conveyance.create')->with('error', \"Excel file headers doesn't match\")->withInput();\n }\n }else{\n return redirect()->route('society_conveyance.create')->with('error', \"Excel file is empty.\")->withInput();\n }\n }\n }else{\n return redirect()->route('society_conveyance.create')->with('error', \"Excel file headers doesn't match\")->withInput();\n }\n }", "title": "" }, { "docid": "613b1c6809dfcbd11c180148f5624d63", "score": "0.5856764", "text": "public function import() \n {\n if (!isset($this->data['Student']['Datei']['tmp_name'])) \n throw new NotFoundException(__('No filename for import!')); ;\n \n $fileName = $this->data['Student']['Datei']['tmp_name'];\n \n $this->Student->importCSV($fileName);\n //zeigt nichts - warum?\n \n if (count($this->Student->getImportErrors())==0)\n $this->Session->setFlash(__('Import done'));\n else \n $this->Session->setFlash(__('Import error'));\n \n \n $this->Student->recursive = 0;\n $this->set('students', $this->Paginator->paginate());\n $this->redirect(array('action'=>'index'));\n }", "title": "" }, { "docid": "d3893c73568d62412409892854d7a5e0", "score": "0.5845035", "text": "public function import(Request $request)\n {\n\n $file = $request->importFile;\n $extension = $request->importFile->getClientOriginalExtension();\n $file->move('tmp/','import.' . $extension);\n $filename = 'tmp/import.' . $extension;\n\n if ($request->importType == 'property')\n {\n Helper::importProperty($filename);\n }\n elseif ($request->importType == 'tenant')\n {\n Helper::importTenant($filename);\n }\n elseif ($request->importType == 'past')\n {\n Helper::importPastTenant($filename);\n }\n elseif ($request->importType == 'sold')\n {\n Helper::importSoldProperties($filename);\n }\n elseif ($request->importType == 'transfer')\n {\n Helper::importTransfer($filename);\n }\n elseif ($request->importType == 'insreq')\n {\n Helper::importInsuranceRequirements($filename);\n }\n elseif ($request->importType == 'lease')\n {\n Helper::importNewLease($filename);\n }\n elseif ($request->importType == 'remit')\n {\n Helper::importRemit($filename);\n }\n elseif ($request->importType == 'manager')\n {\n Helper::importManager($filename);\n }\n\n \n return redirect('/home');\n }", "title": "" }, { "docid": "a5ba40e57845ae81a8407ae72b8a371c", "score": "0.5844199", "text": "public function actionImport($id)\n {\n $db = Yii::$app->db;\n $model = new Pegawai();\n $filepegawai = Filepegawai::findOne($id);\n\n $model->scenario = Pegawai::SCENARIO_IMPORT;\n\n if ($filepegawai != null) {\n $file = \\Yii::getAlias('@app/web/filepegawai/' . $id . '.xlsx');\n\n if ($file) {\n $readerType = IOFactory::identify($file);\n $objReader = IOFactory::createReader($readerType);\n $objPHPExcel = $objReader->load($file);\n $sheet = $objPHPExcel->getSheet(0);\n $highestRow = $sheet->getHighestRow();\n $highestColumn = $sheet->getHighestColumn();\n // $var = PHPExcel_Style_NumberFormat::toFormattedString($file[1], 'YYYY-MM-DD');\n\n for ($row = 2; $row <= $highestRow; $row++) {\n $rowData = $sheet->rangeToArray('A' . $row . ':' . $highestColumn . $row, NULL, TRUE, FALSE);\n $pegawai_id = $rowData[0][1];\n $nik = $rowData[0][2];\n $nip = $rowData[0][3];\n $nama_pegawai = $rowData[0][4];\n $jeniskelamin_id = $rowData[0][5];\n $tempat_lahir = $rowData[0][6];\n $tgl_lahir = \\PhpOffice\\PhpSpreadsheet\\Shared\\Date::excelToDateTimeObject($rowData[0][7])->format('Y-m-d');\n $alamat = $rowData[0][8];\n $status_kawin = $rowData[0][9];\n $nama_pasangan = $rowData[0][10];\n $sekolah_id = $rowData[0][11];\n $tmt = \\PhpOffice\\PhpSpreadsheet\\Shared\\Date::excelToDateTimeObject($rowData[0][12])->format('Y-m-d');\n $statuspegawai_id = $rowData[0][13];\n $pangkatgolongan_id = $rowData[0][14];\n $pendidikanpegawai_id = $rowData[0][15];\n $jurusan = $rowData[0][16];\n $nama_sekolah = $rowData[0][17];\n $sertifikasi = $rowData[0][18];\n $status_inpasing = $rowData[0][19];\n $jenispegawai_id = $rowData[0][20];\n $tugas_tambahan = $rowData[0][21];\n $kaderisasi_nu = $rowData[0][22];\n\n $filepegawai = \\Yii::$app->db->createCommand(\"select count(*) as jml from pegawai where pegawai_id=:pegawai_id\", [\n ':pegawai_id' => $pegawai_id,\n ])->queryScalar();\n\n if ($filepegawai == 0) { // jika belum ada datanya\n $insert = \\Yii::$app->db->createCommand(\"INSERT INTO pegawai \"\n . \"(pegawai_id, nik, nip, nama_pegawai, jeniskelamin_id, tempat_lahir, tgl_lahir, alamat, status_kawin, nama_pasangan, sekolah_id, tmt, statuspegawai_id, pangkatgolongan_id, pendidikanpegawai_id, jurusan, nama_sekolah, sertifikasi, status_inpasing, jenispegawai_id, tugas_tambahan, kaderisasi_nu) \"\n . \"VALUES(:pegawai_id, :nik, :nip, :nama_pegawai, :jeniskelamin_id, :tempat_lahir, :tgl_lahir, :alamat, :status_kawin, :nama_pasangan, :sekolah_id, :tmt, :statuspegawai_id, :pangkatgolongan_id, :pendidikanpegawai_id, :jurusan, :nama_sekolah, :sertifikasi, :status_inpasing, :jenispegawai_id, :tugas_tambahan, :kaderisasi_nu)\", [\n ':pegawai_id' => $pegawai_id,\n ':nik' => $nik,\n ':nip' => $nip,\n ':nama_pegawai' => $nama_pegawai,\n ':jeniskelamin_id' => $jeniskelamin_id,\n ':tempat_lahir' => $tempat_lahir,\n ':tgl_lahir' => $tgl_lahir,\n ':alamat' => $alamat,\n ':status_kawin' => $status_kawin,\n ':nama_pasangan' => $nama_pasangan,\n ':sekolah_id' => $sekolah_id,\n ':tmt' => $tmt,\n ':statuspegawai_id' => $statuspegawai_id,\n ':pangkatgolongan_id' => $pangkatgolongan_id,\n ':pendidikanpegawai_id' => $pendidikanpegawai_id,\n ':jurusan' => $jurusan,\n ':nama_sekolah' => $nama_sekolah,\n ':sertifikasi' => $sertifikasi,\n ':status_inpasing' => $status_inpasing,\n ':jenispegawai_id' => $jenispegawai_id,\n ':tugas_tambahan' => $tugas_tambahan,\n ':kaderisasi_nu' => $kaderisasi_nu,\n \n ])->execute();\n } else {\n $update = \\Yii::$app->db->createCommand(\"UPDATE pegawai SET nama_pegawai = :nama_pegawai WHERE pegawai_id=:id\")\n ->bindValue(':id', $pegawai_id)\n ->bindValue(':nama_pegawai', $nama_pegawai)\n ->execute();\n }\n }\n $proses = \"update filepegawai set tgl_proses=now() where file_id=$id\";\n $db->createCommand($proses)->execute();\n\n Yii::$app->getSession()->setFlash('success', 'Data berhasil di Import');\n return $this->redirect(['index']);\n }\n }\n }", "title": "" }, { "docid": "6ee9db6be9bcc7a7c40575654aea7fdf", "score": "0.5838263", "text": "public function create_file()\n\t{\n\n\t$file = Input::file('fileUpload');\n\t$ext = strtolower($file->getClientOriginalExtension());\n\t$validator = \\Validator::make(array('ext' => $ext),array('ext' => 'in:xls,xlsx'));\n\n\tif ($validator->fails()) {\n\treturn Redirect::to('teacher/create-file')->withErrors($validator);\n\t}else {\n\ttry{\n\t$toInsert = 0;\n\t$data = \\Excel::load(Input::file('fileUpload'), function ($reader) { })->get();\n\tif(!empty($data) && $data->count()){\n\tDB::beginTransaction();\n\ttry {\n\tforeach ($data->toArray() as $raw) {\n\t$teacherData= [\n\t'firstName' => $raw['firstname'],\n\t'lastName' => $raw['lastname'],\n\t'gender' => $raw['gender'],\n\t'phone' => $raw['phone'],\n\t'email' => $raw['email']\n\t];\n\t$hasTeacher = Teacher::where('email','=',$raw['email'])->first();\n\tif ($hasTeacher)\n\t{\n\n\t}else{\n\tTeacher::insert($teacherData);\n\t$toInsert++;\n\t}\n\t}\n\tDB::commit();\n\t} catch (Exception $e) {\n\tDB::rollback();\n\t$errorMessages = new \\Illuminate\\Support\\MessageBag;\n\t$errorMessages->add('Error', 'Something went wrong!');\n\treturn Redirect::to('/teacher/create-file')->withErrors($errorMessages);\n\n\t// something went wrong\n\t}\n\t}\n\tif($toInsert){\n\treturn Redirect::to('/teacher/create-file')->with(\"success\", $toInsert.' Teacher data upload successfully.');\n\t}\n\t$errorMessages = new \\Illuminate\\Support\\MessageBag;\n\t$errorMessages->add('Validation', 'File is empty!!!');\n\treturn Redirect::to('/teacher/create-file')->withErrors($errorMessages);\n\t}catch (Exception $e) {\n\t$errorMessages = new \\Illuminate\\Support\\MessageBag;\n\t$errorMessages->add('Error', 'Something went wrong!');\n\treturn Redirect::to('/teacher/create-file')->withErrors($errorMessages);\n\t}\n\t}\n\n\t}", "title": "" }, { "docid": "ad59e828f633b68e80fec19b8e0f5433", "score": "0.58308095", "text": "public function importCSV(){ \n $file_data = $this->csvimport->get_array($_FILES[\"csv_file\"][\"tmp_name\"]);\n foreach($file_data as $row)\n {\n $data[] = array(\n 'ct_fname' => $row[\"First Name\"],\n 'ct_lname' => $row[\"Last Name\"],\n 'ct_email' => $row[\"Email\"],\n 'ct_phone_num' => $row[\"Contact\"],\n 'ct_address' => $row[\"Address\"],\n 'ct_company' => $row[\"Company\"],\n 'ct_nickname' => $row[\"Nick Name\"],\n 'ct_status' => $row[\"Status\"]\n );\n }\n $this->ContactModel->insert($data);\n }", "title": "" }, { "docid": "6b7e4c8d25a217269b7fe87e19354a2c", "score": "0.58290976", "text": "public function bulkdownloadformat()\n {\n\n $this->excel->setActiveSheetIndex(0);\n $this->excel->getActiveSheet()->setTitle('Sheet1');\n\n // set result column header\n $this->excel->getActiveSheet()->setCellValue('A1', 'User ID.');\n $this->excel->getActiveSheet()->setCellValue('B1', 'Survey ID');\n $this->excel->getActiveSheet()->setCellValue('C1', 'Survey Type');\n $this->excel->getActiveSheet()->setCellValue('D1', 'Start Date');\n $this->excel->getActiveSheet()->setCellValue('E1', 'End Date');\n $this->excel->getActiveSheet()->setCellValue('F1', 'Status');\n\n\n //$this->excel->getDefaultStyle()->getAlignment()->setWrapText(true);\n\n $this->excel->getActiveSheet()->getStyle('A1:F1')->getFont()->setBold(true);\n\n $this->excel->getActiveSheet()->getColumnDimension('A')->setAutoSize(true);\n $this->excel->getActiveSheet()->getColumnDimension('B')->setAutoSize(true);\n $this->excel->getActiveSheet()->getColumnDimension('C')->setAutoSize(true);\n $this->excel->getActiveSheet()->getColumnDimension('D')->setAutoSize(true);\n $this->excel->getActiveSheet()->getColumnDimension('E')->setAutoSize(true);\n $this->excel->getActiveSheet()->getColumnDimension('F')->setAutoSize(true);\n // fill data\n $serial = 0;\n $row = 1;\n $percentage = 0;\n $no_of_answer = 0;\n $total_assigned = 0;\n\n //echo $expire_date; die();\n \n $this->excel->getActiveSheet()->setCellValueByColumnAndRow(0, $row,'User ID');\n $this->excel->getActiveSheet()->setCellValueByColumnAndRow(1, $row,'Survey ID');\n $this->excel->getActiveSheet()->setCellValueByColumnAndRow(2, $row, \"Survey Type\");\n $this->excel->getActiveSheet()->setCellValueByColumnAndRow(3, $row, 'Start Date');\n $this->excel->getActiveSheet()->setCellValueByColumnAndRow(4, $row, 'End Date');\n $this->excel->getActiveSheet()->setCellValueByColumnAndRow(5, $row, 'Status');\n\n $this->excel->getActiveSheet()->setCellValueByColumnAndRow(0, 2,'amit_cand5');\n $this->excel->getActiveSheet()->setCellValueByColumnAndRow(1, 2,'25');\n $this->excel->getActiveSheet()->setCellValueByColumnAndRow(2, 2, \"Normal\");\n $this->excel->getActiveSheet()->setCellValueByColumnAndRow(3, 2, '01/04/2019');\n $this->excel->getActiveSheet()->setCellValueByColumnAndRow(4, 2, '01/04/2019');\n $this->excel->getActiveSheet()->setCellValueByColumnAndRow(5, 2, 'Open');\n\n $this->excel->getActiveSheet()->setCellValueByColumnAndRow(0, 3,'amit_cand7');\n $this->excel->getActiveSheet()->setCellValueByColumnAndRow(1, 3,'25');\n $this->excel->getActiveSheet()->setCellValueByColumnAndRow(2, 3, \"Anonymous\");\n $this->excel->getActiveSheet()->setCellValueByColumnAndRow(3, 3, '01/04/2019');\n $this->excel->getActiveSheet()->setCellValueByColumnAndRow(4, 3, '01/04/2019');\n $this->excel->getActiveSheet()->setCellValueByColumnAndRow(5, 3, 'Open');\n \n \n \n $filename = 'Assign Bulk Survey User Data Format '. date('Y-m-d') .'.xlsx';\n \n header('Content-Type: application/vnd.ms-excel');\n header('Content-Disposition: attachment;filename=\"'. $filename. '\"');\n header('Cache-Control: max-age=0');\n \n $objWriter = PHPExcel_IOFactory::createWriter($this->excel, 'Excel2007');\n $objWriter->save('php://output');\n \n \n \n }", "title": "" }, { "docid": "c7f3845ddb4f51e0398bb9bb7e63329b", "score": "0.5828582", "text": "function importExcel($col1, $col2, $col3, $col4, $col5, $col6, $col7, $col8, $col9, $col10, $col11, $col12, $col13){\n\t\t\t$pdo = new Connection();\n\n\t\t\t$query = $pdo->prepare(\"\n\t\t\t\tInsert Into webcafe_modtelefonia_linhas\n\t\t\t\t\t(`idLinha`, `idAparelho`, `idUsuario`, `numLinha`, `plano`, `iccid`, `linhaStatus`, `operadora`, `observacoes`, `dataCadastro`, `dataAlteracao`, `userAdd`, `userLastChange`) \n\t\t\t\tValues \n\t\t\t\t\t('\".$col1.\"','\".$col2.\"','\".$col3.\"','\".$col4.\"','\".$col5.\"','\".$col6.\"','\".$col7.\"','\".$col8.\"','\".$col9.\"','\".$col10.\"','\".$col11.\"','\".$col12.\"','\".$col13.\"')\");\n\t\t\t$query->execute();\n\t\t}", "title": "" }, { "docid": "c4c7ab7d915d618d27aebf7646a36e48", "score": "0.58193785", "text": "protected function runImportProcess($model)\n {\n $this->model = $model;\n\n $factory = new ImportFactory();\n\n $imports = $factory->initializeImportsType($model, $this->request, $this->tanggal);\n\n excel()->import($imports, $this->request->file('filenya'));\n\n // Beri notifikasi kepada user apabila berhasil imports\n if ($imports->notificationTrigger()) {\n\n $this->setNotificationProperties()->fireUploadEvent();\n\n }\n }", "title": "" }, { "docid": "a1bbf0d0cddc262ce2b6ff4448343063", "score": "0.5816309", "text": "public function run()\n {\n Excel::import(new ImponentesImport, 'imponentes.csv', 'local');\n }", "title": "" }, { "docid": "27ce649c29aab189cbf1c518c7241710", "score": "0.58126324", "text": "public function importExcel(Request $request)\n {\n $file = $request->file('file');\n Excel::import(new CommoditiesImport, $file);\n Flash::success('<strong>En hora buena!</strong> Importación de mercancia completada con exito.');\n\n return back();\n }", "title": "" } ]
541a023b2786b66f68c024dc46968fb3
Action for User Login.
[ { "docid": "04280ce9bdd32a4bbf55e7b47069b571", "score": "0.7469715", "text": "public function actionUser_login() {\n if(!isset($_GET['key'])){\n $this->_sendResponse(401, CJSON::encode(['message' => 'Application Key is not passed.', 'error' => true]));\n } else {\n $key = $_GET['key'];\n if($key !== ApiController::APPLICATION_KEY){\n $this->_sendResponse(401, CJSON::encode(['message' => 'Invalid application key. Please contact administrator.', 'error' => true]), 'application/json');\n } else {\n $errorKey = [];\n if(!isset($_GET['username'])){\n $errorKey[] = '{username}';\n }\n if(!isset($_GET['password'])){\n $errorKey[] = '{password}';\n } \n if(count($errorKey)){\n $this->_sendResponse(401, CJSON::encode(['message' => implode(\", \", $errorKey).' not passed.', 'error' => true]), 'application/json');\n } else {\n $model = User::model()->findByAttributes(['user_name' => $_GET['username'], 'password' => md5($_GET['password'])]);\n if($model == NULL){\n $this->_sendResponse(403, CJSON::encode(['message' => 'Invalid username or password.', 'error' => true]), 'application/json');\n } elseif(!$model->status) {\n $this->_sendResponse(403, CJSON::encode(['message' => 'user {'.$model->user_name.'} is not active. Please contact administrator.', 'error' => true]), 'application/json');\n } else {\n $this->_sendResponse(200, CJSON::encode(['message' => '', 'error' => false, 'data' => ['user_id' => $model->id]]), 'application/json');\n }\n }\n }\n }\n \n }", "title": "" } ]
[ { "docid": "7c6ea0afd07f43b15edc0ad31af35a50", "score": "0.8229881", "text": "public function loginAction()\r\n\t{\r\n\t}", "title": "" }, { "docid": "ee470e83e291b32a908c7760b6db5707", "score": "0.81173587", "text": "public function actionLoginas()\n {\n $userid = $this->v->getValue('userid');\n \n if (User::loginByUserId($userid))\n {\n Util::forward('/app');\n }\n else\n {\n $this->fail(\"logging in as user # $userid failed...\");\n }\n \n }", "title": "" }, { "docid": "64b8f63c4ce600ec010ca9fa08e5a244", "score": "0.8113283", "text": "public function actionLogin()\n {\n if (Yii::app()->user->isGuest) {\n // create login form model\n $model = new UserLogin;\n\n // if form data available\n if (isset($_POST['UserLogin'])) {\n // copy form data to model\n $model->attributes = $_POST['UserLogin'];\n // validate user input and redirect to previous page if valid\n if ($model->validate()) {\n $this->lastVisit();\n $this->redirectToReturnUrl();\n }\n }\n\n // display the login form\n $this->render('/user/login', array('model'=>$model));\n\n } else {\n // user already logged in; goto normal return page\n $this->redirectToReturnUrl();\n }\n }", "title": "" }, { "docid": "d7bb271ec5dd953837f66159dcdcb839", "score": "0.81062835", "text": "public function loginAction()\n {\n $usuario = [\n 'usuario' => filter_input(INPUT_POST, 'usuario'),\n 'senha' => md5(filter_input(INPUT_POST, 'senha')),\n ];\n $auth = new Authentication($this->getEm(), $this->getSessao());\n if($auth->logOn($usuario)){\n header('location: /');\n } else {\n header('location: /Aplicacao/Login');\n }\n }", "title": "" }, { "docid": "0cd79bb55738abc26caed1def42c7a9b", "score": "0.80853903", "text": "public function loginAction()\n {\n \tif ($this->request->isPost())\n \t{\n\t \t$name = $this->request->getPost(\"username\");\n\t \t$password = $this->request->getPost(\"password\");\n\n\t \t$user = Users::findFirstByName($name);\n\t \tif ($user)\n\t \t{\n\t \t\tif (!strcmp($password, $user->encryptedpassword))\n\t \t\t{\n\t \t\t\treturn $this->response->redirect('Home/index');\n\t \t\t}\n\t \t} else {\n\t \t\treturn $this->response->redirect('Users/register');\n\t \t}\n \t}\n }", "title": "" }, { "docid": "8523605a35adec7cd7dbff109f1cdcf2", "score": "0.8070704", "text": "public function loginAction()\n\t{\n\t\tif($this->request->isPost())\n\t\t{\n\t\t\t// get data from user\n\t\t\t$username = $this->request->getPost('username');\n\t\t\t$password = $this->request->getPost('password');\n\t\t\t// find user in database\n\t\t\t$user = Users::findFirst(array(\n\t\t\t\"username = :username: AND password = :password: AND active = 'Y'\",\n\t\t\t\"bind\" => array(\n\t\t\t\"username\" => $username,\n\t\t\t\"password\" => $password,\n\t\t\t\n\t\t\t)\n\t\t\t\n\t\t\t));\n\t\t\t\n\t\t\t if($user != FALSE)\n\t\t\t {\n\t\t\t \t\n\t\t\t//\t$userInfo = User::getInfo();\n\t\t//\t$emailInfo = $userInfo->email;\n\t\t\t \n\t\t\t\t $this->session->set(\"auth\", \"auth\");\n\t\t\t\t $this->session->set(\"username\", $username);\n\t\t\t\t $this->session->set(\"password\", $password);\t\t\t\n\t\t\t\t $this->session->set(\"email\", '[email protected]');\n\t\t\t\t \n\t\t\t// forward to home if user is valid\n\t\t\t//\theader('location:/georginaquinceanera/home');\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\n\t\t\t\t//echo '$userInfo = User::getInfo()';\n\t\t\t\t//$userInfo = User::getInfo();\n\t \t\t\theader('location:/georginaquinceanera/');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c9119a0656fb5474c5a693a360fb7587", "score": "0.8038227", "text": "public function signInAction()\n {\n $login = isset($_REQUEST[\"user_nickname\"]) ? $_REQUEST[\"user_nickname\"] : 'null';\n $login = trim($login);\n\n $password = isset($_REQUEST[\"user_password\"]) ? $_REQUEST[\"user_password\"] : 'null';\n $password = trim($password);\n\n $authorizationType = $this->userModel->signIn($login, $password);\n\n switch ($authorizationType) {\n case \"admin\":\n Router::redirectTo(\"admin\");\n break;\n\n case \"user\":\n Router::redirectTo(\"user/account\");\n break;\n\n default:\n echo 'no admin and user defined. meeee';\n }\n\n }", "title": "" }, { "docid": "bbc02da4fde4819f0f1e68462f750eed", "score": "0.7955523", "text": "public function actionLogin()\n {\n // turn off caching\n $this->_response->setNoCache();\n \n // convenience var\n $auth = $this->user->auth;\n \n // if already logged in, redirect to the profile page\n if ($auth->isValid()) {\n $id = $auth->uid;\n $this->_redirect(\"/{$this->_controller}/read/{$id}\");\n }\n \n // is this a login request?\n $login = $auth->getLoginProtocol();\n if ($login) {\n // process it; this will honor any redirect in the form vars\n $auth->processLogin($login);\n \n // did it succeed?\n if ($auth->isValid()) {\n // honor a flash redirect if it exists\n $uri = $this->_session->getFlash('redirect');\n if ($uri) {\n $this->_redirectNoCache($uri);\n }\n \n // final fallback: redirect to the profile page\n $id = $auth->uid;\n $this->_redirect(\"/{$this->_controller}/read/{$id}\");\n }\n }\n \n // catch flash indicating a successful password change\n if ($this->_session->getFlash('success_passwd')) {\n $this->feedback = 'SUCCESS_PASSWD';\n }\n \n // catch flash indicating a successful account activation\n if ($this->_session->getFlash('success_activate')) {\n $this->feedback = 'SUCCESS_ACTIVATE';\n }\n }", "title": "" }, { "docid": "3cdd7e7af2a49aa42fc497fb8a18f94c", "score": "0.7933155", "text": "public function loginAction() {\n\t\ttry {\n\t\t\tif ($this->request->isPost()) {\n\n\t\t\t\tif ($this->request->getPost() == false) {\n\t\t\t\t\t/*\tforeach ($form->getMessages() as $message) {\n\t\t\t\t\t\t\t$this->flash->error($message);\n\t\t\t\t\t\t}*/\n\t\t\t\t} else {\n\t\t\t\t\t$email = $this->request->getPost('email');\n\t\t\t\t\t$password = $this->request->getPost('password');\n\n\n\t\t\t\t\t$user = Users::findFirst(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"email = :email: AND password = :password: AND activity=1 \",\n\t\t\t\t\t\t\t'bind' => array(\n\t\t\t\t\t\t\t\t'email' => $email,\n\t\t\t\t\t\t\t\t'password' => sha1($password)\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\tif ($user) {\n\t\t\t\t\t\t$this->_registerSession($user);\n\n\t\t\t\t\t\treturn $this->dispatcher->forward(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'controller' => 'login',\n\t\t\t\t\t\t\t\t'action' => 'index'\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} catch (AuthException $e) {\n\t\t\t$this->flash->error($e->getMessage());\n\t\t}\n\n\t\t//\t$this->view->form = $form;\n\t}", "title": "" }, { "docid": "23381d9240f674d60e4b9db7e6772ac1", "score": "0.7910248", "text": "public function actionLogin()\n\t{\n // print_r(Yii::app()->controller->module);exit;\n if (Yii::app()->user->isGuest) {\n\t\t\t$model = new UserLogin;\n\t\t\t// collect user input data\n\t\t\tif(isset($_POST['UserLogin']))\n\t\t\t{\n\t\t\t\t$model->attributes=$_POST['UserLogin'];\n\t\t\t\t// validate user input and redirect to previous page if valid\n\t\t\t\tif($model->validate()) {\n\t\t\t\t\t$this->lastViset();\n\t\t\t\t\tif (Yii::app()->getBaseUrl().\"/index.php\" === Yii::app()->user->returnUrl)\n\t\t\t\t\t\t$this->redirect(Yii::app()->controller->module->returnUrl);\n\t\t\t\t\telse\n\t\t\t\t\t\t$this->redirect(Yii::app()->user->returnUrl);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// display the login form\n\t\t\t$this->render('//user/login',array('model'=>$model));\n\t\t} else\n\t\t\t$this->redirect(Yii::app()->controller->module->returnUrl);\n\t}", "title": "" }, { "docid": "6f5d9c6046398f6987ee3f9dcd88ef25", "score": "0.7880206", "text": "public function actionLogin()\r\n {\r\n // Variables for the form\r\n $login = false;\r\n $password = false;\r\n \r\n // Form processing\r\n if (isset($_POST['submit'])) {\r\n // If the form is sent\r\n // Get the data from the form\r\n $login = $_POST['login'];\r\n $password = $_POST['password'];\r\n\r\n // Error flag\r\n $errors = false;\r\n\r\n // Field Validation\r\n if (!User::checkLogin($login)) {\r\n $errors[] = 'Invalid Login';\r\n }\r\n if (!User::checkPassword($password)) {\r\n $errors[] = 'Password must not be shorter than 6 characters';\r\n }\r\n\r\n // Check if the user exists\r\n $userId = User::checkUserData($login, $password);\r\n\r\n if ($userId == false) {\r\n // If the data is incorrect, we show an error\r\n $errors[] = 'Invalid login data';\r\n } else {\r\n // If the data is correct, remember the user (session)\r\n User::auth($userId);\r\n\r\n // We redirect the user to the closed part - the cabinet\r\n header(\"Location: /cabinet\");\r\n }\r\n }\r\n\r\n // Connect the view\r\n require_once(ROOT . '/views/user/login.php');\r\n return true;\r\n }", "title": "" }, { "docid": "23f80d876c301bb6a17a726a0891525f", "score": "0.7860115", "text": "public function actionLogin()\n\t{\n\t\tif (Yii::app()->user->isGuest) {\n\t\t\t$model=new UserLogin;\n\t\t\t// collect user input data\n\t\t\tif(isset($_POST['UserLogin']))\n\t\t\t{\n\t\t\t\t$model->attributes=$_POST['UserLogin'];\n\t\t\t\t// validate user input and redirect to previous page if valid\n\t\t\t\tif($model->validate()) {\n\t\t\t\t\t$this->redirect(Yii::app()->user->returnUrl);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// display the login form\n\t\t\t$this->render('login', array('model' => $model));\n\t\t} else\n\t\t\t$this->redirect(Yii::app()->user->returnUrl);\n\t}", "title": "" }, { "docid": "47c142aeb48d21cf7a7fd5c8c508248c", "score": "0.7849285", "text": "public function actionLogin() {\r\n\t\t$this->render('login');\r\n\t}", "title": "" }, { "docid": "681517e0d688dae3f90526c4a48984ee", "score": "0.7841207", "text": "public function action_login(){\n\n\t\t$data[\"subnav\"] = array('login'=> 'active' );\n\t\t$this->template->title = 'Users &raquo; Login';\n\t\t$this->template->content = View::forge('users/login', $data);\n\n\t}", "title": "" }, { "docid": "9b35f889948aad074c143543a7aeb186", "score": "0.78390634", "text": "public function loginAction()\n {\n if (! $this->session->has(\"Last-Place\")) {\n $this->session->set(\"Last-Place\", $this->request->getHTTPReferer());\n }\n\n if ($this->auth->getIdentity()) {\n return $this->gotoLastPlace(\"users\");\n }\n\n $this->view->setRenderLevel(\\Phalcon\\Mvc\\View::LEVEL_ACTION_VIEW);\n\n $form = new LoginForm();\n\n try {\n if (!$this->request->isPost()) {\n if ($this->auth->hasRememberMe()) {\n return $this->auth->loginWithRememberMe();\n }\n } else {\n if ($form->isValid($this->request->getPost()) == false) {\n foreach ($form->getMessages() as $message) {\n $this->flash->error($message);\n }\n } else {\n $this->auth->check(array(\n 'name' => $this->request->getPost('name'),\n 'password' => $this->request->getPost('password'),\n 'remember' => $this->request->getPost('remember')\n ));\n\n return $this->gotoLastPlace(\"users\");\n }\n }\n } catch (AuthException $e) {\n $this->flashSession->error($e->getMessage());\n }\n\n //默认显示登录表单\n $this->view->form = $form;\n $this->view->captform = new CaptchaForm();;\n }", "title": "" }, { "docid": "e4cb2de594935b19ecb4e28cfe91d393", "score": "0.78257936", "text": "public function loginUser()\n {\n //body\n }", "title": "" }, { "docid": "b48b0846ac4dd3f6b2ae48395c2cac1d", "score": "0.78100115", "text": "public function actionLogin(){\n\t\t$user = 'admin';\n\t\t$pass = 'admin';\n\t\n\t\t// Acceso\n\t\tif(($_POST['user']==$user)&&($_POST['pass']==$pass)){\n\t\t\t$_SESSION['user'] = 'admin';\n\t\t\t$this->actionIndex();\n\t\t}\n\t\telse{\n\t\t\t$this->actionLoginForm();\n\t\t}\t\n\t\t\n\t}", "title": "" }, { "docid": "8e9f70881db006f4af1ae15b5be2a100", "score": "0.7809185", "text": "public function loginAction(){\n if ($this->request->isPost()) {\n $email = $this->request->getPost($this->userNameRequestKey);\n $password = $this->request->getPost($this->userPassRequestKey);\n if($this->sessionAuth->isAlreadyAuthenticated()){\n $this->sessionAuth->logout();\n }\n $isAuthenticated = $this->loginService->execute($email, $password);\n if ($isAuthenticated) {\n $user = $this->sqlUserRepository->ofEmail($email);\n $this->view->setVar(\"isAuth\", true);\n return $this->response->redirect(\"/../\");\n } else {\n $this->view->setVar(\"isAuth\", false);\n return $this->response->redirect(\"/../login\");\n }\n }\n }", "title": "" }, { "docid": "fe4c465599f4e8038f09fd6cc197c854", "score": "0.7777464", "text": "public function login() {\n $user = $this->getUser('username', 'password');\n if (is_string($user)) {\n //invalid user credentials\n }\n }", "title": "" }, { "docid": "511c284c0d3dd238d98b2ad74b6007e6", "score": "0.77754545", "text": "public function login()\n {\n $username = '';\n $referrer = null;\n\n // Log the user in\n if($this->request->getRequestMethod() == 'POST' && !is_null($this->request->getPostParam('login')))\n {\n $username = $this->request->getPostParam('username');\n $referrer = $this->request->getPostParam('referrer');\n $userId = $this->Users->login(\n $username,\n $this->request->getPostParam('password')\n );\n\n if(!is_null($userId))\n {\n $this->Auth->setUserId($userId);\n $user = $this->Users->getUserById($userId);\n\n if(!empty($referrer)) {\n $this->redirect($referrer);\n }\n else {\n $this->redirect($this->linker->link(array($user['url']), 1));\n }\n }\n }\n\n\n // Set titile\n $this->addTitleLocalized('Login');\n\n // Pass data to view\n $this->set('username', $username);\n $this->set('referrer', $referrer);\n $this->set('failed', ($this->request->getRequestMethod() == 'POST'));\n }", "title": "" }, { "docid": "cbdb37de3011d06a8e572ebce5bd12f9", "score": "0.7753504", "text": "public function login(){\t\t\t\t\t\t\n\t\t\tif ($this->request->is('post')) {\n\t\t\t\tif($this->Auth->login()){\n\t\t\t\t\t$user = $this->Auth->user();\t\t\t\t\t\n\t\t\t\t\t$this->redirect($this->Auth->redirect());\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t$this->Session->setFlash($this->Message->error('Usuário e senha inválidos'));\n\t\t\t\t}\n\t\t\t}\n\t\t\t \n\t\t}", "title": "" }, { "docid": "26813f06059d25d6d91b9942fb444f51", "score": "0.7731247", "text": "public function loginAction() {\n echo \"login\";\n }", "title": "" }, { "docid": "b037f48b7099d4de6dd3734d94b5db11", "score": "0.77231085", "text": "function loginAction()\n {\n $isLoggedIn = $this->isLoggedInFromSession();\n $username = $this->usernameFromSession();\n\n require_once __DIR__ . '/../templates/loginForm.php';\n }", "title": "" }, { "docid": "2407ebd2f3ba50ed7d9ac2ce4dd55a42", "score": "0.7721275", "text": "public function loginAction() {\n\t\t$username = $this->input->post('username');\n\t\t$password = $this->input->post('password');\n\n\t\tif (!empty($username) && !empty($password)) {\n\t\t\t$user = $this->m_admin->get_user($username);\n\t\t\tif ($username == $user->username && password_verify($password, $user->password)) {\n\t\t\t\t$session_data = [];\n\t\t\t\t$session_data['status'] = 'logged_in';\n\t\t\t\t$session_data['user'] = $user->username;\n\t\t\t\t$this->session->set_userdata($session_data);\n\t\t\t}\n\t\t}\n\t\tredirect(base_url(\"index.php/admin/index\"));\n\t}", "title": "" }, { "docid": "6681785f4a2dfdfdda131504e7ab1962", "score": "0.77110296", "text": "private function performUserLoginAction()\n {\n if (isset($_GET[\"action\"]) && $_GET[\"action\"] == \"logout\") {\n $this->doLogout();\n } elseif (!empty($_SESSION['user_name']) && ($_SESSION['user_is_logged_in'])) {\n $this->doLoginWithSessionData();\n } elseif (isset($_POST[\"login\"])) {\n $this->doLoginWithPostData();\n }\n }", "title": "" }, { "docid": "72861f9d2364dc83e7619af41589bd3f", "score": "0.77058566", "text": "public function login()\n\t{\n\t\t$this->loginRequest();\n\t}", "title": "" }, { "docid": "02f5e208e2e929dd0065327bddae4e78", "score": "0.7699342", "text": "public function loginuser(){\r\n\r\n\t}", "title": "" }, { "docid": "c626b0077edff4367552c8525e90efa3", "score": "0.76758546", "text": "function actionLogin() {\n\t\t\n\t\t$model = new JLLoginForm;\n\t\t\n\t\t$msg = array(\n\t\t\t\"validate\"\t\t=> false,\n\t\t\t\"sessionid\"\t=> '',\n\t\t\t'username'\t\t=> '',\n\t\t\t'displayname'\t\t=> ''\n\t\t);\n\t\t// collect user input data\n\t\tif (isset($_POST['Login'])) {\n\t\t\t$model->attributes = $_POST['Login'];\n\t\t\t// validate user input and redirect to the previous page if valid\n\t\t\tif ($model->validate() && $model->login()) {\n\t\t\t\t$msg = array(\n\t\t\t\t\t\"validate\"\t\t=> true,\n\t\t\t\t\t\"sessionid\"\t=> Yii::app()->session->sessionID,\n\t\t\t\t\t\"username\"\t\t=> $model->username,\n\t\t\t\t\t\"displayname\"\t\t=> $model->displayname\n\t\t\t\t);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tjsonOut($msg);\n\t}", "title": "" }, { "docid": "db4a584ae70edc0ae4c5b2ff969ec139", "score": "0.7644687", "text": "public function login()\n {\n $user = new User($this->db);\n try {\n $user->findByAttribute(\"email\", $this->attributes->email);\n } catch (\\Exception $e) {\n $this->f3->error($e->getCode(), \"Sorry a user with that email is not registered.\");\n }\n if (password_verify($this->attributes->password, $user->password)) {\n $auth = (new HomeAuth);\n $this->renderJson([\n \"message\" => \"You are now logged in\",\n \"token\" => (string)$auth->getToken($user)\n ]);\n } else {\n $this->renderJson([\"message\" => \"Something went horribly wrong...\"]);\n }\n\t}", "title": "" }, { "docid": "285d96997a4b87aac0f6155e109e3d19", "score": "0.76323926", "text": "public function processLoginAction()\n {\n // default is bad login\n $isLoggedIn = false;\n\n $username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);\n $password = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\n\n // search for user with username in repository\n $isLoggedIn = User::canFindMatchingUsernameAndPassword($username, $password);\n\n // action depending on login success\n if ($isLoggedIn) {\n // STORE login status SESSION\n $_SESSION['user'] = $username;\n\n require_once __DIR__ . '/../templates/loginSuccess.php';\n } else {\n $message = 'Bad Username or Password enter. Please Try Again';\n require_once __DIR__ . '/../templates/message.php';\n }\n }", "title": "" }, { "docid": "f249aa37423896640f2b4633a7d88ba9", "score": "0.76323855", "text": "public function login()\n {\n // TODO\n }", "title": "" }, { "docid": "2d3cd7b4acb8c8e95a8c39f9db921f5b", "score": "0.7627675", "text": "function doLoginAction() {\r\n\t\t// validation error or new url\r\n\t}", "title": "" }, { "docid": "11fad3b4035bace8a26ecebb6e4a94d7", "score": "0.7623961", "text": "public function login() {\r\n\t\tif ($this->request->is ( 'post' )) {\r\n\t\t\tif ($this->Auth->login ( $this->request->data ['User'] ['username'] )) {\r\n\t\t\t\treturn $this->redirect ( $this->Auth->redirect () );\r\n\t\t\t} else {\r\n\t\t\t\t$this->Session->setFlash ( 'Incorrect Username or Password', 'default', array (), 'flash' );\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "3fbe79c114ca8b4a14d07750ff0e66c3", "score": "0.7614504", "text": "function loginAction()\n{\n authenticate_user();\n}", "title": "" }, { "docid": "e63a7916c6a3c7e6605173b3172b256c", "score": "0.7609029", "text": "public function actionLogin()\n {\n // Set layout and bodyClass for login-page\n $this->layout = 'blank';\n Yii::$app->params['bodyClass'] = 'login-page';\n\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n $model->scenario = \"login\";\n\n\n if ($model->load(Yii::$app->request->post())) {\n $user = User::find()->where(['username'=>$model->username])->one();\n\n if ($user->user_type=='admin') {\n if ($model->login ()) {\n \n return $this->redirect ( ['index'] );\n\n }else{\n Yii::$app->getSession()->setFlash('error', 'The user name or password is incorrect.');\n return $this->redirect ( ['login'] );\n }\n } else{\n Yii::$app->getSession()->setFlash('error', 'The user name or password is incorrect.');\n\n return $this->redirect ( ['login'] );\n\n }\n\n // $modelUserDetails = new UserLoginDetails();\n // $modelUserDetails->activity_datetime = date(\"Y-m-d H:i:s\");\n // $modelUserDetails->user_id = Yii::$app->user->id;\n // $modelUserDetails->activity = 'Login';\n // $modelUserDetails->ip_address = Yii::$app->getRequest()->getUserIP();\n // $modelUserDetails->save();\n }\n\n return $this->render('login', [\n 'model' => $model\n ]);\n }", "title": "" }, { "docid": "35c0068a854f88cb6039b9e0605b3355", "score": "0.76082426", "text": "public function actionLogin()\n {\n $this->redirect(array('/user/registration'));\n }", "title": "" }, { "docid": "9649e884266d00cfaf73858c5390435c", "score": "0.76048386", "text": "public function login() {\n // Build Roles Array\n $userRoles = array();\n foreach ($this->roles->toArray() as $role) {\n $userRoles[] = $role['label'];\n }\n\n // Place values into the SESSION\n Session::put('_user_id', $this->user_id);\n Session::put('_username', $this->username);\n Session::put('_loginHash', $this->fetchHash());\n Session::put('_roles', $userRoles);\n }", "title": "" }, { "docid": "f19c9d05cedd1fcd82b4472bdc5e76a0", "score": "0.7604096", "text": "public function p_login() {\n\n # Sanitize the user entered data\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n # Hash submitted password so we can compare it against one in the db\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n # Search the db for this email and password\n # Retrieve the token if it's available\n\n $q = 'SELECT token\n\t\t\t\tFROM users\n\t\t\t\tWHERE email = \"'.$_POST['email'].'\"\n\t\t\t\tAND password = \"'.$_POST['password'].'\"';\n\n $token = DB::instance(DB_NAME)->select_field($q);\n\n # If we didn't find a matching token in the database, it means login failed\n if(!$token) {\n\n # Send them back to the login page\n # Error code 1 indicates that they have incorrect login credentials\n Router::redirect(\"/users/login/1\");\n\n }\n \t# But if we did, login succeeded!\n \telse {\n\n # Store this token in a cookie using setcookie()\n setcookie(\"token\", $token, strtotime('+1 year'), '/', false);\n\n # Send them to the main page\n Router::redirect('/users/profile');\n }\n }", "title": "" }, { "docid": "3d5d089267c5286e13d17da3f59dd2fe", "score": "0.7584277", "text": "public function loginAction() {\n $form = jcms\\FormsHelper::getLoginForm($this->getRequest());\n $form->setAction('/account/login');\n\n if($this->getRequest()->isPost()){\n if($form->isValid($_POST)){\n $values = $form->getValues();\n $result = \\Zend_Auth::getInstance()->authenticate(new jcms\\Auth($values['username'],$values['password']));\n if($result->getCode()){\n $landing = Default_Model_Content::getInstanceByCode(Zend_Registry::getInstance()->settings['jcms']['logon_landing']);\n if($landing){\n \theader('Location: '.$landing->getUrl());\n }else{\n \t$this->_helper->redirector('index');\n }\n }\n }\n }\n\n $this->view->loginForm = $form;\n }", "title": "" }, { "docid": "8dd750c167762ccd1d98ef28efcebb97", "score": "0.75805795", "text": "public function action_login()\n {\n \tRequest::factory()->redirect('/account/login');\n }", "title": "" }, { "docid": "f1e2021bd2a105a19ab1bf90362e9673", "score": "0.75701475", "text": "public function login()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "bbf80087b2d9c36e14d62e206e900164", "score": "0.7568461", "text": "public function processLoginAction()\n {\n //Default to not logged in\n $isLoggedIn = false;\n\n $username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);\n $password = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\n\n //Search for username\n $isLoggedIn = User::canFindMatchingUsernameAndPassword($username, $password);\n $isRole = User::canFindMatchingUsernameAndRole($username);\n\n //Log in actions\n if($isLoggedIn){\n if($isRole == 2)\n {\n $_SESSION[\"isLoggedIn\"]=$isLoggedIn;\n $_SESSION[\"role\"]=$isRole;\n $_SESSION['hasLoggedIn']=\"yes\";\n $this->nav();\n }\n else\n {\n $_SESSION[\"isLoggedIn\"]=$isLoggedIn;\n $_SESSION[\"role\"]=$isRole;\n $_SESSION['hasLoggedIn']=\"yes\";\n $this->nav();\n }\n require_once __DIR__ . '/../templates/loginSuccess.php';\n } else {\n $message = 'Incorrect login, try again.';\n require_once __DIR__ . '/../templates/message.php';\n }\n }", "title": "" }, { "docid": "d2e2cc73701e21d5deccbe7617ecaee4", "score": "0.7565367", "text": "public function action_login() \n\t {\n\n\t\t if(!empty($_POST['username']))\n\t\t {\n\t\t\t \tAuth::instance()->login($_POST['username'],$_POST['password']);\n\t\t\t\t$this->request->redirect('index.php/admin/index');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t $view = View::factory('admin/login');\n\t\t\t\t $this->response->body($view->render());\n\t\t\t}\n \t}", "title": "" }, { "docid": "8850a8f648ae0f699419e93658ffcbc8", "score": "0.7563849", "text": "public function loginAction() {\r\n $auth = $this->session->get('auth');\r\n if ($auth) {\r\n $this->response->redirect('/');\r\n }\r\n $this->view->setMainView('login');\r\n $this->view->setLayout('login');\r\n\r\n if ($this->request->isPost()) {\r\n $usuario = $this->request->getPost('username');\r\n $password = $this->request->getPost('password');\r\n $password = hash_hmac('sha256', $password, '2, 4, 6, 7, 9, 15, 20, 23, 25, 30'); //sigec users\r\n //$password = sha1($password); \r\n $user = usuarios::findFirst(\r\n array(\r\n \"username = :usuario: AND password = :password: AND habilitado= :estado:\",\r\n \"bind\" => array('usuario' => $usuario, 'password' => $password, 'estado' => 1)\r\n ));\r\n if ($user != false) {\r\n //acutalizamos la cantidad de ingresos\r\n $user->logins = $user->logins + 1;\r\n $user->lastlogin = time();\r\n $user->save();\r\n $this->_registerSession($user);\r\n $this->flashSession->success('Bienvenido <i>' . $user->nombre . '</i>');\r\n $this->response->redirect('/dashboard');\r\n }\r\n $this->flashSession->error('<b>Acceso denegado :</b> Usuario/contraseña incorrectos, o usuario No habilitado');\r\n }\r\n // return $this->forward('session/index'); \r\n }", "title": "" }, { "docid": "d69306dffcda44c409b1442ac3b40582", "score": "0.7551322", "text": "public function login()\n {\n $this->set('title', 'login');\n if ($this->Auth->user()) {\n $this->redirect(\"/organizations/index\");\n }\n $this->viewBuilder()->setLayout('login');\n if($this->request->is('post')) {\n $user = $this->Auth->identify();\n if($user) {\n $this->loadModel('Users');\n $user = $this->Users->find()->select(['id','name','username','role','users_group_id'])->where(['Users.id' => $user['id']])->contain(['UsersGroups' => function($w){\n return $w->select(['id','name']);\n }])->hydrate(false)->first();\n $this->Auth->setUser($user);\n }else{\n $this->Flash->customError('Your username or password is incorrect.', ['key' => 'resendemail']);\n }\n return $this->redirect('/users/login');\n }\n }", "title": "" }, { "docid": "fa8674232e2f129f4ea71524a4f8fd06", "score": "0.75424665", "text": "public function login();", "title": "" }, { "docid": "fa8674232e2f129f4ea71524a4f8fd06", "score": "0.75424665", "text": "public function login();", "title": "" }, { "docid": "5f7d7d96fcf245205a01c8bbc82498d7", "score": "0.75416535", "text": "public function actionLogin()\n {\n // if (!Yii::$app->user->isGuest) {\n // return $this->goHome();\n // }\n\n // $model = new LoginForm();\n // if ($model->load(Yii::$app->request->post()) && $model->login()) {\n // return $this->redirect('profile');\n // } else {\n // $model->password = '';\n\n // return $this->render('login', [\n // 'model' => $model,\n // ]);\n // }\n return $this->redirect(Url::to('http://edu.loc'));\n }", "title": "" }, { "docid": "df9cb90142e16697ead78b3cb41666e7", "score": "0.75342804", "text": "public function actionLogin() {\n if (!\\Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n $user = User::findOne(Yii::$app->user->id);\n $user->lastvisit = time();\n $user->save();\n if (!empty($_GET['redirect'])) {\n $this->redirect(Yii::$app->convert->url($_GET['redirect']));\n } else\n return $this->goBack();\n }\n return $this->render('login', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "15b3049f6b9423ae58ba047b71b9e755", "score": "0.75338376", "text": "public function actionLogin()\n {\n // if (!Yii::$app->user->isGuest) {\n // return $this->goHome();\n // }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "48bc93c21362be0c337aaf0ba12c50c3", "score": "0.7527506", "text": "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "48bc93c21362be0c337aaf0ba12c50c3", "score": "0.7527506", "text": "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "48bc93c21362be0c337aaf0ba12c50c3", "score": "0.7527506", "text": "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "48bc93c21362be0c337aaf0ba12c50c3", "score": "0.7527506", "text": "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "48bc93c21362be0c337aaf0ba12c50c3", "score": "0.7527506", "text": "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "a42e1591798046b76be3e2806c99567e", "score": "0.75263613", "text": "public function actionLogin()\n {\n if (!\\Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "a42e1591798046b76be3e2806c99567e", "score": "0.75263613", "text": "public function actionLogin()\n {\n if (!\\Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "a42e1591798046b76be3e2806c99567e", "score": "0.75263613", "text": "public function actionLogin()\n {\n if (!\\Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "7ed3aa0424f0b36d078cdc39354a6518", "score": "0.7525426", "text": "public function actionLogin()\n {\n if (!empty(Yii::app()->request->urlReferrer) && Yii::app()->request->urlReferrer != $this->createAbsoluteUrl(\"/user/login\")) {\n Yii::app()->user->setReturnUrl(Yii::app()->request->urlReferrer);\n }\n\n $model=new LoginForm();\n\n // collect user input data\n if(isset($_POST['LoginForm']))\n {\n $model->attributes=$_POST['LoginForm'];\n if($model->validate() && $model->login())\n $this->redirect(Yii::app()->user->returnUrl);\n }\n\n // display the login form\n $this->render('login', array('model'=>$model));\n }", "title": "" }, { "docid": "678705de6e2be5bf66089500087fa197", "score": "0.7524332", "text": "public function actionLogin()\n\t{\n\t\tif (!Yii::$app->user->isGuest) {\n\t\t\treturn $this->goHome();\n\t\t}\n\n\t\t$model = new LoginForm();\n\t\tif ($model->load(Yii::$app->request->post()) && $model->login()) {\n\n\t\t\t$userId = \\Yii::$app->user->identity->id;\n\t\t\t$user = EmployerUsers::find()->select(['id'])->where(['user_id' => $userId])->one();\n\t\t\tif (empty($user)) {\n\t\t\t\t$user = SearchWorkUser::find()->select(['id'])->where(['user_id' => $userId])->one();\n\t\t\t\tif (empty($user)) {\n\t\t\t\t\treturn $this->redirect(['site/choose']);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $this->goBack();\n\t\t}\n\n\t\t$model->password = '';\n\n\t\treturn $this->render('login', [\n\t\t\t'model' => $model,\n\t\t]);\n\t}", "title": "" }, { "docid": "2d1f00c6f296107435e6314fa08e9449", "score": "0.75239545", "text": "public function login(){\n\t\tuser()->login();\n\t\ttemplate()->display();\n\t}", "title": "" }, { "docid": "aa9223be6129e0a5cd51e93fe2e9c8e3", "score": "0.75169945", "text": "public function actionLogin()\n\t{\n\t\tif (blx()->userSession->isLoggedIn())\n\t\t{\n\t\t\t$this->redirect('');\n\t\t}\n\n\t\t$vars = array();\n\n\t\tif (blx()->request->isPostRequest())\n\t\t{\n\t\t\t$loginName = blx()->request->getPost('loginName');\n\t\t\t$password = blx()->request->getPost('password');\n\t\t\t$rememberMe = (bool) blx()->request->getPost('rememberMe');\n\n\t\t\tif (blx()->userSession->login($loginName, $password, $rememberMe))\n\t\t\t{\n\t\t\t\t$redirectUrl = blx()->userSession->getReturnUrl();\n\n\t\t\t\tif (blx()->request->isAjaxRequest())\n\t\t\t\t{\n\t\t\t\t\t$this->returnJson(array(\n\t\t\t\t\t\t'success' => 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\tblx()->userSession->setNotice(Blocks::t('Logged in.'));\n\t\t\t\t\t$this->redirectToPostedUrl();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$errorCode = blx()->userSession->getLoginErrorCode();\n\n\t\t\t\tswitch ($errorCode)\n\t\t\t\t{\n\t\t\t\t\tcase UserIdentity::ERROR_PASSWORD_RESET_REQUIRED:\n\t\t\t\t\t{\n\t\t\t\t\t\t$error = Blocks::t('You need to reset your password. Check your email for instructions.');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase UserIdentity::ERROR_ACCOUNT_LOCKED:\n\t\t\t\t\t{\n\t\t\t\t\t\t$error = Blocks::t('Account locked.');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase UserIdentity::ERROR_ACCOUNT_COOLDOWN:\n\t\t\t\t\t{\n\t\t\t\t\t\t$user = blx()->users->getUserByUsernameOrEmail($loginName);\n\t\t\t\t\t\t$timeRemaining = $user->getRemainingCooldownTime();\n\n\t\t\t\t\t\tif ($timeRemaining)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$humanTimeRemaining = $timeRemaining->humanDuration(false);\n\t\t\t\t\t\t\t$error = Blocks::t('Account locked. Try again in {time}.', array('time' => $humanTimeRemaining));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$error = Blocks::t('Account locked.');\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase UserIdentity::ERROR_ACCOUNT_SUSPENDED:\n\t\t\t\t\t{\n\t\t\t\t\t\t$error = Blocks::t('Account suspended.');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase UserIdentity::ERROR_NO_CP_ACCESS:\n\t\t\t\t\t{\n\t\t\t\t\t\t$error = Blocks::t('You cannot access the CP with that account.');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tdefault:\n\t\t\t\t\t{\n\t\t\t\t\t\t$error = Blocks::t('Invalid username or password.');\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (blx()->request->isAjaxRequest())\n\t\t\t\t{\n\t\t\t\t\t$this->returnJson(array(\n\t\t\t\t\t\t'errorCode' => $errorCode,\n\t\t\t\t\t\t'error' => $error\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\tblx()->userSession->setError($error);\n\n\t\t\t\t\t$vars = array(\n\t\t\t\t\t\t'loginName' => $loginName,\n\t\t\t\t\t\t'rememberMe' => $rememberMe\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (blx()->request->isCpRequest())\n\t\t{\n\t\t\t$template = 'login';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$template = blx()->config->get('loginPath');\n\t\t}\n\n\t\t$this->renderTemplate($template, $vars);\n\t}", "title": "" }, { "docid": "25acfe46f765abaa023f7fe65bd035a8", "score": "0.7513443", "text": "public function loginAction()\n {\n if (Mage::getSingleton('customer/session')->isLoggedIn()) {\n $this->_redirect('*/*/');\n return;\n }\n\n $this->loadLayout();\n $this->_initLayoutMessages('customer/session');\n\n // set account create url\n if ($loginForm = $this->getLayout()->getBlock('customer_form_login')) {\n $loginForm->setCreateAccountUrl($this->_getHelper()->getMSRegisterUrl());\n }\n $this->renderLayout();\n }", "title": "" }, { "docid": "87a73a0b2f5565704250679310ac28fa", "score": "0.75102085", "text": "public function actionLogin()\n {\n if (!\\Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n \n $model = new LoginForm();\n if ($model->load(\\Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "1a511279e2c06b28a1225ccbf70fbc82", "score": "0.7507189", "text": "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest)\n {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login())\n {\n return $this->goBack();\n } else\n {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "f7c516a7291555ed1e0ce6c662a54667", "score": "0.75058717", "text": "public function login() {\n $this->_redirectIfNoUsers();\n \n /*\n * form submitted\n */\n if ($this->request->is('post')) {\n\n if ($this->Auth->login()) {//if user loggedIn\n\n /*\n * > set user id\n * > set user last login time\n * > set user login\n * > redirect to dashboard\n */\n $this->_userId = $this->Auth->user('id');\n $this->CloggyUser->setUserLastLogin($this->_userId);\n $this->CloggyUserLogin->setLogin($this->_userId);\n $this->redirect($this->Auth->loginRedirect);\n \n } else {\n $this->Auth->flash(__d('cloggy','Wrong username or password'));\n $this->redirect($this->Auth->loginAction);\n }\n }\n\n $this->set('title_for_layout', __d('cloggy','Cloggy - Administrator Login'));\n }", "title": "" }, { "docid": "a70362a536b17e6f30390cb9e1e63c01", "score": "0.7502718", "text": "public function p_login() \n\t{\n\t\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\t\t\n\t\t# Search the db for this email and password\n\t\t$q = \"SELECT * \n\t\t\tFROM users \n\t\t\tWHERE email = '\".$_POST['email'].\"' \n\t\t\tAND password = '\".$_POST['password'].\"'\n\t\t\tLIMIT 1\";\n\t\t$user = DB::instance(DB_NAME)->select_row($q, \"object\");\n\t\t\t\n\t\t# If we didn't get an user, login failed. Send user back to the login page with an error\n\t\tif(!$user) \n\t\t{\n\t\t\tRouter::redirect(\"/users/login/error\");\n\t\t\treturn;\n\t\t}\n\t\telse if ($user->active == 0) //Account not yet active\n\t\t{\n\t\t\t# Send an email to the user to activate the account.\n\t\t\t$this->activation_msg($user->first_name, $user->email, $user->token);\n\t\t}\n\t\telse //Login successful\n\t\t{\n\t\t\tsetcookie(\"token\", $user->token, strtotime('+2 week'), '/'); //Store this token in a cookie\n\t\t\tRouter::redirect(\"/\"); //Send them to the main page \n\t\t}\n\t}", "title": "" }, { "docid": "589ef8374ad978ff382bee11b562093d", "score": "0.7498087", "text": "public function actionLogin() {\n\t\tif (empty($_POST['username']) || empty($_POST['password'])) {\n\t\t\t//Yii::app()->session['errorMsg'] = ['message' => 'Incorret Information'];\n\t\t\treturn $this->actionIndex();\n\t\t}\n\n\t\t$username = $_POST['username'];\n\t\t$password = md5($_POST['password']);\n\n\t\t$sql = 'SELECT users.*, roles.name as role_name\t\t\t\t\t\t\n\t\t\t\t\t\tFROM users LEFT JOIN roles ON users.role_id = roles.id\n\t\t\t\t\t\tLEFT JOIN permissions ON users.id = permissions.user_id\n\t\t\t\t\t\tWHERE username = \"'.$username.'\" AND password = \"'.$password.'\"';\n\n\t\t$member = Yii::app()->db->createCommand($sql)->queryAll();\n\n\t\tif (empty($member)) {\n\t\t\t//Yii::app()->session['errorMsg'] = ['message' => 'Incorret Information'];\n\t\t\t//Yii::app()->session['tempData'] = ['username' => $_POST['username']];\n\t\t\t$this->redirect('index.php');\n\t\t}\n\n\t\t$this->actionSetLogin($member[0]);\n\t\t\n\n\t\tif ($member[0]['role_id'] == 1 ) {\n\t\t\t$this->redirect('index.php?r=site/usersList');\n\t\t}\n\t\telse if ($member[0]['role_id'] == 2) {\n\t\t\t$this->redirect('index.php?r=site/reportsList');\t\n\t\t}\n\t\telse if ($member[0]['role_id'] == 3) {\n\t\t\t$this->redirect('index.php?r=site/welcome');\n\t\t}\n\t\telse {\n\t\t\t$this->redirect('index.php');\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "6ad233b9bd63385e86e23c15de06b2ca", "score": "0.7493815", "text": "private function login() {\n $tpl = Smarty_FLS::getInstance();\n $user = User::getInstance();\n $gsh = StatusHandler::getInstance();\n\n $username = $_POST['login_name'];\n $password = $_POST['login_pass'];\n\n $sh = $user->login($username, $password);\n $gsh->messagesMerge($sh);\n }", "title": "" }, { "docid": "d7a65c9066eb8deceb22dbcf21bfa12f", "score": "0.7493345", "text": "public function actionLogin()\r\n {\r\n if (!\\Yii::$app->user->isGuest) {\r\n return $this->goHome();\r\n }\r\n\r\n $model = new LoginForm();\r\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\r\n return $this->goBack();\r\n } else {\r\n return $this->render('login', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }", "title": "" }, { "docid": "6bc3c4f4625246a975b82f67dd2469c6", "score": "0.7479928", "text": "public function loginAction(){\n\t\treturn $this->render('loginForm');\n\t}", "title": "" }, { "docid": "07de21df40533bb791917c1a092b0fa8", "score": "0.7474972", "text": "public function login()\n\t{\n\t\t$u = $this->username;\n\t\t$p = md5($this->password);\n\t\t$p2 = substr($p,0,5);\n\t\t$p3 = substr($p,5,-1);\n\t\t$p4 = substr($p,-1);\n\t\t$unix = md5(substr($p,-4));\n\t\t$uCod = substr($unix,0,4);\n\t\t$tp = $p2.$uCod.$p3.$uCod.$p4;\n\t\t$filterBy = 'Username';\n\t\t$criteria = new CDbCriteria;\n\t\t$criteria->addSearchCondition('Username',$u,'TRUE');\n\t\t$data = TUser::model()->find($criteria);\n\n\t\tif(isset($data)){\n\t\t\t/*Yii::app()->user->setState('userid',$data->userid);\n\t\t\tYii::app()->user->setState('Fullname',$data->Fullname);*/\n\t\t\t\n\t\t\tif($data->password==$tp2){\n\t\t\t\tYii::app()->request->redirect(Yii::app()->createUrl('admin/dashboard'));\n\t\t\t}else{\n\t\t\t\tYii::app()->user->setFlash('Error','Worng Password !');\n\t\t\t}\n\t\t}else{\n\t\t\tYii::app()->user->setFlash('Error','Worng Username !');\n\t\t}\n\t\t$this->unsetAttributes(array('username','password')); \n\t}", "title": "" }, { "docid": "47b8f3f57695014772b33a0d9df0ae29", "score": "0.74723506", "text": "public function actionLogin()\n\t{\n\t\t$model=Yii::createComponent('gen.models.LoginForm');\n\n\t\t// collect user input data\n\t\tif(isset($_POST['LoginForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['LoginForm'];\n\t\t\t// validate user input and redirect to the previous page if valid\n\t\t\tif($model->validate() && $model->login()){\n\t\t\t\t$this->redirect(Yii::app()->createUrl('/gen/app/index'));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t}\n\t\t// display the login form\n\t\t$this->render('login',array('model'=>$model));\n\t}", "title": "" }, { "docid": "bd1bfb4a9ded356e436a69e74b1e5bcf", "score": "0.7470584", "text": "public function login()\n {\n $login_info = UserModel::getLoginInfo();\n\n if (!empty($login_info)) {\n session_start();\n $_SESSION[\"user\"] = $login_info;\n UserModel::setUserStatus(1, $_SESSION[\"user\"]);\n header(\"location:index.php\");\n } else {\n header(\"location:index.php\");\n }\n }", "title": "" }, { "docid": "a869f007f23ef1534dbb799fd7a3256e", "score": "0.74665", "text": "public function loginUserAction($request)\n {\n $io = IOAdapter::getInstance();\n if ($this->numberOfWrongAttempts >= intval(3)) {\n $io->makeOutput(\"\\033[01;31m Maximum Wrong Authentication\"\n . \" Limited Reached!!! \\033[0m\" . PHP_EOL);\n exit(1);\n } else if ($this->numberOfWrongAttempts == intval(0)) {\n $viewObject = new View();\n $request['View'] = \"welcome.php\";\n $response = $viewObject->render($request['View'], $request['controller']);\n $this->showResponse($response);\n }\n\n $IOAdapterObject = IOAdapter::getInstance();\n $username = $IOAdapterObject->getInput();\n $io->makeOutput(\">> Please Enter Your Enter Password: \");\n $password = $IOAdapterObject->getInput();\n\n $chk = $this->authenicateUserfromModel($username, $password);\n\n if ($chk) {\n echo 'You Are Loged In Successfully' . PHP_EOL;\n $request['controller'] = \"Person\";\n $request['action'] = \"showMainMenu\";\n\n\n $frontControllerObject = FrontController::getInstance();\n $frontControllerObject->direct($request);\n } else {\n $io->makeOutput('Error: Wrong username or Password' . PHP_EOL);\n $this->numberOfWrongAttempts = $this->numberOfWrongAttempts + intval(1);\n if ($this->numberOfWrongAttempts < 3) {\n $io->makeOutput(\" >> Please Enter Your User Name : \");\n }\n $this->loginUserAction($request);\n }\n }", "title": "" }, { "docid": "2509fc481b7ffaf40c3a4b8dc302bf2c", "score": "0.7463464", "text": "public function startAction()\r\n {\r\n if ($this->request->isPost()) {\r\n $email = $this->getPost('username', 'email');\r\n\r\n $lang = $this->getPost('language', null, \"en\");\r\n UserBusiness::getInstance()->setLanguage($lang);\r\n\r\n $password = $this->getPost('password');\r\n $password = md5($password);\r\n\r\n $user = User::findFirst(\"email='{$email}' AND password='{$password}'\");\r\n\r\n if ($user != false) {\r\n $this->_registerSession($user);\r\n $this->jsonReturn(RESPONSE_SUCCESS, \"Login successful\");\r\n }\r\n\r\n $username = $this->getPost('username', 'alphanum');\r\n $user = User::findFirst(\"username='$username' AND password='$password'\");\r\n\r\n if ($user != false) {\r\n $verifyCode = $this->getPost('verify');\r\n $verifyCodeCheck = $this->session->get(\"verify\");\r\n\r\n if($verifyCode != $verifyCodeCheck){\r\n $this->jsonReturn(RESPONSE_ERROR, \"Invalid verify code.\");\r\n }\r\n\r\n $this->_registerSession($user);\r\n $this->jsonReturn(RESPONSE_SUCCESS, \"Login successful\");\r\n }\r\n\r\n $this->jsonReturn(RESPONSE_ERROR, \"Invalid account, check please.\");\r\n }\r\n }", "title": "" }, { "docid": "dc3ff083b78f6db2850668f25d38ecc3", "score": "0.74624217", "text": "function login() {\n if ($_POST) {\n $username = filter_input(INPUT_POST, 'username');\n $password = filter_input(INPUT_POST, 'password');\n\n if (!preg_match('/^[a-z0-9]{4,}$/', $username) or !preg_match('/^.{5,}$/', $password)) {\n $this->set('message', 'Invalid username or password format.');\n return;\n }\n\n $passwordHash = hash('sha512', $password . Configuration::SALT);\n $user = UserModel::getActiveUserByUsernameAndPasswordHash($username, $passwordHash);\n\n if (!$user) {\n $this->set('message', 'Username or password are incorrect or the user is not active.');\n return;\n }\n\n Session::set('user_id', $user->user_id);\n Session::set('username', $username);\n Session::set('user_ip', filter_input(INPUT_SERVER, 'REMOTE_ADDR', FILTER_FLAG_IPV4));\n Session::set('user_agent', filter_input(INPUT_SERVER, 'HTTp_USER_AGENT'));\n\n Misc::redirect('admin/laptop');\n }\n }", "title": "" }, { "docid": "ee5d533c5121cae00f03ff04703d9a52", "score": "0.7460625", "text": "public function login() {\n \n if ($this->request->isPost()) {\n if ($this->Auth->login()) {\n $this->redirect($this->Auth->redirect());\n }\n else {\n $this->Session->setFlash('Tidak bisa melakukan login. Coba lagi.', 'flash_custom');\n }\n }\n }", "title": "" }, { "docid": "91129e4e18c715ced2f18f034a4b90de", "score": "0.7460438", "text": "public function actionLogin()\n {\n $form=new LoginForm;\n // collect user input data\n if(isset($_POST['LoginForm']))\n {\n $form->attributes=$_POST['LoginForm'];\n // validate user input and redirect to previous page if valid\n if($form->validate())\n $this->redirect(Yii :: app()->user->returnUrl);\n }\n // display the login form\n $this->render('login', array('form' => $form));\n }", "title": "" }, { "docid": "ad1cf87b43176a70e5f6d3223e64308c", "score": "0.7460134", "text": "public function actionLogin()\n {\n if (User::getLoggedUser())\n $this->redirect('/');\n\n $this->layout = 'auth';\n\n $cs = Yii::app()->clientScript;\n $cs->registerCssFile('/css/signin.css', 'screen, projection');\n\n $model = new LoginForm();\n\n if (isset($_POST['LoginForm']))\n {\n $model->setAttributes($_POST['LoginForm']);\n\n if ($model->validate() && $model->login())\n {\n $this->redirect('/');\n }\n }\n\n $this->render('login', compact('model'));\n }", "title": "" }, { "docid": "d9cdf1710fcebfa968b45f44e8e90630", "score": "0.7457291", "text": "public function doLogin();", "title": "" }, { "docid": "7ca3ec07ae72d71fc2f4a788c83461d7", "score": "0.74528867", "text": "public function actionLogin() {\n\t\t$model = new LoginForm ();\n\t\t\n\t\t// if it is ajax validation request\n\t\tif (isset ( $_POST ['ajax'] ) && $_POST ['ajax'] === 'login-form') {\n\t\t\techo CActiveForm::validate ( $model );\n\t\t\tYii::app ()->end ();\n\t\t}\n\t\t\n\t\t// collect user input data\n\t\tif (isset ( $_POST ['LoginForm'] )) {\n\t\t\t$model->attributes = $_POST ['LoginForm'];\n\t\t\t// validate user input and redirect to the previous page if valid\n\t\t\tif ($model->validate () && $model->login ())\n\t\t\t\t// $this->redirect(Yii::app()->user->returnUrl);\n\t\t\t\t// $this->render('/usuarios/update/',array('id'=>UsersLogin::getUsuarioDNIByUsersLoginID(Yii::app()->user->id)));\n\t\t\t\t$this->redirect ( '/usuarios/update/' . UsersLogin::getUsuarioDNIByUsersLoginID ( Yii::app ()->user->id ) . '.html' );\n\t\t}\n\t\t// display the login form\n\t\t$this->render ( 'login', array (\n\t\t\t\t'model' => $model \n\t\t) );\n\t}", "title": "" }, { "docid": "9d4ca0855f7aaec8b6f0a2bfbfcde787", "score": "0.74527806", "text": "function login_user()\n {\n $this->check_login();\n $email = $_POST['login-email'];\n $password = $_POST['password'];\n $this->login($email, $password);\n }", "title": "" }, { "docid": "561194fd0a390f32dc34e614b4613686", "score": "0.7452582", "text": "public function p_login() {\n\n\t\t# Make sure none of the fields was left blank\n\t\t# Array of fields\n\t\t$submitted = array('email', 'password');\n\n\t\t# Loop through fields\n\t\t$empty_field = false;\n\t\tforeach($submitted as $field) {\n \t\t\tif (empty($_POST[$field])) {\n \t\t$empty_field = true;\n \t\t\t}\n\t\t}\n\n\t\t# if a fied has been left blank - alert user\n\t\tif ($empty_field) {\n\t\t\tRouter::redirect(\"/users/login\");\n\n\t\t# if all fields have been filled in\n\t\t} else {\n\t\t\t# Sanitize the user entered data\n\t\t\t$_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n\t\t\t# Hash submitted password for comparison with db\n\t\t\t$_POST['password'] = sha1 (PASSWORD_SALT.$_POST['password']);\n\n\t\t\t# Search the db for this email and password\n\t\t\t# Retrieve the token if it is available\n\t\t\t$q = \"\tSELECT token\n\t\t\t\t\tFROM users\n\t\t\t\t\tWHERE email = '\".$_POST['email'].\"'\n\t\t\t\t\tAND password = '\".$_POST['password'].\"'\";\n\n\t\t\t$token = DB::instance(DB_NAME)->select_field($q);\n\n\t\t\t# No matching token -> login failed -> return to login page\n\t\t\tif(!$token) {\n\n\t\t\t\tRouter::redirect(\"/users/login/error\");\n\n\t\t\t# Matching token -> login succeeded\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t# Store this token in a cookie\n\t\t\t\tsetcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n\n\t\t\t\t# Send to the main page\n\t\t\t\tRouter::redirect(\"/\");\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "7106814f15aa9724dbda1d8fb58a07df", "score": "0.7450961", "text": "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n $model->password = '';\n\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "7106814f15aa9724dbda1d8fb58a07df", "score": "0.7450961", "text": "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n $model->password = '';\n\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "7106814f15aa9724dbda1d8fb58a07df", "score": "0.7450961", "text": "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n $model->password = '';\n\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "7106814f15aa9724dbda1d8fb58a07df", "score": "0.7450961", "text": "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n $model->password = '';\n\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "7106814f15aa9724dbda1d8fb58a07df", "score": "0.7450961", "text": "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n $model->password = '';\n\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "7106814f15aa9724dbda1d8fb58a07df", "score": "0.7450961", "text": "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n $model->password = '';\n\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "7106814f15aa9724dbda1d8fb58a07df", "score": "0.7450961", "text": "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n $model->password = '';\n\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "7106814f15aa9724dbda1d8fb58a07df", "score": "0.7450961", "text": "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n $model->password = '';\n\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "6821b90ac223fa413fa8aced19cb3cdf", "score": "0.745018", "text": "public function actionLogin()\n {\n if (! Yii::$app->getUser()->getIsGuest()) {\n //return $this->goHome();\n return Yii::$app->getResponse()->redirect(Yii::$app->getHomeUrl());\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->getRequest()->post()) && $model->login()) {\n return $this->goBack();\n } else {\n yii::$app->getUser()->setReturnUrl(yii::$app->getRequest()->getHeaders()->get('referer'));\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "89580ba1fd31ba82fdaa26779cb991ea", "score": "0.7448727", "text": "public function p_login() {\n\n\t\t# Sanitize the user entered data to prevent any funny-business (re: SQL Injection Attacks)\n\t\t$_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n\t\t# Hash submitted password so we can compare it against one in the db\n\t\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n\t\t# Search the db for this email and password\n\t\t# Retrieve the token if it's available\n\t\t$q = \"SELECT token \n\t\t\t\tFROM users \n\t\t\t\tWHERE email = '\".$_POST['email'].\"' \n\t\t\t\tAND password = '\".$_POST['password'].\"'\";\n\n\t\t$token = DB::instance(DB_NAME)->select_field($q);\n\n\t\t# If we didn't find a matching token in the database, it means login failed\n\t\tif(!$token) {\n\n\t\t\t# Send them back to the login page with error\n\t\t\tRouter::redirect(\"/users/login/error\"); \n\n\t\t# But if we did, login succeeded! \n\t\t} else {\n\n\t\t\t\t/* \n\t\t\t\tStore this token in a cookie using setcookie()\n\t\t\t\tImportant Note: *Nothing* else can echo to the page before setcookie is called\n\t\t\t\tNot even one single white space.\n\t\t\t\tparam 1 = name of the cookie\n\t\t\t\tparam 2 = the value of the cookie\n\t\t\t\tparam 3 = when to expire\n\t\t\t\tparam 4 = the path of the cooke (a single forward slash sets it for the entire domain)\n\t\t\t\t*/\n\t\t\t\tsetcookie(\"token\", $token, strtotime('+1 year'), '/');\n\n\t\t\t\t# Redirect to the user's profile page \n\t\t\t\tRouter::redirect('/users/profile');\n\t\t}\n\t}", "title": "" }, { "docid": "bfaea0b98f8fcfe047e3976851036c42", "score": "0.7448241", "text": "public function loginAction()\n\t{\n\t\tif ($this->getRequest()->attributes->has(SecurityContext::AUTHENTICATION_ERROR))\n\t\t{\n\t\t\t$error = $this->getRequest()->attributes->get(SecurityContext::AUTHENTICATION_ERROR);\n\t\t} \n\t\telse \n\t\t{\n\t\t\t$error = $this->getRequest()->getSession()->get(SecurityContext::AUTHENTICATION_ERROR);\n\t\t}\n\n\t\treturn $this->render('UserBundle:Security:login.html.twig', array(\n 'last_username' => $this->getRequest()->getSession()->get(SecurityContext::LAST_USERNAME),\n 'error' => $error,\n\t\t));\n\t}", "title": "" }, { "docid": "f73bfadbc05bb477133646f5fc50e969", "score": "0.74477184", "text": "public function actionLogin() {\n if (!\\Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "7cb10def5abd9e40fc3cb73430e09081", "score": "0.7445147", "text": "public function loginAction()\n {\n $post = $this->getRequest()->getPost();\n if (!$post->get('remember_me')) {\n $post->set('remember_me', '0');\n }\n\n return parent::loginAction();\n }", "title": "" }, { "docid": "8e5a3cada2d509564363698932bd31e1", "score": "0.74405926", "text": "public function login()\n {\n \n }", "title": "" }, { "docid": "d0d988219065b3b2530be28ea0a0bccf", "score": "0.7434569", "text": "public function actionLogin()\n\t{\n\t\t$model = new Users('authenticate');\n\t\t// if it is ajax validation request\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='login-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t\tif(isset($_POST['Users']))\n {\n\t\t\t$model->attributes=$_POST['Users'];\n\t\t\t// validate user input and redirect to the previous page if valid\n\t\t\tif($model->validate())\n\t\t\t\t$this->redirect(Yii::app()->user->returnUrl);\n\t\t}\n\t\t// display the login form\n\t\t$this->render('login',array('model'=>$model));\n\t}", "title": "" }, { "docid": "3eede07733112cfe6ca5c56e9494dcdc", "score": "0.7432549", "text": "public function login() {\n\t\tif($this->Session->check('Auth.User')){\n\t\t\treturn $this->redirect(array('action' => 'dashboard'));\t\t\n\t\t}\n\t\t\n\t\t// if we get the post information, try to authenticate\n\t\tif ($this->request->is('post')) {\n\t\t\tif ($this->Auth->login()) {\n\t\t\t\n\t\t\t\t$status = $this->Auth->user('status');\n\t\t\t\tif($status != 0){\n\t\t\t\t\t$this->Session->setFlash(__('Welcome, '. $this->Auth->user('username')));\n\t\t\t\t\treturn $this->redirect($this->Auth->redirectUrl());\n\t\t\t\t}else{\n\t\t\t\t\t// this is a deleted user\n\t\t\t\t\t$this->Auth->logout();\n\t\t\t\t\t$this->Session->setFlash(__('Invalid username or password - This user appears to be deleted...'));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Invalid username or password'));\n\t\t\t}\n\t\t} \n\t}", "title": "" } ]
5d30c80b22e2fdbf956c58bb2c3a95d6
Return the runtime path of application
[ { "docid": "c1e3ee216cef511f2b4b06b4d81550b6", "score": "0.86528265", "text": "public function getRuntimePath()\n\t{\n\t\treturn APP_PATH.$this->runtimePath;\n\t}", "title": "" } ]
[ { "docid": "7af95c46d99271c7ab001429449bf41a", "score": "0.832795", "text": "public function runtimePath()\n {\n return Config::get('PATH_RUNTIME', $this->basePath . DIRECTORY_SEPARATOR . 'runtime');\n }", "title": "" }, { "docid": "7c2039e85332c031c7fea80aa3dfd10d", "score": "0.7651732", "text": "public function getAppPath();", "title": "" }, { "docid": "c12ce7c3f58979b7399f434b54c83d7d", "score": "0.75492465", "text": "public function getAppPath()\n {\n return $this->_args['appPath'];\n }", "title": "" }, { "docid": "7ba373d30a05c384f45352d2207de193", "score": "0.74668074", "text": "public abstract function getExecutablePath();", "title": "" }, { "docid": "78041917e9daa5d9f477270965df2176", "score": "0.7397764", "text": "public static function appPath() \n {\n return self::$appPath;\n }", "title": "" }, { "docid": "dada36b9197fb21a2b626abab166dbe6", "score": "0.7345556", "text": "public static function getAppPath(): string\n {\n return static::$path . 'app/';\n }", "title": "" }, { "docid": "de00c06e1afb9b98b89dd37c26ae0e1e", "score": "0.73379487", "text": "public function appPath();", "title": "" }, { "docid": "2048590ff502e8042259b4fcfc77cda1", "score": "0.7290587", "text": "public static function getAppPath() {\n return self::getRootPath().\"app\".self::SEPARATOR;\n }", "title": "" }, { "docid": "82c8a662920603a123e8a14a4f2fdfc1", "score": "0.7272516", "text": "public static function getAppPath() {\n return self::getRootPath().\"app\".self::PATH_SEPARATOR;\n }", "title": "" }, { "docid": "dabce658406088391d2fedfe4d27e73e", "score": "0.72029823", "text": "public static function getApplicationPath()\n\t{\n\t\treturn self::$_applicationPath;\n\t}", "title": "" }, { "docid": "58d2784164de081f93c9dd443926add8", "score": "0.71445686", "text": "public function getAppPath(): string\n {\n return $this->appPath;\n }", "title": "" }, { "docid": "2da3b74fc3ddcf75dea051ec375d5807", "score": "0.71353275", "text": "public function getPathApp()\n {\n return $this->_path_app;\n }", "title": "" }, { "docid": "375098afceab68957a62c2f61acb3c3f", "score": "0.70631707", "text": "public function appPath()\n {\n return Config::get('PATH_APPS', $this->basePath . DIRECTORY_SEPARATOR . 'app');\n }", "title": "" }, { "docid": "ac5d246f345ba2123535f2ceeef37ee1", "score": "0.69885826", "text": "public function getAppPath()\n {\n return $this->appPath;\n }", "title": "" }, { "docid": "952513f0c54502bd898811d37dd1b8a4", "score": "0.6786447", "text": "public function getAppPath(string $path = ''): string;", "title": "" }, { "docid": "b84b0a4189320f8c2da78f4221f5da4f", "score": "0.6734873", "text": "protected function getAppBasePath()\n {\n $path = dirname($_SERVER['SCRIPT_FILENAME']);\n\n return (is_link($path)) ? dirname(readlink($path)) : dirname($path);\n }", "title": "" }, { "docid": "b84b0a4189320f8c2da78f4221f5da4f", "score": "0.6734873", "text": "protected function getAppBasePath()\n {\n $path = dirname($_SERVER['SCRIPT_FILENAME']);\n\n return (is_link($path)) ? dirname(readlink($path)) : dirname($path);\n }", "title": "" }, { "docid": "7dd8ddf69f64583c00f984b0d723ef57", "score": "0.6641183", "text": "public function path()\n {\n return $this->basePath . DIRECTORY_SEPARATOR . 'app';\n }", "title": "" }, { "docid": "c8110b4d8bbf863d71baec4b7d7066b4", "score": "0.66085017", "text": "public function getAppDir(): string\n {\n return $this->appDir;\n }", "title": "" }, { "docid": "be47325b61ddbfeaaa2de1f7b607c873", "score": "0.65843815", "text": "protected function getAppSamplePath()\n {\n return realpath(__DIR__ . '/../../stubs/app');\n }", "title": "" }, { "docid": "370d1262580663ca472caf9d6c2c1798", "score": "0.65818757", "text": "protected function getSrcPath()\n {\n return $this->getApplication()->getConsolePath();\n }", "title": "" }, { "docid": "78ed374a41ab2feabf0ea5b40171c7a7", "score": "0.65348214", "text": "protected function getAppFile()\n\t{\n\t\treturn $this->container->parameters['wwwDir'] . '/_index.php';\n\t}", "title": "" }, { "docid": "13bbbd9a25bf4839e097c709d8e03a49", "score": "0.65036625", "text": "public function getAppPath(): ?string\n {\n if (!$this->appPath) {\n // Current project\n if ($this->name === BBN_APP_NAME) {\n $this->appPath = bbn\\Mvc::getAppPath();\n } else {\n $envs = $this->options->fullOptions('env', $this->id);\n if (empty($envs)) {\n throw new \\Exception(X::_(\"Impossible to find environments for option %s\", $this->id));\n }\n\n if ($env = X::getRow($envs, ['type' => BBN_ENV])) {\n $this->appPath = $env['text'];\n if (substr($this->appPath, -4) !== 'src/') {\n $this->appPath .= 'src/';\n }\n }\n }\n }\n\n return $this->appPath;\n }", "title": "" }, { "docid": "b61684b52b3b056b8240da166afee776", "score": "0.6495729", "text": "public function appPath()\n {\n $pathComponents = array(\n $this->documentRoot,\n APP_DIR,\n );\n\n return implode($pathComponents, '/');\n }", "title": "" }, { "docid": "3bd61d251cd763863aa9282bdc8b504d", "score": "0.6457686", "text": "function app_path($path = '') {\n\treturn APPROOT.'/'.$path;\n}", "title": "" }, { "docid": "fa71e4130912168032de642032b3888e", "score": "0.63797027", "text": "public function getWebappPath()\n {\n return $this->webappPath;\n }", "title": "" }, { "docid": "fa71e4130912168032de642032b3888e", "score": "0.63797027", "text": "public function getWebappPath()\n {\n return $this->webappPath;\n }", "title": "" }, { "docid": "0c499656c1af9bda82677ab2acb87d53", "score": "0.6353615", "text": "public function appDir();", "title": "" }, { "docid": "26bd3adaa6964c9bdbbfdbac60fda9c1", "score": "0.6308961", "text": "public function getApplicationDirectory();", "title": "" }, { "docid": "784151b89b549c33e6ebe84db1e674bd", "score": "0.62969464", "text": "public function resourceExecPath(): string\n {\n return \"{$this->getApiPathPrefix()}/\".static::getPlural().\"/{$this->getIdentifier()}/exec\";\n }", "title": "" }, { "docid": "ab007d6a52eddc1bb46e73a798ed6b41", "score": "0.6252885", "text": "function path() {\n return app()->path;\n }", "title": "" }, { "docid": "5fa44354621e5c6257da17ba576d4ed6", "score": "0.623871", "text": "public function getEnvironmentPath(): string;", "title": "" }, { "docid": "9056b520dc6b3fedb9e37d7607ddf86e", "score": "0.62348104", "text": "public static function getAppDirectory()\n\t{\n\t\treturn self::$_appDir;\n\t}", "title": "" }, { "docid": "513c656e211c5b213675cc60adf5ffee", "score": "0.616546", "text": "public function getExecutable(): string\n {\n return $this->executable;\n }", "title": "" }, { "docid": "e2db57cd52d5069876b145ee2da9ce2e", "score": "0.6139811", "text": "function app_path($path = '')\n {\n return app('path').($path ? DIRECTORY_SEPARATOR.$path : $path);\n }", "title": "" }, { "docid": "9334d6aa55acf19a8efafb7e2f799d19", "score": "0.6136871", "text": "public function getBasePath()\n {\n return $this->_appInfo['basePath'];\n }", "title": "" }, { "docid": "4e22e87f99d78d3b7ccb9e3e7d1add37", "score": "0.61243254", "text": "public static function path(){\n return \\Illuminate\\Foundation\\Application::path();\n }", "title": "" }, { "docid": "a655d087454c28cd016eab6c6d40541f", "score": "0.61060077", "text": "public static function getApplicationPath(string $append = null): string\n {\n if ($append === null) {\n return static::$applicationPath;\n } else {\n return str_replace(DS . DS, DS, static::$applicationPath . $append);\n }\n }", "title": "" }, { "docid": "0f1834dc28197e0c3e52b059e33e2f08", "score": "0.6102125", "text": "public function getAppPath($path = null)\n {\n return ltrim(str_replace($this->manager->getBasePath(), '', $this->getPath($path)), DIRECTORY_SEPARATOR);\n }", "title": "" }, { "docid": "39d5757a999d196e7d945b4bfa21062d", "score": "0.6087598", "text": "public static function environmentPath()\n {\n /** @var \\Illuminate\\Foundation\\Application $instance */\n return $instance->environmentPath();\n }", "title": "" }, { "docid": "2b9843c7a62e668637fc83dca76ef237", "score": "0.608635", "text": "public function getPath()\n\t{\n\t\treturn $this->app->make('path.config') . '/' . trim($this->package->getName(), '/\\\\');\n\t}", "title": "" }, { "docid": "ba115fa54478670fb437b9ea7b7fd9fe", "score": "0.6085561", "text": "protected function determinePackagePath(): string\n {\n return dirname(__DIR__, 2);\n }", "title": "" }, { "docid": "c01e441182a830b896f2252ae71b89ac", "score": "0.60835415", "text": "public function autodetect_application_root() {\n\t\t$config_file_location = dirname(__FILE__);\n\t\t$config_file_relative = \"config\"; //you shouldn't need to change this\n\t\treturn substr($config_file_location, 0, strlen($config_file_location) - strlen($config_file_relative));\n\t}", "title": "" }, { "docid": "53d128da3d2f6798a2c5c98f5278e87f", "score": "0.6076912", "text": "abstract protected function getBuildPath(): string;", "title": "" }, { "docid": "1877dd99061c30b64aca7ccb1425dd6d", "score": "0.6074184", "text": "public static function path()\n {\n return \\Laravel\\Lumen\\Application::path();\n }", "title": "" }, { "docid": "ebdad5b912b9f1f6c01e5433995a71cf", "score": "0.6069448", "text": "function getCurrentApp():string{\n return \\SKYCore\\Load::getLoadedStatic('Routing')['object']->application;\n}", "title": "" }, { "docid": "2f886165aeb8b1860501ad4b87eaf26c", "score": "0.6049634", "text": "public function getInstallPath();", "title": "" }, { "docid": "2f886165aeb8b1860501ad4b87eaf26c", "score": "0.6049634", "text": "public function getInstallPath();", "title": "" }, { "docid": "146dc84ca1b79bc59694ad8cdc906a0c", "score": "0.60326046", "text": "public function basepath()\n\t{\n\t\tstatic $base;\n\n\t\tif (!$base)\n\t\t{\n\t\t\t$base = PATH_APP . DS . trim(Component::params('com_resources')->get('webpath', '/site/resources'), '/');\n\t\t}\n\n\t\treturn $base;\n\t}", "title": "" }, { "docid": "dc46d33bb64c774e072f4e2bbdaf7eeb", "score": "0.6020492", "text": "public function getAppEtcModulePath() \n\t{\n\n\t\t// path to module config.xml\n\t\t$app_etc_module_path = parent::$magento_dir . \n\t\t\t\t\t\t\t '/app/etc/modules/' . \n\t\t\t\t\t\t\t parent::$extension_full_name . '.xml';\n\n\t\tif (!file_exists($app_etc_module_path)) {\n\t\t\t$this->displayError('Cant find path to app etc module.');\n\t\t}\n\n\t\tparent::$app_etc_module_path = $app_etc_module_path;\n\t\treturn $app_etc_module_path;\n\t\t\n\t}", "title": "" }, { "docid": "0ccb6010983802967ce14dfce99b9d34", "score": "0.601836", "text": "public static function applicationBasePath()\n {\n return realpath(__DIR__ . '/../LaravelApp');\n }", "title": "" }, { "docid": "678a72f0b2749ffdf8d154d9b66d4b85", "score": "0.5991428", "text": "public final function getApplicationBaseDir()\r\n\t{\r\n\t\treturn $this->m_basedir;\r\n\t}", "title": "" }, { "docid": "0147f9fc1363a640186e16ff00849c0e", "score": "0.5981799", "text": "protected function getAppRootDir(): string\n {\n return rtrim($this\n ->getApplication()\n ->getRootDir(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;\n }", "title": "" }, { "docid": "944ffc5769d00d47c1575c6aa3d3557f", "score": "0.5981763", "text": "protected function getFilePath()\n {\n return $this->appdir . Lang::get(). $this->extension;\n }", "title": "" }, { "docid": "32e9b8222768c66210eb0caa3eb76ba7", "score": "0.5975954", "text": "function app_path() {\n return app()->path->resolve(...func_get_args());\n }", "title": "" }, { "docid": "6c305fa51419c335947a478f22b342d6", "score": "0.59630424", "text": "function app_path($path = '')\n{\n return app('path').($path ? DIRECTORY_SEPARATOR.$path : $path);\n}", "title": "" }, { "docid": "520044ae423c5ff12235f5b85f06e867", "score": "0.5946344", "text": "protected function getSrcPath()\n {\n return $this->getApplication()->getSrcPath();\n }", "title": "" }, { "docid": "63823e9494f7e00e63b79e915333fb96", "score": "0.5922909", "text": "public function environmentPath(): string;", "title": "" }, { "docid": "75fbd1bcb9b14e5be4139af6b9d31868", "score": "0.592149", "text": "final static function baseDir(): string\n {\n return str_replace('App' . self::DS . 'System', '', self::BASE_DIR);\n }", "title": "" }, { "docid": "1dcf0b8c5e85e2185a1943e2d52e8139", "score": "0.5919609", "text": "public function getEnvironmentFilePath(): string;", "title": "" }, { "docid": "ba639305126668e43d02e9ee567cffc6", "score": "0.5914627", "text": "public function appPath(bool $raw = false): ?string\n {\n if (isset($this->_current['app_path'])) {\n return $this->_current['app_path'].($raw ? '' : 'src/');\n }\n\n return null;\n }", "title": "" }, { "docid": "17a71665c8f59a8f994c6cb399d6fa39", "score": "0.5913", "text": "protected static function getManifestPath()\n {\n return sprintf(\n \"%s/themes/%s/%s/%s\",\n BASE_PATH,\n Config::inst()->get('SSViewer', 'theme'),\n Config::inst()->get('Webpack', 'build'),\n Config::inst()->get('Webpack', 'manifest')\n );\n }", "title": "" }, { "docid": "273701d16cd760b6efe8a752752f8771", "score": "0.5912303", "text": "public function app_path($path = null)\r\n {\r\n return empty($path) ? $this->base_path() . DIRECTORY_SEPARATOR . 'app' : $this->base_path() . 'app' . $path;\r\n }", "title": "" }, { "docid": "61209fa12c458f5a1ef87b61b7f4a7fe", "score": "0.59053457", "text": "protected function getBootstrapPath(): string\n {\n return $this->laravel->bootstrapPath().'/app.php';\n }", "title": "" }, { "docid": "2a3fa084b4d2a3222882f4fe91faa71f", "score": "0.58946294", "text": "function ws_app_path($path = '')\n {\n return ws_app()->path($path);\n }", "title": "" }, { "docid": "14d8a5727b755fd7746454e3fa9a8351", "score": "0.58700716", "text": "public static function get_framework_path()\n {\n $bootstrap = getenv('CLEAROS_BOOTSTRAP');\n\n if (!empty($bootstrap)) {\n $framework_path = preg_replace('/shared$/', '', $bootstrap);\n return $framework_path;\n }\n\n $version_paths = array('trunk', '');\n\n foreach ($version_paths as $version_path) {\n if (file_exists(Config::$framework_path . \"/$version_path/shared/globals.php\")) {\n return Config::$framework_path . \"/$version_path\";\n }\n }\n }", "title": "" }, { "docid": "37f7a0827603d0575c7aa4ee454caba3", "score": "0.58622605", "text": "public static function getPath(): string\n\t{\n\t\treturn '/bitrix/mobileapp/immobile/';\n\t}", "title": "" }, { "docid": "90cbce94493b0954b67543f2f919fa90", "score": "0.5848456", "text": "public function getFilePath()\n {\n return CONSOLE_BASE_DIR . '/' . self::CONFIGURATION_FILE;\n }", "title": "" }, { "docid": "a00e6f50c27bdabf398e3da79c1f4828", "score": "0.58343756", "text": "function bframework_get_app_name(){\n static $BframeworkAppName;\n\tif (!isset($BframeworkAppName)) {\n\tif(is_file(bframework_get_approot_path().\"application.php\")){\n\t\t\tif (!include(bframework_get_approot_path().\"application.php\")) {\n\t\t\t\treturn false;\n\t\t\t}\n\t}\t\t\n\t\t}\n\treturn $BframeworkAppName;\n}", "title": "" }, { "docid": "f5bad06d033c2cb8c2f8d6daa8861147", "score": "0.58323133", "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": "836229a91f87bc6378271f26ce3d8769", "score": "0.5832009", "text": "public function getRootDir()\n {\n return $this->getAppRootDir() . '/app';\n }", "title": "" }, { "docid": "643b3260c18b07ad1125e8d304385cf2", "score": "0.5824512", "text": "public function environmentPath()\n {\n return $this->environmentPath ?: $this->environmentPathGeneric();\n }", "title": "" }, { "docid": "6dc160deacd5c6ddd65996a06a8b70b8", "score": "0.5822086", "text": "public static function environmentFilePath()\n {\n /** @var \\Illuminate\\Foundation\\Application $instance */\n return $instance->environmentFilePath();\n }", "title": "" }, { "docid": "9c884a9dd417d0605cf1d7a9fb6f5e79", "score": "0.58192885", "text": "public function getRuntime()\n {\n return $this->runtime;\n }", "title": "" }, { "docid": "9c884a9dd417d0605cf1d7a9fb6f5e79", "score": "0.58192885", "text": "public function getRuntime()\n {\n return $this->runtime;\n }", "title": "" }, { "docid": "1fd5e0ac77ef51eca3cb902c3ff8d5b1", "score": "0.5818225", "text": "function system_dir(){\n return dirname(dirname(__FILE__));\n }", "title": "" }, { "docid": "1fd9f35efc930e692a23570e6a159e9f", "score": "0.58106834", "text": "protected function getApp()\n {\n return $this->getCore()->getApp();\n }", "title": "" }, { "docid": "d6f9aad8a6baab16ad3d9e8b7a330340", "score": "0.5804848", "text": "function getAppFolder()\n\t{\n\t $protocol = empty($_SERVER['HTTPS']) ? 'http' : 'https';\n\t $port = $_SERVER['SERVER_PORT'];\n\t $disp_port = ($protocol == 'http' && $port == 80 || $protocol == 'https' && $port == 443) ? '' : \":$port\";\n\t $domain = $_SERVER['SERVER_NAME'];\n\t \n\t return \"${protocol}://${domain}${disp_port}\" . \"/snfss/\";\n\t}", "title": "" }, { "docid": "1388b8992678b12e7a1a6d8431231e0a", "score": "0.58019334", "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": "6426a0aa6b43b42b69e91a8ad5a9a8a3", "score": "0.579998", "text": "function BasePath() {\n return getenv('BASE_PATH');\n }", "title": "" }, { "docid": "d838a9743d9a906d9fa94cbb201c85d1", "score": "0.57993674", "text": "public function appUrl(): string\n {\n if (!isset($this->appUrl)) {\n $appUrl = $this->getSchemeAndHttpHost() . $this->getBaseUrl();\n // Find out the script filename\n $scriptFileName = preg_quote(pathinfo($this->getScriptName(), PATHINFO_BASENAME));\n // Ensure the URL does not contain the script filename\n $this->appUrl = preg_replace(\"/$scriptFileName$/\", \"\", $appUrl);\n }\n\n return $this->appUrl;\n }", "title": "" }, { "docid": "0b2329550acc3b8057392cf898ca04ee", "score": "0.5791279", "text": "protected function getSymbolicPath(string $path): string\n {\n $appDir = $this->getContextVar(\"container\")->getApplicationDir();\n $p = explode($appDir, $path, 2);\n if (2 === count($p)) {\n return '[app]' . array_pop($p);\n }\n return $path;\n }", "title": "" }, { "docid": "ed22b8e960ef7f790314b49bca4ba7e4", "score": "0.5786693", "text": "public static function get_path() {\n\t\treturn dirname( __DIR__ );\n\t}", "title": "" }, { "docid": "e98292a48259e6eaf7c7c510e6750ecd", "score": "0.57853925", "text": "public function getManifestPath() {\n\t\treturn $this->manifestPath;\n\t}", "title": "" }, { "docid": "a81814fadf3735630af576da2c91eba0", "score": "0.5784818", "text": "protected function getAppComposer(): string\n {\n return ((new Filesystem())->closest($this->path(), 'composer.json')) ?? $this->basePath('composer.json');\n }", "title": "" }, { "docid": "b59848f903e37025d99c17c597a5bd63", "score": "0.57805693", "text": "public static function getAppPath($file){\n\t\treturn str_replace(sprintf('lib%sFrontController.php', DIRECTORY_SEPARATOR), $file, __FILE__);\n\t}", "title": "" }, { "docid": "efc0e34220b705a947f73e4e24d1cdef", "score": "0.57772696", "text": "public static function get_app_base($app)\n {\n // Logger::profile here is too verbose, so skip it\n\n $version_paths = array('trunk', '');\n\n foreach (Config::get_apps_paths() as $path) {\n foreach ($version_paths as $version_path) {\n $base = $path . '/' . $app . '/' . $version_path;\n\n if (is_dir(\"$base/deploy\"))\n return $base;\n }\n }\n }", "title": "" }, { "docid": "af8390f64ccccf54b6f494a113c93a63", "score": "0.5776949", "text": "protected function getAppRoots() {\n\t\treturn \\OC::$APPSROOTS;\n\t}", "title": "" }, { "docid": "457ecac8051a67ddd274fa060de6a80d", "score": "0.5775101", "text": "protected function getPackagePath()\n {\n return realpath(__DIR__.'/../');\n }", "title": "" }, { "docid": "589f7a86c0046a6ec32083d8afdcafb8", "score": "0.57684165", "text": "protected function getWpCliBootFilePath()\n {\n return $this->getWpCliRootDir('/php/boot-fs.php');\n }", "title": "" }, { "docid": "8678ffb7cb447b3880a54ba51b683171", "score": "0.57660925", "text": "function test_app_path($path = '')\n {\n return rakshak_root('base/app').($path ? DIRECTORY_SEPARATOR.$path : $path);\n }", "title": "" }, { "docid": "4001a3aba1e83a1ddea05a6c43cb3226", "score": "0.5753252", "text": "private function getExtPath()\n {\n return ExtensionManagementUtility::extPath($this->extension);\n }", "title": "" }, { "docid": "9c2cd1ff4f32df8b5467c9752a0deb09", "score": "0.5749381", "text": "public static function getLiveTemplatePath() {\n return CFG::$livePath . \"/\" . CFG::$templates . \"/\" . APP::$appType;\n }", "title": "" }, { "docid": "325f11913947cfec049557eb5eabf057", "score": "0.5747997", "text": "public static function getFrameworkBasePath(): string\n {\n return self::getPublicPath() . '/typo3/sysext';\n }", "title": "" }, { "docid": "1761ad33be78f4b9e6ad87887433fbdc", "score": "0.5745432", "text": "function getApplication() {\n return $this->step->application;\n }", "title": "" }, { "docid": "01fa299a6a97496c0d2bcb12386e6d64", "score": "0.57388186", "text": "protected function getRootDir()\n {\n return $this->app['root.dir'];\n }", "title": "" }, { "docid": "bd41703f36939f1fc9e638d38fe17239", "score": "0.57272196", "text": "public static function environmentPath(){\n return \\Illuminate\\Foundation\\Application::environmentPath();\n }", "title": "" }, { "docid": "f9fedee7f97c4907bcfa0d8fc92a71cf", "score": "0.5723505", "text": "public function getAppPath($appId) {\n\t\tif (\\trim($appId) === '') {\n\t\t\treturn false;\n\t\t}\n\t\tif (($appRoot = $this->findAppInDirectories($appId)) !== false) {\n\t\t\treturn $appRoot['path'];\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "39a9b8a0c11d315ef96f1bba336ad2aa", "score": "0.5722297", "text": "protected static function guessApplicationRoot() {\n // Determine the application root by:\n // - Removing the namespace directories from the path.\n // - Getting the path to the directory two levels up from the path\n // determined in the previous step.\n return dirname(substr(__DIR__, 0, -strlen(__NAMESPACE__)), 2);\n }", "title": "" }, { "docid": "437b9495fdd745ae0b513c59ac0e0d25", "score": "0.5720146", "text": "public function getConfigPath(): string\n {\n return $this->appPath . \\DIRECTORY_SEPARATOR . 'Config';\n }", "title": "" } ]
88784395b51f1acf3b7539a962b8ecd6
helper function for querying Google books search. Returns the full array of results from Google books search Precondition: user has entered some search value. Otherwise, we just return empty result
[ { "docid": "5fc0ce6688e9b4b8884c7d2f21820463", "score": "0.78930736", "text": "function query_google($search_val) {\r\n App::import('HttpSocket');\r\n App::import('Xml');\r\n $http = new HttpSocket();\r\n $url = 'http://books.google.com/books/feeds/volumes';\r\n $results = & new Xml($http->get($url, $search_val));\r\n $results = Set::reverse($results);\r\n\r\n $google_results = array();\r\n\r\n if ($results['Feed']['totalResults'] > 0) {\r\n $google_results = $results['Feed']['Entry'];\r\n }\r\n\r\n return $google_results;\r\n }", "title": "" } ]
[ { "docid": "8f0a18ef2fe340c504a719470f2e3ae1", "score": "0.6695019", "text": "public function search()\n {\n $res = (new GoogleAdapter)->gcseSearch(\"Baby Groot Flowerpot\");\n \n echo $res->getBody();\n }", "title": "" }, { "docid": "915dcbb51945f45ca88224570e0296fc", "score": "0.6312261", "text": "function doSearch($searchText){\r\n \t\r\n \t// first search by any chance complete text is there.\r\n \t//$qry = \"call google(\\\"\".$searchText.\"\\\",1,1)\";\r\n \t$qry = \"call google('\".$searchText.\"','1','1')\";\r\n \techo \"SP Call for the Search \".$qry;\r\n \t$allRes = executeSP($qry);\r\n\treturn $allRes; \t\r\n\r\n }", "title": "" }, { "docid": "a11b1fa7ebb9a49aaa537b698f860458", "score": "0.62905836", "text": "private function getSearchTerms()\r\n { \r\n \r\n \r\n $searchTerms = explode(' ', $this->params['url']['search']);\r\n $searchTermBits = array();\r\n foreach ($searchTerms as $term) {\r\n $term = trim($term);\r\n if (!empty($term)) {\r\n $searchTermBits[] = \"bucketname LIKE '%$term%'\";\r\n }\r\n }\r\n\r\n\r\n\r\n $result = mysql_query(\"SELECT * FROM buckets WHERE \".implode(' AND ', $searchTermBits));\r\n \r\n }", "title": "" }, { "docid": "975cb2e3ff1dfe74ba3d06510a37c070", "score": "0.6288063", "text": "function clients_email_getSearchQuery($ctlData,$data) {\n\tif($ctlData['SEARCHABLE'] != 'no' && !empty($data['value'])) {\n\t\t$identifier = strtolower($ctlData['IDENTIFIER']);\n\n\t\t## the A part\t\n\t\t$query_A = '';\n\t\t\n\t\t## the B part\n\t\t$query_B = '';\n\n\t\t## the C part\n\t\t$search_value = $data['value'];\n\t\t\n\t\tif(empty($search_value)) {\n\t\t\t## than the user is searching for a empty value\n\t\t\t$query_C = \" AND \".DB_PREFIX.$GLOBALS['_MODULE_DATAOBJECTS_DBPREFIX'].\".\".$identifier.\" = ''\";\n\t\t} else {\n\t\t\t$query_C = ' AND '.DB_PREFIX.$GLOBALS['_MODULE_DATAOBJECTS_DBPREFIX'].'.'.$identifier.' like'.\"'%\".$search_value.\"%'\";\n\t\t}\n\t\t\n\t\treturn array('partA'=>$query_A,'partB'=>$query_B,'partC'=>$query_C);\n\t}\n}", "title": "" }, { "docid": "d4625c47817dce7ccb6bde7af86ac46c", "score": "0.616367", "text": "public function actionSearch()\n {\n // getting arrguments from get request\n $request_data = Yii::$app->request->get();\n if(isset($request_data['s']) && $request_data['s']!=\"\"){\n $search=$request_data['s'];\n }else{\n $search=\"maecenas\";\n }\n if(isset($request_data['p']) && $request_data['p']!=\"\"){\n $page=$request_data['p'];\n }else{\n $page=1;\n }\n\n // calling the google componet to fetch data from DB\n $data=Yii::$app->search->google($search, $page);\n\n // returning response\n \\Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n return [\n 'data' => $data,\n 'code' => 100,\n ];\n }", "title": "" }, { "docid": "d58f1610c55182da1a3e277259ba3518", "score": "0.6114699", "text": "public function search()\n\t{\n\t\t$term = $this->input->post('search');\n\t\t//$term = $_GET['search']; \n\t\t$sql = 'SELECT * FROM books WHERE\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t title LIKE \"%'.$term.'%\"\n\t\t\t\t\t\t\t\t\t OR isbn LIKE \"%'.$term.'%\"\n\t\t\t\t\t\t\t\t\t OR author LIKE \"%'.$term.'%\"\n\t\t\t\t\t\t\t\t\t)'; \n\n\t\t$query = $this->db->query($sql); \n\n\t\tif($query->num_rows() > 0)\n\t\t{\n\t\t\techo json_encode($query->result()); \n\t\t}\n\t\telse\n\t\t{\n\t\t\techo json_encode('false'); \n\t\t}\n\t}", "title": "" }, { "docid": "684c8e9e86bab97a39b49bf9b854f65b", "score": "0.61119545", "text": "public function search()\n {\n $results = array();\n $searchStr = \"%\" . Input::get('search_text') . \"%\";\n $books = Book::where('title', 'LIKE', $searchStr)\n ->orWhere('isbn', 'LIKE', $searchStr)->get();\n\n $courses = Course::where('course_name', 'LIKE', $searchStr)\n ->orWhere('instructor', 'LIKE', $searchStr)->get();\n\n if (!($courses->isEmpty()) && $books->isEmpty()) {\n foreach ($courses as $course) {\n\n $book = Book::where('book_id', '=', $course->book_id)->first();\n $results[] = array(\n\n 'isbn' => $book->isbn,\n 'title' => $book->title,\n 'author' => $book->author,\n 'imagePath' => $book->imagePath,\n 'course_name' => $course->course_name,\n 'instructor' => $course->instructor\n\n );\n }\n } else if (!($books->isEmpty()) && $courses->isEmpty()) {\n\n foreach ($books as $book) {\n $course = Course::where('book_id', '=', $book->book_id)->first();\n\n $results[] = array(\n\n 'isbn' => $book->isbn,\n 'title' => $book->title,\n 'author' => $book->author,\n 'imagePath' => $book->imagePath,\n 'course_name' => $course->course_name,\n 'instructor' => $course->instructor,\n\n );\n }\n } else {\n echo \"no result\";\n }\n return view('book/search')->with('results', $results);\n }", "title": "" }, { "docid": "12dd41d92311accd9b543fb0bc96c1d1", "score": "0.60610294", "text": "function getGoogle($keyword){\n include_once('thirdparty/simple_html_dom.php');\n $url = \"http://209.85.229.119/\";\n $apimethod = \"search?\";\n $apiparams = array('q'=>$keyword);\n $apicallurl = $url.$apimethod.http_build_query($apiparams);\n $result = array();\n try{\n $html_analysis = file_get_html($apicallurl);\n if(!isset($html_analysis)) {\n $html_analysis->clear();\n return \"获取失败,请联系开发人员\";\n }else{\n $items = array();\n foreach($html_analysis->find('div[id=\"ires\"] li[class=\"g\"]') as $item){\n $temp = str_get_html($item);\n $href = substr($temp->find(\"li h3 a\",0)->href,7);\n $h3 = $temp->find(\"li h3 a\",0)->plaintext;\n $content = $temp->find(\"li div\",0)->children(1)->plaintext;\n array_push($items,new googleItem($h3,$content,'', $href));\n //if(strlen($result) > 2000){ break;}\n if(count($items) === 2){\n break;\n }\n }\n $result = $items;\n }\n }catch (Exception $e){\n return $e->getMessage();\n }\n return $result;\n}", "title": "" }, { "docid": "cb4ef16b7b8c36d4e0cfbdc0c4721caf", "score": "0.5998465", "text": "function fetchGoogleAPIResults($urlString,$cc){\r\n\t\r\n\t\r\n\t/* This is API key for Google Search API for Shopping */\r\n\t/*This query parameter is required to restrict the response elements for faster performance. You can easily find this out looking at response and these are just xpath statements. */\r\n\t$fields = 'totalItems,startIndex,itemsPerPage,currentItemCount,items(kind,product/inventories/price,product/inventories/currency,product/inventories/availability,product/link)';\r\n\t//$country = GB; /* Hard-coded for now */\r\n\t$ini_array = parse_ini_file(\"pinterest.ini\", true);\r\n\t$GOOGLE_API_KEY=$ini_array['API']['GOOGLE_API_KEY'];\r\n\t$apiEndPoint = 'https://www.googleapis.com/shopping/search/v1/public/products?';\r\n\t$format = 'json';\r\n\t$apiCall = $apiEndPoint . 'country=' . $cc . '&restrictBy=link:' . $urlString . '&key=' . $GOOGLE_API_KEY . '&fields=' . $fields . '&alt=' . $format;\r\n\t//echo \"<br><br><br><br>\".$apiCall;\r\n\t\r\n\treturn file_get_contents($apiCall);\r\n\r\n}", "title": "" }, { "docid": "58831229887180e070b9e9862bc4ae53", "score": "0.59718937", "text": "public function searchBooks()\n {\n $str = $_POST['search'];\n\n if (USE_ONE_TABLE) {\n $this->table = 'books_authors';\n $sql = \"SELECT * FROM $this->table WHERE `deleted` is null and\n (`book_name` LIKE :str or\n `author` LIKE :str or\n `year` LIKE :str)\";\n }else{\n $sql = \"SELECT books.id, book_name, GROUP_CONCAT(name_author SEPARATOR ', ') as 'author' , year, num_pages, about_book, deleted, views, clicks, image\n FROM books \n JOIN relations ON book_id = books.id\n JOIN authors ON authors.id = author_id\n WHERE deleted is NULL and (`book_name` LIKE :str or\n `name_author` LIKE :str or\n `year` LIKE :str) \n GROUP BY id\";\n }\n\n return $this->pdo->query($sql, ['str' => '%' . $str . '%']);\n }", "title": "" }, { "docid": "17a9ff8f19f2440494ae8503cf3222a1", "score": "0.5955026", "text": "public function search()\r\n {\r\n $queryLower = strtolower($this->query);\r\n if (strlen($queryLower) < self::MIN_QUERY_LENGTH) {\r\n return;\r\n }\r\n $keywords = $this->getKeywords();\r\n foreach ($keywords as $row) {\r\n foreach ($row as $value) {\r\n $valueLower = strtolower($value);\r\n if (strpos($valueLower, $queryLower) !== false) {\r\n $this->results[] = $row;\r\n continue;\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "5f75d5341d025c8e94f16816e2ad77ff", "score": "0.59516776", "text": "public function search()\n {\n $query = $this->getQuery();\n if($query === null)\n {\n throw new CException(\"Attempt to execute search without a query.\");\n }\n\n $params = array('q' => $query );\n $params['v'] = '1.0';\n $params['userip'] = static::$userIp;\n\n $size = $this->getSize();\n if($size)\n {\n $params['imgsz'] = $size;\n }\n\n\n $paramElements = array();\n foreach($params as $key => $value)\n {\n $paramElements[] = urlencode($key) . '=' . urlencode($value);\n }\n\n $requestUrl = $this->url . '?' . implode('&', $paramElements);\n\n $rawResponse = file_get_contents($requestUrl);\n\n $data = null;\n try {\n $data = json_decode($rawResponse);\n }\n catch(Exception $e)\n {\n throw new CException(\"Unable to parse result as JSON.\");\n }\n\n if(! property_exists($data, 'responseData'))\n {\n throw new CException(\"JSON data has unexpected structure\");\n }\n\n if(! is_object($data->responseData))\n {\n return array();\n }\n\n\n if(! property_exists($data->responseData, 'results'))\n {\n return array();\n }\n\n $results = array();\n foreach($data->responseData->results as $result)\n {\n $results[] = $result->unescapedUrl;\n }\n\n return $results;\n\n }", "title": "" }, { "docid": "e29fc034514510326cc3db1c15601b98", "score": "0.5935054", "text": "function search(){\n DB::db_query(\"search_collection\", \"SELECT * FROM resource WHERE resource_type='Book'\");\n if(DB::db_check_result(\"search_collection\") > 0){\n $data = DB::db_get_array(\"search_collection\");\n $this->load_array($data);\n }\n \n\n }", "title": "" }, { "docid": "671d37b5011cb20281cd88eef6b91d3f", "score": "0.5933494", "text": "public function search()\n\t{\n\t\t$s_type=Input::get('searchtype');\n\t\tswitch ($s_type) {\n\t\t\tcase 'keyword_search':\n\t\t\t\treturn $this->keyword_search(Input::all());\n\t\t\t\tbreak;\n\t\t\tcase 'exam_search':\n\t\t\t\treturn $this->exam_search(Input::all());\n\t\t\t\tbreak;\n\t\t\tcase 'dept_search':\n\t\t\t\treturn $this->dept_search(Input::all());\n\t\t\t\tbreak;\n\t\t\tcase 'location_search':\n\t\t\t\treturn $this->location_search(Input::all());\n\t\t\t\tbreak;\n\t\t\tcase 'side-filter':\n\t\t\t\treturn $this->main_search(Input::all());\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn $this->show_colleges();\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "c81d31f360249e0c450001e37b629a5d", "score": "0.5925848", "text": "function gSEARCH(){\r\n\t\tglobal $_GET;\r\n\t\treturn (isset($_GET[\"search\"]))?db_connect()->real_escape_string($_GET[\"search\"]):\"\";\r\n\t}", "title": "" }, { "docid": "51c911eb4212bea7ae79f66d98ab270b", "score": "0.5920991", "text": "function prso_get_search_query() {\n\n\t//vars\n\t$query = esc_html( get_search_query() );\n\n\tif ( empty( $query ) ) {\n\t\treturn false;\n\t}\n\n\treturn $query;\n}", "title": "" }, { "docid": "02354ead5cae67ec8f9d7391a787e3d0", "score": "0.5917038", "text": "function search($conn){\n\n $Err = \"\";\n $search= \"\";\n\n if ($_SERVER[\"REQUEST_METHOD\"] == \"POST\") {\n if (empty($_POST[\"q\"])) {\n echo $Err = \"Name is required\";\n exit();\n } else {\n $search = $_POST[\"q\"];\n // check if name only contains letters and whitespace\n if (!preg_match(\"/^[a-zA-Z ]*$/\", $search)) {\n echo $Err = \"Only letters and white space allowed\";\n exit();\n }else{\n $sql=\"SELECT * FROM `get_lib_book` WHERE\n Book_Title LIKE '%$search%'OR\n Author1 LIKE '%$search%' OR\n Author2 LIKE '%$search%' OR\n Author3 LIKE '%$search%' OR\n Publication LIKE '%$search%' OR\n ISBN LIKE '%$search%' OR\n `Subject` LIKE '%$search%' OR\n cata_no like '%$search%'\";\n $result = mysqli_query($conn, $sql);\n\n if(mysqli_num_rows($result) > 0){\n while($row = mysqli_fetch_array($result)){\n echo \"\n <tr>\n <td>{$row['Book_Title']}</td>\n <td>{$row['Author1']}/{$row['Author2']}/{$row['Author3']}</td>\n <td>{$row['Edition']}/{$row['ISBN']}</td>\n </tr>\n \";\n }\n }else{\n echo $search.\" not found\";\n }\n }\n }\n }\n}", "title": "" }, { "docid": "1aa0e37648b3e2a542941c704f2f8105", "score": "0.5885243", "text": "private function search()\n {\n $this->setRules(array(\n 'method' => 'GET',\n 'vias' => 'mob,ajax',\n 'require_login' => false\n )\n );\n $query = HTTP::get('q');\n $type = HTTP::get('t');\n $order = HTTP::get('o');\n $page = HTTP::get('p');\n $page = HTTP::sanitizePageNumber($page) ?: 1;\n\n if (! $query )\n throw new \\ValidationException(\n 'Missing parameters',\n array('error_code' => 7)\n );\n\n $result = Search::doSearch(array(\n 'query' => $query,\n 'type' => $type,\n 'order' => $order,\n 'page' => $page\n )\n );\n //Mobile Side:\n if ('mob' == $this->via) {\n HTTP::exitJson(array('success' => true) + $result);\n }\n //AJAX Side:\n\n $response = '';\n $partial = $result['type'] == 'a' ? 'audio' : 'user';\n\n foreach ($result['audios'] as $audio) {\n $response .= View::getPartial($partial, $audio);\n }\n $response = minify_html($response);\n\n HTTP::exitJson(array(\n 'success' => true,\n 'response' => $response,\n 'load_more' => $result['load_more']\n )\n );\n }", "title": "" }, { "docid": "37eaa3cd8008965c9707c3a6a5cc6b19", "score": "0.58741", "text": "function get_search_query_terms($engine = 'google') {\n global $s, $s_array;\n $referer = urldecode($_SERVER[HTTP_REFERER]);\n $query_array = array();\n switch ($engine) {\n case 'google':\n // Google query parsing code adapted from Dean Allen's\n // Google Hilite 0.3. http://textism.com\n $query_terms = preg_replace('/^.*q=([^&]+)&?.*$/i','$1', $referer);\n $query_terms = preg_replace('/\\'|\"/', '', $query_terms);\n $query_array = preg_split (\"/[\\s,\\+\\.]+/\", $query_terms);\n break;\n\n case 'lycos':\n $query_terms = preg_replace('/^.*query=([^&]+)&?.*$/i','$1', $referer);\n $query_terms = preg_replace('/\\'|\"/', '', $query_terms);\n $query_array = preg_split (\"/[\\s,\\+\\.]+/\", $query_terms);\n break;\n\n case 'yahoo':\n $query_terms = preg_replace('/^.*p=([^&]+)&?.*$/i','$1', $referer);\n $query_terms = preg_replace('/\\'|\"/', '', $query_terms);\n $query_array = preg_split (\"/[\\s,\\+\\.]+/\", $query_terms);\n break;\n }\n return $query_array;\n}", "title": "" }, { "docid": "180d66f9727e6630d3842df1ee0bb2dd", "score": "0.5841463", "text": "function searchBook()\n\t{\n\t\t$post_data = array(\n\t\t\t'name' => $this->input->post('name'),\n\t\t\t'author' => $this->input->post('author'),\n\t\t\t'ISBN' => $this->input->post('ISBN')\n\t\t);\n\t\t$post_data['name'] = str_replace(' ', '%20', $post_data['name']);\n\t\t$post_data['author'] = str_replace(' ', '%20', $post_data['author']);\n\n\t\t//print_r($post_data);exit;\n\t\t$con = curl_init();\n\t\t$url = $this->api_url.'/searchBook/';\n\n\t\tif ($post_data['name']!=\"\"){\n\t\t\t$url.='/name/'.$post_data['name'];\n\t\t}\n\t\tif ($post_data['author']!=\"\"){\n\t\t\t$url.='/author/'.$post_data['author'];\n\t\t}\n\t\t//print_r($post_data['author']);exit;\n\n\t\tif ($post_data['ISBN']!=\"\"){\n\t\t\t$url.='/ISBN/'.$post_data['ISBN'];\n\t\t}\n\n\t\t//echo $url;exit;\n\n\t\tcurl_setopt($con, CURLOPT_URL, $url);\n\t\tcurl_setopt($con, CURLOPT_RETURNTRANSFER, true);\n\t\t$response = curl_exec($con);\n\t\t//print_r($response);exit;\n\t\t// Check HTTP status code\n\t\t$books =array('books'=> json_decode($response,TRUE));\n\t\tcurl_close($con);\n\t\t//print_r($books);exit;\n\t\tif (empty($books))\n\t\t{\n\t\t\techo \"não foi encontrado o livro\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->load->view('general/header_html');\n\t\t\t$this->load->view('general/menu');\n\t\t\t$this->load->view('long_story/book/search', $books);\n\t\t\t$this->load->view('general/footer');\n\t\t}\n\n\t}", "title": "" }, { "docid": "a476bf61347e681af0fd4c7472c365d7", "score": "0.5840868", "text": "public function search()\n\t{\n\t\t$like = array();\n\t\t$like['title'] = $_GET['q'];\n\n\t\t// Get the parser data for the results\n\t\t$parser_data = $this->get_parser_data();\n\t\t$parser_data['title'] = 'Search Results for ' . $_GET['q'];\n\t\t$parser_data['results'] = $this->entry_model->search($like);\n\t\t$parser_data['total_results'] = count($parser_data['results']);\n\n\t\t// Format the results\n\t\t$this->format_entries($parser_data['results']);\n\n\t\t// Show the results of the search\n\t\t$this->parser->parse('journal/search/results.html', $parser_data);\n\t}", "title": "" }, { "docid": "ed9943551b24542ba40a0ba67a7a4bc5", "score": "0.578999", "text": "function DoSearch($service, $query, $language, $num_results, $start_at, $searchin)\n{\n\t$excludedsites = '-site:xavier.se -site:xu.edu -site:xavier.edu -site:cstv.com -site:xula.edu';\n\n\t$results = array(\"numresults\" => 0);\n\n\t$search = new CurlRequest();\n\n\tif ($service == \"twittersearch\")\n\t{\n\t\t$url = 'http://search.twitter.com/search.atom?lang='. $language .'&q='. urlencode($query);\n\t\tif ($num_results > 0)\n\t\t{\n\t\t\t$url .= '&rpp='. $num_results;\n\t\t}\n\t\t$method = 'GET';\n\t\t$referer = '';\n\t\t$post_fields = '';\n\t\t$login = '';\n\t\t$password = '';\n\t\t$footer = '<A HREF=\"http://twitter.com\" REL=\"nofollow\"><IMG SRC=\"http://search.twitter.com/images/powered-by-twitter-sig.gif\" BORDER=0 ALT=\"Powered by Twitter\" /></A>';\n\t}\n\telse if ($service == \"yahoo\")\n\t{\n\t\t$url = 'http://boss.yahooapis.com/ysearch/web/v1/'. urlencode($query .' '. $excludedsites) .'?format=xml&appid=Y5KeN0DV34Gwr0Hv1NVnulsrPQhX27WcRQOGMnT.c7PiITngQTGQgrexq3RiIlAAp.gt&start='. $start_at .'&count='. $num_results .'&lang='. $language;\n\t\t$method = 'GET';\n\t\t$referer = '';\n\t\t$post_fields = '';\n\t\t$login = '';\n\t\t$password = '';\n\t}\n\telse if ($service == \"xavier\")\n\t{\n//\t\t$url = 'http://boss.yahooapis.com/ysearch/web/v1/'. urlencode($query .' site:xaviermedia.com site:xaviermedia.net site:xavierseek.com -site:xavier.se -site:xu.edu -site:xavier.edu') .'?format=xml&appid=Y5KeN0DV34Gwr0Hv1NVnulsrPQhX27WcRQOGMnT.c7PiITngQTGQgrexq3RiIlAAp.gt&start='. $start_at .'&count='. $num_results .'';\n\t\t$url = 'http://boss.yahooapis.com/ysearch/web/v1/'. urlencode($query .' (site:xaviermedia.com OR site:xaviermedia.com OR site:xaviermedia.se OR site:xaviermedia.co.uk) '. $excludedsites) .'?format=xml&appid=Y5KeN0DV34Gwr0Hv1NVnulsrPQhX27WcRQOGMnT.c7PiITngQTGQgrexq3RiIlAAp.gt&start='. $start_at .'&count='. $num_results .'';\n\t\t$method = 'GET';\n\t\t$referer = '';\n\t\t$post_fields = '';\n\t\t$login = '';\n\t\t$password = '';\n\t\t$service = 'yahoo';\n\t}\n\telse if ($service == \"news\")\n\t{\n\t\t$url = 'http://boss.yahooapis.com/ysearch/news/v1/'. urlencode($query .' '. $excludedsites) .'?format=xml&appid=Y5KeN0DV34Gwr0Hv1NVnulsrPQhX27WcRQOGMnT.c7PiITngQTGQgrexq3RiIlAAp.gt&start='. $start_at .'&count='. $num_results .'&lang='. $language;\n\t\t$method = 'GET';\n\t\t$referer = '';\n\t\t$post_fields = '';\n\t\t$login = '';\n\t\t$password = '';\n\t}\n\telse if ($service == \"images\")\n\t{\n\t\t$url = 'http://boss.yahooapis.com/ysearch/images/v1/'. urlencode($query .' '. $excludedsites) .'?format=xml&appid=Y5KeN0DV34Gwr0Hv1NVnulsrPQhX27WcRQOGMnT.c7PiITngQTGQgrexq3RiIlAAp.gt&start='. $start_at .'&count='. $num_results .'&lang='. $language;\n\t\t$method = 'GET';\n\t\t$referer = '';\n\t\t$post_fields = '';\n\t\t$login = '';\n\t\t$password = '';\n\t}\n\telse if ($service == \"spelling\")\n\t{\n\t\t$url = 'http://boss.yahooapis.com/ysearch/spelling/v1/'. urlencode($query) .'?appid=Y5KeN0DV34Gwr0Hv1NVnulsrPQhX27WcRQOGMnT.c7PiITngQTGQgrexq3RiIlAAp.gt&format=xml';\n\t\t$method = 'GET';\n\t\t$referer = '';\n\t\t$post_fields = '';\n\t\t$login = '';\n\t\t$password = '';\n\t}\n\telse if ($service == \"twitter\")\n\t{\n\t\t$url = 'http://twitter.com/account/rate_limit_status.xml';\n\t\t$method = 'GET';\n\t\t$referer = '';\n\t\t$post_fields = '';\n\t\t$login = 'xaviermedia';\n\t\t$password = 'sc6241';\n\t}\n\n\t$params = array('url' => $url,\n\t\t'host' => '',\n\t\t'header' => '',\n\t\t'method' => $method, // 'POST','HEAD'\n\t\t'referer' => $referer,\n\t\t'cookie' => '',\n\t 'post_fields' => $post_fields,// 'var1=value&var2=value\n\t\t'timeout' => 20\n\t);\n\tif ($login != '')\n\t{ \n\t $params[\"login\"] = $login;\n\t $params[\"password\"] = $password;\n\t}\n\n\n\t$search->init($params);\n\n\t$result = $search->exec();\n\n\t$data = str_replace(\"&\",\"ooOoo\",$result['body']);\n\t$data = str_replace('<?xml version=\"1.0\" encoding=\"UTF-8\" ?>','',$data);\n\t$data = str_replace('<?xml version=\"1.0\" encoding=\"utf-8\"?>','',$data);\n\n\t///// Start XML\n\t$xml = xmlize($data); \n\n\n\t$results[\"html\"] = '';\n\t$results[\"xml\"] = '';\n\n\t/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t//////////////////////////////////////// Twitter Search http://search.twitter.com ///////////////////////////////////\n\tif ($service == \"twittersearch\")\n\t{\n\t\t$entries = count($xml[feed][\"#\"][\"entry\"]);\n\t\t$results[\"numresults\"] = $entries;\n\n//\t\techo '<PRE>'. var_dump($xml[feed]) .'</PRE>';\n\t\tif ($entries > 0)\n\t\t{\n\t\t\tfor($j = 0; $j < $entries; $j++) \n\t\t\t{ \n\t\t\t\t$title = str_replace(\"ooOoo\",\"&\",$xml[feed][\"#\"][\"entry\"][$j][\"#\"][\"title\"][0][\"#\"]); \n\n\t\t\t\t$str = stristr($title,'http://');\n\t\t\t\tif ($str === FALSE)\n\t\t\t\t{\n\t\t\t\t\t$str = stristr($title,' www.');\n\t\t\t\t\tif ($str === FALSE)\n\t\t\t\t\t{\n\n\n\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$str = substr($str,1,strlen($str));\n\t\t\t\t\t\t$strnum = strlen($str);\n\t\t\t\t\t\t$space = stristr($str,' ');\n\t\t\t\t\t\tif ($space === FALSE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$url = $str;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$strnum = strlen($str);\n\t\t\t\t\t\t\t$spacenum = strlen($space);\n\t\t\t\t\t\t\t$url = substr($str,0,($strnum-$spacenum));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$title = str_replace($url,'<A HREF=\"http://'. $url .'\" CLASS=gen TARGET=\"_blank\"><FONT COLOR=\"#009900\">'. $url .'</FONT></A>', $title);\n\n\t\t\t\t\t}\n\n\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$space = stristr($str,' ');\n\t\t\t\t\tif ($space === FALSE)\n\t\t\t\t\t{\n\t\t\t\t\t\t$url = $str;\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$strnum = strlen($str);\n\t\t\t\t\t\t$spacenum = strlen($space);\n\t\t\t\t\t\t$url = substr($str,0,($strnum-$spacenum));\n\t\t\t\t\t}\n\t\t\t\t\t$title = str_replace($url,'<A HREF=\"'. $url .'\" CLASS=gen TARGET=\"_blank\"><FONT COLOR=\"#009900\">'. $url .'</FONT></A>', $title);\n\n\t\t\t\t}\n\n\n\t\t\t\t$picture = $xml[feed][\"#\"][\"entry\"][$j][\"#\"][\"link\"][1][\"@\"][\"href\"]; \n\t\t\t\t$author = $xml[feed][\"#\"][\"entry\"][$j][\"#\"][\"author\"][0][\"#\"][\"name\"][0][\"#\"]; \n\t\t\t\t$t = explode(' ',$author);\n\t\t\t\t$results[\"html\"] .= '\t\t<CENTER><TABLE CLASS=gen WIDTH=\"99%\" CELLPADDING=0 CELLSPACING=0>\n\t\t\t<TR>\n\t\t\t\t<TD WIDTH=50 VALIGN=top ALIGN=right><A HREF=\"http://twitter.com/'. $t[0] .'\" rel=\"nofollow\"><IMG SRC=\"'. $picture .'\" BORDER=0 ALT=\"'. $author .'\" /></A></TD>\n\t\t\t\t<TD WIDTH=20 VALIGN=top ALIGN=right><IMG SRC=\"/images/bubble_2.png\"></TD>\n\t\t\t\t<TD BGCOLOR=\"#eeeeee\" COLSPAN=3 ALIGN=center>'. $title .' <A HREF=\"http://twitter.com/home?status=@'. $t[0] .'+\" CLASS=gen rel=\"nofollow\"><I>Reply</I></A></TD>\n\t\t\t</TR>\n\t\t\t<TR>\n\t\t\t\t<TD BGCOLOR=\"#FFFFFF\" COLSPAN=4 CLASS=gensmall>&nbsp;</TD>\n\t\t\t</TR>\n\t\t\t</TABLE></CENTER>';\n\n//\t\t\t\t$text = str_replace('@'. $twitter_id .' ','',$xml[statuses][\"#\"][\"status\"][$j][\"#\"][\"text\"][0][\"#\"]); \n//\t\t\t\t$screen_name = $xml[statuses][\"#\"][\"status\"][$j][\"#\"][\"user\"][0][\"#\"][\"screen_name\"][0][\"#\"]; \n//\t\t\t\t$name = $xml[statuses][\"#\"][\"status\"][$j][\"#\"][\"user\"][0][\"#\"][\"name\"][0][\"#\"]; \n//\t\t\t\t$short_name = explode(\" \",$name); \n//\t\t\t\t$short_name = $short_name[0];\n//\t\t\t\t$location = $xml[statuses][\"#\"][\"status\"][$j][\"#\"][\"user\"][0][\"#\"][\"location\"][0][\"#\"]; \n//\t\t\t\t$description = $xml[statuses][\"#\"][\"status\"][$j][\"#\"][\"user\"][0][\"#\"][\"description\"][0][\"#\"]; \n//\t\t\t\t$profile_image_url = $xml[statuses][\"#\"][\"status\"][$j][\"#\"][\"user\"][0][\"#\"][\"profile_image_url\"][0][\"#\"]; \n//\t\t\t\t$url = $xml[statuses][\"#\"][\"status\"][$j][\"#\"][\"user\"][0][\"#\"][\"url\"][0][\"#\"]; \n//\t\t\t\t$followers_count = $xml[statuses][\"#\"][\"status\"][$j][\"#\"][\"user\"][0][\"#\"][\"followers_count\"][0][\"#\"]; \n//\t\t\t\techo '<B>'. $title .'</B><BR>'. $author.'<BR>'. $picture .'<BR />';\n\n\n\n\t\t\t}\n\t\t}\n\n\n\t}\n\t/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t//////////////////////////////////////// Yahoo! Spelling Suggestions ////////////////////////////////////////////////\n\telse if ($service == \"spelling\")\n\t{\n\t\tif ($xml[\"ysearchresponse\"][\"#\"][\"resultset_spell\"][0][\"#\"][\"result\"] > \"0\")\n\t\t{\n\t\t\t$spellingsuggestion = str_replace(\"ooOoo\",\"&\",$xml[\"ysearchresponse\"][\"#\"][\"resultset_spell\"][0][\"#\"][\"result\"][0][\"#\"][\"suggestion\"][0][\"#\"]);\n\t\t\tif ($spellingsuggestion != $query)\n\t\t\t{ \n\t\t\t\t$results[\"numresults\"] = 1;\n\t\t\t\t$results[\"spelling\"] = $spellingsuggestion;\n\t\t\t\t$results[\"html\"] = '\t\t<CENTER><TABLE CLASS=gen WIDTH=\"95%\" CELLPADDING=0 CELLSPACING=0>\n\t\t\t<TR>\n\t\t\t\t<TD BGCOLOR=\"#cee7ef\" COLSPAN=3 ALIGN=center>Did you mean <A HREF=\"/search.php?searchin='. $searchin .'&query='. urlencode($spellingsuggestion) .'&language='. $language .'\" CLASS=gen><B><I>'. $spellingsuggestion .'</I></B></A>?</TD>\n\t\t\t\t<TD WIDTH=20 VALIGN=top ALIGN=right><IMG SRC=\"/images/bubble_1.png\"></TD>\n\t\t\t\t<TD WIDTH=50 VALIGN=top ALIGN=right><A HREF=\"http://twitter.com/xaviermedia\"><IMG SRC=\"http://s3.amazonaws.com/twitter_production/profile_images/51596032/xavier_125x125_normal.png\" BORDER=0 ALT=\"Xavier Media\" /></A></TD>\n\t\t\t</TR>\n\t\t\t<TR>\n\t\t\t\t<TD BGCOLOR=\"#FFFFFF\" COLSPAN=4 CLASS=gensmall>&nbsp;</TD>\n\t\t\t</TR>\n\t\t\t</TABLE></CENTER>';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$results[\"html\"] = '';\n\t\t\t}\n\t\t}\n\t}\n\t/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t////////////////////////////////////////////////// Yahoo! Search ////////////////////////////////////////////////////\n\telse if ($service == \"yahoo\")\n\t{\n\t\t$results[\"html\"] = '';\n\t\tif ($xml[\"ysearchresponse\"][\"#\"][\"resultset_web\"][0][\"@\"][\"totalhits\"] > \"0\")\n\t\t{\n\t\t\t$num = $xml[\"ysearchresponse\"][\"#\"][\"resultset_web\"][0][\"@\"][\"count\"];\n\t\t\t$results[\"numresults\"] = $xml[\"ysearchresponse\"][\"#\"][\"resultset_web\"][0][\"@\"][\"totalhits\"];\n\n\t\t\tfor ($i = 0; $i < $num; $i++)\n\t\t\t{\n\t\t\t\t$abstract \t=\t$xml[\"ysearchresponse\"][\"#\"][\"resultset_web\"][0][\"#\"][\"result\"][$i][\"#\"][\"abstract\"][0][\"#\"];\n\t\t\t\t$dispurl \t=\t$xml[\"ysearchresponse\"][\"#\"][\"resultset_web\"][0][\"#\"][\"result\"][$i][\"#\"][\"dispurl\"][0][\"#\"];\n\t\t\t\t$date \t=\t$xml[\"ysearchresponse\"][\"#\"][\"resultset_web\"][0][\"#\"][\"result\"][$i][\"#\"][\"date\"][0][\"#\"];\n\t\t\t\t$clickurl \t=\t$xml[\"ysearchresponse\"][\"#\"][\"resultset_web\"][0][\"#\"][\"result\"][$i][\"#\"][\"clickurl\"][0][\"#\"];\n\t\t\t\t$title \t=\t$xml[\"ysearchresponse\"][\"#\"][\"resultset_web\"][0][\"#\"][\"result\"][$i][\"#\"][\"title\"][0][\"#\"];\n\t\t\t\t$url \t\t=\t$xml[\"ysearchresponse\"][\"#\"][\"resultset_web\"][0][\"#\"][\"result\"][$i][\"#\"][\"url\"][0][\"#\"];\n\t\t\t\t$host\t\t= \tparse_url($url);\n\n\t\t\t\t$results[\"html\"] .= str_replace(\"ooOoo\",\"&\",'<P CLASS=gen><B><A HREF=\"'. $clickurl .'\" rel=\"nofollow\" CLASS=gen>'. $title .'</A></B><BR />'. $abstract .'<BR /><I><A HREF=\"'. $clickurl .'\" rel=\"nofollow\" CLASS=genmed><FONT COLOR=\"#009900\">'. $dispurl .'</FONT></A></I> [<A HREF=\"javascript:LookUp(\\''. $host[host] .'\\');\" CLASS=genmed><B>Look up site</B></A>]</P>');\n\t\t\t\t$results[\"xml\"] .= str_replace(\"ooOoo\",\"&\",'<entry>\n\t<author>\n\t\t<name>XavierSeek.com</name>\n\t\t<uri>http://www.xavierseek.com/</uri>\n\t</author>\n\t<title type=\"html\"><![CDATA['. $title .']]></title>\n\t<link rel=\"alternate\" type=\"text/html\" href=\"'. $clickurl .'\" />\n\t<id>'. $dispurl .'</id>\n\t<updated>'. $date .'</updated>\n\n\t<published>'. $date .'</published>\n\t<summary type=\"html\"><![CDATA['. $abstract .'[...]]]></summary>\n\t<content type=\"html\" xml:base=\"'. $clickurl .'\">'. $abstract .'</content>\n</entry>');\n\t\t\t}\n\t\t}\n\t}\n\t/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t////////////////////////////////////////////////// Yahoo! News ////////////////////////////////////////////////////\n\telse if ($service == \"news\")\n\t{\n\t\t$results[\"html\"] = '';\n\t\tif ($xml[\"ysearchresponse\"][\"#\"][\"resultset_news\"][0][\"@\"][\"totalhits\"] > \"0\")\n\t\t{\n\t\t\t$num = $xml[\"ysearchresponse\"][\"#\"][\"resultset_news\"][0][\"@\"][\"count\"];\n\t\t\t$results[\"numresults\"] = $xml[\"ysearchresponse\"][\"#\"][\"resultset_news\"][0][\"@\"][\"totalhits\"];\n\n\t\t\tfor ($i = 0; $i < $num; $i++)\n\t\t\t{\n\t\t\t\t$abstract \t=\t$xml[\"ysearchresponse\"][\"#\"][\"resultset_news\"][0][\"#\"][\"result\"][$i][\"#\"][\"abstract\"][0][\"#\"];\n\t\t\t\t$dispurl \t=\t$xml[\"ysearchresponse\"][\"#\"][\"resultset_news\"][0][\"#\"][\"result\"][$i][\"#\"][\"sourceurl\"][0][\"#\"];\n\t\t\t\t$date \t=\t$xml[\"ysearchresponse\"][\"#\"][\"resultset_news\"][0][\"#\"][\"result\"][$i][\"#\"][\"date\"][0][\"#\"];\n\t\t\t\t$clickurl \t=\t$xml[\"ysearchresponse\"][\"#\"][\"resultset_news\"][0][\"#\"][\"result\"][$i][\"#\"][\"clickurl\"][0][\"#\"];\n\t\t\t\t$title \t=\t$xml[\"ysearchresponse\"][\"#\"][\"resultset_news\"][0][\"#\"][\"result\"][$i][\"#\"][\"title\"][0][\"#\"];\n\t\t\t\t$url \t\t=\t$xml[\"ysearchresponse\"][\"#\"][\"resultset_news\"][0][\"#\"][\"result\"][$i][\"#\"][\"url\"][0][\"#\"];\n\n\t\t\t\t$results[\"html\"] .= str_replace(\"ooOoo\",\"&\",'<P CLASS=gen><B><A HREF=\"'. $clickurl .'\" rel=\"nofollow\" CLASS=gen>'. $title .'</A></B><BR />'. $abstract .'<BR /><I><A HREF=\"'. $url .'\" rel=\"nofollow\" CLASS=genmed><FONT COLOR=\"#009900\">'. $dispurl .'</FONT></A></I></P>');\n\t\t\t\t$results[\"xml\"] .= str_replace(\"ooOoo\",\"&\",'<entry>\n\t<author>\n\t\t<name>'. $dispurl .'</name>\n\t\t<uri>'. $dispurl .'</uri>\n\t</author>\n\t<title type=\"html\"><![CDATA['. $title .']]></title>\n\t<link rel=\"alternate\" type=\"text/html\" href=\"'. $clickurl .'\" />\n\t<id>'. $dispurl .'</id>\n\t<updated>'. $date .'</updated>\n\n\t<published>'. $date .'</published>\n\t<summary type=\"html\"><![CDATA['. $abstract .'[...]]]></summary>\n\t<content type=\"html\" xml:base=\"'. $clickurl .'\">'. $abstract .'</content>\n</entry>');\n\t\t\t}\n\t\t}\n\t}\n\t/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t////////////////////////////////////////////////// Yahoo! Images ////////////////////////////////////////////////////\n\telse if ($service == \"images\")\n\t{\n\t\t$results[\"html\"] = '';\n\t\tif ($xml[\"ysearchresponse\"][\"#\"][\"resultset_images\"][0][\"@\"][\"totalhits\"] > \"0\")\n\t\t{\n\t\t\t$num = $xml[\"ysearchresponse\"][\"#\"][\"resultset_images\"][0][\"@\"][\"count\"];\n\t\t\t$results[\"numresults\"] = $xml[\"ysearchresponse\"][\"#\"][\"resultset_images\"][0][\"@\"][\"totalhits\"];\n\t\t\tif ($num_results > 10)\n\t\t\t{\n\t\t\t\t$results[\"html\"] .= '<TABLE WIDTH=\"100%\" BORDER=0>';\n\t\t\t}\n\n\n\t\t\tfor ($i = 0; $i < $num; $i++)\n\t\t\t{\n\t\t\t\t$abstract \t=\t$xml[\"ysearchresponse\"][\"#\"][\"resultset_images\"][0][\"#\"][\"result\"][$i][\"#\"][\"abstract\"][0][\"#\"];\n\t\t\t\t$title \t=\t$xml[\"ysearchresponse\"][\"#\"][\"resultset_images\"][0][\"#\"][\"result\"][$i][\"#\"][\"title\"][0][\"#\"];\n\t\t\t\t$dispurl \t=\t$xml[\"ysearchresponse\"][\"#\"][\"resultset_images\"][0][\"#\"][\"result\"][$i][\"#\"][\"refererclickurl\"][0][\"#\"];\n\t\t\t\t$referurl \t=\t$xml[\"ysearchresponse\"][\"#\"][\"resultset_images\"][0][\"#\"][\"result\"][$i][\"#\"][\"refererurl\"][0][\"#\"];\n\t\t\t\t$clickurl \t=\t$xml[\"ysearchresponse\"][\"#\"][\"resultset_images\"][0][\"#\"][\"result\"][$i][\"#\"][\"clickurl\"][0][\"#\"];\n\t\t\t\t$url \t\t=\t$xml[\"ysearchresponse\"][\"#\"][\"resultset_images\"][0][\"#\"][\"result\"][$i][\"#\"][\"url\"][0][\"#\"];\n\t\t\t\t$th_w\t\t=\t$xml[\"ysearchresponse\"][\"#\"][\"resultset_images\"][0][\"#\"][\"result\"][$i][\"#\"][\"thumbnail_width\"][0][\"#\"];\n\t\t\t\t$th_h\t\t=\t$xml[\"ysearchresponse\"][\"#\"][\"resultset_images\"][0][\"#\"][\"result\"][$i][\"#\"][\"thumbnail_height\"][0][\"#\"];\n\t\t\t\t$th_url\t=\t$xml[\"ysearchresponse\"][\"#\"][\"resultset_images\"][0][\"#\"][\"result\"][$i][\"#\"][\"thumbnail_url\"][0][\"#\"];\n\n\t\t\t\tif ($num_results > 10)\n\t\t\t\t{\n\t\t\t\t\tif ($i % 2 == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$results[\"html\"] .= '<TR>';\n\t\t\t\t\t}\n\t\t\t\t\t$results[\"html\"] .= '<TD WIDTH=\"50%\">';\n\t\t\t\t}\n\t\t\t\t$results[\"html\"] .= str_replace(\"ooOoo\",\"&\",'<P CLASS=gen ALIGN=center><B>'. $title .'</B><BR /><A HREF=\"'. $dispurl .'\" rel=\"nofollow\" CLASS=gen><IMG SRC=\"'. $th_url .'\" WIDTH=\"'. $th_w .'\" HEIGHT=\"'. $th_h .'\" BORDER=0 ALT=\"'. $abstract .'\" /></A><BR /><A HREF=\"'. $dispurl .'\" rel=\"nofollow\" CLASS=gensmall><I><FONT COLOR=\"#009900\">'. substr($referurl,0,40) .'</FONT></I></A></P>');\n\t\t\t\tif ($num_results > 10)\n\t\t\t\t{\n\t\t\t\t\t$results[\"html\"] .= '</TD>';\n\t\t\t\t\tif ($i % 2 == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$results[\"html\"] .= '</TR>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$results[\"xml\"] .= str_replace(\"ooOoo\",\"&\",'<entry>\n\t<author>\n\t\t<name>'. $dispurl .'</name>\n\t\t<uri>'. $dispurl .'</uri>\n\t</author>\n\t<title type=\"html\"><![CDATA['. $title .']]></title>\n\t<link rel=\"alternate\" type=\"text/html\" href=\"'. $clickurl .'\" />\n\t<id>'. $dispurl .'</id>\n\t<updated>'. $date .'</updated>\n\n\t<published>'. $date .'</published>\n\t<summary type=\"html\"><![CDATA['. $abstract .'[...]]]></summary>\n\t<content type=\"html\" xml:base=\"'. $clickurl .'\">'. $abstract .'</content>\n</entry>');\n\t\t\t}\n\n\t\t\tif ($num_results > 10)\n\t\t\t{\n\t\t\t\t$results[\"html\"] .= '</TABLE>';\n\t\t\t}\n\n\t\t}\n\t}\n\n\tif ($results[\"html\"] != '')\n\t{\n\t\t$results[\"html\"] .= $footer;\n\t}\n\treturn $results;\n\n}", "title": "" }, { "docid": "b8494c69fb5b8f346495fbb54c4bd672", "score": "0.57894075", "text": "public function getQuery()\n {\n return $this->searchTerms;\n }", "title": "" }, { "docid": "24797bf159d122492c9f1113f3999e25", "score": "0.5785357", "text": "public function search()\n {\n if (empty($this->appid)) {\n throw new Msft_Bing_Search_Exception('Empty AppId');\n }\n \n if (empty($this->sources)) {\n $this->sources[]='web';\n }\n \n \n $this->url = $this->buildUrl();\n \n if ($stream = @fopen($this->url, 'r')) {\n $output = stream_get_contents($stream);\n fClose($stream);\n } else {\n throw new Msft_Bing_Search_Exception('Problem opening stream');\n }\n // print all the page starting at the offset 10\n return $output;\n }", "title": "" }, { "docid": "9d10eb048c8ecfa0f576e118cb900931", "score": "0.5778235", "text": "public function getSearch()\n {\n $result = array();\n $keyword = Input::get('keyword');\n $status = Input::get('status'); //add by oat\n $type = Input::get('type');\n\n $media_id = preg_replace(\"/[^0-9]/\", \"\", $keyword);\n $media = strtoupper(preg_replace(\"/[0-9]/\", \"\", $keyword));\n\n $dvd_condition = ($media == \"DVD\") && is_numeric($media_id);\n $cd_condition = ($media == \"CD\") && is_numeric($media_id);\n $bcd_condition = in_array($media, array('B', 'C', 'D')) && is_numeric($media_id);\n\n /*if(is_numeric($keyword))\n $result = $this->searchByID($keyword, 1,$status);\n else if($dvd_condition || $cd_condition || $bcd_condition)\n $result = $this->searchByID($keyword, 2,$status);\n else\n $result = $this->searchByName($keyword,$status);*/\n /*if(is_numeric($keyword) && $type == \"id\")\n $result = $this->searchByID($keyword, 1,$status);\n else if(($dvd_condition || $cd_condition || $bcd_condition) && $type == \"id\")\n $result = $this->searchByID($keyword, 2,$status);\n else*/\n \n $result = $this->searchAll($keyword,$status,$type);\n $selectedList = Session::get('borrow', array());\n\n if(!$result)\n return '';\n else\n return json_encode($result);\n }", "title": "" }, { "docid": "eba0417cdde741f5a94c17c0cb9ef500", "score": "0.5764848", "text": "public function search($query);", "title": "" }, { "docid": "7df2195e2fee210561a3f432d6ff9177", "score": "0.57498384", "text": "public function processSearch(){\r\n $publisher = $this->publisher;\r\n $author = $this->author; \r\n $book = $this->book;\r\n $genre = $this->genre;\r\n $year = $this->year;\r\n \r\n if(!empty($year)){\r\n switch ($year) {\r\n case \"1950 - 1970\":\r\n include_once(dirname(__DIR__).'/Model/Model1.php');\r\n $model1 = new Model1();\r\n $response = $model1->getBook($author, $book);\r\n break;\r\n case \"1970 - 1990\":\r\n include_once(dirname(__DIR__).'/Model/Model2.php');\r\n $model2 = new Model2();\r\n $response = $model2->getBook($author, $book, $publisher, $genre);\r\n break;\r\n case \"1990 - 2019\":\r\n include_once(dirname(__DIR__).'/Model/Model3.php');\r\n $model3 = new Model3();\r\n $response = $model3->getBook($author, $book, $publisher, $genre);\r\n break;\r\n }\r\n }\r\n return $this->processSearchResult($response);\r\n }", "title": "" }, { "docid": "06d1a347b58e090fc83e58d7ec6871ab", "score": "0.57458484", "text": "function getSearchQueryResults($key) {\n if(isset($key) && !empty($key)) {\n $searchQuery = urlencode($key);\n } else {\n $searchQuery = '';\n }\n return $searchQuery;\n}", "title": "" }, { "docid": "bd117d0d1f7e1b3ef6c338cbf3098726", "score": "0.5742372", "text": "public function search( $search );", "title": "" }, { "docid": "212785324dc9398587a9a0757201ab04", "score": "0.5742297", "text": "private function getFilteredGoogleSearchResults(Request $request) {\n $sortBy = ($request->input('sortby') == '') ? 'posted_at' : $request->input('sortby');\n $orderBy = ($request->input('orderby') == '') ? 'DESC' : $request->input('orderby');\n\n // Base query\n $affiliateResults = Affiliates::orderBy($sortBy, $orderBy)\n ->join('hash_tags', 'affiliates.hashtag_id', '=', 'hash_tags.id')\n ->select(['affiliates.*','hash_tags.hashtag']);\n\n //Pick google search result from DB\n $affiliateResults->where('source', '=', 'google');\n\n // Apply hashtag filter\n if (!empty($request->hashtag)) {\n $affiliateResults->where('hash_tags.hashtag', $request->hashtag);\n }\n\n // Apply location filter\n if (!empty($request->title)) {\n $affiliateResults->where('title', 'LIKE', '%' . $request->title . '%');\n }\n\n // Apply post filter\n if (!empty($request->post)) {\n $affiliateResults->where('caption', 'LIKE', '%' . $request->post . '%');\n }\n\n // Apply posted at filter\n if (!empty($request->date)) {\n $affiliateResults->where('posted_at', date('Y-m-d H:i:s', strtotime($request->date)));\n }\n\n // Return google search results\n return $affiliateResults;\n }", "title": "" }, { "docid": "c6678e9215978e4021f3a3508e521bd3", "score": "0.57279056", "text": "private function bookSearch(Request $request)\n {\n $search = $request->input('search', '');\n $filters = ['search' => $search];\n $books = Item::orderBy('created_at','desc')\n ->where('type', 'book')\n ->when($search != '', function($searchResults) use ($search) {\n //The columns variable contains every column to be search for the search string\n $columns = ['title', 'meta->writer'];\n foreach ($columns as $column)\n {\n $searchResults->orWhere($column, 'LIKE', '%'.$search.'%');\n }\n })\n ->get();\n return response(view('items.books.browse')->with('books', $books)->with('filters', $filters));\n }", "title": "" }, { "docid": "76af2ebb612b766bd8f2e96f3f789a3e", "score": "0.572302", "text": "public function search()\n\t{\n\t\t$sphinx_search_model = $this->getModel('Search', 'CatalogueModel');\n\t\t$result = $sphinx_search_model->getItems();\n\n\t\t$app = JFactory::getApplication('site');\n\t\t$jinput = $app->input;\n\t\t$category_id = $jinput->get('cid');\n\n\t\t$ids = JArrayHelper::getColumn($result, 'id');\n\n\t\t$app->setUserState('com_catalogue.category.' . $category_id . '.filter.sphinx_ids', $ids);\n\n\t\t/*\n\t\t * $result = array('result' => array('total' => count($ids)));\n\t\t * echo json_encode($result);\n\t\t * $app->close();\n\t\t */\n\n\t\t$this->display();\n\t}", "title": "" }, { "docid": "0b9a9ab3230c56d0138fbfc8cc01dd13", "score": "0.5713635", "text": "public abstract function searching();", "title": "" }, { "docid": "8f7a35209dc057590e18169aaaca38a4", "score": "0.5689707", "text": "public function getTerms()\n {\n $helper = Mage::helper('japi');\n /* @var $helper Jmango360_Japi_Helper_Data */\n $request = $helper->getRequest();\n\n $data['result'] = array();\n\n if ($request->getParam('q', false)) {\n $data['result'] = $this->_getSuggestData();\n } else {\n $data['result'] = $this->_getSuggestData(true);\n }\n\n return $data;\n }", "title": "" }, { "docid": "30da85cefee5f6c1cd29bbba4e64292b", "score": "0.5683043", "text": "public static function get_search_results() {\n\t\t\t$term = strtolower( $_REQUEST['term'] );\n\t\t\t$docid = isset( $_REQUEST['docid'] ) ? $_REQUEST['docid'] : '';\n\t\t\t$suggestions = array();\n\t\t\tif( !empty( $docid ) ) {\n\t\t\t\tglobal $wpdb,$table_prefix;\n\t\t\t\t$postids = $wpdb->get_col('SELECT post_id FROM '.$table_prefix.DOCUMENTORLITE_SECTIONS.' WHERE doc_id = '.$docid);\n\t\t\t\t$includearr = array();\n\t\t\t\tif( $postids ) $includearr = $postids;\n\t\t\t\t$args = array(\n\t\t\t\t\t'post_type' => array( 'post', 'page', 'documentor-sections'),\n\t\t\t\t\t'posts_per_page' => -1,\t\n\t\t\t\t\t'post_status' => 'publish',\n\t\t\t\t\t's'=> $term,\n\t\t\t \t);\n\t\t\t \t$the_query = new WP_Query( $args );\n\t\t\t \twhile ( $the_query->have_posts() ) {\n\t\t\t\t\t$the_query->the_post();\n\t\t\t\t\t$suggestion = array();\n\t\t\t\t\tif( in_array( get_the_ID(), $includearr ) ) {\n\t\t\t\t\t\t$lbl = get_post_meta(get_the_ID(),'_documentor_sectiontitle', true);\n\t\t\t\t\t\t$suggestion['label'] = $lbl;\n\t\t\t\t\t\t$sec_post=get_post( get_the_ID() );\n\t\t\t\t\t\t$slug = $sec_post->post_name;\n\t\t\t\t\t\t$suggestion['slug'] = $slug;\n\t\t\t\t\t\t$suggestions[] = $suggestion;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twp_reset_postdata();\n\t\t\t}\n\t\t\t// JSON encode and echo\n\t\t\t$response = $_GET[\"callback\"] . \"(\" . json_encode($suggestions) . \")\";\n\t\t\techo $response;\n\t\t\tdie();\n\t\t}", "title": "" }, { "docid": "514a7abc7f5b36c8954e1b1c3ad1e8b1", "score": "0.56790805", "text": "public function search(array $body = []) {\n\t\t\n\t\tif (!$this->isClientReady()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (empty($body)) {\n\t\t\t$body = $this->getSearchParams()->getBody();\n\t\t}\n\t\t\n\t\tif (!isset($body['index'])) {\n\t\t\t$body['index'] = $this->getSearchIndex();\n\t\t}\n\t\t\n\t\t$this->requestToScreen($body, 'SEARCH');\n\t\t\n\t\t$result = [];\n\t\ttry {\n\t\t\t$result = $this->getClient()->search($body);\n\t\t} catch (ElasticsearchException $e) {\n\t\t\t// exception already logged by Elasticsearch\n\t\t}\n\t\t\n\t\t$result = new SearchResult($result, $this->getSearchParams()->getParams());\n\t\t\n\t\t$aggregations = $result->getAggregations();\n\t\tif (!empty($aggregations)) {\n\t\t\t$this->setAggregations(elgg_extract('wrapper', $aggregations));\n\t\t}\n\t\t\n\t\t// reset search params after each search\n\t\t$this->getSearchParams()->resetParams();\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "f82bb0cf4d419fe9e0d511dffa64dfcb", "score": "0.5667683", "text": "public function getAllBooks()\n {\n // return response()->json(['data' =>$books, 'message' => 200]);\n\n \n if($search = \\Request::get('q')){\n if($search == 'lessPrice'){\n $books = Book::where('status', 1)->orderBy('price', 'asc')->paginate('12');\n }elseif($search == 'highPrice'){\n $books = Book::where('status', 1)->orderBy('price', 'desc')->paginate('12');\n }else{\n $books = Book::where('status', 1)->latest()->paginate('12');\n }\n }else {\n $books = Book::where('status', 1)->latest()->paginate('12');\n }\n\n return response()->json(['data' => $books, 'message' => 200]);\n }", "title": "" }, { "docid": "5b00e06ae6b30599b17dc6657edcf0af", "score": "0.5664532", "text": "function get_search_haystack(){\n\n return $this->author.\" \".$this->booktitle.\" \";\n\n }", "title": "" }, { "docid": "986951ad8ae13db30b36da2b006341a2", "score": "0.56599486", "text": "public function getQuery(): array;", "title": "" }, { "docid": "40b78bf4bd27d7bc1a0ab3804eded924", "score": "0.5657627", "text": "public function search(){\n $reqs = new \\Required_Parameters();\n return $this->validate_output($reqs,false,new \\Permission(1,array(\"Content\",\"SEO\",\"PPC\",\"Web Development\")),array($this,\"search_callback\")); \n }", "title": "" }, { "docid": "fdfddfde88b00dc56e055b2d2a836ff9", "score": "0.56391984", "text": "function compendium_search( string $search_query ) : mixed\n{\n // Require administrator rights to run this action\n user_restrict_to_administrators();\n\n // Sanitize the search query\n $search_query = sanitize($search_query, 'string');\n\n // Stop here if the search query is less than 3 characters\n if(mb_strlen($search_query) < 3)\n return null;\n\n // Fetch and sanitize the user's current language\n $lang = sanitize(string_change_case(user_get_language(), 'lowercase'), 'string');\n\n // Prepare an array for the search results\n $search_results = array();\n\n // Search compendium content for the query\n $qsearch = query(\" ( SELECT 'page_type' AS 'c_type' ,\n compendium_types.full_name_$lang AS 'c_title' ,\n compendium_types.id AS 'c_url'\n FROM compendium_types\n WHERE compendium_types.full_name_en LIKE '%$search_query%'\n OR compendium_types.full_name_fr LIKE '%$search_query%'\n OR compendium_types.description_en LIKE '%$search_query%'\n OR compendium_types.description_fr LIKE '%$search_query%'\n ORDER BY compendium_types.full_name_$lang ASC )\n\n UNION\n\n ( SELECT 'category' AS 'c_type' ,\n compendium_categories.name_$lang AS 'c_title' ,\n compendium_categories.id AS 'c_url'\n FROM compendium_categories\n WHERE compendium_categories.name_en LIKE '%$search_query%'\n OR compendium_categories.name_fr LIKE '%$search_query%'\n OR compendium_categories.description_en LIKE '%$search_query%'\n OR compendium_categories.description_fr LIKE '%$search_query%'\n ORDER BY compendium_categories.name_$lang ASC )\n\n UNION\n\n ( SELECT 'era' AS 'c_type' ,\n compendium_eras.name_$lang AS 'c_title' ,\n compendium_eras.id AS 'c_url'\n FROM compendium_eras\n WHERE compendium_eras.name_en LIKE '%$search_query%'\n OR compendium_eras.name_fr LIKE '%$search_query%'\n OR compendium_eras.description_en LIKE '%$search_query%'\n OR compendium_eras.description_fr LIKE '%$search_query%'\n ORDER BY compendium_eras.name_$lang ASC )\n\n UNION\n\n ( SELECT 'page' AS 'c_type' ,\n compendium_pages.title_$lang AS 'c_title' ,\n compendium_pages.page_url AS 'c_url'\n FROM compendium_pages\n WHERE compendium_pages.title_en LIKE '%$search_query%'\n OR compendium_pages.title_fr LIKE '%$search_query%'\n OR compendium_pages.definition_en LIKE '%$search_query%'\n OR compendium_pages.definition_fr LIKE '%$search_query%'\n OR compendium_pages.summary_en LIKE '%$search_query%'\n OR compendium_pages.summary_fr LIKE '%$search_query%'\n ORDER BY CONCAT(compendium_pages.title_$lang, compendium_pages.page_url) ASC )\n\n UNION\n\n ( SELECT 'missing' AS 'c_type' ,\n compendium_missing.page_url AS 'c_title' ,\n compendium_missing.id AS 'c_url'\n FROM compendium_missing\n WHERE compendium_missing.page_url LIKE '%$search_query%'\n OR compendium_missing.title LIKE '%$search_query%'\n OR compendium_missing.notes LIKE '%$search_query%'\n ORDER BY compendium_missing.page_url ASC )\n\n UNION\n\n ( SELECT 'image' AS 'c_type' ,\n compendium_images.file_name AS 'c_title' ,\n compendium_images.file_name AS 'c_url'\n FROM compendium_images\n WHERE compendium_images.file_name LIKE '%$search_query%'\n OR compendium_images.caption_en LIKE '%$search_query%'\n OR compendium_images.caption_fr LIKE '%$search_query%'\n ORDER BY compendium_images.file_name ASC ) \");\n\n // Prepare and add the search results to the return array\n for($i = 0; $row = mysqli_fetch_array($qsearch); $i++)\n {\n // Content type name\n $search_results[$i]['type'] = match($row['c_type'])\n {\n 'page_type' => __('compendium_type_admin_short') ,\n 'category' => string_change_case(__('category'), 'initials') ,\n 'era' => __('compendium_page_era') ,\n 'page' => __('compendium_admin_search_page') ,\n 'missing' => __('compendium_page_missing_title') ,\n 'image' => string_change_case(__('image'), 'initials') ,\n default => '&nbsp;' ,\n };\n\n // Assemble the content URLs\n $search_results[$i]['url'] = match($row['c_type'])\n {\n 'page_type' => 'pages/compendium/page_type?type='.$row['c_url'] ,\n 'category' => 'pages/compendium/category?id='.$row['c_url'] ,\n 'era' => 'pages/compendium/cultural_era?era='.$row['c_url'] ,\n 'page' => 'pages/compendium/'.$row['c_url'] ,\n 'missing' => 'pages/compendium/page_missing?id='.$row['c_url'] ,\n 'image' => 'pages/compendium/image?name='.$row['c_url'] ,\n default => 'pages/compendium/index' ,\n };\n\n // Content title\n $search_results[$i]['title'] = match($row['c_type'])\n {\n 'page' => ($row['c_title']) ? $row['c_title'] : $row['c_url'] ,\n default => $row['c_title'] ,\n };\n\n // Sanitize the data\n $search_results[$i]['type'] = sanitize_output($search_results[$i]['type']);\n $search_results[$i]['title'] = sanitize_output(string_truncate($search_results[$i]['title'], 35, '...'));\n }\n\n // Add the search result count to the return array\n $search_results['count'] = $i;\n\n // Return the search results\n return $search_results;\n}", "title": "" }, { "docid": "7062bd032fb0db31170d15ca91728721", "score": "0.5631324", "text": "function wpsearch_get_results() {\r\n global $wpsearch;\r\n\r\n return $wpsearch->getResults();\r\n }", "title": "" }, { "docid": "8f7a080e14e0a55c2e4d60dadef89c51", "score": "0.56184375", "text": "public function search() {\n $type = $this->getInput('type');\n\n if (NULL === $type) {\n return $this->apiResponse('Missing query \"type\".', [], 422);\n }\n\n if ($type !== 'artist') {\n return $this->apiResponse('Wrong value for parameter \"type\". Use \"artist\"', [], 422);\n }\n\n // query is good\n\n $name = $this->getInput('name');\n $name_query = !empty($name) || $name === '0' ? $name : NULL;\n\n $results = $this->artistService->get($name_query);\n\n return $this->apiResponse('Results', $results);\n }", "title": "" }, { "docid": "d3f4e581dd12e0abe8ba4a69b2d6c83a", "score": "0.5616381", "text": "function add_books_results($book_title = null, $book_author = null, $book_isbn = null) {\r\n $this->layout = 'main_layout';\r\n \t\t$this->set('title_for_layout', 'add_book_result');\r\n\r\n if (isset($this->data['Book']['title'])) {\r\n \t$book_title = $this->data['Book']['title'];\r\n }\r\n if (isset($this->data['Book']['author'])) {\r\n \t$book_author = $this->data['Book']['author'];\r\n }\r\n if (isset($this->data['Book']['isbn'])) {\r\n\t $book_isbn = $this->data['Book']['isbn'];\r\n\t }\r\n $index = $this->data['Book']['index'];\r\n\r\n # build the search string to send to Google books\r\n $search_string = 'q=';\r\n if (!empty($book_isbn)) {\r\n $search_string = $search_string . 'isbn:' . $book_isbn;\r\n }\r\n if (!empty($book_title)) {\r\n $book_title = str_replace(\" \", \"+intitle:\", $book_title);\r\n $search_string = $search_string . '+intitle:' . $book_title;\r\n }\r\n if (!empty($book_author)) {\r\n $book_author = str_replace(\" \", \"+inauthor:\", $book_author);\r\n $search_string = $search_string . '+inauthor:' . $book_author;\r\n }\r\n $search_string = $search_string . '&start-index=' . $index . '&max-results=5';\r\n\r\n #these are the book results returned by google book search\r\n $google_results = $this->query_google($search_string);\r\n $google_books_results = array();\r\n\r\n #get just the relevant portions of google book search and put that in the final google_books_results\r\n if (empty($google_results)) {\r\n\r\n } else if (!array_key_exists(0, $google_results)) {\r\n # case when there is only 1 book result\r\n $google_books_results = array_merge($google_books_results, $this->get_relevant_data($google_results));\r\n } else {\r\n foreach ($google_results as $result){\r\n $google_books_results = array_merge($google_books_results, $this->get_relevant_data($result));\r\n }\r\n }\r\n\r\n # set google books result to send to the add book result view\r\n $this->set('google_books_results', $google_books_results);\r\n $this->set('book_title', $book_title);\r\n $this->set('book_author', $book_author);\r\n $this->set('book_isbn', $book_isbn);\r\n $this->set('index', $index);\r\n }", "title": "" }, { "docid": "54aa9a832ae8d9320322ea39b70b1666", "score": "0.56111073", "text": "function search($terms, $start = NULL, $len = NULL, $scoring_function = NULL, $fetch_fields = NULL, $fetch_variables = TRUE, $fetch_categories = TRUE, $snippet = NULL, $variables = NULL, $category_filters = NULL, $filter_docvars = NULL, $filter_functions = NULL)\n\t{\n\t\t// Filter stopwords\n\t\t$terms = $this->filter_stopwords($terms);\n\t\t\n\t\t// The query contained only stopwords\n\t\tif($terms == '')\n\t\t{\n\t\t\t$response['matches'] = 0;\n\t\t\t$response['didyoumean'] = NULL;\n\t\t\treturn (object) $response;\n\t\t}\n\t\t\n\t\t$query['q'] = $terms;\n\t\t\n\t\tif( ! is_null($start))\n\t\t{\n\t\t\t$query['start'] = $start;\n\t\t}\n\t\t\n\t\tif( ! is_null($len))\n\t\t{\n\t\t\t$query['len'] = $len;\n\t\t}\n\t\t\n\t\tif( ! is_null($scoring_function))\n\t\t{\n\t\t\t$query['function'] = (string) $scoring_function;\n\t\t}\n\t\t\n\t\tif( ! is_null($fetch_fields))\n\t\t{\n\t\t\t$query['fetch'] = $fetch_fields;\n\t\t}\n\t\t\n\t\t$query['fetch_variables'] = $fetch_variables;\n\t\t$query['fetch_categories'] = $fetch_categories;\n\t\t\n\t\tif( ! is_null($snippet))\n\t\t{\n\t\t\t$query['snippet'] = $snippet;\n\t\t}\n\t\t\n\t\tif( ! is_null($variables))\n\t\t{\n\t\t\tforeach($variables as $key => $value)\n\t\t\t{\n\t\t\t\t$query[\"var{$key}\"] = $value;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( ! is_null($category_filters))\n\t\t{\n\t\t\t$query['category_filters'] = json_encode($category_filters);\n\t\t}\n\t\t\n\t\t// Expects array(0 => 1:5,12:*') to return docs where var0 is between 1 and 5 or higher than 12\n\t\tif( ! is_null($filter_docvars))\n\t\t{\n\t\t\tforeach($filter_docvars as $key => $value)\n\t\t\t{\n\t\t\t\t$query[\"filter_docvar{$key}\"] = $value;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Expects array(0 => 1:5,12:*') to return docs where funtion0 is between 1 and 5 or higher than 12\n\t\tif( ! is_null($filter_functions))\n\t\t{\n\t\t\tforeach($filter_functions as $key => $value)\n\t\t\t{\n\t\t\t\t$query[\"filter_function{$key}\"] = $value;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->set_api_call_url('search');\n\t\t\n\t\t$response = $this->api_call('GET', $query);\n\n\t\t\n\t\tswitch($response->status)\n\t\t{\n\t\t\tcase 200:\n\t\t\t\treturn $response->body;\n\t\t\tcase 400:\n\t\t\t\tlog_message('error', \"IndexTank 400: Invalid or missing argument. {$response->body}\");\n\t\t\t\treturn FALSE;\n\t\t\tcase 404:\n\t\t\t\tlog_message('error', \"IndexTank 404: No index existed for the given name. {$response->body}\");\n\t\t\t\treturn FALSE;\n\t\t\tcase 409:\n\t\t\t\tlog_message('error', \"IndexTank 409: The index was initializing. {$response->body}\");\n\t\t\t\treturn FALSE;\n\t\t\tcase 503:\n\t\t\t\tlog_message('error', \"IndexTank 503: Service unavailable. {$response->body}\");\n\t\t\t\treturn FALSE;\n\t\t\tdefault:\n\t\t\t\tlog_message('error', \"IndexTank {$response->status}: An undefined error occurred.\");\n\t\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "dc71e30f3742fdbff11a262a775aa99b", "score": "0.55898845", "text": "function get_search_results_data(){\n\t\tglobal $app, $conn;\n\t\t$req = $app->request();\n\t\t$body = json_decode($req->getBody());\n\t\t$search_data_by_dish = body->search_data_by_dish;\n\t\t$search_data_by_category = body->search_data_by_category;\n\t\t$search_data_by_region = body->search_data_by_region;\n\t\t$search_data_by_difficulty = body->search_data_by_difficulty;\n\t\t$search_data_by_time = body->search_data_by_time;\n\t\t$search_data_by_ingredient body->search_data_by_ingredient;\n\t\t/*\n\t\t$search_data_by_dish = NULL;\n\t\t$search_data_by_category = NULL;\n\t\t$search_data_by_region = NULL;\n\t\t$search_data_by_difficulty = NULL;\n\t\t$search_data_by_time = array(\"from\" => NULL, \"to\" => NULL);\n\t\t$search_data_by_ingredient = array(\"vegetable\" => NULL, \"fruit\" => array(20), \"nut\" => NULL, \"diary\" => array(12, 17), \"meat\" => NULL, \"seafood\" =>NULL, \"seasoning\" => NULL, \"other\" =>array(2));\n\t\t*/\n\t\t\n\t\t/*\n\t\t$search_data_by_ingredient_vegetable = NULL;\n\t\t$search_data_by_ingredient_fruit = NULL;\n\t\t$search_data_by_ingredient_nut = NULL;\n\t\t$search_data_by_ingredient_diary = NULL;\n\t\t$search_data_by_ingredient_meat = NULL;\n\t\t$search_data_by_ingredient_seafood = NULL;\n\t\t$search_data_by_ingredient_seasoning = NULL;\n\t\t$search_data_by_ingredient_other = array(2);\n\t\t*/\n\t\t\n\t\t$all_recipe_ids = array();\n\t\t$recipe_ids_by_dish = get_recipe_id_by_search_data(\"dish\", $search_data_by_dish);\n\t\t$recipe_ids_by_category = get_recipe_id_by_search_data(\"category\", $search_data_by_category);\n\t\t$recipe_ids_by_region = get_recipe_id_by_search_data(\"region\", $search_data_by_region);\n\t\t$recipe_ids_by_difficulty = get_recipe_id_by_search_data(\"difficulty\", $search_data_by_difficulty);\n\t\tif($search_data_by_time == NULL){\n\t\t\t$recipe_ids_by_time = NULL;\n\t\t}\n\t\telse{\n\t\t\t$recipe_ids_by_time = get_recipe_id_by_time($search_data_by_time[\"from\"], $search_data_by_time[\"to\"]);\n\t\t}\n\t\t\n\t\tarray_push($all_recipe_ids, $recipe_ids_by_dish);\n\t\tarray_push($all_recipe_ids, $recipe_ids_by_category);\n\t\tarray_push($all_recipe_ids, $recipe_ids_by_region);\n\t\tarray_push($all_recipe_ids, $recipe_ids_by_difficulty);\n\t\tarray_push($all_recipe_ids, $recipe_ids_by_time);\n\t\t\n\t\t/*\n\t\t$types = get_ingredients_types($conn);\n\t\techo \"types: \" . var_dump($types);\n\t\techo \"<br><br>\";\n\t\t*/\n\t\t\n\t\t//'vegetable','fruit','nut','diary','meat','seafood','seasoning','other'\n\t\tforeach($search_data_by_ingredient as $ingredient_type => $ingredient_data){\n\t\t\t$recipe_ids_by_ingredient = get_recipe_id_by_ingredient_type($ingredient_data, $ingredient_type);\n\t\t\tarray_push($all_recipe_ids, $recipe_ids_by_ingredient);\n\t\t}\n\t\t/*\n\t\t$recipe_ids_by_ingredient_vegetable = get_recipe_id_by_ingredient_type($conn, $search_data_by_ingredient_vegetable, \"vegetable\");\n\t\t$recipe_ids_by_ingredient_fruit = get_recipe_id_by_ingredient_type($conn, $search_data_by_ingredient_fruit, \"fruit\");\n\t\t$recipe_ids_by_ingredient_nut = get_recipe_id_by_ingredient_type($conn, $search_data_by_ingredient_nut, \"nut\");\n\t\t$recipe_ids_by_ingredient_diary = get_recipe_id_by_ingredient_type($conn, $search_data_by_ingredient_diary, \"diary\");\n\t\t$recipe_ids_by_ingredient_meat = get_recipe_id_by_ingredient_type($conn, $search_data_by_ingredient_meat, \"meat\");\n\t\t$recipe_ids_by_ingredient_seafood = get_recipe_id_by_ingredient_type($conn, $search_data_by_ingredient_seafood, \"seafood\");\n\t\t$recipe_ids_by_ingredient_seasoning = get_recipe_id_by_ingredient_type($conn, $search_data_by_ingredient_seasoning, \"seasoning\");\n\t\t$recipe_ids_by_ingredient_other = get_recipe_id_by_ingredient_type($conn, $search_data_by_ingredient_other, \"other\");\n\t\t*/\n\t\t\n\t\t\n\t\t/*\n\t\t$search_result = get_search_result_ids($recipe_ids_by_dish, $recipe_ids_by_category, $recipe_ids_by_region, $recipe_ids_by_difficulty, $recipe_ids_by_ingredient_vegetable, $recipe_ids_by_ingredient_fruit, $recipe_ids_by_ingredient_nut, $recipe_ids_by_ingredient_diary, $recipe_ids_by_ingredient_meat, $recipe_ids_by_ingredient_seafood, $recipe_ids_by_ingredient_seasoning, $recipe_ids_by_ingredient_other);\n\t\t*/\n\t\t\n\t\t$search_result = get_search_result_ids($all_recipe_ids);\n\t\techo json_encode($search_result);\n\t}", "title": "" }, { "docid": "9c8acf7a12aea320bcb24c7ea881f114", "score": "0.55855566", "text": "public function search()\n {\n $params = $this->buildElasticParams();\n \n $response = $this->client->search($params);\n \n return $this->sendSuccess(\n 'Autocomplete retrieved successfully.',\n [\n 'data' => $this->parseResults($response)\n ]\n );\n }", "title": "" }, { "docid": "7cb5462a879e34e77a2347dc0ed84b02", "score": "0.55712306", "text": "function search($query, $service=null, $start=0, $num=30) {\r\r\r\r\n\treturn $this->fetch_feed(\"/api/feed/search\", $service, $start, $num,\r\r\r\r\n\t\t\t\t null, $query);\r\r\r\r\n }", "title": "" }, { "docid": "4b9c7bbb72596a7b0da2c788a24fc122", "score": "0.5563008", "text": "public function search($input, $albumId, $extras = []);", "title": "" }, { "docid": "0a157d8f2fb5b3bc00d8604ab8c84aec", "score": "0.5562945", "text": "public function getSearch(): string;", "title": "" }, { "docid": "9cc6d13594c737bc8bd24687d620e37c", "score": "0.55607617", "text": "public function searchData() {\n\t\treturn [\n\t\t\t['', null],\n\t\t\t[Generate::string(), '0 results'],\n\t\t\t[Generate::string().' ', null],\n\t\t\t['*', '0 results'],\n\t\t\t['', '0 results'],\n\t\t];\n\t}", "title": "" }, { "docid": "1cdb0930b4681ad1f65fe1cd4454674f", "score": "0.5552612", "text": "private function getSearch()\n {\n return $this->query;\n }", "title": "" }, { "docid": "5463b5983376f579218e86dd929cfba7", "score": "0.555041", "text": "public function search() {\n\t\t$whatToSearch = $this->t9_search();\n\t\t$db = DB::getInstance();\n\t\t$users = array();\n\t\tforeach( $whatToSearch as $letters ) {\n\t\t\t$letters = ucwords($letters);\n\t\t\t$result = $db->query('SELECT * from phone_book where MATCH (name, last_name) AGAINST\n\t\t\t(\"' . $letters . '*\" IN BOOLEAN MODE) limit 0, 100');\n\t\t\tif ( ! $result ) continue;\n\t\t\t$users[] = $result;\n\t\t}\n\t\treturn count( $users ) > 0 ? $users : 'No users found';\n\t}", "title": "" }, { "docid": "c802492fc0527e2b4e10636775ea307b", "score": "0.5535505", "text": "public function search()\n {\n // populate fields\n $query = array(\n // Starting date for the search.\n self::START => $this->start,\n // Ending date for the search.\n self::END => $this->end);\n // call request method\n return $this->request(self::SEARCH, $query);\n }", "title": "" }, { "docid": "fd1ec27454b1c907dcac2ee8070f231c", "score": "0.5525864", "text": "public function search()\n\t{\n\t\t$result = false;\n\t\tif (isset($this->searchTerm)) {\n\t\t\t$this->_trailUrl = self::TRAILINGSEARCH . urlencode($this->searchTerm);\n\t\t\tif ($this->getUrl() !== false) {\n\t\t\t\tif ($ret = $this->_html->find('div.product-info, div.title', 1)) {\n\t\t\t\t\t$this->_title = trim($ret->plaintext);\n\t\t\t\t\t$title = preg_replace('/XXX/', '', $ret->plaintext);\n\t\t\t\t\t$title = preg_replace('/\\(.*?\\)|[-._]/i', ' ', $title);\n\t\t\t\t\t$title = trim($title);\n\t\t\t\t\tif ($ret = $ret->find('a', 0)) {\n\t\t\t\t\t\t$this->_trailUrl = trim($ret->href);\n\t\t\t\t\t\tif ($this->getUrl() !== false) {\n\t\t\t\t\t\t\tif ($ret = $this->_html->find('#link-to-this', 0)) {\n\t\t\t\t\t\t\t\t$this->_directUrl = trim($ret->href);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsimilar_text(strtolower($this->searchTerm), strtolower($title), $p);\n\t\t\t\t\t\t\tif ($p >= 90) {\n\t\t\t\t\t\t\t\t$result = true;\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\treturn $result;\n\t}", "title": "" }, { "docid": "cbadd0869b08081984e4c1e01332895c", "score": "0.5524223", "text": "public function getContacts($search_filter = \"\", $query_filter = null): array;", "title": "" }, { "docid": "b51573e858adc84a628a38ac04c8be02", "score": "0.55236363", "text": "public function getResults($query);", "title": "" }, { "docid": "1738db0b063b952e7187af9becff060e", "score": "0.55151486", "text": "function searchResults($keywords){\n\n\t$data = array();\n\t$where = \"\";\n\n\tesc($keywords);\n\n\t$keywords = preg_split('/[\\s]+/', $keywords);\n\t$total_keywords = count($keywords);\n\n\tforeach ($keywords as $key => $keyword) {\n\t\t\n\t\t$where .= \"keywords LIKE '%$keyword%'\";\n\n\t\tif($key != ($total_keywords - 1)){\n\n\t\t\t$where .= \" AND \";\n\t\t\n\t\t}\n\t}\n\n\t$query = \"SELECT * FROM articles WHERE $where ORDER BY date DESC\";\n\n\n\n\t$results = mysql_query($query);\n\n\tif ($results)\n\t{\n\t\t$results_num = mysql_num_rows($results);\n\t}\n\telse\n\t{\n\t\t$results_num = 0;\n\t}\n\n\tif($results_num === 0){\n\n\t\treturn false;\n\t}else{\n\n\t\twhile($record = mysql_fetch_assoc($results)){\n\n\t\t\tarray_push($data, $record);\n\t\t}\n\n\t\treturn $data;\n\t\n\t}\n\n}", "title": "" }, { "docid": "72be577e9e525c0c4843c672866e32fe", "score": "0.5494898", "text": "public function GetGALSearchResults($searchquery, $searchrange, $searchpicture) {\n ZLog::Write(LOGLEVEL_DEBUG, \"Combined->GetGALSearchResults()\");\n $i = $this->getSearchBackend(ISearchProvider::SEARCH_GAL);\n\n $result = false;\n if ($i !== false) {\n $result = $this->backends[$i]->GetGALSearchResults($searchquery, $searchrange, $searchpicture);\n }\n\n return $result;\n }", "title": "" }, { "docid": "2271162041a892f01e617702f5e80179", "score": "0.5492271", "text": "public function search() {\n\t\t$id = Auth::user()-> id;\t\n\t\t$inputs = array(\n\t\t\t'maxAmount'=> Input::get('maxLoan'),\n\t\t\t'minAmount'=> Input::get('minLoan'),\n\t\t\t'maxRate'=> Input::get('maxRate'),\n\t\t\t'minRate'=> Input::get('minRate'),\n\t\t\t'maxTerm'=> Input::get('maxTerm'),\n\t\t\t'minTerm'=> Input::get('minTerm'),\n\t\t\t//'page'=> Input::get('page')\n\t\t);\n\t\t//search for matched application\n\t\t$numbers = LoanApp::getTotal($id);\n\t\t$results = LoanApp::search($inputs, $id);\n\t\t$data = array('total'=> $numbers, 'results'=> $results);\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "b1f60b88b0559d8808d16bb40cd34f25", "score": "0.5483381", "text": "public function search()\n\t{\n\t\t$term = $this->input->get('term');\n\t\t$results = Auto_Modeler_ORM::factory('client')->search($term);\n\t\t$this->view->results = $results;\n\t}", "title": "" }, { "docid": "35069ae1b51b9cad574b3b9d218e470f", "score": "0.5480839", "text": "public function rawSearch(array $params = []) {\n\t\t\n\t\tif (!$this->isClientReady()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\treturn $this->getClient()->search($params);\n\t\t} catch (ElasticsearchException $e) {\n\t\t\t$this->logger->error($e);\n\t\t}\n\t\t\n\t\treturn [];\n\t}", "title": "" }, { "docid": "851511f5a9d230dc46b8784e26074350", "score": "0.54801744", "text": "public function getKeywordSearch();", "title": "" }, { "docid": "80c8743d4d7bff38cbb64ff49e34fc29", "score": "0.54723865", "text": "public function search() {\n try {\n if(\\Request::has('query')){\n $query = \\Request::get('query');\n }else{\n $query= '';\n }\n return json_encode($this->repository->search($query));\n } catch (ModelNotFoundException $e) {\n return $e->getMessage();\n }\n }", "title": "" }, { "docid": "aadbe6e7f62b6a17b7a870186fd391b7", "score": "0.5465918", "text": "public function getSearchData() {\n return $this->run('getSearchData', array());\n }", "title": "" }, { "docid": "5429abeaf8c2959c245ae2ea4e060f02", "score": "0.5462665", "text": "protected function search()\n {\n \treturn Phpfox::getLib('search');\n }", "title": "" }, { "docid": "a5e12d58165afb5906a34b0c5266d290", "score": "0.5455917", "text": "function search($conn)\n{\n\t// include replace char function\n\tinclude \"charConv.php\";\n\n\t//get all inputs\n\t$getLnop = $_POST['lnop'];\n\t$getLn = $_POST['ln'];\n\t$getSjop = $_POST['sjop'];\n\t$getSubj = $_POST['subj'];\n\t$getJnop = $_POST['jnop'];\n\t$getJn = $_POST['jn'];\n\t$getTaxop = $_POST['taxop'];\n\t$getTaxon = $_POST['taxon'];\n\t$getPubop = $_POST['pubop'];\n\t$getPub = $_POST['pub'];\n\t$getYrop = $_POST['yrop'];\n\t$getYear = $_POST['year'];\n\t$getQuery = $_POST['query'];\n\t\n\t//set empty string\n\t$ln=\"\";\n\t$subj=\"\";\n\t$jn=\"\";\n\t$taxon=\"\";\n\t$year=\"\";\n\t$pub=\"\";\n\t//geneate value\n\tif ($getLn!=\"\")\n\t{\n\t\t$ln=\"au \".$getLnop.\" \".\"'\".$getLn.\"'\";\n\t}\n\tif ($getSubj!=\"\")\n\t{\n\t\t$subj=\"su \".$getSjop.\" \".\"'\".$getSubj.\"'\";\n\t}\n\tif ($getJn!=\"\")\n\t{\n\t\t$jn=\"jn \".$getJnop.\" \".\"'\".$getJn.\"'\";\n\t}\n\tif ($getTaxon!=\"\")\n\t{\n\t\t$taxon=\"taxon \".$getTaxop.\" \".\"'\".$getTaxon.\"'\";\n\t}\n\tif ($getPub!=\"\")\n\t{\n\t\t$pub=\"pub \".$getPubop.\" \".\"'\".$getPub.\"'\";\n\t}\n\tif ($getYear!=\"\")\n\t{\n\t\t$year=\"date \".$getYrop.\" '\".$getYear.\"'\";\n\t}\n\t\n\t//generate full query \n\t// start from a empty $query\n\t// if $query not empty add \" AND \"\n\t$Query=\"\";\n\tif ($ln!=\"\")\n\t{\n\t\t$Query=$Query.$ln;\n\t}\n\tif ($subj!=\"\")\n\t{\n\t\tif($Query!=\"\")\n\t\t\t$Query=$Query.\" AND \";\n\t\t$Query=$Query.$subj;\n\t}\n\tif ($jn!=\"\")\n\t{\n\t\tif($Query!=\"\")\n\t\t\t$Query=$Query.\" AND \";\n\t\t$Query=$Query.$jn;\n\t}\n\tif ($taxon!=\"\")\n\t{\n\t\tif($Query!=\"\")\n\t\t\t$Query=$Query.\" AND \";\n\t\t$Query=$Query.$taxon;\n\t}\n\tif ($year!=\"\")\n\t{\n\t\tif($Query!=\"\")\n\t\t\t$Query=$Query.\" AND \";\n\t\t$Query=$Query.$year;\n\t}\n\tif ($pub!=\"\")\n\t{\n\t\tif($Query!=\"\")\n\t\t\t$Query=$Query.\" AND \";\n\t\t$Query=$Query.$pub;\n\t}\n\tif ($getQuery!=\"\")\n\t{\n\t\tif($Query!=\"\")\n\t\t\t$Query=$Query.\" AND \";\n\t\t$Query=$Query.$getQuery;\n\t}\n\t\n\t//if we got empty\n\tif ($Query==\"\")\n\t{\n\t\techo \"<br>\n\t\t\t<h2>There was an error in formatting the query.</h2>\t\n\t\t\t<p>You must specify a type of search.</p>\n\t\t\t<p>Or use advanced query with either =. !=, > or <, e.g.: <br> example: taxon = 'Tyrannosaurus'<p>\";\n\t}\n\telse\n\t{\n\t\t$search_sql=\"select distinct auths.au,auths.fn,ref.rid,ref.ti,ref.date,ref.jn,ref.jnfk,ref.vo,\n\t\tref.pg,ref.pub,ref.type,ref.edvo,ref.trans,ref.tt,ref.ts,ref.ed from ref,subj,tax,auths \n\t\twhere ref.rid=subj.rid and ref.rid=tax.rid and ref.rid = auths.rid and (\".$Query.\") ORDER BY ref.date\";\n\t\techo \"Query: \".$Query;\n\t\techo \"</br>\";\n\t\t\n\t\t//connect to db\n\t\t//require_once 'conn.php'; \n\n\t\t$getSearch = mysqli_query($conn,$search_sql);\n\t\tif (!$getSearch) {\n\t\t\tprintf(\"Please check your inputs, Some <B>Grammatical Errors!</B>\");\n\t\t\t//printf(\"Error: %s\\n\", mysqli_error($conn));\n\n\t\t\texit();\n\t\t}\n\t\t//print the count of result\n\t\techo mysqli_num_rows($getSearch).\" references satisfied the query</br>\";\n\n\t\t// print result\n\t\twhile($row = mysqli_fetch_array($getSearch)) \n\t\t{\n\t\t\t$result= \"<p>\".$row['au'].\", \".$row['fn'];\n\t\t\t\n\t\t\t// some first name could include '.'\n\t\t\tif (strpos($row['fn'],'.') == false) \n\t\t\t{\n\t\t\t\t$result=$result.\". \";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$result=$result.\" \";\n\t\t\t}\n\t\t\t\n\t\t\t$result=$result.$row['date'].\". \";\n\t\t\t$copyOfTitle=$row['ti'];\n\t\t\t\n\t\t\t//if find '^'\n\t\t\t// replace it as Italic\n\t\t\twhile (strpos($copyOfTitle,'^')!== false)\n\t\t\t{\n\t\t\t\t//repace first ^ as <i>, and second as </I>\n\t\t\t\t$copyOfTitle=str_replace_limit('^','<I>',$copyOfTitle,1);\n\t\t\t\t$copyOfTitle=str_replace_limit('^','</I>',$copyOfTitle,1);\n\t\t\t}\n\t\t\t\n\t\t\t//generate results\n\t\t\t$result=$result.$copyOfTitle.\"</I>\".\". \";\n\t\t\tif ($row['tt']!=\"\")\n\t\t\t\t$result=$result.\"[in \".$row['tt'].\"]\";\n\t\t\t$result=$result.\" \".$row['ts'].\" \".$row['jn'].\" \".$row['vo'].\". \".\" \".$row['pub'].\" \".$row['ed'].$row['pg'].\".</p>\";\n\t\t\t\n\t\t\t// place bfv code to html code\n\t\t\techo strtr($result, $GLOBALS['normalizeChars']);\n\t\t\t//echo $result;\n\t\t}\n\t}\n\t\n\t//close connection\n\tmysqli_close($conn);\n\n}", "title": "" }, { "docid": "ef6ac91fb942dbafae2719859c0f81dc", "score": "0.5448545", "text": "public function getSearchQuery($data = null) {\n\t\t// legacy usage: $data was defaulting to $_REQUEST, parameter not passed in doc.silverstripe.com tutorials\n\t\tif(!isset($data)) $data = $_REQUEST;\n\t\t\n\t\treturn Convert::raw2xml($data['Search']);\n\t}", "title": "" }, { "docid": "b5f0e369cb736eac69be27fa869b291c", "score": "0.5445265", "text": "abstract public function search(): array;", "title": "" }, { "docid": "bcf5f3c0fc35756d04ed7f05ba7c85b3", "score": "0.5444427", "text": "public function search() {\n // without an id we just redirect to the error page as we need the code id to find it in the database\n if (!isset($_GET['term']))\n return call('codes', 'error');\n\n $codes = Display::search($_GET['term']);\n require_once('view/display/search.php');\n }", "title": "" }, { "docid": "65cf7ee15296f5b08f05c058bf446ebe", "score": "0.54408115", "text": "public function search()\n {\n $results_per_slice = 6; //TODO: put this var in constants file\n\n //Search form validation\n $input = Input::all();\n $rules = array(\n 'user_address' => 'string',\n 'subject' => 'string',\n 'keywords' => 'string',\n 'prof_o_acad' => 'in:academia,profesor'\n );\n $validator = Validator::make($input, $rules);\n if($validator->fails())\n return Redirect::route('home');\n\n //prepare all vars\n $address = Input::has('user_address') ? $input['user_address'] : '';\n $check_address = ($address=='') ? false : true;\n $prof_o_acad = Input::has('prof_o_acad') ? $input['prof_o_acad'] : 'academia';\n $subject = Input::has('subject') ? $input['subject'] : 'all';\n if($subject=='all') {\n $check_subject = false;\n $subj_id = null;\n } else {\n $check_subject = true;\n }\n $keywords = Input::has('keywords') ? $input['keywords'] : '';\n $check_keywords = ($keywords=='') ? false : true;\n $search_distance = Input::has('search_distance') ? $input['search_distance'] : 'rang0';\n $price = Input::has('price') ? $input['price'] : 'all';\n\n //OBTAIN USER ADDRESS, LATITUDE and LONGITUDE\n if($check_address) { //if address provided, geocode address\n $geodata = Geocoding::geocode($address);\n if($geodata) {\n $user_address = $geodata[2];\n $user_lat = $geodata[0];\n $user_lon = $geodata[1];\n } else { //if geocoding fails\n $check_address = false;\n }\n }\n if(!$check_address) { //if address not provided or geocoding fails default to Barcelona\n $user_address = 'Barcelona'; //TODO: put this 3 vars in constants file\n $user_lat = 41.3850639;\n $user_lon = 2.1734035;\n }\n\n //new db search\n if($prof_o_acad=='profesor') {\n if ($check_subject) { //filter by subject\n $subj_id = Subject::where('name', $subject)->pluck('id');\n if($check_keywords) { //there are keywords\n $keywords = str_replace(',',' ',$keywords);\n $kw_array = explode(\" \", $keywords);\n $searchStr = \"\";\n foreach($kw_array as $kw) {\n if($kw!='') $searchStr .= \"+\".$kw.\"* \";\n }\n $results = DB::select(DB::raw(\"\n SELECT t1.*, COUNT(t1.teacher_id) AS aggregated\n FROM (\n SELECT\n teacher_lessons.*,\n users.slug,\n users.name,\n users.lastname,\n users.email,\n users.phone,\n users.avatar,\n users.username,\n AVG(t_lesson_ratings.value) AS lesson_avg_rating,\n teachers_average_ratings.teacher_avg_rating,\n users.status,\n users.deleted_at\n FROM teacher_lessons\n LEFT JOIN teachers ON teachers.id = teacher_lessons.teacher_id\n LEFT JOIN users ON users.id = teachers.user_id\n LEFT JOIN teachers_average_ratings ON teachers_average_ratings.teacher_id = teachers.id\n LEFT JOIN t_lesson_ratings ON t_lesson_ratings.teacher_lesson_id = teacher_lessons.id\n WHERE teacher_lessons.subject_id = ?\n AND users.deleted_at IS NULL\n AND MATCH(teacher_lessons.description,teacher_lessons.title) AGAINST(? IN BOOLEAN MODE)\n GROUP BY teacher_lessons.id\n ) AS t1\n GROUP BY t1.teacher_id\n ORDER BY t1.lesson_avg_rating DESC, t1.teacher_avg_rating DESC, t1.id ASC\n \"),[$subj_id,$searchStr]);\n } else { //no keywords\n $results = DB::select(DB::raw(\"\n SELECT t1.*, COUNT(t1.teacher_id) AS aggregated\n FROM (\n SELECT\n teacher_lessons.*,\n users.slug,\n users.name,\n users.lastname,\n users.email,\n users.phone,\n users.avatar,\n users.username,\n AVG(t_lesson_ratings.value) AS lesson_avg_rating,\n teachers_average_ratings.teacher_avg_rating,\n users.status,\n users.deleted_at\n FROM teacher_lessons\n LEFT JOIN teachers ON teachers.id = teacher_lessons.teacher_id\n LEFT JOIN users ON users.id = teachers.user_id\n LEFT JOIN teachers_average_ratings ON teachers_average_ratings.teacher_id = teachers.id\n LEFT JOIN t_lesson_ratings ON t_lesson_ratings.teacher_lesson_id = teacher_lessons.id\n WHERE teacher_lessons.subject_id = ?\n AND users.deleted_at IS NULL\n GROUP BY teacher_lessons.id\n ) AS t1\n GROUP BY t1.teacher_id\n ORDER BY t1.lesson_avg_rating DESC, t1.teacher_avg_rating DESC, t1.id ASC\n \"),[$subj_id]);\n }\n } else { //search all subjects\n if($check_keywords) { //teachers, without subject, with keywords\n $keywords = str_replace(',',' ',$keywords);\n $kw_array = explode(\" \", $keywords);\n $searchStr = \"\";\n foreach($kw_array as $kw) {\n if($kw!='')\n $searchStr .= \"+\".$kw.\"* \";\n }\n $results = DB::select(DB::raw(\"\n SELECT t1.*, COUNT(t1.teacher_id) AS aggregated\n FROM (\n SELECT\n teacher_lessons.*,\n users.slug,\n users.name,\n users.lastname,\n users.email,\n users.phone,\n users.avatar,\n users.username,\n AVG(t_lesson_ratings.value) AS lesson_avg_rating,\n teachers_average_ratings.teacher_avg_rating,\n users.status,\n users.deleted_at\n FROM teacher_lessons\n LEFT JOIN teachers ON teachers.id = teacher_lessons.teacher_id\n LEFT JOIN users ON users.id = teachers.user_id\n LEFT JOIN teachers_average_ratings ON teachers_average_ratings.teacher_id = teachers.id\n LEFT JOIN t_lesson_ratings ON t_lesson_ratings.teacher_lesson_id = teacher_lessons.id\n WHERE users.deleted_at IS NULL\n AND MATCH(teacher_lessons.description,teacher_lessons.title) AGAINST(? IN BOOLEAN MODE)\n GROUP BY teacher_lessons.id\n ) AS t1\n GROUP BY t1.teacher_id\n ORDER BY t1.lesson_avg_rating DESC, t1.teacher_avg_rating DESC, t1.id ASC\n \"),[$searchStr]);\n } else { //teachers, no subject, no keywords\n $results = DB::select(DB::raw(\"\n SELECT t1.*, COUNT(t1.teacher_id) AS aggregated\n FROM (\n SELECT\n teacher_lessons.*,\n users.slug,\n users.name,\n users.lastname,\n users.email,\n users.phone,\n users.avatar,\n users.username,\n AVG(t_lesson_ratings.value) AS lesson_avg_rating,\n teachers_average_ratings.teacher_avg_rating,\n users.status,\n users.deleted_at\n FROM teacher_lessons\n LEFT JOIN teachers ON teachers.id = teacher_lessons.teacher_id\n LEFT JOIN users ON users.id = teachers.user_id\n LEFT JOIN teachers_average_ratings ON teachers_average_ratings.teacher_id = teachers.id\n LEFT JOIN t_lesson_ratings ON t_lesson_ratings.teacher_lesson_id = teacher_lessons.id\n WHERE users.deleted_at IS NULL\n GROUP BY teacher_lessons.id\n ) AS t1\n GROUP BY t1.teacher_id\n ORDER BY t1.lesson_avg_rating DESC, t1.teacher_avg_rating DESC, t1.id ASC\n \"));\n }\n }\n } else { //school\n if ($check_subject) { //school, with subject, with keywords\n $subj_id = Subject::where('name', $subject)->pluck('id');\n if($check_keywords) { //filter by keywords\n $keywords = str_replace(',',' ',$keywords);\n $kw_array = explode(\" \", $keywords);\n $searchStr = \"\";\n foreach($kw_array as $kw) {\n if($kw!='')\n $searchStr .= \"+\".$kw.\"* \";\n }\n $results = DB::select(DB::raw(\"\n SELECT t1.*, COUNT(t1.school_id) AS aggregated\n FROM (\n SELECT\n school_lessons.*,\n schools.slug,\n schools.name,\n schools.email,\n schools.phone,\n schools.logo,\n AVG(s_lesson_ratings.value) as lesson_avg_rating,\n schools_average_ratings.school_avg_rating,\n schools.status,\n schools.deleted_at\n FROM school_lessons\n LEFT JOIN schools ON schools.id = school_lessons.school_id\n LEFT JOIN schools_average_ratings ON schools_average_ratings.school_id = schools.id\n LEFT JOIN s_lesson_ratings ON s_lesson_ratings.school_lesson_id = school_lessons.id\n WHERE school_lessons.subject_id = ?\n AND schools.deleted_at IS NULL\n AND (schools.status <> 'Crawled' OR schools.status IS NULL)\n AND MATCH(school_lessons.description,school_lessons.title) AGAINST(? IN BOOLEAN MODE)\n GROUP BY school_lessons.id\n ) AS t1\n GROUP BY t1.school_id\n ORDER BY t1.lesson_avg_rating DESC, t1.school_avg_rating DESC, t1.id ASC\n \"),[$subj_id,$searchStr]);\n } else { //school, with subject, without keywords\n $results = DB::select(DB::raw(\"\n SELECT t1.*, COUNT(t1.school_id) AS aggregated\n FROM (\n SELECT\n school_lessons.*,\n schools.slug,\n schools.name,\n schools.email,\n schools.phone,\n schools.logo,\n AVG(s_lesson_ratings.value) as lesson_avg_rating,\n schools_average_ratings.school_avg_rating,\n schools.status,\n schools.deleted_at\n FROM school_lessons\n LEFT JOIN schools ON schools.id = school_lessons.school_id\n LEFT JOIN schools_average_ratings ON schools_average_ratings.school_id = schools.id\n LEFT JOIN s_lesson_ratings ON s_lesson_ratings.school_lesson_id = school_lessons.id\n WHERE school_lessons.subject_id = ?\n AND schools.deleted_at IS NULL\n AND (schools.status <> 'Crawled' OR schools.status IS NULL)\n GROUP BY school_lessons.id\n ) AS t1\n GROUP BY t1.school_id\n ORDER BY t1.lesson_avg_rating DESC, t1.school_avg_rating DESC, t1.id ASC\n \"),[$subj_id]);\n }\n } else { //search all subjects\n if($check_keywords) { //school, without subject, with keywords\n $keywords = str_replace(',',' ',$keywords);\n $kw_array = explode(\" \", $keywords);\n $searchStr = \"\";\n foreach($kw_array as $kw) {\n if($kw!='')\n $searchStr .= \"+\".$kw.\"* \";\n }\n $results = DB::select(DB::raw(\"\n SELECT t1.*, COUNT(t1.school_id) AS aggregated\n FROM (\n SELECT\n school_lessons.*,\n schools.slug,\n schools.name,\n schools.email,\n schools.phone,\n schools.logo,\n AVG(s_lesson_ratings.value) as lesson_avg_rating,\n schools_average_ratings.school_avg_rating,\n schools.status,\n schools.deleted_at\n FROM school_lessons\n LEFT JOIN schools ON schools.id = school_lessons.school_id\n LEFT JOIN schools_average_ratings ON schools_average_ratings.school_id = schools.id\n LEFT JOIN s_lesson_ratings ON s_lesson_ratings.school_lesson_id = school_lessons.id\n WHERE schools.deleted_at IS NULL\n AND (schools.status <> 'Crawled' OR schools.status IS NULL)\n AND MATCH(school_lessons.description,school_lessons.title) AGAINST(? IN BOOLEAN MODE)\n GROUP BY school_lessons.id\n ) AS t1\n GROUP BY t1.school_id\n ORDER BY t1.lesson_avg_rating DESC, t1.school_avg_rating DESC, t1.id ASC\n \"),[$searchStr]);\n } else { //school, without subject, without keywords\n $results = DB::select(DB::raw(\"\n SELECT t1.*, COUNT(t1.school_id) AS aggregated\n FROM (\n SELECT\n school_lessons.*,\n schools.slug,\n schools.name,\n schools.email,\n schools.phone,\n schools.logo,\n AVG(s_lesson_ratings.value) as lesson_avg_rating,\n schools_average_ratings.school_avg_rating,\n schools.status,\n schools.deleted_at\n FROM school_lessons\n LEFT JOIN schools ON schools.id = school_lessons.school_id\n LEFT JOIN schools_average_ratings ON schools_average_ratings.school_id = schools.id\n LEFT JOIN s_lesson_ratings ON s_lesson_ratings.school_lesson_id = school_lessons.id\n WHERE schools.deleted_at IS NULL\n AND (schools.status <> 'Crawled' OR schools.status IS NULL)\n GROUP BY school_lessons.id\n ) AS t1\n GROUP BY t1.school_id\n ORDER BY t1.lesson_avg_rating DESC, t1.school_avg_rating DESC, t1.id ASC\n \"));\n }\n }\n }\n $results = new Collection($results); //array to collection\n $resultsBAK = $results;\n\n //===============================================================================\n // Filter results that belong to teachers whose payments are not up to date\n // TO BE IMPLEMENTED LATER?\n //===============================================================================\n // if ($prof_o_acad == 'profesor') {\n // $results_by_subject = $results_by_subject->filter(function ($result) {\n // $lesson = TeacherLesson::findOrFail($result->id);\n // $teacher = $lesson->teacher()->first();\n // $user = $teacher->user()->first();\n //\n // return $user->thisUserPaymentIsCurrent();\n // });\n // }\n\n // Filter by distance and price\n $results = Geocoding::findWithinDistance($user_lat,$user_lon,$search_distance,$results); //filter results within distance boundaries\n $results = Milprofes::findWithinPrice($price,$prof_o_acad,$results);\n\n //seek for results within <50 kms if first search (from home) has no results within <2 or <5 kms\n if(isset($input['first_search']) && $resultsBAK->count() != 0) {\n while($results->count() == 0) {\n if($search_distance == 'rang0')\n $search_distance = 'rang1';\n elseif($search_distance == 'rang1')\n $search_distance = 'rang2';\n elseif($search_distance == 'rang2')\n break; //nothing else we can do (any results are further than 50 km)\n $results = Geocoding::findWithinDistance($user_lat,$user_lon,$search_distance,$resultsBAK); //filter results within distance boundaries\n $results = Milprofes::findWithinPrice($price,$prof_o_acad,$results);\n }\n }\n\n //Get ratings, availabilities, display name and subjects\n if($prof_o_acad=='profesor'){\n foreach($results as $result)\n {\n //get display name\n if($result->lastname)\n $result->displayName = ucwords($result->name).' '.substr(ucwords($result->lastname),0,1).'.';\n else\n $result->displayName = ucwords($result->name);\n //round teacher avg rating\n if($result->teacher_avg_rating)\n $result->teacher_avg_rating = round((float) $result->teacher_avg_rating,1);\n else\n $result->teacher_avg_rating = (float) 3.0;\n //get availabilities\n $teacher = TeacherLesson::findOrFail($result->id)->teacher()->first();\n $result->availability = $teacher->availabilities()->get();\n //get number of reviews and lesson avg rating\n $result->number_of_reviews = TeacherLesson::findOrFail($result->id)->getNumberOfReviews();\n if(!$result->number_of_reviews)\n $result->lesson_avg_rating = (float) 3.0;\n else\n $result->lesson_avg_rating = round((float) $result->lesson_avg_rating,1);\n //get lesson subject\n if($check_subject)\n $result->subject = $subject;\n else\n $result->subject = TeacherLesson::findOrFail($result->id)->subject()->first()->name;\n }\n } else {\n foreach($results as $result)\n {\n //get school avg rating\n if($result->school_avg_rating)\n $result->school_avg_rating = round((float) $result->school_avg_rating,1);\n else\n $result->school_avg_rating = (float) 3.0;\n //get availabilities\n $result->availability = SchoolLesson::findOrFail($result->id)->availabilities()->get();\n //get number of reviews and lesson avg rating\n $result->number_of_reviews = SchoolLesson::findOrFail($result->id)->getNumberOfReviews();\n if(!$result->number_of_reviews)\n $result->lesson_avg_rating = (float) 3.0;\n else\n $result->lesson_avg_rating = round((float) $result->lesson_avg_rating,1);\n //get lesson subject\n if($check_subject)\n $result->subject = $subject;\n else\n $result->subject = SchoolLesson::findOrFail($result->id)->subject()->first()->name;\n }\n }\n\n //Sort results by distance, lesson rating, teacher/school rating and id //TODO: posiblemente obsoleto cuando se implemente order by en página de resultados\n if($prof_o_acad=='profesor') {\n $results = $results->sortBy(function($r) {\n $distInt = $r->dist_to_user; //distance is always lesser than 50 km, so we only need to left pad one space with one 0\n $distStrPad = ($distInt < 10) ? '0'.$distInt : (string) $distInt;\n $lesson_rating_reversed = str_pad((string) round((500 - 100*$r->lesson_avg_rating), 0),3,'0', STR_PAD_LEFT);\n $teacher_rating_reversed = str_pad((string) round((500 - 100*$r->teacher_avg_rating), 0),3,'0', STR_PAD_LEFT);\n $idStr = (string) $r->id; //id can be a number of any length, but I don't expect it to be a value over a 100 000 000\n $idStrPad = str_pad($idStr, 9, '0', STR_PAD_LEFT);\n\n return sprintf('%s%s%s%s', $distStrPad, $lesson_rating_reversed, $teacher_rating_reversed, $idStrPad);\n });\n } else {\n $results = $results->sortBy(function($r) {\n $distInt = $r->dist_to_user;\n $distStrPad = ($distInt < 10) ? '0'.$distInt : (string) $distInt;\n $lesson_rating_reversed = str_pad((string) round((500 - 100*$r->lesson_avg_rating), 0),3,'0', STR_PAD_LEFT);\n $school_rating_reversed = str_pad((string) round((500 - 100*$r->school_avg_rating), 0),3,'0', STR_PAD_LEFT);\n $idStr = (string) $r->id;\n $idStrPad = str_pad($idStr, 9, '0', STR_PAD_LEFT);\n\n return sprintf('%s%s%s%s', $distStrPad, $lesson_rating_reversed, $school_rating_reversed, $idStrPad);\n });\n }\n\n //no more filters, results sorted >>>> PAGINATION of results\n $total_results = $results->count(); //update count\n $max_slices = ceil($total_results / $results_per_slice);\n $slices_showing = Input::has('slices_showing') ? (int) $input['slices_showing'] : 0;\n $sl_offset = $slices_showing * $results_per_slice;\n $sl_length = $results_per_slice;\n $results = $results->slice($sl_offset,$sl_length);\n ++$slices_showing;\n// $display_show_more = ($total_results==0 || $slices_showing == $max_slices) ? false : true;\n $show_more = ($total_results==0 || $slices_showing == $max_slices) ? 'no' : 'yes';\n\n //set GoogleMap\n if ($search_distance=='rang2') {\n $max_radius = (string) 50*1000;\n } else if ($search_distance=='rang1') {\n $max_radius = (string) 5*1000;\n } else { //if rang0, any other case also defaults to rang0\n $max_radius = (string) 2*1000;\n }\n $config = array();\n $config['center'] = $user_lat.','.$user_lon;\n if($search_distance=='rang2')\n $config['zoom'] = '7'; //TODO: PASAR A CONFIG constants\n else if($search_distance=='rang1')\n $config['zoom'] = '11';\n else //rang0\n $config['zoom'] = '12';\n $config['disableMapTypeControl'] = true;\n $config['https'] = true;\n $config['disableStreetViewControl'] = true;\n $config['disableDoubleClickZoom'] = true;\n $config['disableNavigationControl'] = true;\n $config['disableScaleControl'] = true;\n $config['map_height'] = '175px';\n $config['scrollwheel'] = false;\n $config['zoomControlStyle'] = 'SMALL';\n $config['zoomControlPosition'] = 'TOP_RIGHT';\n Gmaps::initialize($config);\n $marker = array();\n $marker['position'] = $user_lat.','.$user_lon;\n $marker['icon'] = asset('img/marcador-mapa.png');\n Gmaps::add_marker($marker); //add student marker (center)\n $circle = array();\n $circle['center'] = $user_lat.','.$user_lon;\n $circle['radius'] = $max_radius;\n $circle['strokeColor'] = '#d20500';\n $circle['strokeOpacity'] = '0.2';\n $circle['strokeWeight'] = '1';\n $circle['fillColor'] = '#d20500';\n $circle['fillOpacity'] = '0.1';\n $circle['clickable'] = false;\n Gmaps::add_circle($circle);\n\n $gmap = Gmaps::create_map(); //generate gmap html and JS code with the given options\n\n /* GMap Static image generation */\n $Zoom = $config['zoom'];\n $Marker = asset('img/marcador-mapa.png');\n $MapLat = $user_lat;\n $MapLng = $user_lon;\n $MapRadius = $max_radius/1000;\n $MapFill = 'd65441';\n $MapBorder = 'd22f1a';\n $MapWidth = 300;//198;\n $MapHeight = 170;\n $EncString = Geocoding::GMapCircle($MapLat,$MapLng, $MapRadius); // Encode a circle over Earth\n $MapAPI = 'https://maps.google.com/maps/api/staticmap?';\n $MapImgURL = $MapAPI.'center='.$MapLat.','.$MapLng.\n '&zoom='.$Zoom.\n '&size='.$MapWidth.'x'.$MapHeight.\n '&markers=icon:'.$Marker.'|'.$MapLat.','.$MapLng.\n '&path=fillcolor:0x'.$MapFill.'33%7Ccolor:0x'.$MapBorder.'00%7Cenc:'.$EncString.\n '&sensor=false';\n\n //Registrar búsqueda en base de datos\n $search_subj_id = (!isset($subj_id)) ? null : $subj_id;\n $search_user_address = (!isset($user_address)) ? 'Sin dirección' : $user_address;\n $search = new Search();\n $search->address = $search_user_address;\n $search->subject_id = $search_subj_id;\n $search->keywords = $keywords;\n $search->type = $prof_o_acad;\n $search->results = (int) $total_results;\n $search->save();\n\n return View::make('searchresults', compact(\n 'gmap',\n 'MapImgURL',\n 'total_results',\n 'slices_showing',\n// 'display_show_more',\n 'show_more',\n 'results',\n 'prof_o_acad',\n 'subject',\n 'user_lat',\n 'user_lon',\n 'user_address',\n 'subj_id',\n 'search_distance',\n 'keywords',\n 'price'\n ));\n\n }", "title": "" }, { "docid": "4bf9bb88afbc5ee3c2d47afa366f28c2", "score": "0.5428256", "text": "public function getSearchValue();", "title": "" }, { "docid": "18de73dc31f3081612fd038d0f9527a4", "score": "0.54281265", "text": "public function tool_coursesearch_search($array) {\n global $CFG, $USER, $DB;\n $config = $this->tool_coursesearch_solr_params();\n $qry = stripslashes(optional_param('search', '', PARAM_TEXT));\n $offset = isset($array['offset']) ? $array['offset'] : 0;\n $count = isset($array['limit']) ? $array['limit'] : 20; // TODO input from user how many results perpage.\n $sort = isset($array['sortmenu']) ? $array['sortmenu'] : 'score';\n $order = isset($array['order']) ? $array['order'] : 'asc';\n //$sort = optional_param('sortmenu', array_key_exists('sortmenu', $array) ? $array['sortmenu'] : 'score', PARAM_TEXT);\n //$order = optional_param('order', 'desc', PARAM_TEXT);\n $type = optional_param('type', 'all', PARAM_TEXT);\n $filtercheckbox = optional_param('filtercheckbox', '0', PARAM_TEXT);\n $isdym = (isset($_GET['isdym'])) ? $_GET['isdym'] : 0;\n\n require_once(\"$CFG->dirroot/$CFG->admin/tool/coursesearch/coursesearch_resultsui_form.php\");\n $mform = new coursesearch_resultsui_form();\n\n $fq = '';\n if ($type !== 'all') {\n $fq .= ' +type:' . $type . ' ';\n }\n\n $institution_filter = $this->tool_coursesearch_query_filter();\n\n $fq .= \"+ {$institution_filter}\";\n\n if ($filtercheckbox === '0') {\n $searchfromtime = optional_param_array('searchfromtime', '', PARAM_TEXT);\n if (!empty($searchfromtime) && !empty($searchfromtime['enabled'])) {\n $searchfromtime = mktime(\n $searchfromtime['hour'],\n $searchfromtime['minute'],\n 0,\n $searchfromtime['month'],\n $searchfromtime['day'],\n $searchfromtime['year']\n );\n }\n\n $searchtilltime = optional_param_array('$searchtilltime', '', PARAM_TEXT);\n if (!empty($searchtilltime) && !empty($searchtilltime['enabled'])) {\n $searchtilltime = mktime(\n $searchtilltime['hour'],\n $searchtilltime['minute'],\n 0,\n $searchtilltime['month'],\n $searchtilltime['day'],\n $searchtilltime['year']\n );\n }\n $fq .= $this->tool_coursesearch_filterbydate((object)array(\n 'searchfromtime' => $searchfromtime,\n 'searchtilltime' => $searchtilltime,\n ));\n\n\n }\n\n $out = array();\n if (!$qry) {\n $qry = '';\n }\n if ($sort && $order) {\n $sortby = $sort . ' ' . $order;\n } else {\n $sortby = '';\n $order = '';\n }\n if ($qry) {\n $results = self::tool_coursesearch_query($qry, $offset, $count, $fq, $sortby, $config);\n return $results;\n }\n }", "title": "" }, { "docid": "0069618f1e38a9d3f2845852f4c66673", "score": "0.54227626", "text": "public function search(){ \n\t\t$this->layout = false;\t \n\t\t$q = trim(Sanitize::escape($_GET['q']));\t\n\t\tif(!empty($q)){\n\t\t\t// execute only when the search keywork has value\t\t\n\t\t\t$this->set('keyword', $q);\n\t\t\t$this->BdBusiness->unBindModel(array('belongsTo' => array('BdProposalVer','HrBusinessUnit','Creator','BdOpportunity','BdPriority','BdSpoc','BdBizSource')));\n\t\t\t$data = $this->BdBusiness->find('all', array('fields' => array('company_name','project_name','District.district_name','State.state_name'),\n\t\t\t'group' => array('company_name','project_name','District.district_name','State.state_name'), 'conditions' => \tarray(\"OR\" => array ('company_name like' => '%'.$q.'%',\n\t\t\t'project_name like' => '%'.$q.'%','State.state_name like' => '%'.$q.'%','District.district_name like' => '%'.$q.'%'),\t'AND' => array('BdBusiness.is_deleted' => 'N'))));\t\t\n\t\t\t$this->set('results', $data);\n\t\t}\n }", "title": "" }, { "docid": "f50cecaad569d8822f5382257c78b22f", "score": "0.541242", "text": "function smart_search()\n {\n\n $package = $_REQUEST['data'];\n\n $fieldType = $package['dataField'];\n $keyWord = htmlspecialchars(trim($package['keyWord']));\n\n\n $search = new SmartSearch();\n\n $result = $search->SearchString($fieldType, $keyWord);\n\n echo json_encode($result);\n\n wp_die();\n }", "title": "" }, { "docid": "280b97d70af5c6206b469fed8e78ec85", "score": "0.54121554", "text": "function yourSearch() {\n $yourSearch = '';\n if (!empty($_GET['keyword'])) $yourSearch .= '<span class=\"your-search-item\">Keyword - ' . htmlentities($_GET['keyword']) . '</span>';\n if (!empty($_GET['performance'])) $yourSearch .= '<span class=\"your-search-item\">Title - ' . htmlentities($_GET['performance']) . '</span>';\n if (!empty($_GET['actor']) && !empty(array_filter($_GET['actor'], 'strlen'))) $yourSearch .= '<span class=\"your-search-item\">Actors - ' . htmlentities(implode(', ', array_filter($_GET['actor'], 'strlen'))) . '</span>';\n if (!empty($_GET['role']) && !empty(array_filter($_GET['role'], 'strlen'))) $yourSearch .= '<span class=\"your-search-item\">Roles - ' . htmlentities(implode(', ', array_filter($_GET['role'], 'strlen'))) . '</span>';\n if (!empty($_GET['author'])) $yourSearch .= '<span class=\"your-search-item\">Author - ' . htmlentities($_GET['author']) . '</span>';\n\n return (!empty($yourSearch)) ? '<span class=\"your-search-for\"> for: </span><span class=\"your-search-items\">' . $yourSearch . '</span>' : '';\n }", "title": "" }, { "docid": "b480997e13ffa55efc4ef5aea8186f00", "score": "0.5411413", "text": "protected function getSearchQuery()\n\t{\n\t\tif ( isset( $this->request->query['search'] ) && $this->request->query['search'] != '' ) {\n\t\t\t$keyword = '%' . $this->request->query['search'] . '%';\n\t\t\treturn $keyword;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "6c251276fe38ff1b704bc25bcdb2c87a", "score": "0.54079205", "text": "function search_student($masv,$hoten){\n global $con;\n connect_db();\n $hoten = addslashes($masv);\n $sql = \"select * from diem where masv like '%$masv%' OR hoten like '%$hoten%'\";\n $query = mysqli_query($con,$sql);\n $result = array();\n if($query){\n while($row = mysqli_fetch_assoc($query)){\n $result[] = $row; \n }\n }\n return $result;\n}", "title": "" }, { "docid": "15f440f20714f3a3199d964662c8cf20", "score": "0.54059076", "text": "function getAvailableBooks($str) {\r\n\t$query = \"select b.bookID, b.title, b.stock_num, a.a_name, a.a_surname, p.p_name\r\n\t\t\tfrom books b \r\n\t\t\t\tinner join authors a on b.authorID = a.authorID\r\n\t\t\t\tinner join publishers p on p.publisherID = b.publisherID\r\n\t\t\twhere b.stock_num > 0 and (title like '%\".$str.\"%' or a.a_name like '%\".$str.\"%' or a.a_surname like '%\".$str.\"%' )\";\r\n\t\t\t\r\n\t$sql = mysqli_query($_SESSION[\"conn\"], $query);\r\n\t\r\n\treturn $sql;\r\n}", "title": "" }, { "docid": "a5bd5d12b297835f7f9a0a3e88aa3326", "score": "0.54027534", "text": "public function search()\n\t{\n\t}", "title": "" }, { "docid": "3c77d7b9e82d7b74abddfb6de3d573f6", "score": "0.5399798", "text": "function getBooks($title, $authors, $start, $length) {\n\t\t//SANITISE INPUT\n\t\t//check that start is either equal to none or a number \n\t\t\n\t\tif ($start != \"\") {\n\t\t\tif (!is_numeric($start)) { \n\t\t\t\treturn array(\"success\" => False, \"message\" => \"Start and Length inputs have to be numeric.\");\n\t\t\t}\n\t\t}\n\t\telse { \n\t\t\t//If an offset is not specified then set it to zero\n\t\t\t$start = 0;\n\t\t}\n\t\t//check that the length is either equal to none or a number\n\t\tif($length != \"\") {\n\t\t\tif (!is_numeric($length)) {\n\t\t\t\treturn False; \n\t\t\t}\n\t\t}\n\n\t\t//EXECUTE\n\t\t//Build the parameters array with the correct parameters\n\t\t$parameters = array(\":title\" => $title, \":authors\" => $authors);\n\t\t$sql = \"SELECT * FROM books WHERE ((title LIKE concat('%', :title, '%')) AND (authors LIKE concat('%', :authors, '%')))\";\n\t\t$results;\n\t\ttry {\n\t\t\t$connection = connectToDatabase();\n\t\t\t$query = $connection->prepare($sql);\n\t\t\t$query->execute($parameters);\n\n\t\t\t//retrieve the array of the record\n\t\t\t$results = $query->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\n\t\t}\n\t\tcatch (PDOException $exception) {\n\t\t\t//catches the exception if unable to connect to the database\n\t\t\treturn array(\"success\" => False, \"message\" => \"Something went wrong, please try again.\");\n\t\t}\n\n\t\t//The list of books that will be returned \n\t\t$books = array();\n\t\t//A counter to know where in the list of books you are\n\t\t$counter = 0;\n\t\t//Loop through each of the books (results) that have been retrieved from the db\n\t\tforeach ($results as $book) {\n\t\t\t//Remove the image and the content fields from the arrays\n \t\tunset($book['image']);\n\t\t\tunset($book['content']);\n\t\t\t$book['price'] = floatval($book['price']);\n\t\t\t \n\t\t\t//if length is not set then providing the counter is more than the offset add the book to the list of books\n\t\t\tif($length == \"\") {\n\t\t\t\tif ($counter >= $start) {\n\t\t\t\t\tarray_push($books, $book);\n\t\t\t\t}\n\t\t\t\t$counter++;\n\t\t\t}\n\t\t\t//if the length is set\n\t\t\telse if (($counter >= $start) && ($counter < $length)) {\n\t\t\t\tarray_push($books, $book);\n\t\t\t\t$counter++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$counter++;\n\t\t\t}\n\t\t}\n\n\t\treturn $books;\n\t}", "title": "" }, { "docid": "520681d1982667f946954f49696a2c72", "score": "0.5395148", "text": "function doSearch($term, $params) {\n\n\t\t// echo \"<p>freetext: $term</p>\"; echo \"<pre>\"; print_r($params); echo \"</pre>\"; die;\n\t\t$bool = new Elastica\\Query\\Bool();\n\n\t\t// Query String\n\t\tif(!is_null($term)) {\n\t\t\t$term = new Elastica\\Query\\QueryString($term);\n\t\t\t$bool->addMust($term);\n\t\t}\n\n\t\t// Range \n\t\tif(isset($params['range'])) {\n\t\t\tfor($i=0; $i<count($params['range']); $i++) {\n\t\t\t\t$must = new Elastica\\Query\\Range($params['range'][$i]['field'], $params['range'][$i]['range']);\n\t\t\t\t$bool->addMust($must);\n\t\t\t}\n\t\t}\n\n\t\t// Terminos\t\t\n\t\tif(isset($params['term'])) {\n\t\t\tfor($i=0; $i<count($params['term']); $i++) {\n\t\t\t\t$must = new Elastica\\Query\\Term($params['term'][$i]);\n\t\t\t\t$bool->addMust($must);\n\t\t\t}\t\t\n\t\t}\n\n\t\t$query = new Elastica\\Query();\n\t\tif(count($bool->getParams()) > 0)\n\t\t\t$query->setQuery($bool);\n\n\t\t// Posicion inicial\n\t\tif(isset($params['page']) && isset($params['limit'])) {\n\t\t\t$query->setFrom($params['page']*$params['limit']);\n\t\t} else if(isset($params['page']) && !isset($params['limit'])) {\n\t\t\t$query->setFrom($params['page']*10);\n\t\t} else {\n\t\t\t$query->setFrom(0); \t\n\t\t}\n\t\t\n\n\t\t// Facets\n\t\tif(isset($params['facets'])) {\n\t\t\tfor($i=0; $i<count($params['facets']); $i++) {\n\t\t\t\t$facet = new \\Elastica\\Facet\\Terms($params['facets'][$i]['field']);\t\t\t\t\n\t\t\t\t$facet->setField($params['facets'][$i]['field']);\n\n\t\t\t\tif(isset($params['facets'][$i]['size'])) $facet->setSize($params['facets'][$i]['size']);\n\t\t\t\tif(isset($params['facets'][$i]['order'])) $facet->setOrder($params['facets'][$i]['order']);\n\t\t\t\t$query->addFacet($facet);\n\t\t\t}\t\n\t\t}\t\t\n\n\t\tif(isset($params['limit'])) $query->setLimit($params['limit']); // numero resultados\n\t\tif(isset($params['sort']))\t$query->setSort($params['sort']);\t// orden resultados\n\n\t\t$params = $query->getParams();\n\t\t// echo \"<pre>\"; print_r($params); die;\n\n\t\t$resultSet = $this->_index->search($query);\n\n\t\t$this->_results = $resultSet->getResults();\t// listado resultados\n\t\t$this->_total = $resultSet->getTotalHits();\t// numero resultados\n\t\t$this->_facets = $resultSet->getFacets();\t// facets\n\t\t\n\t}", "title": "" }, { "docid": "742f36169a0e59544f5b42937cd9d685", "score": "0.53912884", "text": "function search()\n {\n global $hwdvsItemid;\n\t\t$app = & JFactory::getApplication();\n\n $pattern = JRequest::getVar( 'pattern', '' );\n $category_id = JRequest::getInt( 'category_id', '0' );\n $rpp = JRequest::getInt( 'rpp', '0' );\n $sort = JRequest::getInt( 'sort', '0' );\n $ep = JRequest::getVar( 'ep', '' );\n $ex = JRequest::getVar( 'ex', '' );\n\n\t\t$url = JRoute::_(\"index.php?option=com_hwdvideoshare&task=displayresults&Itemid=$hwdvsItemid&category_id=$category_id\");\n\t\t$url = str_replace(\"&amp;\", \"&\", $url);\n\n\t\t$pos = strpos($url, \"?\");\n\t\tif ($pos === false)\n\t\t{\n\t\t\t$url = $url.\"?pattern=$pattern&rpp=$rpp&sort=$sort&ep=$ep&ex=$ex\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$url = $url.\"&pattern=$pattern&rpp=$rpp&sort=$sort&ep=$ep&ex=$ex\";\n\t\t}\n\n\t\t$app->redirect($url);\n }", "title": "" }, { "docid": "7d258f1116ea64c1ca307aea536c0c4a", "score": "0.53855544", "text": "function inspiry_guests_search( $meta_query ) {\n\t\tif ( isset( $_GET['guests'] ) && ! empty( $_GET['guests'] ) ) {\n\t\t\t$meta_query[] = array(\n\t\t\t\t'key' => 'rvr_guests_capacity',\n\t\t\t\t'value' => $_GET['guests'],\n\t\t\t\t'compare' => '>=',\n\t\t\t\t'type' => 'NUMERIC'\n\t\t\t);\n\t\t}\n\n\t\treturn $meta_query;\n\t}", "title": "" }, { "docid": "b3577c93f0efcff0c56a5e3ba9c98f2d", "score": "0.5383485", "text": "public function searchAction(Request $request, BookService $bookService, AuthorService $authorService) : array\n {\n $query = $request->query->get('q');\n\n $books = $bookService->paginate($bookService->searchTitle($query), 'page-book');\n $authors = $authorService->paginate($authorService->searchName($query), 'page-author');\n\n return [\n 'books' => $books,\n 'authors' => $authors,\n 'searchQuery' => $query,\n ];\n }", "title": "" }, { "docid": "3c72b3fb52ec0e9267793a5894126bc0", "score": "0.538039", "text": "private function getSearchQuery() {\n\t\t$query = $_GET['q'] ?? '';\n\t\t$query = trim(preg_replace('/[\\x21-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/', ' ', $query));\n\t\tif ($query === '') {\n\t\t\treturn false;\n\t\t}\n\t\t$words = [];\n\t\t$word = strtok($query, ' ');\n\t\twhile ($word !== false) {\n\t\t\t$words[] = $word;\n\t\t\t$word = strtok(' ');\n\t\t}\n\t\treturn implode(' & ', $words) . ':*';\n\t}", "title": "" }, { "docid": "eee7861cce9982f6dfa8aee3e15bb7b8", "score": "0.5367583", "text": "public function search() \n\t{\n\t\ttry {\n\t\t\t$q = Input::get('query');\n\t\t\t$query = DB::table('leaders');\n\t\t\t$searchTerms = explode(' ', $q);\n\t\t\t\n\t\t\tforeach($searchTerms as $term) {\t\n\t\t\t\t$query->where('firstName', 'LIKE', '%'. $term .'%')\n\t\t\t ->orWhere('lastName', 'LIKE', '%' . $term . '%');\n\t\t\t}\n\t\t\t$results = $query->get();\n\t\t} catch (Exception $e) {\n\t\t\tLog::error($e);\n\n\t\t\treturn Response::json(['message' => 'There was an error'], 404);\n\t\t}\n\n\t\treturn Response::json(['data' => $results], 200);\n\t}", "title": "" }, { "docid": "0630fc262695b0fce482de88a7dc201b", "score": "0.53597826", "text": "function generateSearchContent() {\n /*\n * 1. receive top 50 results, possibly already as a collection of objects\n * or else as a listof unique identifiers to query the db with.\n * 2. display query so user rememebers what they searched for\n * 3. generate a div or span element for each of the results\n */\n \n $ret = \"\";\n $results = array();\n \n //#1 \n $args = func_get_args();\n if(isset($args[1])){\n foreach($args[1] as $res) {\n $results[] = new Result($res->name, $res->url, $res->description, $res->rank);\n }\n } else {\n $results[0] = new Result(\"Fruit Ninja\", \"http://www.google.com\", \"cool\", \"8.7\");\n $results[1] = new Result(\"Dynasty Warriors 3\", \"www.reddit.com\", \"awesome\", \"8.4\");\n $results[2] = new Result(\"Dynasty Warriors 4\", \"http://www.microsoft.com\", \"fantastic\", \"8.3\");\n $results[3] = new Result(\"Goat Simulator\", \"http://www.imgur.com\", \"amazing\", \"7.8\");\n $results[4] = new Result(\"Gary's Mod\", \"http://www.yahoo.com\", \"mind-blowing\", \"7.5\");\n $results[5] = new Result(\"Qubert!\", \"http://www.reddit.com/r/technology\", \"zomg\", \"7.3\");\n $results[6] = new Result(\"Math Blaster\", \"http://www.reddit.com/r/science\", \"a must have\", \"7.2\");\n $results[7] = new Result(\"Asteroids\", \"http://www.reddit.com/r/blogs\", \"an instant classic\", \"7.1\");\n $results[8] = new Result(\"Frogger\", \"http://www.reddit.com/r/politics\", \"up down left right\", \"6.9\");\n $results[9] = new Result(\"Amalur: The Reckoning\", \"http://www.bing.com\", \"an interesting story\", \"6.5\");\n $results[10] = new Result(\"Halo\", \"http://www.gamespot.com\", \"unparalled frenzy of pixels\", \" 6.0\");\n $results[11] = new Result(\"Starcraft\", \"http://www.blizzard.com\", \"click click click click click\", \"5.8\");\n $results[12] = new Result(\"Age of Empires\", \"http://www.koalastothemax.com\", \"hover hover hover\", \"5.5\");\n $results[13] = new Result(\"Bowling\", \"http://www.steampowered.com\", \"fascinating discovery\", \"1.4\");\n $results[14] = new Result(\"Outdoor Hunting 27\", \"http://www.ask.com\", \"still alive: day 27\", \"0.5\");\n }\n \n #2\n $ret .= \"<div id=\\\"queryReminder\\\">\\n<p>Search Query: \" . getQuery() . \"</p>\\n</div>\\n\";\n \n #3\n $ret .= \"<div id=\\\"contentColumn\\\">\\n\";\n foreach($results as $result) {\n $ret .= \"<span id=\\\"\".$result->name.\"_\".$result->rank.\"\\\" class=\\\"result\\\" title=\\\"\".$result->description.\"\\\">\\n\".\n \"<a href=\\\"\".$result->url.\"\\\">\\n\".\n \t \"<p id=\\\"\".$result->name.\"\\\">\\n\".\n $result->name.\n \"</p>\\n\".\n \"</a>\\n\".\n \"<br/>\\n\".\n \"<p id=\\\"\".$result->rank.\"\\\">\\n\".\n \"Rank: \".$result->rank.\n \"</p>\\n\".\n \"<br/>\\n\".\n \"</span>\\n\";\n }\n $ret .= \"</div>\\n\";\n \n \n return $ret;\n}", "title": "" }, { "docid": "1bf5b8fc912cfb9bf383393c451a0f7f", "score": "0.53596073", "text": "function search_user_search()\n{\n // Security check\n if (!SecurityUtil::checkPermission('Search::', '::', ACCESS_READ)) {\n return LogUtil::registerPermissionError();\n }\n\n // get parameter from HTTP input\n $vars = array();\n $vars['q'] = strip_tags(FormUtil::getPassedValue('q', '', 'REQUEST'));\n $vars['searchtype'] = FormUtil::getPassedValue('searchtype', SessionUtil::getVar('searchtype'), 'REQUEST');\n $vars['searchorder'] = FormUtil::getPassedValue('searchorder', SessionUtil::getVar('searchorder'), 'REQUEST');\n $vars['numlimit'] = pnModGetVar('Search', 'itemsperpage', 25);\n $vars['page'] = (int)FormUtil::getPassedValue('page', 1, 'REQUEST');\n\n // $firstpage is used to identify the very first result page\n // - and to disable calls to plugins on the following pages\n $firstPage = !isset($_REQUEST['page']);\n\n // The modulename exists in this array as key, if the checkbox was filled\n $active = FormUtil::getPassedValue('active', SessionUtil::getVar('searchactive'), 'REQUEST');\n\n // All formular data from the modules search plugins is contained in:\n $modvar = FormUtil::getPassedValue('modvar', SessionUtil::getVar('searchmodvar'), 'REQUEST');\n\n // set some defaults\n if (!isset($vars['searchtype']) || empty($vars['searchtype'])) {\n $vars['searchtype'] = 'AND';\n } else {\n SessionUtil::setVar('searchtype', $vars['searchtype']);\n }\n if (!isset($vars['searchorder']) || empty($vars['searchorder'])) {\n $vars['searchorder'] = 'newest';\n } else {\n SessionUtil::setVar('searchorder', $vars['searchorder']);\n }\n if (!isset($active) || !is_array($active) || empty($active)) {\n $active = array();\n } else {\n SessionUtil::setVar('searchactive', $active);\n }\n if (!isset($modvar) || !is_array($modvar) || empty($modvar)) {\n $modvar = array();\n } else {\n SessionUtil::setVar('searchmodvar', $modvar);\n }\n\n // work out row index from page number\n $vars['startnum'] = (($vars['page'] - 1) * $vars['numlimit']) + 1;\n\n if (empty($vars['q'])) {\n LogUtil::registerError (__('Error! You did not enter any keywords to search for.'));\n return pnRedirect(pnModUrl('Search', 'user', 'main'));\n }\n\n // get all the search plugins\n $search_modules = pnModAPIFunc('Search', 'user', 'getallplugins');\n\n // Create output object and check caching\n $pnRender = & pnRender::getInstance('Search');\n $pnRender->cache_id = md5($vars['q'] . $vars['searchtype'] . $vars['searchorder'] . pnUserGetVar('uid')) . $vars['page'];\n // check if the contents are cached.\n if ($pnRender->is_cached('search_user_results.htm')) {\n return $pnRender->fetch('search_user_results.htm');\n }\n\n // Load database stuff\n pnModDBInfoLoad('Search');\n $pntable = pnDBGetTables();\n $userId = (int)pnUserGetVar('uid');\n $searchTable = $pntable['search_result'];\n $searchColumn = $pntable['search_result_column'];\n\n // Create restriction on result table (so user only sees own results)\n $userResultWhere = \"$searchColumn[session] = '\" . session_id() . \"'\";\n\n // Do all the heavy database stuff on the first page only\n if ($firstPage) {\n // Clear current search result for current user - before showing the first page\n // Clear also older searches from other users.\n $dbType = DBConnectionStack::getConnectionDBType();\n $where = $userResultWhere;\n if ($dbType=='postgres') {\n $where .= \" OR $searchColumn[found] + INTERVAL '8 HOUR' < NOW()\" ;\n } else {\n $where .= \" OR DATE_ADD($searchColumn[found], INTERVAL 8 HOUR) < NOW()\" ;\n }\n\n DBUtil::deleteWhere ('search_result', $where);\n\n // Ask active modules to find their items and put them into $searchTable for the current user\n // At the same time convert modules list from numeric index to modname index\n\n $searchModulesByName = array();\n foreach($search_modules as $mod) {\n // check we've a valid search plugin\n if (isset($mod['functions']) && (empty($active) || isset($active[$mod['title']]))) {\n foreach ($mod['functions'] as $contenttype => $function) {\n if (isset($modvar[$mod['title']])) {\n $param = array_merge($vars, $modvar[$mod['title']]);\n } else {\n $param = $vars;\n }\n $searchModulesByName[$mod['name']] = $mod;\n $ok = pnModAPIFunc($mod['title'], 'search', $function, $param);\n if (!$ok) {\n LogUtil::registerError(__f('Error! \\'%1$s\\' module returned false in search function \\'%2$s\\'.', array($mod['title'], $function)));\n return pnRedirect(pnModUrl('Search', 'user', 'main'));\n }\n }\n }\n }\n\n // Count number of found results\n $resultCount = DBUtil::selectObjectCount ('search_result', $userResultWhere);\n SessionUtil::setVar('searchResultCount', $resultCount);\n SessionUtil::setVar('searchModulesByName', $searchModulesByName);\n } else {\n $resultCount = SessionUtil::getVar('searchResultCount');\n $searchModulesByName = SessionUtil::getVar('searchModulesByName');\n }\n\n // Fetch search result - do sorting and paging in database\n\n // Figure out what to sort by\n switch ($vars['searchorder']) {\n case 'alphabetical':\n $sort = 'title';\n break;\n case 'oldest':\n $sort = 'created';\n break;\n case 'newest':\n $sort = 'created DESC';\n break;\n default:\n $sort = 'title';\n break;\n }\n\n // Get next N results from the current user's result set\n // The \"checker\" object is used to:\n // 1) do secondary access control (deprecated more or less)\n // 2) let the modules add \"url\" to the found (and viewed) items\n $checker = new search_result_checker($searchModulesByName);\n $sqlResult = DBUtil::selectObjectArrayFilter('search_result', $userResultWhere, $sort,\n $vars['startnum']-1, $vars['numlimit'], '',\n $checker, null);\n // add displayname of modules found\n $cnt = count($sqlResult);\n for ($i=0; $i<$cnt; $i++) {\n $modinfo = pnModGetInfo(pnModGetIDFromName($sqlResult[$i]['module']));\n $sqlResult[$i]['displayname'] = $modinfo['displayname'];\n }\n\n // Get number of chars to display in search summaries\n $limitsummary = pnModGetVar('Search', 'limitsummary');\n if (empty($limitsummary)) {\n $limitsummary = 200;\n }\n\n $pnRender->assign('resultcount', $resultCount);\n $pnRender->assign('results', $sqlResult);\n $pnRender->assign(pnModGetVar('Search'));\n $pnRender->assign($vars);\n $pnRender->assign('limitsummary', $limitsummary);\n\n // log the search if on first page\n if ($firstPage) {\n pnModAPIFunc('Search', 'user', 'log', $vars);\n }\n\n // Return the output that has been generated by this function\n return $pnRender->fetch('search_user_results.htm');\n}", "title": "" }, { "docid": "869e87a06ed8766e9e37bd6bc8a3a5d9", "score": "0.5359245", "text": "function it_exchange_customer_history_get_search_query( $url = false ) {\n\n\t// If no URL is specified, bail here\n\tif( ! $url )\n\t\treturn false;\n\n\t// Parse URL and look for standard query strings\n\t$parts_url = parse_url( $url );\n\t$query = isset( $parts_url['query'] )\n\t\t? $parts_url['query']\n\t\t: ( isset( $parts_url['fragment'] )\n\t\t\t? $parts_url['fragment']\n\t\t\t: ''\n\t\t);\n\n\t// If no query was found, bail here\n\tif( ! $query )\n\t\treturn false;\n\n\t// Parse the query and return the user's search string\n\tparse_str( $query, $parts_query );\n\treturn isset( $parts_query['q'] ) ? $parts_query['q'] : ( isset( $parts_query['p'] ) ? $parts_query['p'] : '' );\n\n}", "title": "" }, { "docid": "b79c6750e2e7fbf05f184eced4a62405", "score": "0.53587854", "text": "public function search_purchase()\n {\n $search_content = $this->input->get(\"search\");\n if($search_content==\"\"){\n \n }else{\n $search_content = $this->security->xss_clean($search_content);\n $this->load->model(\"admin_purchase_mdl\");\n $data[\"results\"] = $this->admin_purchase_mdl->search_purchase($search_content);\n print json_encode($data);\n }\n }", "title": "" }, { "docid": "f675f113290ec1d15b5ba223e9af8627", "score": "0.53575486", "text": "public function search()\n {\n $queryParams = [\n 'q' => $this->searchQuery,\n 'sort' => $this->sort,\n 'order' => $this->order,\n 'page' => $this->page,\n 'per_page' => $this->perPage,\n ];\n \n $searchData = $this->apiClient->search($queryParams);\n $this->setSearchData($searchData);\n }", "title": "" }, { "docid": "97048e8554504065e022d382b12a9363", "score": "0.53567344", "text": "function searchProduct($product_title){\n // create an instance of the Product class\n\n \n $search_instance = new Search();\n \n //create empty array\n $arr = array();\n \n //check data and return boolean (true /false)\n $all = $search_instance->searchProduct($product_title);\n \n //loops through all\n if($all){\n //for each data call the row using the method fetch\n while($each = $search_instance->fetch()){\n\n //now loop through everything and put into the array\n $arr[]= $each;\n }\n \n \n }\n\n return $arr;\n\n}", "title": "" }, { "docid": "89717e43647705195c5ce90804b780b7", "score": "0.5347405", "text": "public function search_books($key , $query){\n $this->db->like($key , $query);\n return $this->db->get('manuscripts');\n }", "title": "" }, { "docid": "c07056287eca957ba92109985acbbe3e", "score": "0.53450644", "text": "public function getSearchString();", "title": "" }, { "docid": "624b7e115bd8a5b194836cc8a9ff2329", "score": "0.53426576", "text": "public function searchBook(Request $request){\n $checkSession = SessionsController::isSessionActive($request);\n if ($checkSession->getStatusCode() != 200){\n return $checkSession;\n }\n\n $term = $request->has('term') ? $request->term : '';\n $books = Book::where('name', 'like', '%'.$term.'%')->get();\n\n $header = [ 'Content-Type' => 'application/json; charset=utf-8' ];\n\n return response()->json($books, 200, $header, JSON_UNESCAPED_UNICODE);\n }", "title": "" }, { "docid": "55072f0a2a229071d7380b8eaeb4c6aa", "score": "0.53375363", "text": "public function getSerps($query, $maxResults=100, $domain=false)\n {\n $q = rawurlencode($query);\n $maxResults = ($maxResults/10)-1;\n $result = array ();\n $pages = 1;\n $delay = 0;\n for ($start=0; $start<$pages; $start++) {\n $ref = 0 == $start ? 'ncr' : sprintf('search?q=%s&hl=en&prmd=imvns&start=%s0&sa=N', $q, $start);\n $nextSerp = 0 == $start ? sprintf('search?q=%s&filter=0', $q) : sprintf('search?q=%s&filter=0&start=%s0', $q, $start);\n\n $curledSerp = utf8_decode( self::gCurl($nextSerp, $ref) );\n\n if (preg_match(\"#answer=86640#i\", $curledSerp)) {\n print('Please read: http://www.google.com/support/websearch/bin/answer.py?&answer=86640&hl=en');\n exit();\n }\n else {\n $matches = array();\n preg_match_all('#<h3 class=\"?r\"?>(.*?)</h3>#', $curledSerp, $matches);\n if (!empty($matches[1])) {\n $c = 0;\n foreach ($matches[1] as $link) {\n if (preg_match('#<a\\s+[^>]*href=[\\'\"]?([^\\'\" ]+)[\\'\"]?[^>]*>(.*?)</a>#', $link, $match)) {\n if (!preg_match('#^https?://www.google.com/(?:intl/.+/)?webmasters#', $match[1])) {\n $c++;\n $resCnt = ($start * 10) + $c;\n if (FALSE !== $domain) {\n if (preg_match(\"#^$domain#i\", $match[1])) {\n $result[] = array(\n 'position' => $resCnt,\n 'url' => $match[1],\n 'headline' => trim(strip_tags($match[2]))\n );\n }\n } else {\n $result[$resCnt] = array(\n 'url' => $match[1],\n 'headline' => trim(strip_tags($match[2]))\n );\n }\n }\n }\n }\n if ( preg_match('#id=\"?pnnext\"?#', $curledSerp) ) {\n // Found 'Next'-link on currect page\n $pages += 1;\n $delay += 200000;\n usleep($delay);\n } else {\n // No 'Next'-link on currect page\n $pages -= 1;\n }\n } else {\n // No [@id=\"rso\"]/li/h3 on currect page\n $pages -= 1;\n }\n }\n if ($start == $maxResults) {\n $pages -= 1;\n }\n }\n return $result;\n }", "title": "" }, { "docid": "8c7529ac4e9b205e1f0eb48f651c31a4", "score": "0.53329873", "text": "public function search(){\n $database = new Database();\n $db = $database->getConnection();\n $product = new Product($db);\n\n //query products\n $res = $product->search();\n return json_encode($res);\n }", "title": "" }, { "docid": "1090eb7d51097969c8bea5a77291efef", "score": "0.5332215", "text": "public function index()\n\t{\n\n\t\t$error_message = Session::get('message');\n\t\t$base = URL::current();\n\n\t\t$result = [];\n\t\t// Error check and return message\n\t\tif (empty($_GET['search'])) {\n\t\t\treturn ['success' => FALSE, 'message' => 'Invalid search'];\n\t\t}\n\n\t\t// Request parameters\n\t\t$params = $_GET;\n\t\t$basic_keys = ['id', 'name', 'abv', 'description', 'ibu', 'isOrganic'];\n\t\t$max_results = 3;\n\n\t\t// Validate our parameters\n\t\tif (empty($params['type'])) {\n\t\t\t$params['type'] = \"beer\";\n\t\t}\n\n\t\t// Instance of breweryDB class\n\t\t$brew = new Pintlabs_Service_Brewerydb(Config::get('brewerydb.api_key'));\n\t\t$brew->setformat(\"json\");\n\n\t\t// Build parameters\n\t\t$params = [\n\t\t\t'q' => $params['search'],\n\t\t\t'type' => $params['type'],\n\t\t\t'withBreweries' => \"Y\"\n\t\t];\n\n\t\t$response = $brew->request(\"search\", $params, \"GET\");\n\t\t// On a no result return, its still success, account for this error\n\t\tif (!array_key_exists('data', $response)) {\n\t\t\treturn ['success' => FALSE, 'message' => 'No results available'];\n\t\t}\n\n\t\t// Pagination data\n\t\t$pagination = [\n\t\t\t'currentPage' => $response['currentPage'],\n\t\t\t'numberOfPages' => $response['numberOfPages'],\n\t\t\t'totalResults' => $response['totalResults']\n\t\t];\n\n\t\t// Type = beer *maybe this method only handles beer*\n\t\tif ($params['type'] == 'beer') {\n\t\t\t$result = $response['data'];\n\t\t}\n\n\t\t// Attach pagination and success message if we got this far\n\t\t$result['pagination'] = $pagination;\n\t\t$result['success'] = TRUE;\n\t\t$result['message'] = \"result success\";\n\t\t\n\t\treturn (json_encode($result));\n\t}", "title": "" }, { "docid": "af285643f364e120b1fda26e558ded39", "score": "0.53276706", "text": "function get_search_results($properties) {\r\n\r\n $page_id = $properties['page_id'];\r\n $editable = $properties['editable'];\r\n\r\n $properties = get_page_type_properties($page_id, 'search results');\r\n\r\n $search_folder_id = $properties['search_folder_id'];\r\n $search_catalog_items = $properties['search_catalog_items'];\r\n $product_group_id = $properties['product_group_id'];\r\n $catalog_detail_page_id = $properties['catalog_detail_page_id'];\r\n\r\n $layout_type = get_layout_type($page_id);\r\n\r\n $form = new liveform('search_results');\r\n\r\n $featured_items = array();\r\n $catalog_items = array();\r\n $pages = array();\r\n $pages_info = array();\r\n $results = array();\r\n\r\n $query = '';\r\n \r\n // if there is a specific query for this page, then use it\r\n if (isset($_GET[$page_id . '_query'])) {\r\n $query = trim($_GET[$page_id . '_query']);\r\n \r\n // else if there is a general query, then use it (this is for backwards compatibility)\r\n } else if (isset($_GET['query'])) {\r\n $query = trim($_GET['query']);\r\n }\r\n\r\n // If the visitor has searched and visitor tracking is enabled and this visitor\r\n // has been initialized, then add site search terms to visitor record\r\n if (\r\n ($query != '')\r\n && (VISITOR_TRACKING == true)\r\n && (isset($_SESSION['software']['visitor_id']) == true)\r\n ) {\r\n // get visitor's search terms from visitors table\r\n $db_query = \"SELECT site_search_terms FROM visitors WHERE id = '\" . $_SESSION['software']['visitor_id'] . \"'\";\r\n $result = mysqli_query(db::$con, $db_query) or output_error('Query failed.');\r\n $row = mysqli_fetch_assoc($result);\r\n $site_search_terms = $row['site_search_terms'];\r\n \r\n // if there are search terms, then add a delimiter\r\n if ($site_search_terms != '') {\r\n $site_search_terms .= '|';\r\n }\r\n \r\n // add the new query to the search terms\r\n $site_search_terms .= $query;\r\n \r\n // update search terms in the visitors table for this visitor\r\n $db_query =\r\n \"UPDATE visitors\r\n SET\r\n site_search_terms = '\" . escape($site_search_terms) . \"',\r\n stop_timestamp = UNIX_TIMESTAMP()\r\n WHERE (id = '\" . $_SESSION['software']['visitor_id'] . \"')\";\r\n $result = mysqli_query(db::$con, $db_query) or output_error('Query failed.');\r\n }\r\n\r\n // get current URL parts in order to deal with query string parameters\r\n $url_parts = parse_url(REQUEST_URL);\r\n \r\n // put query string parameters into an array\r\n parse_str($url_parts['query'], $query_string_parameters);\r\n\r\n $output_hidden_fields = '';\r\n \r\n // loop through the query string parameters in order to prepare hidden fields for each query string parameter,\r\n // so that we don't lose any when the form is submitted\r\n foreach ($query_string_parameters as $name => $value) {\r\n // if this is not the specific query parameter (already going to be a field for that), then add hidden field for it\r\n if ($name != $page_id . '_query') {\r\n $output_hidden_fields .= '<input type=\"hidden\" name=\"' . h($name) . '\" value=\"' . h($value) . '\">';\r\n }\r\n }\r\n\r\n // If the visitor has searched, then get search results.\r\n if ($query != '') {\r\n\r\n // If ecommerce is enabled and search catalog is enabled then get catalog search results.\r\n if (ECOMMERCE and $search_catalog_items) {\r\n // If there is no product group selected for this catalog page,\r\n // then get top-level product group.\r\n if ($product_group_id == 0) {\r\n $db_query = \"SELECT id FROM product_groups WHERE parent_id = '0'\";\r\n $result = mysqli_query(db::$con, $db_query) or output_error('Query failed.');\r\n $row = mysqli_fetch_assoc($result);\r\n $product_group_id = $row['id'];\r\n }\r\n\r\n $catalog_search_query = $query;\r\n\r\n // If search is set to advanced in the site settings,\r\n // then remove boolean characters from search query\r\n // because we don't support those for product searching.\r\n if (SEARCH_TYPE == 'advanced') {\r\n $catalog_search_query = str_replace('\"', '', $catalog_search_query);\r\n $catalog_search_query = str_replace('+', '', $catalog_search_query);\r\n }\r\n \r\n $catalog_items = get_catalog_search_results($catalog_search_query, $product_group_id);\r\n }\r\n\r\n // If the search type is simple, then get results in that way.\r\n if (SEARCH_TYPE == 'simple') {\r\n\r\n // Get featured pages that we possibly need to include in results.\r\n // Featured pages are pages where the promote on keyword matches the search query.\r\n $featured_items = db_items(\r\n \"SELECT\r\n page.page_id AS id,\r\n page.page_name AS name,\r\n page.page_folder AS folder_id,\r\n page.page_title AS title,\r\n page.page_meta_description AS description\r\n FROM page\r\n LEFT JOIN folder ON page.page_folder = folder.folder_id\r\n WHERE\r\n (page.page_search = '1')\r\n AND (folder.folder_archived = '0')\r\n AND (page.page_search_keywords = '\" . e($query) . \"')\r\n ORDER BY page.page_name ASC\",\r\n 'id');\r\n\r\n // Loop through the featured pages in order to prepare them.\r\n foreach ($featured_items as $key => $item) {\r\n // If the visitor does not have view access to the page,\r\n // then remove page from the array and continue to next one.\r\n if (!check_view_access($item['folder_id'], true)) {\r\n unset($featured_items[$key]);\r\n continue;\r\n }\r\n\r\n $item['url'] = PATH . encode_url_path($item['name']);\r\n $item['full_url'] = HOSTNAME_SETTING . $item['url'];\r\n\r\n if ($item['title'] == '') {\r\n $item['title'] = $item['name'];\r\n }\r\n\r\n $featured_items[$key] = $item;\r\n }\r\n\r\n // get all pages without a matching keyword\r\n $result = mysqli_query(db::$con, \"SELECT page_id, page_name, page_folder, page_title, page_meta_description, page_style FROM page WHERE page_search = 1 and page_search_keywords != '\" . escape($query) . \"'\") or output_error('Query failed');\r\n while($row = mysqli_fetch_array($result))\r\n {\r\n $this_page_id = $row['page_id'];\r\n $page_name = $row['page_name'];\r\n $page_folder = $row['page_folder'];\r\n $page_title = $row['page_title'];\r\n $page_meta_description = $row['page_meta_description'];\r\n $style_id = $row['page_style'];\r\n\r\n if (get_access_control_type($page_folder) == 'private') {\r\n $private = true;\r\n } else {\r\n $private = false;\r\n }\r\n\r\n // if page is private and user is logged in\r\n if (($private == TRUE) && $_SESSION['sessionusername']) {\r\n $access_check = check_private_access($row['page_folder']);\r\n\r\n // If the user has access to the page, then remember that.\r\n if ($access_check['access'] == true) {\r\n $access = TRUE;\r\n } else {\r\n $access = FALSE;\r\n }\r\n }\r\n\r\n // if the page is not private OR the user has access to page\r\n if (($private == FALSE) || ($access == TRUE)) {\r\n // store page name and title\r\n $pages_info[$this_page_id]['name'] = $page_name;\r\n $pages_info[$this_page_id]['title'] = $page_title;\r\n $pages_info[$this_page_id]['meta_description'] = $page_meta_description;\r\n\r\n // If the page does not have a style set, then get style from folder.\r\n if (!$style_id) {\r\n $style_id = get_style($page_folder);\r\n }\r\n\r\n // Get the collection from the style, so that we know what collection\r\n // of page regions to get.\r\n $collection = db_value(\"SELECT collection FROM style WHERE style_id = '$style_id'\");\r\n\r\n // If we could not find a collection for whatever reason, then just set the collection to \"a\".\r\n if ($collection == '') {\r\n $collection = 'a';\r\n }\r\n\r\n // get all page regions for page\r\n $db_query = \"SELECT pregion_id, pregion_content FROM pregion WHERE (pregion_page = '$this_page_id') AND (collection = '$collection')\";\r\n $result_2 = mysqli_query(db::$con, $db_query) or output_error('Query failed');\r\n while($row = mysqli_fetch_array($result_2)) {\r\n $pregion_content = $row['pregion_content'];\r\n \r\n // increment rating depending on how many times the query is found (case-insensitive)\r\n $increment_value = mb_substr_count(mb_strtolower($pregion_content), mb_strtolower($query));\r\n \r\n if($increment_value != 0) {\r\n $pages[$this_page_id] = $pages[$this_page_id] + $increment_value;\r\n }\r\n }\r\n }\r\n }\r\n \r\n // get all pages that have a matching keyword in their meta keywords\r\n $db_query = \r\n \"SELECT \r\n page_id, \r\n page_name, \r\n page_folder, \r\n page_title, \r\n page_meta_description \r\n FROM page \r\n WHERE \r\n (page_search = 1) \r\n AND (page_search_keywords != '\" . escape($query) . \"')\r\n AND (page_meta_keywords LIKE '%\" . escape(escape_like($query)) . \"%')\";\r\n $result = mysqli_query(db::$con, $db_query) or output_error('Query failed.');\r\n while ($row = mysqli_fetch_array($result)) {\r\n $this_page_id = $row['page_id'];\r\n $page_name = $row['page_name'];\r\n $page_folder = $row['page_folder'];\r\n $page_title = $row['page_title'];\r\n $page_meta_description = $row['page_meta_description'];\r\n \r\n if (get_access_control_type($page_folder) == 'private') {\r\n $private = true;\r\n } else {\r\n $private = false;\r\n }\r\n \r\n // if page is private and user is logged in\r\n if (($private == TRUE) && $_SESSION['sessionusername']) {\r\n $access_check = check_private_access($row['page_folder']);\r\n\r\n // if user is an administrator, desiger, or manager OR the user has access to the page\r\n if ($access_check['access'] == true) {\r\n $access = TRUE;\r\n } else {\r\n $access = FALSE;\r\n }\r\n }\r\n \r\n // if the page is not private OR the user has access to page\r\n if (($private == FALSE) || ($access == TRUE)) {\r\n // if this page is not already in the primary or pages arrays then add it\r\n if ((array_key_exists($this_page_id, $featured_items) == FALSE) && (array_key_exists($this_page_id, $pages) == FALSE)) {\r\n // store page name and title\r\n $pages_info[$this_page_id]['name'] = $page_name;\r\n $pages_info[$this_page_id]['title'] = $page_title;\r\n $pages_info[$this_page_id]['meta_description'] = $page_meta_description;\r\n \r\n $pages[$this_page_id] = 1;\r\n }\r\n }\r\n }\r\n \r\n // sort the array based upon how many matches each page had.\r\n arsort($pages);\r\n \r\n $comments = array();\r\n $pages_with_comment_matches = array();\r\n \r\n // get all comments for basic pages that are searchable\r\n $db_query = \r\n \"SELECT\r\n comments.page_id,\r\n comments.name,\r\n comments.message,\r\n page.page_folder\r\n FROM comments\r\n LEFT JOIN page ON page.page_id = comments.page_id\r\n WHERE\r\n (comments.item_id = '0')\r\n AND (comments.published = '1')\r\n AND (page.page_search = '1')\r\n AND (LOWER(CONCAT_WS(',', comments.name, comments.message)) LIKE '%\" . escape($query) . \"%')\";\r\n $result = mysqli_query(db::$con, $db_query) or output_error('Query failed.');\r\n while($row = mysqli_fetch_array($result)) {\r\n // if the page for this comment is not already a search result, then add the comment to the comments array\r\n if ((array_key_exists($row['page_id'], $featured_items) == FALSE) && (array_key_exists($row['page_id'], $pages) == FALSE)) {\r\n $comments[] =\r\n array(\r\n 'page_id' => $row['page_id'],\r\n 'page_folder' => $row['page_folder'],\r\n 'name' => $row['name'],\r\n 'message' => $row['message']\r\n );\r\n }\r\n }\r\n \r\n // loop through all comments that matched the search results to see if they should be outputted\r\n foreach ($comments as $comment) {\r\n $increment_value = 0;\r\n $private = FALSE;\r\n $access = FALSE;\r\n \r\n // Get the access control type that is needed to view this page.\r\n $get_access_control = get_access_control_type($comment['page_folder']);\r\n \r\n // if the user is logged in, and if this is a private page, then check to see if the user has view access\r\n if (($_SESSION['sessionusername'] != '') && ($get_access_control == 'private')) {\r\n $access_check = check_private_access($comment['page_folder']);\r\n\r\n // if the user is a manger or above, or if this is a basic user and if they have access to view the page, then allow access\r\n if ($access_check['access'] == true) {\r\n $access = TRUE;\r\n }\r\n }\r\n \r\n // if the user has access or if this is not a private page, then count the amount of matches, and add comment to the array\r\n if(($access == TRUE) || ($get_access_control != 'private')) {\r\n // increment rating depending on how many times the query is found (case-insensitive)\r\n $increment_value = mb_substr_count(mb_strtolower($comment['name']), mb_strtolower($query));\r\n $increment_value = $increment_value + mb_substr_count(mb_strtolower($comment['message']), mb_strtolower($query));\r\n \r\n // add comment to the array\r\n $pages_with_comment_matches[$comment['page_id']] = $pages_with_comment_matches[$comment['page_id']] + $increment_value;\r\n }\r\n }\r\n \r\n // sort the array based upon how many matches each page had in it's comments.\r\n arsort($pages_with_comment_matches);\r\n \r\n // loop through the pages with comment matches in order to add the pages to the pages array\r\n foreach ($pages_with_comment_matches as $this_page_id => $number_of_matches) {\r\n $pages[$this_page_id] = $number_of_matches;\r\n }\r\n\r\n // Otherwise the search is set to advanced so get results for that type.\r\n } else {\r\n\r\n // If the search folder no longer exists, then set search folder to the root folder.\r\n if (db_value(\"SELECT folder_id FROM folder WHERE folder_id = '\" . escape($search_folder_id) . \"'\") == '') {\r\n $search_folder_id = db_value(\"SELECT folder_id FROM folder WHERE folder_parent = '0'\");\r\n }\r\n\r\n // Create an array to store all folders that are within the scope of this search.\r\n $folders = array();\r\n\r\n // Start the folders off with the search folder.\r\n $folders[] = $search_folder_id;\r\n\r\n // Get all folders in order to add child folders to array.\r\n $all_folders = db_items(\r\n \"SELECT\r\n folder_id AS id,\r\n folder_parent AS parent_folder_id\r\n FROM folder\");\r\n \r\n // Get child folders that are within the scope of this search.\r\n $child_folders = get_child_folders($search_folder_id, $all_folders);\r\n\r\n // Add child folders to array.\r\n $folders = array_merge($folders, $child_folders);\r\n\r\n $search_folder_parent_id = db_value(\"SELECT folder_parent FROM folder WHERE folder_id = '\" . escape($search_folder_id) . \"'\");\r\n\r\n $sql_where_folders = \"\";\r\n\r\n // If the scope of this search is limited (i.e. not side wide) or if this visitor is not a manager or above,\r\n // then we need to limit the scope of the search to only certain folders\r\n if (\r\n ($search_folder_parent_id != 0)\r\n || (USER_LOGGED_IN == false)\r\n ||\r\n (\r\n (USER_LOGGED_IN == true)\r\n && (USER_ROLE == 3)\r\n )\r\n ) {\r\n // If this visitor is not a manager or above then remove folders that visitor does not have view access to.\r\n if (\r\n (USER_LOGGED_IN == false)\r\n || (USER_ROLE == 3)\r\n ) {\r\n // Loop through folders in order to remove ones that visitor does not have access to.\r\n foreach ($folders as $key => $folder_id) {\r\n if (check_view_access($folder_id, $always_grant_access_for_registration_and_guest = true) == false) {\r\n unset($folders[$key]);\r\n }\r\n }\r\n\r\n // If visitor does not have access to any folders, then return error.\r\n // This should not happen, because visitor should at least have access to the folder for this search results page\r\n // however we just add this protection anyway, because if we allow this to proceed with no\r\n // filter in the SQL query then it could be a security issue.\r\n if (count($folders) == 0) {\r\n return 'Sorry, you do not have access to any of the content for this search.';\r\n }\r\n }\r\n\r\n $sql_where_folders = \"(\";\r\n\r\n // Loop through the folders in order to prepare the filters for the SQL query.\r\n foreach ($folders as $folder_id) {\r\n // If a folder filter has already been added, then add an \"OR\".\r\n if ($sql_where_folders != '(') {\r\n $sql_where_folders .= \" OR \";\r\n }\r\n\r\n $sql_where_folders .= \"(search_items.folder_id = '\" . $folder_id . \"')\";\r\n }\r\n\r\n $sql_where_folders .= \")\";\r\n }\r\n\r\n $sql_boolean_mode = \"\";\r\n\r\n // Start the filter search query off with the search query that the customer entered.\r\n // This will be the query that is used in the where condition to filter results.\r\n $filter_search_query = $query;\r\n\r\n // If the search query does not contain a space (i.e. does not contain multiple keywords)\r\n // and does not already contain a quote, then add quotes around search query,\r\n // so that it is treated as a boolean exact phrase query. We do this so that if a search query\r\n // contains a dash or possibly other connecting characters (e.g. multi-recipient) then\r\n // MySQL will only return results where the exact full query existed (e.g. \"multi-recipient\"\r\n // instead of results that contain \"multi\" and \"recipient\" in separate areas).\r\n if (\r\n (mb_strpos($filter_search_query, ' ') === false)\r\n && (mb_strpos($filter_search_query, '\"') === false)\r\n ) {\r\n $filter_search_query = '\"' . $filter_search_query . '\"';\r\n }\r\n\r\n // Start the score search query off with the filter search query.\r\n $score_search_query = $filter_search_query;\r\n\r\n // If the search query contains boolean characters, then turn boolean mode on,\r\n // and remove the boolean characters for the score query, because we use a natural language search for the score,\r\n // even if it is a boolean search, because the boolean relevancy is bad.\r\n if (\r\n (mb_strpos($filter_search_query, '\"') !== false)\r\n || (mb_strpos($filter_search_query, '+') !== false)\r\n ) {\r\n $sql_boolean_mode = \" IN BOOLEAN MODE\";\r\n\r\n $score_search_query = str_replace('\"', '', $score_search_query);\r\n $score_search_query = str_replace('+', '', $score_search_query);\r\n }\r\n\r\n $sql_where_and = \"\";\r\n\r\n // If there are folder filters, then add an \"AND\" for the featured query.\r\n if ($sql_where_folders != '') {\r\n $sql_where_and .= \" AND \";\r\n }\r\n\r\n // Do a fulltext search for the keywords column first in order to get\r\n // featured items.\r\n $featured_items = db_items(\r\n \"SELECT\r\n id,\r\n url,\r\n title,\r\n description,\r\n MATCH(keywords) AGAINST ('\" . e($score_search_query) . \"') AS score\r\n FROM search_items\r\n WHERE\r\n $sql_where_folders\r\n $sql_where_and\r\n (MATCH(keywords) AGAINST('\" . e($filter_search_query) . \"'$sql_boolean_mode))\r\n ORDER BY score DESC\r\n LIMIT 100\");\r\n\r\n // Prepare where filter in order to prevent getting results that\r\n // already appeared in featured area.\r\n $sql_where_not_featured = \"\";\r\n\r\n foreach ($featured_items as $key => $item) {\r\n\r\n // If there are folder filters or if this is not the first not featured filter,\r\n // then add an \"AND\".\r\n if (($sql_where_folders != '') || ($sql_where_not_featured != '')) {\r\n $sql_where_not_featured .= \" AND \";\r\n }\r\n\r\n $sql_where_not_featured .= \"(id != '\" . $item['id'] . \"')\";\r\n \r\n $item['url'] = PATH . $item['url'];\r\n $item['full_url'] = HOSTNAME_SETTING . $item['url'];\r\n\r\n $featured_items[$key] = $item;\r\n }\r\n\r\n $sql_where_and = \"\";\r\n\r\n // If there are folder or not featured filters, then add an \"AND\".\r\n if (($sql_where_folders != '') || ($sql_where_not_featured != '')) {\r\n $sql_where_and .= \" AND \";\r\n }\r\n\r\n // Now do a fulltext search to get the normal results.\r\n $results = db_items(\r\n \"SELECT\r\n url,\r\n title,\r\n description,\r\n (\r\n (3 * (MATCH(title) AGAINST ('\" . e($score_search_query) . \"')))\r\n + (2 * (MATCH(description) AGAINST ('\" . e($score_search_query) . \"')))\r\n + (1 * (MATCH(content) AGAINST ('\" . e($score_search_query) . \"')))\r\n ) AS score\r\n FROM search_items\r\n WHERE\r\n $sql_where_folders\r\n $sql_where_not_featured\r\n $sql_where_and\r\n (MATCH(content) AGAINST('\" . e($filter_search_query) . \"'$sql_boolean_mode))\r\n ORDER BY score DESC\r\n LIMIT 100\");\r\n }\r\n }\r\n\r\n if ($layout_type == 'system') {\r\n\r\n // If search is set to advanced in the site settings, then do that type of search.\r\n if (SEARCH_TYPE == 'advanced') {\r\n\r\n $site_search_value = h($query);\r\n\r\n if ($site_search_value == '') {\r\n $site_search_value = 'Search';\r\n }\r\n\r\n $output_results = '';\r\n\r\n // If the search query is not blank, then continue to search.\r\n if ($query != '') {\r\n\r\n $output_featured_items = '';\r\n\r\n // If there is at least one featured item, then prepare to output them.\r\n if (count($featured_items) > 0) {\r\n $output_featured_items .=\r\n '<fieldset class=\"software_fieldset\">\r\n <legend class=\"software_legend\">Featured Search Results</legend>\r\n <div style=\"margin: 10px\">';\r\n \r\n $row_count = 1;\r\n\r\n // Loop through featured items in order to output them.\r\n foreach ($featured_items as $item) {\r\n\r\n $output_description = '';\r\n\r\n if ($item['description'] != '') {\r\n $output_description = h($item['description']);\r\n }\r\n\r\n $output_featured_items .=\r\n '<div class=\"data row_' . ($row_count % 2) .'\" style=\"margin-bottom: 1em\">\r\n <div class=\"search-title\">\r\n <a href=\"' . h($item['url']) . '\">' . h($item['title']) . '</a>\r\n </div>\r\n <div class=\"search-link\">' . h($item['full_url']) . '</div>\r\n <div class=\"search-description\">' . $output_description . '</div>\r\n </div>';\r\n\r\n $row_count++;\r\n }\r\n \r\n $output_featured_items .=\r\n ' </div>\r\n </fieldset>';\r\n }\r\n\r\n $output_catalog_items = '';\r\n\r\n // if the amount of catalog items is greater than 0, then output items\r\n if (count($catalog_items) > 0) {\r\n // get prices for products that have been discounted by offers, so we can show the discounted price\r\n $discounted_product_prices = get_discounted_product_prices();\r\n \r\n $output_catalog_items .= '<div class=\"software_catalog_search_results\">';\r\n\r\n $row_count = 1;\r\n\r\n // loop through all catalog items in order to prepare output\r\n foreach ($catalog_items as $item) {\r\n $output_link_start = '';\r\n $output_link_end = '';\r\n \r\n // if there is a catalog detail page selected, then output link to catalog detail page\r\n if ($catalog_detail_page_id != 0) {\r\n // if item is a product group, then set id name\r\n if ($item['type'] == 'product group') {\r\n $id_name = 'product_group_id';\r\n \r\n // else item is a product, so set id name\r\n } else {\r\n $id_name = 'product_id';\r\n }\r\n \r\n $output_link_start = '<a href=\"' . OUTPUT_PATH . h(encode_url_path(get_page_name($catalog_detail_page_id))) . '/' . h(encode_url_path(get_catalog_item_address_name_from_id($item['id'], $item['type']))) . '?previous_url_id=' . urlencode(generate_url_id()) . '\">';\r\n $output_link_end = '</a>';\r\n }\r\n \r\n $output_image = '';\r\n \r\n // if there is an image name then prepare and output image\r\n if ($item['image_name'] != '') {\r\n // Get the dimensions of the image\r\n $image_size = getimagesize(FILE_DIRECTORY_PATH . '/' . $item['image_name']);\r\n $image_width = $image_size[0];\r\n $image_height = $image_size[1];\r\n\r\n // get scaled dimensions of the image\r\n $thumbnail_dimensions = get_thumbnail_dimensions($image_width, $image_height, 100);\r\n \r\n // output image\r\n $output_image = '<div class=\"image\">' . $output_link_start . '<img class=\"image-primary\" src=\"' . OUTPUT_PATH . h(encode_url_path($item['image_name'])) . '\" width=\"' . $thumbnail_dimensions['width'] . '\" height=\"' . $thumbnail_dimensions['height'] . '\" alt=\"\" border=\"0\" />' . $output_link_end . '</div>';\r\n \r\n // if edit mode is on then add the edit button to images in content\r\n if ($editable == TRUE) {\r\n $output_image = add_edit_button_for_images(str_replace(' ' , '_', $item['type']), $item['id'], $output_image, 'image_name');\r\n }\r\n }\r\n \r\n $output_short_description = '';\r\n \r\n // if there is a short description then output short description\r\n if ($item['short_description'] != '') {\r\n $output_short_description = '<div class=\"short_description search-title\">' . $output_link_start . h($item['short_description']) . $output_link_end . '</div>';\r\n }\r\n \r\n $output_price = '';\r\n \r\n // if this item is a product group, then get price range for all product groups and products in this product group\r\n if ($item['type'] == 'product group') {\r\n // this product group is appearing in search results, so we know it has a select display type\r\n $item['display_type'] = 'select';\r\n \r\n $price_range = get_price_range($item['id'], $discounted_product_prices);\r\n \r\n // if there are non-donation products in product group, then output price range\r\n if ($price_range['non_donation_products_exist'] == true) {\r\n // if the smallest price and largest price are the same, then just output a price without a range\r\n if ($price_range['smallest_price'] == $price_range['largest_price']) {\r\n // if there is only one product and it is discounted, then prepare to show original price and discounted price\r\n if (($price_range['number_of_products'] == 1) && ($price_range['discounted_products_exist'] == TRUE)) {\r\n $output_price = '<div class=\"price search-description\">' . prepare_price_for_output($price_range['original_price'], TRUE, $price_range['smallest_price'], 'html') . '</div>';\r\n \r\n // else there is more than one product or there are no discounted products, so prepare to just show original price\r\n } else {\r\n // if this product group has a select display type and there are discounted products in it, then prepare to output single price with discounted styling\r\n if (($item['display_type'] == 'select') && ($price_range['discounted_products_exist'] == TRUE)) {\r\n $output_price = '<div class=\"price search-description\"><span class=\"software_discounted_price\">' . prepare_price_for_output($price_range['smallest_price'], FALSE, $discounted_price = '', 'html') . '</span></div>';\r\n \r\n // else this product group does not have a select display type or there are no discounted products in it, so prepare to output single price without discounted styling\r\n } else {\r\n $output_price = '<div class=\"price search-description\">' . prepare_price_for_output($price_range['smallest_price'], FALSE, $discounted_price = '', 'html') . '</div>';\r\n }\r\n }\r\n \r\n // else the smallest price and largest price are not the same, so output price range\r\n } else {\r\n // if this product group has a select display type and there are discounted products in it, then prepare to output price range with discounted styling\r\n if (($item['display_type'] == 'select') && ($price_range['discounted_products_exist'] == TRUE)) {\r\n $output_price = '<div class=\"price search-description\"><span class=\"software_discounted_price\">' . prepare_price_for_output($price_range['smallest_price'], FALSE, $discounted_price = '', 'html', $show_code = FALSE) . ' - ' . prepare_price_for_output($price_range['largest_price'], FALSE, $discounted_price = '', 'html') . '</span></div>';\r\n \r\n // else this product group does not have a select display type or there are no discounted products in it, so prepare to output price without discounted styling\r\n } else {\r\n $output_price = '<div class=\"price search-description\">' . prepare_price_for_output($price_range['smallest_price'], FALSE, $discounted_price = '', 'html', $show_code = FALSE) . ' - ' . prepare_price_for_output($price_range['largest_price'], FALSE, $discounted_price = '', 'html') . '</div>';\r\n }\r\n }\r\n }\r\n \r\n // else this item is a product, so if product is not a donation, then output product's price\r\n } elseif ($item['selection_type'] != 'donation') {\r\n // assume that the product is not discounted, until we find out otherwise\r\n $discounted = FALSE;\r\n $discounted_price = '';\r\n\r\n // if the product is discounted, then prepare to show that\r\n if (isset($discounted_product_prices[$item['id']]) == TRUE) {\r\n $discounted = TRUE;\r\n $discounted_price = $discounted_product_prices[$item['id']];\r\n }\r\n \r\n $output_price = '<div class=\"price search-description\">' . prepare_price_for_output($item['price'], $discounted, $discounted_price, 'html') . '</div>';\r\n }\r\n \r\n $output_catalog_items .=\r\n '<div class=\"item data row_' . ($row_count % 2) . '\" style=\"display: inline-block; text-align: center; width: 120px; margin-right: 2em; vertical-align: top;\">\r\n ' . $output_image . '\r\n ' . $output_short_description . '\r\n ' . $output_price . '\r\n </div>';\r\n $row_count++;\r\n }\r\n\r\n $output_catalog_items .= '</div>';\r\n }\r\n\r\n $row_count = 1;\r\n\r\n foreach ($results as $result) {\r\n $output_title = '';\r\n\r\n if ($result['title'] != '') {\r\n $output_title = '<a href=\"' . h(URL_SCHEME . HOSTNAME . PATH . $result['url']) . '\">' . h($result['title']) . '</a>';\r\n } else {\r\n $output_title = '<a href=\"' . h(URL_SCHEME . HOSTNAME . PATH . $result['url']) . '\">' . h(URL_SCHEME . HOSTNAME . PATH . $result['url']) . '</a>';\r\n }\r\n\r\n $output_description = '';\r\n\r\n if ($result['description'] != '') {\r\n $output_description = h($result['description']);\r\n }\r\n\r\n $output_url = '';\r\n\r\n if ($result['url'] != '') {\r\n $output_url = HOSTNAME . OUTPUT_PATH . h($result['url']);\r\n }\r\n\r\n $output_results .=\r\n '<div class=\"data row_' . ($row_count % 2) .'\" style=\"margin-bottom: 1em\">\r\n <div class=\"search-title\">' . $output_title . '</div>\r\n <div class=\"search-link\">' . $output_url . '</div>\r\n <div class=\"search-description\">' . $output_description . '</div>\r\n </div>';\r\n\r\n $row_count++;\r\n }\r\n }\r\n\r\n $number_of_results = count($featured_items) + count($catalog_items) + count($results);\r\n\r\n // If there is at least one result, then output heading for that.\r\n if ($number_of_results > 0) {\r\n // If the number of results from the fulltext/boolean search is 100,\r\n // then that means the 100 result limit was enforced, so output message to express that.\r\n if (count($results) == 100) {\r\n $output_heading = '<div class=\"search_results_heading\" style=\"font-weight: bold; margin-bottom: 1.5em\">Showing ' . number_format($number_of_results) . ' of the most relevant results for: ' . h($query) . '</div>';\r\n\r\n // Otherwise the number of results from the fulltext/boolean search is less than 100,\r\n // so the results were not limited, so output message to express that.\r\n } else {\r\n $plural_suffix = '';\r\n\r\n if ($number_of_results > 1) {\r\n $plural_suffix = 's';\r\n }\r\n\r\n $output_heading = '<div class=\"search_results_heading\" style=\"font-weight: bold; margin-bottom: 1.5em\">Found ' . number_format($number_of_results) . ' result' . $plural_suffix . ' for: ' . h($query) . '</div>';\r\n }\r\n\r\n // Otherwise there are no results, so if there is a search query,\r\n // then output heading for that.\r\n } else if ($query != '') {\r\n $output_heading = '<div class=\"search_results_heading\" style=\"font-weight: bold\">No results were found for: ' . h($query) . '</div>';\r\n\r\n // Otherwise there are no results because there was no search query,\r\n // so output heading for that.\r\n } else {\r\n $output_heading = '<div class=\"search_results_heading\" style=\"font-weight: bold\">Please enter keyword(s) or phrase to search.</div>';\r\n }\r\n\r\n return\r\n '<div class=\"software_search_results\">\r\n <div class=\"search_results_search\">\r\n <form class=\"mobile_align_left\" action=\"\" method=\"get\" style=\"text-align: right; margin: 0em 0em 1em 0em\">\r\n ' . $output_hidden_fields . '\r\n <span class=\"search\">\r\n <span class=\"simple\">\r\n <input class=\"software_input_text mobile_fixed_width query\" style=\"margin-bottom: 0 !important\" type=\"text\" name=\"' . $page_id . '_query\" value=\"' . $site_search_value . '\"\r\n onfocus=\"if ( this.value == \\'Search\\' ) { this.value = \\'\\';}\" onblur=\"if ( this.value == \\'\\') { this.value = \\'Search\\';}\" />\r\n <input type=\"submit\" title=\"Search\" value=\"\" class=\"submit\"/>\r\n </span>\r\n </span>\r\n </form>\r\n </div>\r\n ' . $output_heading . '\r\n ' . $output_featured_items . '\r\n ' . $output_catalog_items . '\r\n ' . $output_results . '\r\n </div>';\r\n\r\n // Otherwise search is set to simple in the site settings, so do that type of search.\r\n } else {\r\n\r\n $site_search_value = h($query);\r\n if ($site_search_value == '') {\r\n $site_search_value = 'Search';\r\n }\r\n \r\n $search_content =\r\n '<div class=\"search_results_search\">\r\n <form class=\"mobile_align_left\" action=\"\" method=\"get\" style=\"text-align: right; margin: 0em 0em 1em 0em\">\r\n ' . $output_hidden_fields . '\r\n <span class=\"search\">\r\n <span class=\"simple\">\r\n <input class=\"software_input_text mobile_fixed_width query\" style=\"margin-bottom: 0 !important\" type=\"text\" name=\"' . $page_id . '_query\" value=\"' . $site_search_value . '\"\r\n onfocus=\"if ( this.value == \\'Search\\' ) { this.value = \\'\\';}\" onblur=\"if ( this.value == \\'\\') { this.value = \\'Search\\';}\" />\r\n <input type=\"submit\" title=\"Search\" value=\"\" class=\"submit\"/>\r\n </span>\r\n </span>\r\n </form>\r\n </div>';\r\n \r\n // if there are more than 0 results\r\n if ((count($pages) > 0) || (count($featured_items) > 0) || (count($catalog_items) > 0)) {\r\n $search_content .= '<span class=\"search_results_heading\" style=\"font-weight:bold; margin-bottom:1em\">Found ' . number_format(count($pages) + count($featured_items) + count($catalog_items)) . ' result(s) for &quot;' . h($query) . '&quot;.</span><br /><br />';\r\n // If the keyword matching returned results, display them in separately.\r\n if (count($featured_items) > 0) {\r\n $search_content .=\r\n '<fieldset class=\"software_fieldset\">\r\n <legend class=\"software_legend\">Featured Search Results</legend>\r\n <div style=\"margin: 10px\">';\r\n \r\n $row_count = 1;\r\n\r\n // Loop through featured items in order to output them.\r\n foreach ($featured_items as $item) {\r\n\r\n $output_description = '';\r\n \r\n // if there is a description for page\r\n if ($item['description']) {\r\n $output_description = '<span class=\"search-description\">' . h($item['description']) . '</span><br />';\r\n }\r\n \r\n $search_content .=\r\n '<div class=\"data row_' . ($row_count % 2) .'\">' . '\r\n <a href=\"' . h($item['url']) . '\" class=\"search-title\">' . h($item['title']) . '</a><br>\r\n ' . $output_description . '<br>\r\n </div>';\r\n\r\n $row_count++;\r\n }\r\n \r\n $search_content .=\r\n ' </div>\r\n </fieldset>';\r\n }\r\n \r\n // if the amount of catalog items is greater than 0, then output items\r\n if (count($catalog_items) > 0) {\r\n // get prices for products that have been discounted by offers, so we can show the discounted price\r\n $discounted_product_prices = get_discounted_product_prices();\r\n \r\n $output_catalog_items = '';\r\n $row_count = 1;\r\n\r\n // loop through all catalog items in order to prepare output\r\n foreach ($catalog_items as $item) {\r\n $output_link_start = '';\r\n $output_link_end = '';\r\n \r\n // if there is a catalog detail page selected, then output link to catalog detail page\r\n if ($catalog_detail_page_id != 0) {\r\n // if item is a product group, then set id name\r\n if ($item['type'] == 'product group') {\r\n $id_name = 'product_group_id';\r\n \r\n // else item is a product, so set id name\r\n } else {\r\n $id_name = 'product_id';\r\n }\r\n \r\n $output_link_start = '<a href=\"' . OUTPUT_PATH . h(encode_url_path(get_page_name($catalog_detail_page_id))) . '/' . h(encode_url_path(get_catalog_item_address_name_from_id($item['id'], $item['type']))) . '?previous_url_id=' . urlencode(generate_url_id()) . '\">';\r\n $output_link_end = '</a>';\r\n }\r\n \r\n $output_image = '';\r\n \r\n // if there is an image name then prepare and output image\r\n if ($item['image_name'] != '') {\r\n // Get the dimensions of the image\r\n $image_size = getimagesize(FILE_DIRECTORY_PATH . '/' . $item['image_name']);\r\n $image_width = $image_size[0];\r\n $image_height = $image_size[1];\r\n\r\n // get scaled dimensions of the image\r\n $thumbnail_dimensions = get_thumbnail_dimensions($image_width, $image_height, 100);\r\n \r\n // output image\r\n $output_image = '<div class=\"image\">' . $output_link_start . '<img class=\"image-primary\" src=\"' . OUTPUT_PATH . h(encode_url_path($item['image_name'])) . '\" width=\"' . $thumbnail_dimensions['width'] . '\" height=\"' . $thumbnail_dimensions['height'] . '\" alt=\"\" border=\"0\" />' . $output_link_end . '</div>';\r\n \r\n // if edit mode is on then add the edit button to images in content\r\n if ($editable == TRUE) {\r\n $output_image = add_edit_button_for_images(str_replace(' ' , '_', $item['type']), $item['id'], $output_image, 'image_name');\r\n }\r\n }\r\n \r\n $output_short_description = '';\r\n \r\n // if there is a short description then output short description\r\n if ($item['short_description'] != '') {\r\n $output_short_description = '<div class=\"short_description search-title\">' . $output_link_start . h($item['short_description']) . $output_link_end . '</div>';\r\n }\r\n \r\n $output_price = '';\r\n \r\n // if this item is a product group, then get price range for all product groups and products in this product group\r\n if ($item['type'] == 'product group') {\r\n // this product group is appearing in search results, so we know it has a select display type\r\n $item['display_type'] = 'select';\r\n \r\n $price_range = get_price_range($item['id'], $discounted_product_prices);\r\n \r\n // if there are non-donation products in product group, then output price range\r\n if ($price_range['non_donation_products_exist'] == true) {\r\n // if the smallest price and largest price are the same, then just output a price without a range\r\n if ($price_range['smallest_price'] == $price_range['largest_price']) {\r\n // if there is only one product and it is discounted, then prepare to show original price and discounted price\r\n if (($price_range['number_of_products'] == 1) && ($price_range['discounted_products_exist'] == TRUE)) {\r\n $output_price = '<div class=\"price search-description\">' . prepare_price_for_output($price_range['original_price'], TRUE, $price_range['smallest_price'], 'html') . '</div>';\r\n \r\n // else there is more than one product or there are no discounted products, so prepare to just show original price\r\n } else {\r\n // if this product group has a select display type and there are discounted products in it, then prepare to output single price with discounted styling\r\n if (($item['display_type'] == 'select') && ($price_range['discounted_products_exist'] == TRUE)) {\r\n $output_price = '<div class=\"price search-description\"><span class=\"software_discounted_price\">' . prepare_price_for_output($price_range['smallest_price'], FALSE, $discounted_price = '', 'html') . '</span></div>';\r\n \r\n // else this product group does not have a select display type or there are no discounted products in it, so prepare to output single price without discounted styling\r\n } else {\r\n $output_price = '<div class=\"price search-description\">' . prepare_price_for_output($price_range['smallest_price'], FALSE, $discounted_price = '', 'html') . '</div>';\r\n }\r\n }\r\n \r\n // else the smallest price and largest price are not the same, so output price range\r\n } else {\r\n // if this product group has a select display type and there are discounted products in it, then prepare to output price range with discounted styling\r\n if (($item['display_type'] == 'select') && ($price_range['discounted_products_exist'] == TRUE)) {\r\n $output_price = '<div class=\"price search-description\"><span class=\"software_discounted_price\">' . prepare_price_for_output($price_range['smallest_price'], FALSE, $discounted_price = '', 'html', $show_code = FALSE) . ' - ' . prepare_price_for_output($price_range['largest_price'], FALSE, $discounted_price = '', 'html') . '</span></div>';\r\n \r\n // else this product group does not have a select display type or there are no discounted products in it, so prepare to output price without discounted styling\r\n } else {\r\n $output_price = '<div class=\"price search-description\">' . prepare_price_for_output($price_range['smallest_price'], FALSE, $discounted_price = '', 'html', $show_code = FALSE) . ' - ' . prepare_price_for_output($price_range['largest_price'], FALSE, $discounted_price = '', 'html') . '</div>';\r\n }\r\n }\r\n }\r\n \r\n // else this item is a product, so if product is not a donation, then output product's price\r\n } elseif ($item['selection_type'] != 'donation') {\r\n // assume that the product is not discounted, until we find out otherwise\r\n $discounted = FALSE;\r\n $discounted_price = '';\r\n\r\n // if the product is discounted, then prepare to show that\r\n if (isset($discounted_product_prices[$item['id']]) == TRUE) {\r\n $discounted = TRUE;\r\n $discounted_price = $discounted_product_prices[$item['id']];\r\n }\r\n \r\n $output_price = '<div class=\"price search-description\">' . prepare_price_for_output($item['price'], $discounted, $discounted_price, 'html') . '</div>';\r\n }\r\n \r\n $output_catalog_items .=\r\n '<div class=\"item data row_' . ($row_count % 2) . '\" style=\"display: inline-block; text-align: center; width: 120px; margin-right: 2em; vertical-align: top;\">\r\n ' . $output_image . '\r\n ' . $output_short_description . '\r\n ' . $output_price . '\r\n </div>';\r\n $row_count++;\r\n }\r\n \r\n // output items\r\n $search_content .= '<div class=\"software_catalog_search_results\">' . $output_catalog_items . '</div>';\r\n \r\n }\r\n \r\n // If there were still more results returned from the search that did not have a matching keyword, return them now.\r\n if (count($pages) > 0) {\r\n $row_count = 1;\r\n\r\n foreach ($pages as $key => $value) {\r\n // if there is a title, then prepare link with title\r\n if ($pages_info[$key]['title']) {\r\n $output_link = '<a href=\"' . OUTPUT_PATH . h($pages_info[$key]['name']) . '\" class=\"search-title\">' . h($pages_info[$key]['title']) . '</a>';\r\n \r\n // else there is not a title, so prepare URL link\r\n } else {\r\n $output_link = '<a href=\"' . OUTPUT_PATH . h($pages_info[$key]['name']) . '\" class=\"search-title\">' . HOSTNAME_SETTING . OUTPUT_PATH . h($pages_info[$key]['name']) . '</a>';\r\n }\r\n\r\n $output_meta_description = '';\r\n \r\n // if there is a meta description for page\r\n if ($pages_info[$key]['meta_description']) {\r\n $output_meta_description = '<span class=\"search-description\">' . h($pages_info[$key]['meta_description']) . '</span><br />';\r\n }\r\n \r\n $search_content .=\r\n '<div class=\"data row_' . ($row_count % 2) .'\">'\r\n . $output_link . '<br />\r\n ' . $output_meta_description . '<br />\r\n </div>';\r\n \r\n $row_count++;\r\n }\r\n }\r\n \r\n // otherwise there were 0 results\r\n } else {\r\n if ($query != '') {\r\n $search_content .= '<span class=\"search_results_heading\" style=\"font-weight:bold\">No results were found for &quot;' . h($query) . '&quot;.</span><br /><br />';\r\n } else {\r\n $search_content .= '<span class=\"search_results_heading\" style=\"font-weight:bold\">Please enter a keyword or phrase to search.</span>';\r\n }\r\n }\r\n\r\n return\r\n '<div class=\"software_search_results\">\r\n ' . $search_content . '\r\n </div>';\r\n\r\n }\r\n\r\n // Otherwise the layout is custom.\r\n } else {\r\n\r\n $form->add_fields_to_session();\r\n\r\n $attributes = 'action=\"\" method=\"get\"';\r\n \r\n $system = $output_hidden_fields;\r\n\r\n $limited = false;\r\n\r\n $number_of_results = 0;\r\n\r\n // If the visitor has entered a search query, then get results.\r\n if ($query != '') {\r\n\r\n // If this was an advanced search that was limited, then store that,\r\n // so that we can show a specific message concerning that.\r\n if ((SEARCH_TYPE == 'advanced') and (count($results) == 100)) {\r\n $limited = true;\r\n }\r\n\r\n if ($catalog_items) {\r\n\r\n if ($catalog_detail_page_id) {\r\n $url = PATH . encode_url_path(get_page_name($catalog_detail_page_id)) . '/';\r\n $query_string = '?previous_url_id=' . urlencode(generate_url_id());\r\n }\r\n\r\n // Get prices for products that have been discounted by offers,\r\n // so we can show the discounted price.\r\n $discounted_product_prices = get_discounted_product_prices();\r\n\r\n // Loop through the catalog items in order to prepare more info.\r\n foreach ($catalog_items as $key => $item) {\r\n $item['url'] = '';\r\n\r\n if ($catalog_detail_page_id) {\r\n $item['url'] = $url . encode_url_path(get_catalog_item_address_name_from_id($item['id'], $item['type'])) . $query_string;\r\n }\r\n\r\n $item['image_url'] = '';\r\n\r\n if ($item['image_name'] != '') {\r\n $item['image_url'] = PATH . encode_url_path($item['image_name']);\r\n }\r\n\r\n $output_price = '';\r\n \r\n // if this item is a product group, then get price range for all product groups and products in this product group\r\n if ($item['type'] == 'product group') {\r\n // this product group is appearing in search results, so we know it has a select display type\r\n $item['display_type'] = 'select';\r\n \r\n $price_range = get_price_range($item['id'], $discounted_product_prices);\r\n\r\n $item['price_range'] = $price_range;\r\n \r\n // if there are non-donation products in product group, then output price range\r\n if ($price_range['non_donation_products_exist'] == true) {\r\n // if the smallest price and largest price are the same, then just output a price without a range\r\n if ($price_range['smallest_price'] == $price_range['largest_price']) {\r\n // if there is only one product and it is discounted, then prepare to show original price and discounted price\r\n if (($price_range['number_of_products'] == 1) && ($price_range['discounted_products_exist'] == TRUE)) {\r\n $output_price = prepare_price_for_output($price_range['original_price'], TRUE, $price_range['smallest_price'], 'html');\r\n \r\n // else there is more than one product or there are no discounted products, so prepare to just show original price\r\n } else {\r\n // if this product group has a select display type and there are discounted products in it, then prepare to output single price with discounted styling\r\n if (($item['display_type'] == 'select') && ($price_range['discounted_products_exist'] == TRUE)) {\r\n $output_price = '<span class=\"software_discounted_price\">' . prepare_price_for_output($price_range['smallest_price'], FALSE, $discounted_price = '', 'html') . '</span>';\r\n \r\n // else this product group does not have a select display type or there are no discounted products in it, so prepare to output single price without discounted styling\r\n } else {\r\n $output_price = prepare_price_for_output($price_range['smallest_price'], FALSE, $discounted_price = '', 'html');\r\n }\r\n }\r\n \r\n // else the smallest price and largest price are not the same, so output price range\r\n } else {\r\n // if this product group has a select display type and there are discounted products in it, then prepare to output price range with discounted styling\r\n if (($item['display_type'] == 'select') && ($price_range['discounted_products_exist'] == TRUE)) {\r\n $output_price = '<span class=\"software_discounted_price\">' . prepare_price_for_output($price_range['smallest_price'], FALSE, $discounted_price = '', 'html', $show_code = FALSE) . ' - ' . prepare_price_for_output($price_range['largest_price'], FALSE, $discounted_price = '', 'html') . '</span>';\r\n \r\n // else this product group does not have a select display type or there are no discounted products in it, so prepare to output price without discounted styling\r\n } else {\r\n $output_price = prepare_price_for_output($price_range['smallest_price'], FALSE, $discounted_price = '', 'html', $show_code = FALSE) . ' - ' . prepare_price_for_output($price_range['largest_price'], FALSE, $discounted_price = '', 'html');\r\n }\r\n }\r\n }\r\n \r\n // else this item is a product, so if product is not a donation, then output product's price\r\n } elseif ($item['selection_type'] != 'donation') {\r\n // assume that the product is not discounted, until we find out otherwise\r\n $discounted = FALSE;\r\n $discounted_price = '';\r\n\r\n // if the product is discounted, then prepare to show that\r\n if (isset($discounted_product_prices[$item['id']]) == TRUE) {\r\n $discounted = TRUE;\r\n $discounted_price = $discounted_product_prices[$item['id']];\r\n }\r\n \r\n $output_price = prepare_price_for_output($item['price'], $discounted, $discounted_price, 'html');\r\n }\r\n\r\n $item['price_info'] = $output_price;\r\n\r\n $item['price'] = $item['price'] / 100;\r\n\r\n if ($item['price_range']) {\r\n $item['price_range']['smallest_price'] = $item['price_range']['smallest_price'] / 100;\r\n $item['price_range']['largest_price'] = $item['price_range']['largest_price'] / 100;\r\n $item['price_range']['original_price'] = $item['price_range']['original_price'] / 100;\r\n }\r\n\r\n $catalog_items[$key] = $item;\r\n }\r\n\r\n }\r\n\r\n // If the search type is simple, then prepare page info.\r\n if (SEARCH_TYPE == 'simple') {\r\n foreach ($pages as $this_page_id => $value) {\r\n $page = $pages_info[$this_page_id];\r\n\r\n $result = array();\r\n\r\n if ($page['title']) {\r\n $result['title'] = $page['title'];\r\n } else {\r\n $result['title'] = $page['name'];\r\n }\r\n\r\n $result['url'] = PATH . encode_url_path($page['name']);\r\n $result['full_url'] = HOSTNAME_SETTING . $result['url'];\r\n $result['description'] = $page['meta_description'];\r\n\r\n $results[] = $result;\r\n }\r\n\r\n // Otherwise the search type is advanced, so prepare data for that.\r\n } else {\r\n foreach ($results as $key => $result) {\r\n $result['url'] = PATH . $result['url'];\r\n $result['full_url'] = HOSTNAME_SETTING . $result['url'];\r\n\r\n if (!$result['title']) {\r\n $result['title'] = $result['full_url'];\r\n }\r\n\r\n $results[$key] = $result;\r\n }\r\n }\r\n\r\n $number_of_results =\r\n count($featured_items) + count($catalog_items) + count($results);\r\n }\r\n\r\n $content = render_layout(array(\r\n 'page_id' => $page_id,\r\n 'messages' => $form->get_messages(),\r\n 'form' => $form,\r\n 'attributes' => $attributes,\r\n 'system' => $system,\r\n 'query' => $query,\r\n 'limited' => $limited,\r\n 'number_of_results' => $number_of_results,\r\n 'featured_items' => $featured_items,\r\n 'catalog_items' => $catalog_items,\r\n 'results' => $results));\r\n\r\n $content = $form->prepare($content);\r\n\r\n $form->remove();\r\n\r\n return\r\n '<div class=\"software_search_results\">\r\n ' . $content . '\r\n </div>';\r\n\r\n }\r\n}", "title": "" } ]
96234088186b1f91b7fdc10f17fb5820
Set the description of the project
[ { "docid": "6f761c59c1eaf3ce8bc268d71755ca75", "score": "0.73594576", "text": "public function setProjectDescription($projectDescription)\n {\n $this->projectDescription = $projectDescription;\n }", "title": "" } ]
[ { "docid": "fc36456e1170436c138b0e76419ece87", "score": "0.76781356", "text": "public function setDescription($description) {\n $this->description = $description;\n }", "title": "" }, { "docid": "58835d22da757b455026f4bd3c01e035", "score": "0.7586594", "text": "function setDescription($description) {\n $this->_description = $description;\n }", "title": "" }, { "docid": "256bdd8b65bae5f83821d84e96af3073", "score": "0.75495934", "text": "public function testGetSetDescription()\n {\n $project = new Project();\n $description = 'some description, really gud project trust me';\n $this->assertNull($project->getDescription());\n $project->setDescription($description);\n $this->assertEquals($description, $project->getDescription());\n }", "title": "" }, { "docid": "180526e647b4843a8b74fa24e1e22002", "score": "0.752571", "text": "public function setDescription($description){\r\n\t $this->description=$description;\r\n\t}", "title": "" }, { "docid": "92c037e16c23fb70abdfcbfa398732d9", "score": "0.7506697", "text": "public function set_description($new)\r\n {\r\n file_put_contents($this->repo_path.\"/.git/description\", $new);\r\n }", "title": "" }, { "docid": "523494733c17389ccbfcdce9ba37c7bf", "score": "0.7462651", "text": "public function setDescription($description){\n\t\t\t$this->description = $description;\n\t\t}", "title": "" }, { "docid": "8046d7eb2454d0ef179331047a4b2483", "score": "0.7444874", "text": "public function setDescription($description){\n\t \t$this->description = $description;\n\t }", "title": "" }, { "docid": "2de74bbb9dd2cf41fe61f9c57f0224d1", "score": "0.7423387", "text": "public function setDescription($description) {\n $this->description = $description;\n }", "title": "" }, { "docid": "9e4e29606e029ff4ca54f6216b058281", "score": "0.74103004", "text": "public function setDescription($description) {\n\t\t$this->description = $description;\n\t}", "title": "" }, { "docid": "9e4e29606e029ff4ca54f6216b058281", "score": "0.74103004", "text": "public function setDescription($description) {\n\t\t$this->description = $description;\n\t}", "title": "" }, { "docid": "9e4e29606e029ff4ca54f6216b058281", "score": "0.74103004", "text": "public function setDescription($description) {\n\t\t$this->description = $description;\n\t}", "title": "" }, { "docid": "2fd911b933c39633d3b602c7845f7f43", "score": "0.7407614", "text": "public function setDescription($description);", "title": "" }, { "docid": "2fd911b933c39633d3b602c7845f7f43", "score": "0.7407614", "text": "public function setDescription($description);", "title": "" }, { "docid": "2fd911b933c39633d3b602c7845f7f43", "score": "0.7407614", "text": "public function setDescription($description);", "title": "" }, { "docid": "e37ef7b329268fc57774778e285198d2", "score": "0.7390586", "text": "private function setDescription($description)\n {\n $this->description = $description;\n }", "title": "" }, { "docid": "17820d51f4c2e93065bdcb84b7526c00", "score": "0.7386834", "text": "public function setDescription( $description ) {\n\t\t\t$this->description = $description;\n\t\t}", "title": "" }, { "docid": "4758d2c5e4aee4da3c99524aa4284125", "score": "0.73839444", "text": "protected function setDescription( $description )\n\t{\n\t\t$this->description = $description;\n\t}", "title": "" }, { "docid": "9402d815962d26f046d9c5d053412ab9", "score": "0.73826504", "text": "function defineDescription() {\n return 'Create a new application inside of a selected project';\n }", "title": "" }, { "docid": "5640e148efa3e69aeabb84ba8d6161e6", "score": "0.73689985", "text": "public function setDescription($description)\n {\n $this->description = $description;\n }", "title": "" }, { "docid": "5640e148efa3e69aeabb84ba8d6161e6", "score": "0.73689985", "text": "public function setDescription($description)\n {\n $this->description = $description;\n }", "title": "" }, { "docid": "5640e148efa3e69aeabb84ba8d6161e6", "score": "0.73689985", "text": "public function setDescription($description)\n {\n $this->description = $description;\n }", "title": "" }, { "docid": "5640e148efa3e69aeabb84ba8d6161e6", "score": "0.73689985", "text": "public function setDescription($description)\n {\n $this->description = $description;\n }", "title": "" }, { "docid": "5640e148efa3e69aeabb84ba8d6161e6", "score": "0.73689985", "text": "public function setDescription($description)\n {\n $this->description = $description;\n }", "title": "" }, { "docid": "5640e148efa3e69aeabb84ba8d6161e6", "score": "0.73689985", "text": "public function setDescription($description)\n {\n $this->description = $description;\n }", "title": "" }, { "docid": "5640e148efa3e69aeabb84ba8d6161e6", "score": "0.73689985", "text": "public function setDescription($description)\n {\n $this->description = $description;\n }", "title": "" }, { "docid": "5640e148efa3e69aeabb84ba8d6161e6", "score": "0.73689985", "text": "public function setDescription($description)\n {\n $this->description = $description;\n }", "title": "" }, { "docid": "5640e148efa3e69aeabb84ba8d6161e6", "score": "0.73689985", "text": "public function setDescription($description)\n {\n $this->description = $description;\n }", "title": "" }, { "docid": "5536ed83452ac1a83bba9a54a6c95d3c", "score": "0.7345187", "text": "protected function setDescription($description)\n {\n $this->description = $description;\n }", "title": "" }, { "docid": "fbd5426b2aa64851314768d10233b7fd", "score": "0.7343053", "text": "public function setDescription($description)\n\t{\n\t\t$this->description = $description;\n\t}", "title": "" }, { "docid": "71c8d208f321dfd445d382dd63a9db6e", "score": "0.7305593", "text": "function setDescription($description) {\n\t\t$this->description = (string) $description;\n\t}", "title": "" }, { "docid": "bddc2b4a530f32aa79e7a71ed128e583", "score": "0.72963166", "text": "public function description($text) {\r\n\t $this->description = $text;\r\n }", "title": "" }, { "docid": "2ea206da5ec3a53c59e583a9f20d24de", "score": "0.72935563", "text": "public function setDescription($description)\n {\n $this->description = $description;\n }", "title": "" }, { "docid": "909f9891704b193bdb283d2ff5a14e3a", "score": "0.72575045", "text": "public function setDescription($value)\n {\n $this->description = $value;\n }", "title": "" }, { "docid": "81310faf967ed9585a6315d371e9ab9f", "score": "0.7248979", "text": "public function setDescription($desc = null) {\n $this->description = $desc;\n }", "title": "" }, { "docid": "5380232bfaf92d04728b59097d851e91", "score": "0.7233792", "text": "public function setDescription($description) { $this->_data->Description->Text = $description; return $this; }", "title": "" }, { "docid": "d12833ddae5c99e1b84435c3ee5eb2db", "score": "0.72280675", "text": "protected function assignDescription()\n {\n $this->description = 'Installs MenuBuilder snippet, buildMenuSequence plugin and related system settings.';\n }", "title": "" }, { "docid": "6d1cc0b301e18de69599ec041c990487", "score": "0.7192335", "text": "public function set_description($descr)\n\t{\n\t\t$this->description = $descr;\n\t}", "title": "" }, { "docid": "4e0cd0fbaa9e0b67a75907876985e687", "score": "0.7168053", "text": "public function setDescription($description): void\n {\n $this->_description = $description;\n }", "title": "" }, { "docid": "e4e7d93de1a9c3ce16cd49b8644d8ea0", "score": "0.71596533", "text": "function set_description($description)\r\n {\r\n $this->set_default_property(self :: PROPERTY_DESCRIPTION, $description);\r\n }", "title": "" }, { "docid": "c6f8a804ac6aea4e3ecea32667a3a704", "score": "0.71556985", "text": "function setDescription($new_description)\n {\n $this->description = (string) $new_description;\n }", "title": "" }, { "docid": "a4aa0fdafc9dbb4115fc370199b67338", "score": "0.71414816", "text": "function setDescription( &$value )\r\n {\r\n $this->Description = $value;\r\n }", "title": "" }, { "docid": "211cc25edfb73f8d664a312d86a02f90", "score": "0.7131267", "text": "public function setDescription() {\n\t\t$data = Moondee_Description_Helper::getObjectDescriptions( $this->id );\n\t\t$description = current( $data );\n\t\t\n\t\tif( $description ){\n\t\t\t$this->description = $description;\n\t\t}\n\t}", "title": "" }, { "docid": "deec6243339f885d6cf0e87e4d8af81e", "score": "0.7127768", "text": "public function setDescription($description)\n {\n $this->description = (string) $description;\n }", "title": "" }, { "docid": "38f0bae93f8e5263dae06243d5d0b31b", "score": "0.71268326", "text": "public function setDescription($description){\n $this->metaDescription = $description;\n }", "title": "" }, { "docid": "805c3dd908440090ec621a4d7753ae61", "score": "0.71073896", "text": "function setDescription( $value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->Description = $value;\n }", "title": "" }, { "docid": "a14def2478f21c0734aa3cae65f10c73", "score": "0.70952314", "text": "public function setDescription(string $description)\n {\n $this->description = $description;\n }", "title": "" }, { "docid": "c1d3a279ddea6136a0335f0e248917b0", "score": "0.70874375", "text": "public function set_description ($description) {\n $this->description = $description;\n }", "title": "" }, { "docid": "1523b68e685a3f099db455cb07466e11", "score": "0.70857275", "text": "public function setDescription(string $description): void\n {\n $this->description = $description;\n }", "title": "" }, { "docid": "1523b68e685a3f099db455cb07466e11", "score": "0.70857275", "text": "public function setDescription(string $description): void\n {\n $this->description = $description;\n }", "title": "" }, { "docid": "1523b68e685a3f099db455cb07466e11", "score": "0.70857275", "text": "public function setDescription(string $description): void\n {\n $this->description = $description;\n }", "title": "" }, { "docid": "b195d6d35e287c8b7b10dfcd83a239ad", "score": "0.7057475", "text": "public function setDescription($value)\n {\n $this->setProperty(\"Description\", $value, true);\n }", "title": "" }, { "docid": "e2a2517a8ca48a678ff9f188078e93cf", "score": "0.7050459", "text": "public function setDescription($desc) {\r\n $this->description = $desc;\r\n \r\n modifyItem($this->id, \"description\", $desc);\r\n }", "title": "" }, { "docid": "c2880d4a120e89b763efd3c6fc69c868", "score": "0.7016571", "text": "public function setDescription(string $description): void\n {\n $this->_description = $description;\n }", "title": "" }, { "docid": "c2880d4a120e89b763efd3c6fc69c868", "score": "0.7016571", "text": "public function setDescription(string $description): void\n {\n $this->_description = $description;\n }", "title": "" }, { "docid": "254fb22ea901925a2676ffabbd0a0b11", "score": "0.7012429", "text": "public function setDescription(string $text)\n {\n $this->description = $text;\n }", "title": "" }, { "docid": "408b89d8e22268d5e02f0990125228c3", "score": "0.7010197", "text": "function SetDescription( $descr='' )\n {\n if( $this->Is_404() ) $this->Description = '';\n $this->Description = $descr;\n }", "title": "" }, { "docid": "f3764dccfbdf65577108e14f08dbc4db", "score": "0.70052475", "text": "function setDescription($a_descr)\n\t{\n\t\t$this->title_desc = $a_descr;\n//\t\t$this->setVariable(\"H_DESCRIPTION\", $a_descr);\n\t}", "title": "" }, { "docid": "fac8baaabadbbb4109bd786ab12d7dbd", "score": "0.6999204", "text": "public function setDescription($description)\n\t{\n\t\t$this->_description = TPropertyValue::ensureString($description);\n\t}", "title": "" }, { "docid": "fd2b97ac83e0993701f23ab68eb0fc29", "score": "0.6989221", "text": "public function SetDescription($description)\r\n\t\t{\r\n\t\t\t\t$this->description = $description;\r\n\t\t}", "title": "" }, { "docid": "fd2b97ac83e0993701f23ab68eb0fc29", "score": "0.6989221", "text": "public function SetDescription($description)\r\n\t\t{\r\n\t\t\t\t$this->description = $description;\r\n\t\t}", "title": "" }, { "docid": "fd2b97ac83e0993701f23ab68eb0fc29", "score": "0.6989221", "text": "public function SetDescription($description)\r\n\t\t{\r\n\t\t\t\t$this->description = $description;\r\n\t\t}", "title": "" }, { "docid": "fd2b97ac83e0993701f23ab68eb0fc29", "score": "0.6989221", "text": "public function SetDescription($description)\r\n\t\t{\r\n\t\t\t\t$this->description = $description;\r\n\t\t}", "title": "" }, { "docid": "fd2b97ac83e0993701f23ab68eb0fc29", "score": "0.6989221", "text": "public function SetDescription($description)\r\n\t\t{\r\n\t\t\t\t$this->description = $description;\r\n\t\t}", "title": "" }, { "docid": "fd2b97ac83e0993701f23ab68eb0fc29", "score": "0.6989221", "text": "public function SetDescription($description)\r\n\t\t{\r\n\t\t\t\t$this->description = $description;\r\n\t\t}", "title": "" }, { "docid": "dac430a4d56d7620501fd58941cccc2b", "score": "0.6962412", "text": "public function setDescription($description)\n {\n if ($description) {\n $this->items[ConfigUtil::DESCRIPTION] = $description;\n } else {\n unset($this->items[ConfigUtil::DESCRIPTION]);\n }\n }", "title": "" }, { "docid": "c09e7e6d14373800a0affb2328304fc5", "score": "0.69499713", "text": "public function setDescription($description)\n {\n $this->description = $description;\n \n return $this;\n }", "title": "" }, { "docid": "ca43ceab430ff086fc81914ad9c1787d", "score": "0.69434404", "text": "public function getProjectDescription()\n {\n return $this->projectDescription;\n }", "title": "" }, { "docid": "24deec1d4942b83ad6344b2cf32fe484", "score": "0.6929896", "text": "public function set_description($string = '')\n {\n if (self::debug > 0) {\n error_log('learnpathItem::set_description()', 0);\n }\n if (!empty($string)) {\n $this->description = $string;\n }\n }", "title": "" }, { "docid": "2219147ae558e9d843c3c9c46bb3a734", "score": "0.6908141", "text": "public function setDescription($description): void\r\n {\r\n $this->validateDescription($description);\r\n $this->data['DESCRIPTION'] = $description;\r\n }", "title": "" }, { "docid": "c518d17a0dafb6b3c25601e24b7d7070", "score": "0.68975335", "text": "function set_description($description)\r\n {\r\n return $this->set_default_property(self :: PROPERTY_DESCRIPTION, $description);\r\n }", "title": "" }, { "docid": "d47a689d3c2e33df2da747bd6a7b6bf2", "score": "0.68940514", "text": "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n }", "title": "" }, { "docid": "2e5639281a4e7214cf2a592b7807d118", "score": "0.68911695", "text": "public function setDescription($description)\n {\n $this->description = trim($description);\n }", "title": "" }, { "docid": "8e612dd726b640d43e1d0b7606e38e5f", "score": "0.68648946", "text": "public function setDescription($description)\n {\n $this->_description = trim($description);\n }", "title": "" }, { "docid": "9ec9cb336bf737ccae62311b6e1089ff", "score": "0.68624216", "text": "public function setDescription(?string $description): void\n {\n $this->description = $description;\n }", "title": "" }, { "docid": "9ec9cb336bf737ccae62311b6e1089ff", "score": "0.68624216", "text": "public function setDescription(?string $description): void\n {\n $this->description = $description;\n }", "title": "" }, { "docid": "69f589188871bac7dc21d65babc4cde6", "score": "0.68530047", "text": "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "69f589188871bac7dc21d65babc4cde6", "score": "0.68530047", "text": "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "69f589188871bac7dc21d65babc4cde6", "score": "0.68530047", "text": "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "69f589188871bac7dc21d65babc4cde6", "score": "0.68530047", "text": "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "69f589188871bac7dc21d65babc4cde6", "score": "0.68530047", "text": "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "69f589188871bac7dc21d65babc4cde6", "score": "0.68530047", "text": "public function setDescription($val)\n {\n $this->_propDict[\"description\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "68027175a35abd44a8f25198f47b1cd9", "score": "0.685164", "text": "private function _setDescription()\n {\n $description = $this->_getElementText('Description');\n if (false === $description) {\n return;\n }\n // Truncate long descriptions when needed.\n if (self::ELEMENT_DESCRIPTION_TRUNCATE_LENGTH <= strlen($description)) {\n $description = substr($description, \n 0, \n self::ELEMENT_DESCRIPTION_TRUNCATE_LENGTH);\n }\n $this->_coins['rft.description'] = $description;\n }", "title": "" }, { "docid": "93c2bbebc61307fffd3b609d5f78c54e", "score": "0.68384975", "text": "public function SetDescription($description)\n {\n $this->description = $description;\n }", "title": "" }, { "docid": "8560d9f71111b895c4207acbc56a4e52", "score": "0.6822492", "text": "public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }", "title": "" }, { "docid": "44f92a6b61fa7c3cee30ee0a6493f0dc", "score": "0.6768244", "text": "public function setDescription($description) {\n\n\t\tself::setAttribute(\"/description\", $dscription);\n\t}", "title": "" }, { "docid": "604c348ea9468577b4f820021ec8ca2a", "score": "0.67642134", "text": "public function description($description = '')\n\t{\n\t\t$this->description = $description;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "52b83ca0a0d54290889444e8f89ef1fe", "score": "0.6762318", "text": "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "title": "" }, { "docid": "52b83ca0a0d54290889444e8f89ef1fe", "score": "0.6762318", "text": "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "title": "" }, { "docid": "52b83ca0a0d54290889444e8f89ef1fe", "score": "0.6762318", "text": "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "title": "" }, { "docid": "52b83ca0a0d54290889444e8f89ef1fe", "score": "0.6762318", "text": "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "title": "" }, { "docid": "52b83ca0a0d54290889444e8f89ef1fe", "score": "0.6762318", "text": "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "title": "" }, { "docid": "52b83ca0a0d54290889444e8f89ef1fe", "score": "0.6762318", "text": "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "title": "" }, { "docid": "52b83ca0a0d54290889444e8f89ef1fe", "score": "0.6762318", "text": "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "title": "" }, { "docid": "52b83ca0a0d54290889444e8f89ef1fe", "score": "0.6762318", "text": "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "title": "" }, { "docid": "52b83ca0a0d54290889444e8f89ef1fe", "score": "0.6762318", "text": "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "title": "" }, { "docid": "52b83ca0a0d54290889444e8f89ef1fe", "score": "0.6762318", "text": "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "title": "" }, { "docid": "52b83ca0a0d54290889444e8f89ef1fe", "score": "0.6762318", "text": "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "title": "" }, { "docid": "52b83ca0a0d54290889444e8f89ef1fe", "score": "0.6762318", "text": "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "title": "" }, { "docid": "52b83ca0a0d54290889444e8f89ef1fe", "score": "0.6762318", "text": "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "title": "" }, { "docid": "52b83ca0a0d54290889444e8f89ef1fe", "score": "0.6762318", "text": "public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }", "title": "" } ]
305ca253c46568968a687507cc04a786
Get user detail by email
[ { "docid": "999b99afddf0176e7b3a931f6dafa2f3", "score": "0.0", "text": "public function getUserDetailByUsername($uname) {\n\t\t$this->db->select('*')\n\t\t\t\t ->from(TABLES::$CLIENT_USER)\n\t\t\t\t ->where('username',$uname);\n\t\t$query = $this->db->get ();\n\t\t$result = $query->result_array ();\n\t\treturn $result;\n\t}", "title": "" } ]
[ { "docid": "49eb5b07d88fee1c1590927e3162ab5c", "score": "0.85600895", "text": "public function getUserDetailByEmail($email);", "title": "" }, { "docid": "2a912d7fb2ba1734a41ed829cf7ba967", "score": "0.7961901", "text": "public function userDetail($email) {\n $user = array();\n if($email != \"\") {\n $user = User::where(\"email\", $email)->first();\n return $user;\n }\n }", "title": "" }, { "docid": "7ed5e6f6c130fd7816637c12dd08b7ee", "score": "0.7950475", "text": "public function getUserByEmail($email);", "title": "" }, { "docid": "7ed5e6f6c130fd7816637c12dd08b7ee", "score": "0.7950475", "text": "public function getUserByEmail($email);", "title": "" }, { "docid": "285c84329b175ce8414e4e58ec480abe", "score": "0.78159994", "text": "public function getUserDetails($email){\n return $this->db->find(\"SELECT * FROM \".DB_PREFIX.\"adminusers WHERE email = '\".$email.\"' \");\n }", "title": "" }, { "docid": "9da5aedd0d14833a6e0129611c959f4c", "score": "0.77952546", "text": "function api_get_user_info_from_email($email = '')\n{\n if (empty($email)) {\n return false;\n }\n $sql = \"SELECT * FROM \".Database :: get_main_table(TABLE_MAIN_USER).\"\n WHERE email ='\".Database::escape_string($email).\"' LIMIT 1\";\n $result = Database::query($sql);\n if (Database::num_rows($result) > 0) {\n $result_array = Database::fetch_array($result);\n return _api_format_user($result_array);\n }\n\n return false;\n}", "title": "" }, { "docid": "7fe136830cb3ccee1ca0a799f2d8830b", "score": "0.75114834", "text": "function get_user_by_email($email){\n //return user_id\n}", "title": "" }, { "docid": "dbf6f6c9202133e0a65634e3c5b032cb", "score": "0.7484463", "text": "public function show($email)\n {\n //\n $data = $this->users->getUser($email);\n return response()->json($data);\n }", "title": "" }, { "docid": "8cbde3ab24f4a17ce95af47142372327", "score": "0.74606353", "text": "public function getUserByEmail($email)\n {\n return $this->user->where('email', $email)->where('idrol', '1')->with(['numbers'])->first();\n }", "title": "" }, { "docid": "d6f913e363c51490cba162b6e376ad75", "score": "0.74538994", "text": "public function getUserByEmail($email){\n\t\t// TODO: Implement getUserByEmail() method.\n\t}", "title": "" }, { "docid": "d93a8be6c5e09c40624f62193408730c", "score": "0.74531585", "text": "public function show($email)\n {\n //\n $user = User::where('email', '=', $email)->first();\n\n return $user;\n\n }", "title": "" }, { "docid": "dce2bdf51dd168cd80943261dd307961", "score": "0.7432778", "text": "public function getUserByEmail() {\n\n // Open database connection\n $db = init_db();\n\n $req = $db->prepare( \"SELECT * FROM user WHERE email = ?\" );\n $req->execute( array( $this->getEmail() ));\n\n // Close databse connection\n $db = null;\n\n return $req->fetch();\n }", "title": "" }, { "docid": "f277696224261cdd304f68dd5b7323d1", "score": "0.738826", "text": "function get_user_by_email($email) {\n\t\t$query = $this->db->query(\"SELECT * FROM users u, user_profiles up WHERE u.email='$email' and u.id = up.user_id\");\n\t\treturn $query->result();\n\t}", "title": "" }, { "docid": "7aa011875c7a6e7072dc00220d9919a5", "score": "0.7384497", "text": "public abstract function getUserFromEmail($email);", "title": "" }, { "docid": "a25525e454ccb32e32cb1c233e8c2039", "score": "0.73787", "text": "function get_user_by_email($email)\r\n\t{\r\n\t\t$query = $this->db->query(\"SELECT * FROM users u, user_profiles up WHERE u.email='$email' and u.id = up.user_id\");\r\n\t\treturn $query->result();\r\n\t}", "title": "" }, { "docid": "67ec20f09d6c2c5a05c0f678ec47b458", "score": "0.73660153", "text": "function get_user_by_email($email){ \n $query = \"SELECT * FROM users WHERE email=?\";\n return $this->db->query($query, $this->security->xss_clean($email))->result_array()[0];\n }", "title": "" }, { "docid": "179063803374fdd5311dc4040e0d28ec", "score": "0.73459136", "text": "public function getUserByPK($email)\n {\n return $this->user->with(['numbers'])->find($email);\n }", "title": "" }, { "docid": "336db45798db225044810c68fc311705", "score": "0.72876006", "text": "public function getUserByEmail($email) {\n $db_con = Spire::getConnection();\n\n $stmt = $db_con->prepare(\"SELECT id, first_name, last_name, email, api_key, status, role, created_at FROM users WHERE email = ?\");\n $stmt->execute(array($email));\n\n if ($stmt->execute()) {\n $userData = $stmt->fetch();\n\n $user = array();\n\n /* fetch values */\n // mysqli_stmt_fetch($stmt);\n\n /* set values */\n $user['id'] = $userData['id'];\n $user['first_name'] = $userData['first_name'];\n $user['last_name'] = $userData['last_name'];\n $user['email'] = $userData['email'];\n $user['api_key'] = $userData['api_key'];\n $user['role'] = $userData['role'];\n $user['created_at'] = $userData['created_at'];\n\n return $user;\n $stmt->close();\n } else {\n return NULL;\n }\n }", "title": "" }, { "docid": "973228c149865b626e07806003cf1d5c", "score": "0.72757745", "text": "public function findUserByEmail($email);", "title": "" }, { "docid": "07ba04a594426cc88eb228ca83418a5f", "score": "0.7249667", "text": "public function getUserByEmail($email)\n {\n return $this->where(['email' => $email])->first();\n }", "title": "" }, { "docid": "f1ea2f64e1ed8047bf14a491a590d244", "score": "0.72423095", "text": "public function test_get_user_by_email() {\n\t\t$this->assertNull( $this->obj->get_user_by_email( - 1 ) );\n\t\t$this->assertNull( $this->obj->get_user_by_email( true ) );\n\t\t$this->assertNull( $this->obj->get_user_by_email( 'random' ) );\n\n\t\t// Should not match on % in the string.\n\t\t$this->assertNull( $this->obj->get_user_by_email( 'admin%' ) );\n\n\t\t// Should fetch the user associated with an email-address.\n\t\t$expected = [\n\t\t\t'id' => '1',\n\t\t\t'naam' => 'Admin user',\n\t\t\t'email' => '[email protected]',\n\t\t\t'rank' => '1',\n\t\t];\n\t\t$result = $this->obj->get_user_by_email( '[email protected]' );\n\t\t$this->assertInstanceOf( 'User', $result );\n\t\t$this->assertNotEmpty( $result );\n\t\t$this->assertEquals( $expected['id'], $result->id );\n\t}", "title": "" }, { "docid": "f37f23269cc143b7bd4a3a33d6f2b286", "score": "0.72300935", "text": "public function getUserByEmail($email) {\n $this->db->query(\"SELECT *, users.id user_id, roles.id role_id, roles.role FROM users JOIN roles ON users.role_id = roles.id WHERE users.email = :email\");\n\n // Bind value\n $this->db->bind(\":email\", $email);\n\n $row = $this->db->single();\n return $row;\n }", "title": "" }, { "docid": "2166b0e7ab93504de5d0d25b91700116", "score": "0.7214346", "text": "public function getUserByUserName($email){\n // SELECT * FROM users WHERE remeber_token = $token\n // SELECT * FROM users WHERE id = $id\n // SELECT * FROM users\n $args = array(\n // 'fields' => 'id, name, status, password, email'\n // 'fields' => ['id', 'name', 'status', 'password', 'email']\n 'where' => array(\n 'email' => $email\n )\n );\n return $this->select($args);\n }", "title": "" }, { "docid": "8ba7f6bae635686371ff4c82a055d74f", "score": "0.72046727", "text": "public function getUserByEmail($email)\n {\n return $this->userRepo->findWhere(['email' => $email])->first();\n }", "title": "" }, { "docid": "56b1c6fa898957a335e1365607052b4c", "score": "0.71756047", "text": "function getuserdetailsbyemail()\n{\n\tglobal $con;\n\t$sql=\"SELECT * FROM `vs_user` WHERE `customer_email`='\".mysqli_real_escape_string($con,$_SESSION['UserEmail']).\"' \";\n\t$result=$con->query($sql);\n\n\tif($result->num_rows > 0)\n\t{\n\t\t$row = $result->fetch_assoc();\n\t\treturn $row;\n\t}\n\telse\n\t{\n\t\techo \"<script>window.open('login.php?name=VXNlciBMb2dpbg==','_self');</script>\";\n\t}\n}", "title": "" }, { "docid": "650f23346a7305df15fbee17daf0913d", "score": "0.71418154", "text": "public function getUserByEmail($email) {\n $stmt = $this->conn->prepare(\"SELECT user_id, user_role,first_name, last_name,organisation_name, email, api_key, user_status, postcode, image_url, updated_on FROM users WHERE email = ?\");\n $stmt->bind_param(\"s\", $email);\n\t\n if ($stmt->execute()) {\n // $user = $stmt->get_result()->fetch_assoc();\n $stmt->bind_result($user_id, $user_role, $first_name, $last_name, $organisation_name, $email, $api_key, $user_status, $postcode, $image_url, $updated_on);\n $stmt->fetch();\n $user = array();\n\t\t\t$user[\"user_id\"] = $user_id;\n\t\t\t$user[\"user_role\"] = $user_role;\n $user[\"first_name\"] = $first_name;\n\t\t\t$user[\"last_name\"] = $last_name;\n\t\t\t$user[\"organisation_name\"] = $organisation_name;\n $user[\"email\"] = $email;\n $user[\"api_key\"] = $api_key;\n $user[\"user_status\"] = $user_status;\n $user[\"postcode\"] = $postcode;\n $user[\"image_url\"] = $image_url;\n $user[\"updated_on\"] = $updated_on;\n $stmt->close();\n return $user;\n } else {\n return NULL;\n }\n\t\t\n }", "title": "" }, { "docid": "0695b30d7594d5894d9cec55005c9279", "score": "0.7129284", "text": "public function getUserIdByEmail($email){\n $user_info = User::where('email',$email)->first();\n return $user_info['email'];\n }", "title": "" }, { "docid": "a6c70c75dfb985cf6b50bb350298bb3d", "score": "0.7127726", "text": "function get_user($email)\n\t{\n\t\t$query = $this->db->get_where('users', array('email' => $email));\n\t\treturn $query->row_array();\n\t}", "title": "" }, { "docid": "489dcdc6601a42bc752e1e2992889a3a", "score": "0.7124858", "text": "public function getForID($email){\r\n $rta=null;\r\n $this->retriveData();\r\n foreach($this->usersList as $value){\r\n if($value->getEmail() == $email){\r\n $rta=$value;\r\n }\r\n }\r\n return $rta;\r\n }", "title": "" }, { "docid": "cc0c58fdff9478a63ea3a1c2ef56cf44", "score": "0.712295", "text": "function get_user($email_address)\n\t\t{\n\t\t\t$query_str = \"SELECT * FROM user_info WHERE email_address = ?\";\n\t\t\t$query_r = $this->db->query($query_str, $email_address);\n\t\t\treturn $query_r;\n\t\t}", "title": "" }, { "docid": "ffa2a6a06e2f779aa6fc87e7ee2c9101", "score": "0.7111856", "text": "function get_user_by_email($email)\n{\n\n $user=users::model()->find(\"email='\".$email.\"'\");\n return $user==NULL?false:$user;\n}", "title": "" }, { "docid": "469eb6e360edea08cb0529ec3739899d", "score": "0.7102793", "text": "public function dataUserByEmail($email )\n {\n\n $db = $this->getDb();\n $criteria = $db->orm->newCriteria();\n $criteria->select('buiz_role_user.*')->from('buiz_role_user');\n\n $criteria->joinOn\n (\n 'buiz_role_user', // the base table\n 'rowid', // id in base table (here we always join the pk of base)\n 'buiz_address_item', // the join table\n 'id_user' // id for the join\n );\n\n $criteria->joinOn\n (\n 'buiz_address_item', // the base table\n 'id_type', // id in base table (here we always join the pk of base)\n 'buiz_address_item_type', // the join table\n 'rowid' // id for the join\n );\n\n //Wenn ein Standard Condition gesetzt wurde dann kommt diese in die Query\n $criteria->where\n (\n \" upper(buiz_address_item.address_value) = upper('{$email}')\n and buiz_address_item_type.access_key) = upper('mail') \"\n );\n\n // Run Query und save the result\n $this->result = $db->orm->select($criteria);\n\n return $this->get();\n\n }", "title": "" }, { "docid": "b66295b2cd2ea9680d0b717377302825", "score": "0.7089916", "text": "public function get_by_email($email = '')\n\t{\n\t\treturn $this->get_by_username($email);\n\t}", "title": "" }, { "docid": "65095723fb05f917431fe902b999a1d0", "score": "0.70880777", "text": "public function getUserByEmail($email)\n {\n return User::where('email', $email) -> first();\n }", "title": "" }, { "docid": "f2ac2bd761bb7f3929a1515df7d07914", "score": "0.70844144", "text": "public function getUserEmail();", "title": "" }, { "docid": "2d0951ef79579a0c96aeb2ecce9db842", "score": "0.70732373", "text": "public function read_user_information($email) {\n\n\t\t$condition = \"email =\" . \"'\" . $email . \"'\";\n\t\t$this->db->select('*');\n\t\t$this->db->from('pupils');\n\t\t$this->db->where($condition);\n\t\t$this->db->limit(1);\n\t\t$query = $this->db->get();\n\n\t\tif ($query->num_rows() == 1) {\n\t\t\treturn $query->result();\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "db5b1112eec4cf9c24e60be3c4113695", "score": "0.70723355", "text": "public function get_user($email, $id = '')\n\t{\n\t\treturn $this->db->select('*')\n\t\t\t->from($this->_table)\n\t\t\t->where('email', $email)\n\t\t\t->or_where('id', $id)\n\t\t\t->get()\n\t\t\t->result();\n\t}", "title": "" }, { "docid": "43f8b97c7354c5f5495631f1c9579d17", "score": "0.7071166", "text": "function loadUserByEmail($email) {\n\t\treturn $this->dbLoadSingle(\"select * from \".USERS_TABLE.\" where email = '\".addSlashes($email).\"' limit 1\");\n\t}", "title": "" }, { "docid": "9fe58d14cbe3531e381d7eeec8fa1b54", "score": "0.7053012", "text": "function getUser($email)\n {\n $sql = \"SELECT * FROM usuarios WHERE email ='{$email}'\";\n $user = $this->db->query($sql);\n\n return $user->getResultArray();\n }", "title": "" }, { "docid": "3f0eb91a4e41e517a0b0bce278b5222d", "score": "0.70529234", "text": "public function getUserByEmail($email) {\n $stmt = $this->conn->prepare(\"SELECT u_id, email, name, pic_url, number, sms, api_key FROM user WHERE email = ?\");\n $stmt->bind_param(\"s\", $email);\n if ($stmt->execute()) {\n // $user = $stmt->get_result()->fetch_assoc();\n $stmt->bind_result($user_id, $email, $name, $pic_url, $contact, $sms, $api_key);\n $stmt->fetch();\n $user = array();\n $user[\"u_id\"] = $user_id;\n $user[\"name\"] = $name;\n $user[\"email\"] = $email;\n $user[\"api_key\"] = $api_key;\n $user[\"sms\"] = $sms;\n $user[\"number\"] = $contact;\n $user[\"pic_url\"] = $pic_url;\n $stmt->close();\n return $user;\n } else {\n return NULL;\n }\n }", "title": "" }, { "docid": "c2f2ff33016d20281489e9f656dd2eef", "score": "0.70515674", "text": "public function getUserByEmail($email) {\n\t\t$email = $this->mod->clear($email);\n\t\t$sql = \"SELECT * FROM `users` WHERE `email` ='$email' AND `isDeleted` = FALSE;\";\n\t\t$result = $this->mod->query($sql);\n if ($result)\n\t\t\treturn $this->orm($result);\n else return false;\n\t}", "title": "" }, { "docid": "0d203f100941732455c6e016ab4599e9", "score": "0.7043574", "text": "public function show($email)\n\t{\n// dd($email);\n \\Session::flash('confChair', '1');\n\n $user = DB::table('users')\n ->select('id','firstname','lastname','email','nationalIdentityNo', 'addressLine1','addressLine2','addressLine3','city', 'state', 'postalCode', 'contactNo', 'faxNo')\n ->where('email', '=', $email)\n ->first();\n\n//dd($user);\n return view('author.profile', compact('user'));\n\t}", "title": "" }, { "docid": "50a659183793663fbbe0ba010f5e19a9", "score": "0.7037694", "text": "public function getUserNameByEmail($email){\n $user_info = User::where('email',$email)->first();\n return $user_info['name'];\n }", "title": "" }, { "docid": "5cd481ed3ea72c2d9013c9060022fe54", "score": "0.7037625", "text": "public function getUserByEmail($email){\r\n $stmt = $this->con->prepare(\"SELECT id, email, name, lastname FROM users WHERE email = ?\");\r\n $stmt->bind_param(\"s\", $email);\r\n $stmt->execute(); \r\n $stmt->bind_result($id, $email, $name, $lastname);\r\n $stmt->fetch(); \r\n $user = array(); \r\n $user['id'] = $id; \r\n $user['email']=$email; \r\n $user['name'] = $name; \r\n $user['lastname'] = $lastname; \r\n return $user; \r\n }", "title": "" }, { "docid": "2750f990604b800f5098a4f5173f4670", "score": "0.70233506", "text": "public function read($email)\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('users');\n\t\t$this->db->join('users_details','users.id = users_details.id');\n\t\t$this->db->where('users.email', $email);\n\t\t$this->db->where('users_details.deleted_at is null');\n\t\t$query = $this->db->get();\n\t\treturn $query->result();\n\t}", "title": "" }, { "docid": "d01beaadc129ab7b93ee5b2a11268acc", "score": "0.70208764", "text": "public function findByEmail($email){\n\n return $this->user->where('email', $email)->first();\n\n }", "title": "" }, { "docid": "588db3f05ad8741c25e3a367d7a881f3", "score": "0.7020759", "text": "function db_get_user_by_email($db, $email) {\n\t$email_safe = $db->escape($email);\n\t\n\t$db->query(\"SELECT * FROM users WHERE users.email = '$email_safe'\");\n\t\n\treturn $db->fetch();\n}", "title": "" }, { "docid": "07c80d75cb8c0d00003cd3c7ab87b296", "score": "0.70054555", "text": "public function getUserByEmail(User $user)\n {\n }", "title": "" }, { "docid": "b9049a92f36795a20536519c228dc8b0", "score": "0.69986814", "text": "function selectUserAccountDetails($email)\n{\n\t$qry = SELECT_USER_ACCOUNT_DETAILS_BY_EMAIL.'\"'.$email.'\"';\n\t$result = RunSelectQuery($qry);\n\treturn $result;\n}", "title": "" }, { "docid": "f735b952a33bc975cb970164e0ff853c", "score": "0.69947773", "text": "public function get_user_details($user_email = \"\")\n {\n $result = null;\n $query = \"SELECT * FROM users WHERE user_email = '$user_email'\";\n \n $result = $this->dbh->query($query);\n \n if ($result->num_rows) {\n\n $query_result = $result->fetch_assoc();\n $result->free();\n\n return $query_result;\n\n } else {\n\n return false;\n }\n }", "title": "" }, { "docid": "61f43bddc2df1cd159670d5fb7dd6dcd", "score": "0.69915706", "text": "public function getUser($email) {\n return ($result = $this->getUsers(array($email))) ? reset($result) : FALSE;\n }", "title": "" }, { "docid": "d01d0c182e7a008f2d537d7ae466acf4", "score": "0.6981858", "text": "public function getUserByEmail($email) {\n $stmt = $this->conn->prepare(\"SELECT user_id, name, mobile, email, api_key, user_create_date, active FROM user WHERE email = ?\");\n $stmt->bind_param(\"s\", $email);\n $stmt->execute();\n $stmt->store_result();\n $num_rows = $stmt->num_rows;\n if ($num_rows > 0) {\n $stmt->bind_result($user_id, $name, $mobile, $email, $api_key, $user_create_date, $active);\n $stmt->fetch();\n $user = array();\n $user[\"user_id\"] = $user_id;\n $user[\"name\"] = $name;\n $user[\"mobile\"] = $mobile;\n $user[\"email\"] = $email;\n $user[\"api_key\"] = $api_key;\n $user[\"userCreateDate\"] = $user_create_date;\n $user[\"active\"] = $active;\n $stmt->close();\n return $user;\n } else {\n return NULL;\n }\n }", "title": "" }, { "docid": "171c076dfce93f1ea5990f1f707723ff", "score": "0.69611436", "text": "public function searchUser()\n {\n $getUser = DB::getInstance()->searchUser('users', $this->validateEmail());\n if ($getUser != null) {\n return $getUser;\n } else $this->error['email_db'] = 'Email not found';\n }", "title": "" }, { "docid": "df3e0775573aa365da44f13d29d46c0a", "score": "0.6934751", "text": "public function show($email)\n {\n $account = \\App\\User::where('email', $email)\n ->first();\n\n return $account;\n\n }", "title": "" }, { "docid": "0e5455e0b32325c9602ebd83ea36091b", "score": "0.6927876", "text": "public function fetchOneUser($email) {\r\n $sqlQuery = \"SELECT * FROM User WHERE email=?;\";\r\n return parent::executeWithParam1Return($sqlQuery, $email, 'UserDataSet');\r\n }", "title": "" }, { "docid": "29c822bebd34619a4312a4cd4fbb3366", "score": "0.69231683", "text": "public function getUserByEmail(){\n \n // Create Query\n $query = ' SELECT\n id, type, firstname, lastname, pwhash, username, school, state, modified\n FROM\n ' . $this->table_name . '\n WHERE\n email = :email\n LIMIT\n 0,1';\n\n // prepare the query\n $stmt = $this->conn->prepare($query);\n\n // sanitize\n $this->email=htmlspecialchars(strip_tags($this->email));\n\n // bind the values\n $stmt->bindParam(':email', $this->email);\n\n // exit if execute failed\n if(!$stmt->execute()){\n return false;\n }\n\n // if email exists, assign values to object properties for easy access and use for php sessions\n if (!$stmt->rowCount() > 0) {\n return false;\n }\n\n // get record details / values\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n \n // assign values to object properties\n $this->id = $row['id'];\n $this->firstname = $row['firstname'];\n $this->lastname = $row['lastname'];\n $this->password = $row['pwhash'];\n $this->type = $row['type'];\n $this->username = $row['username'];\n $this->school = $row['school'];\n $this->state = $row['state'];\n $this->modified = $row['modified'];\n\n return true;\n }", "title": "" }, { "docid": "340d7e2cab2a556f1ed31543e1e827f5", "score": "0.6920954", "text": "public function getUserByEmail($email) \n\t{\n\t\treturn $this->db\n\t\t\t->where('email', $email)\n\t\t\t->limit(1)\n\t\t\t->get('users')\n\t\t\t->row();\n\t}", "title": "" }, { "docid": "7ef72002e2f1b2416fd6b650fdc7ab97", "score": "0.6907223", "text": "public function get($email)\n {\n /* Define/build the query. */\n $this->db->select('user_id, email, first_name, last_name, username, avatar');\n $this->db->from('users');\n $this->db->where('email', $email);\n /* Retrieve the result. */\n $result = $this->db->get();\n /* Check to see if a result exists. */\n if($result->num_rows() != 1) return false;\n /* Retrieve the row. */\n $result = $result->row();\n $data = array(\n 'user_id' => $result->user_id,\n 'email' => $result->email,\n 'first_name' => $result->first_name,\n 'last_name' => $result->last_name,\n 'full_name' => ucfirst($result->first_name) . ' ' . ucfirst($result->last_name),\n 'username' => $result->username,\n 'avatar' => $result->avatar\n );\n return ($data);\n }", "title": "" }, { "docid": "c15d8328717e5d4f46ec3db53a4bac87", "score": "0.6895665", "text": "public function getUser($email)\n {\n $stmt = $this->con->prepare(\"SELECT * FROM users WHERE email = ? OR mobile = ?\");\n $stmt->bind_param(\"ss\", $email, $email);\n $stmt->execute();\n $users = $this->get_result($stmt);\n $stmt->close();\n if(count($users) > 0){\n return $users[0];\n }\n else {\n return null;\n }\n }", "title": "" }, { "docid": "e6046bac0d9732ff49c0cecde828bba2", "score": "0.6888993", "text": "public function getUserByEmail($email)\r\n\t{\r\n\t\t$stmt = $this->conn->prepare(\"SELECT userID, email, finalScore, gameReminder, statUpdate, gameStart FROM user WHERE email = ?;\");\r\n\t\t$stmt->bind_param(\"s\", $email);\r\n\t\t$stmt->execute();\r\n\t\t$stmt->bind_result($userID, $email, $finalScore, $gameReminder, $statUpdate, $gameStart);\r\n\t\t$stmt->fetch();\r\n\t\t$user = array();\r\n\t\t$user['userID'] = $userID;\r\n\t\t$user['email'] = $email;\r\n\t\t$user['Final-Score'] = $finalScore;\r\n\t\t$user['Game-Reminder'] = $gameReminder;\r\n\t\t$user['Stat-Update'] = $statUpdate;\r\n\t\t$user['Game-Start'] = $gameStart;\r\n\t\treturn $user;\r\n\t}", "title": "" }, { "docid": "7800ce0f4c51ef79f6f2248dd205a991", "score": "0.6887475", "text": "public function getUser($email)\n\t{\n\t\t$user = false;\n\t\tif (!is_null($email))\n\t\t\t$user = ORM::forTable('Users')->where('email', $email)->findOne();\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "02b4318df7034ec5bfcef5f2d693e0a7", "score": "0.68870455", "text": "public function findByEmail ($email) {\n $user = $this->user->whereEmail($email)->first();\n\n if (!$user) {\n throw new UserNotFoundException;\n }\n\n return $user->toArray();\n }", "title": "" }, { "docid": "6273e6987be1072f0e296d9e2301918c", "score": "0.686878", "text": "public function getUserByEmail($email){\n\t\t$conn = DB::getInstance();\n\t\t$stmt = $conn->prepare(\"SELECT * FROM users WHERE email=:email\");\n\t\t$stmt->execute(array(':email' => $email));\n\t\t$result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\tif (!isset($result[0]))\n\t\t\treturn null;\n\t\treturn $result[0];\n\t}", "title": "" }, { "docid": "7559c11416ad06410b0383bdff7b6174", "score": "0.6864798", "text": "static public function getUser(string $email) {\n // \n $sql = \" SELECT `id`, `password` \n FROM `user` \n WHERE email = :email\n \";\n // \n $objects = [\n // \n 'email' => $email\n ];\n // \n // get user \n // \n try {\n // \n $pdo = DB::databaseConnect();\n $fetch = $pdo->prepare($sql);\n $fetch->execute($objects);\n $user = $fetch->fetch();\n // \n return $user;\n // \n } catch (Exception $e) {\n // \n throw new Exception($e->getMessage());\n }\n }", "title": "" }, { "docid": "2505e382a428410599d82114bc965141", "score": "0.6862946", "text": "public function getByEmail($email)\n\t{\n\t\t$user = User::where('email', Str::replace(['-','/'], '', $email))->first();\n\t\tif(is_null($user)){\n\t\t\treturn false;\n\t\t}\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "b355c7fe49608ad0bb8da18fa3c6c107", "score": "0.68592715", "text": "public function fetchUserByEmail($email)\n {\n $select = $this->getTable()->select()->where('Email_Address = ?', $email);\n $result = $this->getTable()->fetchRow($select);\n if(is_object($result)) {\n return $result->toArray();\n } else {\n return $result;\n }\n }", "title": "" }, { "docid": "6cc49f37980d513c5199acc7e02993e8", "score": "0.68592405", "text": "public function getOneByEmail($email);", "title": "" }, { "docid": "d511330cf10903005c8fff7325ef55f4", "score": "0.68571204", "text": "function getUserDetailsFromEmail( $email )\n{\n\t$sql_query = \"SELECT uUsername, uPassword, uEmail\n\t\t\t\t\tFROM `user` \n\t\t\t\t\tWHERE `user`.uEmail = '\".$email.\"'\n\t\t\t\t\tLIMIT 0,1;\";\n\t$result = mysql_query($sql_query);\n\t\n\tif (!$result)\n\t{\n\t\tprint(\"MySQL ERROR: Query error when extracting logged in username.\");\n\t}\n\telse\n\t{\n\t\t$num_results = mysql_num_rows($result);\n\t\tif ($num_results>0)\n\t\t{\n\t\t\t//$leadDetailsArray = mysql_fetch_array($result);\t\n\t\t\t\t\t\t\t\n\t\t\t//return $leadDetailsArray;\n\t\t\treturn $result;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "938722c855c8fdee3be5d42129e012d8", "score": "0.6835737", "text": "public function getUserByEmail($email)\n {\n //the id represents\n $result = $this->_db_table->find($email);\n\n //if not found, throw an exception\n if( count($result) == 0 ) {\n throw new Exception('User not found');\n }\n\n //if found, get the result, and map it to the\n //corresponding Data Object\n $row = $result->current();\n $user_object = new Application_Model_User($row);\n\n //return the user object\n return $user_object;\n }", "title": "" }, { "docid": "037818d99e6aba376d86cec1f368604a", "score": "0.6834666", "text": "public static function infoByEmail($key = false, $email = false)\n {\n $return = false;\n $db = new DB();\n \n if($email) {\n $sql = \"SELECT u.*, um.*, ul.Name as UserLevel, ul.Code, ul.Link as DashboardURL \n FROM users u \n LEFT JOIN user_meta um ON um.UserID = u.UserID \n LEFT JOIN user_roles ul ON ul.RoleID = u.RoleID \n WHERE u.Email = '\".$email.\"' LIMIT 1\";\n \n $userdata = $db->queryOne($sql);\n $userinfo = ($userdata) ? (array) $userdata : array();\n } else {\n $usercookie = App::stringToArray( App::getCookie('userdata') );\n $keepme = App::getCookie('keepmeloggedin');\n\n $userinfo = ($keepme) ? $usercookie : App::getSession('userdata');\n }\n \n $userinfo = (array) $userinfo;\n \n if($key != false) {\n $return = isset($userinfo[$key]) ? $userinfo[$key] : false;\n if($key == \"FullName\") {\n $return = $userinfo[\"FirstName\"] .\" \". $userinfo[\"LastName\"];\n } \n } else {\n $return = ($userinfo) ? (object) $userinfo : array();\n }\n \n return $return;\n }", "title": "" }, { "docid": "401ab71392410a60befb21437d9f9556", "score": "0.68317777", "text": "public function getUserOneByEmail($email)\n {\n return $this->repository->findOneByEmail($email);\n }", "title": "" }, { "docid": "5474ed594d61a46db527e57e2834b60a", "score": "0.6827225", "text": "public function getUserFromEmail(string $email)\n {\n $statement = sprintf(\"SELECT %s, %s, %s, %s, %s, %s, %s FROM %s WHERE %s = %s AND deleted = 0\",\n static::FIELDS[0], static::FIELDS[1], static::FIELDS[2], static::FIELDS[4], static::FIELDS[5],\n static::FIELDS[6], static::FIELDS[7], static::TABLE, static::FIELDS[3], static::PLACEHOLDERS[3]);\n $req = $this->db->prepare($statement);\n\n $req->bindValue(static::PLACEHOLDERS[3], $email, PDO::PARAM_STR);\n $req->execute();\n\n $response = $req->fetchAll(PDO::FETCH_ASSOC);\n\n return json_encode($response);\n }", "title": "" }, { "docid": "31aa5bfc18ff5d3181bbe42eeced1a14", "score": "0.6825969", "text": "public function getUserByEmail($userType, $email) {\n if($userType == 'USER') {\n return User::where(['email' => $email])->first();\n }\n \n if($userType == 'GUEST_USER') {\n return GuestUsers::where(['email' => $email])->first();\n }\n }", "title": "" }, { "docid": "3b53273caf29bebf4a961bc0d5e7bc13", "score": "0.6823963", "text": "public function getUserDetails($email)\n {\n $returnValue = array();\n $sql = \"select * from users where name='\" . $email . \"'\";\n\n $result = $this->conn->query($sql);\n if ($result != null && (mysqli_num_rows($result) >= 1)) {\n $row = $result->fetch_array(MYSQLI_ASSOC);\n if (!empty($row)) {\n $returnValue = $row;\n }\n }\n return $returnValue;\n }", "title": "" }, { "docid": "49bf8588edf6560efe540445dc92cdeb", "score": "0.68186265", "text": "public function findUserByEmail($email)\n {\n // TODO: Implement findUserByEmail() method.\n }", "title": "" }, { "docid": "3f29efbfa994cc4ebd08c96db497eae0", "score": "0.6814181", "text": "function getUserByEmail($email)\n {\n if (!filter_var($email, FILTER_VALIDATE_EMAIL) === false) {\n $query = \"select * from users where google_email = :email\";\n \n $profile_data = $this->con->prepare($query); \n $profile_data->execute(array(':email'=>$email));\n $row = $profile_data->fetch((PDO::FETCH_ASSOC));\n \n if(isset($row) && !empty($row)){\n return $row;\n }else{\n return 0;\n }\n }else{\n return 0;\n }\n }", "title": "" }, { "docid": "e71ceac4842c98498a55ff20419433bb", "score": "0.6811196", "text": "public function getUserByEmail($emailid) {\n $this->db->where('user_emailid', $emailid);\n $data = $this->db->get($this->common->getUserTable())->row_array();\n return $data;\n }", "title": "" }, { "docid": "05b2495bf5489a4b683afc49ad8e75ff", "score": "0.6807508", "text": "public function getUserDataByEmail($email)\n {\n $userObj = DB::table('users')->where('email', '=', $email)->get();\n $data = array();\n foreach ($userObj as $key => $user) {\n $data = array(\n 'id' => $user->id, \n 'name' => $user->name, \n );\n }\n return $data;\n }", "title": "" }, { "docid": "eaf86a616e4111edf853812feb347f24", "score": "0.68033445", "text": "public function getUserDataByEmail($email) {\n $sanitizedEmail = $this->db->escape($email);\n $this->db->where(\"email\", $sanitizedEmail);\n if ($userData = $this->db->getOne(\"users\")) {\n return $userData;\n } else { return false; }\n }", "title": "" }, { "docid": "4a430e1ae871781749df2f8c1973dae6", "score": "0.67992264", "text": "function findUserByEmail($email) {\n\t$sql = \"SELECT * FROM users WHERE email='{$email}'\";\n\t$result = dbQuery($sql);\n\tif (mysql_num_rows($result)) {\n\t\treturn mysql_fetch_object($result);\n\t} \n}", "title": "" }, { "docid": "306bac129ceae135115bd2fe879b4881", "score": "0.6793945", "text": "public function getUserByEmail($email)\n {\n return $this->authRepository->getUserByEmail($email);\n }", "title": "" }, { "docid": "cc2984a9f3012c78530b30683dfe2b5f", "score": "0.6793185", "text": "public function getUserByEmail($email) {\n $result = mysql_query(\"SELECT * FROM devices WHERE email = '$email' LIMIT 1\");\n return $result;\n }", "title": "" }, { "docid": "3b57c72cd7e6cdd4b1ec0311fc0f8af4", "score": "0.6785097", "text": "private function findUserByEmail(Email $email)\n {\n $user = $this->users->userOfEmail($email);\n\n if ($user) return $user;\n\n throw new ValueNotFoundException(\"$email is not a registered email address\");\n }", "title": "" }, { "docid": "664ede3adc0738c7a18c47af9af15437", "score": "0.67815083", "text": "public function get_user_email(){\n\t return $this->call(\"market/private/user/email\");\n }", "title": "" }, { "docid": "94fae22d1774aeb1df9f5d4729b0cb24", "score": "0.6779883", "text": "public function getUserByEmail(string $email)\n {\n return User::where('email', '=', $email)\n ->first();\n }", "title": "" }, { "docid": "06208fd6be854ec06ebfa585a677f5be", "score": "0.67717254", "text": "function searchUserByEmail($link, $email)\r\n{\r\n $result = null;\r\n $sql = \"\r\n SELECT *\r\n FROM \r\n `user` \r\n WHERE\r\n `email` = ?;\r\n \";\r\n $result = selectData($link, $sql, [ $email ]);\r\n\r\n if(count($result)) {\r\n $result = $result[0];\r\n }\r\n\r\n return $result;\r\n}", "title": "" }, { "docid": "caef9027b992f3fe44ae75b72316e0b7", "score": "0.67705226", "text": "public function getAdminUserByEmail($email) {\n $stmt = $this->conn->prepare(\"SELECT user_id, name, email, api_key FROM admin_user WHERE email = ?\");\n $stmt->bind_param(\"s\", $email);\n if ($stmt->execute()) {\n // $user = $stmt->get_result()->fetch_assoc();\n $stmt->bind_result($user_id, $name, $email, $api_key);\n $stmt->fetch();\n $user = array();\n $user[\"user_id\"] = $user_id;\n $user[\"name\"] = $name;\n $user[\"email\"] = $email;\n $user[\"api_key\"] = $api_key;\n $stmt->close();\n return $user;\n } else {\n return NULL;\n }\n }", "title": "" }, { "docid": "963b9700c275ea64464a568bc1aed4e3", "score": "0.6765726", "text": "public function getUserByEmail($email)\n {\n $stmt = $this->conn->prepare(\"SELECT Email, Name, Facebook, Twitter, Instagram, Snapchat FROM Users WHERE Email = ?\");\n $stmt->bind_param(\"s\", $email);\n $stmt->execute();\n $stmt->bind_result($email, $name, $fb, $tw, $ig, $sc);\n $stmt->fetch();\n $user = array();\n $user['name'] = $name;\n $user['email'] = $email;\n $user['Facebook'] = $fb;\n $user['Twitter'] = $tw;\n $user['Instagram'] = $ig;\n $user['Snapchat'] = $sc;\n\n return $user;\n }", "title": "" }, { "docid": "c4c5719eb2a2dd95dc95f56532493b54", "score": "0.67621595", "text": "public static function getUserInfoByEmail($userEmail) {\n\t\t$selectQuery = SelectDataQuery::Create(\"SELECT \" . self::$selectList . \",u.userPassword FROM \" . self::$tableName . \" AS u\" .\n\t\t\t\" WHERE u.userEmail=? AND u.userStatus=1\", array($userEmail));\n\t\treturn self::GetObject($selectQuery, __CLASS__);\n\t}", "title": "" }, { "docid": "44b9f8c5316bf2be0361da28b29cf687", "score": "0.67606896", "text": "public function getInfoByEmailId($email)\n {\n if($email == '')\n return false;\n\n return $this->where('cm_email',$email)->first();\n }", "title": "" }, { "docid": "f82f881cf998dbbf0f8824f01e9bb5f7", "score": "0.67525184", "text": "public function fetchByEmail($email);", "title": "" }, { "docid": "7079cac6fbb1bce66b53f650e294b094", "score": "0.67501837", "text": "function getUserByEmail($email)\n {\n $stmt = $this->con->prepare(\"SELECT name, email, company,phone FROM users WHERE email = ?\");\n $stmt->bind_param(\"s\", $email);\n $stmt->execute();\n $stmt->bind_result( $name, $email,$company, $phone);\n $stmt->fetch();\n $user = array();\n $user['company'] = $company;\n $user['name'] = $name;\n $user['email'] = $email;\n $user['phone'] = $phone;\n return $user;\n }", "title": "" }, { "docid": "469c6567712460fa7d135ecd4286a59c", "score": "0.6746452", "text": "public function getUserByEmail ($email) {\n $sqlbefehl = \"SELECT * FROM user WHERE `email` = '\".mysql_escape_string($email).\"'\";\n \n $result = mysql_query($sqlbefehl);\n if (!$result) \n return $this->error(mysql_error());\n else if (mysql_num_rows($result) == 0) {\n return array();\n } else {\n return mysql_fetch_array($result);\n }\n }", "title": "" }, { "docid": "af3daa659d355a7a6f4d8730bd976867", "score": "0.6745171", "text": "public function byEmail($email)\n {\n\n $query = $this->db->get_where('User', array('email' => $email));\n\n $row = $query->row();\n\n if (isset($row)) {\n\n $user = new User($row->id, $row->firstName, $row->lastName, $row->email, $row->role, $row->status, $row->dateTimeCreated);\n return $user;\n\n }\n\n return null;\n\n }", "title": "" }, { "docid": "b109330e9336a79c49d99557cffac9b7", "score": "0.67450297", "text": "static function getUser($ruta, $email)\n {\n $lista = Archivo::getJSON($ruta);\n $ret = false;\n \n if ($lista) {\n foreach ($lista as $value) {\n $ret = ($value->_email == $email);\n if ($ret){\n $ret = $value; \n break;\n }\n }\n }\n return $ret;\n }", "title": "" }, { "docid": "6f78f2e19bab5a1e2b55d79dc98ad9b9", "score": "0.67398596", "text": "function getUserInfoByMail($userMail)\n {\n $this->db->select('BaseTbl.id as userId, BaseTbl.email, BaseTbl.username as name, BaseTbl.mobile, BaseTbl.address, BaseTbl.addressa, BaseTbl.zipcode, BaseTbl.city, BaseTbl.country, BaseTbl.lfaddress, BaseTbl.lfaddressa, BaseTbl.lfzipcode, BaseTbl.lfcity, BaseTbl.lfcountry , BaseTbl.roleId, Roles.role, BaseTbl.lfbuddy, BaseTbl.lfbmobile, BaseTbl.lfbemail');\n $this->db->from('tbl_user as BaseTbl');\n $this->db->join('tbl_roles as Roles','Roles.roleId = BaseTbl.roleId');\n $this->db->where('isDeleted', 0);\n $this->db->where('email', $userMail);\n $query = $this->db->get();\n\n return $query->row();\n }", "title": "" }, { "docid": "5874204ac8e30f6d94cb913d7b8252a7", "score": "0.67328507", "text": "public function getUserByEmail($email)\n {\n $this->emailFormat($email);\n\n $query = \"SELECT\n `id`,\n `email`,\n `name`,\n `password`,\n `drink_counter`\n FROM\n `users`\n WHERE\n `email` = '{$email}';\";\n\n $data = $this->conn->prepare($query);\n $data->execute();\n\n return $data;\n }", "title": "" }, { "docid": "a74bf544e8bfe233bbf10915d1f35f05", "score": "0.67222923", "text": "public function getPublicUserFromEmail(string $email)\n {\n $statement = sprintf(\"SELECT %s, %s, %s, %s, %s, %s FROM %s WHERE %s = %s AND deleted = 0\",\n static::FIELDS[0], static::FIELDS[1], static::FIELDS[4], static::FIELDS[5], static::FIELDS[6],\n static::FIELDS[7], static::TABLE, static::FIELDS[3], static::PLACEHOLDERS[3]);\n $req = $this->db->prepare($statement);\n\n $req->bindValue(static::PLACEHOLDERS[3], $email, PDO::PARAM_STR);\n $req->execute();\n\n $response = $req->fetchAll(PDO::FETCH_ASSOC);\n\n return json_encode($response);\n }", "title": "" }, { "docid": "cdd9f663bc75aeaa1ca59a7a0a552fd6", "score": "0.67185897", "text": "function getByEmail($option)\n {\n $result = $this->db->get_where('user', array('email'=>$option['email']))->row();\n return $result;\n }", "title": "" }, { "docid": "493a3e6790a5237090d7113f59ca1d7b", "score": "0.67108434", "text": "public function getUserByEmail($email){\n $statement = $this->con->prepare(\"SELECT id, name, email, contact, date_of_birth FROM users WHERE email = ?\");\n $statement->bind_param(\"s\", $email);\n $statement->execute(); \n $statement->bind_result($id, $name, $email, $contact, $date_of_birth);\n $statement->fetch(); \n $user = array(); \n $user['id'] = $id; \n $user['name']=$name; \n $user['email'] = $email; \n $user['contact'] = $contact;\n $user['date_of_birth'] = $date_of_birth; \n return $user; \n }", "title": "" }, { "docid": "bc3a87fa50046acb294277a510456d3f", "score": "0.6708149", "text": "public function findByEmail(string $email);", "title": "" } ]
db7268900f45602dac8decb09b94e584
Test case for menusSetDisplayOnMenuTax [PRIVATE API]Set if tax shows for a Menu.
[ { "docid": "29de50de1c5da6ccf385990afe6606d6", "score": "0.7824635", "text": "public function testMenusSetDisplayOnMenuTax()\n {\n }", "title": "" } ]
[ { "docid": "cfd692970f627928f853e9087bcb9101", "score": "0.56290305", "text": "public function isDisplayedInMenu();", "title": "" }, { "docid": "730a1dc8897bed4635538afae04dd689", "score": "0.56198424", "text": "public function testGetMenuTaxDetails()\n {\n }", "title": "" }, { "docid": "ef141fb1332841d90f26f8b45ac64be4", "score": "0.53921336", "text": "public function testMenusUpdateTaxType()\n {\n }", "title": "" }, { "docid": "9d15da5cf8395913b8fbc3510018090f", "score": "0.53314036", "text": "public function testTaxDisplayAppliesToCustomer(): void\n {\n $productSku = 'simple';\n $query = $this->getProductSearchQuery($productSku);\n $response = $this->graphQlQuery(\n $query,\n [],\n '',\n $this->getCustomerAuthenticationHeader->execute('[email protected]', 'password')\n );\n\n $this->assertNotEmpty($response['products']);\n $priceRange = $response['products']['items'][0]['price_range'];\n $this->assertEquals(10.75, round($priceRange['minimum_price']['regular_price']['value'], 2));\n $this->assertEquals(10.75, round($priceRange['minimum_price']['final_price']['value'], 2));\n $this->assertEquals(10.75, round($priceRange['maximum_price']['regular_price']['value'], 2));\n $this->assertEquals(10.75, round($priceRange['maximum_price']['final_price']['value'], 2));\n }", "title": "" }, { "docid": "c590086ae4b257ab745b70d8eea0a856", "score": "0.53158194", "text": "function i18n_menu_translation_overview($menu) {\n // Get translation sets with elements in this menu\n $query =db_select('i18n_translation_set', 's')\n ->distinct()\n ->fields('s', array('tsid'))\n ->condition('s.type', 'menu_link');\n $query->join('menu_links', 'ml', 's.tsid = ml.i18n_tsid');\n $query->condition('ml.menu_name', $menu['menu_name']);\n if ($tsids = $query->execute()->fetchColumn()) {\n return drupal_get_form('i18n_translation_set_overview', 'menu_link', $tsids);\n }\n else {\n return t('No translations for this menu items.');\n }\n}", "title": "" }, { "docid": "758ad61d36c499d78ee38cf8cd655072", "score": "0.5268894", "text": "private static function shouldSee($menu)\n {\n return true;\n }", "title": "" }, { "docid": "a7dc2a5a2c884173ab5aaef9adc07df0", "score": "0.52450615", "text": "public function isTaxable();", "title": "" }, { "docid": "b38c58722e1e26754e04bfdab79431d7", "score": "0.5239496", "text": "public function isInMenu();", "title": "" }, { "docid": "389aa80620176a584fedd907480e0887", "score": "0.5233881", "text": "public function HasTax()\n\t{\treturn $this->details['taxid'];\t\n\t}", "title": "" }, { "docid": "fdcd542821cfae9b38c9298614eaed67", "score": "0.52064705", "text": "public function testMenusGetMenuBulkShowHide()\n {\n }", "title": "" }, { "docid": "753c9e38a56b91092570d3174b83f974", "score": "0.5160722", "text": "private function _isMenuItem($data) {\n isset($data['label']) ? $label = $data['label'] : $label = \"\";\n if(is_array($data) && $label &&\n (!isset($data[\"visible\"])\n || !$data[\"visible\"]==false)\n ) {\n\n return true;\n }\n return false;\n\n }", "title": "" }, { "docid": "6acb2e87dd800052ca083a9d334e5b6e", "score": "0.51598996", "text": "public function testMenusUpsertTaxRate()\n {\n }", "title": "" }, { "docid": "bb8ae7c505149e9f389707d9b7581886", "score": "0.5119048", "text": "public function hasMenuKeyValues(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "67195aa3d90f7e3f79ef3546b1a2c7c6", "score": "0.5118446", "text": "public function testTaxDisplayDoesNotApplyToGuest(): void\n {\n $productSku = 'simple';\n $query = $this->getProductSearchQuery($productSku);\n $response = $this->graphQlQuery($query);\n\n $this->assertNotEmpty($response['products']);\n $priceRange = $response['products']['items'][0]['price_range'];\n $this->assertEquals(10, $priceRange['minimum_price']['regular_price']['value']);\n $this->assertEquals(10, $priceRange['minimum_price']['final_price']['value']);\n $this->assertEquals(10, $priceRange['maximum_price']['regular_price']['value']);\n $this->assertEquals(10, $priceRange['maximum_price']['final_price']['value']);\n }", "title": "" }, { "docid": "3b39afd102b4e8e21ab73242622703de", "score": "0.5102902", "text": "public function isMenuValidValidMenuWithDefaultsExpectTrue()\n {\n $menu = new Menu();\n $menu->setIdentifier('husel');\n $isValid = $menu->isValid($menu);\n $this->assertTrue($isValid);\n }", "title": "" }, { "docid": "df53883ebd5dd88bdba5a802f65ac38e", "score": "0.50873804", "text": "public function hasMenu()\n {\n return !is_null($this->contextMenuId);\n }", "title": "" }, { "docid": "98c497b857c22f9fb9bd13d48918f4f0", "score": "0.5083207", "text": "public function testMenusShowHideBulkItems()\n {\n }", "title": "" }, { "docid": "37b48b82c5dc3e8403fa099aba094708", "score": "0.5055863", "text": "function fn_check_menu_owner($menu_id)\n{\n $allow = false;\n\n if (fn_allowed_for('ULTIMATE') && Registry::get('runtime.company_id')) {\n $_menus = Menu::getList(db_quote(\" AND ?:menus.menu_id = ?i\" . fn_get_company_condition('?:menus.company_id'), $menu_id ));\n if (count($_menus) > 0) {\n $allow = true;\n }\n } else {\n $allow = true;\n }\n\n return $allow;\n}", "title": "" }, { "docid": "722919c6fa03c3816eadf35886204ba5", "score": "0.50523156", "text": "public function inMenuPath()\n {\n return key_exists('menupath', $this->data);\n }", "title": "" }, { "docid": "7a7706030e26d5b69ceb4f52c43497c4", "score": "0.5047457", "text": "public function testMenusSetItemDisplayOrders()\n {\n }", "title": "" }, { "docid": "0cc648e0594ccc8da696463655d23285", "score": "0.5018079", "text": "public function setMenuType($menu_type);", "title": "" }, { "docid": "939134f332f4f8e248cc422e6c8f29df", "score": "0.49921253", "text": "public function testTaxDisplayAppliesToCustomerGroup()\n {\n $productSku = 'simple';\n $query = $this->getProductSearchQuery($productSku);\n $response = $this->graphQlQuery(\n $query,\n [],\n '',\n $this->getCustomerAuthenticationHeader->execute('[email protected]', 'password')\n );\n\n $this->assertNotEmpty($response['products']);\n $priceRange = $response['products']['items'][0]['price_range'];\n $this->assertEquals(10.75, round($priceRange['minimum_price']['regular_price']['value'], 2));\n $this->assertEquals(10.75, round($priceRange['minimum_price']['final_price']['value'], 2));\n $this->assertEquals(10.75, round($priceRange['maximum_price']['regular_price']['value'], 2));\n $this->assertEquals(10.75, round($priceRange['maximum_price']['final_price']['value'], 2));\n }", "title": "" }, { "docid": "2f546b47cfdc59842014b812efb5e57b", "score": "0.4976577", "text": "public function visibleInMenu()\n {\n return (bool) ($this->in_menu || is_null($this->in_menu));\n }", "title": "" }, { "docid": "d9c4068cd87bdbb611166b45ba48377d", "score": "0.4958098", "text": "public function testSetMenuName()\n {\n }", "title": "" }, { "docid": "d59588193622cfc12de443b25d297928", "score": "0.49531746", "text": "public function display_tax_list(){\n\t\tif ($this->checkLogin('A') == ''){\n\t\t\tredirect('admin');\n\t\t}else {\n\t\t\t$this->data['heading'] = 'State List';\n\t\t\t$condition = array();\n\t\t\t$this->data['taxList'] = $this->location_model->get_all_details(STATE_TAX,$condition);\n\t\t\t$this->load->view('admin/location/display_tax',$this->data);\n\t\t}\n\t}", "title": "" }, { "docid": "6e703c2abca12d1271e49494b0612913", "score": "0.49492756", "text": "public function testSetMenuItemMetadata()\n {\n }", "title": "" }, { "docid": "94b5b64dd2ae875a4c132707fd8de94f", "score": "0.49471405", "text": "public function testAdminViewSetViewVariableMenu()\r\n {\r\n $this->get('/admin/menu-manager/menus/view/1');\r\n \r\n $menuVariable = $this->viewVariable('menu');\r\n \r\n $this->assertNotNull($menuVariable, __('May be variable $menu is not passed to the view in view method.'));\r\n $this->assertInstanceOf(Menu::class, $menuVariable, __('Wrong $menu variable type. Got {0} instead {1}', gettype($menuVariable), Menu::class));\r\n }", "title": "" }, { "docid": "7908bb50f8ca25b477b179d0cf05693d", "score": "0.49455687", "text": "public function admin_menu(&$menu)\n {\n $this->ci->load->helper('nitrocart/nitrocart_admin');\n $display_menu = true;\n\n $dev_menu = 'lang:nitrocart:admin:nitrocart_admin'; \n\n if(group_has_role('nitrocart', 'admin_store_subsystems') ) \n {\n $menu['lang:cp:nav_addons']['lang:nitrocart:admin:store_subsystems'] = NC_ADMIN_ROUTE.'/subsystems'; \n $menu['lang:cp:nav_addons']['lang:nitrocart:admin:store_features'] = NC_ADMIN_ROUTE.'/features';\n }\n\n\n // if the table exist we can select all records from it!\n if( $this->db->table_exists('nct_admin_menu') )\n { \n $menu_items = $this->db->order_by('order')->get('nct_admin_menu')->result();\n\n foreach ($menu_items as $key => $value)\n {\n $menu[$value->menu][$value->label] = $value->uri;\n }\n }\n\n // Place menu on position #\n add_admin_menu_place('lang:nitrocart:admin:shop', 1);\n\n add_admin_menu_place('lang:nitrocart:admin:shop_admin', 2);\n }", "title": "" }, { "docid": "13774aab32375c47e88d7de928d66b05", "score": "0.49356285", "text": "public function has_menu() {\n\t\n\t\t$post_id = $this->post_id;\n\t\t$in_menu = false;\n\t\t\n\t\tforeach ($this->menu_items as $item) {\n\t\t\n\t\t\tif ($item->object_id == $post_id) {\n\t\t\t\tif ($item->menu_item_parent != 0) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$in_menu = true;\n\t\t\t\t\t$menu_id = $item->ID;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($in_menu) {\n\t\t\tforeach ($this->menu_items as $item) {\n\t\t\t\tif ($item->menu_item_parent == $menu_id) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "d22e471f687007c06b83053ccebb7557", "score": "0.49300137", "text": "function type_of_menu(){\n if(check_user_customer() == true ){ \n wp_nav_menu( array( 'theme_location' => 'header-menu-customer','container'=>false,'menu_class' => 'home-header-menu' ) ); \n }else if(check_user_contractor() == true ){\n wp_nav_menu( array( 'theme_location' => 'header-menu-contractor','container'=>false,'menu_class' => 'home-header-menu' ) ); \n }\n}", "title": "" }, { "docid": "8b9b3c72cc0f7d6a320bd5fa52bc8369", "score": "0.4880816", "text": "function displayTaxOptionList($level,$id){\n\t//constucting the 'where' statement for the initial query to identify the current taxonomy\n\tif($id == 0){$where = \"\";} else {$where = \" WHERE `id` = '\" . $id . \"';\";}\n\n\t$sql = \"SELECT DISTINCT `level1` AS `1`,`level2` AS `2`,`level3` AS `3`,`level4` AS `4`,`level5` AS `5`,`level6` AS `6`,`level7` AS `7` FROM `\" . $GLOBALS[\"schema\"] . \"`.`mc_taxonomy`\" . $where;\n\t$query = mysql_query($sql);\n\t$row = mysql_fetch_array($query);\n\t\n\t$levelSQL = \"SELECT DISTINCT `level\" . $level . \"` as `values` FROM `\" . $GLOBALS[\"schema\"] . \"`.`mc_taxonomy` WHERE `merchant_id` = '\" . $GLOBALS[\"merchantID\"] . \"' \" . levelWhere($level,$id) . \";\";\n\t$levelQuery = mysql_query($levelSQL);\n\t$levelNumRow = mysql_num_rows($levelQuery);\n\t\n\tif($level == 2 && $id == 0){} else {\n\t\tif($levelNumRow > 1){\n\t\t\tif(is_null($row[$level]) || ($id == 0 && $level == 1)){\n\t\t\t\t\n\t\t\t\techo \"<label style=\\\"width: 90px;display: inline-block;border-bottom: dotted 1px #ccc;\\\" for=\\\"level\" . $level . \"\\\"><strong>Level \" . $level . \"</strong></label>\n\t\t\t\t<select name=\\\"levelval\\\">\";\n\t\t\t\t\t\n\t\t\t\twhile($levelRow = mysql_fetch_array($levelQuery)){\n\t\t\t\t\techo \"<option \" . feedConfigSelected($row[$level],$levelRow[\"values\"]) .\" value=\\\"\" . $levelRow[\"values\"] . \"\\\">\" . $levelRow[\"values\"] . \"</option>\";\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\techo \"\n\t\t\t\t\t</select>\n\t\t\t\t\t<input name=\\\"levelSubmit\\\"type=\\\"submit\\\" value=\\\"Add Level\" . $level . \" Value\\\"/>\n\t\t\t\t\t<br/>\";\t\n\t\t\t} else {\n\t\t\t\techo \"\n\t\t\t\t<label style=\\\"width: 90px;display: inline-block;border-bottom: dotted 1px #ccc;\\\" for=\\\"level\" . $level . \"\\\">Level \" . $level . \"</label>\n\t\t\t\t<input style=\\\"width: 250px;\\\" name=\\\"level \" . $level . \"\\\" type=\\\"text\\\" value=\\\"\" . $row[$level] . \"\\\" disabled=disabled>\n\t\t\t\t<input name=\\\"levelvaltext\" . $level . \"\\\" type=\\\"hidden\\\" value=\\\"\" . $row[$level] . \"\\\">\n\t\t\t\t<input name=\\\"levelRemove\" . $level . \"\\\"type=\\\"submit\\\" value=\\\"Delete\";\n\t\t\t\tif($level ==1 ){echo \" All\";};\n\t\t\t\techo \"\\\"/><br/>\";\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "6bcc77516f46429f15c4ebd5bd54c566", "score": "0.4840772", "text": "function is_nav_menu( $menu ) {\n\tif ( !$menu )\n\t\treturn false;\n\n\t$menu_obj = get_term( $menu, 'nav_menu' );\n\n\tif ( !$menu_obj )\n\t\t$menu_obj = get_term_by( 'slug', $menu, 'nav_menu' );\n\n\tif ( !$menu_obj )\n\t\t$menu_obj = get_term_by( 'name', $menu, 'nav_menu' );\n\n\tif ( !$menu_obj ) {\n\t\t$menu_obj = false;\n\t}\n\n\treturn $menu_obj;\n}", "title": "" }, { "docid": "125c9a2a2f7680b69007ec6f21c74d24", "score": "0.48273647", "text": "public static function hasSubmenu($menu)\n {\n return isset($menu['items']) && is_array($menu['items']) && !empty($menu['items']);\n }", "title": "" }, { "docid": "7b93204c5cf454a9b62dd92b3618510a", "score": "0.48257324", "text": "function bimber_snax_hide_nav_menus( $has_nav_menu, $location ) {\n\t$locations = array(\n\t\t'bimber_primary_nav',\n\t\t'bimber_secondary_nav',\n\t);\n\t$frontend_submission_page = snax_get_frontend_submission_page_id();\n\tif ( in_array( $location, $locations ) && is_page( snax_get_frontend_submission_page_id() ) && ! empty( $frontend_submission_page ) ) {\n\t\t$has_nav_menu = false;\n\t}\n\n\treturn $has_nav_menu;\n}", "title": "" }, { "docid": "46c0d7870a345d8b8b1e0a1af33cd4ec", "score": "0.48130006", "text": "public function testAdminIndexSetViewVariableMenus()\r\n {\r\n $this->get('/admin/menu-manager/menus');\r\n \r\n $menus = $this->viewVariable('menus');\r\n \r\n $this->assertNotNull($menus, __('May be variable $menus is not passed to the view in index method.'));\r\n $this->assertInstanceOf(ResultSet::class, $menus, __('Wrong $menus variable type. Got {0} instead {1}', gettype($menus), ResultSet::class));\r\n \r\n }", "title": "" }, { "docid": "d7542afd9b0ae9c6e803842e0d23e2ef", "score": "0.4811619", "text": "public function testSetMenuItemOptionSetItemMetadata()\n {\n }", "title": "" }, { "docid": "746c8fd253f69a670baeef356b109e28", "score": "0.4805881", "text": "public function testAdminTranslateViewvariableMenu()\r\n {\r\n $this->get('/admin/menu-manager/menus/translate/1');\r\n \r\n $menu = $this->viewVariable('menu');\r\n \r\n $this->assertNotNull($menu, __('View variable $menu is not passed.'));\r\n $this->assertInstanceOf(Menu::class, $menu, __('Wrong type of $menu variable. Expected type is {0}', Menu::class));\r\n }", "title": "" }, { "docid": "9734ccf2c8be417b9238a92530ffd464", "score": "0.47767583", "text": "public function isTaxable() {\n return $this->taxable;\n }", "title": "" }, { "docid": "e40267ec688659ab3d04f979724f4e77", "score": "0.4771011", "text": "public function testGetAllMenuMetadataByMenuIdAndStoreId()\n {\n }", "title": "" }, { "docid": "eddd95ee44da837a3c4d034ad4da3166", "score": "0.47252777", "text": "public function testAdminEditSetViewVariableMenu()\r\n {\r\n $this->get('/admin/menu-manager/menus/edit/1');\r\n \r\n $menu = $this->viewVariable('menu');\r\n \r\n $this->assertNotNull($menu, __('May be variable $menu is not passed to the view in edit method.'));\r\n $this->assertInstanceOf(Menu::class, $menu, __('Wrong $menu variable type. Got {0} instead {1}', gettype($menu), Menu::class));\r\n }", "title": "" }, { "docid": "0eb0306a8b64e70d5966363da5fb0f5a", "score": "0.47061455", "text": "public function view_tax()\n\t{\n\t\tif ($this->checkLogin('A') == '')\n\t\t{\n\t\t\tredirect('admin');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->data['heading'] = 'View State';\n\t\t\t$tax_id = $this->uri->segment(4,0);\n\t\t\t$condition = array('id' => $tax_id);\n\t\t\t\n\t\t\t$this->data['tax_details'] = $this->location_model->get_all_details(STATE_TAX,$condition);\t\t\t\n\t\t\t\n\t\t\t$condition1 = array('id' => $this->data['tax_details']->row()->countryid);\n\t\t\t$this->data['CountryList'] = $this->location_model->get_all_details(COUNTRY_LIST,$condition1);\n\n\t\t\tif ($this->data['tax_details']->num_rows() == 1){\n\t\t\t\t$this->load->view('admin/location/view_tax',$this->data);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tredirect('admin');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "854c97eff2a7cda05a7761ddf69cc7ae", "score": "0.4703696", "text": "function useNewTaxClass()\n{\nglobal $db;\n\n$query = \"select UseNewTaxSystem from optCompanyInfo\";\nif ( !$result = $db->sql_query( $query ) )\n\t{\n\tLogError( 13362, $query .\"<br>\".$db->sql_error() );\n\treturn false;\n\t}\n$row = $db->sql_fetchrow( $result );\nif ( $row['UseNewTaxSystem'] == 1 )\n\treturn true;\nelse\n\treturn false;\n}", "title": "" }, { "docid": "3b0c8636262ed141cb42e62bd9b4b0f6", "score": "0.4700378", "text": "public function testGetMenuStoreNames()\n {\n }", "title": "" }, { "docid": "4cacb0a9e41e7dfd04e804584ee2dba8", "score": "0.46981812", "text": "public function testAdminAddSetViewVariableMenu()\r\n {\r\n $this->get('/admin/menu-manager/menus/add');\r\n \r\n $menu = $this->viewVariable('menu');\r\n \r\n $this->assertNotNull($menu, __('May be variable $menu is not passed to add view'));\r\n $this->assertInstanceOf(Menu::class, $menu, __('Variable $menu must be of {0} type, got (1) instaed', Menu::class, gettype($menu)));\r\n }", "title": "" }, { "docid": "b0302d7afb93ff296e99230dc97b9e31", "score": "0.46953836", "text": "public function testExistenceOfHorizontalMenu() {\n $this->drupalGet('/node/3');\n $this->assertSession()->elementContains('css', '.responsive-menu-block-wrapper', 'Menu item without children');\n }", "title": "" }, { "docid": "d7ce3969d54f9e7578342cc783c19d21", "score": "0.46949637", "text": "public function getMenuType();", "title": "" }, { "docid": "905a57b922431a7ef7c8fff9d72056b4", "score": "0.46943125", "text": "public function testMenusDeleteTaxRate()\n {\n }", "title": "" }, { "docid": "9760f7f11b56692d252cfc37c6777042", "score": "0.46875182", "text": "public static function prices_have_tax_included() {\n\t\treturn get_option( 'woocommerce_tax_display_shop' ) === 'incl';\n\t}", "title": "" }, { "docid": "a6d1962fa592bd2d544378a75a2397f8", "score": "0.46728948", "text": "public function makeMenuAllGoodExpectTrue()\n {\n $menuRegistry = new MenuRegistry();\n $result = $menuRegistry->makeMenu()->setLabel('MenuLabel')->setIdentifier('MenuIdent');\n $expected = new Menu();\n $expected->setIdentifier('MenuIdent');\n $expected->setLabel('MenuLabel');\n $this->assertEquals($expected, $result);\n }", "title": "" }, { "docid": "970d98e3f9b2c5e7da10fc6597fdf24b", "score": "0.46564126", "text": "function _is_tax($id_iva) \n\t{\n\t\t// debug(\"_is_tax($id_iva) : \".is_array($this->_aIVAs[detalle][$id_iva]));\n\t\tif ((int)is_array($this->_aIVAs[detalle][$id_iva])) return TRUE;\n\t\telse return FALSE;\n\t}", "title": "" }, { "docid": "618423212f0cabb5830ac93abdd1daf9", "score": "0.46557808", "text": "function printMenu($menu=null,$nostyle=false){\r\n if(!is_array($menu)){\r\n global $l;\r\n $menu=array();\r\n $menu[]=array('Index',NODOMAIN);\r\n $menu = $l->triggerHookSequentially(\"buildMenu\",$this,$menu);\r\n }\r\n \r\n echo('<ul>');\r\n foreach($menu as $item){\r\n if($nostyle)$item[2]='';\r\n echo('<li style=\"'.$item[3].'\"><a href=\"'.$item[1].'\" title=\"'.$item[2].'\">'.$item[0].'</a>');\r\n if(count($item)==5)$this->printMenu($item[4]);\r\n echo('</li>');\r\n }\r\n echo('</ul>');\r\n}", "title": "" }, { "docid": "2b9e9650d6e67e09744bd11c22f034c7", "score": "0.46548328", "text": "public function testMenu()\n {\n $this->visit('/')\n ->see('Type postcode to search restaurant.')\n ->visit('/api/menu/62366')\n ->see('Chilled Greens Juice');\n }", "title": "" }, { "docid": "2842d0908e37cb5da6c531bcbde67383", "score": "0.46462914", "text": "function meal_change_menu( $menu ) {\n\t$reservation_count = get_transient( 'res_count' ) ? get_transient( 'res_count' ) : 0;\n\tif ( $reservation_count > 0 ) {\n\t\t$menu[4][0] = \"Reservation <span class='awaiting-mod'>{$reservation_count}</span> \"; // Menu Position 4[0]\n\t}\n\n\treturn $menu;\n}", "title": "" }, { "docid": "ed9f469357983a7c0ed56d63e0a10a9d", "score": "0.46413392", "text": "protected function assertBreadcrumbMenuPathShown($menuPath) {\n\t\t$menuPathExpression = '[data-menupath=\"' . $menuPath .'\"]';\n\t\t$this->assertTrue(\n\t\t\t$this->isVisible('css=' . $menuPathExpression),\n\t\t\t'The menu path ' . $menuPath . 'was not visible, but it should be.'\n\t\t);\n\t}", "title": "" }, { "docid": "22fb21e7d327e9556a80a0fb8667de1e", "score": "0.46185672", "text": "public function testGetMenuItemOptionSetItemMetadata()\n {\n }", "title": "" }, { "docid": "58b13503c9d89d8108dc3f8331d33972", "score": "0.46130598", "text": "public function assertMenuItemCount($menu, $label, $type, $count) {\n $group = $this->getEntityByLabel($type, $label);\n $menu_instance = $this->getOgMenuInstance($group->id(), $menu);\n $tree = $this->getOgMenuTree($menu_instance);\n\n PHPUnit_Framework_Assert::assertEquals($count, count($tree));\n }", "title": "" }, { "docid": "09329134fe3b0e1cbcd5a4b993b42a96", "score": "0.4608181", "text": "function opening_times_taxonomy_show_on_filter( $cmb ) {\n\t$tax_terms_to_show_on = $cmb->prop( 'show_on_terms', array() );\n\n\tif ( empty( $tax_terms_to_show_on ) || ! $cmb->object_id() ) {\n\t\treturn false;\n\t}\n\n\t$post_id = $cmb->object_id();\n\t$post = get_post( $post_id );\n\n\tforeach( (array) $tax_terms_to_show_on as $taxonomy => $slugs ) {\n\t\tif ( ! is_array( $slugs ) ) {\n\t\t\t$slugs = array( $slugs );\n\t\t}\n\n\t\t$terms = $post ? get_the_terms( $post, $taxonomy ) : wp_get_object_terms( $post_id, $taxonomy );\n\n\t\tif ( ! empty( $terms ) ) {\n\t\t\tforeach( $terms as $term ) {\n\t\t\t\tif ( in_array( $term->slug, $slugs, true ) ) {\n\t\t\t\t\t// wp_die( '<xmp>: '. print_r( 'show it', true ) .'</xmp>' );\n\t\t\t\t\t// Ok, show this metabox\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn false;\n}", "title": "" }, { "docid": "0f82af92c03054a50e0a7473d1bcf092", "score": "0.4590949", "text": "private function registerTax() {\n\t\t$labels = array(\n\t\t\t'name' => __('Restaurant Menu Category', 'qode-restaurant'),\n\t\t\t'singular_name' => __('Restaurant Menu Category', 'qode-restaurant'),\n\t\t\t'search_items' => __('Search Restaurant Menu Categories', 'qode-restaurant'),\n\t\t\t'all_items' => __('All Restaurant Menu Categories', 'qode-restaurant'),\n\t\t\t'parent_item' => __('Parent Restaurant Menu Category', 'qode-restaurant'),\n\t\t\t'parent_item_colon' => __('Parent Restaurant Menu Category:', 'qode-restaurant'),\n\t\t\t'edit_item' => __('Edit Restaurant Menu Category', 'qode-restaurant'),\n\t\t\t'update_item' => __('Update Restaurant Menu Category', 'qode-restaurant'),\n\t\t\t'add_new_item' => __('Add New Restaurant Menu Category', 'qode-restaurant'),\n\t\t\t'new_item_name' => __('New Restaurant Menu Category Name', 'qode-restaurant'),\n\t\t\t'menu_name' => __('Restaurant Menu Categories', 'qode-restaurant'),\n\t\t);\n\n\t\tregister_taxonomy($this->taxBase, array($this->base), array(\n\t\t\t'public' \t\t=> false,\n\t\t\t'hierarchical' => true,\n\t\t\t'labels' => $labels,\n\t\t\t'show_ui' => true,\n\t\t\t'query_var' => true,\n\t\t\t'show_admin_column' => true,\n\t\t));\n\t}", "title": "" }, { "docid": "56dd645fbdfea5a00b082490f4ceddff", "score": "0.45893824", "text": "public function getIsTaxable()\n {\n return $this->_isTaxable;\n }", "title": "" }, { "docid": "d1410413cc0fea2c3bd7eb2e8ab12108", "score": "0.4588539", "text": "function menu_has_visible_children($item) {\n global $_list;\n\n if ($_list[$item]['children']) {\n foreach ($_list[$item]['children'] as $child) {\n if ($_list[$child]['hidden'] == MENU_SHOW) {\n return true;\n }\n }\n }\n\n return false;\n}", "title": "" }, { "docid": "5c60e1de87c57b5e66832bc64b043692", "score": "0.45593274", "text": "function paypal_viewer_menu() {\n global $_CONF, $_PAY_CONF, $LANG_PAYPAL_1, $_TABLES;\n\n // generate the menu from the template\n $menu = COM_newTemplate($_CONF['path'] . 'plugins/paypal/templates/menus');\n $menu->set_file(array('menu' => 'viewer_menu.thtml'));\n $menu->set_var('site_url', $_PAY_CONF['site_url']);\n $menu->set_var('view_cart', $LANG_PAYPAL_1['view_cart']);\n \n\t// Display types\n $types = 0;\n $nb_products = DB_count($_TABLES['paypal_products'],'type','product');\n $nb_subscriptions = DB_count($_TABLES['paypal_products'],'type','subscription');\n\t$type = COM_newTemplate($_CONF['path'] . 'plugins/paypal/templates/menus');\n\t$type->set_file(array('table' => 'types.thtml'));\n\tif ($nb_products > 0) {\n\t\t$types .= +1;\n\t\t$type->set_var('products', '<a href=\"' . $_PAY_CONF['site_url'] . '/index.php?type=product\">' . $LANG_PAYPAL_1['product_list_label'] . '</a>');\n\t} else {\n\t\t$type->set_var('products', '');\n\t}\n\tif ($nb_subscriptions > 0) {\n\t\tif ($types > 0) {\n\t\t\t $separator = ' | ';\n\t\t}\n\t\t$type->set_var('memberships', $separator . '<a href=\"' . $_PAY_CONF['site_url'] . '/index.php?type=subscription\">' . $LANG_PAYPAL_1['memberships'] . '</a>');\n\t} else {\n\t\t$type->set_var('memberships', '');\n\t\tif ($types == 0) $type->set_var('products', '<a href=\"' . $_PAY_CONF['site_url'] . '/index.php\">' . $LANG_PAYPAL_1['product_list_label'] . '</a>');\n\t}\n\t$type_layout = $type->parse('', 'table');\t\t\n $menu->set_var('product_list_label', $type_layout);\n\t\n\tif ($_PAY_CONF['view_membership'] == '1') {\n \t$menu->set_var('memberships', '| <a href=\"' . $_PAY_CONF['site_url'] . '/memberships_history.php\">' . $LANG_PAYPAL_1['members_list'] . '</a>');\n\t} else {\n\t $menu->set_var('memberships', '');\n\t}\n\t\n $display .= $menu->parse('output', 'menu');\n\n // return results\n return $display;\n}", "title": "" }, { "docid": "12a8dda954e6e817960e0ca44b0df442", "score": "0.4559137", "text": "public function show(Menu $menu)\r\n {\r\n //\r\n }", "title": "" }, { "docid": "7d1b5a92a7bbafcc58016a791b24d706", "score": "0.45513836", "text": "public function isSelected(MenuItem $menu);", "title": "" }, { "docid": "aab0b604796c9db5b8c94743b45184e9", "score": "0.45481935", "text": "public function action_getmanager_taxilist()\n {\n $add_model = Model::factory( 'transaction' );\n $output = '';\n $company_id = arr::get( $_REQUEST, 'company_id' );\n $manager_id = arr::get( $_REQUEST, 'manager_id' );\n $manage_transaction = Model::factory( 'transaction' );\n $gettaxi_details = $manage_transaction->getmanager_taxidetails( $company_id, $manager_id );\n if ( count( $gettaxi_details ) > 0 ) {\n $output .= '<div class=\"selector ser_input_field\" id=\"uniform-user_type\">\n <select name=\"taxiid\" id=\"taxiid\" class=\"select2\">\n <option value=\"All\">' . __( 'all_label' ) . '</option>';\n foreach ( $gettaxi_details as $modellist ) {\n $output .= '<option value=\"' . $modellist[\"taxi_id\"] . '\"';\n $output .= '>' . $modellist[\"taxi_no\"] . '</option>';\n }\n $output .= '</select></div>';\n } else {\n $output .= '<div class=\"selector ser_input_field\" id=\"uniform-user_type\">\n <select name=\"taxiid\" id=\"taxiid\">\n <option value=\"\">' . __( 'select_label' ) . '</option></select></div>';\n }\n echo $output;\n exit;\n }", "title": "" }, { "docid": "19ad928ad22c6fb123f3b93ea9871475", "score": "0.45460096", "text": "public function testTaxDisplayDoesNotApplyToWrongCustomerGroup(): void\n {\n $productSku = 'simple';\n $query = $this->getProductSearchQuery($productSku);\n $response = $this->graphQlQuery(\n $query,\n [],\n '',\n $this->getCustomerAuthenticationHeader->execute('[email protected]', 'password')\n );\n\n $this->assertNotEmpty($response['products']);\n $priceRange = $response['products']['items'][0]['price_range'];\n $this->assertEquals(10, $priceRange['minimum_price']['regular_price']['value']);\n $this->assertEquals(10, $priceRange['minimum_price']['final_price']['value']);\n $this->assertEquals(10, $priceRange['maximum_price']['regular_price']['value']);\n $this->assertEquals(10, $priceRange['maximum_price']['final_price']['value']);\n }", "title": "" }, { "docid": "b2407f8229457e3ff7ee69b11dd464e3", "score": "0.45360836", "text": "function getSecondTaxIsEnabled () {\n return false;\n }", "title": "" }, { "docid": "405cb36d7c9fc144ea85dc11e8bd024d", "score": "0.4528231", "text": "public function show(Menu $menu)\n {\n //\n }", "title": "" }, { "docid": "405cb36d7c9fc144ea85dc11e8bd024d", "score": "0.4528231", "text": "public function show(Menu $menu)\n {\n //\n }", "title": "" }, { "docid": "405cb36d7c9fc144ea85dc11e8bd024d", "score": "0.4528231", "text": "public function show(Menu $menu)\n {\n //\n }", "title": "" }, { "docid": "405cb36d7c9fc144ea85dc11e8bd024d", "score": "0.4528231", "text": "public function show(Menu $menu)\n {\n //\n }", "title": "" }, { "docid": "405cb36d7c9fc144ea85dc11e8bd024d", "score": "0.4528231", "text": "public function show(Menu $menu)\n {\n //\n }", "title": "" }, { "docid": "45cb20e6859c025e6943d2f81e701ba9", "score": "0.4512023", "text": "private function setTrees()\n {\n if(empty($this->generator->types[CustomsInterface::CUSTOM_TYPES_TREES][RamlInterface::RAML_PROPS]) === false) {\n foreach($this->generator->types[CustomsInterface::CUSTOM_TYPES_TREES][RamlInterface::RAML_PROPS] as $propKey => $propVal) {\n if(is_array($propVal) && empty($this->generator->types[ucfirst($propKey)]) === false) {\n // ensure that there is a type of propKey ex.: Menu with parent_id field set\n $this->openEntity(ConfigInterface::TREES);\n $this->setParamDefault($propKey, $propVal[RamlInterface::RAML_KEY_DEFAULT]);\n $this->closeEntities();\n }\n }\n }\n }", "title": "" }, { "docid": "204d268cfd246586ac3cf96ddafecad1", "score": "0.44982678", "text": "function gpx_menus(){\n $locations = array(\n 'primary' => \"Attendee Navigation\",\n 'offline' => \"Offline Navigation\",\n );\n register_nav_menus($locations);\n}", "title": "" }, { "docid": "9731d301a6b13f0af9d2d712316737fa", "score": "0.44914138", "text": "public function show(Menu $menu)\n {\n //sd\n\n }", "title": "" }, { "docid": "3b4fc0bb2dd2f6a7bdd9804360276000", "score": "0.4487106", "text": "public function showMenu(): bool\n {\n return true;\n }", "title": "" }, { "docid": "adf6fe48ec9e55d4eb3f017497c6b224", "score": "0.44843253", "text": "public function testTax() {\n $inputAmount = 10.00;\n $taxInput = 0.10;\n $output = $this->Receipt->tax($inputAmount, $taxInput);\n $this->assertEquals(\n 1.00,\n $output,\n 'The tax calculation should equal 1.00'\n );\n }", "title": "" }, { "docid": "1bfa46a06917004ebaedc1eb644a15ae", "score": "0.4468371", "text": "function _s_hide_acf_menu_item() {\n $current_user = wp_get_current_user();\n\n if( is_admin() && strpos( $current_user->user_email, 'sayenkodesign') === false ) {\n // remove menu items\n add_filter('acf/settings/show_admin', '__return_false');\n }\n}", "title": "" }, { "docid": "24ddb1afd79683e6d28fe1d1ef1f8a20", "score": "0.44670075", "text": "private function checkMenuIndividualItems() {\r\n // looping through restaurants\r\n foreach($this->_individual_items as $key => $value) {\r\n // looping through all items in restuarant\r\n foreach($value as $item) {\r\n // checking if items match one of the wanted items\r\n $total[$key][] = $this->checkItemsForWanted($item);\r\n }\r\n }\r\n $this->_final_prices = $total;\r\n $this->sortFinalPrices();\r\n }", "title": "" }, { "docid": "bb99fd25e1d21b11f923e786a9bedb30", "score": "0.44620878", "text": "public function show(MenusHasUsers $menusHasUsers)\n {\n //\n }", "title": "" }, { "docid": "810b21d3722051a3fefd5ac14bf9a583", "score": "0.44560596", "text": "function wpshp_register_my_menus() {\n register_nav_menus(\n array(\n 'security_privacy_menu' => __( 'Security and Privacy', 'wpshp' ),\n )\n );\n}", "title": "" }, { "docid": "e987d199a8b638f839df58de9d129162", "score": "0.44457713", "text": "function xcms_menu($init_path, $menu_templates, $menu_level, $add_href_params, $options, $start_level, $end_level)\n{\n global $SETTINGS, $pageid, $web_prefix;\n $output = \"\";\n\n $page_prefix = xcms_get_page_root(true);\n $pageiid = str_replace($page_prefix, \"\", $init_path);\n $aux_class = \"\";\n $page_info = \"$init_path/info\";\n $text = \"\";\n\n if ($menu_level >= count($menu_templates))\n {\n // if templates do not provide necessary levels\n // it is not an engine problem\n xcms_log(XLOG_WARNING, \"Not all menu items can be rendered (not enough menu template levels)\");\n return $output;\n }\n\n // this prevents from loading sub-folders if no info file here\n if (!file_exists($page_info))\n {\n return $output;\n }\n\n $INFO = xcms_get_list($page_info);\n $show = xcms_get_key_or($options, \"show\");\n $order = xcms_get_key_or($INFO, \"menu-order\", \"100\");\n $flags = \"$order\";\n $view = trim(xcms_get_key_or($INFO, \"view\"));\n $acl = explode(EXP_SP, $view);\n $access_granted = xu_empty($view) || xcms_check_rights($acl);\n if (xu_not_empty($show))\n {\n $text = \"{unnamed}\";\n if (xcms_get_key_or($INFO, \"menu-title\"))\n $text = htmlspecialchars($INFO[\"menu-title\"]);\n\n // skip locked items in not-locked mode\n if ($show == \"not-locked\" && xcms_is_enabled_key($INFO, \"menu-locked\"))\n return $output;\n\n if (xcms_is_enabled_key($INFO, \"menu-hidden\", false))\n {\n $aux_class .= \"menuitem-hidden \";\n $flags .= \",H\";\n }\n\n // FIXME(mvel): ACL parse trash\n $view_acl = xcms_get_key_or($INFO, \"view\");\n $view_acl_list = explode(EXP_SP, $view_acl);\n\n if (array_search(\"#all\", $view_acl_list) === false)\n $flags .= \",$view_acl\";\n\n if (xu_not_empty($flags))\n $flags = \"<sup>$flags</sup>\";\n }\n else\n {\n $text = htmlspecialchars(@$INFO[\"menu-title\"]);\n // don't show unnamed items\n if (!xcms_get_key_or($INFO, \"menu-title\")) // no title\n return $output;\n // don't show hidden items\n if (xcms_is_enabled_key($INFO, \"menu-hidden\", false))\n return $output;\n if (!$access_granted)\n return $output;\n\n $reg_only = true;\n foreach ($acl as $acl_item)\n if ($acl_item == \"#all\")\n $reg_only = false;\n if ($reg_only)\n $aux_class .= \" menuitem-auth\";\n }\n // render menu item\n $html = $menu_templates[$menu_level];\n $html = str_replace('@@AUX_CLASS@', $aux_class, $html);\n $html = str_replace('@@FLAGS@', $flags, $html);\n\n if (xcms_get_key_or($options, \"devel\") || !@$INFO[\"alias\"])\n {\n // if alias not set or in devel mode, always show unaliased menu items\n $html = str_replace(\"@@HREF@\", \"/$web_prefix?page=$pageiid&amp;$add_href_params\", $html);\n }\n else\n {\n $alias = $INFO[\"alias\"];\n $html = str_replace(\"@@HREF@\", \"/$web_prefix$alias/$add_href_params\", $html);\n }\n // text is already escaped hereech\n $html = str_replace(\"@@TEXT@\", $text, $html);\n\n if ($pageid == $pageiid) {\n $html = str_replace(\"@@ACTIVE\", \"active\", $html);\n } elseif (strstr($pageid, \"$pageiid/\")) {\n $html = str_replace(\"@@ACTIVE\", \"active_parent\", $html);\n } else {\n $html = str_replace(\"@@ACTIVE\", \"passive\", $html);\n }\n\n // add icon\n if (file_exists(\"$init_path/menuicon.gif\"))\n $html = str_replace(\"<!-- PIC -->\", \"<img src=\\\"$init_path/menuicon.gif\\\" />\", $html);\n\n // render current level\n if ($menu_level >= $start_level && $menu_level <= $end_level)\n $output .= $html;\n\n // render menu subtree\n $array = glob(\"$init_path/*\", GLOB_ONLYDIR);\n if (xcms_get_key_or($options, \"stop\"))\n return $output;\n if (!@$array)\n return $output;\n\n $array_ordered = array();\n\n foreach ($array as $key => $value) {\n $sub_info = xcms_get_list(\"$value/info\");\n $order = xcms_get_key_or($sub_info, \"menu-order\", \"100\");\n $int_order = (integer)$order;\n if (!array_key_exists($int_order, $array_ordered))\n $array_ordered[$int_order] = array();\n $array_ordered[$int_order][] = $value;\n }\n ksort($array_ordered);\n\n foreach ($array_ordered as $order => $same_order_items)\n {\n foreach ($same_order_items as $value)\n {\n if (!file_exists(\"$value/info\"))\n continue;\n\n $without_prefix = str_replace($page_prefix, \"\", $value);\n if (xcms_get_key_or($options, \"show\") != \"\" || strstr($pageid, $without_prefix))\n $output .= xcms_menu($value, $menu_templates, $menu_level + 1, $add_href_params, $options, $start_level, $end_level);\n else\n {\n $new_options = $options;\n $new_options[\"stop\"] = true;\n $output .= xcms_menu($value, $menu_templates, $menu_level + 1, $add_href_params, $new_options, $start_level, $end_level);\n }\n }\n }\n return $output;\n}", "title": "" }, { "docid": "1ad9952eb36597f3b66bfe973a2d57a5", "score": "0.44414318", "text": "public function show(TradeLicenseTax $tradeLicenseTax)\n {\n //\n }", "title": "" }, { "docid": "9b9dde76d95b44347aa8f36ede2fd56c", "score": "0.44414195", "text": "function MyMod_HorMenu_Menu_Actions($menu)\n {\n return $this->ProfileHash[ \"Menues\" ][ $menu ];\n }", "title": "" }, { "docid": "d71544a4f548dcde86a9d1b694d3842a", "score": "0.44407287", "text": "function add_specific_menu_location_atts($atts, $item, $args)\n{\n if ($item->title === 'Mijn verslag') {\n $num = (int)count($_SESSION['pmt']);\n $item->title .= ' (<span class=\"pmt-bundle-num\">' . $num . '</span>)';\n }\n\n return $atts;\n}", "title": "" }, { "docid": "833cfcd9ffde069019f2201cb8a29468", "score": "0.44243246", "text": "public function testInvoiceGetTaxGroups()\n {\n }", "title": "" }, { "docid": "31ce05755b0fcd29c72c766c86b0351c", "score": "0.44192636", "text": "public function checkingForTargetAndMenu($target) {\n $checkingForTargetAndMenu = 0;\n if (( int ) Mage::getStoreConfig ( 'custom_menu/columns/integrate' ) && count ( $target )) {\n $checkingForTargetAndMenu = 1;\n }\n return $checkingForTargetAndMenu;\n }", "title": "" }, { "docid": "202c222f0073d42626c78367bc202c04", "score": "0.44162998", "text": "public function setAdminMenu()\n {\n $myTransType = Yii::app()->user->getState('TransType');\n\n if ($myTransType === 'B'){\n \n $this->menu=array(\n array('label'=>'Account Summary', 'url'=>array('user/BuyerAccountSum')),\n array('label'=>'Purchased Profiles', 'url'=>array('profile/browseMine')),\n array('label'=>'Credit Balance', 'url'=>array('user/Credits')),\n array('label'=>'Settings', 'url'=>array('user/Settings')), \n array('label'=>'Order History', 'url'=>array('user/PurchasedDetails')),\n );\n }\n else if ($myTransType === 'S'){ \n $this->menu=array(\n array('label'=>'Account Summary', 'url'=>array('user/indexSeller')), \n array('label'=>'Earnings', 'url'=>array('user/Earnings')),\n array('label'=>'My Profile', 'url'=>array('user/Profile')),\n array('label'=>'Referrals', 'url'=>array('refer/index')),\n array('label'=>'Profile Verification', 'url'=>array('user/Validate')),\n array('label'=>'Consultation', 'url'=>array('user/Consult')),\n array('label'=>'Settings', 'url'=>array('user/Settings')),\n \n );\n }\n else{\n }\n \n \n }", "title": "" }, { "docid": "08195e53eaf6eaa8e24f41ea470b6e47", "score": "0.44065392", "text": "function showMenu() {\n\n // XML header\n if (!headers_sent()) {\n header(\"Content-type: application/xml\");\n }\n else {\n trigger_error(\"Module datafeed: XML header cannot be sent. Headers sent !\", E_USER_ERROR);\n }\n $xslp = new xslprocess();\n $xslp->cachelevel = TPL_CACHE_NOTHING;\n return $xslp->siteMenu();\n }", "title": "" }, { "docid": "b05b8d582d8ff6737d487bb395e9aaef", "score": "0.4389844", "text": "function crypton_blog_trx_addons_get_mobile_menu($menu) {\n\t\treturn apply_filters('trx_addons_filter_get_mobile_menu', $menu);\n\t}", "title": "" }, { "docid": "67357a197b0aadad4ec00285466ea8cf", "score": "0.4384207", "text": "public function businessTaxSet($id_tax, $def){\n\n if($id_tax > 0){\n $q = $this->dbUpdate($def).\" WHERE id_tax=\".$id_tax;\n }else{\n $q = $this->dbInsert($def);\n }\n\n @$this->dbQuery($q);\n if($this->db_error != NULL) return false;\n\n $this->id_tax = ($id_tax > 0) ? $id_tax : $this->db_insert_id;\n\n return true;\n}", "title": "" }, { "docid": "58ae4613848745157476cce4e99034dc", "score": "0.43827897", "text": "public function testSetMenuLock()\n {\n }", "title": "" }, { "docid": "51b101c133c35fdbcc26c2ae4cbe7e05", "score": "0.43807265", "text": "function var_menu_areas(){\n\tregister_nav_menus( array(\n\t\t//code-friendly => human-friendly\n\t\t'main_menu' \t=> 'Main Menu',\n\t\t'social_menu' \t=> 'Social Media Menu',\n\t) );\n}", "title": "" }, { "docid": "023b2e20f6eef1df57ab829757ad1eae", "score": "0.43796253", "text": "public function testGetMenu()\n {\n $response = $this->get('/api/menus/1');\n\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "d9ead2132978afc9425c19f7d4781724", "score": "0.43741643", "text": "private static function menu_tb()\n {\n return PREFIX . 'menu';\n }", "title": "" }, { "docid": "9e50e35a51baaa6b7f87e0e0e16ffdb8", "score": "0.4364553", "text": "function _dhtml_menu_menus() {\n if (function_exists('menu_get_menus')) {\n // If the menu module is enabled, list custom menus.\n $menus = menu_get_menus();\n }\n else {\n // Otherwise, list only system menus.\n $menus = menu_list_system_menus();\n }\n\n // If the book module is enabled, also include book menus.\n if (function_exists('book_get_books')) {\n foreach (book_get_books() as $bid => $link) {\n $menus[\"book-toc-$bid\"] = t('Book: %title', array('%title' => $link['title']));\n }\n }\n\n // menu_get_names() filters out empty menus, and adds any menus not found using the above calls (edge case).\n foreach (menu_get_names() as $menu) {\n $menu_names[$menu] = isset($menus[$menu]) ? $menus[$menu] : t('Other menu: %menu', array('%menu' => $menu));\n }\n\n return $menu_names;\n}", "title": "" }, { "docid": "cda1ee7c739578ffe1f60b9a5b823272", "score": "0.4348943", "text": "public function testMenuLinks() {\n \\Drupal::service('plugin.manager.menu.link')->rebuild();\n $tree = \\Drupal::menuTree()->load('admin', new MenuTreeParameters());\n $this->assertTrue(isset($tree['system.admin']->subtree['views_view:views.test_page_display_menu.page_4']));\n $menu_link = $tree['system.admin']->subtree['views_view:views.test_page_display_menu.page_4']->link;\n $this->assertEqual($menu_link->getTitle(), 'Test child (with parent)');\n $this->assertEqual($menu_link->isExpanded(), TRUE);\n $this->assertEqual($menu_link->getDescription(), 'Sample description.');\n }", "title": "" }, { "docid": "f9a3b2bbcfbe8358616beec6baa20e93", "score": "0.43486884", "text": "function corona_generate_menu_hook( $menu, $hook ) {\n $menus = get_registered_nav_menus();\n\n if ( in_array( $menu, $menus ) === 0 ):\n return;\n endif;\n\n foreach ( $menus as $location => $description ) :\n\n if ( $menu == $location ) :\n do_action( $hook, $menu );\n endif;\n\n endforeach;\n}", "title": "" }, { "docid": "582aa439137d593c42e23b93e4345454", "score": "0.43482384", "text": "public function checkInToMenu() {\n $page_title = '會員'; // TIEU DE CUA TRANG \n $menu_title = '會員'; // TEN HIEN TRONG MENU\n// CHON QUYEN TRUY CAP manage_categories DE role ADMINNITRATOR VÀ EDITOR DEU THAY DUOC\n $capability = 'manage_categories'; // QUYEN TRUY CAP DE THAY MENU NAY\n $menu_slug = 'qr_member'; // TEN slug TEN DUY NHAT KO DC TRUNG VOI TRANG KHAC GAN TREN THANH DIA CHI OF MENU\n// THAM SO THU 5 GOI DEN HAM HIEN THI GIAO DIEN TRONG MENU\n $icon = ICON_DIR . '/staff-icon.png'; // THAM SO THU 6 LA LINK DEN ICON DAI DIEN\n $position = 18; // VI TRI HIEN THI TRONG MENU\n add_menu_page($page_title, $menu_title, $capability, $menu_slug, array($this, 'dispatchActive'), $icon, $position);\n }", "title": "" }, { "docid": "96c69c6692b5447045a89b63420f44a7", "score": "0.4343628", "text": "function admin_tax_filter() {\n global $typenow;\n $post_type = self::$prefix.'docs';\n $taxonomy = self::$prefix.'docs_topics';\n if($typenow == $post_type) {\n $selected = isset($_GET[$taxonomy]) ? $_GET[$taxonomy] : '';\n $info_taxonomy = get_taxonomy($taxonomy);\n wp_dropdown_categories([\n 'show_option_all' => __('Show all'),\n 'taxonomy' => $taxonomy,\n 'name' => $taxonomy,\n 'orderby' => 'name',\n 'selected' => $selected,\n 'show_count' => true,\n 'hide_empty' => true,\n 'value_field' => 'slug'\n ]);\n }\n }", "title": "" }, { "docid": "0aca553c69837bb9b1acec7bad02f1ef", "score": "0.434285", "text": "public function issetTaxTable($index)\n {\n return isset($this->taxTable[$index]);\n }", "title": "" } ]
4195e6859778d0f7adb218de5f17295d
Initializes a new instance of the DlexResource class with DLEX file path and resource name as parameters.
[ { "docid": "6a2823709727d148ce153e710cff484f", "score": "0.7658374", "text": "public function __construct($dlex, string $resourceName = null)\r\n {\r\n parent::__construct($dlex, $resourceName);\r\n }", "title": "" } ]
[ { "docid": "71ea01684e1c5fac488bffaa1ded1202", "score": "0.72090167", "text": "public function __construct($dlex, $layout)\r\n {\r\n if ((gettype($dlex) == \"object\") && (gettype($layout) == \"object\")) {\r\n $this->ResourceName = $dlex->ResourceName;\r\n $this->LayoutDataResourceName = $layout->LayoutDataResourceName;\r\n array_push($this->_Resources, $layout);\r\n array_push($this->_Resources, $dlex);\r\n } else if ((gettype($dlex) == \"object\") && (gettype($layout) == \"string\")) {\r\n $this->ResourceName = $dlex->ResourceName;\r\n $layoutDataResource = new LayoutDataResource($layout);\r\n $this->LayoutDataResourceName = $layoutDataResource->LayoutDataResourceName;\r\n\r\n array_push($this->_Resources, $layoutDataResource);\r\n array_push($this->_Resources, $dlex);\r\n } else if ((gettype($dlex) == \"string\") && (gettype($layout) == \"object\")) {\r\n $this->ResourceName = $dlex;\r\n $this->LayoutDataResourceName = $layout->LayoutDataResourceName;\r\n array_push($this->_Resources, $layout);\r\n } else if ((gettype($dlex) == \"string\") && (gettype($layout) == \"string\")) {\r\n $this->ResourceName = $dlex;\r\n $layoutDataResource = new LayoutDataResource($layout);\r\n $this->LayoutDataResourceName = $layoutDataResource->LayoutDataResourceName;\r\n array_push($this->_Resources, $layoutDataResource);\r\n }\r\n }", "title": "" }, { "docid": "1b582d9ad4fedf78455352f6ae20d9f9", "score": "0.6046202", "text": "public function __construct(string $ResourceName){\r\n $MyType = CLRTypeOf ResourceAccessor;\r\n $this->manager = new System:::Resources:::ResourceManager($ResourceName,$MyType->Assembly);\r\n }", "title": "" }, { "docid": "2ce7a3eceb9b94d091def9d3ccb322f3", "score": "0.57703865", "text": "public function __construct(Resource $resource)\n {\n $this->resource = SqlFactory::load($resource);\n }", "title": "" }, { "docid": "4ba8a3ddf971cf96c96c529850346a8c", "score": "0.5619117", "text": "public function __construct($resource)\n {\n $this->resource = $resource;\n }", "title": "" }, { "docid": "eb82c7a4fdbf4099818b889f9b23066b", "score": "0.55911523", "text": "public function __construct(Resource $resource)\n {\n $this->resource = $resource;\n }", "title": "" }, { "docid": "51b1293a7c4d002772b5792a12dd5943", "score": "0.5563444", "text": "function SetResource($resource_file)\r\n\t{\r\n\t\tglobal $__psp__Resource; \r\n\t\t\r\n\t\t$GLOBALS[$__psp__Resource] =& new Resource($resource_file);\t\r\n\t\t\r\n\t}", "title": "" }, { "docid": "76e1d1857ddf826df1a917c32603f98d", "score": "0.556314", "text": "public function __construct($resource)\n { \n $this->resource = $resource;\n }", "title": "" }, { "docid": "15a242e051cd035c3ea40339eebb8554", "score": "0.5442625", "text": "private function __construct($resource)\n {\n $this->assertResource($resource);\n $this->resource = $resource;\n }", "title": "" }, { "docid": "dd207143b1e69781aa81258986b4fac5", "score": "0.5393976", "text": "private function __construct($resource)\n {\n $this->resource = $resource;\n self::$map[(string)$resource] = $this;\n }", "title": "" }, { "docid": "add64fd474531dd15722609690e42efa", "score": "0.53763", "text": "public function __construct($resourceName, $resourceId)\n {\n $this->resourceName = $resourceName;\n $this->resourceId = $resourceId;\n }", "title": "" }, { "docid": "950328940922cb5aa2a0bc565b591d2a", "score": "0.53687984", "text": "protected function createResource()\n {\n $resource = $this->info['resource'];\n\n $resourceName = basename($resource);\n\n $resourcePath = dirname($resource);\n\n $content = File::get($this->path(\"Http/Resources/resource.php\")); \n\n // make it singular \n $resourceName = Str::singular($resourceName);\n\n // replace resource name\n $content = str_ireplace(\"ResourceName\", \"{$resourceName}\", $content);\n \n // replace resource path\n $content = str_ireplace(\"ResourcePath\", $resourcePath, $content);\n\n $dataList = '';\n\n if (! empty($this->info['data'])) {\n // add the id to the list if not provided\n if (! in_array('id', $this->info['data'])) {\n array_unshift($this->info['data'], 'id');\n }\n\n $dataList = \"'\" . implode(\"', '\", $this->info['data']) . \"'\";\n }\n\n // replace resource data\n $content = str_ireplace(\"DATA_LIST\", $dataList, $content);\n\n $resourceDirectory = base_path(\"app/Http/Resources/$resourcePath\");\n\n if (! File::isDirectory($resourceDirectory)) {\n File::makeDirectory($resourceDirectory, 0755, true);\n }\n\n $this->info['resourcePath'] = $resourcePath . '\\\\' . $resourceName;\n\n // create the file\n $this->createFile(\"$resourceDirectory/{$resourceName}.php\", $content, 'Resource'); \n }", "title": "" }, { "docid": "3fca1a701c2fcc74a94d6a776ce0cae4", "score": "0.5327807", "text": "public function __construct($resource)\n {\n parent::__construct($resource);\n\n $this->resource = $this->collectResource($resource);\n }", "title": "" }, { "docid": "3fca1a701c2fcc74a94d6a776ce0cae4", "score": "0.5327807", "text": "public function __construct($resource)\n {\n parent::__construct($resource);\n\n $this->resource = $this->collectResource($resource);\n }", "title": "" }, { "docid": "9f404b1b96327311b631d743e4cea7a2", "score": "0.5274668", "text": "public function __construct($resource) {\n parent::__construct($resource);\n }", "title": "" }, { "docid": "314483dd150a270f1d5c31fceff02e55", "score": "0.52734816", "text": "public function __construct($resourceIdentifier)\n\t{\n\t\t$this->resourceIdentifier = $resourceIdentifier;\n\t}", "title": "" }, { "docid": "a0e6c22c6a8f8f1f51a9477e156f790e", "score": "0.52659094", "text": "protected function _construct()\n {\n parent::_construct();\n $this->_init('Temando\\Temando\\Model\\ResourceModel\\Rule');\n $this->setIdFieldName('rule_id');\n }", "title": "" }, { "docid": "788af00f7b7a8cf56231ab686a03a544", "score": "0.5265857", "text": "protected function _initResource(){\r\n\t\t$this->_resource\t=\tMage::getSingleton('core/resource');\r\n\t}", "title": "" }, { "docid": "e7fee7c2cd13d489919a30be5f4c5c74", "score": "0.5243276", "text": "public function __construct($resource)\n {\n parent::__construct($resource);\n }", "title": "" }, { "docid": "d84667646031e3427cbf747f22239442", "score": "0.5221208", "text": "public function _construct()\n {\n $this->_init(ResourceModel::class);\n }", "title": "" }, { "docid": "b73d8e8cf495cac2a1d97eb86c05fa7f", "score": "0.52180904", "text": "public function __construct()\n\t\t{\n\t\t\t/*goi thang den ham _init trong ResourceModel*/\n\t\t\tparent::_init('dat', 'id', new LandModel);\n\t\t}", "title": "" }, { "docid": "2323f8121bd5e364353e8f1338bf925f", "score": "0.51350135", "text": "public function __construct($path, $exData)\n\t{\n\t\t$this->path = $path;\n\t\t$this->exData = $exData;\n\t}", "title": "" }, { "docid": "6aa1eabce8fe7be6ccb3f6ad9b07ac43", "score": "0.5106252", "text": "public function __construct($resource = [])\n {\n // $this->reset = new local_recompletion\\task\\check_recompletion();\n $this->domainname = $resource['site'];\n $this->restformat = 'json';\n $this->tk = $resource['token'];\n $this->curl = new curl();\n $this->serviceFunction = \"\";\n $this->url =\n $this->domainname .\n '/webservice/rest/server.php' .\n '?wstoken=' .\n $this->tk .\n '&wsfunction=' . $this->serviceFunction . '&moodlewsrestformat=' .\n $this->restformat;\n\n }", "title": "" }, { "docid": "177495c2688911745ab99425ef634d10", "score": "0.5074124", "text": "protected function initialize()\n {\n if ($this->initialized) {\n return;\n }\n\n parent::initialize();\n\n // Add resources files directly, so that we still have translations\n // event if we don't run translation:import\n $standardResources = $this->getStandardResources();\n foreach ($standardResources as $resource) {\n parent::addResource($resource['format'], $resource['path'], $resource['locale'], $resource['domain']);\n }\n\n // Register all catalogues we have in the storage\n $repo = $this->container->get('liip.translation.repository');\n $locales = $repo->getLocaleList();\n foreach ($repo->getDomainList() as $domain) {\n foreach ($locales as $locale) {\n parent::addResource('liip', 'intermediate.storage', $locale, $domain);\n }\n }\n\n $this->initialized = true;\n }", "title": "" }, { "docid": "9f8c47c35b3faafb205866ab8f4e8159", "score": "0.5056936", "text": "public function __construct($resourceId)\n {\n $this->resourceId = (string) $resourceId;\n }", "title": "" }, { "docid": "58ba1117bc89df91ef0b32e709d6dfd6", "score": "0.5055814", "text": "function __construct($dataDir) {\n $this->dataDir = $dataDir;\n }", "title": "" }, { "docid": "f139f46b65e30a5acbb02d10bd78d1e4", "score": "0.5051489", "text": "public function __construct($file_source = '/usr/share/dict/words')\n\t{\n\t\t$this->data = array(\n\t\t\t'word' => '',\n\t\t\t'source' => 'unknown',\n\t\t);\n\t\t\n\t\t$this->file_source = $file_source;\n\t}", "title": "" }, { "docid": "97bd079389400b7cb68f1674ed3468e8", "score": "0.5046288", "text": "public function __construct($strFilename, Mustache $templator){\n \n parent::__construct($strFilename);\n $this->templator = $templator;\n }", "title": "" }, { "docid": "7c74f56402e4cffd0a6b654888001573", "score": "0.50135326", "text": "public function __construct(Script $resource)\n {\n parent::__construct($resource);\n }", "title": "" }, { "docid": "c2c4857b21bff9ddab6260b570b89a6c", "score": "0.4990178", "text": "protected function __construct($resource)\n {\n $this->setRaw($resource);\n }", "title": "" }, { "docid": "8d0ed491a28e76992fcbfb1c4d3d64ae", "score": "0.49784014", "text": "protected function _loadResource()\n {\n if ((!isset($this->_request->r)) && (!$this->_owApp->selectedResource)) {\n OntoWiki::getInstance()->selectedResource = new OntoWiki_Resource($this->_modelUri, $this->_model);\n }\n $this->_resource = $this->_owApp->selectedResource;\n $this->_resourceUri = (string) $this->_owApp->selectedResource;\n }", "title": "" }, { "docid": "fdfd24f4f9533351221ce78a2e80e0ef", "score": "0.49730483", "text": "public function __construct($filename_input) {\n\n # Check to see if the file actually exists. If it doesn't,\n # throw an exception and redirect to the 404 with the \n # message attached.\n try {\n $this->checkFile($filename_input);\n } catch (Exception $e) {\n header('Location: 404.php?e=\"' . $e->getMessage() . '\"');\n die();\n }\n\n # if everything goes ok, load the filename_input into a protected variable\n $this->filename = $filename_input;\n\n }", "title": "" }, { "docid": "66559e22f53fa6804eb5ae6427d6f6ec", "score": "0.49701846", "text": "public function setResourceDirectory($dir) {}", "title": "" }, { "docid": "81d8c329eccbc9b05fa0e36b0a6fa7d2", "score": "0.4963744", "text": "public function __construct($filename) {\n\t\tif (!file_exists($filename)) {\n\t\t\tthrow new sly_Exception(t('file_not_found', $filename));\n\t\t}\n\n\t\t$this->filename = $filename;\n\t\t$this->headers = null;\n\t\t$this->prefix = null;\n\t\t$this->version = null;\n\t\t$this->queries = null;\n\t}", "title": "" }, { "docid": "f4290ea414be67d836c42959c30aa9ee", "score": "0.4938932", "text": "protected function _construct()\n {\n $this->_init(Model::class, ResourceModel::class);\n }", "title": "" }, { "docid": "899f22f8811a1564bcdfe2007637d7a0", "score": "0.4938673", "text": "public function __construct()\n {\n $config = ['config_student', 'config_course', 'config_virtual_class'];\n $models = ['courses_model', 'lessons_model', 'enrolment_model', 'virtual_class_model', 'users_model'];\n $this->common_model->autoload_resources($config, $models);\n }", "title": "" }, { "docid": "bcb9ad7a57ac5ff28a9eb450423082b1", "score": "0.49309573", "text": "public function __construct()\n {\n // Add trace for debugging\n \\Debug::trace('Initializing language class...', __FILE__, __LINE__);\n \n // Load the Input and Filesystem class'\n $this->Input = load_class('Input');\n $this->filesystem = load_class('Filesystem', 'Library');\n \n // Load our languages\n $this->scan_language_dirs();\n \n // Set the default language\n $this->default_language = load_class('Config')->get('default_language');\n\n // Set the default Language\n $this->selected_language();\n \n // Add trace for debugging\n \\Debug::trace('Language class initiated successfully', __FILE__, __LINE__);\n }", "title": "" }, { "docid": "00c220c0910b13e89b21520b0b548077", "score": "0.49281168", "text": "function __construct($inputFile, $outputFile) {\n \n $this->inputFile = $inputFile;\n $this->outputFile = $outputFile;\n echo(\"File Hander initialized\\n\");\n\n }", "title": "" }, { "docid": "421d557ab490322309490e1a7e0a050c", "score": "0.49135095", "text": "public function __construct()\n {\n $this->resourceId = self::__name;\n }", "title": "" }, { "docid": "ae6cc1d97e3df98731911515b3a0db17", "score": "0.4913283", "text": "public function __construct() {\n\t\tsly_Core::getI18N()->appendFile(SLY_SALLYFOLDER.'/backend/lang/pages/mediapool/');\n\t}", "title": "" }, { "docid": "5cdbfb71205311bc0f955b1e83240f74", "score": "0.49045727", "text": "protected function __construct()\n {\n if (! defined('WRP_FILE_RESOURCE') ) {\n die;\n }\n $this->file = WRP_FILE_RESOURCE;\n $this->write_columns_row();\n\n }", "title": "" }, { "docid": "914b187d2c1664b91920eb7af97082a8", "score": "0.49010232", "text": "function __construct($req) {\n $this->d = dirname(__FILE__);\n }", "title": "" }, { "docid": "d19e55e4de9509a13ccb7eda526b33b5", "score": "0.4896944", "text": "public function __construct($definitionPath = null)\n {\n $this->definitionPath = $definitionPath ? $definitionPath : __DIR__ . '/../../resources/language/';\n }", "title": "" }, { "docid": "98972ea2b8dfddbd099ca5704522b1ca", "score": "0.48893514", "text": "private function buildResource() {\n\t\t$paths = $this->routeParameters->getUriPaths();\n\t\t$resourceName = ucfirst($paths[1]);\n\t\t$resourceName = StringUtil::pluralToSingular($resourceName);\n\t\t$resource = '\\\\'.ObjectUtil::getObjectsNamespace(IResource::class).'\\\\'.$resourceName;\n\t\tif(!class_exists($resource)) throw new NotFoundException();\n\t\t$this->resource = new $resource();\n\t}", "title": "" }, { "docid": "f71ce47001a64296a92b90f73ffcd460", "score": "0.48524407", "text": "public function load($resource)\n {\n $hooks = $this;\n\n require_once($resource);\n }", "title": "" }, { "docid": "39e48cbcc51a2d947aaa9fb539236eb8", "score": "0.48391145", "text": "public function __construct($resource, $class = null)\n {\n parent::__construct($resource);\n $this->resource_class = $class;\n }", "title": "" }, { "docid": "e05e11ce28b8196a247952a9e35338a3", "score": "0.48249578", "text": "function __construct($filename) { \n\t\t$this->filename = $filename;\n\t}", "title": "" }, { "docid": "b1cf10deb52e301573c7bbb6115bec96", "score": "0.48220444", "text": "protected function _construct()\n {\n $this->_init(StatusResource::class);\n }", "title": "" }, { "docid": "1f0ab807bdfcf403494ac38be6237abf", "score": "0.48067957", "text": "public function __construct($input_name, $destination_path, $filename = null)\n\t{\n\t\t//\n\t\t$this->input_name = $input_name;\n\t\t$this->destination_path = str_finish($destination_path, '/');\n\t\t$this->filename = $filename;\n\t}", "title": "" }, { "docid": "73db86c5f6fecbbf75e6a15190cfb1d1", "score": "0.47969905", "text": "public function __construct($stats, $resource){\n if($resource == 'dictionary')\n $this->entries = $stats['entries'];\n else // model\n $this->entries = $stats['categories'];\n }", "title": "" }, { "docid": "39fc7ea6b623272f0df6e66126c96281", "score": "0.47817102", "text": "public function __construct($DI){\n $this->_ruleset = new Config(__DIR__.'/../config/defaultRuleset.ini');\n parent::__construct($DI);\n }", "title": "" }, { "docid": "01cfa822b7344370ee9a2859ccd3b694", "score": "0.4773494", "text": "function set_resource($name)\n\t{\n\t\t$this->resource = $name;\n\t}", "title": "" }, { "docid": "33e5bfa3b7889e5e6cc7417c60b8257e", "score": "0.47705352", "text": "abstract protected function createResource();", "title": "" }, { "docid": "d18e53a60a7c1dd8fdd8a2b2e1fe26cb", "score": "0.47465444", "text": "protected function __construct()\n\t{\n\t\t// The absolute path to this ESL\n\t\t$this->sPath = realpath(__DIR__);\n\n\t\t// Use our own autoloader-package to autoload the other ESL packages\n\t\trequire_once $this->sPath . '/ESL/Autoload.php';\n\t\tESL_Autoload::factory($this->sPath . '/ESL/', 'ESL_');\n\t}", "title": "" }, { "docid": "8594c21f8db7221bb2d7298773767463", "score": "0.47459096", "text": "public function __construct($resource, $uri = false) {\n $this->resource = $resource;\n if($uri) {\n $uri = explode('?', $uri);\n $this->uri = $uri[0];\n if(isset($uri[1])) {\n $this->params = RequestUtil::getParamaters($uri[1]);\n }\n }\n }", "title": "" }, { "docid": "7014552d24485112ca70046f38c15a7b", "score": "0.47346228", "text": "public function ProjectResource()\n {\n $this->__construct();\n }", "title": "" }, { "docid": "c1be3462c0cd5d3e21588aa363f8dcc3", "score": "0.4731602", "text": "public function __construct($MysqlResource)\n\t{\n\t\t$this->MysqlObject = $MysqlResource;\n\t\t$this->position = 0;\n\t}", "title": "" }, { "docid": "2486c2b1b135b3d9010b74304085ce87", "score": "0.47280723", "text": "function __construct($fn)\n {\n $this->file = $fn;\n $this->loadFile();\n }", "title": "" }, { "docid": "6755fca85b050f35384590a9bb39d522", "score": "0.47237563", "text": "public function __construct($resource, $team)\n {\n $this->resource = $resource;\n $this->team = $team;\n }", "title": "" }, { "docid": "4ff1474cf6c5bd1ea8da4285cf81bd61", "score": "0.4721239", "text": "public function __construct($filename = ''){\n\t\tif ($filename) $this->setPath($filename);\n\t}", "title": "" }, { "docid": "6fb971a256433c4f994642e39342fa77", "score": "0.4713077", "text": "public function __construct(?string $xmlFilePath, \\XMLReader $reader = null) {\n if(!$xmlFilePath && !$reader)\n throw new \\Exception(\"You must specify either the path to the file or a link to the reader of the XML file!\");\n\n if (!$reader && !is_file($xmlFilePath))\n throw new \\Exception(\"XML file {{$xmlFilePath}} not exists!\");\n\n $this->reader = $reader ?: new \\XMLReader();\n if(!$reader)\n $this->reader->open($xmlFilePath, null, LIBXML_COMPACT | LIBXML_PARSEHUGE);\n\n $this->init();\n }", "title": "" }, { "docid": "e2a6866b551ae652fd659db295892c6f", "score": "0.4706258", "text": "public function __construct(Loader $loader, $ref)\n {\n $this->ref = $ref;\n $this->loader = $loader;\n }", "title": "" }, { "docid": "d3fd7d16d2057ac8ec8e3c375fc40d2c", "score": "0.47016898", "text": "public function __construct($resource, $query = null)\n {\n // Ensure you call the parent constructor\n parent::__construct($resource);\n $this->resource = $resource;\n $this->query = $query;\n }", "title": "" }, { "docid": "a5464e8d4dddb309c50bb70b03823c7c", "score": "0.4696319", "text": "public function __construct($filename);", "title": "" }, { "docid": "9258ef9d9383b272457e36282e3bbb66", "score": "0.4688079", "text": "private function getResourceObject()\n {\n return new Resource(\n new ResourceType('match', 'Matches'),\n new Season(\n '1516',\n '2015 - 2016',\n new \\DateTime('July 1 2015'),\n new \\DateTime('June 30 2016')\n ),\n new Level('prov', 'Provincial'),\n new Province('bra', 'Brabant'),\n 'http://domain.ext/url.csv'\n );\n }", "title": "" }, { "docid": "7b1f67b61e47183528287b215c9f4469", "score": "0.468506", "text": "public function __construct($path = null, $filename = self::DefaultXmlFile)\n {\n if ($path == null)\n {\n $path = dirname(dirname(__FILE__)) . \"/Data/\";\n }\n \n $file = $path . $filename;\n \n $this->SetFile($file);\n $this->ParseXml();\n }", "title": "" }, { "docid": "f92354eb54b9e30516e150a1e4fa76be", "score": "0.46848896", "text": "public function __construct($xmlfile)\n\t{\n\t\t$this->log = LO_ErrorLog::instance();\n\n\t\ttry\n\t\t{\n\t\t\tif (!extension_loaded('SimpleXML'))\n\t\t\t{\n\t\t\t\tthrow new Exception(\"The SimpleXML Extension is not loaded.\");\n\t\t\t}\n\n\t\t\tlibxml_use_internal_errors(true);\n\n\t\t\t// if we have the address of an xml file\n\t\t\tif (getExtension($xmlfile) == 'xml')\n\t\t\t{\n\t\t\t\t// if we have the url of an external xml file\n\t\t\t\tif (substr($xmlfile, 0, 7) == 'http://')\n\t\t\t\t{\n\t\t\t\t\t@$this->file = simplexml_load_file($xmlfile);\n\n\t\t\t\t\tif (empty($this->file) && function_exists('curl_setopt'))\n\t\t\t\t\t{\n\t\t\t\t\n\t\t\t\t\t\t$temp = AUDIOPATH . \"temp.xml\";\n\t\t\t\t\t\t$ch = curl_init($xmlfile);\n\t\t\t\t\t\t$fp = fopen($temp, \"w\");\n\t\t\t\t\t\tcurl_setopt($ch, CURLOPT_FILE, $fp);\n\t\t\t\t\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\t\t\t\t\t\tcurl_exec($ch);\n\t\t\t\t\t\tcurl_close($ch);\n\t\t\t\t\t\tfclose($fp);\n\t\t\n\t\t\t\t\t\t@$this->file = simplexml_load_file($temp);\n\t\t\t\t\t\tunlink ($temp);\n\t\t\t\t\t}\t\t\t\n\n\t\t\t\t\t$errors = libxml_get_errors();\n\t\n\t\t\t\t\tif (!empty($errors))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->log->writeArray($errors);\n\t\t\t\t\t\tthrow new Exception (\"There are errors in the XML file $xmlfile.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// if we have the internal address of the file\n\t\t\t\telseif (file_exists($xmlfile))\n\t\t\t\t{\n\n\t\t\t\t\t$this->file = simplexml_load_file($xmlfile);\n\n\t\t\t\t\tif (!$this->file)\n\t\t\t\t\t{\n\t\t\t\t\t\t$errors = libxml_get_errors();\n\t\t\t\t\t\t$this->log->writeArray($errors);\n\t\t\t\t\t\tthrow new Exception (\"There are errors in the XML file $xmlfile\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->xmlPath = $xmlfile;\n\n\t\t\t}\n\t\t\t\n\t\t\telse // perhaps we have xml as a string\n\t\t\t{\n\t\t\t\t@$this->file = simplexml_load_string($xmlfile);\n\n\t\t\t\tif (!$this->file)\n\t\t\t\t{\n\t\t\t\t\t$errors = libxml_get_errors();\n\t\t\t\t\t$this->log->writeArray($errors);\n\t\t\t\t\tthrow new Exception (\"There are errors in the XML file.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$class = get_class($this);\n\t\t\t$this->log->write(\"Cannot create object of class $class. \" . $e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "7612725263cc35dc76f6e6845e7ab8ac", "score": "0.46835202", "text": "public function getResource();", "title": "" }, { "docid": "7612725263cc35dc76f6e6845e7ab8ac", "score": "0.46835202", "text": "public function getResource();", "title": "" }, { "docid": "7612725263cc35dc76f6e6845e7ab8ac", "score": "0.46835202", "text": "public function getResource();", "title": "" }, { "docid": "7612725263cc35dc76f6e6845e7ab8ac", "score": "0.46835202", "text": "public function getResource();", "title": "" }, { "docid": "7612725263cc35dc76f6e6845e7ab8ac", "score": "0.46835202", "text": "public function getResource();", "title": "" }, { "docid": "84818f2b3dc44d328750eb8fd563ceb1", "score": "0.46783432", "text": "public function __construct($strFilename) {\r\n $path = dirname($strFilename);\r\n $this->_tempFileName = $path.DIRECTORY_SEPARATOR.time().'.docx';\r\n\r\n copy($strFilename, $this->_tempFileName); // Copy the source File to the temp File\r\n\r\n $this->_objZip = new ZipArchive();\r\n $this->_objZip->open($this->_tempFileName);\r\n\r\n $this->_documentXML = $this->_objZip->getFromName('word/document.xml');\r\n $this->_styleXML = $this->_objZip->getFromName('word/styles.xml');\r\n }", "title": "" }, { "docid": "27d4900bf34838ce990b6d5335a99fa1", "score": "0.46779442", "text": "public function __construct ($filename)\n\t{\n\t\tif (! file_exists($filename)) \n\t\t{\n\t\t\t$this->fileExists = false;\n\t\t}\n\n\t\t$this->filename = $filename;\n\t}", "title": "" }, { "docid": "af666119f0d3bee372d404dc3e62e1a5", "score": "0.46775782", "text": "public function __construct($sourceFilename, $targetFilename = null, $minimizeSource = true)\n {\n $this->_sourceFilename = $sourceFilename;\n $this->_targetFilename = $targetFilename;\n $this->_minimizeSource = $minimizeSource;\n }", "title": "" }, { "docid": "37b0b977dd676a0c2ed470d741f92cf8", "score": "0.46744886", "text": "public function __construct(){\n $this->config = new LexerConfig();\n $this->lexer = new Lexer($this->config);\n $this->interpreter = new Interpreter();\n $this->csv_file = storage_path('csv').'/leads.csv';\n }", "title": "" }, { "docid": "8b1c3885ef95cd96a5e621224a94fd2b", "score": "0.467215", "text": "private function _initFromResource($resource) {\n $this->_original = $this->_image = $resource; //copy image resource in case of reload\n $this->_source = $resource;\n $this->_isFile = false;\n $this->name = 'resource';\n $this->mime = 'image/png';\n return true;\n }", "title": "" }, { "docid": "5c0b76144271e52e90ff08cf704d3c28", "score": "0.46708962", "text": "public function __construct($bits = 20, $resource = '') {\n $this->setBits($bits);\n $this->setDate(date(self::DATE_FORMATYMD));\n $this->setResource($resource);\n $this->setExpiration(self::MINT_EXPIRATION);\n $this->setMintAttemptsMax(self::MINT_ATTEMPTS_MAX);\n }", "title": "" }, { "docid": "6d3d0c85b9fc4a7b2a845d0dc3327af8", "score": "0.46666333", "text": "function __construct($filename = \"\") {\n $this->filename = $filename;\n $this->open();\n }", "title": "" }, { "docid": "0585a04d4f941eb44b37d1a110a984e3", "score": "0.46591258", "text": "function generate_resource (): Resource\r\n {\r\n $resourceDirpath = VResource::REPO_DIRPATH . '/' . $this->requestURI;\r\n\r\n try {\r\n /* trying to load the resource */\r\n $Resource = ResourceFactory::create_resource_from_repo($resourceDirpath);\r\n\r\n /* specific processing */\r\n if ($Resource->type === ResourceType::REST) {\r\n $Resource->set_Request($this);\r\n }\r\n\r\n } catch (ResourceException $e) {\r\n\r\n switch ($e->getCode()) {\r\n\r\n case ResourceException::INTEGRITY_COMPROMISED:\r\n $Resource = ResourceFactory::create_resource_from_repo(VResource::REPO_DIRPATH . '/404');\r\n /* 404 page not found fall back */\r\n break;\r\n\r\n default:\r\n throw new Exception($e->getMessage(), $e->getCode(), $e->getPrevious());\r\n }\r\n }\r\n\r\n\r\n return $Resource;\r\n }", "title": "" }, { "docid": "3d79418040a9b117cad0e4708d50447d", "score": "0.4656801", "text": "public function __construct($file)\n\t{\n\t\tif (file_exists($file)) {\n\t\t\t$this->_file = $file;\n\t\t\t$this->load();\n\t\t} else {\n\t\t\tthrow new Exception('File doesn\\'t exist');\n\t\t}\n\t}", "title": "" }, { "docid": "d693945ead26036f1d200b780ddd0b22", "score": "0.46551824", "text": "public function serializeToResource($postData) {\n\n $this->resource = new \\snac\\data\\Resource();\n\n foreach ($postData[\"resources\"] as $k => $data) {\n $this->resource->setID($data[\"id\"]);\n $this->resource->setVersion($data[\"version\"]);\n $this->resource->setOperation($data[\"operation\"]);\n $this->resource->setTitle($data[\"title\"]);\n $this->resource->setAbstract($data[\"abstract\"]);\n $this->resource->setExtent($data[\"extent\"]);\n $this->resource->setDate($data[\"date\"]);\n $this->resource->setDisplayEntry($data[\"displayEntry\"]);\n $this->resource->setLink($data[\"link\"]);\n\n $this->resource->setDocumentType($this->parseTerm($data[\"documentType\"]));\n\n if (isset($data[\"repo\"]) && $data[\"repo\"] !== null) {\n $repo = new \\snac\\data\\Constellation();\n $repo->setID($data[\"repo\"]);\n $this->resource->setRepository($repo);\n }\n\n // Not currently using originationName\n if (isset($data[\"originationName\"])) {\n foreach ($data[\"originationName\"] as $l => $oData) {\n $part = new \\snac\\data\\OriginationName();\n $part->setID($oData[\"id\"]);\n $part->setVersion($oData[\"version\"]);\n if ($oData[\"operation\"] == \"insert\" || $oData[\"operation\"] == \"delete\")\n $part->setOperation($this->getOperation($oData));\n else {\n $oData[\"operation\"] = $this->getOperation($data);\n $part->setOperation($this->getOperation($data));\n }\n\n $part->setName($oData[\"name\"]);\n\n $this->resource->addOriginationName($part);\n }\n }\n\n if (isset($data[\"languages\"])) {\n foreach ($data[\"languages\"] as $languages => $language) {\n $newLanguage = new \\snac\\data\\Language();\n $lang = new \\snac\\data\\Term();\n $script = new \\snac\\data\\Term();\n\n if (isset($language['id']))\n $newLanguage->setID($language[\"id\"]);\n if (isset($language['version']))\n $newLanguage->setVersion($language[\"version\"]);\n\n $newLanguage->setOperation($language[\"operation\"]);\n\n if (!empty($language[\"language\"]) || (!empty($language[\"script\"]))) {\n if (isset($language[\"language\"]))\n $lang->setID($language[\"language\"]);\n $newLanguage->setLanguage($lang);\n\n if (isset($language[\"script\"]))\n $script->setID($language[\"script\"]);\n $newLanguage->setScript($script);\n $this->resource->addLanguage($newLanguage);\n }\n }\n }\n }\n\n return $this->resource;\n }", "title": "" }, { "docid": "547666a1e2683a228b05370584c8c2c1", "score": "0.4645518", "text": "public function __construct(\\stdClass $di)\r\n {\r\n $this->path \t\t= dirname(dirname(__FILE__));\r\n \t// assign class variables\r\n \t$this->ErrorLog \t\t= $di->ErrorLog;\r\n \t$this->View\t\t\t\t= $di->View;\r\n \t$this->Session = $di->Session;\r\n \t$this->Lang\t\t\t\t= $di->View->Lang;\r\n \t\r\n \t// Get the current language loaded\r\n \t$currentLang = $this->View->Lang->LangLoaded;\r\n \t\r\n \t$this->Overwrite = $this->getBackTplOverwrite();\r\n\r\n \t// Add module language files to language array\r\n \t$this->View->Lang->addLanguageFile($this->path.'/lang/'.$currentLang);\r\n\r\n \t// create module data model instance\r\n \t\r\n \t$this->Data\t= new Db($di);\r\n \t$this->Mail\t= new Mail($di);\r\n \t$this->Data->setMailInstance($this->Mail);\r\n }", "title": "" }, { "docid": "a891dac5397a32da8d4937b0c0691de3", "score": "0.4645466", "text": "public function __construct() {\n\t\t$this->l10n = new L10n ();\n\t}", "title": "" }, { "docid": "a460013a4ab6f2452fcfb94024a6bdd2", "score": "0.4637927", "text": "public function __construct()\n {\n\n $this->loadLexer();\n $this->loadSst();\n $this->loadRegistry();\n\n }", "title": "" }, { "docid": "95b74ee828ba6cb1395d8a197d494ec7", "score": "0.46374395", "text": "public function getInstance(string $path): Resource;", "title": "" }, { "docid": "a51e07883ef6130dc607848fa99cf588", "score": "0.46346238", "text": "public function __construct()\n {\n $locale = config('app.locale') ?? 'en';\n\n $this->file = lang_path($locale.'_request_translation.php');\n }", "title": "" }, { "docid": "e764a540bdd414da14bba14b7a07c081", "score": "0.46309683", "text": "public function __construct()\n {\n $data = Ensure::Input(func_get_args());\n parent::_init($data, new DependsResource(\n array(\n array( \"term\" => \"account\", \"plural\" => false))\n ),\n new LoadsResource(\n array(\"primary\" => \"GET\", \"id\" => \"id\", \"init\" => \"id\", \"silent\" => false)\n ),\n new SchemaResource(\n array(\"fields\" => array(\"id\", \"time\", \"units\", \"type\", \"amount\", \"productType\"), \n \"needs\" => array(\"id\"))\n )\n );\n }", "title": "" }, { "docid": "240f06df65f103397bcb514ac686be82", "score": "0.4628222", "text": "protected function _construct()\n {\n $this->_init('onsale/rule', 'rule_id');\n }", "title": "" }, { "docid": "c28bf80999d1d3a84dcc056f9bda67bf", "score": "0.46277025", "text": "private function setResourceFromArray(array $input): void\n {\n $this->resource = is_null($resource = ArrayAccess::getString($input, 'resource'))\n ? new Resource()\n : new Resource($resource);\n }", "title": "" }, { "docid": "810b5714ab61f9a9ebea716339db5926", "score": "0.4613556", "text": "protected function createResourceManager()\n {\n // TODO: Implement createResourceManager() method.\n }", "title": "" }, { "docid": "74ac037ef5bb031792fd0abb129cdf0b", "score": "0.46065357", "text": "public function createResource()\n {\n $this->call('make:resource', [\n 'name' => $this->singular() . \"Resource\",\n ]);\n }", "title": "" }, { "docid": "9101035efa9ecec8cc41c4cbfb744315", "score": "0.46044797", "text": "protected function __construct() {\n\t\t$ly = &$this; //TODO: Don't pass by reference\n\t\trequire(LYDIGAMVC_SITE_PATH . '/config.php');\n\t}", "title": "" }, { "docid": "f0d702ca855b7abf0dc9e59fde3d58f3", "score": "0.46030584", "text": "protected function _construct()\n {\n $this->_init(\n\t\t\t\\Jc\\Blog\\Model\\Post::class,\n\t\t\t\\Jc\\Blog\\Model\\ResourceModel\\Post::class \n\t\t);\n }", "title": "" }, { "docid": "a947b4068f745557cac10ab5ac6997ee", "score": "0.4601881", "text": "public function __construct()\n {\n\n // Load components required by this gateway\n Loader::loadComponents($this, ['Input', 'Json']);\n\n // Load the language required by this gateway\n Language::loadLang('yandex', null, dirname(__FILE__) . DS . 'language' . DS);\n }", "title": "" }, { "docid": "20c2f77118351794851c3b19b78a9293", "score": "0.45988795", "text": "function __construct($inputFileName)\n {\n $this->logger = new Logger(NULL);\n $this->inputFileName = $inputFileName;\n }", "title": "" }, { "docid": "b1c1f97b8b3c5a11afc3d30bb6f09eba", "score": "0.45983455", "text": "public function __construct(Loader $loader, string $locale)\n\t{\n\t\t$this->loader = $loader;\n\t\t$this->locale = $locale;\n\t}", "title": "" }, { "docid": "97d8b7715a12d282d95bf1ff7331e4a7", "score": "0.45974317", "text": "public function __construct()\n {\n global $DB, $DSP, $FNS, $IN, $LANG, $LOC, $REGX, $SESS, $TMPL;\n\n $this->_DB = $DB;\n $this->_DSP = $DSP;\n $this->_FNS = $FNS;\n $this->_IN = $IN;\n $this->_LANG = $LANG;\n $this->_LOC = $LOC;\n $this->_REGX = $REGX;\n $this->_SESS = $SESS;\n $this->_TMPL = $TMPL;\n\n $this->_curl = FALSE;\n $this->init();\n }", "title": "" }, { "docid": "360d14e9a6ec31bf3902a22fe81f92d9", "score": "0.45960438", "text": "public function __construct()\n\t{\n\t\tif(!file_exists(DCFile))\n\t\t{\n\t\t\t$this->processDefaultContent();\n\t\t}\n\t}", "title": "" }, { "docid": "16e6da9f93b52b48088a405938c0b550", "score": "0.45946854", "text": "public function __construct($path, $file = 'now.json')\n {\n $this->filePath = $this->getFilePath($path, $file);\n $this->loader = new Loader($this->filePath, true);\n }", "title": "" }, { "docid": "cb27d135a5f1b7e019a53ecb5700452a", "score": "0.45849133", "text": "public function __construct($importXml = null)\n {\n if (! is_null($importXml)) {\n $this->loadImport($importXml);\n }\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "e17b1d2ee3eaa682cbd226ad62da9f27", "score": "0.0", "text": "public function index()\n {\n return Ei::all();\n }", "title": "" } ]
[ { "docid": "d4a0ecd8566af1bfd9231147ca1e458f", "score": "0.7474345", "text": "public function list()\n {\n try {\n $result = $this->get_all();\n $this->response($result);\n } catch (Exception $e) {\n $this->response(array(\n \"message\" => $e->getMessage()\n ), ERROR_CODE);\n }\n }", "title": "" }, { "docid": "6126929dc3b0a4f22ee22cc3ad8d6a7b", "score": "0.742424", "text": "public function index() \n\t{ \n\t\t$this->listing();\t\n\t}", "title": "" }, { "docid": "4c31098007bd884125e38a924a90b409", "score": "0.7370675", "text": "public function index()\n {\n $resources = Resource::paginate(10);\n return view('admin.resource.index', [\n 'resources' => $resources\n ]);\n }", "title": "" }, { "docid": "8fa6c385e83466b77bd15a6b86ea32e2", "score": "0.7304379", "text": "public function index()\n {\n $this->_create_list();\n $this->_display();\n\n }", "title": "" }, { "docid": "dd0281461ff38e01dc7daaf263a98684", "score": "0.72688746", "text": "function index() {\n $this->getList();\n }", "title": "" }, { "docid": "0e6388aacce7838ee1c78178d8108829", "score": "0.7267135", "text": "public function index(){\n\t\t\t$this->list();\n\t\t}", "title": "" }, { "docid": "90f60a2d2b3c2500e55bda8c3ba362da", "score": "0.71897656", "text": "public function index()\n {\n $resources = $this->resourceRepository->all();\n\n return $this->sendResponse($resources->toArray(), \"Resources retrieved successfully\");\n }", "title": "" }, { "docid": "9af36ef65a801a9d1ba3b391202f1180", "score": "0.7119231", "text": "public function index()\n {\n $resources = Resource::orderBy('id', 'desc')->paginate(20);\n return view('resource.index')->withResources($resources);\n }", "title": "" }, { "docid": "43a0ac0c5c36c0a0b193022ebde4ce89", "score": "0.7083264", "text": "public function index()\n {\n $config['tableName'] = trans('app.Resources list');\n $config['ignore'] = ['id', 'count', 'created_at', 'updated_at', 'deleted_at'];\n $config['list'] = MBResources::get()->toArray();\n $config['delete'] = 'app.resources.destroy';\n return view('admin.adminList',$config);\n }", "title": "" }, { "docid": "19fc4ced7c3387dd13afa92c5a8afae5", "score": "0.7055708", "text": "public function do_list()\r\n\t{\r\n\t\t$sorter = array(\r\n\t\t\t'name' => \"sorter\",\r\n\t\t\t'default' => 'name ASC',\r\n\t\t\t'options' => array(\r\n\t\t\t\t\"name ASC\" => \"Name\",\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\t$result = $this->model->get_records(array(\r\n\t\t\t'conditionset' => array(\r\n\t\t\t),\r\n\t\t\t'sorter' => $sorter,\r\n\t\t\t'limit' => 10\r\n\t\t\t));\r\n\r\n\t\tinclude($this->get_path(self::ACTION_TYPE_LIST));\r\n\t}", "title": "" }, { "docid": "1855faa3b08cf438cac0964b9903bf8a", "score": "0.7014775", "text": "public function index()\n {\n $this->getListingService()\n ->setOrder($this->getOrder())\n ->setPagination($this->getPagination())\n ->getFilters()->add($this->getSearchFilter());\n $this->set(\n [\n $this->getEntityNamePlural() => $this->getListingService()\n ->getList(),\n 'pagination' => $this->getListingService()->getPagination()\n ]\n );\n }", "title": "" }, { "docid": "2e0ed72eb13150f2559131309e8f93b1", "score": "0.7001344", "text": "public function listing ()\n {\n // Fetch all questions\n $cacheID = 'listing';\n if (!$this->data['questions'] = $this->zf_cache->load($cacheID)) {\n $this->data['questions'] = $this->question_model->get_with_users();\n $this->zf_cache->save($this->data['questions'], $cacheID, array('all_questions'));\n }\n \n // Load view\n $this->load_view('questions/listing');\n }", "title": "" }, { "docid": "03aab1a3d0f29df3c9c01f676da4d986", "score": "0.69908047", "text": "public function index()\n\t{\n\t\t$this->listing('recent');\n\t}", "title": "" }, { "docid": "c93e1e2d6b3b2e51a961fef1bdfbb734", "score": "0.69853497", "text": "public function index()\n {\n //\n $pagesize = 20;\n $query = DataResource::orderBy('listorder','desc');\n $list = $query->paginate($pagesize);\n return view('admin.resources',['data'=>$list,'url'=>$this->url]);\n }", "title": "" }, { "docid": "18cd5639adcca5b283e7352aa46af4de", "score": "0.69587684", "text": "public function index()\n {\n $this->userCollectListing('0', 'ALL');\n }", "title": "" }, { "docid": "e31e9a0c7b3d2a9b4bc1a2880b844a81", "score": "0.6921471", "text": "public function indexAction()\n {\n $resource = $this->repo->all();\n if (!$resource) {\n return $this->errorNotFound('Resource not found');\n }\n return $this->apiOk($resource);\n }", "title": "" }, { "docid": "eed18db8f9e2d6b6fa328a727bce13ea", "score": "0.6884484", "text": "public function listingAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SettingContentBundle:Page')->findBy(array(),array('name' => 'asc'));\n\n return $this->render('SettingContentBundle:Page:index.html.twig', array(\n 'pagination' => $entities,\n ));\n }", "title": "" }, { "docid": "a753301d8fa92e6902db5a211f69a62a", "score": "0.6880599", "text": "public function indexAction()\n {\n if($categoryId = $this->request->getQuery('categoryId')){\n $resource = $this->repo->all($categoryId);\n }else {\n $resource = $this->repo->all();\n }\n if (!$resource) {\n return $this->errorNotFound('Resource not found');\n }\n return $this->apiOk($resource);\n }", "title": "" }, { "docid": "22231d816d7e2f1e58fb69799b2104dc", "score": "0.68639404", "text": "public function index()\n {\n $resources = Resource::all();\n\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "060b373609f7e0db718e407076c66e1d", "score": "0.68629915", "text": "public function indexAction()\n {\n $this->tag->setTitle(__('Firewalls'));\n // Available sort to choose\n $this->filter->add('in_array', function($value) {\n return in_array($value, ['name', 'name DESC', 'status', 'status DESC']) ? $value : null;\n });\n\n // Get networks and prepare pagination\n $paginator = new Paginator([\n \"data\" => Firewalls::find(['order' => $this->request->getQuery('order', 'in_array', 'id', true)]),\n \"limit\" => $this->request->getQuery('limit', 'int', 20, true),\n \"page\" => $this->request->getQuery('page', 'int', 1, true)\n ]);\n\n $this->view->setVars([\n 'pagination' => $paginator->getPaginate(),\n ]);\n }", "title": "" }, { "docid": "06987da1b6d89d3d1c996205e8a37e46", "score": "0.6860631", "text": "public function index()\n {\n //$records = Category::paginate();\n $records = Category::all();\n //return CategoryResource::collection($records);\n return $this->showAll($records);\n }", "title": "" }, { "docid": "0473d264241dfecb205046df754f7ad1", "score": "0.6856284", "text": "public function index() {\n $resources = static::$resource::orderBy(static::$orderBy)->paginate(static::$pageSize);\n return view($this->getView('index'), [static::$varName[1] ?? $this->getResourcePluralName() => $resources]);\n }", "title": "" }, { "docid": "ac3d7b3949ed4508eaeabfca96b1ae5e", "score": "0.6819477", "text": "protected function listAction()\n {\n $this->dispatch(EasyAdminEvents::PRE_LIST);\n\n $extFilters = $this->request->query->get('ext_filters');\n if(isset($extFilters['entity.gallery'])) {\n $dql = 'entity.gallery = ' . $extFilters['entity.gallery'];\n $this->entity['list']['dql_filter'] = $dql;\n }\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": "e4a0d12ede1642140b2b2864bea7bde8", "score": "0.6817071", "text": "public function show_list();", "title": "" }, { "docid": "a63fe3d362e9ed8bdeb8c498c0f70dc8", "score": "0.68072224", "text": "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n //dump($todos);\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "title": "" }, { "docid": "8e473fb8d57781fcbb301d794e4638b7", "score": "0.68054026", "text": "public function listResources();", "title": "" }, { "docid": "ae6ac1129584c76c474a8718bca91c33", "score": "0.6780087", "text": "public function ListView() {\n $this->Render();\n }", "title": "" }, { "docid": "e33620f9e0602f70ef6cab4f1bdb2610", "score": "0.67710763", "text": "public function index()\n\t{\n\t\t$this->listar();\n\t}", "title": "" }, { "docid": "1791d7d351176ff2ce62051654642a7d", "score": "0.6743463", "text": "public function indexAction()\n {\n $this->render('lists/index', array(\n 'title' => 'Todo Lists',\n 'lists' => TodoList::all()\n ));\n }", "title": "" }, { "docid": "a62c8fb3c6a39b17143e4f99a44215eb", "score": "0.674278", "text": "public function index()\n {\n // Get Products\n $products = Product::paginate(15);\n\n // Return collection of products as a resource\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "3cb20d494ffa4e3923d82dc428173efe", "score": "0.67425853", "text": "public function listAction()\n {\n $date = array();\n $date['year'] = $this->_getParam('year', null);\n $date['month'] = $this->_getParam('month', null);\n $date['day'] = $this->_getParam('day', null);\n\n $model = $this->_getPhotoModel();\n\n $by = $this->_getParam('by', null);\n if ($by == 'taken_at') {\n $entries = $model->fetchEntriesByTakenAt($date, $this->_getParam('page', 1));\n } else {\n $entries = $model->fetchEntriesByCreated($date, $this->_getParam('page', 1));\n }\n $this->view->paginator = $entries;\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": "f1af362b177db60f1aa234951fb3dd26", "score": "0.67406327", "text": "public function listAction()\r\n {\r\n\r\n return array(\r\n 'items' => $this->getMapper()->findAll()\r\n );\r\n }", "title": "" }, { "docid": "1ad218b37000705f13503d05f42e31f8", "score": "0.6729927", "text": "public function listing(){\n //appelle constructeur produit\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "e875f9f43f0899fd4868233dc7733127", "score": "0.67253584", "text": "public function index()\n {\n //\n $loan = Loan::all();\n return LoanResource::collection($loan);\n }", "title": "" }, { "docid": "8bc383be0c0551987008cc1e903dfb3e", "score": "0.6717295", "text": "function listing(){ \n $data['title'] = 'Senarai Selenggaraan';\n $this->_render_page($data);\n }", "title": "" }, { "docid": "d5baeaa346c5c7d82493b224630a04fd", "score": "0.6693349", "text": "public function list()\n {\n return view('list', [\n 'component' => 'data-list',\n 'title' => 'Assets',\n 'create_url' => 'assets/create',\n 'count' => Asset::count(),\n 'columns' => [\n 'Path' => 'path',\n ],\n 'rows' => Asset::paginate(10)\n ]);\n }", "title": "" }, { "docid": "ec97d24c4e19a5128b0e53c5846b9bf5", "score": "0.669244", "text": "public function index()\n {\n return $this->getList();\n\n }", "title": "" }, { "docid": "ff020d8354464758e72e91a912f20d8e", "score": "0.66923076", "text": "public function actionList()\n {\n $list = $this->viewList('car');\n $imgs = ImageModel::load('img/car/logo/');\n return $this->render('list',compact('list','imgs'));\n }", "title": "" }, { "docid": "7ee6025c5609ac52b9b1dbb4db5ac2f3", "score": "0.6686426", "text": "public function index()\n\t{\n\t\tlist_details();\n\t}", "title": "" }, { "docid": "350cb7824776140ada3444d8b63c2b9a", "score": "0.66861296", "text": "public function actionList() {\n \n $allartists = array();\n $allartists = Artist::getArtistList();\n $role = Role::getRoles();\n \n require_once(ROOT . '/views/lists/artistlist.php');\n }", "title": "" }, { "docid": "ffb17c08a85c1385b784beb46e5b3ade", "score": "0.66860104", "text": "public function index()\n {\n $artists = Artist::orderBy('sort', 'asc')->get();\n\n return ArtistResource::collection($artists);\n }", "title": "" }, { "docid": "10a81357fb2912f13e91cd4d9b24c4d0", "score": "0.66837037", "text": "public function listAction()\n {\n $contentObject = $this->configurationManager->getContentObject();\n $header = $contentObject->data['header'];\n\n $this->view->assign('header', $header);\n $this->view->assign('plays', $this->playRepository->findAll());\n }", "title": "" }, { "docid": "e499e3e7f1a366ffebb6385468f3a0c5", "score": "0.6677873", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $lists = $em->getRepository('HunterBundle:Lists')->findAll();\n\n return $this->render('lists/index.html.twig', array(\n 'lists' => $lists,\n ));\n }", "title": "" }, { "docid": "b4ab065b5e289a80de47b28c29b12ba7", "score": "0.6668575", "text": "public function index()\n {\n /* authorization */\n $this->authorize('viewAny', Family::class);\n\n $families = Family::all();\n /* return resource collection */\n return FamilyResource::collection($families);\n }", "title": "" }, { "docid": "fc34d7bf0a8503064964866cc73ae555", "score": "0.66639954", "text": "function action_ResourceList()\n {\n\n $this->view = 'ResourceList';\n }", "title": "" }, { "docid": "91774d2a4f88a022706d4cc72b2fb4b9", "score": "0.66636354", "text": "public function _index() {\n\t\t$datas = DAO::getAll ( $this->model );\n\t\techo $this->_getResponseFormatter ()->get ( $datas );\n\t}", "title": "" }, { "docid": "473597c1b0826e1810587ecd7042a12d", "score": "0.6660131", "text": "public function actionIndex()\n {\n $searchModel = new ResourcemanagementSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "68a18d7d7744ddf6d10c85166d9a9672", "score": "0.6658018", "text": "public function listing($arguments);", "title": "" }, { "docid": "3768e67b371a22f226e966a98bb745f7", "score": "0.6653828", "text": "public static function list()\n {\n $data = [];\n $data[\"products\"] = DefaultModel::getProducts();\n\n View::createRoot(\"product-list\", $data)->render();\n }", "title": "" }, { "docid": "f186543d4e229fe60c320d197652a0ac", "score": "0.6648046", "text": "public function index()\n {\n return BookResource::collection(Book::paginate());\n }", "title": "" }, { "docid": "7fe029aedf53dcfabf4dbd68136e211f", "score": "0.6647669", "text": "public function index()\n {\n $items = Item::all();\n return ItemResource::Collection($items);\n }", "title": "" }, { "docid": "6e0e97799dea5e1f1424a0ed54835cae", "score": "0.6646619", "text": "public function index()\n {\n $products = Product::paginate();\n\t\treturn new ListCollection($products);\n }", "title": "" }, { "docid": "12d65a6c55f0fff8b933565f6365be6c", "score": "0.6637915", "text": "public function index() {\n return $this->showAll();\n }", "title": "" }, { "docid": "862f0847ab763608409837b536150716", "score": "0.66368043", "text": "public function indexAction()\r\n\t{\r\n\t\t$this->view->mainTitle = \"Listado de Plantillas\";\r\n\t\t$this->view->errors = $this->_helper->flashMessenger->getMessages();\r\n\t\t\r\n\t\t$nombre = $this->getParam(\"nombre\");\r\n\t\t$plantillas = $this->getRepository()->find($nombre);\r\n\t\t\r\n\t\t$this->view->plantillas = $plantillas;\r\n\t}", "title": "" }, { "docid": "a3074d45fbccf32cdbe6810d56d21449", "score": "0.6627834", "text": "public function listAction()\n {\n $this->service->setPaginatorOptions($this->getAppSetting('paginator'));\n $page = (int) $this->param($this->view->translate('page'), 1);\n $projects =$this->service->retrieveAllInvestmentProjects($page);\n $this->view->projects = $projects;\n $this->view->paginator = $this->service->getPaginator($page);\n $this->view->role = Zend_Auth::getInstance()->getIdentity()->roleName;\n }", "title": "" }, { "docid": "39fb2eb38215d01e980796dd191b4bc2", "score": "0.6624286", "text": "public function index()\n {\n // needs to return multiple articles\n // so we use the collection method\n return ArticleListResource::collection(Article::all());\n }", "title": "" }, { "docid": "77b2fcb12774bae3c68bc3f546be203d", "score": "0.6624218", "text": "public function list ()\n {\n $products = Product::all();\n\n View::load('home', [\n 'products' => $products\n ]);\n\n }", "title": "" }, { "docid": "7eb3e9d73404c31d887de34e0e543165", "score": "0.66194737", "text": "public function index()\n {\n $streams = Streams::paginate(15);\n\n return StreamsResource::collection($streams);\n }", "title": "" }, { "docid": "c5562ea22267c67b7e362d148ab229b0", "score": "0.6613858", "text": "public function index ()\n {\n $data = Category::paginate(15);\n\n return $this->display( [ 'data' => $data ] );\n }", "title": "" }, { "docid": "a10012db405ad2f58017047d7c5955a3", "score": "0.66135347", "text": "public function index()\n {\n // get articles\n $articles = Article::paginate(15);\n\n // return collection of articles as a ressource\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "4e546e7736c944aa032aaf9b866565c0", "score": "0.66128606", "text": "public function indexAction() {\n\t\t$this->view->assign('staticLists', $this->staticListService->listAll());\n\t}", "title": "" }, { "docid": "2d2195ebc523704e7f178bd9b4556f73", "score": "0.66104424", "text": "public function index()\n\t{\n\t\t//\n\t\t$resources = \\App\\Resource::with('category')->get();\n\t\treturn view('viewResource',['resources' => $resources ]);\n\t}", "title": "" }, { "docid": "a14d9338522a9ff2dff64321e93eddd2", "score": "0.6606226", "text": "public function listAction() {\n\t\t\t$this->view->assign('tags', $this->tagRepository->findAll());\n\t\t}", "title": "" }, { "docid": "8654188b350eeb0d720961a0f868517e", "score": "0.6602947", "text": "public function indexAction() {\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n\n\t\t//GET SUBJECT AND OTHER SETTINGS\n $this->view->list = Engine_Api::_()->core()->getSubject('list_listing');\n\t\t$settings_api = Engine_Api::_()->getApi('settings', 'core');\n\t\t$this->view->show_featured = $settings_api->getSetting('list.feature.image', 1);\n\t\t$this->view->featured_color = $settings_api->getSetting('list.featured.color', '#0cf523');\n\t\t$this->view->show_sponsered = $settings_api->getSetting('list.sponsored.image', 1);\n\t\t$this->view->sponsored_color = $settings_api->getSetting('list.sponsored.color', '#fc0505');\n\t\t\n //GET VIEWER AND CHECK VIEWER CAN EDIT PHOTO OR NOT\n $viewer = Engine_Api::_()->user()->getViewer();\n\t\t$this->view->can_edit = $this->view->list->authorization()->isAllowed($viewer, \"edit\");\n }", "title": "" }, { "docid": "1fe94a4f4bf96984fb89ede920f77850", "score": "0.6602104", "text": "public function index()\n {\n \t$listings = Listing::orderBy( 'created_at', 'desc' )->get();\n return view( '/listings',compact( 'listings' ) );\n }", "title": "" }, { "docid": "c6630fa3ab4d194924045c2530a6eaf3", "score": "0.6595211", "text": "public function listAction()\n {\n $model = $this->_owApp->selectedModel;\n $translate = $this->_owApp->translate;\n $store = $this->_erfurt->getStore();\n $resource = $this->_owApp->selectedResource;\n $ac = $this->_erfurt->getAc();\n $params = $this->_request->getParams();\n $limit = 20;\n\n $rUriEncoded = urlencode((string)$resource);\n $mUriEncoded = urlencode((string)$model);\n $feedUrl = $this->_config->urlBase . \"history/feed?r=$rUriEncoded&mUriEncoded\";\n\n $this->view->headLink()->setAlternate($feedUrl, 'application/atom+xml', 'History Feed');\n\n // redirecting to home if no model/resource is selected\n if (\n empty($model) ||\n (\n empty($this->_owApp->selectedResource) &&\n empty($params['r']) &&\n $this->_owApp->lastRoute !== 'instances'\n )\n ) {\n $this->_abort('No model/resource selected.', OntoWiki_Message::ERROR);\n }\n\n // getting page (from and for paging)\n if (!empty($params['page']) && (int) $params['page'] > 0) {\n $page = (int) $params['page'];\n } else {\n $page = 1;\n }\n\n // enabling versioning\n $versioning = $this->_erfurt->getVersioning();\n $versioning->setLimit($limit);\n\n if (!$versioning->isVersioningEnabled()) {\n $this->_abort('Versioning/History is currently disabled', null, false);\n }\n\n $singleResource = true;\n // setting if class or instances\n if ($this->_owApp->lastRoute === 'instances') {\n // setting default title\n $title = $resource->getTitle() ?\n $resource->getTitle() :\n OntoWiki_Utils::contractNamespace($resource->getIri());\n $windowTitle = $translate->_('Versions for elements of the list');\n\n $listHelper = Zend_Controller_Action_HelperBroker::getStaticHelper('List');\n $listName = \"instances\";\n if ($listHelper->listExists($listName)) {\n $list = $listHelper->getList($listName);\n $list->setStore($store);\n } else {\n $this->_owApp->appendMessage(\n new OntoWiki_Message('something went wrong with the list of instances', OntoWiki_Message::ERROR)\n );\n }\n\n $query = clone $list->getResourceQuery();\n $query->setLimit(0);\n $query->setOffset(0);\n //echo htmlentities($query);\n\n $results = $model->sparqlQuery($query);\n $resourceVar = $list->getResourceVar()->getName();\n\n $resources = array();\n foreach ($results as $result) {\n $resources[] = $result[$resourceVar];\n }\n //var_dump($resources);\n\n $historyArray = $versioning->getHistoryForResourceList(\n $resources,\n (string) $this->_owApp->selectedModel,\n $page\n );\n //var_dump($historyArray);\n\n $singleResource = false;\n } else {\n // setting default title\n $title = $resource->getTitle() ?\n $resource->getTitle() :\n OntoWiki_Utils::contractNamespace($resource->getIri());\n $windowTitle = sprintf($translate->_('Versions for %1$s'), $title);\n\n $historyArray = $versioning->getHistoryForResource(\n (string)$resource,\n (string)$this->_owApp->selectedModel,\n $page\n );\n }\n\n if (sizeof($historyArray) == ( $limit + 1 )) {\n $count = $page * $limit + 1;\n unset($historyArray[$limit]);\n } else {\n $count = ($page - 1) * $limit + sizeof($historyArray);\n }\n\n $idArray = array();\n $userArray = $this->_erfurt->getUsers();\n $titleHelper = new OntoWiki_Model_TitleHelper();\n // Load IDs for rollback and Username Labels for view\n foreach ($historyArray as $key => $entry) {\n $idArray[] = (int) $entry['id'];\n if (!$singleResource) {\n $historyArray[$key]['url'] = $this->_config->urlBase . \"view?r=\" . urlencode($entry['resource']);\n $titleHelper->addResource($entry['resource']);\n }\n\n if ($entry['useruri'] == $this->_erfurt->getConfig()->ac->user->anonymousUser) {\n $userArray[$entry['useruri']] = 'Anonymous';\n } else if ($entry['useruri'] == $this->_erfurt->getConfig()->ac->user->superAdmin) {\n $userArray[$entry['useruri']] = 'SuperAdmin';\n } else if (is_array($userArray[$entry['useruri']])) {\n if (isset($userArray[$entry['useruri']]['userName'])) {\n $userArray[$entry['useruri']] = $userArray[$entry['useruri']]['userName'];\n } else {\n $titleHelper->addResource($entry['useruri']);\n $userArray[$entry['useruri']] = $titleHelper->getTitle($entry['useruri']);\n }\n }\n }\n $this->view->userArray = $userArray;\n $this->view->idArray = $idArray;\n $this->view->historyArray = $historyArray;\n $this->view->singleResource = $singleResource;\n $this->view->titleHelper = $titleHelper;\n\n if (empty($historyArray)) {\n $this->_owApp->appendMessage(\n new OntoWiki_Message(\n 'No history for the selected resource(s).',\n OntoWiki_Message::INFO\n )\n );\n }\n\n if ($this->_erfurt->getAc()->isActionAllowed('Rollback')) {\n $this->view->rollbackAllowed = true;\n // adding submit button for rollback-action\n $toolbar = $this->_owApp->toolbar;\n $toolbar->appendButton(\n OntoWiki_Toolbar::SUBMIT,\n array('name' => $translate->_('Rollback changes'), 'id' => 'history-rollback')\n );\n $this->view->placeholder('main.window.toolbar')->set($toolbar);\n } else {\n $this->view->rollbackAllowed = false;\n }\n\n // paging\n $statusBar = $this->view->placeholder('main.window.statusbar');\n // the normal page_param p collides with the generic-list param p\n OntoWiki_Pager::setOptions(array('page_param'=>'page'));\n $statusBar->append(OntoWiki_Pager::get($count, $limit));\n\n // setting view variables\n $url = new OntoWiki_Url(array('controller' => 'history', 'action' => 'rollback'));\n\n $this->view->placeholder('main.window.title')->set($windowTitle);\n\n $this->view->formActionUrl = (string) $url;\n $this->view->formMethod = 'post';\n // $this->view->formName = 'instancelist';\n $this->view->formName = 'history-rollback';\n $this->view->formEncoding = 'multipart/form-data';\n }", "title": "" }, { "docid": "e16b7bcfc7e0c35a6d0ecf74b30d6a20", "score": "0.6588596", "text": "public function index()\n {\n $title = $this->title($this->modelName);\n $modelName = $this->modelName;\n $model = $this->model;\n $listStatus = $this->listStatus;\n $models = Bank::paginate(10);\n return view('bank.lists.index', compact('title', 'models', 'modelName', 'model', 'listStatus'));\n }", "title": "" }, { "docid": "c4bb31a9775a0e667ef62e4f3a23aeab", "score": "0.6563258", "text": "public function listAction() {\n $this->_datatable();\n return array();\n }", "title": "" }, { "docid": "b9b300aec37bbe88214d2c466b083d07", "score": "0.6560596", "text": "public function index()\n {\n // Obtengo los resultados\n $results = Result::all();\n\n // Lo devuelvo como un recurso\n return ResultResource::collection($results);\n }", "title": "" }, { "docid": "e840f12f97ea99ca01a90a9ec9cad7ca", "score": "0.65599096", "text": "public function index()\n {\n return BookResource::collection(Book::with('authors')->paginate(25));\n }", "title": "" }, { "docid": "19e51010afc5a8251ed229fa24e89b84", "score": "0.6555101", "text": "public function index()\n {\n $items = Item::search()->paginate(10);\n return view('item.list', compact('items'));\n }", "title": "" }, { "docid": "25bbf4f08be5c7ace0982ed3e61db475", "score": "0.6553109", "text": "public function list()\n {\n //\n }", "title": "" }, { "docid": "25bbf4f08be5c7ace0982ed3e61db475", "score": "0.6553109", "text": "public function list()\n {\n //\n }", "title": "" }, { "docid": "451b54ad54f4267a96a3c9a18faae916", "score": "0.6552225", "text": "function index()\n {\n $this->listArticles();\n }", "title": "" }, { "docid": "7335a64fbf88651c9293fc7e0bf1a4a1", "score": "0.6548072", "text": "public function getIndex()\r\n { \r\n $response = $this->modelService->getAll();\r\n //return resources listing view\r\n return view(\\OogleeBConfig::get('config.post_index.index'), compact('response'));\r\n }", "title": "" }, { "docid": "ea133c7a5d450c0580ac1c613df4b59d", "score": "0.65474623", "text": "public function index()\n {\n //Get Movies\n $movies = Movie::paginate(15);\n\n //return collection of movies as a resource\n return MovieResource::collection($movies);\n }", "title": "" }, { "docid": "83b5665a886532759f6d6fd3177eb43d", "score": "0.65461665", "text": "public function actionList()\n\t{\n\t\t$this->subLayout = \"@humhub/views/layouts/_sublayout\";\n\t\t$data = Desire::getAll(10);\n\t\t$articles = $data['articles'];\n\t\t$count = $data['count'];\n\n\n\n\t\treturn $this->render('list', [\n\t\t\t'articles' => $articles,\n\t\t\t'count' => $count,\n\t\t\t'ajaxUrl' => '/desire/desire/list-ajax?sort='.Yii::$app->request->get('sort'),\n\t\t]);\n\t}", "title": "" }, { "docid": "46a4b83443e6a7cb9ed2604a7ba376d3", "score": "0.6541433", "text": "public function viewList(): void\n {\n $model = self::fetchModel($this->request->get(self::PARAM_MODEL_NAME));\n $this->response->set(Mvc::TEMPLATE, 'manager');\n $this->response->set(Mvc::CONTEXT, $this->request->get(Mvc::CONTEXT));\n $this->response->set(Mvc::VIEW, $this->request->get(Mvc::VIEW));\n $this->response->set('config', $this->getCrudConfig($model));\n $content = FrontendHelper::parseFile('/var/www/_dev/vendor/noxkiwi/crud/frontend/view/crudfrontend/list.php');\n $this->response->set('content', $content);\n $this->response->set(self::PARAM_MODEL_NAME, $this->modelName);\n }", "title": "" }, { "docid": "bc892b43167344bb7550a0e63635634f", "score": "0.6540258", "text": "public function index()\n {\n $students = Student::all();\n return StudentResource::collection($students);\n \n }", "title": "" }, { "docid": "f0e979747234803271be38ea6cd3396e", "score": "0.65383667", "text": "public function index()\n\t{\n\t\t$categories = Category::paginate(5);\n\t\treturn CategoryResource::collection($categories);\n\t}", "title": "" }, { "docid": "e08fd6cadf8c20cad7196e73194fba35", "score": "0.65371203", "text": "public function index()\n {\n return $this->service->showAll();\n }", "title": "" }, { "docid": "2a2a07c1f7a2727a0de83a5fa87aabaa", "score": "0.65362406", "text": "public function index()\n {\n $books=Book::paginate(10);\n return BookResource::collection($books);\n }", "title": "" }, { "docid": "f852b02ada9624be17ccc6c0b233bca4", "score": "0.65288365", "text": "public function list()\n {\n }", "title": "" }, { "docid": "de74480294a1123dacaf091a018a43f7", "score": "0.6526695", "text": "public function _index(){\n\t $this->_list();\n\t}", "title": "" }, { "docid": "68de2d9bace6b0d21d880e30663096bd", "score": "0.6525593", "text": "public function index()\n {\n return response([\n 'listas' => \\App\\Http\\Resources\\ListaResource::collection(\n Lista::where('user_id', auth()->id())->get()\n ),\n 'message' => 'Listado com sucesso.'\n ], 200);\n }", "title": "" }, { "docid": "3a2bf5049606c1975209783c9d992936", "score": "0.652094", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $recipes = $em->getRepository('AppBundle:Recipe')->findAll();\n\n return $this->render('@frontend/recipe/list.html.twig', array(\n 'recipes' => $recipes\n ));\n }", "title": "" }, { "docid": "976cbb5be4594e239e987a2fbcbe8b3a", "score": "0.6513086", "text": "public function index()\n {\n return FieldResource::collection(Field::paginate());\n }", "title": "" }, { "docid": "f2cedab0962de588e01c1716c1790aad", "score": "0.65068287", "text": "public function index()\n {\n // return Response::json(request()->route(), 200);\n $action = \"SHOW \" . $this->page;\n try {\n $search = request()->get(\"search\");\n $isPaging = request()->exists(\"page\");\n\n $model = $this->model::query();\n\n // If admin searches for any name\n if (!empty($search)) {\n $model = $model->whereName($search);\n }\n\n if (isset($this->loadParam['read'])) {\n if(isset($this->loadParam['read']['with'])) {\n $withs = explode(',', $this->loadParam['read']['with']);\n foreach ($withs as $with) {\n $model = $model->with($with);\n }\n }\n }\n\n // Provide based on paging or not\n if ($isPaging) {\n $model = $model\n ->orderBy('id', 'desc')->paginate();\n } else {\n $model = $model\n ->orderBy('id', 'desc')->get();\n }\n\n // If permission has data\n if ($model) {\n $this->lg($this->page . ' list shown', 'info', $action, 200);\n return response()->json($model);\n } else {\n $this->lg($this->page . ' list not found', 'warning', $action, 404);\n return response()->json(\"Not found\", 404);\n }\n } catch (\\Exception $e) {\n $this->lg($e, 'error', $action, 500);\n return response()->json($this->experDifficulties, 500);\n }\n }", "title": "" }, { "docid": "ef707fce78cb544fb65c0a4e38796dff", "score": "0.65030056", "text": "private function showList(): void\n {\n $msg = \"Welcome customer, to view the product list type: list\\n\";\n echo $msg;\n while ($command = $this->getInput() !== 'list') {\n echo $msg;\n };\n $products = Route::goTo('list');\n $this->products = $products;\n foreach ($this->products as $product) {\n echo $product->toString() . \"\\n\";\n }\n }", "title": "" }, { "docid": "1c0c0aefcfbef26445ad6c95b7c7f60c", "score": "0.6501281", "text": "public function index()\n {\n $listings = $this->listings->paginate(15);\n\n return view('backend.listings.index',compact('listings'));\n }", "title": "" }, { "docid": "a281ecc70e3d52bd2ee1e4bfba8e1724", "score": "0.6497771", "text": "public function index()\n {\n return SongResource::collection(Song::all()->sortByDesc('created_at'));\n }", "title": "" }, { "docid": "7f844292b4038bfed459f1130c7632dd", "score": "0.64967513", "text": "public function listAction()\n {\n $this->view->assign('articles', $this->repository->findForListPlugin($this->settings, $this->getData()));\n }", "title": "" }, { "docid": "228d685d5f1d86518c57ce853ccd52ef", "score": "0.64868814", "text": "public function listAction() {\n\t\t$literatures = $this->literatureRepository->findAll();\n\t\t$this->view->assign('literatures', $literatures);\n\t}", "title": "" }, { "docid": "9169a301a1e687b391dc420a75819c41", "score": "0.64856774", "text": "public function index()\n {\n $products = $this->allResources($this->productRepository);\n\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "e4ed0c12368721c8003fa5e2056a624b", "score": "0.6479523", "text": "public function indexAction()\n {\n $user = $this->get('security.context')->getToken()->getUser();\n \n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BricksSiteBundle:ExternalResource')->findBy(\n array(),\n array('title' => 'ASC')\n );\n\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "d4e011bbb309b20dccd6a637cae8b802", "score": "0.64744496", "text": "public function index()\n {\n return response(TodoResource::collection(Todo::all()), 200);\n }", "title": "" }, { "docid": "32e9a450ea4cabeba3749d02f2ef99e6", "score": "0.6473708", "text": "public function actionIndex()\n\t{\n\t\t$theLists = Listt::find()\n\t\t\t->where(['account_id'=>0])\n\t\t\t->orderBy('grouping, sorder, name')\n\t\t\t->asArray()\n\t\t\t->all();\n\t\treturn $this->render('list_index', [\n\t\t\t'theLists'=>$theLists,\n\t\t]);\n\t}", "title": "" } ]
3c26902227bd91497676494a25e054de
Trim the list at key to the specified range of elements
[ { "docid": "0495ea1eeb70e619ff12cefb27768a0e", "score": "0.43678027", "text": "public function truncate($limit, $offset = 0)\n {\n $result = $this->_getRediskaOn()->truncateList($this->_name, $limit, $offset);\n\n if ($result && !is_null($this->_expire)) {\n $this->expire($this->_expire, $this->_isExpireTimestamp);\n }\n\n return $result;\n }", "title": "" } ]
[ { "docid": "461dff4639ea86f84e0f792e3711238e", "score": "0.6725119", "text": "public function ltrim($list_key,$start,$end) {\n return $this->redis->ltrim($this->key_prefix.$list_key,$start,$end);\n }", "title": "" }, { "docid": "09487f795fde5d1797a07e534af69adb", "score": "0.62411296", "text": "public function listTrim(array $key, $bin, $index, $count, array $options = null)\n {\n }", "title": "" }, { "docid": "924f58f3779b614bb1d40087d0fc4e5e", "score": "0.5712531", "text": "function _trim($value)\n {\n for ($i = count($value) - 1; $i >= 0; --$i) {\n if ($value[$i]) {\n break;\n }\n unset($value[$i]);\n }\n\n return $value;\n }", "title": "" }, { "docid": "a4c2d9ae5ca2bf91470a89555846ae9f", "score": "0.5649567", "text": "public function listRemoveRange(array $key, $bin, $index, $count, array $options = null)\n {\n }", "title": "" }, { "docid": "5fd6c2442cd0e49ec2acd3a7ce150a33", "score": "0.5593206", "text": "public function removeFromSortedSetByIndex( $szKey, $nStartingIndex, $nEndingIndex );", "title": "" }, { "docid": "00e55f3c66d4225473dec28fac22bd3e", "score": "0.5440878", "text": "protected static function trim( &$data, string $key )\n {\n\t\t$data = trim($data); \n }", "title": "" }, { "docid": "a7b9dae27d4ce7e61779de2b802f4076", "score": "0.5412048", "text": "public function setFilterRange($key, $min, $max);", "title": "" }, { "docid": "6e12a4a97c2d7072a65727ee211e836e", "score": "0.5286161", "text": "function take_range($lo, $hi, $list) {\n $result = array();\n $i = 0;\n foreach ($list as $item) {\n if ($i >= $hi) { break; }\n if ($i >= $lo) {\n array_push($result, $item);\n }\n $i++;\n }\n return $result;\n}", "title": "" }, { "docid": "66a907e6fa459a0a68195af4a6419553", "score": "0.52251947", "text": "function deleteRange($range,$mode,$listname)\r\n\t\t{\r\n\t\t$buildtrunk = $listname.'-'.$mode;\r\n\t\tif(substr_count($range,'-')>0)\r\n\t\t\t{\r\n\t\t\t$deleterange = explode('-',trim($range));\r\n\t\t\t$clause = \"`ChunkNum` >= '{$deleterange[0]}' AND `ChunkNum` <= '{$deleterange[1]}'\";\r\n\t\t\t}\r\n\t\telse\r\n\t\t\t$clause = \"`ChunkNum` = '$range'\";\r\n\t\t//Delete from index\r\n\t\tmysql_query(\"DELETE FROM `$buildtrunk-index` WHERE $clause\");\r\n\t\t\r\n\t\t//Select all host keys that match chunks (we'll delete them after but we need the hostkeys list!)\r\n\t\t$result = mysql_query(\"SELECT `Hostkey` FROM `$buildtrunk-hosts` WHERE $clause\");\r\n\t\t$buildprefixdel = array();\r\n\t\tif($result&&mysql_num_rows($result)>0)\r\n\t\t\t{\r\n\t\t\twhile ($row = mysql_fetch_array($result, MYSQL_ASSOC))\r\n\t\t\t\t{\r\n\t\t\t\tif(!empty($row['Hostkey']))\r\n\t\t\t\t\t$buildprefixdel[] = $row['Hostkey'];\r\n\t\t\t\t}\r\n if (count($buildprefixdel)) {\r\n //Delete all matching hostkey prefixes\r\n mysql_query(\r\n \"DELETE FROM `$buildtrunk-prefixes` WHERE `Hostkey` in ('\" . implode('\\',\\'', $buildprefixdel) . \"')\"\r\n );\r\n }\r\n\t\t\t\t\r\n\t\t\t//Delete all matching hostkeys\r\n\t\t\tmysql_query(\"DELETE FROM `$buildtrunk-hosts` WHERE $clause\");\t\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "4892b55f0f55baeb119e611db5410e06", "score": "0.5176015", "text": "public function ceiling($key);", "title": "" }, { "docid": "ccf2820ec10baace56221a2bd5176e48", "score": "0.5164113", "text": "public function remove($space, $key);", "title": "" }, { "docid": "ea03923a2bb0be8d7bfbcb811c9e7986", "score": "0.515017", "text": "function _truncateHitList() {\n\t\t//shift hits from the beginning\n\t\tfor ($i = 0; $i < $this->start; $i++)\n\t\t\tarray_shift($this->results);\n\t\t\n\t\t//how many are left?\n\t\t$count = count($this->results);\n\t\t//pop hits from the end\n\t\tfor ($i = 0; $i < $count - PERPAGE; $i++)\n\t\t\tarray_pop($this->results);\n\t}", "title": "" }, { "docid": "fa43d58a7bc6b51e4914cbb494972f45", "score": "0.51263577", "text": "public function stats_trim() {\n $this->stats = array_slice($this->stats, -100, 100);\n }", "title": "" }, { "docid": "537110ba13159b968fe26b708d322e25", "score": "0.5083871", "text": "function cap_sanitize_key_list ($key_list)\n{\n $keys = explode (' ', $key_list);\n $result = array ();\n foreach ($keys as $key) {\n $result[] = cap_sanitize_key ($key);\n }\n return implode (' ', $result);\n}", "title": "" }, { "docid": "9a5d412d186602b8e869e7c9cee4a386", "score": "0.50523823", "text": "public function filtered($key=null);", "title": "" }, { "docid": "83b8d52a0579a0b570671700ff1042d7", "score": "0.50075513", "text": "function delete_single_range( $product_id, $range_name, $key ) {\n \n $range_data = get_post_meta( $product_id, $range_name, true );\n \n if ( array_key_exists( $key, $range_data ) ) {\n unset( $range_data[ $key ] );\n }\n \n update_post_meta( $product_id, $range_name, $range_data );\n }", "title": "" }, { "docid": "09abe34d551f771c68c45fc6db1ae133", "score": "0.49516222", "text": "function delete_serialized_range( $product_id, $name, $key ) {\n \n $booking_settings = get_post_meta( $product_id, 'woocommerce_booking_settings', true );\n \n $record_data = $booking_settings[ $name ];\n \n if ( array_key_exists( $key, $record_data ) ) {\n unset( $record_data[ $key ] );\n }\n \n $booking_settings[ $name ] = $record_data;\n \n update_post_meta( $product_id, 'woocommerce_booking_settings', $booking_settings );\n }", "title": "" }, { "docid": "94a06bb4b1c605739d2ff42971712293", "score": "0.49443686", "text": "public function removeLimit(): mixed;", "title": "" }, { "docid": "e857634b8d1f8d706eeda908db36b56a", "score": "0.49300945", "text": "public function offsetUnset($key);", "title": "" }, { "docid": "e9e602e8cb19b5e9620b3e6f5e1e9631", "score": "0.48891982", "text": "function array_snip($arr, $key){\n\tunset($arr[$key]);\n\n\treturn $arr;\n}", "title": "" }, { "docid": "498452f7d7a13def51bc81dce885cea4", "score": "0.48304257", "text": "function get_range_key( $range, $start, $end ) {\n \n $delete_key = '';\n if ( is_array( $range ) && count( $range ) > 0 ) {\n foreach( $range as $range_key => $range_value ) {\n $r_start = $range_value[ 'start' ];\n $r_end = $range_value[ 'end' ];\n \n if ( $r_start == $start && $r_end == $end ) {\n $delete_key = $range_key;\n break;\n }\n }\n \n }\n \n return $delete_key;\n \n }", "title": "" }, { "docid": "f0e60cbd83e20227e05dc1c02a6b185c", "score": "0.4816591", "text": "protected function array_remove_key(&$rule){\n\t\t$args = func_get_args();\n\t\t$rule = array_diff_key($args[0],array_flip(array_slice($args,1)));\n\t}", "title": "" }, { "docid": "e7ce61a2002309b1e006f1a57c0e389a", "score": "0.48145044", "text": "public function rangeKeys($lo, $hi): iterable;", "title": "" }, { "docid": "3ade926303f2a306e952e206696e3364", "score": "0.47707438", "text": "public function offsetUnset($key) {}", "title": "" }, { "docid": "40c385511b8b2352d7b972f22651496f", "score": "0.47636783", "text": "public function removeFromSortedSet( $szKey, array $nElementKeys );", "title": "" }, { "docid": "a84200e9d55f9c3d2388ae8669d72f4a", "score": "0.47628474", "text": "public function removeValue(string $key): self;", "title": "" }, { "docid": "6c9c4670d12d99165f28023aa199e609", "score": "0.47535646", "text": "function trim_ex(&$v, $k) {\n\t$v = trim($v);\n}", "title": "" }, { "docid": "a3b61dedc4f9cd102c67c5619a5717a8", "score": "0.4740843", "text": "public function removeSort($key);", "title": "" }, { "docid": "485715c3c76bc213690faded522e6014", "score": "0.47367364", "text": "function truncateArray($arr, $index) {\n return array_slice($arr, 0, $index + 2);\n }", "title": "" }, { "docid": "dbe3b90bf8239efc24e688368e25b690", "score": "0.472885", "text": "private function arraytrim ( &$array ) { // & bedeutet Call by Refernece anstatt dem normalen Call by Value\n foreach ( $array as $key => $value ) { // Array durchgehen\n if ( is_array($array[$key] ) ) { // Wenn der Wert ein Array ist...\n $this->arraytrim ( $array[$key] ); // ... die Funktion rekusriv aufrufen\n } else {\n $array[$key] = trim ( $value ); // sonst \"trim\" anwenden\n }\n }\n }", "title": "" }, { "docid": "e98525faa4ff98ecfcd9aed56e0b5040", "score": "0.47189924", "text": "public function slice(int $start, ?int $length = null): MutableCollectionInterface;", "title": "" }, { "docid": "f8693f2f268e7b1828c8da29ae471b82", "score": "0.4711519", "text": "public function trim()\n\t{\n\t\t$this->map = Arr::trim($this->map);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "d608c1f450923495ecf483a314acd37a", "score": "0.46947682", "text": "public function lrange($list_key,$start,$end) {\n return $this->redis->lrange($this->key_prefix.$list_key,$start,$end);\n }", "title": "" }, { "docid": "ec09abfcb42a2fae4432b82b86a3f72f", "score": "0.4688889", "text": "function trim_array(array $data)\n {\n return array_map('trim_if_string', $data);\n }", "title": "" }, { "docid": "5f0f2c5b2e20c4d78c2fb6ca8df21d02", "score": "0.4685303", "text": "public function slice($offset, $length = null, $preserveKeys = false);", "title": "" }, { "docid": "30227115d1c40b50d4ce968f04f5be6b", "score": "0.46844852", "text": "public function offsetUnset($key)\n {\n unset($this->items[$key]);\n }", "title": "" }, { "docid": "30227115d1c40b50d4ce968f04f5be6b", "score": "0.46844852", "text": "public function offsetUnset($key)\n {\n unset($this->items[$key]);\n }", "title": "" }, { "docid": "30227115d1c40b50d4ce968f04f5be6b", "score": "0.46844852", "text": "public function offsetUnset($key)\n {\n unset($this->items[$key]);\n }", "title": "" }, { "docid": "30227115d1c40b50d4ce968f04f5be6b", "score": "0.46844852", "text": "public function offsetUnset($key)\n {\n unset($this->items[$key]);\n }", "title": "" }, { "docid": "7a2c873112432a972255cc16521bddd9", "score": "0.4682614", "text": "public function remove_range($beg_index, $end_index) {\n if (is_integer($beg_index) && is_integer($end_index)) {\n if (array_key_exists($beg_index, $this->elements) && ($end_index >= $beg_index) && ($end_index <= $this->count)) {\n for ($index = $beg_index; $index < $end_index; $index++) {\n unset($this->elements[$index]);\n $this->count--;\n }\n $this->elements = array_values($this->elements);\n return TRUE;\n }\n throw new Kohana_InvalidRange_Exception('Message: Unable to remove range. Reason: Invalid range start from :start and ends at :end', array(':start' => $beg_index, ':end' => $end_index));\n }\n throw new Kohana_InvalidArgument_Exception('Message: Unable to remove range. Reason: Either :start or :end is of the wrong data type.', array(':start' => gettype($beg_index), ':end' => gettype($end_index)));\n }", "title": "" }, { "docid": "b16b557b2c27fa4cb4387e86d91ee155", "score": "0.46788907", "text": "public function offsetUnset($key) { }", "title": "" }, { "docid": "d03d798cc7f5b3ff45def37927f155a0", "score": "0.4671981", "text": "static function getTrimmed($key, $default = null, $inputLocation = 'PARAMS') {\n\t\treturn trim(self::get($key, $default, $inputLocation));\n\t}", "title": "" }, { "docid": "55b44a21c4bbf101a7af98b38ad93c34", "score": "0.4665339", "text": "private function zeroTrim(array $number, $right)\n {\n $zero = $this->target->getDigit(0);\n\n while (($right ? end($number) : reset($number)) === $zero) {\n unset($number[key($number)]);\n }\n\n return empty($number) ? [$zero] : array_values($number);\n }", "title": "" }, { "docid": "cddd486d3ff16c41736b4dc9e101428d", "score": "0.4656337", "text": "public function offsetUnset(mixed $key): void\n {\n unset($this->filters[$key]);\n }", "title": "" }, { "docid": "32273c63b45f336ea5a7454f8570d1a0", "score": "0.46503124", "text": "public function offsetUnset($key) {\n unset($this->_items[$key]);\n }", "title": "" }, { "docid": "273846aebedba38cecbef65b2908d055", "score": "0.46398854", "text": "public function offsetUnset($key)\n {\n unset($this->_items[$key]);\n }", "title": "" }, { "docid": "195b7895ce5370d874f7d16148dc4ed0", "score": "0.46397248", "text": "public function offsetUnset($key)\n\t{\n\t\tunset($this->items[$key]);\n\t}", "title": "" }, { "docid": "8f96467b39bff733c7187b5998740662", "score": "0.46360445", "text": "public function removeQueryString($key);", "title": "" }, { "docid": "af0bd007157d4fe0d47fc5ba61044f6d", "score": "0.46345094", "text": "function remove($key);", "title": "" }, { "docid": "f478a90f98de70031a70a17791fb0371", "score": "0.4629708", "text": "function wpmusc_trim_value(&$value) { $value = trim(trim($value), ' ,');}", "title": "" }, { "docid": "9427fcb18e2da2949369697c8f3e7eaf", "score": "0.4622418", "text": "public function remove(string|int $key);", "title": "" }, { "docid": "80e30d5a20869b0be0e8b6e5e32bbbcd", "score": "0.46141154", "text": "private static function trimArrayValues($array = []){\n foreach($array as $key => $value){\n $array[$key] = trim($value);\n }\n return $array;\n }", "title": "" }, { "docid": "df64caa4b1d656de7a8b419444782f74", "score": "0.46038112", "text": "public function offsetUnset($key)\n {\n// Charcoal_ParamTrait::validateString( 1, $key );\n\n $key = us($key);\n unset($this->values[$key]);\n }", "title": "" }, { "docid": "1c7fd448ec740e42efc04e6e0933c815", "score": "0.4598455", "text": "public function drop($key): void\n {\n unset($this->array[(string) $key]);\n }", "title": "" }, { "docid": "63659eb054a2733ebe3ff85ac39fb14a", "score": "0.4597618", "text": "public function listPopRange(array $key, $bin, $index, $count, array &$elements, array $options = null)\n {\n }", "title": "" }, { "docid": "6660206c92deaadd2e6a1345d71208b1", "score": "0.4597479", "text": "public function trimLeft($charlist = null);", "title": "" }, { "docid": "0467685accca62fe4649b95c80055331", "score": "0.4586922", "text": "function array_slice ($arg, $offset, $length, $preserve_keys) {}", "title": "" }, { "docid": "2098ab867b632a6681216054e9a9118d", "score": "0.45752153", "text": "function filterData($data, $filter){\n foreach($data as $adm_rec => $title){\n if ($filter == 10){\n if ($title['MAX'] >= $filter)\n unset($data[$adm_rec]);\n }\n else if ($filter == 90){\n if ($title['MAX'] <= $filter)\n unset($data[$adm_rec]);\n }\n }\n return $data;\n }", "title": "" }, { "docid": "5d4fea01d1d0e1a7d7243075aa27ca8b", "score": "0.45686907", "text": "function trimStrings($target) {\n\t\tforeach ($target as $key => $value) {\n\t\t\t$value = str_replace(\"&nbsp;\",\" \",$value);\n\t\t\t$target[$key] = trim(strip_tags(html_entity_decode($value)));\n\t\t}\n\t\treturn $target;\n\t}", "title": "" }, { "docid": "c969ec45839517a693e9ca10f19ed4d3", "score": "0.45596892", "text": "public function removeByKey($key);", "title": "" }, { "docid": "7fae390f58839e5f0149bb3876de0311", "score": "0.4551051", "text": "public function offsetUnset($key): void;", "title": "" }, { "docid": "7efdc43cbe017ba3eb3bc5596e6421a1", "score": "0.45488966", "text": "public function dropWhile(Closure $fn): MutableCollectionInterface;", "title": "" }, { "docid": "46338b674329787e97d1661c738a80cc", "score": "0.45433077", "text": "function array_key_rm($key, $arr)\n {\n if (!array_key_exists($key, $arr)) {\n return $arr;\n }\n $keys = array_keys($arr);\n $index = array_search($key, $keys);\n if ($index !== FALSE) {\n array_splice($arr, $index, 1);\n }\n return $arr;\n }", "title": "" }, { "docid": "fa751b140864c179f88fcaf8774638fd", "score": "0.45280838", "text": "function lime2node_trim_nulls($content_arr)\n {\n $content_arr = array_values($content_arr);\n\n // strip first NULL bytes if any\n while ( count($content_arr)>0 )\n {\n if ( $content_arr[0] == 0 )\n {\n unset($content_arr[0]); // This removes the element from the array\n\n // Re-index:\n $content_arr = array_values($content_arr);\n }\n else\n break;\n }\n\n // strip final NULL bytes if any\n while ( count($content_arr)>0 )\n {\n $last_chr_idx = count($content_arr) - 1;\n if ( $content_arr[$last_chr_idx] == 0 )\n {\n unset($content_arr[$last_chr_idx]); // This removes the element from the array\n\n // Re-index:\n $content_arr = array_values($content_arr);\n }\n else\n break;\n }\n\n return $content_arr;\n }", "title": "" }, { "docid": "8b2779aafedc32e9d2bdce91b29cf694", "score": "0.44994473", "text": "public function trim($charlist = null)\n {\n if ($charlist instanceof self) {\n $charlist = $charlist->implode('');\n }\n $charlist = (string) $charlist;\n foreach ($this->_value as &$data) {\n if ($data instanceof self) {\n $data->trim($charlist);\n continue;\n }\n if (is_string($data)) {\n if (0 === strlen($charlist)) {\n $data = trim($data);\n } else {\n $data = trim($data, $charlist);\n }\n }\n }\n return $this->_create($this->_value);\n }", "title": "" }, { "docid": "d60e6f0196478619338dbf1fff1efafa", "score": "0.4492183", "text": "abstract function remove($key);", "title": "" }, { "docid": "50fa182529627a4315702a00c3e81bad", "score": "0.44785735", "text": "public function offsetUnset($key)\n {\n if (isset($this->collection[$key])) {\n unset($this->collection[$key]);\n }\n }", "title": "" }, { "docid": "d171877a9784583103d5619144bd4877", "score": "0.44675285", "text": "function acf_remove_array_key_prefix( $array, $prefix ) {\n}", "title": "" }, { "docid": "a2ab325aa90bb0503099d3763136a78f", "score": "0.44571716", "text": "public function remove($key = NULL);", "title": "" }, { "docid": "ea23f23f0c0d1e1ab625e4da1ebb55db", "score": "0.4446308", "text": "public static function getRangeMap($key=NULL)\n {\n if ($key) {\n return isset(self::$_keyRangeMap[$key]) ? self::$_keyRangeMap[$key] : NULL;\n } else {\n return self::$_keyRangeMap;\n }\n }", "title": "" }, { "docid": "c16af6fb921d027964d939d01aa4af20", "score": "0.44443467", "text": "public function remove($key);", "title": "" }, { "docid": "c16af6fb921d027964d939d01aa4af20", "score": "0.44443467", "text": "public function remove($key);", "title": "" }, { "docid": "c16af6fb921d027964d939d01aa4af20", "score": "0.44443467", "text": "public function remove($key);", "title": "" }, { "docid": "c16af6fb921d027964d939d01aa4af20", "score": "0.44443467", "text": "public function remove($key);", "title": "" }, { "docid": "c16af6fb921d027964d939d01aa4af20", "score": "0.44443467", "text": "public function remove($key);", "title": "" }, { "docid": "c16af6fb921d027964d939d01aa4af20", "score": "0.44443467", "text": "public function remove($key);", "title": "" }, { "docid": "c16af6fb921d027964d939d01aa4af20", "score": "0.44443467", "text": "public function remove($key);", "title": "" }, { "docid": "553f67a548a9d44e5cb9469daba6a90e", "score": "0.44334558", "text": "public static function forget(array &$data, $key)\n {\n $segments = explode('.', $key);\n\n $key = array_pop($segments);\n\n // iterate through all of $segments except the last one\n foreach ($segments as $segment) {\n if (!array_key_exists($segment, $data)) {\n return;\n } elseif (!is_array($data[$segment])) {\n throw new \\UnexpectedValueException('Non-array segment encountered');\n }\n\n $data = &$data[$segment];\n }\n\n unset($data[$key]);\n }", "title": "" }, { "docid": "4d4983800a4f02789843d8125d64f45f", "score": "0.44316518", "text": "public static function prefixWithEmptyEntry(array $list)\n {\n array_unshift($list, array('key' => '', 'value' => ''));\n return $list;\n }", "title": "" }, { "docid": "c563cc0aafdacf55d2359a1a92fa0c7c", "score": "0.442621", "text": "public function truncate();", "title": "" }, { "docid": "c563cc0aafdacf55d2359a1a92fa0c7c", "score": "0.442621", "text": "public function truncate();", "title": "" }, { "docid": "aa09518ef62b32165ae050924136d938", "score": "0.4422629", "text": "public function removeParam($key);", "title": "" }, { "docid": "5b369025ef7f647363e4cd4cc345e067", "score": "0.44182566", "text": "function slice(iterable $iterable, int $start, ?int $length = null): array\n{\n Psl\\invariant($start >= 0, 'Start offset must be non-negative.');\n Psl\\invariant(null === $length || $length >= 0, 'Length must be non-negative.');\n\n $result = [];\n if (0 === $length) {\n return $result;\n }\n\n $i = 0;\n foreach ($iterable as $key => $value) {\n if ($i++ < $start) {\n continue;\n }\n\n $result[$key] = $value;\n if (null !== $length && $i >= $start + $length) {\n break;\n }\n }\n\n return $result;\n}", "title": "" }, { "docid": "3c7c0e85e6f2bcf89cee7ce10c02c098", "score": "0.44172454", "text": "public function remove($key) {}", "title": "" }, { "docid": "3c7c0e85e6f2bcf89cee7ce10c02c098", "score": "0.44172454", "text": "public function remove($key) {}", "title": "" }, { "docid": "04b7a879c9bc4e80459a911d4e3b893d", "score": "0.4396007", "text": "protected function removeRule(array $content, $key)\n {\n // expected it anyway.\n unset($content[$key]);\n\n return $content;\n }", "title": "" }, { "docid": "2cdfdde5d2f1034a2655c1f0d332115f", "score": "0.43876618", "text": "public function removeKey($key)\n {\n unset($this->elements[$key]);\n\n return $this;\n }", "title": "" }, { "docid": "2cf2d6afff826502c55df609c9b4bd79", "score": "0.43855488", "text": "function oa_core_truncate_list($list, $count, $more_link = '', $always_link = FALSE) {\n $new_list = array_slice($list, 0, $count);\n if (!empty($more_link) && ($always_link ||(count($list) != count($new_list)))) {\n $new_list[] = $more_link;\n }\n return $new_list;\n}", "title": "" }, { "docid": "2cf2d6afff826502c55df609c9b4bd79", "score": "0.43855488", "text": "function oa_core_truncate_list($list, $count, $more_link = '', $always_link = FALSE) {\n $new_list = array_slice($list, 0, $count);\n if (!empty($more_link) && ($always_link ||(count($list) != count($new_list)))) {\n $new_list[] = $more_link;\n }\n return $new_list;\n}", "title": "" }, { "docid": "8cb44c570b4e5da61010980c20e71be6", "score": "0.4385214", "text": "public function slice( $from, $to )\n {\n throw new UnmodifiableException('This list is immutable');\n }", "title": "" }, { "docid": "f1313dad39708272e70a8bc9983f66f1", "score": "0.43840137", "text": "public function erase(string $key)\n\t{\n\t\t$array =& static::$data;\n\t\t$keys = explode('.', $key);\n\t\t// traverse the array into the second last key\n\t\twhile(count($keys) > 1) {\n\t\t\t$key = array_shift($keys);\n\t\t\t$array =& $array[$key];\n\t\t}\n\t\tunset($array[array_shift($keys)]);\n\t}", "title": "" }, { "docid": "68aed6e858205d7467fd1f46c3c43f3a", "score": "0.4383716", "text": "public function offsetUnset($key)\n {\n $idx = $this->getIndex($key);\n unset($this->iasoProtectedInnerResults[$idx]);\n }", "title": "" }, { "docid": "4a2cf9409c590313b3f4d521e7c77f92", "score": "0.43654558", "text": "function wildcard_ip($key) {\n\t\texplode( '.', $key );\n\t\t$octets = ;\n\t\tarray_pop( $octets );\n\t\t$ip_range[] = implode( '.', $octets ) . '.*';\n\t\tarray_pop( $octets );\n\t\t$ip_range[] = implode( '.', $octets ) . '.*';\n\t\tarray_pop( $octets );\n\t\t$ip_range[] = implode( '.', $octets ) . '.*';\n\t\treturn $ip_range;\n\t}", "title": "" }, { "docid": "c427cc81d7bb31990db5f6b0c9a5c685", "score": "0.43560106", "text": "abstract public function remove($key);", "title": "" }, { "docid": "c427cc81d7bb31990db5f6b0c9a5c685", "score": "0.43560106", "text": "abstract public function remove($key);", "title": "" }, { "docid": "c427cc81d7bb31990db5f6b0c9a5c685", "score": "0.43560106", "text": "abstract public function remove($key);", "title": "" }, { "docid": "40e5f5a38a0a2fbab5b1d24fb92db249", "score": "0.43452275", "text": "public function remove($key)\n {\n unset($this->elements[$key]);\n }", "title": "" }, { "docid": "3374b32279d8726a52332c64bdb9bc06", "score": "0.43436867", "text": "public function lpop($list_key) {\n return $this->redis->lpop($this->key_prefix.$list_key);\n }", "title": "" }, { "docid": "fe1f98cb6434766430f434a14812d2d1", "score": "0.43314436", "text": "function mr_template_trim_argument_string(&$value, $key, $chars=\" \")\n{\n $value = trim($value, $chars);\n}", "title": "" }, { "docid": "96f3e7d2762556ac8c058592bf0289fd", "score": "0.4327557", "text": "public function removeWhere($key)\n {\n for ($i = 0; $i < count($this->where); $i++) {\n \n if(!isset($this->where[$i])){\n continue;\n }\n \n if($this->where[$i]['key'] != $key){\n continue;\n }\n \n unset($this->where[$i]);\n break;\n }\n }", "title": "" } ]
58ce40303568e30d8f9383f77fd3ceca
STEP 3 B: GET GRAPH USERS
[ { "docid": "20ea5f477c02c66d9399e12b2a838bb3", "score": "0.61402756", "text": "public function get_graph_users()\n\t{\n\t\t$highcharts = (array)$this->ci->load->get_var('highcharts');\n\t\t$highchart = $highcharts[$this->highchart_id];\n\t\tif($highchart->error == true){ return $this; }\n\t\t\n\t\t$graph = $highchart->graph;\n\t\t$final_users = $this->ci->Graph_model->get_graph_users($graph->graph_id);\n\t\t\n\t\tif($final_users == false || empty($final_users) ){\n\t\t\t$highchart->error = true;\n\t\t\t$highchart->error_type = \"user\";\n\t\t\t$highchart->error_message = \"No users selected to pull kpi data.\";\t\n\t\t}\n\t\t\n\t\t$highchart->final_users = $final_users;\t\n\t\t$highcharts[$this->highchart_id] = $highchart; \n\t\t$this->ci->load->vars(array('highcharts' => $highcharts));\n\t\treturn $this;\n\t}", "title": "" } ]
[ { "docid": "f55d353128fd45de04a0cd089d28a80c", "score": "0.59428847", "text": "private function getUser()\n {\n $links = [];\n\n return $links;\n }", "title": "" }, { "docid": "f9f05582cf286020f26e8065738551ba", "score": "0.589115", "text": "public function getUsers()\n\t{\n\n\t}", "title": "" }, { "docid": "8e054b4d80b9c27484111f0bba4f1d8b", "score": "0.58844304", "text": "public function forgetUser();", "title": "" }, { "docid": "8e054b4d80b9c27484111f0bba4f1d8b", "score": "0.58844304", "text": "public function forgetUser();", "title": "" }, { "docid": "346574b6db988f7a4cf05130407ea312", "score": "0.58782357", "text": "public function getUsers();", "title": "" }, { "docid": "346574b6db988f7a4cf05130407ea312", "score": "0.58782357", "text": "public function getUsers();", "title": "" }, { "docid": "346574b6db988f7a4cf05130407ea312", "score": "0.58782357", "text": "public function getUsers();", "title": "" }, { "docid": "a119664e7a7699c3fca7c3905dda78ea", "score": "0.58737445", "text": "private function getAllUsers(){\n $query = \\Drupal::database()->select('users_field_data', 'ufd');\n $query->addField('ufd', 'name');\n $query->addField('ufd', 'mail');\n $query->condition('ufd.status', 1);\n return $query->execute()->fetchAll();\n }", "title": "" }, { "docid": "a5eac0abe835c3f506a52e527a9df33e", "score": "0.5869471", "text": "public function get_all_users() \n { \n $per_page = MAX_DATA_PER_PAGE;\n $current_page = Param::get('page', 1);\n $pagination = new SimplePagination($current_page, $per_page);\n\n $user_id = $_SESSION['user_id'];\n $users = User::getOtherUsers($pagination->start_index -1, $pagination->count + 1, $user_id);\n \n $pagination->checkLastPage($users);\n $total = User::countOtherUser($user_id);\n $pages = ceil($total / $per_page);\n $this->set(get_defined_vars());\n }", "title": "" }, { "docid": "b69ac755887ddb1610927f25d82c70d3", "score": "0.58627695", "text": "public function getUsers(): IteratorAggregate;", "title": "" }, { "docid": "7fe475d6a2f676446438dc46e58decd4", "score": "0.58485603", "text": "public function getUsers(){\n\t\t$reqBearer = $this->bearer;\t\n\t\t$this->model->getUsers($reqBearer);\n\t\t\n\t}", "title": "" }, { "docid": "33a88600b9c02fb04f5a492b0cac93df", "score": "0.58477294", "text": "public function getUsers() {\n\n $query = craft()->db->createCommand()\n ->select('user_id, instagram_id, oauth, u.firstname, u.lastname, u.username')\n ->from('picpuller_authorizations oauth')\n ->join('users u', 'oauth.user_id=u.id')\n ->order('user_id')\n ->query();\n return $query;\n }", "title": "" }, { "docid": "fda5696c94e67f2861043c2754538868", "score": "0.58038944", "text": "function listUsers()\t{\n\t\t$userArray = array();\n\n\t\t\t// Special flags and assigned jobs:\n\t\t$query = 'SELECT * FROM fe_users WHERE '.\n\t\t\t\t\t'pid='.intval($this->dbPageId).\n\t\t\t\t\t\" AND (tx_extrepmgm_isreviewer>0 OR tx_extrepmgm_isdocreviewer>0 OR tx_extrepmgm_jobs!='' OR tx_extrepmgm_contribute)\".\n\t\t\t\t\t$this->cObj->enableFields('fe_users').\n\t\t\t\t\t' ORDER BY crdate';\n\t\t$res = mysql(TYPO3_db,$query);\n\t\twhile($row=mysql_fetch_assoc($res))\t{\n\t\t\t$userArray[$row['uid']]['rec']=$row;\n\t\t}\n\n\t\t\t// Owning Extensions:\n\t\t$query = 'SELECT fe_users.*, count(*) AS extCount FROM fe_users,tx_extrep_keytable WHERE '.\n\t\t\t\t\t'fe_users.pid='.intval($this->dbPageId).\n\t\t\t\t\t' AND tx_extrep_keytable.pid='.intval($this->dbPageId).\n\t\t\t\t\t' AND fe_users.uid=tx_extrep_keytable.owner_fe_user AND tx_extrep_keytable.members_only=0'.\n\t\t\t\t\t$this->cObj->enableFields('fe_users').\n\t\t\t\t\t$this->cObj->enableFields('tx_extrep_keytable').\n\t\t\t\t\t' GROUP BY fe_users.uid';\n\n\t\t$res = mysql(TYPO3_db,$query);\n\t\techo mysql_error();\n\t\twhile($row=mysql_fetch_assoc($res))\t{\n\t\t\t$userArray[$row['uid']]['rec']=$row;\n\t\t\t$userArray[$row['uid']]['extCount']=$row['extCount'];\n\t\t}\n\n\t\t\t// Being translators or assistants:\n\t\t$query = 'SELECT * FROM tx_extrepmgm_langadmin WHERE '.\n\t\t\t\t'pid='.intval($this->dbPageId).\n\t\t\t\t$this->cObj->enableFields('tx_extrepmgm_langadmin');\n\t\t$res = mysql(TYPO3_db,$query);\n\t\t\t// For each language:\n\t\twhile($row=mysql_fetch_assoc($res))\t{\n\t\t\t\t// Finding chief translator\n\t\t\t$chiefTranslator = $this->pi_getRecord('fe_users',$row['auth_translator']);\n\t\t\tif (is_array($chiefTranslator))\t{\n\t\t\t\t$userArray[$chiefTranslator['uid']]['rec']=$chiefTranslator;\n\t\t\t\t$userArray[$chiefTranslator['uid']]['translator'][]=$row['title'];\n\t\t\t}\n\t\t\t\t// FInding assistants:\n\t\t\t$query = 'SELECT fe_users.* FROM tx_extrepmgm_langadmin_sub_translators_mm,fe_users WHERE\n\t\t\t\t\t\t\tfe_users.pid='.intval($this->dbPageId).\n\t\t\t\t\t\t\t' AND tx_extrepmgm_langadmin_sub_translators_mm.uid_foreign = fe_users.uid\n\t\t\t\t\t\t\t AND tx_extrepmgm_langadmin_sub_translators_mm.uid_local = '.intval($row['uid']).\n\t\t\t\t\t\t\t$this->cObj->enableFields('fe_users').\n\t\t\t\t\t\t\t' ORDER BY tx_extrepmgm_langadmin_sub_translators_mm.sorting';\n\t\t\t$res2 = mysql(TYPO3_db,$query);\n\t\t\techo mysql_error();\n\t\t\twhile($row2=mysql_fetch_assoc($res2))\t{\n\t\t\t\t$userArray[$row2['uid']]['rec']=$row2;\n\t\t\t\t$userArray[$row2['uid']]['assisting_translator'][]=$row['title'];\n\t\t\t}\n\t\t}\n\n\t\t\t// Typeheads:\n\t\tif (t3lib_extmgm::isLoaded('distributionlist'))\t{\n\t\t\t$query = 'SELECT fe_users.*,tx_distributionlist_listmgm.country AS listmgmcountry FROM fe_users,tx_distributionlist_listmgm WHERE '.\n\t\t\t\t'fe_users.pid='.intval($this->dbPageId).\n\t\t\t\t' AND tx_distributionlist_listmgm.pid='.intval($this->dbPageId).\n\t\t\t\t' AND fe_users.uid=tx_distributionlist_listmgm.fe_user'.\n\t\t\t\t$this->cObj->enableFields('fe_users').\n\t\t\t\t$this->cObj->enableFields('tx_distributionlist_listmgm');\n\n\t\t\t$res = mysql(TYPO3_db,$query);\n\t\t\techo mysql_error();\n\t\t\twhile($row=mysql_fetch_assoc($res))\t{\n\t\t\t\t$userArray[$row['uid']]['rec']=$row;\n\t\t\t\t$userArray[$row['uid']]['listmgmcountry'][]=$row['listmgmcountry'];\n\t\t\t}\n\t\t}\n\n\t\t\t// References\n/*\n\t// NO references count\n\t\tif (t3lib_extmgm::isLoaded('t3references'))\t{\n\t\t\t$query = 'SELECT fe_users.*, count(*) AS refcount FROM fe_users,tx_t3references WHERE '.\n\t\t\t\t'fe_users.pid='.intval($this->dbPageId).\n\t\t\t\t' AND tx_t3references.pid='.intval($this->conf['listUsers.']['referencesPid']).\n\t\t\t\t' AND fe_users.uid=tx_t3references.fe_owner_user'.\n\t\t\t\t$this->cObj->enableFields('fe_users').\n\t\t\t\t$this->cObj->enableFields('tx_t3references').\n\t\t\t\t' GROUP BY fe_users.uid';\n#debug($query);\n\t\t\t$res = mysql(TYPO3_db,$query);\n\t\t\techo mysql_error();\n\t\t\twhile($row=mysql_fetch_assoc($res))\t{\n\t\t\t\tif ($row['refcount']>1)\t{\n\t\t\t\t\t$userArray[$row['uid']]['rec']=$row;\n\t\t\t\t\t$userArray[$row['uid']]['refcount']=$row['refcount'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t*/\n\n\n\n\t\t\t// Putting together the list:\n\t\t$lines=array();\n\t\t$lines[]='<tr>\n\t\t\t<td'.$this->pi_classParam('HCell').'>&nbsp;</td>\n\t\t\t<td'.$this->pi_classParam('HCell').'>Username/Name:</td>\n\t\t\t<td'.$this->pi_classParam('HCell').' width=\"50%\">Jobs:</td>\n\t\t\t<td'.$this->pi_classParam('HCell').'>Personal mission:</td>\n\t\t</tr>';\n\n\n\t\t\t// Sorting:\n\t\t$userArray_count=array();\n\t\treset($userArray);\n\t\twhile(list($k,$dat)=each($userArray))\t{\n\t\t\t$userArray_count[$k]=$dat['rec']['tx_extrepmgm_jobspoints'];\n\t\t}\n\t\tarsort($userArray_count);\n#debug($userArray_count)\t\t;\n\n\t\t$showUidPid = intval($this->conf['listUsers.']['tx_newloginbox_pi3-showUidPid']);\n\n#debug($showUidPid);\n\t\t$c=0;\n\t\t$R_URI = t3lib_div::getIndpEnv('REQUEST_URI');\n\t\t$highScore=array();\n\t\t$emails='';\n\n\t\treset($userArray_count);\n\t\twhile(list($uUid)=each($userArray_count))\t{\n\t\t\t$dat = $userArray[$uUid];\n\n\t\t\t$jobs=array();\n\t\t\t$jobpoints=intval($dat['rec']['tx_extrepmgm_addpoints']);\n\n\t\t\tif (trim($dat['rec']['tx_extrepmgm_jobs']))\t{\n\t\t\t\t$jobs[]=trim($dat['rec']['tx_extrepmgm_jobs']);\n\t\t\t\t$jobpoints+=100;\n\t\t\t}\n\t\t\tif ($dat['extCount'] > 3)\t{\n\t\t\t\t$jobs[]='Contributed '.$dat['extCount'].' publicly available extensions.';\n\t\t\t\t$jobpoints+=$dat['extCount']*10;\n\t\t\t}\n\t\t\tif ($dat['rec']['tx_extrepmgm_isreviewer'])\t{\n\t\t\t\t$jobs[]='Authorized Extension Mentor.';\n\t\t\t\t$jobpoints+=100;\n\t\t\t}\n\t\t\tif ($dat['rec']['tx_extrepmgm_isdocreviewer'])\t{\n\t\t\t\t$jobs[]='Proofreader of english documentation.';\n\t\t\t\t$jobpoints+=30;\n\t\t\t}\n\t\t\tif (is_array($dat['translator']))\t{\n\t\t\t\t$jobs[]='Chief translator of the '.implode(' and ',$dat['translator']).' language.';\n\t\t\t\t$jobpoints+=40*count($dat['translator']);\n\t\t\t}\n\t\t\tif (is_array($dat['assisting_translator']))\t{\n\t\t\t\t$jobs[]='Assisting translator of the '.implode(' and ',$dat['assisting_translator']).' language.';\n\t\t\t\t$jobpoints+=20*count($dat['assisting_translator']);\n\t\t\t}\n\t\t\tif (is_array($dat['listmgmcountry']))\t{\n\t\t\t\t$jobs[]='Typehead of '.implode(' and ',$dat['listmgmcountry']);\n\t\t\t\t$jobpoints+=50*count($dat['listmgmcountry']);\n\t\t\t}\n\t\t\tif ($dat['refcount'])\t{\n\t\t\t\t$jobs[]='Has registered '.$dat['refcount'].' TYPO3-made websites.';\n\t\t\t\t$jobpoints+=$dat['refcount']*2;\n\t\t\t}\n\n\n\t\t\tif (trim($dat['rec']['tx_extrepmgm_contribute']))\t{\n\t#\t\t\t$jobs[]='I want to contribute with: \"<em>'.trim(strip_tags($dat['rec']['tx_extrepmgm_contribute'])).'</em>\"';\n\t\t\t}\n\n\n\n\n\t\t\t$image='';\n\t\t\tif ($dat['rec']['tx_extrepmgm_images'])\t{\n\t\t\t\t$imgArr = t3lib_div::trimExplode(',',$dat['rec']['tx_extrepmgm_images'],1);\n\t\t\t\t$GLOBALS['TSFE']->make_seed();\n\t\t\t\t$randval = intval(rand(0,count($imgArr)-1));\n\t\t\t\t$imgFile = 'uploads/tx_extrepmgm/'.$imgArr[$randval];\n\t\t\t\t$imgInfo = getimagesize(PATH_site.$imgFile);\n\t\t\t\tif (is_array($imgInfo))\t{\n\t\t\t\t\t$image='<img src=\"'.$imgFile.'\" '.$imgInfo[3].'>';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$pp=($c%2 ? $this->pi_classParam('odd'):'');\n\t\t\t$lines[]='<tr>\n\t\t\t\t<td'.$pp.'>'.$image.'</td>\n\t\t\t\t<td'.$pp.'><em>'.($showUidPid ? $this->pi_linkToPage($dat['rec']['username'],$showUidPid,'',array('tx_newloginbox_pi3[showUid]' => $dat['rec']['uid'], 'tx_newloginbox_pi3[returnUrl]'=>$R_URI)) : $dat['rec']['username']).'</em><BR>'.$dat['rec']['name'].'</td>\n\t\t\t\t<td'.$pp.' width=\"50%\">'.implode('<BR>',$jobs).'</td>\n\t\t\t\t<td'.$pp.'>'.(trim($dat['rec']['tx_extrepmgm_contribute'])?'<em>'.htmlspecialchars(strip_tags($dat['rec']['tx_extrepmgm_contribute'])).'</em>':'').'</td>\n\t\t\t</tr>\n\t\t\t';\n\t\t\t$highScore[]=$dat['rec']['username'].':'.$jobpoints;\n\t\t\t$emails.=','.$dat['rec']['email'];\n\n\t\t\tif ($dat['rec']['tx_extrepmgm_jobspoints']!=intval($jobpoints))\t{\n\t\t\t\t$query='UPDATE fe_users SET tx_extrepmgm_jobspoints='.intval($jobpoints).' WHERE uid='.intval($dat['rec']['uid']);\n\t\t\t\t$res = mysql(TYPO3_db,$query);\n\t\t\t}\n\n\t\t\t$c++;\n\t\t}\n\n#\t\t$out='<h3>Who-is-who and contributers</h3>';\n#\t\t$out.='<p>In alphabetical order</p>';\n\t\t$out.='<table '.$this->conf['listUsers.']['tableParams'].'>\n\t\t'.implode(chr(10),$lines).'\n\t\t</table>';\n\n\t\tif ($GLOBALS['TSFE']->loginUser)\t{\n\t\t$out.='<!--\n\n'.implode(chr(10),$highScore).'\n\n\n'.implode(',',t3lib_div::trimExplode(',',$emails,1)).'\n\n\t\t-->';\n\t\t}\n\n\t\treturn '<DIV'.$this->pi_classParam('ulist').'>'.$out.'</DIV>';\n\t}", "title": "" }, { "docid": "64e2e68b91926fc59cbab504b2866347", "score": "0.57875353", "text": "public function get_all_users() {\n\t\t\t$request = $this->base_uri . '/people?output=' . static::$output;\n\t\t\treturn $this->fetch( $request );\n\t\t}", "title": "" }, { "docid": "7ecd4186e1c75831f3dbc088a2aab283", "score": "0.57871616", "text": "function getUserInfo($session) {\n\tglobal $OAuthToken, $OAuthTokenSecret;\n\n\t// By now, this pattern should be pretty familiar...\n\t$currentUserChoreo = new KhanAcademy_Users_CurrentUser($session);\n\t$currentUserInputs = $currentUserChoreo->newInputs();\n\t$currentUserInputs->setOAuthToken($OAuthToken)->setOAuthTokenSecret($OAuthTokenSecret);\n\t$currentUserInputs->setConsumerSecret(KHAN_ACADEMY_CONSUMER_SECRET)->setConsumerKey(KHAN_ACADEMY_CONSUMER_KEY);\n\t$currentUserResults = $currentUserChoreo->execute($currentUserInputs)->getResults();\n\n\treturn $currentUserResults;\n}", "title": "" }, { "docid": "0c1ae601df896091ea311f7116ac3f95", "score": "0.5725426", "text": "public function getUsers() : array;", "title": "" }, { "docid": "2da8b1fb047d05c1293a1f29774feb51", "score": "0.5720894", "text": "function bbp_users()\n{\n}", "title": "" }, { "docid": "f2dbb2b9e35b39a14aa7022f178def8f", "score": "0.57191175", "text": "public static function get_user_connections(){\n\n\t\t$user = wp_get_current_user();\n\t\t$res = get_user_meta(\n\t\t\t$user->ID, \n\t\t\tAPI_Con_Model::$meta_keys['user_connections'],\n\t\t\ttrue\n\t\t);\n\n\t\tif ( !$res )\n\t\t\treturn array();\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "40f4f3357834891c36be29283e85b76c", "score": "0.5708528", "text": "public function getUsernames()\n\t{\n\t\t$mv = new Viewperm($this->_db);\n\n\t\t$query = \"SELECT DISTINCT v.viewuser\n\t\t\t\tFROM $mv->_tbl AS v\n\t\t\t\tINNER JOIN $this->_tbl AS s ON v.sessnum = s.sessnum\n\t\t\t\tORDER BY v.viewuser ASC\";\n\n\t\t$this->_db->setQuery($query);\n\t\treturn $this->_db->loadObjectList();\n\t}", "title": "" }, { "docid": "4a97c55fb7b48d13664c18617a4dcfca", "score": "0.5697267", "text": "public function index()\n {\n $user_model = new Visitor();\n $tenant = 'bukalapak';\n\n $client = \\DB::connection('neo4j')->getClient();\n $currentPage = \\Input::get(\"page\", 1);\n $emails = [];\n\n $perPage = 10000;\n\n $skip = ($currentPage == 1) ? 0 : ($currentPage * $perPage) - $perPage;\n $strQuery = 'MATCH (n:`User`:`' . $tenant . '`) return n SKIP ' . '{skip}' . ' LIMIT {limit}';\n $query = new Query($client, $strQuery, ['skip' => $skip, 'limit' => $perPage]);\n $results = $query->getResultSet();\n\n foreach ($results as $row) {\n $attributes = $row['t']->getProperties();\n $user = $user_model->newFromBuilder($attributes);\n if (isset($user->email)) {\n array_push($emails, $user->email);\n }\n }\n\n }", "title": "" }, { "docid": "cf58f99ed40c26ea6a98bced985bd747", "score": "0.5690251", "text": "public function userfollowergrid()\n\t\t{\n\t\t\t$logger = Logger::getLogger(__CLASS__);\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$appuserid = $_GET[\"id\"];\n\t\t\t\t$appUserID = 0;\n\t\t\t\tif (isset($_COOKIE[\"ropaziuser\"])){\n\t\t\t\t\t$logger->debug(\"Got user cookie\");\n\t\t\t\t\t$logger->debug($_COOKIE[\"ropaziuser\"]);\n\t\t\t\t\t$appUserID = CommonUtils::verifyUserCookie();\n\t\t\t\t}\n\t\t\t\t$logger->debug(\"Got app user id::\" . $appuserid);\n\t\t\t\t$appUserBO = new AppUserBO($this->_UserInfo);\n\t\t\t\t$postBO = new PostBO($this->_UserInfo);\n\t\t\t\t$appUser = $appUserBO->SelectByAppUserIDAndLoggedInAppUserID($appuserid, $appUserID);\n\t\t\t\t$logger->debug(\"User email is::\" . $appUser->getEmail());\n\t\t\t\t\n\t\t\n\t\t\t\t$submodels = array();\n\t\t\t\t$submodels[] = $appUser;\n\t\t\t\t$whotofollow = $appUserBO->SelectWhoToFollow($appUserID);\n\t\t\t\t$logger->debug(\"Got who to follow \" . sizeof($whotofollow));\n\t\t\t\t$submodels[] = $whotofollow;\n\t\t\n\t\t\t\t$posts = $postBO->SelectByUserFollowers($appuserid);\n\t\t\t\t$submodels[] = $posts;\n\t\t\n\t\t\t\t$appUsers = $appUserBO->SelectFollowers($appuserid, $appUserID);\n\t\t\t\t$submodels[] = $appUsers;\n\t\t\n\t\t\t\t$logger->debug(\"This submodels \" . sizeof($submodels));\n\t\t\t\t$this->view->setSubmodels($submodels);\n\t\t\t\treturn $this->view->output($appUser);\n\t\t\t}\n\t\t\tcatch (Exception $ex)\n\t\t\t{\n\t\t\t\t$logger->error($ex->getMessage());\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "c96edffa6fdaa776c30771892bbce1cb", "score": "0.5688682", "text": "function users() {\n $ret = array();\n\n foreach($this->domains() as $d=>$domain_object) {\n foreach($domain_object->users() as $user)\n\t$ret[] = \"{$user}@{$d}\";\n }\n\n return $ret;\n }", "title": "" }, { "docid": "8d959bfc802d8eee421ae1a93c6589ff", "score": "0.56788963", "text": "function bbp_get_users_for_object($object_id = 0, $rel_key = '', $rel_type = 'post')\n{\n}", "title": "" }, { "docid": "0d1a8eff08022e720078bba7e74ea474", "score": "0.56715137", "text": "public function listUsers() {\n $url = self::URL . \"/\" . self::VERSION . \"/users.xml\";\n $method = \"GET\";\n $xml = $this->_sendRequest($url, $method);\n $users = array();\n foreach ($xml->user as $user) {\n $users[] = BugHerd_User::fromXml($user);\n }\n return $users;\n }", "title": "" }, { "docid": "c37d5b53272ab344cd8e41ac3583f040", "score": "0.5667086", "text": "function wporg_get_workshop_other_contributors( $workshop = null ) {\n\t$post = get_post( $workshop );\n\t$other_contributors = get_post_meta( $post->ID, 'other_contributor_wporg_username' );\n\t$wp_users = array();\n\n\tforeach ( $other_contributors as $other_contributor ) {\n\t\t$wp_user = get_user_by( 'login', $other_contributor );\n\n\t\tif ( $wp_user ) {\n\t\t\tarray_push( $wp_users, $wp_user );\n\t\t}\n\t}\n\n\treturn $wp_users;\n}", "title": "" }, { "docid": "079814a2327d535ea0b155a00e40e5c5", "score": "0.56666905", "text": "public function getUserInfos($fb) {\n\t\t\t// FACEBOOK\n\t\t $helper = $fb->getRedirectLoginHelper();\n\t\t // CREATE AN TOKEN ACCESS\n\t\t try {\n\t\t $accessToken = $helper->getAccessToken();\n\t\t } catch(Facebook\\Exceptions\\FacebookResponseException $e) {\n\t\t // When Graph returns an error\n\t\t echo 'Graph erreur : ' . $e->getMessage();\n\t\t exit;\n\t\t } catch(Facebook\\Exceptions\\FacebookSDKException $e) {\n\t\t // When validation fails or other local issues\n\t\t echo 'Facebook SDK retourne une erreur : ' . $e->getMessage();\n\t\t exit;\n\t\t }\n\n\t\t // EXTEND TOKEN TO 60 DAYS INSTEAD OF 2 HOURS\n\t\t $oAuth2Client = $fb->getOAuth2Client();\n\t\t if (isset($_COOKIE['fbToken'])) {\n\t\t $longLivedAccessToken = $oAuth2Client->getLongLivedAccessToken($_COOKIE['fbToken']);\n\t\t } else {\n\t\t $longLivedAccessToken = $oAuth2Client->getLongLivedAccessToken($accessToken);\n\t\t }\n\n\t\t // IF TOKEN ACCESS EXIST -> CREATE A SESSION\n\t\t if (isset($longLivedAccessToken)) {\n\t\t $_SESSION['facebook_access_token'] = (string) $longLivedAccessToken;\n\t\t setcookie('fbToken', $longLivedAccessToken, time() + 60*24*3600, null, null, false, true);\n\t\t }\n\n\t\t if (isset($_COOKIE['fbToken'])) {\n\t\t $fb->setDefaultAccessToken($_COOKIE['fbToken']);\n\t\t } else {\n\t\t $fb->setDefaultAccessToken($longLivedAccessToken);\n\t\t }\n\n\t\t // RESPONSE\n\t\t try {\n\t\t // PUT WHAT TO GET ON THE USER\n\t\t if (isset($_COOKIE['fbToken'])) {\n\t\t $response = $fb->get('/me?fields=id,name,email,first_name,last_name,picture.width(500),location,gender,birthday', $_COOKIE['fbToken']);\n\t\t } else {\n\t\t $response = $fb->get('/me?fields=id,name,email,first_name,last_name,picture.width(500),location,gender,birthday', $longLivedAccessToken);\n\t\t }\n\t\t } catch(Facebook\\Exceptions\\FacebookResponseException $e) {\n\t\t echo 'Graph erreur : ' . $e->getMessage();\n\t\t exit;\n\t\t } catch(Facebook\\Exceptions\\FacebookSDKException $e) {\n\t\t echo 'Facebook SDK retourne une erreur : ' . $e->getMessage();\n\t\t exit;\n\t\t }\n\n\t\t // GET DATA ABOUT USER W/ FACEBOOK\n\n\t\t $user = $response->getGraphUser();\n\n\t\t return $user;\n\t\t}", "title": "" }, { "docid": "e77f8d6b6b6debd27aa0343f56e3f320", "score": "0.5658971", "text": "public function getUsers() {\n\t\t//no implementation\n\t}", "title": "" }, { "docid": "c05adfdf5e45bcd27e03bde528147cd7", "score": "0.5658707", "text": "public function getUsers(Channel $channel): array;", "title": "" }, { "docid": "af4eeaabca9a0a77c9eb4b1fff4796c3", "score": "0.56433755", "text": "public function getConnectedUsers()\n {\n return [];\n }", "title": "" }, { "docid": "4efbc956e101d7790388fc342ccaeff8", "score": "0.56373703", "text": "function tsml_get_users($keyed_by_id=true) {\n\t$users = get_users(array(\n\t\t'fields' => array('ID', 'user_login'),\n\t));\n\tforeach ($users as $user) {\n\t\t$return[$user->ID] = $user->user_login;\n\t}\n\treturn ($keyed_by_id) ? $return : array_flip($return);\n}", "title": "" }, { "docid": "df5301e96e4e118886572cc6eabe6053", "score": "0.5630665", "text": "function getListOfInvitedUsers($fbUserData) {\n\t// get all invited users list\n\t$fbUserFriends = $fbUserData;\n\t\n\tforeach ($fbUserFriends as $fbUser) {\n\t\t// As we can not capture the email of the invited user as its a extender permission we are putting the facebook email of the user in data. Once the user comes to join the game his original email will be updated.\n\t\t$Zzuser = array();\n\t\t// User facebook Name\n $name = $fbUser['name'];\n\t\t// User First Name \n\t\t$fname = $fbUser['first_name'];\n\t\t// user Last name\n\t\t$lname = $fbUser['last_name'];\n\t\t// user facebook id\n $id = $fbUser['uid'];\n\t\t// Passing all the parameters in array\n\t\t$Zzuser['user_fbid'] = $id;\n\t\t$Zzuser['user_fname'] = $fname;\n\t\t$Zzuser['user_lname'] = $lname;\n\t\t$Zzuser['user_name'] = $name;\n\t\t$Zzuser['user_email'] = $id.'@facebook.com';\n\t\t$Zzuser['user_handle'] = $id.'@facebook.com';\n\t\t$Zzuser['zzuser_status'] = 'invited'; // putting the users status to 'invited'\n // Passing the values in form of array to the function to create the account of the User\n\t\tcreateFacebookUser($Zzuser);\n\t\t$Zzuser = NULL;\n\t}\n}", "title": "" }, { "docid": "6be9e6985b2ab80a3fdc92ba64cdfce5", "score": "0.5611978", "text": "public function getUserList()\n {\n $db = Database::getInstance();\n $db->query(\"SELECT id, username FROM oauth_users\");\n return $db->resultsToJson();\n\n }", "title": "" }, { "docid": "eb86507a2b8a8e41b4a533d8248afa30", "score": "0.561127", "text": "function drupal_user_cohorts($uid, $drupal_cohorts)\n {\n $user_cohorts = array();\n foreach ($drupal_cohorts as $drupal_cohort) {\n if ($uid == $drupal_cohort->uid) {\n //$user_cohorts[] = $drupal_cohort->cohort_name;\n $user_cohorts[] = $drupal_cohort;\n }\n }\n return $user_cohorts;\n }", "title": "" }, { "docid": "8dc19831cdb8c34e30625528f620b437", "score": "0.5609629", "text": "public function getUsers(){\n $userIds = array();\n foreach( $this->members as $member ){\n if( !empty( $member->id) ){\n $userIds[] = $member->id;\n }\n }\n foreach( $this->pending as $member ){\n if( !empty( $member->id) ){\n $userIds[] = $member->id;\n }\n }\n foreach( $this->blocked as $member ){\n if( !empty( $member->id) ){\n $userIds[] = $member->id;\n }\n }\n $userIds[] = $this->owner->id;\n return array_unique($userIds);\n }", "title": "" }, { "docid": "b98e6a99b0f782a1e25387f05650cfe8", "score": "0.5606856", "text": "public function getUser() {\n $users = array();\n try {\n if ($mandrill = $this->getAPIObject()) {\n $users = $mandrill->users->info();\n }\n } catch (\\Exception $e) {\n drupal_set_message(t('Mandrill: %message', array('%message' => $e->getMessage())), 'error');\n $this->log->error($e->getMessage());\n }\n return $users;\n }", "title": "" }, { "docid": "0af7f64198b76108575e0a1adc1f47cf", "score": "0.5606527", "text": "function list_userInfo()\n{\n\t$userManager = new userManager();\n return $userManager->all_userInfo();\n}", "title": "" }, { "docid": "5a78c02e30fd8789ae44389056caf63d", "score": "0.5606076", "text": "static function getOnlineUsers() {\n $users = getEntities(array(\n \"type\" => \"User\",\n \"metadata_name\" => \"session\",\n \"metadata_value\" => \"NULL\",\n \"operand\" => \"IS NOT\"\n ));\n return $users;\n }", "title": "" }, { "docid": "90cc9421fc9b882272e00a83d3727d05", "score": "0.56059325", "text": "public function getUsers()\n\t{\n\t\t$users = [];\n\t\t$roles = $this->get('roles');\n\t\tif (!empty($roles)) {\n\t\t\t$roles = explode(',', $this->get('roles'));\n\t\t\tforeach ($roles as $member) {\n\t\t\t\t$users = array_merge($users, \\App\\PrivilegeUtil::getUserByMember($member));\n\t\t\t}\n\t\t\t$users = $this->filterUsers(array_unique($users));\n\t\t}\n\t\tif (empty($users)) {\n\t\t\t$smowners = $this->get('smowners') ? explode(',', $this->get('smowners')) : [];\n\t\t\tforeach ($smowners as $user) {\n\t\t\t\tif ('Users' !== \\App\\Fields\\Owner::getType($user)) {\n\t\t\t\t\t$users = array_merge($users, \\App\\PrivilegeUtil::getUsersByGroup($user));\n\t\t\t\t} else {\n\t\t\t\t\t$users[] = $user;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$users = $this->filterUsers(array_unique($users));\n\t\t}\n\t\treturn $users;\n\t}", "title": "" }, { "docid": "57755c44f83b01863cb6d2736eedd037", "score": "0.5605837", "text": "public function getuserlistAction()\n {\n $params = $this->_getAllParams();\n $userList = KC\\Repository\\User::getUserList($params);\n echo $userList;\n die();\n }", "title": "" }, { "docid": "b3df362f823c9b2ec37e9a2235fa9f85", "score": "0.559693", "text": "public function hiorg_extract_users($username, $password) {\n if (!self::is_available($this->url_hiorg))\n\t\t\tthrow new \\RuntimeException('HiOrg Login page not available.');\n \n // result array with all users\n $user = array();\n\n // Login user\n $ch = curl_init($this->url_hiorg.'?ov='.$this->code);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_AUTOREFERER, true);\n curl_setopt($ch, CURLOPT_COOKIEJAR, $this->hiorg_cookie);\n curl_setopt($ch, CURLOPT_COOKIEFILE, $this->hiorg_cookie);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $this->hiorg_header);\n curl_setopt($ch, CURLOPT_USERAGENT, $this->hiorg_browser);\n \n // with credentials\n $post = array();\n $post[] = 'username='.$username;\n $post[] = 'password='.$password;\n $post[] = 'submit=Login';\n \n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, implode('&', $post));\n \n $res = self::curl_exec_follow_location($ch, 5);\n \n // get all users\n $post = array();\n $post[] = 'filter_colsum1=131328';\n $post[] = 'filter_colsum2=0';\n $post[] = 'filter_dist_bis=';\n $post[] = 'filter_dist_von=';\n $post[] = 'filter_fahrerlaubnis=';\n $post[] = 'filter_fremdov=0';\n $post[] = 'filter_geheim=0';\n $post[] = 'filter_gruppe=2039';\n $post[] = 'filter_gruppe_und=0';\n $post[] = 'filter_gruppe_zusatz[]=keinegruppe';\n $post[] = 'filter_leitung=0';\n $post[] = 'filter_quali_bis=';\n $post[] = 'filter_quali_von=';\n $post[] = 'filter_scheine=';\n \n curl_setopt($ch, CURLOPT_URL, 'https://www.hiorg-server.de/ajax/mitglieder_liste.php');\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, implode('&', $post));\n \n $res = self::curl_exec_follow_location($ch, 5);\n $json = json_decode($res);\n \n curl_setopt($ch, CURLOPT_URL, 'https://www.hiorg-server.de/userliste.php');\n curl_setopt($ch, CURLOPT_POST, false);\n \n $userliste = curl_exec($ch);\n \n // Logout and close connection\n curl_setopt($ch, CURLOPT_URL, 'https://www.hiorg-server.de/logout.php');\n curl_exec($ch);\n curl_close($ch);\n @unlink($this->hiorg_cookie);\n \n // json->zeilen:\n // [1] lastname [2] firstname [3] ident code (short) [4] qualification\n foreach ($json->zeilen as $row) {\n $id = strstr($row[5], '_id=');\n $cut = strstr($id, '&');\n $id = str_replace('_id=', '', str_replace($cut, '', $id));\n \n $lastname = self::set_umlauts(self::hiorg_remove_warning($row[1]));\n $lastname = str_replace('&lt;/span&gt;', '', $lastname);\n $lastname = str_replace('&gt;', '', strstr($lastname, '&gt;'));\n \n $firstname = self::set_umlauts($row[2]);\n $sign = $row[3];\n \n $username = self::set_umlauts(strstr($userliste, 'simuser='.$id));\n $cut = strstr($username, '<');\n $username = str_replace(\"simuser=$id' title='diesen Benutzer simulieren'>\", '', str_replace($cut, '', $username));\n \n $perms = strstr($cut, 'helfer');\n $cut = strstr($perms, '<');\n $perms = str_replace($cut, '', $perms);\n \n $obj = new \\stdClass();\n $obj->user_id = $id;\n $obj->username = $username;\n $obj->name = $lastname;\n $obj->vorname = $firstname;\n $obj->kuerzel = $sign;\n $obj->perms = $perms;\n \n $user[] = $obj;\n }\n \n return $user;\n }", "title": "" }, { "docid": "1faaa7d981e3091b7a3873e3849d4222", "score": "0.55933803", "text": "public function get_users()\n\t{\n\t\t$this->fetch_users();\n\n\t\t$this->theme->add_user_form = FormUI::build('add_user', 'add_user')->get();\n\t\t$this->theme->currentuser = User::identify();\n\n\t\t$this->theme->display( 'users' );\n\t}", "title": "" }, { "docid": "d5cd910578156d1ce5917325e16f6805", "score": "0.55870116", "text": "public function getScraperUsers() {\n $allowed_roles = Role::whereIn('key', ['admin', 'editor'])->get();\n $permissions = [];\n $admin_perm = 0;\n $editor_perm = 0;\n foreach($allowed_roles as $role) {\n $permissions[] = $role->permission;\n\n if ($role->key == 'admin')\n $admin_perm = $role->permission;\n else \n $editor_perm = $role->permission;\n }\n\n $users = [\n 'admin' => [],\n 'editor' => []\n ];\n\n if (count($permissions) == 0)\n return $users;\n\n $available_users = User::whereIn('permission', $permissions)->where('status', 'active')->orderBy('id', 'asc')->get();\n foreach($available_users as $user) {\n if ($user->permission == $admin_perm)\n $users['admin'][] = $user;\n else\n $users['editor'][] = $user;\n }\n\n return $users;\n }", "title": "" }, { "docid": "44013a1f12f5a6968da78701bc3bc084", "score": "0.5577004", "text": "public function getUserData()\n {\n $data = parent::getUserData();\n // graph 2.3 change\n $data = json_decode(key($data), true);\n\n if (isset($data['access_token'])) {\n $parameters = array(\n 'access_token' => $data['access_token']\n );\n\n $url = $this->getOption('profileUrl') . '?' . http_build_query($parameters);\n\n $response = json_decode(file_get_contents($url));\n\n return array_merge($data, (array) $response);\n }\n\n return $data;\n }", "title": "" }, { "docid": "0c3291315588f8773294cee393e794f8", "score": "0.5572467", "text": "function wporg_get_workshop_presenters( $workshop = null ) {\n\t$post = get_post( $workshop );\n\t$presenters = get_post_meta( $post->ID, 'presenter_wporg_username' );\n\t$wp_users = array();\n\n\tforeach ( $presenters as $presenter ) {\n\t\t$wp_user = get_user_by( 'login', $presenter );\n\n\t\tif ( $wp_user ) {\n\t\t\tarray_push( $wp_users, $wp_user );\n\t\t}\n\t}\n\n\treturn $wp_users;\n}", "title": "" }, { "docid": "3a11ad396286480d8e7b2dd6e513b9c7", "score": "0.55662084", "text": "function get_logged_in_user()\n{\n global $_PAGE;\n\n if (empty($_SESSION['user_id']))\n return NULL;\n\n $result = pg_query_params('select * from users where id = $1', array($_SESSION['user_id']));\n\n if (pg_num_rows($result) < 1)\n return NULL;\n\n $_PAGE['user'] = pg_fetch_assoc($result);\n return $_PAGE['user'];\n}", "title": "" }, { "docid": "508a2b43bde0221b986f4981dbd06d1c", "score": "0.5562351", "text": "public function userFollowers ()\n\t{\n\t\t\t\n\t\t$url = $this->UrlStatus;\n\t\t$url .= 'followers.xml';\n\t\t$statuses = $this->myUserParse($url, 'followers');\n\t\t\t\n\t\treturn $statuses;\n\t\t\t\n\t}", "title": "" }, { "docid": "f7e2e5be1c58afdf297b0b216687ae5f", "score": "0.5554851", "text": "public function getUserNames();", "title": "" }, { "docid": "f51f9b3fd6e9e3df97a95ba87670900c", "score": "0.55509424", "text": "function vsite_get_user_vsites($uid = NULL) {\n\n //Retrieve all group memberships for the user\n $groups = og_get_entity_groups('user', $uid);\n\n if (empty($groups['node'])) {\n return array();\n }\n\n $vsites = array();\n foreach($groups['node'] as $mid => $gid) {\n $vsites[] = spaces_load('og', $gid);\n }\n\n // Filter out any spaces that were not loaded.\n return array_filter($vsites);\n}", "title": "" }, { "docid": "ae6ba38cb6f266b46ab0a836d6b3dfd5", "score": "0.55482376", "text": "function msd_yc_plugin_get_users_ids() {\r\n $users = array();\r\n $usersIDs = get_users(array('fields' => 'ID'));\r\n\r\n return $usersIDs;\r\n}", "title": "" }, { "docid": "85ee388b0f7b43246757c8f5ae584f52", "score": "0.5547506", "text": "function get_conversation_users($conversation_id,$full_users=false)\n {\n /* BENCHMARK */ $this->benchmark->mark('func_get_conversation_users_start');\n\n $participants=array();\n\n $query=$this->db->select('user_id')->from('user_conversation')->where(array('conversation_id'=>$conversation_id));\n \t$res=$query->get();\n \t$participants=$res->result_array();\n\n if (true==$full_users)\n {\n $this->load->model('node_model');\n\n for($x=0;$x<count($participants);$x++)\n {\n $participants[$x]['details']=$this->node_model->get_node($participants[$x]['user_id']);\n }\n }\n\n /* BENCHMARK */ $this->benchmark->mark('func_get_conversation_users_end');\n\n return $participants;\n }", "title": "" }, { "docid": "7f192e1927b3b2af7caba7a101168fcd", "score": "0.5537896", "text": "function getUserList()\n\t{\n\t\t//getUsers\n\t\t\n\t\t$functionurl =\"\";\n\t\t$functionName = 'getUsers';\n\t\t\n\t\t$functionurl .= $this->baseurl;\n\t\t$functionurl .= $functionName;\n\t\t\n\t\t$json = file_get_contents($functionurl, false);\n\t\t//Man erhält vom Server ein JSON Objekt\n\t\t\n\t\t\n\t\t$obj = json_decode($json);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tif(isset($obj->{'success'}))//verbindung steht\n\t\t{\n\t\t\tif($obj->{'success'}==true)//hat geklappt\n\t\t\t{\n\t\t\t\treturn $obj->{'users'};\n\t\t\t}\n\t\t\telse//hat nicht geklappt\n\t\t\t{\n\t\t\t\treturn $obj->{'error'};//fehlermeldung\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "b979d3d199857f78226b0fa6205efec2", "score": "0.552873", "text": "public function listUser();", "title": "" }, { "docid": "e3679996db7dc5966552627b9b3d7223", "score": "0.5528016", "text": "function get_list_of_users(&$rMsg) {\n $fileName = _get_user_info_filename();\n $users = array();\n if ( file_exists($fileName) ) {\n $users = json_decode(file_get_contents($fileName));\n }\n else {\n $rMsg=\"Unable to get list of users\";\n }\n if ( $users == null ) {\n $users = array(); \n }\n return $users;\n}", "title": "" }, { "docid": "4414a95521d48b1fdc42c756e5a73901", "score": "0.552499", "text": "protected function getUsers(){\r\t\t\t\r\t\t\t//obtengo todos los usuarios\r\t\t\t$filter_search = JRequest::getVar( 'filter_search' );\r\t\t\t$limit = JRequest::getVar( 'limit' , 10 );\r\t\t\t$limitstart = JRequest::getVar( 'limitstart' , '');\r\t\t\t\r\t\t\t$this->itemsall = $this->model_user->getObjects();\r\t\t\t\r\t\t\t$prlimits = array();\r\t\t\tif( is_numeric( $limit ) ){\r\t\t\t\t$prlimits = array(\r\t\t\t\t\t\t'limitstart' => $limitstart\r\t\t\t\t\t,\t'limit' => $limit\r\t\t\t\t);\r\t\t\t}\r\t\t\t\r\t\t\t$users_jw = $this->model_user->getObjects( array() , $prlimits );\r\t\t\t\r\t\t\t\r\t\t\tif( count($users_jw) ){\r\t\t\t\t//agrego informacion adicional para todos los usuarios\r\t\t\t\t$pos_user = 0;\r\t\t\t\tforeach( $users_jw as $key=>$user ){\r\t\t\t\t\t\r\t\t\t\t\t$model_user = new ReferidosModelUser();\r\t\t\t\t\t$model_user->instance( (int) $user->userid );\r\t\t\t\t\t\r\t\t\t\t\t$wheres_user = array();\r\t\t\t\t\tif( isset($filter_search) ){\r\t\t\t\t\t\t$wheres_user[] = (object) array(\r\t\t\t\t\t\t\t\t\t\t\t\t\t'key' => ' ( name'\r\t\t\t\t\t\t\t\t\t\t\t\t,\t'condition' => ' LIKE '\r\t\t\t\t\t\t\t\t\t\t\t\t,\t'value' => \"'%$filter_search%' OR email LIKE '%$filter_search%')\"\r\t\t\t\t\t\t\t\t\t\t\t\t,\t'glue' => ''\r\t\t\t\t\t\t\t\t\t\t\t);\r\t\t\t\t\t}\r\t\t\t\t\t\r\t\t\t\t\t$user_inf = $model_user->getUserInf( $wheres_user );\r\t\t\t\t\t\r\t\t\t\t\t//var_dump( $user_inf );\r\t\t\t\t\t\r\t\t\t\t\t$wheres_planes = array(\r\t\t\t\t\t\t0 => (object) array(\r\t\t\t\t\t\t\t\t'key' => 'a.estado_plan'\r\t\t\t\t\t\t\t,\t'condition' => ' <> '\r\t\t\t\t\t\t\t,\t'value' => '0'\r\t\t\t\t\t\t\t,\t'glue' => ''\r\t\t\t\t\t\t)\r\t\t\t\t\t);\r\t\t\t\t\t$params_user = array(\r\t\t\t\t\t\t'order' => 'fecha_adquiere DESC'\r\t\t\t\t\t);\r\t\t\t\t\t$user_planes = $model_user->getUserPlanes( $wheres_planes , $params_user);\r\t\t\t\t\t\r\t\t\t\t\t//var_dump( $user_planes );\r\t\t\t\t\t\r\t\t\t\t\t//compruebo si el filtro de plan es aplicado\r\t\t\t\t\t$app = JFactory::getApplication();\r\t\t\t\t\t$filterplan = $app->getUserState( 'filter.referidos.user.id_plan' );\r\t\t\t\t\t$pasa_plan = true;\r\t\t\t\t\tif( empty($user_planes) && $filterplan != '')\r\t\t\t\t\t\t$pasa_plan = false;\r\t\t\t\t\t\r\t\t\t\t\tif( !empty($user_inf) && $pasa_plan ){\r\t\t\t\t\t\t\r\t\t\t\t\t\t$this->items[ $pos_user ] = $user;\r\t\t\t\t\t\t\r\t\t\t\t\t\t//obtener información adicional\r\t\t\t\t\t\tif( count($user_inf) ){\r\t\t\t\t\t\t\tforeach( $user_inf as $attr=>$valor ){\r\t\t\t\t\t\t\t\t$this->items[ $pos_user ]->$attr = $valor;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\tunset($valor);\r\t\t\t\t\t\t}\r\t\t\t\t\t\t\r\t\t\t\t\t\t//obtener planes de usuario\r\t\t\t\t\t\t$this->items[ $pos_user ]->planes = $user_planes;\r\t\t\t\t\t\t\r\t\t\t\t\t\t//obtener invitados por usuario\r\t\t\t\t\t\t$model_invt = new ReferidosModelInvitado();\r\t\t\t\t\t\t$wheres_invt = array(\r\t\t\t\t\t\t\t0 => (object) array(\r\t\t\t\t\t\t\t\t\t'key' => 'id_user'\r\t\t\t\t\t\t\t\t,\t'condition' => ' = '\r\t\t\t\t\t\t\t\t,\t'value' => $user->id\r\t\t\t\t\t\t\t\t,\t'glue' => ''\r\t\t\t\t\t\t\t)\r\t\t\t\t\t\t\t,\r\t\t\t\t\t\t\t1 => (object) array(\r\t\t\t\t\t\t\t\t\t'key' => ' GROUP BY'\r\t\t\t\t\t\t\t\t,\t'condition' => ' correo_invt, id_facebook '\r\t\t\t\t\t\t\t\t,\t'value' => ''\r\t\t\t\t\t\t\t\t,\t'glue' => ''\r\t\t\t\t\t\t\t)\r\t\t\t\t\t\t\t,\r\t\t\t\t\t\t\t2 => (object) array(\r\t\t\t\t\t\t\t\t\t'key' => 'ORDER BY'\r\t\t\t\t\t\t\t\t,\t'condition' => ' fecha_invt DESC'\r\t\t\t\t\t\t\t\t,\t'value' => ''\r\t\t\t\t\t\t\t\t,\t'glue' => ''\r\t\t\t\t\t\t\t)\r\t\t\t\t\t\t);\r\t\t\t\t\t\t$invt_user = $model_invt->getObjects( $wheres_invt );\r\t\t\t\t\t\t$this->items[ $pos_user ]->invitados = $invt_user;\r\t\t\t\t\t\t\r\t\t\t\t\t\t//obtener referidos por usuario\r\t\t\t\t\t\t$referidos_user = array();\r\t\t\t\t\t\tif( count($user_planes) ){\r\t\t\t\t\t\t\tforeach( $user_planes as $pos=>$plan){\r\t\t\t\t\t\t\t\t\r\t\t\t\t\t\t\t\t$wheres_ref = array(\r\t\t\t\t\t\t\t\t\t0 => (object) array(\r\t\t\t\t\t\t\t\t\t\t\t'key' => 'id_user_plan'\r\t\t\t\t\t\t\t\t\t\t,\t'condition' => ' = '\r\t\t\t\t\t\t\t\t\t\t,\t'value' => $plan->id_user_plan\r\t\t\t\t\t\t\t\t\t\t,\t'glue' => 'AND'\r\t\t\t\t\t\t\t\t\t)\r\t\t\t\t\t\t\t\t);\r\t\t\t\t\t\t\t\t$model_ref = new ReferidosModelReferido();\r\t\t\t\t\t\t\t\t$referidos = $model_ref->getObjects( $wheres_ref );\r\t\t\t\t\t\t\t\t\r\t\t\t\t\t\t\t\tif( is_array($referidos) )\r\t\t\t\t\t\t\t\t\t$referidos_user = array_merge( $referidos_user , $referidos);\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\tunset($plan);\r\t\t\t\t\t\t}\r\t\t\t\t\t\t\r\t\t\t\t\t\t$this->items[ $pos_user ]->referidos = $referidos_user;\r\t\t\t\t\t}\r\t\t\t\t\t$pos_user++;\r\t\t\t\t}\r\t\t\t\tunset($user);\r\t\t\t}\r\t\t}", "title": "" }, { "docid": "cef06049db236d9ba04e99cd475decfa", "score": "0.5524399", "text": "public function getUsersOnline() {\n\t\t$sql = \"SELECT \t\t\".$this->sqlSelects.\"\n\t\t\t\t\tuser_option.userOption\".User::getUserOptionID('invisible').\", session.userID, session.username as guestname, session.ipAddress,\n\t\t\t\t\tsession.userAgent, session.lastActivityTime, session.requestURI, session.sessionID,\n\t\t\t\t\tsession.requestMethod, session.spiderID, groups.userOnlineMarking, user.username \n\t\t\tFROM \t\twcf\".WCF_N.\"_session session\n\t\t\tLEFT JOIN \twcf\".WCF_N.\"_user user\n\t\t\tON\t\t(user.userID = session.userID)\n\t\t\tLEFT JOIN \twcf\".WCF_N.\"_user_option_value user_option\n\t\t\tON\t\t(user_option.userID = session.userID)\n\t\t\tLEFT JOIN \twcf\".WCF_N.\"_group groups\n\t\t\tON\t\t(groups.groupID = user.userOnlineGroupID)\n\t\t\t\".$this->sqlJoins.\"\n\t\t\tWHERE \t\tsession.packageID = \".PACKAGE_ID.\"\n\t\t\t\t\tAND session.lastActivityTime > \".(TIME_NOW - USER_ONLINE_TIMEOUT).\"\n\t\t\t\t\t\".($this->getSpiders ? '' : 'AND session.spiderID = 0').\"\n\t\t\t\t\t\".(!$this->enableOwnView ? (\"AND session.sessionID <> '\".WCF::getSession()->sessionID.\"'\".(WCF::getUser()->userID ? \" AND session.userID <> \".WCF::getUser()->userID : '')) : '').\"\n\t\t\t\t\t\".$this->sqlConditions.\" \n\t\t\tORDER BY \t\".$this->sqlOrderBy;\n\t\t$result = WCF::getDB()->sendQuery($sql);\n\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t$this->handleRow($row, new User(null, $row));\n\t\t}\n\t}", "title": "" }, { "docid": "4487f6a0c3e6ef808fcb930eec3baf6a", "score": "0.5520208", "text": "public function getUsers() {\n\t\tif ($this->users) {\n\t\t\treturn $this->users;\n\t\t}\n\n\t\t$userIds = array();\n\t\tforeach ($this->backends as $backend) {\n\t\t\t$diff = array_diff(\n\t\t\t\t$backend->usersInGroup($this->gid),\n\t\t\t\t$userIds\n\t\t\t);\n\t\t\tif ($diff) {\n\t\t\t\t$userIds = array_merge($userIds, $diff);\n\t\t\t}\n\t\t}\n\n\t\t$this->users = $this->getVerifiedUsers($userIds);\n\t\treturn $this->users;\n\t}", "title": "" }, { "docid": "3a0a0fa634eca711432680e0a32f4c73", "score": "0.5518848", "text": "function qruqsp_admin_userList($q) {\n //\n // Check access \n //\n qruqsp_core_loadMethod($q, 'qruqsp', 'admin', 'private', 'checkAccess');\n $rc = qruqsp_admin_checkAccess($q, 0, 'qruqsp.admin.userList');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Query for the all users\n //\n $strsql = \"SELECT id, email, username, callsign, license, perms, status, display_name \"\n . \"FROM qruqsp_core_users \"\n . \"ORDER BY callsign \"\n . \"\";\n qruqsp_core_loadMethod($q, 'qruqsp', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = qruqsp_core_dbHashQueryArrayTree($q, $strsql, 'qruqsp.core', array(\n array('container'=>'users', 'fname'=>'id', 'fields'=>array('id', 'email', 'username', 'callsign', 'license', 'perms', 'status', 'display_name')),\n ));\n return $rc;\n}", "title": "" }, { "docid": "d75c46065341ee9589d05bcd8d82955e", "score": "0.55150044", "text": "public function get_filtered_graph_users()\n\t{\n\t\t$highcharts = (array)$this->ci->load->get_var('highcharts');\n\t\t$highchart = $highcharts[$this->highchart_id];\n\t\tif($highchart->error == true){ return $this; }\n\t\t\n\t\t$graph = $highchart->graph;\n\t\t$final_users = array();\n\t\t$users_from_database = true;\n\t\t\n\t\t$graph_users = $this->ci->Graph_model->get_graph_users($graph->graph_id);\n\t\t\n\t\tif(is_array($this->filter_data['users']))\n\t\t{\n\t\t\t$users_from_database = false;\n\t\t\t$tmp_users = array();\n\t\t\t\n\t\t\tforeach($this->filter_data['users'] as $user)\n\t\t\t{\n\t\t\t\t$existence = $this->ci->Graph_model->get_graph_users($graph->graph_id, $user['id']);\n\t\t\t\tif($existence)\n\t\t\t\t{\n\t\t\t\t\t$tmp_users[] = $existence;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$final_users = $tmp_users;\n\t\t}\t\n\t\t\n\t\tif($final_users == false || empty($final_users) )\n\t\t{\n\t\t\t$highchart->error = true;\n\t\t\t$highchart->error_type = \"user\";\n\t\t\t$highchart->error_message = \"No users selected to pull kpi data.\";\t\n\t\t}\n\t\t\n\t\tif(count($final_users) == count($graph_users)){\n\t\t\t$users_from_database = true;\n\t\t}\n\t\t\n\t\t$highchart->final_users = $final_users;\t\n\t\t$highchart->users_from_database = $users_from_database;\t\n\t\t\n\t\t$highcharts[$this->highchart_id] = $highchart; \n\t\t$this->ci->load->vars(array('highcharts' => $highcharts));\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "563648582f020867936f8875b82eefda", "score": "0.55148053", "text": "function bbp_get_total_users()\n{\n}", "title": "" }, { "docid": "720ca974aa79c7742685ba723c64c96f", "score": "0.5514134", "text": "function getUsers() {\n return $this->getValues('users');\n }", "title": "" }, { "docid": "9686da51ebeb07f0170f4c7079cad490", "score": "0.55133945", "text": "public function get_user_list() {\n\t\t$this->sql = \"SELECT user_id, concat(user_forename,' ',user_surname) user_name FROM sys_user;\";\n\t\t$this->connect->query($this->sql);\n\t\treturn $this->connect->resultArrayValues();\n\t}", "title": "" }, { "docid": "72ef7beb46c95ccda0cb17cde6f3bca4", "score": "0.5507013", "text": "function getUsers($data){\n\tif(count($data) > 0){\n\t\t//f\t\tunciones para traer usuarios\n\t\tswitch ($data['action']) {\n\t\t\tcase 'login':\n\t\t\tlogin($data);\n\t\t\tbreak;\n\t\t\tcase 'getUserById':\n\t\t\tgetUserById($data);\n\t\t\tbreak;\n\t\t\tcase 'getUserBySskey':\n\t\t\tgetUserBySskey($data);\n\t\t\tbreak;\n\t\t\tcase 'getAll':\n\t\t\tgetAllUsers($data);\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\tprint_r($errors);\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}\n\telse{\n\t\tgetAllUsers($data);\n\t}\n}", "title": "" }, { "docid": "d4415db0716699e585a3ff1e7e6ec824", "score": "0.5505261", "text": "public function userfollowinggrid()\n\t\t{\n\t\t\t$logger = Logger::getLogger(__CLASS__);\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$appuserid = $_GET[\"id\"];\n\t\t\t\t$appUserID = 0;\n\t\t\t\tif (isset($_COOKIE[\"ropaziuser\"])){\n\t\t\t\t\t$logger->debug(\"Got user cookie\");\n\t\t\t\t\t$logger->debug($_COOKIE[\"ropaziuser\"]);\n\t\t\t\t\t$appUserID = CommonUtils::verifyUserCookie();\n\t\t\t\t}\n\t\t\t\t$logger->debug(\"Got app user id::\" . $appuserid);\n\t\t\t\t$appUserBO = new AppUserBO($this->_UserInfo);\n\t\t\t\t$postBO = new PostBO($this->_UserInfo);\n\t\t\t\t$appUser = $appUserBO->SelectByAppUserIDAndLoggedInAppUserID($appuserid, $appUserID);\n\t\t\t\t$logger->debug(\"User email is::\" . $appUser->getEmail());\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t$submodels = array();\n\t\t\t\t$submodels[] = $appUser;\n\t\t\t\t$whotofollow = $appUserBO->SelectWhoToFollow($appUserID);\n\t\t\t\t$logger->debug(\"Got who to follow \" . sizeof($whotofollow));\n\t\t\t\t$submodels[] = $whotofollow;\n\t\t\t\t\t\n\t\t\t\t$posts = $postBO->SelectByUserFollowing($appuserid);\n\t\t\t\t$submodels[] = $posts;\n\t\t\t\t\t\n\t\t\t\t$appUsers = $appUserBO->SelectFollowing($appuserid, $appUserID);\n\t\t\t\t$submodels[] = $appUsers;\n\t\t\t\t\t\n\t\t\t\t$logger->debug(\"This submodels \" . sizeof($submodels));\n\t\t\t\t$this->view->setSubmodels($submodels);\n\t\t\t\treturn $this->view->output($appUser);\n\t\t\t}\n\t\t\tcatch (Exception $ex)\n\t\t\t{\n\t\t\t\t$logger->error($ex->getMessage());\n\t\t\t}\n\t\t\t\t\n\t\t}", "title": "" }, { "docid": "cd5810044dc7d02de0be2fd1f8cba952", "score": "0.5497542", "text": "function microbot_get_all_users($token) {\n $slack = new Slack($token);\n $resp = _slack_call_api_cached($slack, 'users.list', [], MICROBOT_TTL_1_HOUR);\n if (!$resp['ok']) return false;\n\n // Build mapping of user id → username\n $users_by_id = [];\n foreach ($resp['members'] as $member) {\n $users_by_id[$member['id']] = $member['profile']['display_name_normalized'];\n }\n\n // Build list of users with microbot IMs\n $resp = _slack_call_api_cached($slack, 'im.list', [], MICROBOT_TTL_1_HOUR);\n if (!$resp['ok']) return false;\n\n $users = [];\n foreach ($resp['ims'] as $im) {\n if ($im['user'] === 'USLACKBOT') continue;\n $users[] = $users_by_id[$im['user']];\n }\n\n return $users;\n}", "title": "" }, { "docid": "a78b4fcae504e28237f93948f21b5203", "score": "0.5494771", "text": "public function getUsers()\n\t{\n // Initialise variables.\n $app = JFactory::getApplication();\n \n JModelLegacy::addIncludePath(JPATH_ROOT.'/administrator/components/com_hwdmediashare/models');\n $this->model = JModelLegacy::getInstance('Users', 'hwdMediaShareModel', array('ignore_request' => true));\n $this->model->populateState();\n $this->model->setState('filter.channel', false);\n $this->model->setState('filter.search', $this->getState('filter.search'));\n $this->model->setState('list.ordering', 'u.registerDate');\n $this->model->setState('list.direction', 'ASC');\n \n return $this->model->getItems(); \n\t}", "title": "" }, { "docid": "374659b870393abc39abce22730e23e5", "score": "0.54941267", "text": "private function getImportantUsers() {\n $this->admin[] = new Users(1);\n $this->admin[] = new Users(3);\n $this->admin[] = new Users(4);\n }", "title": "" }, { "docid": "d10abc2e6018ebdfd31cccefb1350c48", "score": "0.54900855", "text": "public static function getUsers() {\n\n\t\t$oStoreParams = BsExtJSStoreParams::newFromRequest();\n\t\t$iLimit = $oStoreParams->getLimit();\n\t\t$iStart = $oStoreParams->getStart();\n\t\t$sSort = $oStoreParams->getSort( 'user_name' );\n\t\t$sDirection = $oStoreParams->getDirection();\n\t\t$aFilters = $oStoreParams->getFilter();\n\n\t\t$aSortingParams = FormatJson::decode( $sSort );\n\t\tif ( is_array( $aSortingParams ) ) {\n\t\t\t$sSort = $aSortingParams[0]->property;\n\t\t\t$sDirection = $aSortingParams[0]->direction;\n\t\t}\n\n\t\t$dbr = wfGetDB( DB_SLAVE );\n\n\t\tglobal $wgDBtype, $wgDBprefix;\n\t\t//PW TODO: filter for oracle\n\t\tif( $wgDBtype == 'oracle' ) {\n\t\t\t$res = $dbr->query(\n\t\t\t\t\"SELECT * FROM\n\t\t\t\t\t(\n\t\t\t\t\t\tSELECT user_id,user_name,user_real_name,user_email,row_number() OVER (ORDER BY \".$sSort.\" \".$sDirection.\") rnk\n\t\t\t\t\t\tFROM \\\"\".strtoupper($wgDBprefix).\"MWUSER\\\"\n\t\t\t\t\t)\n\t\t\t\tWHERE rnk BETWEEN \".($iStart+1).\" AND \".($iLimit + $iStart)\n\t\t\t);\n\t\t} else {\n\t\t\t$aTables = array(\n\t\t\t\t'user'\n\t\t\t);\n\n\t\t\t$aOptions = array(\n\t\t\t\t'ORDER BY' => $sSort.' '.$sDirection,\n\t\t\t\t'LIMIT' => $iLimit,\n\t\t\t\t'OFFSET' => $iStart\n\t\t\t);\n\n\t\t\t$aJoins = array();\n\n\t\t\t$aConditions = array();\n\t\t\tif( !empty($aFilters) ) {\n\t\t\t\tforeach($aFilters as $oFilter) {\n\t\t\t\t\tswitch($oFilter->field) {\n\t\t\t\t\t\tcase 'user_name':\n\t\t\t\t\t\t\t$aConditions[] = \"user_name LIKE '%\".trim($oFilter->value).\"%'\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'user_real_name':\n\t\t\t\t\t\t\t$aConditions[] = \"user_real_name LIKE '%\".trim($oFilter->value).\"%'\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'user_email':\n\t\t\t\t\t\t\t$aConditions[] = \"user_email LIKE '%\".trim($oFilter->value).\"%'\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'groups':\n\t\t\t\t\t\t\t$aTables[] = 'user_groups';\n\t\t\t\t\t\t\t$aConditions[] = \"ug_group IN ('\".implode(\"','\", $oFilter->value).\"')\";\n\t\t\t\t\t\t\t$aJoins['user_groups'] = array('LEFT JOIN', 'ug_user=user_id');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$res = $dbr->select(\n\t\t\t\t$aTables,\n\t\t\t\t'*',\n\t\t\t\t$aConditions,\n\t\t\t\t__METHOD__,\n\t\t\t\t$aOptions,\n\t\t\t\t$aJoins\n\t\t\t);\n\t\t}\n\n\t\t$data = array();\n\t\t$data['users'] = array();\n\n\t\twhile( $row = $res->fetchObject() ) {\n\t\t\t$oUserTitle = Title::newFromText($row->user_name, NS_USER);\n\t\t\t$tmp = array();\n\t\t\t$tmp['user_id'] = $row->user_id;\n\t\t\t$tmp['user_name'] = $row->user_name;\n\t\t\t$tmp['user_page_link'] = Linker::link( $oUserTitle, $row->user_name.' ' ); //The whitespace is to aviod automatic rewrite to user_real_name by BSF\n\t\t\t$tmp['user_real_name'] = $row->user_real_name;\n\t\t\t$tmp['user_email'] = $row->user_email == null ? '' : $row->user_email; //PW: Oracle returns null when field is emtpy\n\t\t\t$tmp['groups'] = array();\n\n\t\t\t$res1 = $dbr->select( 'user_groups', 'ug_group', 'ug_user='.$row->user_id );\n\t\t\twhile( $row1 = $res1->fetchObject() ) {\n\t\t\t\t//$tmp['groups'][] = ( !wfMessage( 'group-' . $row1->ug_group )->inContentLanguage()->isBlank() ) ? wfMessage( 'group-' . $row1->ug_group )->plain() : $row1->ug_group ;\n\t\t\t\tif ( !wfMessage( 'group-' . $row1->ug_group )->inContentLanguage()->isBlank() ) {\n\t\t\t\t\t$tmp['groups'][] = array( 'group' => $row1->ug_group, 'displayname' => wfMessage( 'group-' . $row1->ug_group )->plain() . \" (\" . $row1->ug_group . \")\" );\n\t\t\t\t} else {\n\t\t\t\t\t$tmp['groups'][] = array( 'group' => $row1->ug_group, 'displayname' => $row1->ug_group );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( is_array( $tmp['groups'] ) ) sort( $tmp['groups'] );\n\t\t\t$data['users'][] = $tmp;\n\t\t}\n\n\t\t$row = $dbr->selectRow( 'user', 'COUNT( user_id ) AS cnt', array() );\n\t\t$data['totalCount'] = $row->cnt;\n\n\t\t$oUserManager = BsExtensionManager::getExtension( 'UserManager' );\n\t\twfRunHooks( 'BSWikiAdminUserManagerBeforeUserListSend', array( $oUserManager, &$data ) );\n\n\t\treturn FormatJson::encode( $data );\n\t}", "title": "" }, { "docid": "e6eee7f5fddf3f75caf40f64a0a87c7e", "score": "0.54896975", "text": "function getAllFriends($fb, $accessToken)\n{\n $res = $fb->get('/me/friends?fields=id,name,first_name,middle_name,last_name&limit=500', $accessToken);\n $edge = $res->getGraphEdge();\n\n $friends = [];\n $i = 0;\n while (isset($edge)) {\n foreach ($edge as $user) {\n $friends[] = $user->asArray();\n }\n\n $edge = $fb->next($edge);\n }\n\n return $friends;\n}", "title": "" }, { "docid": "6737d80b7c448c4362855ee5aac0524e", "score": "0.5485366", "text": "function fetchUserList() {\n\t////start userlist\n\t$returnlist = array();\n\t$sql = \"SELECT GUID, FIRSTNAME, SURNAME, FIN_ACC_NUM FROM `User_Profiles`\";\n\t$sql = mysql_query($sql);\n\tfor ($index = 0; $index < mysql_num_rows($sql); $index++) {\n\t\t//store them in an array\n\t\t$temparray = mysql_fetch_assoc($sql);\n\t\n\t\t/* Admin can filter out test accounts\n\t\tif ($temparray['IS_TEST_USER'] == 0) {\t//don't add test accounts\n\t\t}\n\t\t*/\n\t\t$returnlist[$temparray['GUID']] = $temparray;\n\t}\n\tif($DEBUG)fb($returnlist);\n\treturn $returnlist;\n////end userlist\n}", "title": "" }, { "docid": "4dc706efe1f233a1c75677cc1eaa0cd6", "score": "0.5483164", "text": "abstract protected function selectUsers();", "title": "" }, { "docid": "573b05c195541918edc11e4423590a5f", "score": "0.5481975", "text": "public function listusers(){\n $this->cpanel_api_ver = 'api2';\n return $this->_check_result($this->api2_query($this->user, 'MysqlFE', __FUNCTION__));\n }", "title": "" }, { "docid": "89fe34481865fa61a23a9fd8390d662a", "score": "0.54731005", "text": "abstract public function getUser();", "title": "" }, { "docid": "7610fea3f3f33ad208210154942e3ab0", "score": "0.54662156", "text": "public function getUserList()\n {\n $db = Database::getInstance();\n $db->query(\"SELECT id, username FROM oauth_users WHERE fkidSupplier = ?\", array($this->_id));\n return $db->resultsToJson();\n\n }", "title": "" }, { "docid": "3f14e1c27e99e9232332b843342bdc6f", "score": "0.545964", "text": "public function getAllJBKUsers() \n {\n $userlogins = array();\n $usernames = array();\n $userslist = array();\n $userslistjson = json_decode($this->JBKUsers->get_userlist(),true);\n //var_dump($userslistjson);\n \tforeach ($userslistjson['user-list']['user'] as $user){\n \t\tforeach ($user as $name=>$login){\n \t\t\tif ($name == 'login') {\n \t\t\t\tarray_push($userlogins, $login);\n \t\t\t}else{\n \t\t\t\tarray_push($usernames, $login);\n \t\t\t}\n \t\t}\n \t}\n \n return array($usernames, $userlogins);\n }", "title": "" }, { "docid": "1905727d556fdce56f00e8ac7ee8d3ea", "score": "0.54577696", "text": "function userList() {\n\t\t$link = Db::link();\n\t\t$list = array();\n\t\t\t\n\t\t$sql = 'SELECT user_id, user_name, user_rank, user_mail, v.nb,\n\t\t user_language, user_tokenid, user_strongauth\n\t\t FROM uservca\n\t\t LEFT JOIN (SELECT vps_owner, count(vps_owner) as nb\n\t\t FROM vps GROUP BY vps_owner) v\n\t\t ON v.vps_owner=uservca.user_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->user_id] = array(\n\t\t\t\t\t'user_id' => $do->user_id,\n\t\t\t\t\t'user_name' => $do->user_name,\n\t\t\t\t\t'user_rank' => $do->user_rank,\n\t\t\t\t\t'user_mail' => $do->user_mail,\n\t\t\t\t\t'user_language' => $do->user_language,\n\t\t\t\t\t'user_tokenid' => $do->user_tokenid,\n\t\t\t\t\t'user_strongauth'=> $do->user_strongauth,\n\t\t\t\t\t'nb_vps' => $do->nb\n\t\t\t);\n\t\t}\n\t\t\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "f8750e05739b09f13a23120b6e78648e", "score": "0.54573244", "text": "function bbp_get_user_object_ids($args = array())\n{\n}", "title": "" }, { "docid": "f8625abeb945551172ba83f689b13787", "score": "0.5449896", "text": "function get_users() {\n global $db;\n $query = \"SELECT * FROM user_profiles\";\n\n $results = $db->Query( $query );\n\n\n $users = array();\n while( $r = $results->fetch_assoc() ) {\n $r['url'] = \"http://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}/{$r['Handle']}\";\n\n $users[] = $r;\n }\n return $users;\n}", "title": "" }, { "docid": "8ed41f451c18d25cfd53a4e0ac0fd53b", "score": "0.5445061", "text": "function bbp_get_user_ids_from_nicenames($user_nicenames = array())\n{\n}", "title": "" }, { "docid": "ae1da9e5ae6c796ad6107f080dc438bf", "score": "0.5439613", "text": "public function all_userInfo()\n\t{\n\t\t$sql = \"SELECT * FROM user;\";\n\t\t//echo $sql;\n\t\t$result = $this->execute($sql);\n\t\t$data = $this->get_data($result);\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "18f35d1f9ceab1efb997dd7ecf6ba1e3", "score": "0.5439409", "text": "public function users_getLoggedInUser(){\n return $this->call_method('facebook.users.getLoggedInUser', array());\n }", "title": "" }, { "docid": "52327d1f9638db38fbc576a2bdeb62af", "score": "0.54355896", "text": "public function get_user_nodes($userid) {\n\t $result = $this->mysqli->query(\"SELECT * FROM nodes WHERE userid = '$userid'\");\n\t if (!$result) return 0;\n\t $nodes = array();\n\t while ($row = $result->fetch_object()) {\n\t\t $nodes[] = $row;\n\t }\n return $nodes;\n }", "title": "" }, { "docid": "b2f69c03dc00a89bbe8d1083a64d284d", "score": "0.5434064", "text": "public static function getAllOfUser()\n {\n $list = Nestling::with(['specie','customSpecie'])\n ->where('userId','=',Auth::id())\n ->where('state',1)\n ->get();\n return $list;\n }", "title": "" }, { "docid": "b445af3792661301853632461748a838", "score": "0.54323757", "text": "public function userAction(){\n\t\t$main = new Main;\n\t\tif (!$_SESSION)\n\t\t\t$this->view->redirect('');\n\t\t\n\t\t\n\t\t$status = $this->model->getStatusUser($_SESSION['user']['id']);\n\t\t$vars = [\n\t\t\t'progress' => $main->getProgressInfo($status),\n\t\t\t'logs' => $main->getLogs($_SESSION['user']['id']),\n\t\t\t'user' => $this->model->getUserInfo($_SESSION['user']['id'])[0]\n\t\t];\n\n\t\t\n\t\t$this->view->render('Пользователь | EGrammar', $vars);\n\t}", "title": "" }, { "docid": "5fc581986022d85ada7f993fad720af2", "score": "0.5429786", "text": "public function getUser()\n {\n $select = $this->select()\n ->order('id');//Ordinate per id\n return $this->fetchAll($select); //Metodo predefinito che prende in input una SELECT e\n // restituisce tutte le tuple della tabella che soddisfano le condizioni(filtrate)\n }", "title": "" }, { "docid": "8236bcb1241cb0b0e7d1fb8d655dd9bc", "score": "0.54244894", "text": "public function getAllUsers(): array\n {\n // TODO: Implement getAllUsers() method.\n }", "title": "" }, { "docid": "a3b5031cc6dc3b4b9c4c5c5976d35446", "score": "0.5416613", "text": "function drush_user_list() {\n // Get options passed.\n $roles = _convert_csv_to_array(drush_get_option('roles'));\n $status = check_plain(strtolower(drush_get_option('status')));\n\n // The fields to grab from the users tables.\n $user_fields = array(\n 'uid',\n 'name',\n 'mail',\n 'status',\n );\n // The $uids array will be used for printing the table.\n $uids = array();\n $where = NULL;\n $args = NULL;\n $st = '';\n\n if (!empty($status)) {\n if ($status == 'active') {\n $st = '1';\n }\n elseif ($status == 'blocked') {\n $st = '0';\n }\n else {\n unset($st);\n drush_log(dt('You have entered an invalid status. Valid status options are \"active\" and \"blocked. Listing both active and blocked users.'), 'error');\n }\n if (isset($st)) {\n $where = \"status = %d\";\n }\n }\n\n // Build the table. This format is the same for both Drupal 6 and 7.\n $rows = array();\n\n $major_version = drush_drupal_major_version();\n if ($major_version == 6) {\n // Get the RIDs of the users with the roles specified.\n if (!empty($roles)) {\n // Find out the rids for the role names specified.\n $placeholder = db_placeholders($roles, 'text');\n $rquery = drush_db_select('role', 'rid', \"name in ($placeholder)\", $roles);\n $rids = array();\n while ($rid = drush_db_fetch_object($rquery)) {\n $rids[] = $rid->rid;\n }\n\n // Find out the UIDs of the users with the RIDs speficied.\n $placeholder = db_placeholders($rids, 'int');\n $query = drush_db_select('users_roles', 'uid', \"rid in ($placeholder)\", $rids);\n while ($uid = drush_db_fetch_object($query)) {\n $uids[] = $uid->uid;\n }\n\n unset($rquery);\n unset($query);\n\n if (!empty($uids)) {\n $placeholder = db_placeholders($uids, 'int');\n $where = (empty($where)) ? \"uid IN ($placeholder)\" : $where . \" AND uid IN ($placeholder)\";\n }\n else {\n return drush_set_error(dt('There were no users found with the roles specified.'));\n }\n }\n\n $args = array_merge((array) $st, $uids);\n\n // Get all UIDs.\n $query = drush_db_select('users', $user_fields, $where, $args);\n\n // Load each users info and add it to the results table.\n while ($user = drush_db_fetch_object($query)) {\n if ($user->uid == '0') {\n continue;\n }\n $user_roles = array();\n // Find out the roles of the user.\n $urquery = drush_db_select('users_roles', 'rid', 'uid = %d', array($user->uid));\n while ($result = drush_db_fetch_object($urquery)) {\n // Find the specific role name.\n $rquery = drush_db_select('role', 'name', 'rid = %d', array($result->rid));\n while ($role = drush_db_fetch_object($rquery)) {\n $user_roles[] = $role->name;\n }\n }\n $user_status = ($user->status) ? 'Active' : 'Blocked';\n\n drush_print_pipe($user->mail . \"\\n\");\n\n $user_roles = implode(', ', $user_roles);\n\n $user_row = array(\n 'uid' => $user->uid,\n 'name' => $user->name,\n 'email' => $user->mail,\n 'roles' => $user_roles,\n 'status' => $user_status,\n );\n $rows[] = $user_row;\n }\n }\n elseif ($major_version == 7) {\n if (!empty($roles)) {\n $rids = array();\n foreach ($roles as $role) {\n // Look up rid.\n $role_object = user_role_load_by_name($role);\n if (!$role_object) {\n drush_log(dt('No role exists with the name \"@role\"', array('@role' => $role)), 'error');\n }\n else {\n $rids[] = $role_object->rid;\n }\n }\n }\n // SELECT ur.uid,ur.rid,r.name,u.name,u.mail,u.status FROM users u\n // LEFT JOIN users_roles ur ON u.uid=ur.uid\n // LEFT JOIN role r ON r.rid=ur.rid WHERE r.rid IN $rids.\n $query = db_select('users', 'u');\n // Yo dawg, I herd you like JOINs. But we do this here, once, so we don't\n // load unnecessary user objects later.\n $query->join('users_roles', 'ur', 'u.uid = ur.uid');\n $query->join('role', 'r', 'r.rid = ur.rid');\n $query->fields('u', array('uid'));\n $query->fields('u');\n if (!empty($rids)) {\n $query->condition('r.rid', $rids, \"IN\");\n }\n // The only valid statuses are 1 and 0.\n // empty() is not our friend here.\n $valid_status = array(\"1\",\"0\");\n if (in_array($st, $valid_status)) {\n $query->condition('u.status', $st, \"=\");\n }\n $result = $query->execute();\n $uids = array();\n while ($record = $result->fetchAssoc()) {\n $uids[] = $record['uid'];\n }\n // This will return an array of user objects.\n $users = user_load_multiple($uids);\n foreach ($users as $user) {\n $user_roles = implode(', ', $user->roles);\n // If $user->status = 1, set it to \"Active\"; otherwise, \"Blocked\".\n // I hate this shorthand but it works.\n $user_status = ($user->status) ? 'Active' : 'Blocked';\n // Build the array for each row.\n $user_row = array(\n 'uid' => $user->uid,\n 'name' => $user->name,\n 'email' => $user->mail,\n 'roles' => $user_roles,\n 'status' => $user_status,\n );\n $rows[] = $user_row;\n }\n }\n\n // If we have at least one row other than the header, print the table.\n if (!empty($rows[1])) {\n return $rows;\n }\n else {\n drush_log(dt('There are no users to display, which is odd.'), 'ok');\n }\n\n}", "title": "" }, { "docid": "00bec32816ab753ce1b0a4de5b7e6ae8", "score": "0.5409825", "text": "function getParentChild() {\n $session = $_SESSION['SESSION']->navcache->navigation;\n foreach ($session as $key => $value) {\n if(strpos($key,'userblogoptions') !== false) {\n $userf[] = $key;\n }\n }\n foreach ($userf as $key => $value) {\n $data = explode('s' ,$value);\n $users[] = $data[2];\n }\n return $users; /// Return array of user ID blong to this User\n}", "title": "" }, { "docid": "6c98a6c61a4a2f185ed6395ee6ecc11d", "score": "0.5407394", "text": "public function getUsers()\r\n\t{\r\n\t\t$this->_CI->UserModel->join_related(\"info\");\r\n\t\treturn toEntities($this->_CI->UserModel->find_all());\r\n\t}", "title": "" }, { "docid": "aeb32087ac5bc4329167b016686f2f7d", "score": "0.5405086", "text": "public function getAllUsers();", "title": "" }, { "docid": "aeb32087ac5bc4329167b016686f2f7d", "score": "0.5405086", "text": "public function getAllUsers();", "title": "" }, { "docid": "aeb32087ac5bc4329167b016686f2f7d", "score": "0.5405086", "text": "public function getAllUsers();", "title": "" }, { "docid": "9258b424b8a0105d508a4816e2ece8d5", "score": "0.5399791", "text": "public function getUserPages();", "title": "" }, { "docid": "e3872dff63d0037da14f65d6fa7e83af", "score": "0.5395352", "text": "public function getUserLists()\n {\n //for testing, gets all lists created\n\n return $this->em->getRepository($this->repo)->findAll();\n }", "title": "" }, { "docid": "c96211b4c6e5c5e99fefc7cf7e9821ba", "score": "0.5395051", "text": "function load_users() {\n global $CFG;\n\n if (is_numeric($this->sortitemid)) {\n $sql = \"SELECT u.id, u.firstname, u.lastname\n FROM {$CFG->prefix}grade_grades g RIGHT OUTER JOIN\n {$CFG->prefix}user u ON (u.id = g.userid AND g.itemid = $this->sortitemid)\n LEFT JOIN {$CFG->prefix}role_assignments ra ON u.id = ra.userid\n $this->groupsql\n WHERE ra.roleid in ($this->gradebookroles)\n $this->groupwheresql\n AND ra.contextid \".get_related_contexts_string($this->context).\"\n ORDER BY g.finalgrade $this->sortorder\";\n $this->users = get_records_sql($sql, $this->get_pref('studentsperpage') * $this->page,\n $this->get_pref('studentsperpage'));\n } else {\n // default sort\n // get users sorted by lastname\n $this->users = get_role_users(@implode(',', $CFG->gradebookroles), $this->context, false,\n 'u.id, u.firstname, u.lastname', 'u.'.$this->sortitemid .' '. $this->sortorder,\n false, $this->page * $this->get_pref('studentsperpage'), $this->get_pref('studentsperpage'),\n $this->currentgroup);\n // need to cut users down by groups\n\n }\n\n if (empty($this->users)) {\n $this->userselect = '';\n $this->users = array();\n } else {\n $this->userselect = 'AND g.userid in ('.implode(',', array_keys($this->users)).')';\n }\n\n return $this->users;\n }", "title": "" }, { "docid": "becc4e7b51d5c35c011254a452f05edc", "score": "0.5380846", "text": "function bbp_ab_get_users() {\n $roles = array( 'administrator', 'bbp_moderator' );\n $all_users = array();\n\n foreach ($roles as $role) {\n $users = get_users( array( 'role' => $role, 'fields' => array('ID', 'user_login' ) ) );\n $all_users = array_merge( $users, $all_users );\n }\n\n return array_unique( wp_list_pluck( $all_users, 'ID' ) );\n}", "title": "" }, { "docid": "2f16d577ccd047d4852df0d58baa279b", "score": "0.5372047", "text": "function getUsers()\n\t{\n\t\tinclude(\"_mysql.php\");\n\t\t\n\t\t$_sql\t\t=\t\"SELECT benutzer, pk_client, last_login, benutzer_blocked FROM main_clients\";\n\t\t\n\t\tif (($data = $databaseConnection->query($_sql)) !== false)\n\t\t{\n\t\t\tif ($data->rowCount() > 0)\n\t\t\t{\n\t\t\t\t$result \t= \t$data->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\t\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn \"No Users!\";\n\t\t\t};\n\t\t}\n\t\telse\n\t\t{\n\t\t\twriteInLog(2, \"getUsers (SQL Error):\".$databaseConnection->errorInfo()[2]);\n\t\t};\n\t}", "title": "" }, { "docid": "32816aa6c0d33ca865f096d45a7989a5", "score": "0.5371315", "text": "function getDagUsers($project_id, $group_id)\r\n{\r\n\t$dag_users_array = array();\r\n\tif ($group_id != \"\") {\r\n\t\t$sql = \"select u.username from redcap_data_access_groups g, redcap_user_rights u where g.group_id = $group_id\r\n\t\t\t\tand g.group_id = u.group_id and u.project_id = g.project_id and g.project_id = $project_id\";\r\n\t\t$q = db_query($sql);\r\n\t\twhile ($row = db_fetch_assoc($q)) {\r\n\t\t\t$dag_users_array[] = $row['username'];\r\n\t\t}\r\n\t}\r\n\treturn $dag_users_array;\r\n}", "title": "" }, { "docid": "f5f9f9324ba618a991e8fe20dc199118", "score": "0.5371065", "text": "public static function getUsers()\n {\n return array(\n array(\n 'link' => RouteHelper::_('index.php?view=users'),\n 'image' => JURI::base().'libraries/crm/media/images/cpanel/users.png',\n 'text' => TextHelper::_('Manage Users'),\n 'access' => array( )\n )\n );\n }", "title": "" }, { "docid": "7023950bcb364c6c3877d8cdf19863fe", "score": "0.53689826", "text": "public static function getAllUsers(){\n $req = Db::getConnection()->prepare(\"SELECT pseudo, pswd, mail FROM USER\");\n $req->execute();\n return $req->fetchAll();\n }", "title": "" }, { "docid": "4c5ff491d24dba097924b13cdaefdc7a", "score": "0.53688586", "text": "function get_user_details($user_fb_id){\n $ch = curl_init();\n\n // curl_setopt($ch, CURLOPT_AUTOREFERER, TRUE);\n // curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_URL, 'https://graph.facebook.com/' . $user_fb_id);\n // curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); \n\n $data = curl_exec($ch);\n curl_close($ch);\n\n return json_decode($data);\n}", "title": "" } ]
eb85eaa3104735c8e47c77d8ea0b7f69
Left or right sidebar col push/pull
[ { "docid": "e0b46963a54c7fba823bdfa9362f6dc2", "score": "0.66786444", "text": "function pipdig_left_or_right() {\r\n\t\r\n\tif (get_theme_mod('disable_responsive')) {\r\n\t\t$sm = $md = 'xs';\r\n\t} else {\r\n\t\t$sm = 'sm';\r\n\t\t$md = 'md';\r\n\t}\r\n\t\r\n\tif (pipdig_sidebar_check()) { // there is a sidebar in this place, so let's set it up:\r\n\t\tif(get_theme_mod('sidebar_position') != 'left') {\r\n\t\t\t$colz = 'col-'.$sm.'-8';\r\n\t\t} else {\r\n\t\t\t$colz = 'col-'.$sm.'-8 col-'.$sm.'-push-4';\r\n\t\t}\r\n\t\t\r\n\t\tif (function_exists('rwmb_meta') && is_single()) { \r\n\t\t\t$post_sidebar_position = rwmb_meta( 'pipdig_meta_post_sidebar_position' );\r\n\t\t\tif( !empty( $post_sidebar_position ) ) {\r\n\t\t\t\tswitch ( $post_sidebar_position ) {\r\n\t\t\t\t\tcase 'sidebar_right':\r\n\t\t\t\t\t\t$colz = 'col-'.$sm.'-8';\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'sidebar_left':\r\n\t\t\t\t\t\t$colz = 'col-'.$sm.'-8 col-'.$sm.'-push-4';\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'sidebar_none':\r\n\t\t\t\t\t\t$colz = 'col-xs-12';\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t} else {\r\n\t\t$colz = \"col-xs-12\";\r\n\t}\r\n\t\r\n\techo esc_attr($colz);\r\n}", "title": "" } ]
[ { "docid": "2ea5daa567105eb67bc9a9a96c531b22", "score": "0.6283056", "text": "function cogito_content_sidebar_left_top() \t\t\t{ do_action( 'cogito_content_sidebar_left_top' );}", "title": "" }, { "docid": "35a9de2357e04ee514c47bea42cdb252", "score": "0.6130339", "text": "protected function leftSidebar()\n {\n }", "title": "" }, { "docid": "7b3ca60af15a718c1dce40bc98debb6f", "score": "0.599561", "text": "function sc_sidebar( $attr, $content ) {\n\t$pull = ( $attr['position'] == ( 'left' || 'right' ) ) ? 'pull-' . $attr['position'] : 'pull-right';\n\t$bgcolor = $attr['background'] ? $attr['background'] : '#f0f0f0';\n\t$content_align = $attr['content_align'] ? 'text-' . $attr['content_align'] : '';\n\t$content = do_shortcode( $content );\n\n\t$html = '<div class=\"col-md-5 col-sm-6 ' . $pull . ' sidebar\">';\n\t$html .= '<section class=\"sidebar-inner ' . $content_align . '\" style=\"background-color: ' . $bgcolor . ';\">' . $content . '</section>';\n\t$html .= '</div>';\n\n\treturn $html;\n}", "title": "" }, { "docid": "0717cbe8d36d0e17c254fac9ffb6cf2e", "score": "0.59922177", "text": "public function sidebar()\n\t{\n\t\tif (!$this->ion_auth->logged_in())\n\t\t{\n\t\t\t// redirect them to the login page\n\t\t\tredirect('admin/login', 'refresh');\n\t\t}\n\t\telse if (!$this->ion_auth->is_admin()) \n\t\t{\n\t\t\t// redirect them to the home page because they must be an administrator to view this\n\t\t\treturn show_error('You must be an administrator to view this page.');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Check to see if current value is 1 (for collapse) or 0 (for default) \n\t\t\t$status = $this->Admin_model->get_single_col('settings', 'name', 'sidebar', 'status');\n\t\t\t// Assign it to new vlaue depending on the previous one\n\t\t\t($status) ? $data = array('status' => '0') : $data = array('status' => '1');\n\t\t\t// Update database\n\t\t\t$this->Admin_model->update_row('settings', 'name', 'sidebar', $data);\n\t\t}\n\t}", "title": "" }, { "docid": "eb4f46dcccf44a23df37ca72cd7fc692", "score": "0.5978346", "text": "function tech_show_sidebar($loc) {\n\tglobal $tech;\n\tif ($tech['column'] > 1) {\n\t\tswitch ($tech['sidebar_pos']) {\n\t\t\tcase \"Sidebar - Content - Sidebar\":\n\t\t\t\t$left = 1;\n\t\t\t\t$right = 1;\n\t\t\tbreak;\n\t\t\tcase \"Content - Sidebar - Sidebar\":\n\t\t\t\t$left = 0;\n\t\t\t\t$right = 2;\n\t\t\tbreak;\n\t\t\tcase \"Sidebar - Sidebar - Content\":\n\t\t\t\t$left = 2;\n\t\t\t\t$right = 0;\n\t\t\tbreak;\n\t\t\tcase \"Content - Sidebar\":\n\t\t\t\t$left = 0;\n\t\t\t\t$right = 1;\n\t\t\tbreak;\n\t\t\tcase \"Sidebar - Content\":\n\t\t\t\t$left = 1;\n\t\t\t\t$right = 0;\n\t\t\tbreak;\n\t\t}\n\t\tif ($loc == \"l\" && $left > 0){\n\t\t\tif (function_exists('get_template_part')) {\n\t\t\t\tget_template_part('sidebar','left');\n\t\t\t} else {\n\t\t\t\tinclude (TEMPLATEPATH . \"/sidebar-left.php\"); \n\t\t\t}\n\t\t\tif ($left > 1){\n\t\t\t\tget_sidebar();\n\t\t\t}\n\t\t}\n\t\tif ($loc == \"r\" && $right > 0){\n\t\t\tget_sidebar();\n\t\t\tif ($right > 1){\n\t\t\t\tif (function_exists('get_template_part')) {\n\t\t\t\t\tget_template_part('sidebar','left');\n\t\t\t\t} else {\n\t\t\t\t\tinclude (TEMPLATEPATH . \"/sidebar-left.php\"); \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "87da12a85a6cb3dd1f5c5543a78f4287", "score": "0.5894981", "text": "function df_get_sidebar($id, $side=\"right\") {\r\n\t//sidebars defauult option\r\n\t$sidebarPosition = get_option ( THEME_NAME.\"_sidebar_position\" ); \r\n\t//sidebars singlepost/page option\r\n\t$sidebarPositionCustom = get_post_meta ( $id, THEME_NAME.\"_sidebar_position\", true ); \r\n\r\n\t//left side sidebar\r\n\tif( ($sidebarPosition == \"left\" || ( $sidebarPosition == \"custom\" && $sidebarPositionCustom == \"left\")) && $side == 'left' ) { \r\n\t\tget_template_part(THEME_INCLUDES.\"sidebar\");\r\n\t}\r\n\r\n\t//right side sidebar\r\n\tif( ($sidebarPosition == \"right\" || ( $sidebarPosition == \"custom\" && $sidebarPositionCustom == \"right\") || ( $sidebarPosition == \"custom\" && !$sidebarPositionCustom )) && $side == 'right') { \r\n\t\tget_template_part(THEME_INCLUDES.\"sidebar\");\r\n\t}\r\n\r\n}", "title": "" }, { "docid": "617baa642102975c986a773803655f33", "score": "0.58916247", "text": "function cleanyeti_left_aside() {\n\tif ( is_active_sidebar( 'left-aside' ) ) {\n\t\techo cleanyeti_before_widget_area( 'left-aside' );\n\t\tdynamic_sidebar( 'left-aside' );\n\t\techo cleanyeti_after_widget_area( 'left-aside' );\n\t}\n}", "title": "" }, { "docid": "6aa14035844242465bd494892874fc9b", "score": "0.58193886", "text": "public function panel_sidebar() {\n\t}", "title": "" }, { "docid": "d619f681744212dea1285c79f94f2725", "score": "0.5800731", "text": "function arras_below_sidebar() {\n\tdo_action('arras_below_sidebar');\n}", "title": "" }, { "docid": "f3b3d4513ea6c9e2ffef0e880b554682", "score": "0.5692048", "text": "function arras_above_sidebar() {\n\tdo_action('arras_above_sidebar');\n}", "title": "" }, { "docid": "905764588679be2a0f55e9588bd3c8e5", "score": "0.55942434", "text": "public static function left_sidebar() {\n\t\t$layout_type = WpvTemplates::get_layout();\n\n\t\tself::$in_page_wrapper = true;\n\n\t\tif ( $layout_type == 'left-only' || $layout_type == 'left-right' ): ?>\n\t\t\t<aside class=\"<?php echo esc_attr( apply_filters( 'wpv_left_sidebar_class', 'left', $layout_type ) ) ?>\">\n\t\t\t\t<?php WpvSidebars::get_instance()->get_sidebar( 'left' ); ?>\n\t\t\t</aside>\n\t\t<?php endif;\n\t}", "title": "" }, { "docid": "746c8dbaa279f9f0c0b76e632aa02a65", "score": "0.5592906", "text": "function codeless_get_sidebar(){\n \n // Get current page layout\n $layout = codeless_get_page_layout();\n \n // No sidebar if fullwidth layout\n if( $layout == 'fullwidth' )\n return;\n \n // Load custom sidebar template for dual\n if( $layout == 'dual_sidebar' ){\n get_sidebar( 'dual' );\n return;\n }\n \n // For left/right sidebar layouts get default sidebar template\n get_sidebar();\n \n}", "title": "" }, { "docid": "022b2582fa234c6895b097c7e5f746e9", "score": "0.554094", "text": "function cellular_test_sidebar(&$vars) {\n empty($vars['page']['sidebar_left']) ? NULL : $sidebar_left = 1;\n empty($vars['page']['sidebar_right']) ? NULL : $sidebar_right = 1;\n\n if (!isset($sidebar_left) && !isset($sidebar_right)) {\n return;\n }\n elseif (isset($sidebar_left) && isset($sidebar_right)) {\n $vars['page']['content_class'] = theme_get_setting('content_class_dual_sidebars');\n $vars['page']['sidebar_class'] = theme_get_setting('sidebar_class_dual_sidebars');\n }\n elseif (isset($sidebar_left) || isset($sidebar_right)) {\n $vars['page']['content_class'] = theme_get_setting('content_class_single_sidebar');\n $vars['page']['sidebar_class'] = theme_get_setting('sidebar_class_single_sidebar');\n }\n}", "title": "" }, { "docid": "bb2e0fef465000d7057acdbfa80a4fc2", "score": "0.55083597", "text": "function __register_sidebars(){\n\n // Register main sidebar \n // on the right side\n register_sidebar([\n 'name' => 'My Primary Sidebar',\n 'id' => 'primary-sidebar',\n 'class' => 'pm-sidebar',\n 'before_widget' => '<article>',\n 'after_widget' => '</article>'\n ]);\n\n // Register Sidebar on the bottom\n // left side..\n register_sidebar([\n 'name' => 'Bottom Left Sidebar',\n 'id' => 'bottom-left',\n 'class' => 'pm-bt-left',\n 'before_widget' => '<article>',\n 'after_widget' => '</article>'\n ]);\n\n // Register Sidebar on the bottom\n // left side..\n register_sidebar([\n 'name' => 'Bottom Right Sidebar',\n 'id' => 'bottom-right',\n 'class' => 'pm-bt-right',\n 'before_widget' => '<article>',\n 'after_widget' => '</article>'\n ]);\n\n}", "title": "" }, { "docid": "4e5bc3c7214f355b525c6e1d3b486365", "score": "0.55079377", "text": "function display_sidebar(){\n$isMobile = (bool)preg_match('#\\b(ip(hone|od|ad)|android|opera m(ob|in)i|windows (phone|ce)|blackberry|tablet'.\n '|s(ymbian|eries60|amsung)|p(laybook|alm|rofile/midp|laystation portable)|nokia|fennec|htc[\\-_]'.\n '|mobile|up\\.browser|[1-4][0-9]{2}x[1-4][0-9]{2})\\b#i', $_SERVER['HTTP_USER_AGENT'] );\n\tif(is_front_page() && is_home()){#Default homepage - sidebar displayed\n\t\techo \"col-xs-12 col-sm-4\";\n\t}elseif (is_front_page()) {#static homepage - sidebar displayed (probably not needed, but better to be complete)\n\t\techo \"col-xs-12 col-sm-4\";\n\t}elseif (is_home()) {#blog page - sidebar displayed\n\t\techo \"col-xs-12 col-sm-4\";\n\t}else{#everything else\n\t\tif(is_page('About Us')){return \"hidden-xs hidden-sm hidden-md hidden-lg\";}\n\t}\n}", "title": "" }, { "docid": "34f42a1793174a34cd088e12ec3a4145", "score": "0.5500876", "text": "function tfuse_sidebar_position() {\r\r\n global $TFUSE;\r\r\n\r\r\n $sidebar_position = $TFUSE->ext->sidebars->current_position;\r\r\n if ( empty($sidebar_position) ) $sidebar_position = 'full';\r\r\n\r\r\n return $sidebar_position;\r\r\n }", "title": "" }, { "docid": "884323c4f144d07a2e85df6e1905da43", "score": "0.5461104", "text": "function setupSidebar() {\n\t\t//TODO: fixme this needs to be ported to a more pluggable arch.\n\t\treturn;\n\n//\t\t$key = 'layout/content/mxq';\n//\t\t$val = dirname(__FILE__).'/csrv_queueinfo.php:Csrv_QueueInfo:csrv_queueinfo:showMainContent';\n\n\t\t$key2 = 'layout/content/ticketlist';\n\t\t$val2 = dirname(__FILE__).'/csrv_queueinfo.php:Csrv_QueueInfo:csrv_queueinfo:showTicketList';\n\n\t\t$libPath = Cgn_ObjectStore::getConfig('config://cgn/path/lib');\n\t\t$sysPath = Cgn_ObjectStore::getConfig('config://cgn/path/sys');\n\t\t$pluginPath = Cgn_ObjectStore::getConfig('config://cgn/path/plugin');\n\t\t$filterPath = Cgn_ObjectStore::getConfig('config://cgn/path/filter');\n\n\t\t/*\n\t\t$val = str_replace('@lib.path@',$libPath,$val);\n\t\t$val = str_replace('@sys.path@',$sysPath,$val);\n\t\t$val = str_replace('@plugin.path@',$pluginPath,$val);\n\t\t */\n\t\t$val2 = str_replace('@lib.path@',$libPath,$val2);\n\t\t$val2 = str_replace('@sys.path@',$sysPath,$val2);\n\t\t$val2 = str_replace('@plugin.path@',$pluginPath,$val2);\n\n\n\t\tfor($x=1; $x<2; $x++) {\n\t\tincludeObject($val2);// Cgn_SystemRunner\n\t\t\tif ($x == 1) { $val = $val2; $key = $key2;}\n\t\t\t$classLoaderPackage = explode(':',$val);\n\t\t\t//if we have a method name (4th position)\n\t\t\tif ( @strlen($classLoaderPackage[3]) ) {\n\t\t\t\tCgn_ObjectStore::storeConfig('object://'.$key.'/file',$classLoaderPackage[0]);\n\t\t\t\tCgn_ObjectStore::storeConfig('object://'.$key.'/class',$classLoaderPackage[1]);\n\t\t\t\tCgn_ObjectStore::storeConfig('object://'.$key.'/name',$classLoaderPackage[2]);\n\t\t\t\tCgn_ObjectStore::storeConfig('object://'.$key.'/name',$classLoaderPackage[2]);\n\t\t\t\tCgn_ObjectStore::storeConfig('object://'.$key.'/method',$classLoaderPackage[3]);\n\t\t\t\t//Cgn_ObjectStore::debug();\n\t\t\t} else {\n\t\t\t\t//we don't have a method name\n\t\t\t\tCgn_ObjectStore::storeConfig('object://'.$key,$val);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "ee2b5297d01ca07f7e65dd91aaf82204", "score": "0.54495215", "text": "function msdlab_ro_layout_logic() {\n $site_layout = genesis_site_layout(); \n if ( $site_layout == 'sidebar-content-sidebar' ) {\n // Remove default genesis sidebars\n remove_action( 'genesis_after_content', 'genesis_get_sidebar' );\n remove_action( 'genesis_after_content_sidebar_wrap', 'genesis_get_sidebar_alt');\n // Add layout specific sidebars\n add_action( 'genesis_before_content_sidebar_wrap', 'genesis_get_sidebar' );\n add_action( 'genesis_after_content', 'genesis_get_sidebar_alt');\n }\n}", "title": "" }, { "docid": "3728010f33210e8e44c9153cd1e27bd8", "score": "0.5423086", "text": "public function post_sidebar(){\n\n\t\treturn Controller::call('templates::content@sidebar');\n\t}", "title": "" }, { "docid": "d05f30a6c02a2d453136569b20191694", "score": "0.540134", "text": "public static function right_sidebar() {\n\t\t$layout_type = WpvTemplates::get_layout();\n\n\t\tif ( $layout_type == 'right-only' || $layout_type == 'left-right' ): ?>\n\t\t\t<aside class=\"<?php echo esc_attr( apply_filters( 'wpv_right_sidebar_class', 'right', $layout_type ) ) ?>\">\n\t\t\t\t<?php WpvSidebars::get_instance()->get_sidebar( 'right' ); ?>\n\t\t\t</aside>\n\t\t<?php endif;\n\n\t\tself::$in_page_wrapper = false;\n\t}", "title": "" }, { "docid": "2f00ec651fc93ae259764f137381f7bb", "score": "0.53988934", "text": "function ascent_sidebars_before() {\n\tdo_action( 'ascent_sidebars_before' );\n}", "title": "" }, { "docid": "eebd63c6d39a42ebb2241b6c5202f5aa", "score": "0.5388292", "text": "function gsplit_display_split_sidebar() {\n ?>\n <div class=\"split-sidebar\">\n <?php\n genesis_widget_area( 'gsplit-sidebar-top', array( 'before' => '<div class=\"sidebar split-sidebar-top widget-area\">', 'after' => '</div>' ));\n genesis_widget_area( 'gsplit-sidebar-left', array( 'before' => '<div class=\"sidebar split-sidebar-left widget-area\">', 'after' => '</div>' ));\n genesis_widget_area( 'gsplit-sidebar-right', array( 'before' => '<div class=\"sidebar split-sidebar-right widget-area\">', 'after' => '</div>' ));\n ?>\n </div>\n <?php\n}", "title": "" }, { "docid": "f46304b42e4ccdc6ef67c7a8a41a6824", "score": "0.5376228", "text": "abstract public function include_layout_column();", "title": "" }, { "docid": "985e196277064b485d6c189d058add93", "score": "0.53761345", "text": "function wp_admin_bar_sidebar_toggle($wp_admin_bar)\n{\n}", "title": "" }, { "docid": "7dc9edcee327b37153a3e8e3a60f401e", "score": "0.53668034", "text": "function ccp_lib_wp_main_classes() {\n\tif (! is_active_sidebar('sidebar-left') && ! is_active_sidebar('sidebar-right')) { // no columns\n\t\techo \"col-md-12\";\n\t} else if (! is_active_sidebar('sidebar-right')) { // only left\n\t\techo \"col-md-8\";\n\t} else if (! is_active_sidebar('sidebar-left')) { // only right\n\t\techo \"col-md-8\";\n\t} else { // both columns\n\t\techo \"col-md-6\";\n\t}\n}", "title": "" }, { "docid": "bb28f1b97430890afdf9e3a87f538b58", "score": "0.53608686", "text": "function vp_get_sidebar($data)\n\t\t{\n\t\t\tif(is_null($data))\n\t\t\t{\n\t\t\t\t// unnamed sidebar is main sidebar\n\t\t\t\t$this->is_main_sidebar = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// added to version 1.3 in order to make compatible with wp 3.5\n\t\t\t\t$this->is_main_sidebar = false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "da3081c0481d69a2e097d4653f497d40", "score": "0.5359551", "text": "function agriflex_before_sidebar() {\n\n do_action( 'agriflex_before_sidebar' );\n\n}", "title": "" }, { "docid": "8bcc9208e5b637b333533d8a79a6ee1c", "score": "0.53518975", "text": "function tfuse_sidebar_position() {\n global $TFUSE;\n\n $sidebar_position = $TFUSE->ext->sidebars->current_position;\n if ( empty($sidebar_position) ) $sidebar_position = 'full';\n\n return $sidebar_position;\n }", "title": "" }, { "docid": "fa021c56cf94f3397b94e573245940be", "score": "0.5330611", "text": "function child_sidebar_logic() {\n\tif ( is_singular( 'post' ) || is_archive() ) {\n\t\tremove_action( 'genesis_after_content', 'genesis_get_sidebar' );\n\t\t\tadd_action( 'genesis_after_content', 'child_get_alt_sidebar' );\n\t}\n}", "title": "" }, { "docid": "c6f887f3217a9b91a22621ddd5923363", "score": "0.5325266", "text": "function hookrightColumn($params){\t\t\n\t\treturn $this->processHook( $params,\"rightColumn\");\n\t}", "title": "" }, { "docid": "aa32ffa2708d3c1cb745a55e2812b0d8", "score": "0.5319083", "text": "function hookrightColumn($params)\n\t{\n if( ($this->_params->get(\"lofhook\", \"rightColumn\") == \"rightColumn\") && ($this->_params->get(\"module_group\", \"pages\") == \"pages\") ) {\n\t\t return $this->processHook( $params,\"rightColumn\");\n }\n\t}", "title": "" }, { "docid": "30806ece1044a65801ade1d42dc2714b", "score": "0.5317602", "text": "function tpl_sidebar_content() {//func\n\n/****** declare global variables ******/\n global $ID, $REV, $ACT, $conf;\n \n/****** save global variables ******/\n $saveID = $ID;\n $saveREV = $REV;\n $saveACT = $ACT;\n\n/****** find file to be displayed in navigation sidebar ******/\n $fileSidebar = '';\n $fileSidebar = getSidebarFN(getNS($ID), 'sidebar');\n\n/****** show main sidebar if necessary ******/\n if (tpl_getConf('rb_main_sidebar') && \n $fileSidebar != 'sidebar' &&\n file_exists(wikiFN('sidebar'))) {//do\n $ID = 'sidebar';\n $REV = '';\n $ACT = 'show';\n tpl_content(false);\n if (tpl_getConf('rb_showeditbtn')) {//do\n tpl_sidebar_editbtn();\n echo \"<br>\";\n }//if (tpl_getConf('rb_showeditbtn'))\n echo \"<hr>\";\n }//if (tpl_getConf('rb_main_sidebar') && ... \n\n/****** show current sidebar ******/\n if ($fileSidebar) {//do\n $ID = $fileSidebar;\n $REV = '';\n $ACT = 'show';\n tpl_content(false);\n if (tpl_getConf('rb_showeditbtn')) \n tpl_sidebar_editbtn();\n }//if ($fileSidebar)\n\n/****** show index ******/\n else {//if (!$fileSidebar)\n $REV = '';\n $ACT = 'index';\n tpl_content(false);\n }//if (!$fileSidebar)\n \n/****** restore global variables ******/\n $ID = $saveID;\n $REV = $saveREV;\n $ACT = $saveACT;\n\n }", "title": "" }, { "docid": "3657645ea7237151a2d99490e62e7936", "score": "0.52989465", "text": "function kumonosu_sidebars() {\n\n/**\n* Creates a sidebar\n* @param string|array Builds Sidebar based off of 'name' and 'id' values.\n*/\n$right_sidebar = array(\n\t'name' => __( 'Right Side Bar', 'kumonosu_blog' ),\n\t'id' => 'kumonosu-right-sidebar',\n\t'description' => '',\n\t'class' => __('Widgets which display on the right side of the page.', 'kumonosu_blog'),\n\t'before_widget' => '<div id=\"%1\" class=\"widget %2 row\"><div class=\"col-12\">',\n\t'after_widget' => '</div></div>',\n\t'before_title' => '<h2 class=\"title-underline\">',\n\t'after_title' => '</h2>',\n);\n\nregister_sidebar( $right_sidebar );\n\n\n/**\n* Creates a sidebar\n* @param string|array Builds Sidebar based off of 'name' and 'id' values.\n*/\n$footer_left = array(\n\t'name' => __( 'Footer Widget Left', 'kumonosu_blog' ),\n\t'id' => 'footer-left',\n\t'description' => __('Widgets which display on left footer such as Tags.', 'kumonosu_blog'),\n\t'class' => '',\n\t'before_widget' => '<div id=\"%1$s\" class=\"%2$s col \">',\n\t'after_widget' => '</div>',\n\t'before_title' => '<h2 class=\"title-underline\">',\n\t'after_title' => '</h2>',\n);\n\nregister_sidebar( $footer_left );\n\n\n/**\n* Creates a sidebar\n* @param string|array Builds Sidebar based off of 'name' and 'id' values.\n*/\n$footer_left = array(\n\t'name' => __( 'Footer Widget Right', 'kumonosu_blog' ),\n\t'id' => 'footer-right',\n\t'description' => __('Widgets which display on right footer such as Facebook Page.', 'kumonosu_blog'),\n\t'class' => '',\n\t'before_widget' => '<div id=\"%1$s\" class=\"%2$s col \">',\n\t'after_widget' => '</div>',\n\t'before_title' => '<h2 class=\"title-underline\">',\n\t'after_title' => '</h2>',\n);\n\nregister_sidebar( $footer_left );\n\n\n\n/**\n * Creates a sidebar\n * @param string|array Builds Sidebar based off of 'name' and 'id' values.\n */\n$lang = array(\n\t'name' => __( 'Language Switcher', 'kumonosu_blog' ),\n\t'id' => 'language-switcher',\n\t'description' => '',\n\t'class' => '',\n\t'before_widget' => '<div id=\"%1\" class=\"widget %2\">',\n\t'after_widget' => '</div>',\n\t'before_title' => '',\n\t'after_title' => '',\n);\n\nregister_sidebar( $lang );\n\n\n}", "title": "" }, { "docid": "0dfa14fda5eac0a7d6d5434934f0608c", "score": "0.5289186", "text": "function parallax_hook_sidebar_top() {\n \tdo_action( 'parallax_sidebar_top' );\n \tdo_action( 'tha_sidebar_top' );\n }", "title": "" }, { "docid": "02758e5bd1b149329dbb7cf4aa3394bb", "score": "0.52852964", "text": "function hookrightColumn($params)\n\t{\t\t\n\t\treturn $this->processHook( $params,\"rightColumn\");\n\t}", "title": "" }, { "docid": "a5487c2cecab571f77a3e81e0792a0da", "score": "0.52702445", "text": "public function sidebar( ) {\n\t $role_id = auth()->check() ? auth()->user()->role_id : 0; // checking auth\n\t $navigation_id = 1; // for admin\n\t //$items = NavigationItem::where('navigation_id', $navigation_id)->where('role_id', '>=', $role_id)->get()->toArray();\n\t $items = NavigationItem::where('navigation_id', $navigation_id)->get()->toArray();\n\t if ( !$items || count($items) == 0 ) {\n\t\t\treturn [];\n\t\t}\n\t $items = $this->doSidebarProcess( $items );\n\t\t//dd( $items );\n\t return $items;\n }", "title": "" }, { "docid": "4cb2807d9d054e20aa29c134959f1149", "score": "0.5265819", "text": "function template_generic_menu_sidebar_above() {\n}", "title": "" }, { "docid": "8bcd45a94eb13b6e8e9c42e5173e1325", "score": "0.52583355", "text": "function sukelius_one_column() {\r\n\r\n\tif ( !is_active_sidebar( 'primary' ) && !is_active_sidebar( 'secondary' ) )\r\n\t\tadd_filter( 'get_theme_layout', 'sukelius_theme_layout_one_column' );\r\n\r\n\telseif ( is_attachment() && 'layout-default' == theme_layouts_get_layout() )\r\n\t\tadd_filter( 'get_theme_layout', 'sukelius_theme_layout_one_column' );\r\n}", "title": "" }, { "docid": "a42c661a05fe00c9ba6e56f426e2e144", "score": "0.5246661", "text": "function overlap_get_sidebar_position( $page_id = '' ){\r\n \r\n $sidebar_position = ''; \r\n\r\n if( empty($page_id) ) $page_id = overlap_get_current_page(); \r\n\r\n if( is_single() && get_post_type() == 'post' ){\r\n \r\n if( get_post_meta( $page_id, '_w_post_custom_sidebar', true ) == 'on'){\r\n $sidebar_position = get_post_meta( $page_id, '_w_sidebar_position', true );\r\n }\r\n\r\n if( empty($sidebar_position) ) $sidebar_position = overlap_get_option('blog_single_sidebar');\r\n\r\n }else{\r\n\r\n $sidebar_position = get_post_meta( $page_id, '_w_sidebar_position', true );\r\n if( empty($sidebar_position) ) {\r\n $sidebar_position = '1';\r\n } \r\n \r\n } \r\n\r\n return $sidebar_position;\r\n}", "title": "" }, { "docid": "6cc2d0a159dd27bf998340945ddd1395", "score": "0.5244869", "text": "function hookleftColumn($params){\t\t\n\t\treturn $this->processHook( $params,\"leftColumn\");\n\t}", "title": "" }, { "docid": "6c8e4deed71677d5cc0dad2c05f373d9", "score": "0.5235249", "text": "public function sidebar()\n\t{\n\t\t$this->session->set('sidebar', $this->request->getPost('sidebar'));\n\t}", "title": "" }, { "docid": "7f85f05d566a86562fe301041fa895c1", "score": "0.5227604", "text": "public function get_admin_sidebar()\n {\n }", "title": "" }, { "docid": "ea62713788f94f7d6baedf325af5881b", "score": "0.5221653", "text": "public function have_sidebar(){\r\n\r\n return self::current_sidebar_layout();\r\n\r\n }", "title": "" }, { "docid": "b3057ea2b15ef2cdb50a55380a339d6b", "score": "0.5208683", "text": "function _wp_sidebars_changed()\n{\n}", "title": "" }, { "docid": "23ed9f3478b598f6d015d2bf9981240f", "score": "0.5197978", "text": "function carr_news_events_sidebar() {\n\n\tglobal $post;\n\n\t/*$attorneys = new WP_Query(array(\n\t\t'post_type' => 'attorneys',\n\t\t'orderby' => 'menu_order',\n\t\t'order' => 'ASC',\n\t\t'posts_per_page' => 80\n\t)); */\n\n\tglobal $wpdb;\n\tglobal $post;\n\n// Originally sorting was done with menu_order and a plugin to rearrange in the backend\n// This is a bit ugly, but uses a custom query to sort by the last_name post meta field\n\n\t$attorneys = \"\n\t SELECT wposts.*\n\t FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta\n\t WHERE wposts.ID = wpostmeta.post_id\n\t AND wpostmeta.meta_key = 'last_name'\n\t AND wposts.post_type = 'attorneys'\n\t\tAND wposts.post_status = 'publish'\n\t ORDER BY wpostmeta.meta_value ASC\n\t LIMIT 80\n\t \";\n\n\t$attorneys = $wpdb->get_results( $attorneys, OBJECT );\n\n\t?>\n\t<?php if ( ! is_home() ) : ?>\n\t\t<div class=\"view-all\">\n\t\t\t<a class=\"button point-left\" href=\"<?php echo esc_url( home_url( '/' ) ) . 'news-events/'; ?>\">\n\t\t\t\tBack to all <br> News &amp; Events\n\t\t\t\t<span class=\"icon-arrow-left\"></span>\n\t\t\t</a>\n\t\t</div>\n\t<?php endif; ?>\n\n\t<div class=\"border-block top sidebar-menu-block\">\n\t\t<h3 class=\"block-label sidebar-menu-header\">Categories <span class=\"icon-arrow-down\"></span></h3>\n\n\t\t<ul class=\"categories sidebar-menu\">\n\t\t\t<?php wp_list_categories( '&title_li=&depth=1' ); ?>\n\t\t</ul>\n\t</div>\n\n\t<div class=\"border-block top sidebar-menu-block\">\n\t\t<h3 class=\"sidebar-menu-header\">Attorneys <span class=\"icon-arrow-down\"></span></h3>\n\t\t<ul class=\"attorneys sidebar-menu\">\n\n\t\t\t<?php // while ( $attorneys->have_posts() ) : $attorneys->the_post(); ?>\n\t\t\t<?php foreach ( $attorneys as $post ) : ?>\n\n\t\t\t\t<?php\n\n\t\t\t\t$name = get_post_meta( $post->ID, 'first_name', true ) . ' ';\n\t\t\t\t$name .= get_post_meta( $post->ID, 'middle_initial', true ) . ' ';\n\t\t\t\t$name .= get_post_meta( $post->ID, 'last_name', true);\n\n\t\t\t\t?>\n\n\t\t\t\t<li class=\"\">\n\t\t\t\t\t<a href=\"<?php echo esc_url( home_url( '/' ) ); ?>/news-events/attorney/<?php echo $post->post_name; ?>\"><?php echo $name; ?></a>\n\t\t\t\t</li>\n\n\t\t\t<?php // endwhile; ?>\n\t\t\t<?php endforeach; ?>\n\t\t</ul>\n\t</div>\n\t<?php\n}", "title": "" }, { "docid": "eea22024bfbc81ddd798c749bed1e7e7", "score": "0.5196691", "text": "function custom_sidebars(){\n\n\t\n\n\t\t$args = array(\n\n\t\t\t'id' \t\t\t=> \t'main-sidebar',\n\n\t\t\t'class'\t\t\t=>\t'main-sidebar',\n\n\t\t\t'name'\t\t\t=>\t__( 'main-sidebar', 'myTheme' ),\n\n\t\t\t'description'\t=>\t__( ' Main Sidebar for 2-col Layouts', 'myTheme' ),\n\n\t\t\t'before_title'\t=>\t'<h3 class=\"sidebar-heading\">',\n\n\t\t\t'after_title'\t=>\t'</h3>',\n\n\t\t);\n\n\t\tregister_sidebar( $args );\n\n\n\n\t\t$args = array(\n\n\t\t\t'id' \t\t\t=> \t'front-page-sidebar',\n\n\t\t\t'class'\t\t\t=>\t'front-page-sidebar',\n\n\t\t\t'name'\t\t\t=>\t__( 'front-page-sidebar', 'myTheme' ),\n\n\t\t\t'description'\t=>\t__( ' Front Page Sidebar for 2-col Layouts', 'myTheme' ),\n\n\t\t\t'before_title'\t=>\t'<h3 class=\"sidebar-heading\">',\n\n\t\t\t'after_title'\t=>\t'</h3>',\n\n\t\t);\n\n\t\tregister_sidebar( $args );\n\n\n\n\t\t$args = array(\n\n\t\t\t'id' \t\t\t=> \t'single-sidebar',\n\n\t\t\t'class'\t\t\t=>\t'single-sidebar',\n\n\t\t\t'name'\t\t\t=>\t__( 'single-sidebar', 'myTheme' ),\n\n\t\t\t'description'\t=>\t__( ' Single Post Sidebar for 2-col Layouts', 'myTheme' ),\n\n\t\t\t'before_title'\t=>\t'<h3 class=\"sidebar-heading\">',\n\n\t\t\t'after_title'\t=>\t'</h3>',\n\n\t\t);\n\n\t\tregister_sidebar( $args );\n\n\t\t\n\n\t\t\n\n\t\t\n\n\t\t$args = array(\n\n\t\t\t'id' \t\t\t=> \t'footer-column-1',\n\n\t\t\t'class'\t\t\t=>\t'footer-column',\n\n\t\t\t'name'\t\t\t=>\t__( 'footer-column-1', 'myTheme' ),\n\n\t\t\t'description'\t=>\t__( 'footer-column-1', 'myTheme' ),\n\n\t\t\t'before_title'\t=>\t'<header class=\"footer-column-header\">',\n\n\t\t\t'after_title'\t=>\t'</header>',\n\n\t\t\t'before_widget'\t=>\t'<aside id=\"%1$s\" class=\"block %2$s\">',\n\n\t\t\t'after_widget'\t=>\t'</aside>'\n\n\t\t);\n\n\t\tregister_sidebar( $args );\n\n\t\t\n\n\t\t\n\n\t\t\n\n\t\t$args = array(\n\n\t\t\t'id' \t\t\t=> \t'footer-column-2',\n\n\t\t\t'class'\t\t\t=>\t'footer-column',\n\n\t\t\t'name'\t\t\t=>\t__( 'footer-column-2', 'myTheme' ),\n\n\t\t\t'description'\t=>\t__( 'footer-column-2', 'myTheme' ),\n\n\t\t\t'before_title'\t=>\t'<header class=\"footer-column-header\">',\n\n\t\t\t'after_title'\t=>\t'</header>',\n\n\t\t\t'before_widget'\t=>\t'<aside id=\"%1$s\" class=\"block %2$s\">',\n\n\t\t\t'after_widget'\t=>\t'</aside>'\n\n\t\t);\n\n\t\tregister_sidebar( $args );\n\n\t\t\n\n\t\t\t$args = array(\n\n\t\t\t'id' \t\t\t=> \t'footer-column-3',\n\n\t\t\t'class'\t\t\t=>\t'footer-column',\n\n\t\t\t'name'\t\t\t=>\t__( 'footer-column-3', 'myTheme' ),\n\n\t\t\t'description'\t=>\t__( 'footer-column-3', 'myTheme' ),\n\n\t\t\t'before_title'\t=>\t'<header class=\"footer-column-header\">',\n\n\t\t\t'after_title'\t=>\t'</header>',\n\n\t\t\t'before_widget'\t=>\t'<aside id=\"%1$s\" class=\"block %2$s\">',\n\n\t\t\t'after_widget'\t=>\t'</aside>'\n\n\t\t);\n\n\t\tregister_sidebar( $args );\n\n\t\n\n\t\t\t$args = array(\n\n\t\t\t'id' \t\t\t=> \t'footer-column-4',\n\n\t\t\t'class'\t\t\t=>\t'footer-column',\n\n\t\t\t'name'\t\t\t=>\t__( 'footer-column-4', 'myTheme' ),\n\n\t\t\t'description'\t=>\t__( 'footer-column-4', 'myTheme' ),\n\n\t\t\t'before_title'\t=>\t'<header class=\"footer-column-header\">',\n\n\t\t\t'after_title'\t=>\t'</header>',\n\n\t\t\t'before_widget'\t=>\t'<aside id=\"%1$s\" class=\"block %2$s\">',\n\n\t\t\t'after_widget'\t=>\t'</aside>'\n\n\t\t);\n\n\t\tregister_sidebar( $args );\n\n\t\n\n\t\t\n\n\t}", "title": "" }, { "docid": "f0b627398549424e881ee25f95366701", "score": "0.51937735", "text": "function affinity_mikado_register_sticky_header_areas() {\n register_sidebar(array(\n 'name' => esc_html__('Sticky Right', 'affinity'),\n 'id' => 'mkd-sticky-right',\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s mkd-sticky-right-widget\"><div class=\"mkd-sticky-right-widget-inner\">',\n 'after_widget' => '</div></div>',\n 'description' => esc_html__('Widgets added here will appear on the right hand side in sticky menu', 'affinity')\n ));\n\t}", "title": "" }, { "docid": "757544de365b99b09f533ed4a54484c2", "score": "0.51894987", "text": "public function PostsSideBar()\n\t{\tob_start();\n\t\techo '<div id=\"sidebar\" class=\"col\">', \n\t\t\t$this->GetCategorySubmenu(), \n\t\t\t$this->GetArchiveSubmenu(), \n\t\t\t$this->GetSidebarCourses(), \n\t\t\t$this->GetSidebarQuote(), '</div>';\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "0b123e2b2c11358c08992244cc30b3c7", "score": "0.51893103", "text": "function hookleftColumn($params)\n\t{\t\t\n if( ($this->_params->get(\"lofhook\", \"leftColumn\") == \"leftColumn\") && ($this->_params->get(\"module_group\", \"pages\") == \"pages\") ) {\n return $this->processHook( $params,\"leftColumn\");\n }\n\t}", "title": "" }, { "docid": "15e8eed9d42c81cb0d047d094faedbdf", "score": "0.5183163", "text": "function fw_ext_extension_get_columns_classes( $full_width = false ) {\n $main_column_class = ' column-main';\n $sidebar_class = ' column-sidebar';\n \n //default values\n $column_classes = array(\n 'main_column_class' => 'col-12 col-xs-12 col-md-7 col-xl-8' . $main_column_class,\n 'sidebar_class' => 'col-12 col-xs-12 col-md-5 col-xl-4' . $sidebar_class,\n 'position' => 'right'\n );\n if ( is_page() ) {\n $column_classes['main_column_class'] = \"col-12\" . $main_column_class;\n $column_classes['sidebar_class'] = false;\n $column_classes['position'] = 'full';\n \n //if no Unyson installed - return - no sidebar on pages by default\n if ( ! function_exists( 'fw_ext_sidebars_show' ) ) {\n return $column_classes;\n }\n }\n \n //check for unyson\n if ( function_exists( 'fw_ext_sidebars_get_current_position' ) ) {\n \n //full width\n if ( in_array( fw_ext_sidebars_get_current_position(), array( 'full' ) ) ) {\n \n $column_classes['main_column_class'] = \"col-12\" . $main_column_class;\n $column_classes['sidebar_class'] = false;\n $column_classes['position'] = 'full';\n //making 10 columns width on single post if no sidebar\n if ( is_single() ) {\n $column_classes['main_column_class'] = \"col-12 col-xs-12 col-xl-10 offset-xl-1\" . $main_column_class;\n $column_classes['sidebar_class'] = false;\n $column_classes['position'] = 'full';\n }\n \n //left sidebar\n } elseif ( in_array( fw_ext_sidebars_get_current_position(), array( 'left' ) ) ) {\n \n $column_classes['main_column_class'] = \"col-12 col-xs-12 col-lg-7 col-xl-8 order-xl-2\" . $main_column_class;\n $column_classes['sidebar_class'] = \"col-12 col-xs-12 col-lg-5 col-xl-4 order-xl-1\" . $sidebar_class;\n $column_classes['position'] = 'left';\n \n } elseif ( in_array( fw_ext_sidebars_get_current_position(), array( 'right' ) ) ) {\n \n $column_classes['main_column_class'] = \"col-12 col-xs-12 col-lg-7 col-xl-8 \" . $main_column_class;\n $column_classes['sidebar_class'] = \"col-12 col-xs-12 col-lg-5 col-xl-4\" . $sidebar_class;\n $column_classes['position'] = 'right';\n \n }\n //no catching right sidebar. Right sidebar is default\n else {\n //default - right sid\n //ebar\n $column_classes['main_column_class'] = \"col-12 col-xs-12 col-lg-7 col-xl-8\" . $main_column_class;\n $column_classes['sidebar_class'] = \"col-12 col-xs-12 col-lg-5 col-xl-4\" . $sidebar_class;\n $column_classes['position'] = 'right';\n \n //default for page is fullwidth - do we need this?\n if ( is_page() ) {\n $column_classes['main_column_class'] = \"col-12\" . $main_column_class;\n $column_classes['sidebar_class'] = false;\n $column_classes['position'] = 'full';\n }\n \n }\n }\n \n if ( $full_width || !digiboost_is_active_widgets_in_main_sidebar_exists() ) {\n $column_classes['main_column_class'] = \"col-12\" . $main_column_class;\n $column_classes['sidebar_class'] = false;\n $column_classes['position'] = 'full';\n }\n \n return $column_classes;\n }", "title": "" }, { "docid": "4a64331ae9942fcf1d594e935cd5d8cf", "score": "0.51716334", "text": "function madza_sidebar_function() { \n\tglobal $post;\t \n $args = array(\n \t'post_type'=> 'mt_sidebar',\n 'order' => 'ASC',\n 'posts_per_page' => 999, \n 'orderby' => 'date', \n 'order' => 'DSC',\n );\n \n query_posts($args); while ( have_posts() ) : the_post();\n \n\t\t\tregister_sidebar(array(\n\t\t\t 'name' => __(get_the_title()),\n\t\t\t 'id' => 'sidebar-id-'.get_the_ID().'',\n\t\t\t 'description' => __( 'Widget area created from Sidebar custom post type.' , 'madza_translate'),\n\t\t\t 'before_widget' => '<div class=\"menu_categories\">',\n\t\t\t\t'after_widget' => '<div class=\"clear\"></div></div>',\n\t\t\t\t'before_title' => '<h4 class=\"widget_h\"><span>',\n\t\t\t\t'after_title' => '</span></h4>',\n\t\t\t));\n\t\t\t\n\t endwhile; wp_reset_query(); \n}", "title": "" }, { "docid": "4f8b7568c59cae074372b56c06cc27ce", "score": "0.5169154", "text": "private function _alter_sidebar_deft()\n\t{\n\t\t$this->EE->db->query(\"ALTER TABLE exp_members ALTER COLUMN show_sidebar SET DEFAULT 'n'\");\n\t}", "title": "" }, { "docid": "2a58873071e88108b2ed51aa2b54e8ad", "score": "0.51663446", "text": "function refined_magazine_construct_sidebar()\r\n {\r\n global $refined_magazine_theme_options;\r\n $sidebar = $refined_magazine_theme_options['refined-magazine-sidebar-archive-page'] ? $refined_magazine_theme_options['refined-magazine-sidebar-archive-page'] : 'right-sidebar';\r\n if (is_singular()) {\r\n $sidebar = $refined_magazine_theme_options['refined-magazine-sidebar-blog-page'] ? $refined_magazine_theme_options['refined-magazine-sidebar-blog-page'] : 'right-sidebar';\r\n global $post;\r\n $single_sidebar = get_post_meta($post->ID, 'refined_magazine_sidebar_layout', true);\r\n if (('default-sidebar' != $single_sidebar) && (!empty($single_sidebar))) {\r\n $sidebar = $single_sidebar;\r\n }\r\n }\r\n if (is_front_page()) {\r\n $sidebar = $refined_magazine_theme_options['refined-magazine-sidebar-front-page'] ? $refined_magazine_theme_options['refined-magazine-sidebar-front-page'] : 'right-sidebar';\r\n }\r\n if (($sidebar == 'right-sidebar') || ($sidebar == 'left-sidebar')) {\r\n get_sidebar();\r\n }\r\n }", "title": "" }, { "docid": "b7d918152e3a658361601435ccda869b", "score": "0.51577383", "text": "function hookleftColumn($params)\n\t{\t\t\n\t\treturn $this->processHook( $params,\"leftColumn\");\n\t}", "title": "" }, { "docid": "2bc1f3ce70997f577ad6bd0419080b79", "score": "0.5154942", "text": "function custom_layout() {\n\t\t\n\t\t$l = explode( 'c', $this->option( 'layout' ) );\n\t\t$s = false;\n\t\t\n\t\tif ( 'left' == $this->option( 'dim_alignment' ) )\n\t\t\t$s = '#wrap{margin:0 auto 0 0;';\n\t\telseif ( 'right' == $this->option( 'dim_alignment' ) )\n\t\t\t$s = '#wrap{margin:0 0 0 auto;';\n\t\telse\n\t\t\t$s = '#wrap{';\n\t\t\n\t\t$s .= 'width:' . $this->option( 'dim_site' ) . 'px}';\n\t\t$sw1 = $this->option('dim_sidebar1') ? \"width:{$this->option('dim_sidebar1')}px;\": \"\";\n\t\t$sw2 = $this->option('dim_sidebar2') ? \"width:{$this->option('dim_sidebar2')}px;\": \"\";\n\n\t\tif ( 3 == $l[ 0 ] ) {\n\t\t\t$s1 = $s2 = false;\n\t\t\t$s .= '#content{width:' . $this->option( 'dim_content' ) . 'px;';\n\t\t\t\n\t\t\tif ( 3 == $l[ 1 ] || 6 == $l[ 1 ] ) {\n\t\t\t\t$s .= 'float:left;}';\n\t\t\t\t$s1 = 'float:left;';\n\t\t\t\t$s2 = 'float:right;';\n\t\t\t} elseif ( 2 == $l[ 1 ] || 5 == $l[ 1 ] )\n\t\t\t\t$s .= 'float:right}#sidebar1,#sidebar2{float:left}';\n\t\t\telse\n\t\t\t\t$s .= 'float:left}#sidebar1,#sidebar2{float:right}';\n\t\t\t\n\t\t\t$s .= \t'#sidebar1{'.$s1.$sw1.'}'.\n\t\t\t\t'#sidebar2{'.$s2.$sw2.'}';\n\t\t\t\n\t\t\tif ( 6 == $l[ 1 ] )\n\t\t\t\t$s = str_replace( '#content', '#main', $s );\n\t\t} elseif ( 2 == $l[ 0 ] ) {\n\t\t\t$s .= \t'#sidebar2{display:none}'.\n\t\t\t\t'#content{width:' . $this->option( 'dim_content' ) . 'px;' .\n\t\t\t\t( ( $l[ 1 ] % 2 ) \n\t\t\t\t? 'float:left}#sidebar1{float:right;'.$sw1.'}' \n\t\t\t\t: 'float:right}#sidebar1{float:left;'.$sw2.'}' );\n\t\t\t\n\t\t\tif ( 3 == $l[ 1 ] || 4 == $l[ 1 ] )\n\t\t\t\t$s = str_replace( '#content', '#main', $s );\n\t\t} else\n\t\t\t$s .= '#sidebar1,#sidebar2{display:none}';\n\t\t\n\t\techo '<style>' . $s . '</style>';\n\t}", "title": "" }, { "docid": "a24623021caca0498130c0d5b4a066c5", "score": "0.51492786", "text": "function alienship_do_sidebar( $prefix = false ) {\n\n\tif ( ! $prefix )\n\t\t_doing_it_wrong( __FUNCTION__, __( 'You must specify a prefix when using alienship_do_sidebar.', 'alienship' ), '1.0' );\n\n\n\tif ( current_theme_supports( 'theme-layouts' ) && 'layout-1c' !== theme_layouts_get_layout() || 'footer' == $prefix || !current_theme_supports( 'theme-layouts' ) ):\n\n\t\t// Get our grid class\n\t\t$sidebar_class = alienship_sidebar_class( $prefix );\n\n\t\tif ( $sidebar_class ): ?>\n\n\t\t\t<div class=\"<?php echo $prefix; ?>-sidebar-row row\">\n\t\t\t\t<?php do_action( 'alienship_sidebar_row_top' );\n\n\t\t\t\tif ( is_active_sidebar( $prefix.'-1' ) ): ?>\n\t\t\t\t\t<aside id=\"<?php echo $prefix; ?>-sidebar-1\" class=\"sidebar widget<?php echo $sidebar_class; ?>\">\n\t\t\t\t\t\t<?php dynamic_sidebar( $prefix.'-1' ); ?>\n\t\t\t\t\t</aside>\n\t\t\t\t<?php endif;\n\n\n\t\t\t\tif ( is_active_sidebar( $prefix.'-2' ) ): ?>\n\t\t\t\t\t<aside id=\"<?php echo $prefix; ?>-sidebar-2\" class=\"sidebar widget<?php echo $sidebar_class; ?>\">\n\t\t\t\t\t\t<?php dynamic_sidebar( $prefix.'-2' ); ?>\n\t\t\t\t\t</aside>\n\t\t\t\t<?php endif;\n\n\n\t\t\t\tif ( is_active_sidebar( $prefix.'-3' ) ): ?>\n\t\t\t\t\t<aside id=\"<?php echo $prefix; ?>-sidebar-3\" class=\"sidebar widget<?php echo $sidebar_class; ?>\">\n\t\t\t\t\t\t<?php dynamic_sidebar( $prefix.'-3' ); ?>\n\t\t\t\t\t</aside>\n\t\t\t\t<?php endif;\n\n\n\t\t\t\tif ( is_active_sidebar( $prefix.'-4' ) ): ?>\n\t\t\t\t\t<aside id=\"<?php echo $prefix; ?>-sidebar-4\" class=\"sidebar widget<?php echo $sidebar_class; ?>\">\n\t\t\t\t\t\t<?php dynamic_sidebar( $prefix.'-4' ); ?>\n\t\t\t\t\t</aside>\n\t\t\t\t<?php endif;\n\n\t\t\t\tdo_action( 'alienship_sidebar_row_bottom' ); ?>\n\t\t\t</div><!-- .row -->\n\n\t\t<?php endif; //$sidebar_class\n\n\tendif; //current_theme_supports\n}", "title": "" }, { "docid": "70f3102c5f71715691991979dc85233c", "score": "0.5140216", "text": "function get_sidebar($index){\n\t\t\n\t\t\tdynamic_sidebar($index);\t\t\t\n\t\t\n\t}", "title": "" }, { "docid": "6c4926990c30b8ff60ab98ade4421988", "score": "0.51387936", "text": "public static function settings_side() { ?>\n\n\t\t<div id=\"side-info-column\" class=\"inner-sidebar\">\n\n\t\t\t<div class=\"meta-box-sortables\">\n\t\t\t\t<?php self::sidebox_about(); ?>\n\t\t\t</div>\n\n\t\t\t<div class=\"meta-box-sortables\">\n\t\t\t\t<?php self::sidebox_status(); ?>\n\t\t\t</div>\n\n\t\t\t<div class=\"meta-box-sortables\">\n\t\t\t\t<?php self::sidebox_data(); ?>\n\t\t\t</div>\n\n\t\t\t<div class=\"meta-box-sortables\">\n\t\t\t\t<?php self::sidebox_links(); ?>\n\t\t\t</div>\n\n\t\t</div> <!-- // #side-info-column .inner-sidebar -->\n\n\t<?php }", "title": "" }, { "docid": "d198787251f36df636bf64709e608e8e", "score": "0.51383287", "text": "function pd_register_sidebars() {\n\n //register the sidebars\n register_sidebar(array('name' => 'Main Sidebar', 'id' => 'sidebar-1'));\n register_sidebar(array('name' => 'Right Sidebar', 'id' => 'sidebar-2'));\n}", "title": "" }, { "docid": "940041c2e755c2a1eadca2281d0bcaa2", "score": "0.51354486", "text": "function woocommerce_get_sidebar()\n {\n }", "title": "" }, { "docid": "94f7f530dda0bfa629b3e61e91427a94", "score": "0.51290596", "text": "function eino_one_column() {\n\n\tif ( !is_active_sidebar( 'primary' ) && !is_active_sidebar( 'secondary' ) && '1c' == get_theme_mod( 'theme_layout' ) )\n\t\tadd_filter( 'theme_mod_theme_layout', 'eino_theme_layout_one_column' );\n\t\t\n\telseif ( !is_active_sidebar( 'primary' ) && !is_active_sidebar( 'secondary' ) && '1c-w' == get_theme_mod( 'theme_layout' ) )\n\t\tadd_filter( 'theme_mod_theme_layout', 'eino_theme_layout_one_column_w' );\n\t\n\telseif ( is_post_type_archive( array( 'download', 'portfolio_item' ) ) )\n\t\tadd_filter( 'theme_mod_theme_layout', 'eino_theme_layout_one_column' );\n\t\t\n\telseif ( is_post_type_archive( array( 'download', 'portfolio_item' ) ) && '1c-w' == get_theme_mod( 'theme_layout' ) )\n\t\tadd_filter( 'theme_mod_theme_layout', 'eino_theme_layout_one_column_w' );\n\t\t\n\telseif ( is_tax( array( 'portfolio', 'download_category', 'download_tag' ) ) )\n\t\tadd_filter( 'theme_mod_theme_layout', 'eino_theme_layout_one_column' );\n\n\telseif ( is_attachment() && wp_attachment_is_image() && 'default' == get_post_layout( get_queried_object_id() ) )\n\t\tadd_filter( 'theme_mod_theme_layout', 'eino_theme_layout_one_column' );\n\t\t\n\telseif ( is_page_template( 'page-templates/front-page.php' ) || is_page_template( 'page-templates/portfolio-page.php' ) || is_page_template( 'page-templates/slider.php' ) || is_page_template( 'page-templates/download-page.php' ) )\n\t\tadd_filter( 'theme_mod_theme_layout', 'eino_theme_layout_one_column' );\n\t\t\n\telseif ( function_exists( 'woocommerce_list_pages' ) && ( is_shop() || is_product_category() || is_product_tag() ) )\n\t\tadd_filter( 'theme_mod_theme_layout', 'eino_theme_layout_one_column' );\n\n}", "title": "" }, { "docid": "d2c189b7c4fd74556f14dd373aa92d11", "score": "0.5114413", "text": "function ckav_action_theme_widgets_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => esc_html__( 'Sticky sidebar', 'flox' ),\n\t\t'id' => 'sticky-sidebar',\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h1 class=\"widget-title content-title\">',\n\t\t'after_title' => '</h1>',\n\t) );\n}", "title": "" }, { "docid": "ce53b2a5aed9f2d5c1db566cc85dc794", "score": "0.51097834", "text": "public function set_sidebar() {\n\n\n\t\tadd_action( 'the_post', function ($post) {\n\n\t\t\tif ( ! function_exists('get_field') || is_admin() )\n\t\t\t\treturn;\n\n\n\t\t\t/**\n\t\t\t * Set Sidebar per post type\n\t\t\t */\n\t\t\tswitch ( get_key('post_type', $post) ) :\n\n\t\t\t\tcase 'page':\n\n\t\t\t\t\t$post->sidebar = get_post_meta($post->ID, 'select_sidebar', true);\n\t\t\t\tbreak;\n\t\t\tendswitch;\n\n\t\t}, 10, 1);\n\t}", "title": "" }, { "docid": "a69683fc1754d1d6bbce82beb1e20e97", "score": "0.51072145", "text": "public function sidebar_widget() {\n\t\techo '<div data-widget=\"plista_widget_sidebar\"></div>';\n\t}", "title": "" }, { "docid": "568720d49022ada01c452394c22c295b", "score": "0.5106654", "text": "public function foodbakery_set_col_right($params = '') {\n\t\t\textract($params);\n\t\t\t$foodbakery_output = '';\n\t\t\t//$foodbakery_output .= '</div><!-- end col2-right-->';\n\t\t\tif ( (isset($col_heading) && $col_heading != '') || (isset($help_text) && $help_text <> '') ) {\n\t\t\t\t//$foodbakery_output .= '<div class=\"col3\"><h3>' . esc_html($col_heading) . '</h3><p>' . esc_html($help_text) . '</p></div>';\n\t\t\t}\n\t\t\t// if(isset($extra) && $extra == 'div'){\n\t\t\t$foodbakery_output .= '</div>';\n\t\t\t// }\n\t\t\tif ( isset($echo) && $echo == true ) {\n\t\t\t\techo force_balance_tags($foodbakery_output);\n\t\t\t} else {\n\t\t\t\treturn $foodbakery_output;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "6b8ff482f6c2436238eb825992d4899b", "score": "0.5105529", "text": "function parallax_hook_sidebar_before() {\n \tdo_action( 'parallax_sidebar_before' );\n \tdo_action( 'tha_sidebars_before' ); # Pluralization is intentional\n }", "title": "" }, { "docid": "b16932f7ce5f4130f8e580272e906c06", "score": "0.50942576", "text": "function floater_sidebar() {\n\n\t\tregister_sidebar(\n\t\t\tarray (\n\t\t\t\t'id' => 'floater',\n\t\t\t\t'name' => __('Floating Sidebar', 'floater'),\n\t\t\t\t'description' => __('Add widgets to show in your floating sidebar.', 'floater'),\n\t\t\t\t'before_widget' => '<section id=\"%1$s\" class=\"%2$s floater-sidebar-widget\">',\n\t\t\t\t'after_widget' => '</section>',\n\t\t\t\t'before_title' => '<h4 class=\"floater-title\">',\n\t\t\t\t'after_title' => '</h4>'\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "3faa6d840e19873f343305026c18642e", "score": "0.50881153", "text": "public function hookRightColumn( $params ){\n\treturn $this->hookLeftColumn( $params,\"right\" );\n }", "title": "" }, { "docid": "931626c9e74b8659bc6a34794a4eb81a", "score": "0.5077917", "text": "function fluid_edge_add_support_custom_sidebar() {\n add_theme_support('FluidEdgeClassSidebar');\n if (get_theme_support('FluidEdgeClassSidebar')) new FluidEdgeClassSidebar();\n }", "title": "" }, { "docid": "29690ff0592416a74579937353cb9fc1", "score": "0.5076383", "text": "protected function composeSidebarLatest()\n {\n view()->composer('products.partials.sidebar_latest', function ($view) {\n $view->with('latest_cooperatives', User::hottest()->take(8)->get());\n });\n }", "title": "" }, { "docid": "75bfdb2452a7a88411d6daf0abd8457f", "score": "0.5072645", "text": "public function side( $args, $assoc_args ) {\n\t\t$sides = array( 'left', 'right' );\n\n\t\tif ( empty( $args[0] ) || ! in_array( $args[0], $sides ) ) {\n\t\t\t$message = sprintf( __( 'Missing or invalid side param! Valid are: %s', LANGBF_TD ), implode( ', ', $sides ) );\n\t\t\tWP_CLI::error( $message );\n\t\t\treturn;\n\t\t}\n\n\t\tupdate_option( 'langbf_side', $args[0] );\n\n\t\t$message = __( 'Updated side of language flags on the bar!', LANGBF_TD );\n\t\tWP_CLI::success( $message );\n\t}", "title": "" }, { "docid": "5b94f1a436515c81434236d9716ffa02", "score": "0.50690854", "text": "function agriflex_after_sidebar() {\n\n do_action( 'agriflex_after_sidebar' );\n\n}", "title": "" }, { "docid": "3dbbed26223686d0e80f1944c082e964", "score": "0.5050353", "text": "public function _toggleSidePanel()\n \t{\n\t\t#currently their cookie says... lets reverse it\n \t\t$current\t= IPSCookie::get('hide_eco_sidebar');\n \t\t$new\t\t= $current ? 0 : 1;\n \t\t\n\t\t#set the updated cookie! not a schickerdoodle but still not bad\n \t\tIPSCookie::set( 'hide_eco_sidebar', $new );\n \t\t\n\t\t#bonk em back to where they were \n \t\t$this->registry->getClass('output')->silentRedirect( $this->settings['base_url'].'app=ibEconomy&amp;tab='.$this->request['url'].'&amp;area='.$this->request['area'].'&amp;type='.$this->request['type'].'&amp;id='.$this->request['id']);\n \t}", "title": "" }, { "docid": "54d54e98bcf3b732395b09c0e8443377", "score": "0.5047974", "text": "function shuttle_sidebar_html() {\r\n\r\n// Get theme options values.\r\n$shuttle_homepage_layout = shuttle_var ( 'shuttle_homepage_layout' );\r\n$shuttle_general_layout = shuttle_var ( 'shuttle_general_layout' );\r\n$shuttle_blog_layout = shuttle_var ( 'shuttle_blog_layout' );\r\n$shuttle_post_layout = shuttle_var ( 'shuttle_post_layout' );\r\n\r\ndo_action('shuttle_sidebar_html');\r\n\r\n\tif ( is_front_page() ) {\t\r\n\t\tif ( $shuttle_homepage_layout == \"option1\" or empty( $shuttle_homepage_layout ) ) {\t\t\r\n\t\t\t\techo '';\r\n\t\t} else if ( $shuttle_homepage_layout == \"option2\" ) {\r\n\t\t\t\techo get_sidebar(); \r\n\t\t} else if ( $shuttle_homepage_layout == \"option3\" ) {\r\n\t\t\t\techo get_sidebar();\r\n\t\t}\r\n\t} else if ( is_page() ) {\t\r\n\t\tif ( $shuttle_general_layout == \"option1\" or empty( $shuttle_general_layout ) ) {\t\t\r\n\t\t\techo '';\r\n\t\t} else if ( $shuttle_general_layout == \"option2\" ) {\r\n\t\t\techo get_sidebar();\r\n\t\t} else if ( $shuttle_general_layout == \"option3\" ) {\r\n\t\t\techo get_sidebar();\r\n\t\t}\r\n\t} else if ( shuttle_check_isblog() and ! is_single() ) {\r\n\t\tif ( $shuttle_blog_layout == \"option1\" or empty( $shuttle_blog_layout ) ) {\t\t\r\n\t\t\techo '';\r\n\t\t} else if ( $shuttle_blog_layout == \"option2\" ) {\r\n\t\t\techo get_sidebar();\r\n\t\t} else if ( $shuttle_blog_layout == \"option3\" ) {\r\n\t\t\techo get_sidebar();\r\n\t\t}\r\n\t} else if ( is_singular( 'post' ) ) {\r\n\t\tif ( $shuttle_post_layout == \"option1\" or empty( $shuttle_post_layout ) ) {\r\n\t\t\techo '';\r\n\t\t} else if ( $shuttle_post_layout == \"option2\" ) {\r\n\t\t\techo get_sidebar();\r\n\t\t} else if ( $shuttle_post_layout == \"option3\" ) {\r\n\t\t\techo get_sidebar();\r\n\t\t} else {\r\n\t\t\techo '';\r\n\t\t}\r\n\t} else if ( is_search() ) {\t\r\n\t\tif ( $shuttle_general_layout == 'option1' or empty( $shuttle_general_layout ) ) {\t\t\r\n\t\t\techo '';\r\n\t\t} else if ( $shuttle_general_layout == \"option2\" ) {\r\n\t\t\tget_sidebar();\r\n\t\t} else if ( $shuttle_general_layout == \"option3\" ) {\r\n\t\t\tget_sidebar();\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "d91722d0ac38b64d655bc3df9d1c22d1", "score": "0.50277096", "text": "function gp_widgets_init() {\n\t register_sidebar( array(\n\t 'name' => ( 'Right Sidebar' ),\n\t 'description' => 'The Right sidebar',\n\t 'class' => '',\n\t 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t 'after_widget' => '</div>',\n\t 'before_title' => '<h6 class=\"widget-title\"> ',\n\t 'after_title' => ' </h6>',\n\t ) );\n\t}", "title": "" }, { "docid": "de4d049c4e1a725507154977a2b18ce4", "score": "0.5018832", "text": "function get_custom_posts_sidebar() {\n get_sidebar( 'custom-posts' );\n}", "title": "" }, { "docid": "f0d5888414eb34da1e43048ebec4cf56", "score": "0.4999767", "text": "function my_register_sidebars() {\n register_sidebar(\n array(\n 'id' => 'right-sidebar',\n 'name' => __( 'Primary Sidebar' ),\n 'description' => __( 'A short description of the sidebar.' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\" p-4 >',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n )\n );\n /* Repeat register_sidebar() code for additional sidebars. */\n}", "title": "" }, { "docid": "d85d5afd80ceb5db5ac21a4f023ec85d", "score": "0.49888822", "text": "function _wimbase_culc_content_cols(&$variables, $primary_cols = 0, $secondary_cols = 0, $offset_primary = 0) {\n $content_cols = 12 - $primary_cols - $secondary_cols;\n $variables['sidebar_first_classes'][] = 'col-sm-' . $primary_cols;\n $variables['content_column_classes'][] = 'col-sm-' . $content_cols;\n // Offset sidebar first.\n if ($offset_primary) {\n $variables['content_column_classes'][] = 'col-sm-offset-' . $offset_primary;\n }\n\n // Fix accessibility for primary region.\n if ($primary_cols && $content_cols !== 12) {\n $variables['content_column_classes'][] = 'col-md-push-' . $primary_cols;\n $variables['sidebar_first_classes'][] = 'col-md-pull-' . $content_cols;\n }\n\n $variables['content_column_class'] = ' class=\"' . implode(' ', $variables['content_column_classes']) . '\"';\n $variables['sidebar_first_column_class'] = ' class=\"' . implode(' ', $variables['sidebar_first_classes']) . '\"';\n}", "title": "" }, { "docid": "3fa81c760247c818fe1084f210a0af50", "score": "0.49880192", "text": "static public function refresh_sidebar_widgets() {\n\t\t// Contains an array of all sidebars and widgets inside each sidebar.\n\t\t$widgetized_sidebars = self::get_sidebar_widgets();\n\n\t\t$cs_sidebars = self::get_custom_sidebars();\n\t\t$delete_widgetized_sidebars = array();\n\n\t\tforeach ( $widgetized_sidebars as $id => $bar ) {\n\t\t\tif ( substr( $id, 0, 3 ) == self::$sidebar_prefix ) {\n\t\t\t\t$found = false;\n\t\t\t\tforeach ( $cs_sidebars as $csbar ) {\n\t\t\t\t\tif ( $csbar['id'] == $id ) {\n\t\t\t\t\t\t$found = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( ! $found ) {\n\t\t\t\t\t$delete_widgetized_sidebars[] = $id;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$all_ids = array_keys( $widgetized_sidebars );\n\t\tforeach ( $cs_sidebars as $cs ) {\n\t\t\t$sb_id = $cs['id'];\n\t\t\tif ( ! in_array( $sb_id, $all_ids ) ) {\n\t\t\t\t$widgetized_sidebars[ $sb_id ] = array();\n\t\t\t}\n\t\t}\n\n\t\tforeach ( $delete_widgetized_sidebars as $id ) {\n\t\t\tunset( $widgetized_sidebars[ $id ] );\n\t\t}\n\n\t\tupdate_option( 'sidebars_widgets', $widgetized_sidebars );\n\t}", "title": "" }, { "docid": "baa3cce7ca590fcc20aee11d48274962", "score": "0.49873528", "text": "function get_sidebar($name = \\null)\n{\n}", "title": "" }, { "docid": "997a6910e3532fbe3655b845a8b4e5ba", "score": "0.4982388", "text": "function flow_elated_register_sticky_header_areas() {\n if(in_array(flow_elated_options()->getOptionValue('header_behaviour'), array('sticky-header-on-scroll-up','sticky-header-on-scroll-down-up'))) {\n register_sidebar(array(\n 'name' => esc_html__('Sticky Right', 'flow'),\n 'id' => 'eltd-sticky-right',\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s eltd-sticky-right\">',\n 'after_widget' => '</div>',\n 'description' => esc_html__('Widgets added here will appear on the right hand side in sticky menu', 'flow')\n ));\n }\n }", "title": "" }, { "docid": "d62ec9edecc212456041356fede86540", "score": "0.49778345", "text": "public function update_sidebar($direction){\n\t\t\n\t\t//Check for AJAX request - kill if false\n\t\tif($this->validation->is_ajax_request() == FALSE){\n\t\t\techo \"Error: access forbidden\";\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t//Validate the sidebar\n\t\tif(!$this->validation->in_valid_range($direction,$range = array('OPEN','CLOSED'))){\n\t\t\t$direction = \"OPEN\";\n\t\t}\n\t\t\n\t\t//Load user model\n\t\t$this->load->model('User_model','User');\n\t\t\n\t\t//Run function\n\t\t$this->User->update_siderbar_preference($this->ion_auth->get_user_id(),$direction);\n\t\treturn;\n\t\t\n\t}", "title": "" }, { "docid": "67e832b5101b9db027f0f180027b78a9", "score": "0.49755317", "text": "function fiorello_mikado_get_divided_left_widget_area() {\n\t\t$page_id = fiorello_mikado_get_page_id();\n\t\t$custom_menu_widget_area = get_post_meta( $page_id, 'mkdf_custom_divided_left_area_sidebar_meta', true );\n\n\t\tif ( get_post_meta( $page_id, 'mkdf_disable_divided_left_widget_area_meta', 'true' ) !== 'yes' ) {\n\t\t\tif ( is_active_sidebar( 'mkdf-header-divided-left-widget-area' ) && empty( $custom_menu_widget_area ) ) {\n\t\t\t\tdynamic_sidebar( 'mkdf-header-divided-left-widget-area' );\n\t\t\t} else if ( ! empty( $custom_menu_widget_area ) && is_active_sidebar( $custom_menu_widget_area ) ) {\n\t\t\t\tdynamic_sidebar( $custom_menu_widget_area );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a896e3fae5c6bddaf74670d198822f42", "score": "0.49711204", "text": "function parallax_hook_sidebar_bottom() {\n \tdo_action( 'parallax_sidebar_bottom' );\n \tdo_action( 'tha_sidebar_bottom' );\n }", "title": "" }, { "docid": "66c1a3f18beac1988496159a79b61340", "score": "0.49644765", "text": "public function stay_current_nav_widgets_init() {\n\n\t\tregister_sidebar( array(\n\t\t\t'name' => 'Stay Current Page Nav Left Col',\n\t\t\t'id' => 'stay_current_page_nav',\n\t\t\t'before_widget' => '<div id=\"stayCurrentNav\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '',\n\t\t\t'after_title' => '',\n\t\t) );\n\n\t}", "title": "" }, { "docid": "53a1031665476ee0395e0d0b19087dd0", "score": "0.49597567", "text": "function ct_before_sidebar() {\n\t// Your Code Here\n}", "title": "" }, { "docid": "00fa6e9479b016f408690931b7888d94", "score": "0.49520382", "text": "function magazinevibe_edge_register_sticky_header_areas() {\n if(in_array(magazinevibe_edge_options()->getOptionValue('header_behaviour'), array('sticky-header-on-scroll-up','sticky-header-on-scroll-down-up'))) {\n register_sidebar(array(\n 'name' => esc_html__('Sticky Right', 'magazinevibe'),\n 'id' => 'edgtf-sticky-right',\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s edgtf-sticky-right\">',\n 'after_widget' => '</div>',\n 'description' => esc_html__('Widgets added here will appear on the right hand side in sticky menu', 'magazinevibe')\n ));\n }\n }", "title": "" }, { "docid": "199285a70323e518ea31f649d32af723", "score": "0.49473107", "text": "function my_sidebars(){\n register_sidebar(\n array(\n 'name' => 'Page Sidebar',\n 'id' => 'page-sidebar',\n 'before_title' => '<h4 class=\"widget-title\">',\n 'after_title' => '</h4>'\n )\n );\n register_sidebar(\n array(\n 'name' => 'Blog Sidebar',\n 'id' => 'blog-sidebar',\n 'before_title' => '<h4 class=\"widget-title\">',\n 'after_title' => '</h4>'\n )\n );\n}", "title": "" }, { "docid": "4c1408ad5551cd93516847d62c0732e0", "score": "0.49417186", "text": "function zp_side_bar() {?>\n\t<div id=\"sidebar\">\n\t\t<?php \n\t\t\n//-------------If you are in the Image Page\n\n\tif (in_context(ZP_IMAGE)) {?>\n\t\t\t\t<div class=\"imgnav\">\n\t\t\t\t\t<?php if (hasPrevImage()) { ?>\n\t\t\t\t\t<div class=\"imgprevious\"><a href=\"<?php echo getPrevImageURL();?>\" title=\"Previous Image\"><img src=\"<?php echo getPrevImageThumb();?>\" /><br /><small>&laquo; prev |</small></a></div>\n\t\t\t\t\t<?php } if (hasNextImage()) { ?>\n\t\t\t\t\t<div class=\"imgnext\"><a href=\"<?php echo getNextImageURL();?>\" title=\"Next Image\"><img src=\"<?php echo getNextImageThumb();?>\" /><br /><small>| next &raquo;</small></a></div>\n\t\t\t\t\t<?php } ?>\n\t\t\t\t</div> \n\t\t<div id=\"sbinfo\">\n\t\t\t<b>Album Name:</b> <?php printAlbumTitle(true);?><br />\n\t\t\t<b>Number of Photos:</b> <?php echo getNumImages();?><br />\n\t\t\t<b>Album Date:</b> <?php printAlbumDate($before=\"Date: \", $nonemessage=\"\", $format=\"%F\"); ?><br />\n\t\t\t<b>Album Description:</b> <?php printAlbumDesc(true);?><br />\n\t\t\t<b>Image Name:</b> <?php echo getImageTitle();?><br />\n\t\t\t<b>Image Description:</b> <?php printImageDesc(true); ?><br />\n\t\t</div>\n\t\t\t<?php\n\t\t\t\n//--------------- If you are in the Album Page \n\n\t} else if (in_context(ZP_ALBUM)) {?>\n\t\t<b>Album Name:</b> <?php printAlbumTitle(true);?><br />\n\t\t<b>Number of Pictures:</b> <?php echo getNumImages();?><br />\n\t\t<b>Album Date:</b> <?php printAlbumDate($before=\"Date: \", $nonemessage=\"\", $format=\"%F\"); ?><br /> \n\t\t<b>Album Description:</b> <?php printAlbumDesc(true);?><br />\t\t\n<?php\n\n//--------------- If you are in the Index Page\n\n\t} else if (in_context(ZP_INDEX)) {?>\n<?php }?>\n\n</div>\n<?php }", "title": "" }, { "docid": "1123f82a83884b47bf0c690384378dc2", "score": "0.49367157", "text": "public function vxSidebar($show = true) {\n\t\techo(\"<div id=\\\"sidebar\\\"></div>\");\n\t}", "title": "" }, { "docid": "bb7f876c6401d23c87573b6f9bd608ba", "score": "0.4936226", "text": "public static function header_sidebars() {\n\t\tself::header_footer_sidebars( 'header' );\n\t}", "title": "" }, { "docid": "94539f53b9edc66ed68662e7c49285b9", "score": "0.49282825", "text": "function vp_sidebars_widgets($data)\n\t\t{\n\t\t\tif($this->is_bbp && $this->is_main_sidebar)\n\t\t\t{\n\t\t\t\t// switch sidebar if bbrepss sidebar has some widgets in it\n\t\t\t\tif(!empty($data[$this->sidebar_id]))\n\t\t\t\t{\n\t\t\t\t\tif(isset($data['sidebar-1']))\n\t\t\t\t\t{\n\t\t\t\t\t\t// uses sidebar-1 as main sidebar in most themes\n\t\t\t\t\t\t// set forum sidebar as main sidebar\n\t\t\t\t\t\t$main_sidebar_key = 'sidebar-1';\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// get first sidebar which should be main in most themes\n\t\t\t\t\t\tforeach($data as $k => $v)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(strpos($k, 'inactive') === false)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$main_sidebar_key = $k;\n\t\t\t\t\t\t\t\tbreak;\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// replace main sidebar with bbpress sidebar\n\t\t\t\t\tif(isset($main_sidebar_key))\n\t\t\t\t\t{\n\t\t\t\t\t\t$data[$main_sidebar_key] = $data[$this->sidebar_id];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// removed from version 1.3 in order to make compatible with wp 3.5\n\t\t\t\t// reset main sidebar request\n\t\t\t\t// $this->is_main_sidebar = false;\n\t\t\t}\n\n\t\t\t// return modified widgets array\n\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "b60d08776a95c3efb63d1e0d7b0f4741", "score": "0.49041468", "text": "function arphabet_widgets_init() {\n\n register_sidebar( array(\n 'name' => 'Single Post Right sidebar',\n 'id' => 'single_post_right',\n 'before_widget' => '<div class=\"sidebar-widget\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"sidebar-widget-title\">',\n 'after_title' => '</h2><hr>',\n ) );\n\n}", "title": "" }, { "docid": "0b628556f7784ab5eb83cfd57598c9be", "score": "0.49036777", "text": "function the_sidebars_init() {\n\t if ( ! function_exists( 'register_sidebar' ) )\n\t return;\n\t\t\n\t\tregister_sidebar(array( \n\t\t\t'name' => __( 'Middle Left', 'pxls' ),\n\t\t\t'id' => 'left',\n\t\t\t'description' => __( 'Normal full width Sidebar', 'pxls' ), \n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widgettitle\">',\n\t\t\t'after_title' => '</h3>'\n\t\t\t)\n\t\t);\n\t\t\n\t\tregister_sidebar(array( \n\t\t\t'name' => __( 'Middle Right', 'pxls' ),\n\t\t\t'id' => 'right',\n\t\t\t'description' => __( 'Normal full width Sidebar', 'pxls' ), \n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widgettitle\">',\n\t\t\t'after_title' => '</h3>'\n\t\t\t)\n\t\t);register_sidebar(array( \n\t\t\t'name' => __( 'Middle Top', 'pxls' ),\n\t\t\t'id' => 'middle-top',\n\t\t\t'description' => __( 'Middle Top widget area.', 'pxls' ), \n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widgettitle\">',\n\t\t\t'after_title' => '</h3>'\n\t\t\t)\n\t\t);\n\t\t\n\t register_sidebar(array( \n\t\t\t'name' => __( 'Middle Bottom', 'pxls' ),\n\t\t\t'id' => 'middle-bottom',\n\t\t\t'description' => __( 'Middle Bottom widget area.', 'pxls' ), \n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widgettitle\">',\n\t\t\t'after_title' => '</h3>'\n\t\t\t)\n\t\t);\n\t\n\t register_sidebar(array( \n\t\t\t'name' => __( 'Top', 'pxls' ),\n\t\t\t'id' => 'top',\n\t\t\t'description' => __( 'Full page width widget area', 'pxls' ), \n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widgettitle\">',\n\t\t\t'after_title' => '</h3>'\n\t\t\t)\n\t\t);\n\t\t\n\t\tregister_sidebar(array( \n\t\t\t'name' => __( 'Top Left', 'pxls' ),\n\t\t\t'id' => 'top-left',\n\t\t\t'description' => __( 'Left column section of the top - will not show if top widget area is active', 'pxls' ), \n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widgettitle\">',\n\t\t\t'after_title' => '</h3>'\n\t\t\t)\n\t\t);\n\t\t\n\t\tregister_sidebar(array( \n\t\t\t'name' => __( 'Top Middle', 'pxls' ),\n\t\t\t'id' => 'top-middle',\n\t\t\t'description' => __( 'Middle column section of the top - will not show if top widget area is active', 'pxls' ), \n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widgettitle\">',\n\t\t\t'after_title' => '</h3>'\n\t\t\t)\n\t\t);\n\t\t\n\t\tregister_sidebar(array( \n\t\t\t'name' => __( 'Top Right', 'pxls' ),\n\t\t\t'id' => 'top-right',\n\t\t\t'description' => __( 'Right column section of the top - will not show if top widget area is active', 'pxls' ), \n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widgettitle\">',\n\t\t\t'after_title' => '</h3>'\n\t\t\t)\n\t\t);\n\t\t\n\t\tregister_sidebar(array( \n\t\t\t'name' => __( 'Bottom', 'pxls' ),\n\t\t\t'id' => 'bottom',\n\t\t\t'description' => __( 'Full page width widget area', 'pxls' ), \n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widgettitle\">',\n\t\t\t'after_title' => '</h3>'\n\t\t\t)\n\t\t);\n\t\t\n\t\tregister_sidebar(array( \n\t\t\t'name' => __( 'Bottom Left', 'pxls' ),\n\t\t\t'id' => 'bottom-left',\n\t\t\t'description' => __( 'Left column section of the bottom - will not show if bottom widget area is active', 'pxls' ), \n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widgettitle\">',\n\t\t\t'after_title' => '</h3>'\n\t\t\t)\n\t\t);\n\t\t\n\t\tregister_sidebar(array( \n\t\t\t'name' => __( 'Bottom Middle', 'pxls' ),\n\t\t\t'id' => 'bottom-middle',\n\t\t\t'description' => __( 'Middle column section of the bottom - will not show if bottom widget area is active', 'pxls' ), \n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widgettitle\">',\n\t\t\t'after_title' => '</h3>'\n\t\t\t)\n\t\t);\n\t\t\n\t\tregister_sidebar(array( \n\t\t\t'name' => __( 'Bottom Right', 'pxls' ),\n\t\t\t'id' => 'bottom-right',\n\t\t\t'description' => __( 'Right column section of the bottom - will not show if bottom widget area is active', 'pxls' ), \n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widgettitle\">',\n\t\t\t'after_title' => '</h3>'\n\t\t\t)\n\t\t);\n\t\t\n\t}", "title": "" }, { "docid": "dd963d114e29783039c1b8b0a68382c8", "score": "0.48948163", "text": "function inspiry_theme_sidebars() {\n\n\t\t// Location: Default Sidebar.\n\t\tregister_sidebar( array(\n\t\t\t'name' => __( 'Default Sidebar', 'framework' ),\n\t\t\t'id' => 'default-sidebar',\n\t\t\t'description' => __( 'Widget area for default sidebar on news and post pages.', 'framework' ),\n\t\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget clearfix %2$s\">',\n\t\t\t'after_widget' => '</section>',\n\t\t\t'before_title' => '<h3 class=\"title\">',\n\t\t\t'after_title' => '</h3>',\n\t\t) );\n\n\t\t// Location: Sidebar Pages.\n\t\tregister_sidebar( array(\n\t\t\t'name' => __( 'Pages Sidebar', 'framework' ),\n\t\t\t'id' => 'default-page-sidebar',\n\t\t\t'description' => __( 'Widget area for default page template sidebar.', 'framework' ),\n\t\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget clearfix %2$s\">',\n\t\t\t'after_widget' => '</section>',\n\t\t\t'before_title' => '<h3 class=\"title\">',\n\t\t\t'after_title' => '</h3>',\n\t\t) );\n\n\t\t// Location: Sidebar for contact page.\n\t\tif ( 'classic' === INSPIRY_DESIGN_VARIATION ) {\n\t\t\tregister_sidebar( array(\n\t\t\t\t'name' => __( 'Contact Sidebar', 'framework' ),\n\t\t\t\t'id' => 'contact-sidebar',\n\t\t\t\t'description' => __( 'Widget area for contact page sidebar.', 'framework' ),\n\t\t\t\t'before_widget' => '<section class=\"widget clearfix %2$s\">',\n\t\t\t\t'after_widget' => '</section>',\n\t\t\t\t'before_title' => '<h3 class=\"title\">',\n\t\t\t\t'after_title' => '</h3>',\n\t\t\t) );\n\t\t}\n\n\t\t// Location: Sidebar Property.\n\t\tregister_sidebar( array(\n\t\t\t'name' => __( 'Property Sidebar', 'framework' ),\n\t\t\t'id' => 'property-sidebar',\n\t\t\t'description' => __( 'Widget area for property detail page sidebar.', 'framework' ),\n\t\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget clearfix %2$s\">',\n\t\t\t'after_widget' => '</section>',\n\t\t\t'before_title' => '<h3 class=\"title\">',\n\t\t\t'after_title' => '</h3>',\n\t\t) );\n\n\t\t// Location: Sidebar Properties List.\n\t\tregister_sidebar( array(\n\t\t\t'name' => __( 'Properties List Sidebar', 'framework' ),\n\t\t\t'id' => 'property-listing-sidebar',\n\t\t\t'description' => __( 'Widget area for sidebar in properties list, grid and archive pages.', 'framework' ),\n\t\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget clearfix %2$s\">',\n\t\t\t'after_widget' => '</section>',\n\t\t\t'before_title' => '<h3 class=\"title\">',\n\t\t\t'after_title' => '</h3>',\n\t\t) );\n\n\t\t// Location: Sidebar dsIDX.\n\t\tregister_sidebar( array(\n\t\t\t'name' => __( 'dsIDX Sidebar', 'framework' ),\n\t\t\t'id' => 'dsidx-sidebar',\n\t\t\t'description' => __( 'Widget area for dsIDX related pages.', 'framework' ),\n\t\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget clearfix %2$s\">',\n\t\t\t'after_widget' => '</section>',\n\t\t\t'before_title' => '<h3 class=\"title\">',\n\t\t\t'after_title' => '</h3>',\n\t\t) );\n\n\t\t// Location: Footer First Column.\n\t\tregister_sidebar( array(\n\t\t\t'name' => __( 'Footer First Column', 'framework' ),\n\t\t\t'id' => 'footer-first-column',\n\t\t\t'description' => __( 'Widget area for first column in footer.', 'framework' ),\n\t\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget clearfix %2$s\">',\n\t\t\t'after_widget' => '</section>',\n\t\t\t'before_title' => '<h3 class=\"title\">',\n\t\t\t'after_title' => '</h3>',\n\t\t) );\n\n\t\t// Location: Footer Second Column.\n\t\tregister_sidebar( array(\n\t\t\t'name' => __( 'Footer Second Column', 'framework' ),\n\t\t\t'id' => 'footer-second-column',\n\t\t\t'description' => __( 'Widget area for second column in footer.', 'framework' ),\n\t\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget clearfix %2$s\">',\n\t\t\t'after_widget' => '</section>',\n\t\t\t'before_title' => '<h3 class=\"title\">',\n\t\t\t'after_title' => '</h3>',\n\t\t) );\n\n\t\t// Location: Footer Third Column.\n\t\tregister_sidebar( array(\n\t\t\t'name' => __( 'Footer Third Column', 'framework' ),\n\t\t\t'id' => 'footer-third-column',\n\t\t\t'description' => __( 'Widget area for third column in footer.', 'framework' ),\n\t\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget clearfix %2$s\">',\n\t\t\t'after_widget' => '</section>',\n\t\t\t'before_title' => '<h3 class=\"title\">',\n\t\t\t'after_title' => '</h3>',\n\t\t) );\n\n\t\t// Location: Footer Fourth Column.\n\t\tif ( 'classic' === INSPIRY_DESIGN_VARIATION ) {\n\t\t\tregister_sidebar( array(\n\t\t\t\t'name' => __( 'Footer Fourth Column', 'framework' ),\n\t\t\t\t'id' => 'footer-fourth-column',\n\t\t\t\t'description' => __( 'Widget area for fourth column in footer.', 'framework' ),\n\t\t\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget clearfix %2$s\">',\n\t\t\t\t'after_widget' => '</section>',\n\t\t\t\t'before_title' => '<h3 class=\"title\">',\n\t\t\t\t'after_title' => '</h3>',\n\t\t\t) );\n\t\t}\n\n\t\t// Location: Sidebar Agent.\n\t\tregister_sidebar( array(\n\t\t\t'name' => __( 'Agent Sidebar', 'framework' ),\n\t\t\t'id' => 'agent-sidebar',\n\t\t\t'description' => __( 'Sidebar widget area for agent detail page.', 'framework' ),\n\t\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget clearfix %2$s\">',\n\t\t\t'after_widget' => '</section>',\n\t\t\t'before_title' => '<h3 class=\"title\">',\n\t\t\t'after_title' => '</h3>',\n\t\t) );\n\n\t\t// Location: Home Search Area.\n\t\tregister_sidebar( array(\n\t\t\t'name' => __( 'Home Search Area', 'framework' ),\n\t\t\t'id' => 'home-search-area',\n\t\t\t'description' => __( 'Widget area for only IDX Search Widget. Using this area means you want to display IDX search form instead of default search form.', 'framework' ),\n\t\t\t'before_widget' => '<section id=\"home-idx-search\" class=\"clearfix %2$s\">',\n\t\t\t'after_widget' => '</section>',\n\t\t\t'before_title' => '<h3 class=\"home-widget-label\">',\n\t\t\t'after_title' => '</h3>',\n\t\t) );\n\n\t\t// Location: Property Search Template.\n\t\tregister_sidebar( array(\n\t\t\t'name' => __( 'Property Search Sidebar', 'framework' ),\n\t\t\t'id' => 'property-search-sidebar',\n\t\t\t'description' => __( 'Widget area for property search template with sidebar.', 'framework' ),\n\t\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget clearfix %2$s\">',\n\t\t\t'after_widget' => '</section>',\n\t\t\t'before_title' => '<h3 class=\"title\">',\n\t\t\t'after_title' => '</h3>',\n\t\t) );\n\n\t\t// Create additional sidebar to use with visual composer if needed.\n\t\tif ( class_exists( 'Vc_Manager' ) ) {\n\n\t\t\t// Additional Sidebars.\n\t\t\tregister_sidebars( 4, array(\n\t\t\t\t'name' => __( 'Additional Sidebar %d', 'framework' ),\n\t\t\t\t'description' => __( 'An extra sidebar to use with Visual Composer if needed.', 'framework' ),\n\t\t\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget clearfix %2$s\">',\n\t\t\t\t'after_widget' => '</section>',\n\t\t\t\t'before_title' => '<h3 class=\"title\">',\n\t\t\t\t'after_title' => '</h3>',\n\t\t\t) );\n\n\t\t}\n\n\t\t// Create additional sidebar to use with Optima Express if needed.\n\t\tif ( class_exists( 'iHomefinderAdmin' ) ) {\n\n\t\t\t// Additional Sidebars.\n\t\t\tregister_sidebar( array(\n\t\t\t\t'name' => __( 'Optima Express Sidebar', 'framework' ),\n\t\t\t\t'id' => 'optima-express-page-sidebar',\n\t\t\t\t'description' => __( 'An extra sidebar to use with Optima Express if needed.', 'framework' ),\n\t\t\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget clearfix %2$s\">',\n\t\t\t\t'after_widget' => '</section>',\n\t\t\t\t'before_title' => '<h3 class=\"title\">',\n\t\t\t\t'after_title' => '</h3>',\n\t\t\t) );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "78f8c78f8b6044b6b853bd59cf40aca8", "score": "0.4894734", "text": "function myportfolio_widgets_init() {\n register_sidebar( array(\n 'name' => __( 'right-sidebar', 'myportfolio' ),\n 'id' => 'sidebar-1',\n 'before_widget' => '<div id=\"%1$s\" class=\"widget-box %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n}", "title": "" }, { "docid": "d5525b3f17cb2ea8e164c0be02a28af7", "score": "0.48915094", "text": "function printSidebar() {\n echo $this->getSidebar();\n }", "title": "" }, { "docid": "aa4bef6294e9c6bbf55b3bdd467b7408", "score": "0.48907673", "text": "function sunset_sidebar_init(){\r\n\r\n register_sidebar( array(\r\n 'name' => esc_html__('sunset Sidebar','sunsetthem'),\r\n 'id' => 'sunset-sidebar',\r\n 'description' => 'Dynamic sidebar',\r\n 'before-widget' => '<section id=\"%1$s\" class=\"sunset-widget %2$s\">',\r\n 'after-widget' => '</section>',\r\n 'before-title' => '<h2 class=\"sunset-widget-title\">',\r\n 'after-title' => '</h2>'\r\n ) );\r\n\r\n}", "title": "" }, { "docid": "83a86f3965d3efd5c15ade722a795161", "score": "0.4882509", "text": "function dynamic_sidebar($index = 1)\n{\n}", "title": "" }, { "docid": "888676db6ad01229f14a19ea91cd1858", "score": "0.48809764", "text": "private function getSidebarValues()\n {\n $sidebar = [];\n\n // load sidebars from modules and leave FoolFrame sidebar on bottom\n foreach($this->config->get('foolz/foolframe', 'config', 'modules.installed') as $module) {\n $module_sidebar = $this->config->get($module['namespace'], 'sidebar');\n if(is_array($module_sidebar)) {\n $sidebar = array_merge($module_sidebar['sidebar'], $sidebar);\n }\n }\n\n return $sidebar;\n }", "title": "" } ]
fe538214aa7a3f4985b12464c7a243f9
Event before persist document income ingredient
[ { "docid": "5056ee3b93d7dcf3c39a4572713ba452", "score": "0.6485306", "text": "public function prePersist(IngredientIncomeEntity $ingredientIncome, LifecycleEventArgs $e)\n {\n $ingredientIncome->setResidue($ingredientIncome->getWeight());\n }", "title": "" } ]
[ { "docid": "7c600eb68331cba703d3a73246b00a35", "score": "0.6202803", "text": "public function prePersist(LifecycleEventArgs $event): void;", "title": "" }, { "docid": "372a7cbd6679735529b7be87734e126a", "score": "0.6121482", "text": "public function doOnPrePersist()\n {\n /*if ($this->getInvoice()) {\n $this->getInvoice()->setBaseAmount($this->getInvoice()->calculateBaseAmount($this));\n $this->getInvoice()->setDiscountAmount($this->getInvoice()->calculateDiscountAmount($this));\n $this->getInvoice()->setNetAmount($this->getInvoice()->calculateNetAmount($this));\n $this->getInvoice()->setTaxAmount($this->getInvoice()->calculateTaxAmount($this));\n $this->getInvoice()->setGrossAmount($this->getInvoice()->calculateGrossAmount($this));\n }*/\n }", "title": "" }, { "docid": "be38721b7cd1d442ce38ee18624a68ef", "score": "0.59809536", "text": "protected function afterSave( $event ) {}", "title": "" }, { "docid": "d4654ca9d967b2c9516bb1a8bfa38569", "score": "0.5935935", "text": "public function processInsertIngredient(Request $request)\n {\n $newIngredientInsert = \\App\\Ingredient::create(['name'=>$request->newingr['name'],'type'=>$request->newingr['type']]);\n }", "title": "" }, { "docid": "8ab8c51b575c811cb475aa57936f1056", "score": "0.58611494", "text": "protected function onBeforeSave()\n {\n }", "title": "" }, { "docid": "426c4e2cf19f44da7b537d5d0291d495", "score": "0.5811419", "text": "protected function postStore(LifecycleEventArgs $args) {\n $entity = $args->getEntity();\n $entityManager = $args->getEntityManager();\n if ($entity instanceof Document) {\n \n $this->logger->debug('BEFORE' . __METHOD__);\n //$this->logger->debug($entity->getContent());\n if($entity->hasMoved()) {\n // wenn verschoben alten löschen und neuen speichern\n $this->existdb->moveDocument($entity);\n } else {\n $this->existdb->storeDocument($entity);\n }\n $this->logger->debug('AFTER ' . __METHOD__);\n }\n }", "title": "" }, { "docid": "d39c30fcea1eaa67dc335d4196a730e2", "score": "0.57838905", "text": "public function persist() {}", "title": "" }, { "docid": "de9270a6bd0710d2a1ac7fd179b4f996", "score": "0.57701623", "text": "public function persist(Gamble $cart);", "title": "" }, { "docid": "2b40ff84015d8b85638aeb717847a7d6", "score": "0.5752772", "text": "protected function onBeforeSave()\n {\n //\n }", "title": "" }, { "docid": "87863dd4be463b4e7eac965aa4e87924", "score": "0.5748523", "text": "public function postPersist()\n {\n if ($this->lifecycleEventsActive) {\n $collection = $this->resourceManager->getCollection($this->collectionName);\n $collection->getTarget()->publishResource($this, $collection);\n }\n }", "title": "" }, { "docid": "eb995b5e6644a2bbf916d3288ec24182", "score": "0.57317144", "text": "function persist()\n {\n // persist ourself\n $this->id = parent::persist();\n\n // persist our demographics, order matters\n $i=0;\n foreach ($this->demographics as $demo) {\n $demo->setId($this->id);\n $demo->setSequence($i++);\n $demo->persist();\n }\n }", "title": "" }, { "docid": "11b39197d937016fc6ee844498aed79b", "score": "0.56797093", "text": "public function persist()\n {\n }", "title": "" }, { "docid": "d7bfd5ada6d8afda2fed0387e9474f03", "score": "0.5668774", "text": "public function created(Ingredient $ingredient)\n {\n $ingredient->created_by_user_id = Auth::id();\n }", "title": "" }, { "docid": "8b37148244ba021ade5eef404fe1d751", "score": "0.56667185", "text": "public function store(CreateRecipeRequest $request)\n {\n if ( ! $request->has('ingredient_list')){\n $recipe->ingredients()->detach();\n return;\n }\n \n $ingredients = array();\n foreach ($request->ingredient_list as $ingId){\n if (substr($ingId, 0, 4) == 'new:'){\n $newIng = Ingredient::create(['name' => substr($ingId, 4)]);\n $ingredients[] = $newIng->id;\n continue;\n }\n $ingredients[] = $ingId;\n } \n\n $userid = Auth::user()->id;\n\n $recipe= Recipe::create([\n 'title' => $request['title'],\n 'description' => $request['description'],\n 'user_id'=>$userid\n ]);\n $recipe->ingredients()->attach($ingredients);\n \n \n\n return redirect('/recipes')->with('success','Ricetta creata con successo');\n }", "title": "" }, { "docid": "342d854d1c8e3a1ac75d8a531cd17127", "score": "0.56508476", "text": "public function persist()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "c696dc8161bd9f036aaec58b00e2d33a", "score": "0.5615854", "text": "public function preInsert(Doctrine_Event $event)\n {\n // $object = $event->getInvoker();\n }", "title": "" }, { "docid": "1b283f9ebef4bcbccd9f2df566514f72", "score": "0.5608515", "text": "public function avantPersist()\n {\n $this->nom = InbeautyAppInterface::capitalize($this->nom);\n $this->dateCreation = new DateTime();\n }", "title": "" }, { "docid": "b7de29ed182eefb242bf53e78fcd666e", "score": "0.5576088", "text": "public function before_save() {}", "title": "" }, { "docid": "f4a7ab01fec8c11403f4c4790ba1db68", "score": "0.5533999", "text": "public function postPersist(PaperEvent $event, LifecycleEventArgs $args) {\n $this->handle($event);\n }", "title": "" }, { "docid": "2b37a93fa143369bc1b7871df9e373c2", "score": "0.5532134", "text": "public function PrePersist(){\n $this->creadoEl = new \\DateTime();\n $this->estado = 'P';\n }", "title": "" }, { "docid": "eb0491bf67fe1ee4aba431beb3568746", "score": "0.55295366", "text": "public function postPersist(LifecycleEventArgs $event)\n {\n $object = $event->getObject();\n if ($object instanceof Translatable) {\n $domain = $object->getDomain();\n $locale = $object->getLocale();\n\n // faster less blocking operation than using touch()\n $triggerFile = __DIR__.'/../Resources/translations/'.$domain.'.'.$locale.'.odm';\n if (!file_exists($triggerFile)) {\n touch($triggerFile);\n }\n $fp = fopen($triggerFile, 'rw');\n ftruncate($fp, 0);\n }\n }", "title": "" }, { "docid": "6e3709b15e52afec6f7db0ffd82f5725", "score": "0.5476748", "text": "protected function saveBefore()\n {\n }", "title": "" }, { "docid": "ac04ea07505160aeff8abc108535e364", "score": "0.5466678", "text": "public function beforeSave()\n {}", "title": "" }, { "docid": "0de9de5e44382b88669b26803ebef444", "score": "0.5457451", "text": "protected function post_save_hook() {\n }", "title": "" }, { "docid": "7d3c6855d76207a49454a34f8d1e9803", "score": "0.5456376", "text": "public function addIngredient(Website_Model_Ingredient $ingredient){\n\t\t$log = Zend_Registry::get('logger');\n\t\t$log->log('Website_Model_Bar->addIngredient',Zend_Log::DEBUG);\n\t\t$this->_ingredients[$ingredient->id] = $ingredient;\n\t}", "title": "" }, { "docid": "e317499d08cffa35390f2e6deb44a478", "score": "0.54391927", "text": "public function persist() {\n\n\t\tglobal $wpdb;\n\n\t\t$data = [\n\t\t\t'email_log_id' => intval( $this->get_email_log_id() ),\n\t\t\t'event_type' => sanitize_key( static::get_type() ),\n\t\t\t'date_created' => $this->get_date_created()->format( WP::datetime_mysql_format() ),\n\t\t\t'object_id' => $this->get_object_id() ? intval( $this->get_object_id() ) : null,\n\t\t];\n\n\t\t$result = $wpdb->insert( Tracking::get_events_table_name(), $data, [ '%d', '%s', '%s', '%d' ] );\n\n\t\tif ( $result !== false ) {\n\t\t\t$this->set_id( $wpdb->insert_id );\n\t\t}\n\n\t\treturn $this->get_id() > 0 ? $this->get_id() : false;\n\t}", "title": "" }, { "docid": "530483aa2feed389d8cd2377e10277a3", "score": "0.54363495", "text": "public function onPrePersist()\n {\n $this->created = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "530483aa2feed389d8cd2377e10277a3", "score": "0.54363495", "text": "public function onPrePersist()\n {\n $this->created = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "530483aa2feed389d8cd2377e10277a3", "score": "0.54363495", "text": "public function onPrePersist()\n {\n $this->created = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "530483aa2feed389d8cd2377e10277a3", "score": "0.54363495", "text": "public function onPrePersist()\n {\n $this->created = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "eeeab0d731d28dd660f19b0944994dac", "score": "0.54326314", "text": "public function persist();", "title": "" }, { "docid": "eeeab0d731d28dd660f19b0944994dac", "score": "0.54326314", "text": "public function persist();", "title": "" }, { "docid": "eeeab0d731d28dd660f19b0944994dac", "score": "0.54326314", "text": "public function persist();", "title": "" }, { "docid": "12d6f0a360eee1cd9a4eca286eb4df08", "score": "0.54151815", "text": "public function onPrePersist()\n {\n $this->created = new \\DateTime('now');\n }", "title": "" }, { "docid": "18a2d42d59102ab765ecb350c77e092a", "score": "0.5398762", "text": "public function onPrePersist()\n {\n $this->setIdentificationKey($this->generateRandomString(16));\n }", "title": "" }, { "docid": "fad705321c897b4221f65e0a7abdbec9", "score": "0.53946656", "text": "protected function pre_save_hook() {\n }", "title": "" }, { "docid": "abaa2a90f2e0d12a62f34d751d6912dc", "score": "0.5393668", "text": "public function onPrePersist()\n {\n $this->creationdate = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "b4353e1c5bfa0cf73721d7c65ba821ea", "score": "0.5371754", "text": "public function onPrePersist()\n {\n $this->setCreated(new \\DateTime(\"now\"));\n $this->setUpdated(new \\DateTime(\"now\"));\n }", "title": "" }, { "docid": "b4353e1c5bfa0cf73721d7c65ba821ea", "score": "0.5371754", "text": "public function onPrePersist()\n {\n $this->setCreated(new \\DateTime(\"now\"));\n $this->setUpdated(new \\DateTime(\"now\"));\n }", "title": "" }, { "docid": "752cede99f81ae4114e551c82a2190fd", "score": "0.5350278", "text": "public function postPersist(LifecycleEventArgs $event)\n {\n $entity = $event->getEntity();\n\n if (!$this->isDispatchableEntityEvent($entity)) return;\n\n /** @var $entity BlogBundleEntityInterface */\n $this->entityEventManager->dispatchEntityCreatedEvent($entity);\n }", "title": "" }, { "docid": "9c2a370cafdb0d81f17606eca9a1810d", "score": "0.5327266", "text": "public function postInsert( $event)\n {\n \t// si la orden de compra es en negro -> generar factura compra en negro\n \tif($this->EsEnNegro())\n \t\t$this->CrearFacturaCompraNegro();\n \n }", "title": "" }, { "docid": "cdb2ee2ecf03206d47ae9a08e811055f", "score": "0.53238326", "text": "public function onBeforeSave(){\n\t\treturn true;\n\t}", "title": "" }, { "docid": "cdb2ee2ecf03206d47ae9a08e811055f", "score": "0.53238326", "text": "public function onBeforeSave(){\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a9c36e30cda4378a6f457b3791605ef1", "score": "0.53198653", "text": "function addNewIngredient($data){\n $query='INSERT INTO ingredients (ingredient_name, ingredient_description) VALUES (\"'.$data[\"name\"].'\",\"'.$data[\"description\"].'\")';\n addeditWithQuery($query);\n }", "title": "" }, { "docid": "f2809bf7c0cbf0b50700fb7ad43c5376", "score": "0.53150976", "text": "public function store(Request $request)\n {\n $request->validate([\n 'name' => 'required|max:100|',\n 'nbrPersonne' => 'required',\n 'duree' => 'required',\n 'difficulte' => 'required'\n ]);\n\n $desserts = new Recette;\n $desserts->name = $request->input('name');\n $desserts->nbrPersonne = $request->input('nbrPersonne');\n $desserts->duree=$request->input('duree');\n $desserts->difficulte=$request->input('difficulte');\n $desserts->save();\n $desserts->ingredient()->attach($request->ingredient);\n \n\n return redirect()->route('welcome');\n }", "title": "" }, { "docid": "06d0929af8b5426eae30aecd4cb74b1d", "score": "0.53137654", "text": "public function onSave()\r\n\t{\r\n\t\t\r\n\t}", "title": "" }, { "docid": "cec445220cc3cbb46b57b443b2af85e0", "score": "0.5304932", "text": "function onBeforeWrite(){\r\n\t\tif($this->owner->HasVariations()) {\r\n\t\t\t$price = $this->owner->getCalculatedPrice();\r\n\t\t\tif($price == 0) {\r\n\t\t\t\t$this->owner->Price = $this->owner->LowestVariationPrice();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "53538e261557f05bab802fc2a2e0572a", "score": "0.52987546", "text": "public function onPrePersist()\n {\n $this->created = new \\DateTime;\n $this->updated = new \\DateTime;\n $this->objectId = (new GenerateToken)();\n }", "title": "" }, { "docid": "2e9e7b41db90ce1baaa6fcc8bd4f58be", "score": "0.52986604", "text": "public function handlePersistDocument(PersistEvent $event)\n {\n /** @var ResourceSegmentBehavior $document */\n $document = $event->getDocument();\n\n if (!$this->supports($document)) {\n return;\n }\n\n $property = $this->getResourceSegmentProperty($document);\n $this->persistDocument($document, $property);\n }", "title": "" }, { "docid": "44db9f4534bffb178c0e563d4d0dfce9", "score": "0.5294648", "text": "public function preSave(PropelPDO $con = null) {\n $this->ensureInvoiceFile();\n return true;\n }", "title": "" }, { "docid": "2ccc8141a8f7c3db427d5b4b155d0725", "score": "0.52866787", "text": "public function prePersist(LifecycleEventArgs $args)\n {\n $trick = $args->getEntity();\n\n $this->updateSlug($trick);\n\n }", "title": "" }, { "docid": "6aba13bbae855c075ffc5d0f910558bc", "score": "0.5279428", "text": "protected function beforeSave() {\r\n }", "title": "" }, { "docid": "c4608f3062b6215b7e89140b508e0ca1", "score": "0.52702725", "text": "protected function afterSave() {\r\n }", "title": "" }, { "docid": "6f98fd6c7777528ff8acebf0120585e7", "score": "0.52689266", "text": "public function onPrePersist()\n {\n $this->createdAt = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "6f98fd6c7777528ff8acebf0120585e7", "score": "0.52689266", "text": "public function onPrePersist()\n {\n $this->createdAt = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "a1a26ffb381378337f5666226498e233", "score": "0.52676123", "text": "public function postPersist(LifecycleEventArgs $args)\n {\n $entityManager = $args->getObjectManager();\n $entity = $args->getEntity();\n\n\n try {\n $logDatabaseChange = new LogDatabaseChanges();\n $logDatabaseChange->setMessage(\"text\");\n // $logDatabaseChange->setContext($array);\n\n $entityManager->persist($logDatabaseChange);\n $entityManager->flush($logDatabaseChange);\n \n } catch (Exception $e) {\n // $this->log(\"error\".$e->getMessage());\n }\n\n\n\n // dump($entity);\n // $array = array($entity);\n\n // dump($array);\n // dump(serialize($entity));\n // dump(json_encode($array[0]));\n\n\n\n // dump($entity->getName());\n // die();\n \n\n // $this->logActivity('persist', $args);\n }", "title": "" }, { "docid": "af1c95c6650fd9bde073fee7a1866e53", "score": "0.5265817", "text": "function afterSave($created) {\n\t\t/*if($created) {\n\t\t\t$doc = $this->read(null, $this->id);\n\t\t\t$this->CriteriasDocument->massCreateAfterDocument($this->id, $doc['Document']['repository_id']);\n\t\t}*/\n\t}", "title": "" }, { "docid": "ef54b84344244278f647ac655ee13913", "score": "0.52585375", "text": "public function onPrePersist()\n\t{\n\t\t$this->createdAt = new \\DateTime(\"now\");\n\t\t$this->updatedAt = new \\DateTime(\"now\");\n\t}", "title": "" }, { "docid": "9441b7fc79696c92d51954e6822b4088", "score": "0.5258016", "text": "public function save(): void\n {\n // Si l'objet n'existe pas encore en base de données\n if (is_null($this->getId())) {\n // Crée un nouvel enregistrement en base de données correspondant à cet objet\n $this->insert();\n // Sinon\n } else {\n // Met à jour les propriétés de l'enregistrement existant correspondant à cet objet\n $this->update();\n }\n }", "title": "" }, { "docid": "426243e26c19fe814cd68108a1ff99f9", "score": "0.52578914", "text": "public abstract function isPersisted();", "title": "" }, { "docid": "170d23c559fc47c2a12b6b0ed90f12d0", "score": "0.5252843", "text": "public function preInsert($event)\n\t{\n\t\t$this->created = time();\n\t}", "title": "" }, { "docid": "10197de4fb307b1e7d09cf01e70dc083", "score": "0.52512836", "text": "public function prePersist()\n {\n $this->created = new \\DateTime('now', new \\DateTimeZone('UTC'));\n }", "title": "" }, { "docid": "d3f27f80f10647242e3d16f504b551d4", "score": "0.52501947", "text": "public function recipeStore(Request $request)\n {\n $itinerary = Itinerary::with('person','employe.person','reservation')->where('reservation_id', $request->reservacion)->first();\n\n if(!empty($itinerary)){\n if($itinerary->recipe_id == null){\n\n // crear el recipe\n $crear_recipe = Recipe::create([\n 'patient_id' => $itinerary->patient_id,\n 'employe_id' => $itinerary->employe_id,\n 'branch_id' => 1,\n ]);\n\n //actualiza el campo de recipe en itinerary\n $itinerary->recipe_id = $crear_recipe->id;\n $itinerary->save();\n\n }else{\n $crear_recipe = Recipe::where('id', $itinerary->recipe_id)->first();\n }\n\n $medicine = Medicine::where('name', $request->medicina)->first();\n // $paciente = Person::find($paciente);\n $treatment = Treatment::create([\n 'medicine_id' => $medicine->id,\n 'doses' => $request->dosis,\n 'duration' => $request->duracion,\n 'measure' => $request->medida,\n 'indications' => $request->indicaciones,\n 'recipe_id' => $crear_recipe->id,\n 'branch_id' => 1,\n ]);\n\n $crear_recipe->treatment()->attach($treatment);\n\n $treatments = Treatment::with('medicine')->where('id', $treatment->id)->first();\n\n // dd($treatments);\n return response()->json($treatments);\n }else{\n return response()->json([\n 'recipe' => 'No se pudo generar recipe', 202,\n ]);\n }\n }", "title": "" }, { "docid": "0d123deb2dcdb17d80595141dde3186f", "score": "0.5247703", "text": "public function onPrePersist()\r\n\t{\r\n\t\t$this->dataCadastro = date('Y-m-d');\r\n\t\t$this->dataAltera = date('Y-m-d');\r\n\t}", "title": "" }, { "docid": "51f1ca31c4a7958d9c5269cd76ec6e29", "score": "0.5247148", "text": "public function beforeSave()\n {\n\n }", "title": "" }, { "docid": "381fcbb082102a993f0babe85e95b744", "score": "0.524602", "text": "protected static function booted() \n {\n static::creating(function(LoteArticulo $lote){\n //ACTUALIZAR EL STOCK DEL ARTICULO\n $articulo = Articulo::findOrFail($lote->articulo_id);\n $articulo->stock = $articulo->stock + $lote->cantidad;\n $articulo->update();\n });\n }", "title": "" }, { "docid": "a8e9bf907bf89937671ea046c868d651", "score": "0.52396035", "text": "public function preSave(array $event, sys_admin_AdminManager $manager) {}", "title": "" }, { "docid": "546dc90373077f17a740b20b87b09724", "score": "0.5235218", "text": "public function onPrePersist()\n {\n $this->created_at = new \\DateTime(\"now\");\n $this->status = 1;\n }", "title": "" }, { "docid": "1c29a7eacc526dec95b088022822619f", "score": "0.5235185", "text": "public function postPersist(LifecycleEventArgs $oArgs)\n\t{\n\t\t$oEntity = $oArgs->getEntity();\n\t\tif ($oEntity instanceof SearchableEntityInterface) {\n\t\t\t$this->entities->add($oEntity);\n\t\t}\n\t}", "title": "" }, { "docid": "5ee1444700d5ac8f48e601fc798d93a8", "score": "0.52342844", "text": "public function onPreSave(Place $place) {\n }", "title": "" }, { "docid": "ec5614bf6e62e7e8607b42ac6d95989c", "score": "0.5219895", "text": "public function postPersist(LifecycleEventArgs $args)\n {\n $this->setOwner('persist', $args);\n $this->checkAdhesion($args);\n }", "title": "" }, { "docid": "93ff5987a848a13244a63126a68bba8c", "score": "0.5216616", "text": "public function prePersist(LifecycleEventArgs $args)\n {\n $entity = $args->getEntity();\n\n if ($entity instanceof Product) {\n $dateTime = new \\DateTime();\n $entity->setUpdated($dateTime);\n }\n }", "title": "" }, { "docid": "15cd1fc92aa77ba34da4f0d9650536a2", "score": "0.52122056", "text": "public function onPrePersist()\n {\n $this->setModificationDate(new \\DateTime('now'));\n\n if($this->getCreationDate() == null)\n {\n $this->setCreationDate(new \\DateTime('now'));\n }\n }", "title": "" }, { "docid": "f62e5bf8ef1f168b3f91414f10804659", "score": "0.520949", "text": "public function preSave($event) \n {\n $user_id = GlobalFunctions::getUserId();\n \n $this->setUserId($user_id);\n $this->setCreatedatetime(date(\"Y-m-d H:i:s\"));\n\n parent::preSave($event);\n }", "title": "" }, { "docid": "bf4d76efefbc1a2cc8c439308ee8ff99", "score": "0.5203988", "text": "protected function before_save()\n\t{\n\t}", "title": "" }, { "docid": "000d0ca1f584a724d501b60c0f789dbc", "score": "0.51993203", "text": "public function postPersist($object)\n {\n $this->tagManager->saveTagging($object);\n }", "title": "" }, { "docid": "03d2bb38778ee45af6e6f4525a86931f", "score": "0.5196162", "text": "public function store(Request $request)\n {\n \n $ingredient = new Ingredient();\n\n $ingredient->name = $request->name;\n $ingredient->price = $request->price;\n $ingredient->calorias = $request->calorias;\n $ingredient->description = $request->description;\n\n $ingredient->client_id = $request->client_id;\n $ingredient->save();\n\n \n $photos = $request->file('photo');\n \n \n foreach ($photos as $photo) {\n \n\n $extension = $photo->getClientOriginalExtension();\n $filename = uniqid() . '.' . $extension;\n $paths = $photo->storeAs('ingredients', $filename);\n\n $photo = new IngredientPhoto();\n $photo->ingredient_id = $ingredient->id;\n $photo->photo = $paths;\n $photo->save();\n }\n\n return response()->json(['rpta'=>'ok']);\n \n }", "title": "" }, { "docid": "92447dc43bf9691376b41076ecf4d630", "score": "0.5189069", "text": "public function store(SerieFormRequest $request){\n $nome=$request->nome;//pega o parametro nome do formulario\n //metodo que salva uma foto localmente\n $request->file('capa')->store('serie');\n $serie=new Serie();\n $serie->nome=$nome;\n $serie->capa=$request->file('capa')->store('serie');\n $serie->save();\n\n //retorna o ultimo id inserido na tabela serie\n $inserted_id = $serie->id;\n\n //insere na tabela temporadas\n $temporadas=Serie::find($inserted_id);//retorna dos os dados da tabela cujo o id for igual ao inserted_id\n $qtd_temp=$request->qtd_temporadas;//pega o parametro quantidade de temporadas\n $ep_temporadas=$request->ep_por_temporada;//pega o parametro episodio por temporadas\n\n for($j=1;$j<=$qtd_temp;$j++){\n $temp=new Temporada();\n $temp->numero=$j;\n $temporadas->temporadas()->save($temp);\n\n $inserted_id = $temp->id;\n //insere na tabela episodios\n $episodios=Temporada::find($inserted_id);//retorna dos os dados da tabela cujo o id for igual ao inserted\n for($i=1;$i<=$ep_temporadas;$i++) {\n //retorna o ultimo id inserido na tabela episodios\n $ep2=new Episodio();\n $ep2->numero=$i;\n $episodios->episodios()->save($ep2);\n }\n }\n\n $eventoNovaSerie=new \\App\\Events\\NovaSerie(\n $request->nome,\n $request->qtd_temporadas,\n $request->ep_por_temporada\n );\n event($eventoNovaSerie);\n\n $request->session()->flash('mensagem',\"Série {$serie->id} criada com sucesso {$serie->nome}\");\n return redirect('listaSeries');\n}", "title": "" }, { "docid": "fed092f960c53b767194db35e84e89f4", "score": "0.5186319", "text": "public function prePersist(LifecycleEventArgs $eventArgs)\n {\n $this->preUpdate($eventArgs);\n }", "title": "" }, { "docid": "a859e9f02e33b336510d1d3ef354748d", "score": "0.51758665", "text": "public function beforeSave()\n {\n $this->total_price = $this->price * $this->quantity;\n }", "title": "" }, { "docid": "959357beec6f42639136eeadd4cf5979", "score": "0.517473", "text": "public function onPrePersist()\n {\n $this->time = new \\DateTime();\n }", "title": "" }, { "docid": "68b2146c6d547e255ccf6eee28e742f7", "score": "0.5167733", "text": "public function prePersist()\n {\n \t$this->createdAt = new \\DateTime;\n \t$this->updatedAt = new \\DateTime;\n }", "title": "" }, { "docid": "2a6206c609acf1a8d6cf66086b1c81ea", "score": "0.5163587", "text": "public function onPrePersist()\n {\n $this->createdAt = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "34001dbb6d3b87200eef5da2cedf8e32", "score": "0.51610917", "text": "public function onPrePersist()\n {\n $this->createdAt = new \\DateTime();\n }", "title": "" }, { "docid": "34001dbb6d3b87200eef5da2cedf8e32", "score": "0.51610917", "text": "public function onPrePersist()\n {\n $this->createdAt = new \\DateTime();\n }", "title": "" }, { "docid": "9509d163016b9116f454b4858a9f2837", "score": "0.51602787", "text": "public function postInsert($event)\n {\n $this->sendChangedEvent();\n }", "title": "" }, { "docid": "3301d8d555526f748d612b3e65a2179b", "score": "0.5153879", "text": "public function postPersist(LifecycleEventArgs $args) {\n\n $entity = $args->getEntity();\n $em = $args->getEntityManager();\n\n if($entity instanceof Auditable) {\n $changeDate = new \\DateTime(\"now\");\n $audit = new AuditEntry(\n get_class($entity),\n $entity->getId(),\n 'INSERT',\n $changeDate\n );\n if ($this->log) {\n $audit->addLog($this->log);\n }\n $em->persist($audit);\n $this->needsFlush = true;\n }\n }", "title": "" }, { "docid": "6bd5c27c0445688b9e54479f26f31bae", "score": "0.51493794", "text": "public function prePersist()\n {\n $this->createdAt = new \\DateTime('now', new \\DateTimeZone('UTC'));\n $this->preUpdate();\n }", "title": "" }, { "docid": "75c7a6a3db162a8127824e42937eaa46", "score": "0.514904", "text": "public function store(Request $request)\n {\n $validatedData = $request->validate([\n 'recipe_id' => 'required', \n 'name' => 'required', \n 'qty' => 'required', \n ]);\n\n $recipe = Recipe::findOrFail($validatedData['recipe_id']);\n\n if(auth()->id() != $recipe->user_id){\n return response()->json(['message' => 'you dont own thid recipe'], 401);\n }\n\n $request['user_id'] = auth()->id();\n\n $ingredient = $recipe->ingredients()->create($request->all());\n\n if($ingredient) { \n return $ingredient;\n }\n \n return response()->json(['message' => 'error'], 500);\n }", "title": "" }, { "docid": "0e24649f7ca748dbb3093aceb8bf34bd", "score": "0.51480985", "text": "public function preSave($event)\n {\n /**\n * Create context for fixture loading\n */\n if (sfContext::hasInstance())\n {\n $context = sfContext::getInstance();\n }\n else\n {\n $context = sfContext::createInstance(new frontendConfiguration('prod', false));\n }\n $context->getConfiguration()->loadHelpers(array('Number'));\n \n foreach ($this->Translation as $lang => $translation)\n {\n $this->Translation[$lang]->display_name =\n format_currency($this->price, 'EUR', $lang) . \n ' ('. \n $this->Translation[$lang]->name .\n ')'\n ;\n } \n }", "title": "" }, { "docid": "3ac7f76130a4ae6ed040a4c93d0431f1", "score": "0.51473105", "text": "public function prePersistInteressentEntity($entity) {\n $id = $this->request->query->get('grundId');\n\n if ($id) {\n $repository = $this->getDoctrine()->getRepository('AppBundle:Grund');\n $grund = $repository->find($id);\n } else {\n throw new \\Doctrine\\ORM\\EntityNotFoundException('Grund id parameter missing');\n }\n\n if ($grund) {\n $grund->addInteressent($entity);\n\n $user = $this->getUser();\n $grund->setCreatedBy((string) $user);\n $grund->setUpdatedBy((string) $user);\n } else {\n throw new EntityNotFoundException(sprintf('Grund with id: %d not found', $id));\n }\n }", "title": "" }, { "docid": "b758c600c6ead1d29265066555973c98", "score": "0.5145847", "text": "function onSave()\r\n {\r\n try\r\n {\r\n // open a transaction with database 'samples'\r\n TTransaction::open('fiscalizacao');\r\n \r\n // get the form data into an active record Category\r\n $category = $this->form->getData('Viajem');\r\n \r\n // stores the object\r\n $category->store();\r\n \r\n // close the transaction\r\n TTransaction::close();\r\n \r\n // shows the success message\r\n new TMessage('info', 'Registro Salvo');\r\n \r\n // reload the listing\r\n $this->onReload();\r\n }\r\n catch (Exception $e) // in case of exception\r\n {\r\n // shows the exception error message\r\n new TMessage('error', $e->getMessage());\r\n \r\n // undo all pending operations\r\n TTransaction::rollback();\r\n }\r\n }", "title": "" }, { "docid": "eaa6e10dfe49063837c9203e9b45ec3d", "score": "0.5134857", "text": "public function savePhotoEntity()\n {\n $this->uniquerTags();\n\n $this->photo\n ->setCreatedDate(new \\DateTime(\"now\"))\n ->setFileName($this->fileName);\n\n $this->entityManager->persist($this->photo);\n $this->entityManager->flush();\n }", "title": "" }, { "docid": "b6dfd66bb3beefad96718bb2a7b434fc", "score": "0.5132342", "text": "public function onPrePersist()\n {\n $this->createdAt = new \\DateTime(\"now\");\n $this->updatedAt = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "b6dfd66bb3beefad96718bb2a7b434fc", "score": "0.5132342", "text": "public function onPrePersist()\n {\n $this->createdAt = new \\DateTime(\"now\");\n $this->updatedAt = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "b6dfd66bb3beefad96718bb2a7b434fc", "score": "0.5132342", "text": "public function onPrePersist()\n {\n $this->createdAt = new \\DateTime(\"now\");\n $this->updatedAt = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "cac20d0e77efea2a531a9f9d10ceef9c", "score": "0.51309985", "text": "public function preSaveEvent($value);", "title": "" }, { "docid": "dd992720a37a116ff506e4b377cc5046", "score": "0.5128897", "text": "public function store()\n {\n if (Request::ajax()) {\n $data = Input::all();\n\n if(Input::has('ingredient_action_id')){\n // find the bear\n $ingredient = Ct_ingredient::find(Input::get('ingredient_action_id'));\n // change the attribute\n $ingredient->product = Input::get('product_action_id');\n $ingredient->title = Input::get('ingredient_title');\n $ingredient->description = Input::get('ingredient_description');\n $ingredient->unit = Input::get('ingredient_unit');\n $ingredient->quantity = Input::get('ingredient_quantity');\n $ingredient->status = Input::get('ingredient_status');\n $ingredient->state = Input::get('ingredient_state');\n\n // save to our database\n $ingredient->save();\n return Input::get('quantity_action_id');\n } else {\n $ingredient = Ct_ingredient::firstOrCreate(array(\n 'product'\t => Input::get('product_action_id'),\n 'title'\t => Input::get('ingredient_title'),\n 'description'\t=> Input::get('ingredient_description'),\n 'unit'\t => Input::get('ingredient_unit'),\n 'quantity'\t => Input::get('ingredient_quantity'),\n 'status'\t => Input::get('ingredient_status'),\n 'state'\t => Input::get('ingredient_state'),\n ));\n $last_inserted_id = $ingredient->id;\n return $last_inserted_id;\n }\n }\n }", "title": "" }, { "docid": "7a115ee61a3c3c2ff54aaae7e6044a4a", "score": "0.51236373", "text": "public function store(Request $request, Ingredient $ingredient)\n {\n\n $countIngredientsInCategory = Ingredient::withTrashed()->where('ingredient_category_id', $request->ingredient_category_id)->count();\n\n if ($countIngredientsInCategory > 0){\n $lastCodeInCategory = Ingredient::where('ingredient_category_id', $request->ingredient_category_id)->firstOrFail()->id;\n $codeCategory = Ingredient::findOrFail($lastCodeInCategory);\n $code = $codeCategory->ingredientCategory->code;\n } else {\n $categoryId = $request->ingredient_category_id;\n $codeCategory = IngredientCategory::findOrFail($categoryId);\n $code = $codeCategory->code;\n }\n\n // $lastIngredient = Ingredient::where('ingredient_category_id', $request->ingredient_category_id)->count();\n\n // if ($countIngredientsInCategory > 0){\n // $lastCodeInCategory = Ingredient::where('ingredient_category_id', $request->ingredient_category_id)->firstOrFail()->id;\n // $codeCategory = Ingredient::findOrFail($lastCodeInCategory);\n // $code = $codeCategory->ingredientCategory->code;\n // } else {\n // $categoryId = $request->ingredient_category_id;\n // $codeCategory = IngredientCategory::findOrFail($categoryId);\n // $code = $codeCategory->code;\n // }\n\n $data = request()->validate([\n // 'code' => \"required|min:2|max:6|unique:ingredients,code,$ingredient->id\",\n 'name' => 'required|max:60',\n 'name_en' => 'required|max:60',\n 'inci' => 'required|max:60',\n 'inci_koh' => 'max:60',\n 'inci_naoh' => 'max:60',\n 'cas' => 'max:40',\n 'cas_einecs' => 'max:40',\n 'einecs' => 'max:20',\n 'ingredient_category_id' => 'required',\n 'infos' => 'max:1000',\n 'active' => 'required'\n ]);\n\n $data['code'] = $code . ($countIngredientsInCategory + 1);\n\n // dd($data);\n\n Ingredient::create($data);\n return redirect('ingredients')->with('message', 'L\\'ingrédient '.$data['name'].' a bien été créé !' );\n }", "title": "" }, { "docid": "e0a15e211d4354a61c8e9060338fa247", "score": "0.51169455", "text": "public function onBeforeSave($event)\n {\n $event->isValid = $this->save($event->sender);\n }", "title": "" } ]
c4df32c0e5884ab654d3eda9b11d1af2
Boot the application's service providers.
[ { "docid": "86d52d1bb74cf1fca1ff335c3f55f624", "score": "0.0", "text": "public function boot()\n {\n // TODO: Implement boot() method.\n }", "title": "" } ]
[ { "docid": "0d59ca3a8606673e200355031856c761", "score": "0.83057445", "text": "protected function boot()\n\t{\n\t\tforeach ($this->serviceProviders as $provider)\n\t\t{\n\t\t\t$provider->boot($this);\n\t\t}\n\n\t\t$this->booted = true;\n\t}", "title": "" }, { "docid": "52dda4a5b96f17676f61276bf05130e2", "score": "0.8008716", "text": "public function boot()\n {\n if (!$this->booted) {\n $this->booted = true;\n\n foreach ($this->providers as $provider) {\n if ($provider instanceof BootableProviderInterface) {\n $provider->boot($this);\n }\n }\n }\n\n $this->bootApplication();\n }", "title": "" }, { "docid": "e4cd54df39527608e68eed7dabc1834a", "score": "0.7999471", "text": "public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n array_walk($this->loadedProviders, function ($p) {\n $this->bootProvider($p);\n });\n\n $this->booted = true;\n }", "title": "" }, { "docid": "ce6872423bee007ef7bd4b0fc34e540b", "score": "0.7894164", "text": "public function boot()\n {\n $providers = $this->make('config')->get('app.console_providers', array());\n foreach ($providers as $provider) {\n $provider = $this->make($provider);\n if ($provider && method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }", "title": "" }, { "docid": "333b48ae95eac625a4366d75debe20a6", "score": "0.7820643", "text": "protected function bootProviders() {\n\n\t\tforeach ( $this->getProviders() as $provider ) {\n\t\t\t$this->bootProvider( $provider );\n\t\t}\n\t}", "title": "" }, { "docid": "e6402762e5d70aab18701916f987a0e5", "score": "0.768073", "text": "public function boot()\n {\n foreach($this->plugins as $plugin)\n {\n $plugin->boot();\n }\n\n Provider::boot();\n }", "title": "" }, { "docid": "9ffea78da244a59ce79c7fcfa22da08c", "score": "0.74991333", "text": "public function boot() {\n\n\t\t$this->registerProviders();\n\t\t$this->bootProviders();\n\t\t$this->registerProxies();\n\t}", "title": "" }, { "docid": "fa3707b8bbec88a453e58c2fae5bb46a", "score": "0.72968715", "text": "public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n $this->fireAppCallback($this->bootingCallbacks);\n\n /** @var ExtensionManager $manager */\n $manager = $this->make(Manager::class);\n\n $manager->boot();\n\n foreach ($this->providers as $provider) {\n if (method_exists($provider, 'boot')) {\n $this->call([$provider, 'boot']);\n }\n }\n\n $this->fireAppCallback($this->bootedCallbacks);\n }", "title": "" }, { "docid": "7aee91f09d58b84169f3ed5307fc945a", "score": "0.7208261", "text": "public function bootstrap()\n {\n if($this->LOADED)\n return;\n\n /* Loads the helpers. */\n include_once(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'helpers.php');\n\n /* Brutally reads the services before loading the proper config manager */\n $services = require_once($this->ROOT . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'services.php');\n foreach($services as $alias => $serviceName) {\n $this->register($alias, $serviceName, array('app' => $this));\n\n if($serviceName::$BOOTLOAD)\n $this->get($alias); /* We have to call the bootstrap method. To do this, we get the instance for the Container so constructor will be called. */\n }\n\n /* Registers and Handlers ModuleProviders */\n $this->handleModuleProviders();\n\n $this->LOADED = true;\n }", "title": "" }, { "docid": "088642891828f8cf00f44ead35aee752", "score": "0.7145187", "text": "public function boot()\n {\n $this->loadDevelopmentServiceProviders();\n\n $this->loadPublicConfigItems();\n }", "title": "" }, { "docid": "e94a94066f3aaca84e9a7a9b8e58bc8e", "score": "0.70200527", "text": "public function setProviders()\n {\n $services = $this->container['services']??null;\n\n if (is_array($services)) {\n foreach ($services as $service) {\n $service::register($this->container);\n $service::boot($this->container);\n }\n }\n }", "title": "" }, { "docid": "e9817ac299473573f1594deeff936d46", "score": "0.69796306", "text": "private function boot($providers): void\n {\n $definitions = [];\n foreach ($providers as $provider) {\n $isValidProvider = $this->validateProvider($provider);\n if (false === $isValidProvider) {\n throw new \\RuntimeException(sprintf('ServiceProvider %s is not implement %s', $provider, ServiceProviderInterface::class));\n }\n\n /** @var ServiceProviderInterface $providerInstance */\n $providerInstance = new $provider();\n $definitions[] = $providerInstance->getDefinitions();\n }\n\n $this->builder->addDefinitions(array_merge(...$definitions));\n }", "title": "" }, { "docid": "d2df902d37d5f86f5a5dbfb5c3f4ad4e", "score": "0.69407535", "text": "public function boot() {\n\t\tProfiler::record('Boot extension kernel');\n\t\t$this->resolve();\n\t}", "title": "" }, { "docid": "6f85cd8b3ee81e724bdeebcb3dc4828f", "score": "0.69311833", "text": "public function boot()\n {\n $this->bootPackages();\n }", "title": "" }, { "docid": "f9aecb203e5330dc2ef2b38b2c8c09f6", "score": "0.6930115", "text": "protected function boot()\n {\n foreach ($this->getKernel()->getPlugins() as $plugin) {\n $plugin->boot($this);\n }\n }", "title": "" }, { "docid": "a189fcbcb47aa38086cc1c1d65978fef", "score": "0.69248015", "text": "public function bootstrap()\n {\n foreach ($this->bootstrappers as $bootstrapper) {\n $this->app->make($bootstrapper)->bootstrap($this->app);\n }\n }", "title": "" }, { "docid": "b476f33dbc6c9bbaf2f992d1a562923d", "score": "0.6903875", "text": "public function boot(): void\n {\n try {\n // Just check if we have DB connection! This is to avoid\n // exceptions on new projects before configuring database options\n // @TODO: refcator the whole accessareas retrieval to be file-based, instead of db based\n DB::connection()->getPdo();\n\n if (Schema::hasTable(config('cortex.foundation.tables.accessareas'))) {\n // Register accessareas into service container, early before booting any module service providers!\n $this->app->singleton('accessareas', fn () => app('cortex.foundation.accessarea')->where('is_active', true)->get());\n }\n } catch (Exception $e) {\n // Be quiet! Do not do or say anything!!\n }\n\n $this->bootstrapModules();\n }", "title": "" }, { "docid": "88d0f25094861a98b65d6fb17b31eb2a", "score": "0.6887648", "text": "protected static function boot() {\n parent::boot();\n\n \t//For Payments\n\t static::deleting(function($serviceprovider) {\n\t $serviceprovider->claim()->delete();\n\t });\n\t static::restoring(function($serviceprovider) {\n\t $serviceprovider->claim()->restore();\n\t });\n\t \n\t}", "title": "" }, { "docid": "29862c848cc29b0408c0fa94227640fe", "score": "0.6886225", "text": "public function boot()\n {\n $app = $this->app;\n\n /*\n * ----------------------------------------------------------------------------\n * Bind the IOC container to our facades\n * Completely indebted to Taylor Otwell & Laravel for this.\n * ----------------------------------------------------------------------------\n */\n Facade::setFacadeApplication($app);\n\n /**\n * ----------------------------------------------------------------------------\n * Load path detection for relative assets, URL and path to home.\n * ----------------------------------------------------------------------------.\n */\n require_once DIR_BASE_CORE . '/bootstrap/paths.php';\n\n /*\n * ----------------------------------------------------------------------------\n * Add install environment detection\n * ----------------------------------------------------------------------------\n */\n $this->initializeEnvironmentDetection($app);\n\n /*\n * ----------------------------------------------------------------------------\n * Enable Configuration\n * ----------------------------------------------------------------------------\n */\n $config = $this->initializeConfig($app);\n\n /*\n * ----------------------------------------------------------------------------\n * Set configured error reporting\n * ----------------------------------------------------------------------------\n */\n $this->setupErrorReporting($config);\n\n /*\n * ----------------------------------------------------------------------------\n * Enable Localization\n * ----------------------------------------------------------------------------\n */\n $this->initializeLocalization($app);\n\n /*\n * ----------------------------------------------------------------------------\n * Finalize paths.\n * ----------------------------------------------------------------------------\n */\n require DIR_BASE_CORE . '/bootstrap/paths_configured.php';\n\n /*\n * ----------------------------------------------------------------------------\n * Setup core classes aliases.\n * ----------------------------------------------------------------------------\n */\n $this->initializeClassAliases($config);\n\n /*\n * ----------------------------------------------------------------------------\n * Simple legacy constants like APP_CHARSET\n * ----------------------------------------------------------------------------\n */\n $this->initializeLegacyDefinitions($config, $app);\n\n /*\n * ----------------------------------------------------------------------------\n * Setup the core service groups.\n * ----------------------------------------------------------------------------\n */\n $this->initializeServiceProviders($app, $config);\n\n /*\n * ----------------------------------------------------------------------------\n * Setup file cache directories. Has to come after we define services\n * because we use the file service.\n * ----------------------------------------------------------------------------\n */\n $app->setupFilesystem();\n\n /*\n * ----------------------------------------------------------------------------\n * Registries for theme paths, assets, routes and file types.\n * ----------------------------------------------------------------------------\n */\n $this->initializeAssets($config);\n $this->initializeRoutes($config);\n $this->initializeFileTypes($config);\n\n /*\n * ----------------------------------------------------------------------------\n * Certain components subscribing to the actions of other components.\n * ----------------------------------------------------------------------------\n */\n $this->initializeEvents($app);\n\n\n // If we're not in the CLI SAPI, lets do additional booting for HTTP\n if (!$this->app->isRunThroughCommandLineInterface()) {\n return $this->bootHttpSapi($config, $app);\n }\n }", "title": "" }, { "docid": "f0e58d3ca0d60fbc09f488f0dd64fa34", "score": "0.68483645", "text": "public static function boot()\n {\n static::bootStaplerT();\n static::bootEntrustUserT();\n }", "title": "" }, { "docid": "5f648b2ee7b0729a527669abe5d52aee", "score": "0.68263", "text": "public static function boot() {\n\t\tstatic::container()->boot();\n\t}", "title": "" }, { "docid": "e533b47c84c1887256b379e4b0170701", "score": "0.67624825", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->registeredPublish();\n }\n\n $this->registeredServiceMenu();\n $this->registeredResources();\n $this->registeredProvider();\n }", "title": "" }, { "docid": "5841c4f3ef249f4bb41addfd53d548df", "score": "0.6741951", "text": "public function boot()\n {\n //\n Configuration::environment(\"sandbox\");\n Configuration::merchantId(\"cmpss9trsxsr4538\");\n Configuration::publicKey(\"zy3x5mb5jwkcrxgr\");\n Configuration::privateKey(\"4d63c8b2c340daaa353be453b46f6ac2\");\n\n\n $modules = Directory::listDirectories(app_path('Modules'));\n\n foreach ($modules as $module)\n {\n $routesPath = app_path('Modules/' . $module . '/routes.php');\n $viewsPath = app_path('Modules/' . $module . '/Views');\n\n if (file_exists($routesPath))\n {\n require $routesPath;\n }\n\n if (file_exists($viewsPath))\n {\n $this->app->view->addLocation($viewsPath);\n }\n }\n }", "title": "" }, { "docid": "48f995e5008d2ffd4767f460c4960b86", "score": "0.671435", "text": "public function boot()\n {\n $this->app->register(UserServiceProvider::class);\n $this->app->register(DashboardServiceProvider::class);\n $this->app->register(CoreServiceProvider::class);\n $this->app->register(InstitutionalVideoServiceProvider::class);\n $this->app->register(InstitutionalServiceProvider::class);\n $this->app->register(TrainingServiceProvider::class);\n $this->app->register(CompanyServiceProvider::class);\n $this->app->register(LearningUnitServiceProvider::class);\n $this->app->register(PublicationServiceProvider::class);\n }", "title": "" }, { "docid": "125d9cc258abd23137fc14eaaaad660b", "score": "0.67107606", "text": "public function boot()\n {\n $this->dispatch(new SetCoreConnection());\n $this->dispatch(new ConfigureCommandBus());\n $this->dispatch(new ConfigureTranslator());\n $this->dispatch(new LoadStreamsConfiguration());\n\n $this->dispatch(new InitializeApplication());\n $this->dispatch(new AutoloadEntryModels());\n $this->dispatch(new AddAssetNamespaces());\n $this->dispatch(new AddImageNamespaces());\n $this->dispatch(new AddViewNamespaces());\n $this->dispatch(new AddTwigExtensions());\n $this->dispatch(new RegisterAddons());\n }", "title": "" }, { "docid": "b5e5e9ea65ce1561ab43a9847fcccae9", "score": "0.6702088", "text": "public function boot()\n {\n $this->moduleLoaders();\n }", "title": "" }, { "docid": "4a6f09c8ab024b2dad9e9a971a6ad38d", "score": "0.66897756", "text": "public function bootPackages()\n {\n // Get the namespace of the current plugin to use in accessing the Config of the plugin\n $pluginNamespace = str_replace('\\\\', '.', strtolower(__NAMESPACE__));\n\n // Instantiate the AliasLoader for any aliases that will be loaded\n $aliasLoader = AliasLoader::getInstance();\n\n // Get the packages to boot\n $packages = Config::get($pluginNamespace . '::packages');\n\n // Boot each package\n foreach ($packages as $name => $options) {\n // Setup the configuration for the package, pulling from this plugin's config\n if (!empty($options['config']) && !empty($options['config_namespace'])) {\n Config::set($options['config_namespace'], $options['config']);\n }\n\n // Register any Service Providers for the package\n if (!empty($options['providers'])) {\n foreach ($options['providers'] as $provider) {\n App::register($provider);\n }\n }\n\n // Register any Aliases for the package\n if (!empty($options['aliases'])) {\n foreach ($options['aliases'] as $alias => $path) {\n $aliasLoader->alias($alias, $path);\n }\n }\n }\n }", "title": "" }, { "docid": "f6aac0dfd979be44c83e8ac579a91251", "score": "0.6685954", "text": "public static function boot()\n {\n self::getInstance()->boot();\n }", "title": "" }, { "docid": "67bdea43dbc5eed1758038330ea09834", "score": "0.66794544", "text": "protected function registerServiceProviders(): void\n {\n foreach ($this->localProviders as $provider) {\n $this->app->register($provider);\n }\n }", "title": "" }, { "docid": "3c18a110b50ca316ae74bb11a08f8f4f", "score": "0.6642109", "text": "public function boot()\n {\n if (true === $this->booted) {\n return;\n }\n\n //@TODO Implement Caching mechanism\n\n // init Tools used in ThoughtYards WorkShop\n $this->initializeToolKits();\n\n // init container\n $this->initializeContainer();\n\n foreach ($this->getToolKits() as $toolkit) {\n $toolkit->setContainer($this->container);\n $toolkit->boot();\n }\n\n $this->booted = true;\n }", "title": "" }, { "docid": "10e08ef184b55686a7e7649278e89d08", "score": "0.66283566", "text": "public function boot()\n {\n define(\"APP_LAYER\", 'http://localhost/simple-micro-services-lumen/app-layer/');\n define(\"APP_LAYER_TOKEN\", '$2y$10$QGodNXsDkI7uscyboVZ45.YsukuPG.ddyCWJSySwrc2HRwyw4XYC.');\n }", "title": "" }, { "docid": "714830670d1334e2fb48ee4f1350fdf5", "score": "0.6605657", "text": "protected function setInitialProviders()\n {\n $application = $this->application->getApplication();\n $providers = $this->config->get('swoole_http.providers', []);\n\n foreach ($providers as $provider) {\n if (class_exists($provider)) {\n $provider = new $provider($application);\n $this->providers[get_class($provider)] = $provider;\n }\n }\n }", "title": "" }, { "docid": "2c80fdf6fc28d8d4cc80544f0cb89c8f", "score": "0.6601572", "text": "public function boot()\n {\n $ds = DIRECTORY_SEPARATOR;\n // For each of the registered modules, include their routes and Views\n $modules = config(\"module.modules\");\n\n /**\n * We are moving out of explode and moving it to app path\n */\n $modulePath = $this->app->path.$ds.'Modules';\n\n foreach ($modules as $module) {\n\n // Load the routes for each of the modules\n if (file_exists($modulePath.$ds.$module.$ds.'routes.php')) {\n include $modulePath.$ds.$module.$ds.'routes.php';\n }\n\n // Load the views\n if (is_dir($modulePath.$ds.$module.$ds.'Views')) {\n $this->loadViewsFrom($modulePath.$ds.$module.$ds.'Views', $module);\n }\n }\n }", "title": "" }, { "docid": "8ff3a37d8ea964a02d920c45f63bba1e", "score": "0.6598795", "text": "public function boot()\n {\n $this->setupConfig($this->app);\n }", "title": "" }, { "docid": "74c1b386f49735528edec03fcc0f08b1", "score": "0.6598012", "text": "public function boot(): void\n {\n $this->bootMigrations();\n $this->bootRoutes();\n $this->bootChannels();\n $this->bootUsersConfigs();\n $this->bootCommands();\n $this->bootSchedule();\n }", "title": "" }, { "docid": "da20de44d37a96f618eed6fb104356f4", "score": "0.65965563", "text": "public function boot()\n {\n // init the container\n $this->initializeContainer();\n\n $this->booted = true;\n }", "title": "" }, { "docid": "38a0db84247e54f4b20d9ce156cf4b3f", "score": "0.6586344", "text": "public function boot()\n {\n $this->bootCacheBusting();\n $this->bootSharedProperties();\n }", "title": "" }, { "docid": "8946cd556609d1de16d9fe1fca851459", "score": "0.6580987", "text": "public function boot()\n {\n $this->loadTranslationsFrom(__DIR__ . '/../resources/Lang', 'cms');\n $this->loadViewsFrom(__DIR__ . '/../resources/views', 'cms');\n\n $this->app->register(\"Sahakavatar\\User\\Providers\\ModuleServiceProvider\");\n $this->app->register('Sahakavatar\\Console\\Providers\\ModuleServiceProvider');\n $this->app->register('Sahakavatar\\Framework\\Providers\\ModuleServiceProvider');\n $this->app->register('Sahakavatar\\Manage\\Providers\\ModuleServiceProvider');\n $this->app->register('Sahakavatar\\Resources\\Providers\\ModuleServiceProvider');\n $this->app->register('Sahakavatar\\Settings\\Providers\\ModuleServiceProvider');\n $this->app->register('Sahakavatar\\Uploads\\Providers\\ModuleServiceProvider');\n $this->app->register('Sahakavatar\\Modules\\Providers\\ModuleServiceProvider');\n $this->app->register('Avatar\\Avatar\\Providers\\AvatarServiceProvider');\n }", "title": "" }, { "docid": "ad16bd6a7378192ac3edb0ca83bb1401", "score": "0.65743494", "text": "protected static function boot()\n {\n }", "title": "" }, { "docid": "ad16bd6a7378192ac3edb0ca83bb1401", "score": "0.65743494", "text": "protected static function boot()\n {\n }", "title": "" }, { "docid": "fa0878788c4289e49d4fae4e809d3338", "score": "0.6569069", "text": "public function boot()\n {\n // Boot here application\n }", "title": "" }, { "docid": "e6557751439c588144f72f3ecb78ea1b", "score": "0.6551929", "text": "public function boot()\n {\n $this->initializationModule();\n }", "title": "" }, { "docid": "f69be4d36d5f9c0255e699a2e4bb930e", "score": "0.65488", "text": "public function boot()\n {\n $this->app->booted(function () {\n $this->callMethodIfExists('jobs');\n });\n }", "title": "" }, { "docid": "792b8db8f3149a9e7931127968257126", "score": "0.6547463", "text": "public function boot()\n {\n //\n view()->composer(\n '*', '\\stjo\\Http\\Composers\\adminSidebarComposer'\n );\n view()->composer(\n '*', '\\stjo\\Http\\Composers\\publicSidebarComposer'\n );\n //dd('booting stjoService');\n }", "title": "" }, { "docid": "f9ac3a651e57ee46448eadbfc3100c2d", "score": "0.654019", "text": "public function boot()\n {\n $this->register_componets();\n $this->define_gates();\n }", "title": "" }, { "docid": "0ec4b5b68de90b14776f2a90aba094a0", "score": "0.65398294", "text": "public function bootstrap()\n {\n foreach ($this->bootstrappers as $bootstrapper)\n {\n (new $bootstrapper)->bootstrap($this->container);\n }\n }", "title": "" }, { "docid": "4a83fe003d1f6cda526dc3f516d74aa0", "score": "0.6519706", "text": "public function boot()\n {\n $this->setUpConfig();\n $this->setUpConsoleCommands();\n }", "title": "" }, { "docid": "d97594838d91989bc349c800059b707a", "score": "0.6517141", "text": "public function boot()\n {\n $this->bootPublishes();\n\n $this->bootRouter();\n\n $this->bootViews();\n }", "title": "" }, { "docid": "261cf8a1652bc7c1d8a46d447930ef4d", "score": "0.6507398", "text": "public function boot(): void\n {\n $this->bootConfig();\n $this->bootDatabase();\n }", "title": "" }, { "docid": "7464287d37338153d073d228f6e2c031", "score": "0.65071976", "text": "protected function boot() {\n\n $c = $this->services = new Container();\n\n // Register plugin and kirby core as service parameter\n $this->share('name', $this->name());\n $this->share('version', $this->version());\n $this->share('root', $this->kirby->roots()->plugins() . DS . $this->name());\n\n // Register the path finder as service\n $this->share('finder', function($c) {\n return new Finder($c->get('root'));\n });\n\n // Register configuration store as service\n $this->share('config', function($c) {\n return new Config($c->get('root'), $c->get('name'));\n });\n\n // Register file cache as service\n $this->share('cache', function($c) {\n return new FileCache($c->finder()->cache());\n });\n\n // Register database connection as service\n $this->share('db', function($c) {\n $connections = $c->config()->get('database.connections');\n $default = $c->config()->get('database.default', 'sqlite');\n $credentials = array_merge($connections[$default], array('type' => $default));\n return new Database($credentials);\n });\n\n // Dynamically resolve database connections for models once a connection\n // is requested\n Model::resolver(function() use ($c) { return $c->get('db'); });\n\n }", "title": "" }, { "docid": "9475979e3b15b0865ce63498b2e83879", "score": "0.65055436", "text": "public function boot()\n {\n $this->bootConfig();\n $this->bootValidator();\n }", "title": "" }, { "docid": "ab37feab2de1c8293ee561131be30171", "score": "0.65052813", "text": "public function testBooting()\n {\n // $provider->boot();\n }", "title": "" }, { "docid": "bcdc67a95b1d58efa6be5396b129bc49", "score": "0.6505198", "text": "public function boot(): void", "title": "" }, { "docid": "503c8e60cda49767335c0eae9d572f5c", "score": "0.650462", "text": "public function boot()\n {\n $router = $this->app['router'];\n\n foreach ($this->providers as $provider) {\n $provider = new $provider;\n\n $router->patterns($provider->patterns());\n }\n\n parent::boot();\n }", "title": "" }, { "docid": "9f45739dac85c1c3ffce9da09ef3b558", "score": "0.6496492", "text": "public function boot()\n {\n $configuration = [];\n\n if (file_exists($file = getcwd() . '/kaleo.config.php')) {\n $configuration = include_once $file;\n }\n\n $this->app->singleton('kaleo', function () use ($configuration) {\n return new KaleoService($configuration);\n });\n }", "title": "" }, { "docid": "15d07b44068c4ac155d19d30c2dbc32f", "score": "0.6491968", "text": "public function boot()\n { \n $this->bootRoute();\n $this->bootViews();\n $this->bootViewComposer(); \n $this->bootTranslations();\n \n $this->defineVendorPublish();\n $this->defineMigrate();\n }", "title": "" }, { "docid": "df02be55ed0c2ce92440f976d3f8cf7b", "score": "0.6491363", "text": "public function boot()\n {\n // Nothing to boot\n }", "title": "" }, { "docid": "bc25e2ca0ee5095648451b3cc9d9e043", "score": "0.647802", "text": "public function boot()\n {\n static::bootMethods();\n }", "title": "" }, { "docid": "dca300a6b7f2d5dcd1f5ad29786f3da8", "score": "0.6475045", "text": "public function boot()\r\n {\r\n // Publishing is only necessary when using the CLI.\r\n if ($this->app->runningInConsole()) {\r\n $this->bootForConsole();\r\n }\r\n }", "title": "" }, { "docid": "1110edaf6ff228d720e7814999e1b418", "score": "0.646369", "text": "public function boot()\n\t{\n $monolog = Log::getMonolog();\n\n $this->bootChromePHP($monolog);\n\n $this->bootSlack($monolog);\n\n\t}", "title": "" }, { "docid": "c7212b0ea698139a888f0471cc51adc3", "score": "0.64631546", "text": "public function boot() {\n }", "title": "" }, { "docid": "ce2689d70f9c0d9504bb21b5e249bdd6", "score": "0.6461587", "text": "public function boot()\n {\n $this->bootConfig();\n\n }", "title": "" }, { "docid": "8b8e4b07b810a51a4fb47ea1f9ca53be", "score": "0.6456133", "text": "protected function bootstrap()\n {\n foreach (static::$bootstrappers as $bootstrapper) {\n $bootstrapper($this);\n }\n }", "title": "" }, { "docid": "eeed08867753fa2bf58d78af2eadcb11", "score": "0.6451278", "text": "public function boot() {\n // . . .\n }", "title": "" }, { "docid": "fc81c1649043813529f33c09e5e020ba", "score": "0.6446871", "text": "public function boot()\n {\n $this->bootCommands();\n }", "title": "" }, { "docid": "e49c08b282f4983ad5b207a13bdf7d36", "score": "0.64453936", "text": "public function boot() {\n\t}", "title": "" }, { "docid": "e49c08b282f4983ad5b207a13bdf7d36", "score": "0.64453936", "text": "public function boot() {\n\t}", "title": "" }, { "docid": "cb4aa82f893702a372549091b5a71923", "score": "0.64410216", "text": "protected function boot()\n {\n //Nothing to do here, but you can override this function in child classes.\n }", "title": "" }, { "docid": "32bc037de46026ad68be6882959a2827", "score": "0.6429094", "text": "public function boot()\n {\n $this->bootModulesMenu();\n $this->bootSkinComposer();\n $this->bootCustomBladeDirectives();\n }", "title": "" }, { "docid": "8d8e79fc30abe93624ef461bdc253868", "score": "0.6428123", "text": "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->bootCommands();\n }\n }", "title": "" }, { "docid": "7e1c5593c89f07f8fe552730b6ec024a", "score": "0.64202845", "text": "public function boot(){\n\n $this->app->singleton('structure', function($app){\n return new Structure;\n });\n\n app('structure')->createMicroserviceConfigFile();\n \n ######################### SERVICES ############################\n $path_services = config('microservices.paths.services');\n $path_contracts = config('microservices.paths.contracts');\n $path_repositories = config('microservices.paths.repositories');\n $services = config('microservices.services');\n \n if( $services ){\n foreach ($services as $key => $object) { \n $service = $path_services.$object['name'].'Service';\n $interface = $path_contracts.$object['name'].'Interface';\n \n if( $object['repository'] ){\n $repository = $path_repositories.$object['repository'];\n $this->app->bind( $interface, function($app) use ($service, $repository){\n return new $service( app($repository) );\n }); \n }\n else{\n $this->app->bind( $interface, $service );\n }\n\n }\n }\n ################################################################\n $services_with_observers = array_where(config('structure.services'), function($value, $key){ return $value['observer']; });\n if( $services_with_observers ){\n foreach ($services_with_observers as $service_name => $options) {\n $service = app('structure')->transformNameService($service_name);\n $model_class = config('structure.paths.models').$service;\n $observer_class = config('structure.paths.observers').$service.'Observer';\n $model_class::observe( $observer_class );\n }\n }\n }", "title": "" }, { "docid": "d187c0000fef05c12488fec22e965970", "score": "0.6418851", "text": "public function boot()\n {\n $this->loadTranslationsFrom(__DIR__.'/../Resources/Lang', 'push-notification-devices');\n $this->loadViewsFrom(__DIR__.'/../Resources/Views', 'push-notification-devices');\n\n $this->loadMigrationsFrom(module_path('push-notification-devices', 'Database/Migrations', 'app'));\n if (!$this->app->configurationIsCached()) {\n $this->loadConfigsFrom(module_path('push-notification-devices', 'Config', 'app'));\n }\n }", "title": "" }, { "docid": "52aea97a7d25bf912e6398b6485f0102", "score": "0.641509", "text": "public function boot()\n {\n Storage::extend('kdrive', function ($app, $config) {\n $kdrive = new KDriveAdapter(\n $config['id'],\n $config['username'],\n $config['password'],\n $config['prefix']\n );\n return new Filesystem($kdrive);\n });\n }", "title": "" }, { "docid": "25ba654f6b34afd3bf69dd215ca47cf1", "score": "0.64136624", "text": "public function boot()\n {\n $this->setupConfig();\n }", "title": "" }, { "docid": "25ba654f6b34afd3bf69dd215ca47cf1", "score": "0.64136624", "text": "public function boot()\n {\n $this->setupConfig();\n }", "title": "" }, { "docid": "25ba654f6b34afd3bf69dd215ca47cf1", "score": "0.64136624", "text": "public function boot()\n {\n $this->setupConfig();\n }", "title": "" }, { "docid": "01f11a4eed1b3709f8d7387f3047faea", "score": "0.64136004", "text": "public function boot()\n {\n $this->app->singleton( ShippingAdapterInterface::class, Aramex::class);\n $this->app->singleton( ShippingAdapterInterface::class, DHL::class);\n JsonResource::withoutWrapping();\n }", "title": "" }, { "docid": "04d0212ab723377dc655e0ee29ec874f", "score": "0.640305", "text": "public function boot()\n {\n if (! config('app.installed')) {\n return;\n }\n\n $this->app['config']->set([\n 'scout' => [\n 'driver' => setting('search_engine', 'mysql'),\n 'algolia' => [\n 'id' => setting('algolia_app_id'),\n 'secret' => setting('algolia_secret'),\n ],\n ],\n ]);\n }", "title": "" }, { "docid": "4b820ee8df4ec329ab1eca3ea0b63dac", "score": "0.6402703", "text": "public function boot()\n {\n if ($this->app->environment('local', 'testing', 'integration')) {\n $this->bootstrapFaker();\n $this->decorateEloquentFactoryBuilder();\n }\n\n $this->registerModelMorphMapRelations();\n }", "title": "" }, { "docid": "5aa7fe35cdab284dc6b647e9a3d21fe4", "score": "0.640227", "text": "protected function bootProvider( $provider ) {\n\n\t\tif ( method_exists( $provider, 'boot' ) ) {\n\t\t\t$provider->boot();\n\t\t}\n\t}", "title": "" }, { "docid": "51f20c394065b87d12e99282f5575de1", "score": "0.6397432", "text": "public function boot() {\n\t\t// no-op\n\t}", "title": "" }, { "docid": "3a5181d85342432207f843d769548f52", "score": "0.63943195", "text": "public function boot()\n {\n Socialite::extend(\n 'amazon',\n function ($app) {\n $config = $app['config']['services.amazon'];\n\n return Socialite::buildProvider(AmazonProvider::class, $config);\n }\n );\n }", "title": "" }, { "docid": "e25b940b2d1fb1cd43b41be9d37072d6", "score": "0.6393351", "text": "public function boot()\n {\n $this->bootRoutes();\n $this->bootViews();\n\n $this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'admin');\n\n $this->bootPolicies();\n if ($this->app->runningInConsole()) {\n $this->bootPublishes();\n }\n\n\n// /** @var DispatcherContract $events */\n// $events = $this->app->make(DispatcherContract::class);\n// $events->listen();\n// $events->subscribe();\n }", "title": "" }, { "docid": "1da94ed6b6cb8f8f0872d5391874ae98", "score": "0.63899136", "text": "public function boot()\n {\n // no-op\n }", "title": "" }, { "docid": "70beb4e22887bac25c37caeace2a6158", "score": "0.63642734", "text": "public function boot()\n {\n $this->app->bind('App\\Services\\ProviderAccountService', function() {\n return new ProviderAccountService;\n });\n }", "title": "" }, { "docid": "704f39757e26696c8f2d1c20df19f129", "score": "0.6364246", "text": "public function boot()\r\n {\r\n }", "title": "" }, { "docid": "0e458db1c86d25a749c08744e634e3d1", "score": "0.63593197", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__ . '/../config/larkeauth-rbac-model.conf' => config_path('larkeauth-rbac-model.conf.larkeauth'),\n __DIR__ . '/../config/larkeauth.php' => config_path('larkeauth.php.larkeauth')\n ], 'larke-auth-config');\n\n $this->commands([\n Commands\\Install::class,\n Commands\\GroupAdd::class,\n Commands\\PolicyAdd::class,\n Commands\\RoleAssign::class,\n ]);\n }\n\n $this->mergeConfigFrom(__DIR__ . '/../config/larkeauth.php', 'larkeauth');\n\n $this->bootObserver();\n }", "title": "" }, { "docid": "1e0e722c7999654e3de4bb1a5db4a1ec", "score": "0.63510203", "text": "public function boot(): void\n {\n $this->registerPolicies();\n\n $this->defineGates();\n }", "title": "" }, { "docid": "7710757ba53a4ba6cc30380f4b2d706e", "score": "0.6349622", "text": "public function boot () {\n }", "title": "" }, { "docid": "fc337efe3639a3a968d04c7e548b08be", "score": "0.63455296", "text": "public function boot()\n {\n $this->registerPublishing();\n\n Telescope::start($this->app);\n Telescope::listenForStorageOpportunities($this->app);\n }", "title": "" }, { "docid": "4dff5660cfdcf2d3038442b0f90cb69c", "score": "0.63402617", "text": "public function boot(): void\n {\n $this->loadMiddlewares();\n }", "title": "" }, { "docid": "133d9492067d0aa9833691b2c9ae8d50", "score": "0.6336983", "text": "protected function otherServiceProviders()\n {\n $providers = [\n \\Collective\\Html\\HtmlServiceProvider::class,\n \\Intervention\\Image\\ImageServiceProvider::class,\n \\Acacha\\AdminLTETemplateLaravel\\Providers\\AdminLTETemplateServiceProvider::class,\n \\Serff\\Cms\\Core\\Providers\\InstallationServiceProvider::class,\n \\Serff\\Cms\\Core\\Providers\\AdminServiceProvider::class,\n ];\n\n $manifestPath = app()->getCachedServicesPath();\n\n (new ProviderRepository(app(), new Filesystem, $manifestPath))\n ->load($providers);\n }", "title": "" }, { "docid": "a3a5de74852a3e82ebcd4e363ec561df", "score": "0.6336893", "text": "private function loadServices()\n {\n # Receive list of available service binary's\n exec(\"php composer.phar exec --list\", $services);\n $services = array_filter($services, function ($row) {\n return (substr($row, 0, 1) === '-' && strpos($row, 'service-')) &&\n (!strpos($row, 'service-manager')) &&\n (!strpos($row, 'service-socket'));\n });\n\n array_unshift($services, \"service-socket\");\n foreach ($services as $service) {\n $service = str_replace(\"- \", \"\", $service);\n $this->loadService($service);\n }\n }", "title": "" }, { "docid": "857498383109b7fb7e575250c48514b6", "score": "0.6335699", "text": "public function boot() {\n\t\t//\n\t}", "title": "" }, { "docid": "61df74ea8c0c307b9f9c4966a3a7bf40", "score": "0.63355124", "text": "public function boot()\n\t{\n\t\t$this->app->when(NetCoreChannel::class)\n\t\t\t->needs(NetCoreClient::class)\n\t\t\t->give(function () {\n\t\t\t\t$config = (object)Config::get('services.netcore');\n\t\t\t\tif (is_null($config)) {\n\t\t\t\t\tthrow InvalidConfiguration::configurationNotSet();\n\t\t\t\t}\n\n\t\t\t\treturn new NetCoreClient(new Client(), $config->feed_id, $config->username, $config->password);\n\t\t\t});\n\t}", "title": "" }, { "docid": "a832f2967bbc970c3d8d776d3e775be8", "score": "0.6334178", "text": "public function boot()\n {\n\n $this->novaBoot();\n// AuthUser::observe(AuthUserObserver::class);\n $this->map();\n }", "title": "" }, { "docid": "d4666291bfa48ac2a48b71f8a4ccf16e", "score": "0.63251156", "text": "public function boot()\n {\n $path = realpath(__DIR__.'/../');\n\n $this->bootExtensionComponents($path);\n\n $this->mapExtensionConfig();\n\n $this->bootExtensionEvents();\n\n $this->bootExtensionWidgets();\n\n $this->bootExtensionRouting($path);\n\n $this->bootExtensionMenuEvents();\n }", "title": "" }, { "docid": "5b32a61e43342322e5376eac6587f8d9", "score": "0.63209313", "text": "public function boot()\n {\n $source = dirname(__DIR__, 3) . '/config/config.php';\n\n if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) {\n $this->publishes([$source => config_path('dubbo_cli.php')]);\n } elseif ($this->app instanceof LumenApplication) {\n $this->app->configure('dubbo_cli');\n }\n\n $this->mergeConfigFrom($source, 'dubbo_cli');\n }", "title": "" }, { "docid": "b90d1dd2781119de70487e7b2ef122aa", "score": "0.6318039", "text": "public function boot()\n {\n Storage::extend('dropbox', function($app, $config) {\n $client = new DropboxClient(\n //$config['accessToken'], $config['appName']\n $config['authorizationToken']\n );\n\n return new Filesystem(new DropboxAdapter($client));\n });\n }", "title": "" }, { "docid": "b4c382ed4167349edf976649aa2d558c", "score": "0.63157666", "text": "public function boot ()\n {\n $this->loadDataMaps ();\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.63104486", "text": "public function boot()\n {\n }", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "87445555b36f4d950dfafea1d82f5c7d", "score": "0.0", "text": "public function destroy(Empform $empform)\n {\n //\n }", "title": "" } ]
[ { "docid": "37dd170c1eaea50870a9bd20839ad070", "score": "0.7137241", "text": "public function remove(ResourceInterface $resource): void\n {\n }", "title": "" }, { "docid": "6f5cb91b0423a11c78f100fc165554df", "score": "0.6959094", "text": "public function delete(ResourceInterface $resource);", "title": "" }, { "docid": "4899cb69f473bc3ba1f4a04f43330487", "score": "0.67682105", "text": "public function delete($resource, $id);", "title": "" }, { "docid": "55490a425cec5f2c2efea8b737497612", "score": "0.6737496", "text": "public function deleteGameResource($resource){\n if($this->gameResourceExists($resource)){\n unlink($this->getResourceDataPath() . $resource . \".dat\");\n }\n }", "title": "" }, { "docid": "ef862fedfa2a9a53bdc0c931abd5b9ef", "score": "0.6707853", "text": "public function destroy()\n {\n $this->resource->delete();\n }", "title": "" }, { "docid": "033a3fd474fdaf2c9dbcf9853f451cd2", "score": "0.664397", "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": "4f49f964d082c69a3fe92671d08d3bc7", "score": "0.66371554", "text": "public function delete($cacheResource, $ignoreLifetime = false);", "title": "" }, { "docid": "47236fb1482f779e9251fd6998158877", "score": "0.65373594", "text": "public function deleteResource(PersistentResource $resource, $unpublishResource = true)\n {\n $this->initialize();\n\n $collectionName = $resource->getCollectionName();\n\n $result = $this->resourceRepository->countBySha1AndCollectionName($resource->getSha1(), $collectionName);\n if ($result > 1) {\n $this->logger->debug(sprintf('Not removing storage data of resource %s (%s) because it is still in use by %s other PersistentResource object(s).', $resource->getFilename(), $resource->getSha1(), $result - 1));\n } else {\n if (!isset($this->collections[$collectionName])) {\n $this->logger->warning(sprintf('Could not remove storage data of resource %s (%s) because it refers to the unknown collection \"%s\".', $resource->getFilename(), $resource->getSha1(), $collectionName), LogEnvironment::fromMethodName(__METHOD__));\n\n return false;\n }\n $storage = $this->collections[$collectionName]->getStorage();\n if (!$storage instanceof WritableStorageInterface) {\n $this->logger->warning(sprintf('Could not remove storage data of resource %s (%s) because it its collection \"%s\" is read-only.', $resource->getFilename(), $resource->getSha1(), $collectionName), LogEnvironment::fromMethodName(__METHOD__));\n\n return false;\n }\n try {\n $storage->deleteResource($resource);\n } catch (\\Exception $exception) {\n $this->logger->warning(sprintf('Could not remove storage data of resource %s (%s): %s.', $resource->getFilename(), $resource->getSha1(), $exception->getMessage()), LogEnvironment::fromMethodName(__METHOD__));\n\n return false;\n }\n if ($unpublishResource) {\n /** @var TargetInterface $target */\n $target = $this->collections[$collectionName]->getTarget();\n $target->unpublishResource($resource);\n $this->logger->debug(sprintf('Removed storage data and unpublished resource %s (%s) because it not used by any other PersistentResource object.', $resource->getFilename(), $resource->getSha1()));\n } else {\n $this->logger->debug(sprintf('Removed storage data of resource %s (%s) because it not used by any other PersistentResource object.', $resource->getFilename(), $resource->getSha1()));\n }\n }\n\n $resource->setDeleted();\n $this->resourceRepository->remove($resource);\n\n return true;\n }", "title": "" }, { "docid": "73af02f86d4e877d5ec7756885285cd4", "score": "0.6409313", "text": "function delete($resourceName);", "title": "" }, { "docid": "fd5668b2d59626254ea2b308c3b7b195", "score": "0.63944584", "text": "public function removeResource(Row_AclResource $resource)\r\n\t{\r\n\t\t$row = $this->_getAclRow($resource);\r\n\t\t$row->allow = 0;\r\n\t\t$row->save();\r\n\t}", "title": "" }, { "docid": "66cab78c708362190959631c44dd73a1", "score": "0.6300312", "text": "public function remove( $resource ) {\n \n $res = $this->get( $resource );\n \n if ($res == false) {\n return $this;\n }\n \n $resourceId = $res->getResourceId();\n \n $resourcesRemoved = array( $resourceId );\n if ( null !== ( $resourceParent = $this->_resources[$resourceId]['parent'] ) ) {\n unset( $this->_resources[$resourceParent->getResourceId()]['children'][$resourceId] );\n }\n foreach ( $this->_resources[$resourceId]['children'] as $childId => $child ) {\n $this->remove( $childId );\n $resourcesRemoved[] = $childId;\n }\n // удаляет и правила для рессурса\n foreach ( $resourcesRemoved as $resourceIdRemoved ) {\n foreach ( $this->_rules['byResourceId'] as $resourceIdCurrent => $rules ) {\n if ( $resourceIdRemoved === $resourceIdCurrent ) {\n unset( $this->_rules['byResourceId'][$resourceIdCurrent] );\n }\n }\n }\n\n unset( $this->_resources[$resourceId] );\n\n\n return $this;\n }", "title": "" }, { "docid": "2a10b35926876411b2e80108cfe22fca", "score": "0.6298291", "text": "public function remove() {\n // determine the name of the file\n $filename = $this->engine->cache_file_path($this->key(), $this->options);\n @unlink($filename);\n }", "title": "" }, { "docid": "89ce35850dffc0e6605778465129a8fa", "score": "0.62484", "text": "public function destroy(Resource $resource)\n {\n if (count($resource->photos)) { // delete photos from filesystem and storage.\n foreach ($resource->photos as $key => $photo) {\n $resource->deletePhoto($photo);\n }\n }\n $resource->delete();\n return redirect('/home')->with(['status' => 'Deivce successfully deleted']);\n }", "title": "" }, { "docid": "2367dd4337c36bfe160c73cbfe965a9c", "score": "0.6222181", "text": "public function testRemoveResource() {\n\n\t\t$file = $this->tempDir . DIRECTORY_SEPARATOR . 'test.txt';\n\t\tfile_put_contents($file, 'test');\n\n\t\t$this->assertTrue(file_exists($file));\n\n\t\t$container = new FilesystemResourceContainer($this->tempDir, FileResource::TYPE);\n\t\t$container->remove('test.txt');\n\n\t\t$this->assertFalse(file_exists($file));\n\t}", "title": "" }, { "docid": "07b2c5af4c184e58bf2887516d95f2ee", "score": "0.6152366", "text": "public function clearResource(){\n\t\t\tif ($this->resource !== null){\n\t\t\t\timagedestroy($this->resource);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "7e83a85a6ecaba18a97b363f757bfe88", "score": "0.61334383", "text": "public function remove() {\n\t\tunlink($this->getSrcImagePath());\n\t}", "title": "" }, { "docid": "0fd71148a5c7f18c479bf79390410ee6", "score": "0.6105545", "text": "public function delete(): void\n {\n if ($this->has($this->file))\n unlink($this->file);\n }", "title": "" }, { "docid": "eaf52922cf2f9f3851b5dee384bd6ceb", "score": "0.60544735", "text": "public static function remove($storageId) {\n\t\t$storageCache = new Storage($storageId);\n\t\t$numericId = $storageCache->getNumericId();\n\n\t\tif (strlen($storageId) > 64) {\n\t\t\t$storageId = md5($storageId);\n\t\t}\n\t\t$sql = 'DELETE FROM `*PREFIX*storages` WHERE `id` = ?';\n\t\t\\OC_DB::executeAudited($sql, array($storageId));\n\n\t\t$sql = 'DELETE FROM `*PREFIX*filecache` WHERE `storage` = ?';\n\t\t\\OC_DB::executeAudited($sql, array($numericId));\n\t}", "title": "" }, { "docid": "5d67ccf5357bc568ae73bc2554b4fcb3", "score": "0.60279834", "text": "function destroying_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\DestroyingResource::class, $resource, $user);\n }", "title": "" }, { "docid": "98d22295493f0020f84c312075af1ad7", "score": "0.60123336", "text": "function deleting_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\DeletingResource::class, $resource, $user);\n }", "title": "" }, { "docid": "a7e206f667720084df5493157a69cfb1", "score": "0.59848213", "text": "static private function _delResCache($resource)\n {\n $hash = self::getHashByResource($resource);\n foreach (self::$res as &$items) {\n if (!empty($items[$hash])) {\n unset($items[$hash]);\n }\n } \n }", "title": "" }, { "docid": "896e95e8d1abd4f6c5eecd1940391bef", "score": "0.5978198", "text": "public function unlinkStorage(): self\n {\n unlink($this->path);\n\n return $this;\n }", "title": "" }, { "docid": "46e2a3c32c6b5a596ae0cf2bf703c970", "score": "0.5958219", "text": "public function destroy($id)\n {\n $get=Document::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('listDocument');\n }", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "970f51bb911499288a1748bfe0157efa", "score": "0.5912158", "text": "public function delete($id) {\n $this->connectStorage($id);\n $this->storage->delete();\n }", "title": "" }, { "docid": "f1553c7757cc3676299373a5d3a835f9", "score": "0.5907517", "text": "public function destroy($id)\n {\n $uniforme = Uniforme::find();\n Storage::delete('file.jpg');\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": "47945b59946db62fc806604498e46323", "score": "0.58641815", "text": "public function remove(FileInterface $file): FileInterface;", "title": "" }, { "docid": "d3158d405d4b489191764d14126b6336", "score": "0.5857253", "text": "public function destroy($id)\n {\n $trigger = Resource::where('id', $id)->first();\n $file = $trigger->file;\n if (!empty($file)) {\n $upFile = new UploadFile();\n $upFile->deleteCurrentFile($file, 'resource');\n }\n $trigger->delete();\n return back();\n }", "title": "" }, { "docid": "ce513fb382cd88ef0817a244ce395271", "score": "0.5824645", "text": "public function destroy($id)\n {\n $image= Image::find($id); \n $name = $image->name;\n $file = '/images/'.$name;\n $thumbnail = '/uploads/thumbnail/'.$name;\n Storage::delete([$file, $thumbnail]); // delete from folder $image->delete(); // delete from table return redirect()->back(); \n }", "title": "" }, { "docid": "b6078f9d34f26c367a9797120d6006ab", "score": "0.5818996", "text": "public function resourceHasBeenDeleted();", "title": "" }, { "docid": "c8394dead7326b95b49dd4f6c575a34a", "score": "0.58155316", "text": "public function destroy($resource, $id)\n {\n $model = $this->model->find($id);\n $model->delete();\n Cache::flush();\n $fields = $this->getModelAttributes();\n return redirect()->route('admin.resource', [\n 'resource' => $this->modelName,\n ]);\n }", "title": "" }, { "docid": "633ae266a2f875f0726e79f6358f15aa", "score": "0.58142436", "text": "public function remove(string $key) {\n $this->storage->remove($key);\n }", "title": "" }, { "docid": "915ec80e489f9eed2bde0417b2f10a19", "score": "0.580295", "text": "public function testResourceRemoveOne()\n {\n $resourceArea = new Zend_Acl_Resource('area');\n $this->_acl->addResource($resourceArea)\n ->remove($resourceArea);\n $this->assertFalse($this->_acl->has($resourceArea));\n }", "title": "" }, { "docid": "f35aaf17008b130a60b3962b50777f92", "score": "0.5800284", "text": "public function unlink();", "title": "" }, { "docid": "b4ee6dc4b9942eba341457d6bf4d5638", "score": "0.5796796", "text": "public function removeFromStore()\n {\n if ($this->getHash() && $this->getType()) {\n $this->getFileStore()->delete($this->getHash(), $this->getType());\n } else {\n throw new SwompException(\"Cannot remove from Store - Hash and Type is required\");\n }\n }", "title": "" }, { "docid": "b48e565472dafa6e553cf8aee6f42a6a", "score": "0.578793", "text": "public function destroy($id)\n {\n $product = Pruduct::where('id', $id)->first();\n unlink('storage/' . $product->image);\n\n $product->delete();\n Session::flash('messege', 'Data berhasil di hapus.');\n return redirect()->back();\n }", "title": "" }, { "docid": "532f8d58b20e101c1f5035990ba18e7e", "score": "0.57871205", "text": "public function cleanStorage();", "title": "" }, { "docid": "5760f6df7c6ebd5440da74e84ef8e734", "score": "0.57779175", "text": "public function remove($identifier);", "title": "" }, { "docid": "5760f6df7c6ebd5440da74e84ef8e734", "score": "0.57779175", "text": "public function remove($identifier);", "title": "" }, { "docid": "0009889a5268b3415309c6899e972909", "score": "0.57663226", "text": "public function delete()\r\n {\r\n $path = $this->path;\r\n parent::delete();\r\n\r\n // Delete file if exists\r\n if($this->id && file_exists($path))\r\n {\r\n unlink($path);\r\n }\r\n\r\n }", "title": "" }, { "docid": "62c6b6bfe5aeaa08992c1c1ff2c5e9ec", "score": "0.5732295", "text": "public function destroy($id)\n {\n $obj = Obj::where('id',$id)->first();\n $this->authorize('update', $obj);\n\n // remove file\n if(Storage::disk('public')->exists($obj->image))\n Storage::disk('public')->delete($obj->image);\n \n $obj->delete();\n\n flash('('.$this->app.'/'.$this->module.') item Successfully deleted!')->success();\n return redirect()->route($this->module.'.index');\n }", "title": "" }, { "docid": "b6294af388de3ae8b010bbdd0e147a65", "score": "0.57102996", "text": "function destroyed_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\DestroyedResource::class, $resource, $user);\n }", "title": "" }, { "docid": "a1d82443b72d201e5ede999d05bf59f5", "score": "0.57096094", "text": "public function unsetStorageId()\r\n\t{\r\n\t\tunset($this->_storage_id);\r\n\t}", "title": "" }, { "docid": "9591ec5177ac179477cbd3c3ccaa275a", "score": "0.5706215", "text": "public function destroy($id)\n {\n $file = FileTask::findOrFail($id);\n Storage::delete($file->path); //delete from disk\n $file->delete(); //delete from db\n flash('File was removed!');\n return back();\n }", "title": "" }, { "docid": "cf195d4a522e74edc7019e572a06923c", "score": "0.5694188", "text": "public function destroy($id)\n {\n $storage = Storage::findOrFail($id);\n $storage->delete();\n return response()->json(['status' => 'success']);\n }", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "fe53bca8d325675dd4f80c6d519ce470", "score": "0.5679682", "text": "public function destroy($id)\n {\n \n $delete = Product::find($id);\n $image_path ='public/image/'. $delete->photo;\n unlink( $image_path);\n $delete->delete();\n return redirect()->back();\n }", "title": "" }, { "docid": "8bbd28cf62ed375a2f7518342e1d75ae", "score": "0.56680655", "text": "public function removeFile();", "title": "" }, { "docid": "a81365633fd5b106741f1068f03a568a", "score": "0.5654999", "text": "public function remove(object $entity): void;", "title": "" }, { "docid": "c1ecca5c35e22313e1c38b1ddca48883", "score": "0.56521606", "text": "public function destroy(FILE $file)\n {\n \n\n $url = str_replace('storage', 'public', $file->url);\n Storage::delete($url);\n\n\n $file->delete();\n\n return redirect()->route('admin.files.index')->with('eliminar', 'ok');\n }", "title": "" }, { "docid": "ac44db6cd2e11be0502437646b98bec0", "score": "0.56515306", "text": "public function untagResource($payload, $headers=[]) {\n $method = 'DELETE';\n $path = sprintf('/%s/tag', $this->apiVersion);\n $headers = $this->buildCommonHeaders($method, $path, $headers);\n $content = json_encode($payload);\n $headers['content-length'] = strlen($content);\n return $this->doRequest($method, $path, $headers, $data = $content);\n }", "title": "" }, { "docid": "3c36d7803d6dcac2a74d7850bf05b529", "score": "0.56461364", "text": "function deleteResource($model)\n {\n }", "title": "" }, { "docid": "198fe5623de140ddb980a64f1228ee9c", "score": "0.5643258", "text": "public function shutdownObject()\n {\n /** @var PersistentResource $resource */\n foreach ($this->resourceRepository->getAddedResources() as $resource) {\n if ($this->persistenceManager->isNewObject($resource)) {\n $this->deleteResource($resource, false);\n }\n }\n }", "title": "" }, { "docid": "6a133bf2a539adcebeeef545cb23bdf7", "score": "0.56398225", "text": "public function removeEntity($entity);", "title": "" }, { "docid": "ddb7a7e1bd529da0193a6825c4588bde", "score": "0.5632143", "text": "function deleted_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\DeletedResource::class, $resource, $user);\n }", "title": "" }, { "docid": "cfb60ffcc989888bf5132bd8f18d28f3", "score": "0.563189", "text": "public function destroy(string $storageKey): bool;", "title": "" }, { "docid": "227d7db0fe495cc1b0734cf71cbc6374", "score": "0.5627202", "text": "public function destroy($id)\n {\n try {\n $resource = Resource::findOrFail($id);\n auth()->user()->resources()->detach($id);\n } catch (\\Throwable $e) {\n throw abort(404);\n }\n\n return redirect()->back()\n ->with([\n 'status' => 'success-destroy-saved',\n 'message' => $resource->getMedia()[0]->file_name . ' was unsaved successfully!',\n 'resource_id' => $id\n ]);\n }", "title": "" }, { "docid": "b2deedc135e4e9a6d691a34bc62901e4", "score": "0.5602831", "text": "public function delete(): void\n {\n if ($this->exists()) {\n File::delete($this->path());\n }\n }", "title": "" }, { "docid": "29d3e4879d0ed5074f12cb963276b7cc", "score": "0.56021434", "text": "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "title": "" }, { "docid": "2551dae05d41b0f050dbd034df4e2093", "score": "0.5595374", "text": "public function remove()\n {\n $res = unlink($this->_path);\n return $res;\n }", "title": "" }, { "docid": "2dfd4b7a5b42f50b0f3186c2425fc4a3", "score": "0.55950236", "text": "public abstract function deleteAsset(Asset $asset);", "title": "" }, { "docid": "4a8532446eb5a624448dac28b0ab0abe", "score": "0.55868185", "text": "public function remove_to_cart($resource_id){\n\n $cart = Session::get('cart');\n\n $index = array_search($resource_id, $cart);\n if($index >= 0) {\n array_splice($cart, $index, 1);\n\n }\n\n Session::put('cart',$cart);\n\n return redirect('/cart');\n }", "title": "" }, { "docid": "4a8532446eb5a624448dac28b0ab0abe", "score": "0.55868185", "text": "public function remove_to_cart($resource_id){\n\n $cart = Session::get('cart');\n\n $index = array_search($resource_id, $cart);\n if($index >= 0) {\n array_splice($cart, $index, 1);\n\n }\n\n Session::put('cart',$cart);\n\n return redirect('/cart');\n }", "title": "" }, { "docid": "eb676b82c99dc848aabda71793e9f00a", "score": "0.55856013", "text": "public function destroy()\n {\n $filepath = $this->getFilepath();\n @unlink($filepath);\n }", "title": "" }, { "docid": "0f5a2d5d4ccb6690f2c9b7c1ad81379c", "score": "0.55815697", "text": "public function delete() {\n\t\treturn unlink($this->path);\n\t}", "title": "" }, { "docid": "abcaf8d103f03089c84f7aa510afb02a", "score": "0.5578945", "text": "public function delete()\n {\n if (null !== $this->repository) {\n $this->repository->close();\n }\n\n $this->file->delete($this->filePath);\n $this->filePath = '';\n }", "title": "" }, { "docid": "6955ff701e4315c5cfa7e2767eafdbcf", "score": "0.55788815", "text": "public function clear($in_storage_too = true);", "title": "" }, { "docid": "f576b22c84d78e83b91d5036361a095c", "score": "0.55780953", "text": "public function delete($filename = null);", "title": "" }, { "docid": "0d6640f36c0ca88fbe56977a74dad5f1", "score": "0.55737436", "text": "public function remove(MediaInterface $media);", "title": "" }, { "docid": "930240c93dd67bc31042064adb044402", "score": "0.55683106", "text": "public function destroy($id) {\n $data = Product::findOrFail($id);\n @unlink(storage_path('app/public/product/' . $data->product_image));\n $data->delete();\n return redirect('product')->with('success', 'Product is successfully deleted');\n }", "title": "" }, { "docid": "f7e801c4eebb9a1d03e7feec4ecd5f21", "score": "0.5567041", "text": "public function destroy($id)\n {\n $realestate = Realestate::findOrfail($id);\n if( count($realestate->files) > 0 )\n {\n if(Storage::disk('public')->exists($realestate->files[0]->path))\n Storage::disk('public')->delete($realestate->files[0]->path);\n\n $realestate->files()->delete();\n }\n\n $realestate->delete();\n\n\n return redirect()->route('realestate_index');\n\n }", "title": "" }, { "docid": "f392b1ed7db16f604f843adb672ef950", "score": "0.55653834", "text": "public function destroy($id)\n {\n $slide = Slide::find($id);\n if(Storage::delete('public/slides/'.$slide->slides)){\n $slide->delete();\n return redirect('Viewall/All_slide')->with('error','Slide deleted');\n }\n}", "title": "" }, { "docid": "0a10bad03f5df8b55f39176b0c613baa", "score": "0.55647546", "text": "public function remove(string $path)\n {\n $this->set($path, null);\n }", "title": "" }, { "docid": "adc4e9de22fd8f0d6314e35dcee0b8e0", "score": "0.5563022", "text": "public function remove(string $object): void;", "title": "" }, { "docid": "37d5927bb51b78bdcea795a632988120", "score": "0.55617017", "text": "public function removeTransactionResource($hash)\n\t{\n\t\t$path = $this->getTransactionResourcePath($hash);\n\t\treturn $this->deleteTransactionResource($path);\n\t}", "title": "" }, { "docid": "61d679086bf634ff55d0bc8a41a70710", "score": "0.5561249", "text": "public function destroy($id)\n {\n $user =DB::table('users')->where('id',$id)->first();\n $photo = $user->photo;\n \n unlink($photo);\n DB::table('users')->where('id',$id)->delete();\n \n }", "title": "" }, { "docid": "40424bbe7e79c788acc8e40fa96c2e17", "score": "0.5556214", "text": "public function destroy($id)\n {\n \n $product = Product::findOrFail($id);\n\n if($product->delete()) {\n\n return new ProductResource($product);\n }\n }", "title": "" }, { "docid": "b877c987e8cb3298dc4c9f11662792f9", "score": "0.55559146", "text": "public function destroy($id)\n {\n $path = File::findOrFail($id)->path; \n //esto me va a borrar del storage el archivo que le diga. De todas formas el find or fail me tiene que traer la dirreccion\n Storage::delete( $path ); \n\t\tFile::findOrFail($id)->delete(); \n\t\treturn redirect('/home');\n }", "title": "" }, { "docid": "09d16b97894d6829ff484d20cf378f8f", "score": "0.555526", "text": "public function destroy(Request $request, $id){\n $file = File::whereCodeName($id)->firstOrFail();\n //unlink elimina el archivo de la aplicacion\n unlink(public_path('storage/'. Auth::id() .'/' . $file->code_name));\n\n //eliminar de base de datos\n $file->delete();\n\n //avisar que se ha borrado archivo al usuario\n Alert::info('¡Ateción!', 'Se ha eliminado el archivo');\n return back();\n }", "title": "" }, { "docid": "19530e0d90a5511cefec030646832ac7", "score": "0.55509293", "text": "function deleteResource($id)\n\t{\n\t if(empty($id)) \n throw new App_Db_Exception_Table('Resource ID is not specified');\n\t\t\n\t\t$this->db_delete($this->_table, array('id'=>$id));\n\t}", "title": "" }, { "docid": "3fa04699fe14eb03c48cfde3470db201", "score": "0.55502915", "text": "public function destroy($id)\n {\n $file = Upload::findOrFail($id);\n if(File::exists(public_path($file->filename))){\n unlink(public_path($file->filename));\n File::delete(public_path($file->filename));\n }\n $file->delete();\n return redirect()->back()->with('success','Deleted Successfully');\n //\n }", "title": "" }, { "docid": "94b6f2ef01c97218c0ea77ca980a8947", "score": "0.55452746", "text": "public function wipeStorage(): void\n {\n $this->storageAdapter->wipeStorage();\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": "51ecf73cbf0ed20291ef32754f32287e", "score": "0.55377126", "text": "public function destroy($id)\n {\n $site_image = DB::table('site_images')->where('id',$id)->first();\n $image=$site_image->image_name;\n unlink($image);\n DB::table('site_images')->where('id',$id)->delete();\n\n redirect()->back()->with('success', 'site image removed successfully');\n }", "title": "" }, { "docid": "30d0b23b0b35054a9dcfaf9fdc529aa5", "score": "0.5532588", "text": "public function destroy($id)\n {\n\n $p = Product::where('id' , $id)->first();\n if(File::exists($p->image)){\n File::delete($p->image);\n }\n $p->delete();\n return redirect()->back();\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": "" }, { "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": "" } ]
37b8f2af170b6919669a03800a0f8439
Update a existing resource in storage.
[ { "docid": "e7e978ff8ed869c922962dafc3d8a67b", "score": "0.0", "text": "public function update(Update $request)\n {\n $category = Category::find($request->CategoryID);\n $category->fill($request->input());\n\n if ($request->hasFile('ImageName')) {\n $imagePath = $request->file('ImageName');\n $imageName = date(\"Y-m-d-H-i-s\") . '-' . $imagePath ->getClientOriginalName();\n $imagePath->move(config('global.category_image_move_path'), $imageName);\n $category->ImagePath = config('global.category_path');\n $category->ImageName= $imageName;\n }\n\n if ($category->save()) {\n\n session()->flash('app_message', 'Category successfully updated');\n return redirect()->route('dashboard.categories');\n } else {\n session()->flash('app_error', 'Something is wrong while updating Category');\n }\n return redirect()->back();\n }", "title": "" } ]
[ { "docid": "ae90a700efd6cf3cd7c51c1c4442503a", "score": "0.7600493", "text": "public function update(ResourceInterface $resource);", "title": "" }, { "docid": "33eafa1267660ce479c92ad656dea136", "score": "0.7456953", "text": "function updateResource(){\n\t\t$resource = $this->getResource()->update();\n\t}", "title": "" }, { "docid": "b66d45ed275220a344f3f222ce4980b5", "score": "0.6926503", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "79163632c1ee775bbfdb37df0ed49f7a", "score": "0.69160134", "text": "public function update($resource, $entity, $id);", "title": "" }, { "docid": "3edf989e06553ae1b0e42f6e1554b8cc", "score": "0.6794902", "text": "public function update(Request $request, resource $resource)\n {\n //\n }", "title": "" }, { "docid": "abd2d9691e5bed830d5a50ddc78e9666", "score": "0.66862434", "text": "protected function updateResource(): void\n {\n /* Set the controller resource name. */\n $this->name = $this->getName();\n\n /* Get the ability map */\n $map = $this->resourceAbilityMap();\n\n /* Store the resource permissions on DB */\n $this->registerPermissions($map);\n\n /* Store the resource module on DB */\n $this->updateModule($this->name, $map);\n\n $this->updateSettings();\n }", "title": "" }, { "docid": "2941dd64817aec2862ad3945616aabfa", "score": "0.6592241", "text": "public function update(ResourcesRequest $request, Resource $resource) {\n $request->validated();\n $resource->fill($request->all())->save();\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated!');\n }", "title": "" }, { "docid": "872fee47b4f9bc0a0da99279df7e8203", "score": "0.658443", "text": "protected function update($resource){\n $entity = $this->dataService->update($resource);\n\n return $entity;\n }", "title": "" }, { "docid": "988b9db60f871096839ee3c5b440e154", "score": "0.65028733", "text": "public function update(Request $request, Resource $resource)\n {\n $this->allowedAdminAction();\n \n $rules=[\n 'name' =>'string|min:2',\n 'description' =>'string|min:2', \n 'type' =>'string|min:2',\n ];\n $this->validate($request,$rules);\n if($request->has('name')){\n $resource->name=$request->name;\n }\n if($request->has('description')){\n $resource->description=$request->description;\n }\n if($request->has('type')){\n $resource->type=$request->type;\n }\n if(!$resource->isDirty()){\n return $this->errorResponse('Se debe especificar al menos un valor diferente para actualizar',422);\n }\n $resource->save();\n return $this->showOne($resource);\n }", "title": "" }, { "docid": "8ef8bfa47ef7d30297a02f132b09c19c", "score": "0.6491065", "text": "public function put(ApiResource $resource);", "title": "" }, { "docid": "0a8ff6c637e4445b87c5b9716fa41192", "score": "0.6466905", "text": "public function update(SpecificateRequest $request, $id)\n {\n //\n $storage = Storage::findOrFail($id);\n $storage->update([\n 'storage' => $request->storage,\n ]);\n $storage->save();\n return redirect()->route('admin.specificate.storage.show', $storage->id);\n }", "title": "" }, { "docid": "645a8e4f0c0ac4fe3a6cff897cedd569", "score": "0.6272607", "text": "public function update(ResourceTypeInterface $resourceType);", "title": "" }, { "docid": "f9c2b1bc5036ac76b3ea95ba3fbc61e8", "score": "0.62247497", "text": "public function update(Request $request, $id)\n {\n //更新操作\n $result = Storage::find($id);\n $result->storage_name = $request->storage_name;\n $result->storage_code = $request->storage_code;\n $result->storage_address = $request->storage_address;\n $result->show = $request->show;\n return $result->save()?'0':'1';\n }", "title": "" }, { "docid": "b7efc8833e2707d2c41ccbb075ab62b4", "score": "0.62210166", "text": "public function updateExisting();", "title": "" }, { "docid": "97b6e3224737bc7e7e679cae8ecba355", "score": "0.6141494", "text": "private function update()\n {\n $this->save();\n $this->load();\n }", "title": "" }, { "docid": "0cfc587ef3ef12b2896188cd18843c4e", "score": "0.61306155", "text": "public function update(Request $request)\n {\n $item = $this->storageRepository->find($request->id);\n if (empty($item)) {\n\n return response(null, 404);\n }\n $data = $request->all();\n $result = $item->fill($data)->save();\n\n //todo: подумать над кодом ошибки\n //Что должно вовзращать при ошибке сохранения\n if (!$result) {\n return response(null, 404);\n }\n else return response(null, 200);\n }", "title": "" }, { "docid": "cbcff9a7ae5b1d786f46919932ecccc1", "score": "0.61253846", "text": "public function update(ResourceRequest $request, Resource $resource)\n {\n $resource->update($request->validated());\n $resource = new ResourceResource($resource);\n return $this->success('Resource Updated Successfully.', $resource);\n }", "title": "" }, { "docid": "d69db4f2a0dc00982a1f889bd5e3e833", "score": "0.60455453", "text": "public function update($id)\n\t{\n\t\t$input = Input::all();\n\t\t$input['ip_address'] = Request::getClientIp();\n $validation = Validator::make($input, Resources::$rules);\n if ($validation->passes())\n {\n $resource = Resources::find($id);\n $resource->update($input);\n return Redirect::route('secureadmin.resources.index');\n }\n\t\treturn Redirect::route('secureadmin.resources.edit', $id)\n ->withInput()\n ->withErrors($validation)\n ->with('message', 'There were validation errors.');\n\t}", "title": "" }, { "docid": "b547e1879af26ac25f46448832af936b", "score": "0.5979802", "text": "public function update_put()\n {\n $id = $this->get('id');\n \n $response = [\n 'status' => FALSE,\n 'message' => 'Invalid ID Found!',\n 'id' => $id,\n ];\n \n // Validate the id.\n if (! ctype_digit($id)) {\n // Invalid id, set the response and exit.\n $this->response($response, parent::HTTP_BAD_REQUEST);\n }\n\n $product = $this->_validate($this->put(), $err, TRUE);\n if (empty($product)) {\n // Invalid data, set the response and exit.\n $response['message'] = $err;\n $this->response($response, parent::HTTP_BAD_REQUEST);\n }\n\n $n = $this->product_model->update($product, $id);\n if ($n && ES_ENABLE) {\n $product = $this->product_model->get_product($id);\n $this->elasticsearch->add($this->es_type, $id, [$product]);\n }\n \n $response = [\n 'status' => $n,\n 'message' => $n ? 'Updated Successfully' : 'Product not found!',\n 'id' => $id,\n ];\n\n $this->set_response($response, parent::HTTP_ACCEPTED);\n }", "title": "" }, { "docid": "d6f7ceba30cd1fa1f963d331a704f50e", "score": "0.5973868", "text": "public function update(PostRequest $request, Storage $storage, Post $post)\n {\n // Update data\n $post->update($request->validated());\n\n // Process Image then add to post\n $this->saveFeaturedImage($request, $storage, $post);\n\n return new PostResource($post->load('owner'));\n }", "title": "" }, { "docid": "9f97386359fae88a2b45d3b14d379734", "score": "0.5943679", "text": "public function update($id, Request $request)\n {\n\n //VALIDATE FIELDS\n $validator = Validator::make(request()->all(),\n [\n 'title' => 'required|max:255',\n 'slug' => 'required|max:255',\n 'status' => 'required',\n ]);\n\n //IF INVALID\n if($validator->fails()){ \n return $this->respondInvalid('Error with validation.', $validator->errors());\n }\n\n //IF VALID\n else { \n\n try {\n //Update \n $data = [\n 'title' => request('title'),\n 'slug' => str_slug(request('slug')), \n 'body' => request('body'),\n 'header_img' => request('header_img'),\n 'status' => request('status'),\n 'user_id' => request('user_id'),\n ];\n\n $resource = Resource::find($id);\n $tags = json_decode(request('tags'));\n\n //If new tags then create and add for sync\n foreach($tags as $tagK => $tagV){\n if(!is_int($tags[$tagK])){\n if($tag = Tag::create([\n 'title' => $tagV,\n 'slug' => str_slug($tagV),\n ]))\n {\n $tag->resources()->sync($id);\n unset($tags[$tagK]);\n\n $tags[] = $tag->id;\n }\n }\n }\n\n if($resource->update($data) && $resource->tags()->sync($tags) && $resource->quote()->update(['message' => request('quote')])) \n {\n return $this->respondSuccess('Successful edit.');\n }\n\n }\n catch(\\Illuminate\\Database\\QueryException $e){\n $errorCode = $e->errorInfo[1];\n\n switch ($errorCode) {\n //1062 == Duplicate entry for unique MySQL\n case 1062: \n return $this->respondDuplicate('Duplicate Entry.', ['error'=>'This entry already exists.', 'message'=> $e]); \n break;\n default:\n return $this->respondInvalid('Invalid.', ['error'=> $errorCode, 'message'=>$e]); \n break;\n }\n }\n }\n }", "title": "" }, { "docid": "58af7069ccd84811f59fa519443b29b7", "score": "0.59428704", "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 $precioInput = $request-> input('precio');\n $resource['id'] = $idInput;\n $resource['name'] = $nameInput;\n $resource['precio'] = $precioInput;\n if(isset($resources[$idInput]) && $id != $idInput) {\n return back()->withInput();\n } \n unset($resources[$id]);\n $resources[$idInput] = $resource;\n \n $request->session()->put('resources', $resources);\n return redirect('resource');\n }\n }\n return back()->withInput();\n }", "title": "" }, { "docid": "6822b36ec42f6f57430782d13125b59a", "score": "0.58990085", "text": "function update_resource($data, $id)\n\t{\n\t\t# Update the record \n\t\t$this -> db -> where('id', $id);\n\t\t$query = $this -> db -> update('gh_resource', $data);\n\t\treturn $query;\t\t\n\t}", "title": "" }, { "docid": "2cc3cab36436f9f12f05025ca511d3b4", "score": "0.5860932", "text": "public function updateResource(\n Resource\\ResourceType $resourceType,\n Resource\\ResourceData $resourceData\n );", "title": "" }, { "docid": "b23963f9ffa0d4dd76bb7372985b4dcd", "score": "0.5854864", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $response = $product->update([\n 'name' => $request->name,\n 'price' => $request->price,\n 'quantity' => $request->quantity,\n ]);\n\n if ($response && $request->file('avatar')) {\n if ($product->avatar && \\Storage::disk('local')->exists($product->avatar)) {\n \\Storage::delete($product->avatar);\n }\n $product->update([\n 'avatar' => $request->file('avatar')->store('public/avatar'),\n ]);\n }\n return redirect('product');\n }", "title": "" }, { "docid": "7f72d6356b07bb9a7b5f966d552003cb", "score": "0.58247787", "text": "public function update(Request $request, Product $product)\n {\n $product->product_name = $request->product_name;\n $product->category_id = $request->category_id;\n $product->subcategory_id = $request->subcategory_id;\n $product->price = $request->price;\n $product->description = $request->description;\n if($request->hasFile('image')){\n $product->image = $this->uploadImage($request);\n }\n $product->status = $request->status;\n $product->save();\n\n return new ProductResource($product);\n }", "title": "" }, { "docid": "320ba9944f4c2ee76e642401a7fc9dca", "score": "0.5811305", "text": "public function update(Request $request, $id)\n {\n $path=\"\";\n $slide=Slide::where('id',$id)->first();\n if($request->hasFile('image')){\n $path=$request->old_image;\n if($path!=null&&file_exists(\"/storage/$path\")){\n unlink(\"storage/\".$path);\n }$path=$request->file('image')->store('Slides');\n }else{\n $path=$request->old_image;\n }\n \n \n $slide->image=$path;\n $slide->save();\n return redirect()->route('listSlide');\n }", "title": "" }, { "docid": "f9f7b2aeec9eec47f3fa1be7250f25ee", "score": "0.57712704", "text": "public function update(Request $request, Product $product)\n {\n $this->validate(\n $request,\n [\n 'image' => 'required|image|mimes:jpeg,png,jpg,gif|max:3000',\n 'product_name' => 'required',\n 'unit_price' => 'required',\n 'quantity' => 'required',\n 'store' => 'required',\n\n ]\n );\n $image_name = time() . '_' . $request->store . '.' . $request->image->extension();\n\n $path = $request->file('image')->storeAs('images/prod_images', $image_name, 'public');\n $filePath = '/storage/'. $path;\n\n $product->update([\n 'image'=> $filePath ,\n 'product_name' => $request->input('product_name'),\n 'unit_price' => $request->input('unit_price'),\n 'quantity' => $request->input('quantity'),\n 'store' => $request->input('store'),\n 'category_id' => $request->input('category_id'),\n ]);\n\n return new ProductResource($product);\n }", "title": "" }, { "docid": "a53529e9cb9a8139e2baa6d25d9036a1", "score": "0.57666075", "text": "public function update_resources(Request $request, $id)\n {\n $gallery = Gallery::find($id);\n $gallery->fill($request->all());\n $gallery->save();\n $gallery->resources()->sync($request->resources);\n return redirect()->route('gallery.index');\n }", "title": "" }, { "docid": "0fe165fb2ee0e358e23629542836c73f", "score": "0.5756863", "text": "public function update(ElementSLAStoreRequest $request, $id)\n {\n \n$ElementSLA=ElementSLA::get()->where('id',$id)->first();\n if($ElementSLA->update($request->toArray())) {\n return new ElementSLAResource($ElementSLA);\n }\n }", "title": "" }, { "docid": "223e71d8a07c8027ab5aeccbe0abe839", "score": "0.57539845", "text": "public function update(Request $request, $id)\n {\n\n try {\n // dd($request->all());\n $asset_name = Str::uuid() . '.' . $request->file('file_path')->getClientOriginalExtension();\n $user_provider_release = Release::where('id', $id)->first();\n\n if (Storage::disk('s3')->exists($user_provider_release->file)) {\n Storage::disk('s3')->delete($user_provider_release->file);\n }\n\n $user_provider_release->update([\n 'releases_name' => $request->input('releases_name'),\n 'file' => $request->file('file_path')->storeAs(\n $asset_name, #$fileName\n ['disk' => 's3']#$options\n ),\n // 'file' => Storage::disk('s3')->put($user_provider->provider_key . '/' . $asset_name, $request->file('file_path')),\n 'file_size' => $request->input('file_size'),\n ]);\n\n return $this->sendResponse($user_provider_release, trans('actions.created.success'));\n } catch (ValidationException $ex) {\n return $this->sendError([], $ex->getMessage());\n } catch (Exception $ex) {\n return $this->sendError([], $ex->getMessage());\n }\n }", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.5745032", "text": "public function update($entity);", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.57321924", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "e3ae1f82414c2fe1454cbdd2580b9252", "score": "0.5731315", "text": "public function update(Request $request, $id)\n {\n // Get user from $request token.\n // if (! $user = auth()->setRequest($request)->user()) {\n // return $this->responseUnauthorized();\n // }\n\n // Admin can only update data.\n if (auth()->user()->role !== 'admin') {\n return $this->responseUnauthorized();\n }\n\n // Validates data.\n $validator = Validator::make($request->all(), [\n 'name' => 'required'\n ]);\n\n if ($validator->fails()) {\n return $this->responseUnprocessable($validator->errors());\n }\n\n try {\n $product = Product::where('id', $id)->firstOrFail();\n if (request('name')) {\n $product->name = request('name');\n }\n $product->save();\n return $this->responseResourceUpdated();\n } catch (\\Exception $e) {\n return $this->responseServerError('Error updating resource.');\n }\n }", "title": "" }, { "docid": "06f480d5aa69c73bbcf80fa0d7349713", "score": "0.5724166", "text": "public function updateStream($path, $resource, Config $config)\n\t{\n\t\t$this->delete($path);\n\t\treturn $this->writeStream($path, $resource, $config);\n\t}", "title": "" }, { "docid": "5e431cdf1131b2e7c8ab67c921705238", "score": "0.57149667", "text": "public function update(Request $request, $id)\n {\n $supplier=Supplier::find($id);\n $supplier->update($request->all());\n return new SupplierResource($supplier);\n }", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.57049", "text": "public function update($data);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.57049", "text": "public function update($data);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.57049", "text": "public function update($data);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.57049", "text": "public function update($data);", "title": "" }, { "docid": "3aa47d8c9b4df83e69488b6ab5f458e6", "score": "0.5702691", "text": "public function update(Request $request, $id)\n {\n $validateData = $request->validate([\n 'name' => 'required|string',\n 'email' => 'required|unique:suppliers,email,'.$id,\n 'phone' => 'required',\n 'address' => 'required',\n 'shopname' => 'required',\n ]);\n\n if ($request->newphoto){\n $position = strpos($request->newphoto, ';');\n $sub = substr($request->newphoto, 0, $position);\n $extension = explode('/', $sub)[1];\n $photoName = time().'.'.$extension;\n $location = 'backend/Supplier/';\n $newPhoto = $location.$photoName;\n\n Image::make($request->newphoto)->resize(300, 240)->save(public_path($newPhoto));\n\n $supplier = Supplier::find($id);\n $oldPhoto = $supplier->photo;\n\n if ($oldPhoto){\n\n unlink(public_path($oldPhoto));\n\n $supplier->name = $request->name;\n $supplier->email = $request->email;\n $supplier->phone = $request->phone;\n $supplier->address = $request->address;\n $supplier->shopname = $request->shopname;\n $supplier->photo = $newPhoto;\n $supplier->save();\n\n return Response::json('Supplier Updated Successfully');\n\n }else{\n\n $supplier->name = $request->name;\n $supplier->email = $request->email;\n $supplier->phone = $request->phone;\n $supplier->address = $request->address;\n $supplier->shopname = $request->shopname;\n $supplier->photo = $newPhoto;\n $supplier->save();\n\n return Response::json('Supplier Updated Successfully');\n\n }\n\n\n }else{\n\n $supplier = Supplier::find($id);\n $oldPhoto = $supplier->photo;\n\n $supplier->name = $request->name;\n $supplier->email = $request->email;\n $supplier->phone = $request->phone;\n $supplier->address = $request->address;\n $supplier->shopname = $request->shopname;\n $supplier->photo = $oldPhoto;\n $supplier->save();\n\n return Response::json('Supplier Updated Successfully');\n\n }\n\n }", "title": "" }, { "docid": "7fb849d8b455c566201a86dfb43be07f", "score": "0.5700053", "text": "public function updateStream ($path, $resource, Config $config)\n {\n return $this->upload ($path, $resource, true);\n }", "title": "" }, { "docid": "379ccf05ba613aad88534619cf8d15fd", "score": "0.5695731", "text": "public function update(ThumbRequest $request, $id)\n {\n // $data = $request->all();\n // $data['thumb'] = $request->file('thumb')->store(\n // 'assets/thumb',\n // 'public'\n // );\n\n // $item = Thumb::findOrFail($id);\n // $item->update($data);\n\n // return redirect()->route('thumb.index');\n }", "title": "" }, { "docid": "c69feb2ecc7f5393f2375122a9d3041c", "score": "0.5691263", "text": "protected function updateInformation()\n {\n parent::updateInformation();\n $this->_updateResource();\n }", "title": "" }, { "docid": "b7bac3ceb1b9b8584ebd61b08fa09788", "score": "0.5667168", "text": "public function putAction()\n {\n /** XXX **/\n\n $this->view->message = sprintf('Resource #%s Updated', $id);\n $this->_response->ok();\n }", "title": "" }, { "docid": "861587caf58c3f620dbafce99fe22615", "score": "0.5666898", "text": "public function update($id, $request);", "title": "" }, { "docid": "861587caf58c3f620dbafce99fe22615", "score": "0.5666898", "text": "public function update($id, $request);", "title": "" }, { "docid": "4c27f86a48a9e3de14bac6ad42c242c6", "score": "0.5663822", "text": "public function update(Request $request, $id)\n {\n $product = product::find($id);\n\n $imgName = $product->img_path;\n if ($request->img_path) {\n $imgName = $request->img_path->getClientOriginalName() . '-' . time();\n $request->img_path->move(public_path('image'), $imgName);\n }\n\n $product -> name = $request -> name;\n $product -> price = $request -> price;\n $product -> description = $request -> description;\n $product -> stock = $request -> stock;\n $product -> img_path = $imgName;\n\n $product -> save();\n\n return redirect('/product');\n }", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.56637347", "text": "public function update($id);", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.56637347", "text": "public function update($id);", "title": "" }, { "docid": "70bd037614d311211369ca22a9f666ad", "score": "0.5663691", "text": "public function update(Request $r, $id) {\n\t\t$data = $this->validate(request(),\n\t\t\t[\n\t\t\t\t'' => 'required',\n\t\t\t\t\n\t\t\t\t'logo' => 'sometimes|nullable|'.v_images(),\n\t\t\t], [], [\n\t\t\t\t'' => trans('admin.'),\n\t\t\t\t\n\t\t\t\t'logo' => trans('admin.logo'),\n\t\t\t]);\n\t\tif (request()->hasFile('logo')) {\n\t\t\t$data['logo'] = up()->upload([\n\t\t\t\t\t'file' => 'logo',\n\t\t\t\t\t'path' => 'countries',\n\t\t\t\t\t'upload_type' => 'single',\n\t\t\t\t\t'delete_file' => Country::find($id)->logo,\n\t\t\t\t]);\n\t\t}\n\t\tProduct::where('id', $id)->update($data);\n\t\tsession()->flash('success', trans('admin.record_updated'));\n\t\treturn redirect(aurl('products'));\n\t}", "title": "" }, { "docid": "773e44111ac6b9307c71a255a478a41a", "score": "0.5662378", "text": "public function update(Request $request, $id)\n {\n $product=Product::find($id);\n $validator = Validator::make($request->all(), [\n 'price'=>'required',\n 'discount'=>'required',\n 'description'=>'required',\n 'image_1'=>'required|image',\n 'color'=>'required',\n 'product_name'=>'required',\n 'quantity'=>'required',\n 'id_departmant'=>'required',\n ]);\n\n if ($validator->fails()) {\n return $this->sendError('Validate Error',$validator->errors());\n }\n\n $product->price= $request->input('price');\n $product->discount= $request->input('discount');\n $product->description= $request->input('description');\n $product->image_1=$request->file('image_1')->store('products');\n $product->color= $request->input('color');\n $product->product_name= $request->input('product_name');\n $product->quantity= $request->input('quantity');\n $product->id_departmant= $request->input('id_departmant');\n\n $product->save();\n return $this->sendResponse(new ProductResources($product), 'Product updated Successfully!');\n\n }", "title": "" }, { "docid": "08d68444721a437dc3de2117d3a1e2e7", "score": "0.5659919", "text": "public function update(Request $request, $id)\n {\n DB::beginTransaction();\n try{\n $product = Product::findOrFail($id);\n $data = $request->all();\n if (!empty($data['image'])) {\n $this->unlink($product->image);\n $image_name = $this->uploadImage($data['image'], $request->title);\n $data['image_url'] = asset('products/' . $image_name);\n $data['image'] = $image_name;\n }\n $product->update($data);\n }catch (QueryException $e){\n DB::rollBack();\n return response()->json(['status'=>'error','message'=>$e->getMessage()]);\n }\n DB::commit();\n return response()->json(['status'=>'success','message'=>'Updated Successfully !']);\n }", "title": "" }, { "docid": "e892ca85154974bbdf6924de5bbfbb7e", "score": "0.56520325", "text": "public function updateById($id, $data);", "title": "" }, { "docid": "50a2469e575685d948691687a87b3018", "score": "0.56311697", "text": "public function updateStream($path, $resource, Config $config)\n {\n // Todo\n }", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.56302464", "text": "public function update($request, $id);", "title": "" }, { "docid": "92a495162690e82a01f773b8e7ed8f2b", "score": "0.56299585", "text": "public function update(Request $request, $id)\n {\n\n $products = Products::find($id);\n $products->product_name = $request->product_name;\n $products->product_description = $request->product_description;\n $products->amount=$request->amount;\n $products->phone_number=$request->phone_number;\n\n //resize photo\n if($request->hasFile('product_image')){\n $avatar = $request->file('product_image');\n $filename = time() . '.' . $avatar->getClientOriginalExtension();\n $size = getimagesize($avatar);\n if ($size[0]>1280 && $size[1]>720){\n Image::make($avatar)->resize(1280,720)->save(public_path('photo/').$filename);\n }\n else{\n Image::make($avatar)->save(public_path('photo/').$filename);\n\n }\n $oldFilename = $products->product_image;\n //update the database\n $products->product_image=$filename;\n //Delete the old photo\n Storage::delete($oldFilename);\n\n }\n\n $products->save();\n\n\n\n return redirect('/home') -> with('edit','');\n }", "title": "" }, { "docid": "ff532344ab178d688587c7da12273ec4", "score": "0.56283534", "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": "63ab5cefaa3e5c0b3403f60763069aa0", "score": "0.5624801", "text": "public function updateStream($path, $resource, Config $config)\n {\n $this->delete($path);\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "7dec9cec9d7076e6ea452e8d03c2611f", "score": "0.5622056", "text": "public function put($resource = '', array $params = [], array $options = [])\n\t{\n\t\treturn $this->api($resource, 'put', $params, $options);\n\t}", "title": "" }, { "docid": "4e47d4dc028ea28ff1177255c879c482", "score": "0.56179345", "text": "public function update(Request $request, $id)\n {\n $data_international = International::find($id);\n\n $request->validate([\n 'title' => 'required|max:200',\n 'short_description' => 'required',\n 'description' => 'required',\n 'icon' => 'image'\n ]);\n\n if ($request->file('icon')) {\n $file = $request->file('icon');\n $path = $file->store(\"cooperation\");\n\n if (@$data_international->icon && Storage::exists($data_international->icon)) {\n Storage::delete($data_international->icon);\n }\n }\n\n $data_international->fill([\n 'title' => $request->title,\n 'short_description' => $request->short_description,\n 'description' => $request->description,\n 'url' => $request->url,\n 'url_website' => $request->url_website,\n 'icon' => ($request->file('icon') ? $path : ($data_international->icon != null ? $data_international->icon : null))\n ])->save();\n\n return redirect()->route('admin.international.index')->with(['status' => 'success', 'message' => 'International Updated Successfully']);\n }", "title": "" }, { "docid": "099b7bf4723843472514004918e11afd", "score": "0.5615662", "text": "public function updating($entity) {}", "title": "" }, { "docid": "9a7fd1cb16f74652db2cbc25a7bffef7", "score": "0.56068635", "text": "public function update(Request $request, $id)\n {\n $Product = products::findOrFail($id);\n $Product->Product_Name = $request->Product_Name;\n $Product->Price = $request->Price;\n $Product->Quantity = $request->Quantity;\n $Product->Product_Detail = $request->Product_Detail;\n $Product->Category_id = $request->category;\n\n $current = $Product->Product_Image;\n if($request->hasFile('image')){\n $image = $request->image;\n $image_new_name = time().$image->getClientOriginalName();\n $image->move('Uploads/Artists',$image_new_name);\n $img = 'Uploads/Artists/'.$image_new_name;\n $Product->Product_Image = $img;\n\n if($current != $img){\n unlink($current);\n }\n }\n $Product->save();\n return redirect()->route('AdminViewProducts');\n }", "title": "" }, { "docid": "5aed89390836b61bf6d700fce636230f", "score": "0.56061286", "text": "public function update(Request $request, $id)\n {\n // The updated flow :\n // 1. When empty use the data from DB\n // 2. So this flow haven't validation flow\n\n\n // 1. Get data from DB use ID parameter\n $product = Product::find($id);\n\n // 2. Update the field value using $request->input\n if ($request->has('name')) {\n $product->name = $request->input('name');\n }\n\n if ($request->has('indexing_name')) {\n $product->indexing_name = $request->input('indexing_name');\n }\n \n if ($request->has('url_ecommerce')) {\n $product->url_ecommerce = $request->input('url_ecommerce');\n }\n \n if ($request->has('price')) {\n $product->price = $request->input('price');\n }\n\n if ($request->has('show')) {\n $product->show = $request->input('show') == \"true\" ? true : false;\n }\n\n if ($request->has('description')) {\n $product->description = $request->input('description');\n }\n \n // 3. Update the image and get the link\n // 2. Save the image and get the link\n $max_image = 5;\n for ($i=1; $i <= $max_image ; $i++) { \n $index = \"image_path_{$i}\";\n\n if ($request->hasFile(\"image_{$i}\")) {\n $image = $request->file(\"image_{$i}\");\n $file_name = time() . '.' . $image->getClientOriginalExtension();\n $image_url = asset('storage/product/'.$file_name);\n \n // Put the file to storage\n // Use file_get_content to get the image/file from object $image\n Storage::disk('public')->put('product/'.$file_name, file_get_contents($image));\n \n // Update URL using new image updated\n $product->{$index} = $image_url;\n }\n }\n \n $product->save();\n\n $message = [\n 'message' => 'Success update product!'\n ];\n return response()->json($message, 200);\n }", "title": "" }, { "docid": "3d8bf3989e6d607ede812c04d29b3205", "score": "0.560579", "text": "public function update(Request $request, $id)\n {\n $file = $request->file('path2');\n $upload = 'public/images_ready';\n $file_name = $file->getClientOriginalName();\n Storage::putFileAs($upload, $file, $file_name);\n $ap = Application::find($id);\n $ap->path2 = url('public/storage/images_ready/' . $file_name);\n $ap->prichina = $request->input('prichina');\n $ap->status_id = $request->input('status');\n $ap->save();\n return redirect()->route('admin');\n }", "title": "" }, { "docid": "19663296ebc49734460cd3e85ba50418", "score": "0.5596191", "text": "public function update(Request $request, $id)\n {\n $item = $request->item;\n VertStorage::find($id)->update($item);\n return response()->json(VertStorage::with(['catalog', 'category'])->find($id));\n }", "title": "" }, { "docid": "3847645e8dc5ebeb972217e987f9592c", "score": "0.55913264", "text": "public function update(Request $request, $id)\n {\n\n\n\n $Quotescheck = Quotes::findOrFail($id);\n\n if (url($Quotescheck->image) === $request->image) {\n } else if ($request->image === \"\") {\n } else {\n\n if ($request->image) {\n /**\n * Image upload Start\n *\n */\n $filenameWithExt = $request->file('image')->getClientOriginalName();\n\n $filename = pathinfo($filenameWithExt, PATHINFO_FILENAME);\n\n $extension = $request->file('image')->getClientOriginalExtension();\n\n $FileNameToStore = $filename . '_' . time() . \".\" . $extension;\n\n $path = $request->file('image')->storeAs('public/upload_quotes', $FileNameToStore);\n $FileNameToStore = 'storage/upload_quotes/' . $FileNameToStore;\n\n /**\n * Image upload End\n *\n */\n }\n }\n\n\n $Quotes = Quotes::findOrFail($id);\n\n $Quotes->title = $request->title;\n $Quotes->content = $request->content;\n $Quotes->publish = $request->publish;\n\n if ($request->publish == 1) {\n $Quotes->publish_text = 'draft';\n } else {\n $Quotes->publish_text = 'publish';\n }\n\n if (url($Quotescheck->image) === $request->image) {\n\n $Quotes->image = '';\n } else if ($request->image == \"\") {\n\n $Quotes->image = '';\n } else {\n\n if ($request->image) {\n\n $Quotes->image = $FileNameToStore;\n } else {\n }\n }\n\n $Quotes->update();\n\n $Quotesagain = Quotes::findOrFail($id);\n\n if ($request->image == \"\") {\n $image = '';\n } else {\n $image = url($Quotesagain->image);\n }\n\n\n\n\n return response()->json([\n 'save' => $Quotes,\n 'success' => 1,\n 'image' => $image,\n 'user' => $request->user(),\n 'Quotes' => $Quotescheck,\n '_benchmark' => microtime(true) - $this->time_start,\n ], 200);\n }", "title": "" }, { "docid": "b7966c379f90ae2061930029bb3777f6", "score": "0.5590518", "text": "public function update(Request $request, $resource, $id)\n {\n $command = $this->translator->getCommandFromResource($resource, 'update');\n\n $this->runBeforeCommands($command);\n\n $data = $this->dispatchFrom($command, $request);\n\n $this->fireEventForResource($resource, 'update', $data);\n\n return $this->success($data);\n }", "title": "" }, { "docid": "cd57c089e72cb115bc91cfe47966ecaf", "score": "0.5578753", "text": "public function update(Request $request, $id)\n {\n $valid = $request->validate([\n 'name_product' => 'required',\n 'price' => 'required|numeric',\n 'img_path' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048',\n 'id_category' => 'required',\n ]);\n\n $product = Product::findOrFail($id);\n $product->name_product = $request->filled('name_product') ? $request->get('name_product') :\n $product->name_product;\n $product->price = $request->filled('price') ? $request->get('price') : $product->price;\n if ($files = $request->file('image')) {\n $destinationPath = 'public/image/'; // upload path\n $product->img_path = date('YmdHis') . \".\" . $files->getClientOriginalExtension();\n $files->move($destinationPath, $product->img_path);\n }\n $product->id_category = $request->filled('id_category') ? $request->get('id_category') : $product->id_category;\n $product->save();\n return new ProductInsertResource($product);\n }", "title": "" }, { "docid": "c7a6fd0923fd6923716704c3e0ead706", "score": "0.55775595", "text": "public function update(Request $request, $id)\n { if (auth()->user()->role->name == 'super admin') {\n $service=Service::find($id);\n if ($request->file('image')) {\n\n $filename = $this->globalclass->storeS3($request->file('image'), 'construction/service');\n $service->update($request->except('image') + [\"image\" => $filename]);\n } else {\n $service->update($request->except('image'));\n }\n }\n return redirect()->route('services.index');\n }", "title": "" }, { "docid": "94890552f6cc855a20c30ddd00d05c7f", "score": "0.55750287", "text": "public function update(UpdateItem $request, $id)\n {\n $item = Item::find($id);\n\n $item->fill($request->all());\n $item->save();\n\n if ($request->hasFile('images')) {\n $numberOfImages = count($request->file('images'));\n for ($i = 0; $i < $numberOfImages; $i++) {\n $url = Storage::putFile('images/items', $request->file('images')[$i]);\n\n $item->images()->create([\n 'url' => $url,\n ]);\n } \n }\n\n $item = new ItemResource(\n Item::withRelations()->where('id', $id)->first()\n );\n\n return response()->json([\n 'status' => 'Success update item data!',\n 'item' => $item,\n ]); \n }", "title": "" }, { "docid": "11cbd279ad105d4859bedb4e70e50376", "score": "0.5572962", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'title' => 'required', \n 'price' => 'required|numeric|min:0', \n 'quantity' => 'required|numeric|min:1|',\n 'weight' => 'numeric|min:0',\n 'shipping_cost' => 'numeric|min:0',\n 'file' => 'mimes:jpeg,png,jpg,gif,svg|max:2048'\n ]);\n \n $data = $request->all();\n unset($data['_token']);\n $data['supplier_id'] = Auth::user()->id;\n $data['updated_at'] = date('Y-m-d H:i:s');\n\n if ($request->file()) {\n $col = DB::table('products')->select('file_path')->where('id', $id)->get();\n unlink($col[0]->file_path);\n\n $f = $data['file'];\n unset($data['file']);\n\n $origianlName = $f->getClientOriginalName();\n $fileName = time().'_'.$origianlName;\n $filePath = $request->file('file')->storeAs('uploads', $fileName, 'public');\n \n $data['file_name'] = $origianlName;\n $data['file_path'] = 'storage/' . $filePath;\n }\n \n DB::table('products')->where('id', $id)->update($data);\n return redirect('/supplier/product');\n }", "title": "" }, { "docid": "a28ba9c40e06592529f38d6d19b89b16", "score": "0.5571968", "text": "public function update($id) {\n \n }", "title": "" }, { "docid": "18ee6e85365a39e93471c69a77c664c5", "score": "0.5569043", "text": "public function put() {\n }", "title": "" }, { "docid": "18ee6e85365a39e93471c69a77c664c5", "score": "0.5569043", "text": "public function put() {\n }", "title": "" }, { "docid": "2b8a79adbe1af409adcb87f83c9169f6", "score": "0.55544317", "text": "function refresh($resource)\n {\n $this->getCache()->removeItem(get_class($resource) . $resource->getId());\n $resource->_load($resource->getId());\n }", "title": "" }, { "docid": "d4074248e0a1fab1615f9e277478c327", "score": "0.5553063", "text": "public function update(Request $request, $id)\n {\n// dd($request);\n $id = Product::find($id);\n $id->name = $request->name;\n if($request->image){\n \\Storage::disk('public')->delete($id->image);\n $id->image = $request->image->store('img', 'public');\n }\n $id->price = $request->price;\n\n $id->save();\n $id->sizes()->sync($request->size);\n session()->flash('update','تم تحديث القسم بنجاح');\n return redirect('products');\n\n }", "title": "" }, { "docid": "5d949f104f4f817dbdf320c3407252c4", "score": "0.55484396", "text": "public function update(Request $request,$id)\n {\n $articule=Articule::findOrFail($id);\n $dataArticule=json_decode($request->articule,true);\n if($articule->img != $dataArticule['img']){\n Storage::delete($articule->img); \n $file=$request->file('archivo');\n $ruta=$file->storeAs('img', $file->getClientOriginalName(),'public'); \n $articule->img = $ruta;\n }\n $articule->code = $dataArticule['code'];\n $articule->name = $dataArticule['name'];\n $articule->salePrice = $dataArticule['salePrice'];\n $articule->codePostal = $dataArticule['codePostal'];\n $articule->stock = $dataArticule['stock'];\n $articule->description = $dataArticule['description'];\n if($articule->save()){\n return new ArticuleResource($articule);\n }\n }", "title": "" }, { "docid": "e496a658febeab7c6e8639552adc78e9", "score": "0.55457646", "text": "public function update(Request $request, $id)\n {\n $whyus = WhyUs::find($id);\n\n $request->validate([\n 'title' => 'required|max:200',\n 'description' => 'required',\n 'icon' => 'image'\n ]);\n\n if ($request->file('icon')) {\n $file = $request->file('icon');\n $path = $file->store(\"whyus\");\n\n if (@$whyus->icon && Storage::exists($whyus->icon)) {\n Storage::delete($whyus->icon);\n }\n }\n\n $whyus->fill([\n 'title' => $request->title,\n 'description' => $request->description,\n 'icon' => ($request->file('icon') ? $path : ($whyus->icon != null ? $whyus->icon : null))\n ])->save();\n\n return redirect()->route('admin.whyus.index')->with(['status' => 'success', 'message' => 'Why Us updated successfully']);\n }", "title": "" }, { "docid": "d4b5e462db58a26a94f2326002f84aa9", "score": "0.55454725", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, Resourcetype::$rules);\n $resourcetype=Resourcetype::findOrFail($id);\n $resourcetype->update($request->all());\n\n return redirect('admin/resourcetype');\n }", "title": "" }, { "docid": "68611877d8742448025a8506ebac8d13", "score": "0.5544799", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "title": "" }, { "docid": "6f20a1779e33227cfc4451ace6ab29af", "score": "0.55436593", "text": "public function edit(resource $resource)\n {\n //\n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.55331755", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.55331755", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.55331755", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.55331755", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.55331755", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.55331755", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.55331755", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.55331755", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.55331755", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.55331755", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "51435ade6c2668fe55d1c7f77189c706", "score": "0.55301434", "text": "public function update($bucket, $object, \\Google\\Service\\Storage\\StorageObject $postBody, $optParams = array())\n {\n $params = array('bucket' => $bucket, 'object' => $object, 'postBody' => $postBody);\n $params = array_merge($params, $optParams);\n return $this->call('update', array($params), 'Google\\Service\\Storage\\StorageObject');\n }", "title": "" }, { "docid": "6dfdb976d3f3913cf8013159c3cf0071", "score": "0.55295056", "text": "public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n\n $product->title = $request->get('title');\n $product->description = $request->get('description');\n $product->price = $request->get('price');\n\n if($product->image && file_exists(storage_path('app/public/' . $product->image)))\n {\n Storage::delete('public/'.$product->avatar);\n $file = $request->file('image')->store('img/product', 'public');\n $product->image = $file;\n }\n\n $product->material = $request->get('material');\n $product->stock = $request->get('stock');\n $product->size = $request->get('size');\n $product->status = $request->get('status');\n $product->category = $request->get('category');\n\n return redirect()\n ->route('products.index')\n ->with('status','Great! Product updated successfully');\n }", "title": "" }, { "docid": "87ba89ad7c7e6e2506d0b08470b74d08", "score": "0.5528389", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->update($request->only('title', 'image'));\n\n ProductUpdated::dispatch($product->toArray())->onQueue('main_queue');\n\n return response($product, Response::HTTP_ACCEPTED);\n }", "title": "" }, { "docid": "6dbe9a80c3cc7c4c7214a73b919cb78b", "score": "0.5526569", "text": "public function update($request);", "title": "" }, { "docid": "369171ed590b58ee7cf2cce5a7475211", "score": "0.55228156", "text": "public function updateStreamAsync($path, $resource, array $config = []);", "title": "" }, { "docid": "48af84169b063fbf2effb3706f32eab9", "score": "0.55218333", "text": "public function update(Request $request, $id)\n {\n $model = Slider::find($id);\n $data = $request->all();\n if ($request->file('image'))\n {\n $logo = $request->file('image');\n $filename = random_int(100000000, 999999999).time().\".\".$logo->getClientOriginalExtension();\n Image::make($logo)->save(public_path('image/slides/'.$filename));\n $image2 = '/image/slides/'.$filename;\n $data['image'] = $image2;\n }\n unset($data['anime_id']);\n $model->update($data);\n $model->products()->detach();\n $model->products()->sync($request->anime_id);\n\n return redirect('/admin/slider')->with('success', 'Slider updated successfuly');\n }", "title": "" }, { "docid": "0735b88fa99945515b020a6550c7d695", "score": "0.55213094", "text": "public function update(Request $request, $id)\n {\n $pro=Product::find($id);\n $pro->fill($request->all());\n $pro->save();\n $pro->sizes()->sync($request->size);\n $price= Price::where(\"product_id\",\"=\",$id)->first();\n $price->price=$request->price;\n $price->save();\n return redirect()->action(\"StockController@index\");\n \n \n }", "title": "" }, { "docid": "9fe43bb7a01e7955489b2fff4393a98b", "score": "0.55200285", "text": "public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n $input = $request->all();\n// need to unlink the old img\n if($image = $request->file('image')){\n if($product->imgurl){unlink(public_path().$product->imgurl);}\n $img_name = \"shop_\".time(). $image->getClientOriginalName();\n $img_name = str_replace(\" \", \"_\", $img_name);\n $image->move('images', $img_name);\n Photo::create(['path'=>$img_name]);\n }\n\n if($file = $request->file('file')){\n if($product->file['filename']){Storage::delete($product->file['filename']);}\n $file_name = \"storage_\".$file->getClientOriginalName();\n $file_name = str_replace(\" \", \"_\", $file_name);\n // $file->move('products', $file_name);\n\n $extension = $file->getClientOriginalExtension();\n Storage::disk('local')->put($file_name, File::get($file));\n\n $entry = new \\App\\File();\n // $entry-> = $file->getClientOriginalExtension();\n $entry->mime = $file->getClientMimeType();\n $entry->filename = $file_name;\n $entry->original_filename = $file->getClientOriginalName();\n $entry->save();\n }\n\n if(isset($img_name)){\n $input['imageurl'] = $img_name;\n }\n if(isset($entry->id)){\n $input['file_id'] = $entry->id;\n }\n\n $product->update($input);\n\n if(isset($product->file_id)){\n $file = $product->hasFile($product->file_id);\n $file->update(['product_id'=>$product->id]);\n }\n\n return redirect('/admin/shop/products');\n }", "title": "" }, { "docid": "58eec31c8b754378d4addaa15c4a3dcd", "score": "0.55150574", "text": "public function update(Request $request, $id)\n {\n //Validate data\n $data = $request->only('name', 'source');\n $validator = Validator::make($data, [\n 'name' => 'string',\n 'source' => 'mimes:png,jpg,jpeg,csv,txt,xlx,xls,pdf|max:2048',\n ]);\n\n //Send failed response if request is not valid\n if ($validator->fails()) {\n return response()->json(['error' => $validator->messages()], 200);\n }\n\n $file = Ressource::find($id);\n\n if (is_null($file)) {\n return response()->json([\n \"success\" => false,\n \"message\" => \"File not found.\"\n ], 404);\n }\n\n $fileToDelete = $file->source;\n\n if (isset($request->name) || isset($request->source)) {\n if ($request->file()) {\n $fileToDelete = substr($fileToDelete, 9);\n Storage::disk('public')->delete($fileToDelete);\n dd('la');\n $name = time() . '_' . $request->source->getClientOriginalName();\n $filePath = $request->file('source')->storeAs('uploads', $name, 'public');\n $file->source = '/storage/' . $filePath;\n $file->update(array('source' => $filePath));\n }\n if (isset($request->name)) {\n $file->update(array('name' => $request->name));\n }\n }\n\n //ressource updated, return success response\n return response()->json([\n 'success' => true,\n 'message' => 'File updated successfully',\n 'data' => $file\n ], 200);\n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "a6830fd7d3b31bbf493d61d8d8c50af3", "score": "0.0", "text": "public function show(Category $category)\n {\n\n }", "title": "" } ]
[ { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "e5152a75698da8d87238a93648112fcf", "score": "0.72897154", "text": "function display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->fetch($resource_name, $cache_id, $compile_id, true);\n }", "title": "" }, { "docid": "03308cdf1f3eb0c47d8f3059a2a11231", "score": "0.7062654", "text": "public function show(Resource $resource)\n {\n app('App\\Http\\Controllers\\ViewsController')->resourceView($resource);\n\n return view('resources.show', compact('resource'));\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": "426f9c78118dbbe009edc89fcf8571df", "score": "0.6748524", "text": "public function show(Resource $resource)\n {\n //\n\t\t\t\treturn response()->json($resource);\n }", "title": "" }, { "docid": "921410ad408e73391c76fba66fc4ab57", "score": "0.65274835", "text": "function display() {\n global $CFG, $THEME, $USER;\n\n require_once($CFG->libdir.'/filelib.php');\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 /// Fetch parameters\n $inpopup = optional_param('inpopup', 0, PARAM_BOOL);\n $page = optional_param('page', 0, PARAM_INT);\n $frameset= optional_param('frameset', '', PARAM_ALPHA);\n\n /// Init some variables\n $errorcode = 0;\n $buttontext = 0;\n $querystring = '';\n $resourcetype = '';\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 /// Cache this per request\n static $items;\n\n /// Check for errors\n $errorcode = $this->check4errors($resource->reference, $course, $resource);\n\n /// If there are any error, show it instead of the resource page\n if ($errorcode) {\n if (!has_capability('moodle/course:activityvisibility', get_context_instance(CONTEXT_COURSE, $course->id))) {\n /// Resource not available page\n $errortext = get_string('resourcenotavailable','resource');\n } else {\n /// Depending of the error, show different messages and pages\n if ($errorcode ==1) {\n $errortext = get_string('invalidfiletype','error', $resource->reference);\n } else if ($errorcode == 2) {\n $errortext = get_string('filenotfound','error', $resource->reference);\n } else if ($errorcode == 3) {\n $errortext = get_string('packagenotdeplyed','resource');\n } else if ($errorcode == 4) {\n $errortext = get_string('packagechanged','resource');\n } else if ($errorcode == 5) {\n $errortext = get_string('packagenotdeplyed','resource'); // no button though since from repository.\n }\n }\n /// Display the error and exit\n if ($inpopup) {\n print_header($pagetitle, $course->fullname.' : '.$resource->name);\n } else {\n print_header($pagetitle, $course->fullname, \"$this->navigation \".format_string($resource->name), \"\", \"\", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm));\n }\n print_simple_box_start('center', '60%');\n echo '<p align=\"center\">'.$errortext.'</p>';\n /// If errors were 3 or 4 and isteacheredit(), show the deploy button\n if (has_capability('moodle/course:manageactivities', get_context_instance(CONTEXT_COURSE, $course->id)) && ($errorcode == 3 || $errorcode == 4)) {\n $link = 'type/ims/deploy.php';\n $options['courseid'] = $course->id;\n $options['cmid'] = $cm->id;\n $options['file'] = $resource->reference;\n $options['sesskey'] = $USER->sesskey;\n $options['inpopup'] = $inpopup;\n if ($errorcode == 3) {\n $label = get_string ('deploy', 'resource');\n } else if ($errorcode == 4) {\n $label = get_string ('redeploy', 'resource');\n }\n $method='post';\n /// Let's go with the button\n echo '<center>';\n print_single_button($link, $options, $label, $method);\n echo '</center>';\n }\n print_simple_box_end();\n /// Close button if inpopup\n if ($inpopup) {\n close_window_button();\n }\n\n print_footer();\n exit;\n }\n\n /// Load serialized IMS CP index to memory only once.\n if (empty($items)) {\n if (!$this->isrepository) {\n $resourcedir = $CFG->dataroot.'/'.$course->id.'/'.$CFG->moddata.'/resource/'.$resource->id;\n }\n else {\n $resourcedir = $CFG->repository . $resource->reference;\n }\n if (!$items = ims_load_serialized_file($resourcedir.'/moodle_inx.ser')) {\n error (get_string('errorreadingfile', 'error', 'moodle_inx.ser'));\n }\n }\n\n /// Check whether this is supposed to be a popup, but was called directly\n\n if (empty($frameset) && $resource->popup && !$inpopup) { /// Make a page and a pop-up window\n\n print_header($pagetitle, $course->fullname, \"$this->navigation \".format_string($resource->name), \"\", \"\", 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}\\\" target=\\\"resource{$resource->id}\\\" onclick=\\\"return openpopup('/mod/resource/view.php?inpopup=true&amp;id={$cm->id}', 'resource{$resource->id}','{$resource->popup}');\\\">\".format_string($resource->name,true).\"</a>\";\n\n echo \"<p>&nbsp;</p>\";\n echo '<p align=\"center\">';\n print_string('popupresource', 'resource');\n echo '<br />';\n print_string('popupresourcelink', 'resource', $link);\n echo \"</p>\";\n\n print_footer($course);\n exit;\n }\n\n\n /// No frames or framesets anymore, except iframe. in print_ims, iframe filled.\n /// needs callback to this file to display table of contents in the iframe so\n /// $frameset = 'toc' leads to output of toc and blank or 'ims' produces the\n /// iframe.\n if (empty($frameset) || $frameset=='ims') {\n\n /// Conditional argument to pass to IMS JavaScript. Need to be global to retrieve it from our custom javascript! :-(\n global $jsarg;\n $jsarg = 'false';\n if (!empty($this->parameters->navigationmenu)) {\n $jsarg = 'true';\n }\n /// Define $CFG->javascript to use our custom javascript. Save the original one to add it from ours. Global too! :-(\n global $standard_javascript;\n $standard_javascript = $CFG->javascript; // Save original javascript file\n $CFG->javascript = $CFG->dirroot.'/mod/resource/type/ims/javascript.php'; //Use our custom IMS javascript code\n\n /// moodle header\n if ($resource->popup) {\n //print_header($pagetitle, $course->fullname.' : '.$resource->name);\n print_header();\n } else {\n print_header($pagetitle, $course->fullname, \"$this->navigation \".format_string($resource->name), \"\", \"\", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, \"parent\"));\n }\n /// content - this produces everything else\n $this->print_ims($cm, $course, $items, $resource, $page);\n /// Moodle footer is back! Now using the DOMContentLoaded event (see resize.js) to trigger the resize\n /// no Moodle footer (because we cannot insert there the resize script).\n /// echo \"</div></div><script type=\\\"text/javascript\\\">resizeiframe($jsarg);</script></body></html>\";\n /// print_footer();\n echo \"</div></div></body></html>\";\n\n /// log it.\n add_to_log($course->id, \"resource\", \"view\", \"view.php?id={$cm->id}\", $resource->id, $cm->id);\n exit;\n }\n\n if ($frameset == 'toc') {\n print_header();\n $this->print_toc($items, $resource, $page);\n echo '</div></div></body></html>';\n exit;\n }\n }", "title": "" }, { "docid": "b08b6bb501370e4c42f069ea734388a0", "score": "0.64993453", "text": "public function get($resource);", "title": "" }, { "docid": "dd518b422828ccdfc7b932a34e62225d", "score": "0.6273607", "text": "public function show(Resource $resource)\n {\n return response()->json($resource);\n \n }", "title": "" }, { "docid": "51a1c3499847de81938cf22e3e336bf2", "score": "0.62220424", "text": "public function getAction()\n {\n \t/**\n \t * @todo handle error cases and return an error, return valid users ondly\n \t */\n \t$id = $this->_request->getParam('id');\n \t$result = $this->_table->find($id);\n \t$this->view->resource = $result->current();\n }", "title": "" }, { "docid": "04d35d47081d101fff17d30acb1f2178", "score": "0.6141969", "text": "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(SugarAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "title": "" }, { "docid": "556fa9c7c8b0bbfca3848834f795e687", "score": "0.6119021", "text": "public function displayAction($id)\n { }", "title": "" }, { "docid": "0243c17e457a131b89a485445f1cee26", "score": "0.60701436", "text": "public function show()\n {\n $this->getView($this->view_name);\n }", "title": "" }, { "docid": "f0d6bc8f87110dac3699808a11a93b8f", "score": "0.6056663", "text": "public function render()\n {\n $this->bindResource($this->resource);\n return parent::render();\n }", "title": "" }, { "docid": "02d611037299aac573636734fd64f517", "score": "0.59945476", "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('Tripjacks_Model_League l')\n ->where('l.leagueid = ?', $input->id);\n $result = $q->fetchArray();\n if (count($result) == 1) {\n $this->view->league = $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": "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": "d8bcb4a6a484fbd4595bf60c13751c5f", "score": "0.5916333", "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": "4e4b4802386aefba7de0e06d94dac1a8", "score": "0.5861693", "text": "public function viewResources($resourceid='')\n {\n $resourceid = db::escapechars($resourceid);\n \n $sql = \"SELECT * FROM kidschurchresources ORDER BY resourceName ASC\";\n $resources = db::returnallrows($sql);\n if(count($resources) > 0){\n $resourceOutput = \"<table class=\\\"memberTable\\\"><tr><th>ID</th><th>Name</th><th>Description</th><th>Type</th><th>Quantity</th><th>Task</th></tr>\";\n foreach($resources as $resource){\n if($resource['resourceID'] == $resourceid){\n $resourceOutput .= \"<tr class=\\\"highlight\\\">\";\n }\n else{\n $resourceOutput .= \"<tr>\";\n }\n $resourceOutput .= \"<td>\".$resource['resourceID'].\"</td>\";\n $resourceOutput .= \"<td>\".$resource['resourceName'].\"</td>\";\n $resourceOutput .= \"<td>\".$resource['resourceDescription'].\"</td>\";\n $resourceOutput .= \"<td>\".$resource['resourceType'].\"</td>\";\n $resourceOutput .= \"<td>\".$resource['resourceQuantity'].\"</td>\";\n $resourceOutput .= \"<td> \n <a href=\\\"index.php?mid=431&action=edit&resourceID=\".$resource['resourceID'].\"\\\" class=\\\"runbutton\\\">Edit</a>\n <a href=\\\"index.php?mid=430&action=remove&resourceID=\".$resource['resourceID'].\"\\\" class=\\\"delbutton\\\">Remove</a>\n </td>\";\n $resourceOutput .= \"<tr>\";\n }\n $resourceOutput .= \"</table>\";\n }\n else{\n $resourceOutput = \"<p>There are no resources stored at present.</p>\";\n }\n return $resourceOutput;\n }", "title": "" }, { "docid": "8c23114005d84f0741705b7da9ef9695", "score": "0.58511454", "text": "public function list_display($resource){\n\t\techo(\"<table border='1' >\\n<tr>\");\n\t\tforeach($this->list_headers as $head){\n\t\t\techo(\"<th>$head</th>\\n\");\n\t\t}\n\t\tif($this->ed_flag){\n\t\t\techo(\"<th colspan='2'>Admin</th>\\n\");\n\t\t}\n\t\techo(\"</tr>\");\n\t\twhile($row = mysql_fetch_array($resource)){\n\t\t\t\techo(\"<tr>\\n\");\n\t\t\t\tforeach($row as $key => $value) {\n\t\t\t\t$row[$key] = stripslashes($value);\n\t\t\t}\n\t\t\tforeach($this->list_table_cols as $val) {\n\t\t\t\techo(\"<td valign='top'>$row[$val]</td>\");\n\t\t\t}\n\t\t\tif($this->ed_flag){\n\t\t\t\techo(\"<td valign='top'><a href=attendance.php?id={$row[$this->ID]}>Edit</a></td>\\n\"); //Adds Edit button to end of display table\n\t\t\t\techo(\"<td valign='top'><a href=attendance.php?id={$row[$this->ID]}>Delete</a></td>\\n\"); //Adds Delete button to end of display table\n\t\t\t}\n\t\t}\n\t\techo(\"</tr>\\n</table>\");\n\t}", "title": "" }, { "docid": "bebff39922dfa3f37a3d7a6997a89e2f", "score": "0.5843188", "text": "function show()\n\t{\n\t\t$this->postObject->display();\n\t}", "title": "" }, { "docid": "c77fbba2f7b7f5018f4471f75871b57a", "score": "0.5841994", "text": "public function edit(Resource $resource)\n {\n return view(\n 'resources.edit', \n [\n 'resource' => $resource\n ]\n );\n }", "title": "" }, { "docid": "8aae95d60d936382831b42a40edb3397", "score": "0.5824328", "text": "public function show()\r\n\t{\r\n\t\techo $this->template;\r\n\t}", "title": "" }, { "docid": "7c5c6f9fff24e84ba0d3b00444a0acc7", "score": "0.58195084", "text": "public function resolveForDisplay($resource, $attribute = null)\n {\n if (empty($this->value)) {\n $this->value = null;\n }\n\n try {\n $file = new GenericFile($this->value);\n\n $path = FileCache::get($file, function ($file, $path) {\n return basename($path);\n });\n\n $url = vsprintf('%s/%s', [\n 'nova-vendor/skydiver/nova-cached-images',\n $path\n ]);\n\n $value = url($url);\n } catch (\\Throwable $th) {\n $value = 'remote image not found';\n }\n\n $this->value = $value;\n }", "title": "" }, { "docid": "58526873a63ddff4b306282ce5155a89", "score": "0.58138895", "text": "public static function output($resource)\r\n\t{\r\n\t\tif (isset(self::$_resources[$resource])) {\r\n\t\t\t$res =& self::$_resources[$resource];\r\n\r\n\t\t\tif (function_exists('getInternalResource') && $data = getInternalResource($res['data'])) {\r\n\t\t\t\t$filename = self::$embedding_file;\r\n\t\t\t} else {\r\n\t\t\t\t$filename = $res['data'];\r\n\t\t\t}\r\n\r\n\t\t\t// use last-modified time as etag; etag must be quoted\r\n\t\t\t$etag = '\"' . filemtime($filename) . '\"';\r\n\r\n\t\t\t// check headers for matching etag; if etag hasn't changed, use the cached version\r\n\t\t\tif (isset($_SERVER['HTTP_IF_NONE_MATCH']) && $_SERVER['HTTP_IF_NONE_MATCH'] == $etag) {\r\n\t\t\t\theader('HTTP/1.0 304 Not Modified');\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\theader('Etag: ' . $etag);\r\n\r\n\t\t\t// cache file for at most 30 days\r\n\t\t\theader('Cache-control: max-age=2592000');\r\n\r\n\t\t\t// output resource\r\n\t\t\theader('Content-type: ' . $res['mime']);\r\n\r\n\t\t\tif (isset($data)) {\r\n\t\t\t\tif (isset($res['base64'])) {\r\n\t\t\t\t\techo base64_decode($data);\r\n\t\t\t\t} else {\r\n\t\t\t\t\techo $data;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\treadfile($filename);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "d6af1b1d4946c54112fc9b7ca038cb20", "score": "0.58112013", "text": "public function display()\n\t{\n\t\tparent::display();\n\t}", "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": "baf449cd82447c0bffb577fe732c4f2b", "score": "0.57953733", "text": "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::add('error', 'msg_info', array('message' => Kohana::message('gw', 'event.view.not_allowed'), 'is_persistent' => FALSE, 'hash' => Text::random($length = 10)));\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "title": "" }, { "docid": "21604cc50e9ca2b999b8c59635c9346b", "score": "0.5777744", "text": "protected function _resource($data, $name)\r\n {\r\n $data = get_resource_type($data);\r\n $this->_renderNode('Resource', $name, $data);\r\n }", "title": "" }, { "docid": "ecd6aa7074b9a655f317e213378a7ab9", "score": "0.57773685", "text": "public function show() {\n if (isset($_GET['name'])) {\n $this->view->source = $this->model::getByName($_GET['name']);\n }\n\n $this->view->setData($this->model::get($_GET));\n $this->view->setTemplate(SRC_SHOW);\n $this->view->setLayout(SHOW_LAYOUT);\n $this->view->render();\n }", "title": "" }, { "docid": "e7bae91f4e998eac5e73657c932c48d7", "score": "0.5752467", "text": "public function show($id) {\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "e7bae91f4e998eac5e73657c932c48d7", "score": "0.5752467", "text": "public function show($id) {\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "e3b51ebfe04703c114ab39fc729ba43b", "score": "0.5749091", "text": "public function show(Entry $entry)\n {\n //\n }", "title": "" }, { "docid": "91b553cd446c5431be6377bad7d6e9b7", "score": "0.57440376", "text": "public function show($id)\n\t{\n\t\t//\n\t\t\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": "cb9307a32f6d22a33b956aed56db49ba", "score": "0.5717934", "text": "public function show($id)\n\t{\n\t\t//\n\t\t\n\t}", "title": "" }, { "docid": "6c6591ff03468044c76e66dc3ecca033", "score": "0.57143193", "text": "public function display(): Response;", "title": "" }, { "docid": "6ad29c72212e149d40619613cbacfe13", "score": "0.5712024", "text": "protected function addResourceShow(string $name, string $base, string $controller, array $options): RouteContract\n {\n $uri = $this->getResourceUri($name, $options) . '/{' . $base . '}';\n\n $action = $this->getResourceAction($name, $controller, 'show', $options);\n\n return $this->router->get($uri, $action);\n }", "title": "" }, { "docid": "61a627e0c8c8b3a47cc8487387ee35b2", "score": "0.57057", "text": "public function show($id)\n\t{\n\t\t//No need for showing\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": "560ae0fd472bad5f1d21beeed5dfbbdd", "score": "0.57012135", "text": "public function show(){}", "title": "" }, { "docid": "690a36be877c22d14829a018fd5e04e9", "score": "0.56947994", "text": "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $information = $em->getRepository('ThiefaineReferentielBundle:Information')->find($id);\n\n if (!$information) {\n throw $this->createNotFoundException(\"Impossible de trouver l'information.\");\n }\n\n $showForm = $this->createShowForm($information);\n $twig = 'ThiefaineReferentielBundle:Information:show.html.twig';\n $paramTwig = array(\n 'information' => $information,\n 'show_form' => $showForm->createView(),\n );\n\n return $this->render($twig,$paramTwig);\n }", "title": "" }, { "docid": "98910c6c774dc1299639c448306ea157", "score": "0.5694748", "text": "public function show($id)\n {\n $this->crud->hasAccessOrFail('show');\n\n // set columns from db\n $this->crud->setFromDb();\n\n // cycle through columns\n foreach ($this->crud->columns as $key => $column) {\n // remove any autoset relationship columns\n if (array_key_exists('model', $column) && array_key_exists('autoset', $column) && $column['autoset']) {\n $this->crud->removeColumn($column['name']);\n }\n }\n\n // get the info for that entry\n $this->data['entry'] = $this->crud->getEntry($id);\n $this->data['crud'] = $this->crud;\n $this->data['title'] = trans('bcrud::crud.preview').' '.$this->crud->entity_name;\n\n // remove preview button from stack:line\n $this->crud->removeButton('preview');\n $this->crud->removeButton('delete');\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->getShowView(), $this->data);\n }", "title": "" }, { "docid": "851cd390daf8f79de66a294538711bfd", "score": "0.5691463", "text": "public function view(HTTPRequest $request)\n {\n $id = $request->param('ID');\n if ($display = Display::get_by_id($id)) {\n return $this->renderPresentation($display);\n }\n\n return $this->httpError(404);\n }", "title": "" }, { "docid": "89380f02c69f1ed066b5443620b90407", "score": "0.568851", "text": "public function show($id)\n\t{ \n \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": "" }, { "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": "" } ]
4ce01d27f7d21d7195237daa90339f84
own trim function for wbb
[ { "docid": "06f2ab2bcd012d5edc76ee8bcc906c0e", "score": "0.7714116", "text": "function wbb_trim($text) {\r\n\tif ($text != '') {\r\n\t\t// removing whitespace may not work with some charsets (like utf - 8, gb2312, etc)\r\n\t\tglobal $removewhitespace;\r\n\t\tif ($removewhitespace == 1) {\r\n\t\t\t$text = str_replace(chr(160), \" \", $text); // remove alt + 0160\r\n\t\t\t$text = str_replace(chr(173), \" \", $text); // remove alt + 0173\r\n\t\t\t$text = str_replace(chr(240), \" \", $text); // remove alt + 0240\r\n\t\t\t$text = str_replace(\"\\0\", \" \", $text); // remove whitespace\r\n\t\t}\r\n\t\t$text = trim($text);\r\n\t}\t\r\n\r\n\treturn $text;\r\n}", "title": "" } ]
[ { "docid": "b8732f82f2d04e2470a9f3715dab51e6", "score": "0.7071183", "text": "function __trim(&$value) {$value = is_string($value) ? trim($value):$value;}", "title": "" }, { "docid": "da02df009f65131e57436127b412240e", "score": "0.7025116", "text": "function dc_trim_value(&$value) \n{ \n $value = trim($value); \n}", "title": "" }, { "docid": "df9db9f45ca64fd7bd4571237ddad508", "score": "0.70168847", "text": "function trim_value(&$value) \n { \n $value = trim($value); \n }", "title": "" }, { "docid": "0415f06f1edc07edb31de50953f14a3b", "score": "0.7016511", "text": "function qw_trim( &$value ) {\n\t$value = trim( $value );\n}", "title": "" }, { "docid": "68431f3c0d22fa598918749a0fd1fcd6", "score": "0.7001195", "text": "function trim_value(&$value) \n {\n $value = trim($value); \n }", "title": "" }, { "docid": "b80d34e077f4bf93ddeecabbaf306309", "score": "0.69983226", "text": "public function testTrim() {\n\t\t$this->object->set(' titon ')->trim();\n\t\t$this->assertEquals('titon', $this->object->value());\n\n\t\t$this->object->trim('t');\n\t\t$this->assertEquals('iton', $this->object->value());\n\t}", "title": "" }, { "docid": "43d80ed2f172e821aa997e9aa231384b", "score": "0.68481046", "text": "public function testCorrectConversion(){\n $text = ' abc 123 ';\n $var = \\sergiolch\\helper\\super_trim($text);\n $this->assertTrue($var == 'abc 123');\n unset($var);\n }", "title": "" }, { "docid": "0588faed67b9623f85e23077fc2c3d8b", "score": "0.67910415", "text": "function mb_trim($string)\n{\n ensure_string($string, SUBJECT_FOR_FIRST_ARGUMENT);\n\n return preg_replace('/(^\\s+|\\s+$)/u', '', $string);\n}", "title": "" }, { "docid": "d8d719d8d75f1f0b1c342f64239ca1d8", "score": "0.678471", "text": "abstract protected function trimData(&$data);", "title": "" }, { "docid": "43dd12036d8f065918927fb20e324780", "score": "0.6776265", "text": "function trim_value(&$value)\r\n{\r\n $value = trim($value);\r\n}", "title": "" }, { "docid": "2f76157b15cb0673da731f6d4cde2683", "score": "0.67104477", "text": "function trimwhitespace($text) {\n\t\n\t\t$_blocks_match = \"script|pre|style|textarea\";\n\t\n\t\t// Pull out the blocks\n\t\tpreg_match_all(\"!<($_blocks_match)[^>]+>.*?</($_blocks_match)>!is\", $text, $match);\n\t\t$_blocks = $match[0];\n\t\t$text = preg_replace(\"!<($_blocks_match)[^>]+>.*?</($_blocks_match)>!is\", '@@@XNYO:TRIM@@@', $text);\n\t\n\t\t// clean up all whitespaces from the start of a line to the start of a HTML tag\n\t\t$text = preg_replace('/^[\\s]+?</m', '<', $text);\n\t\n\t\t// remove multiple lines/empty lines\n\t\t$text = preg_replace('/>[\\s\\t\\n]{2,}?</m', \">\\n<\", $text);\n\t\n\t\t// replace blocks\n\t\tforeach($_blocks as $curr_block)\n\t\t\t$text = preg_replace(\"!@@@XNYO:TRIM@@@!\",$curr_block,$text,1);\n\t\n\t\treturn $text; \n\t}", "title": "" }, { "docid": "8f97b4b931ec131d8a71733381c280c7", "score": "0.6603697", "text": "function acswpmu_trim_value(&$value) { $value = trim(trim($value), ' ,');}", "title": "" }, { "docid": "d8bd360bc776a09d254c725780d68f5a", "score": "0.65610856", "text": "function mb_trim($string)\n {\n return mb_ereg_replace('^\\s*([\\s\\S]*?)\\s*$', '\\1', $string);\n }", "title": "" }, { "docid": "e1e89e5395ee8b7a6516029a869dc5fe", "score": "0.6548742", "text": "function safeTrim (&$text) {\n //we have to do this odd return because in order to pre-process the superglobals we have to call by-reference,\n //but calls that use anonymous variables or function return values will not be by-reference\n return $text = preg_replace ('/^[\\pZ\\p{Cc}\\p{Cf}\\p{Cn}\\p{Cs}]+|[\\pZ\\p{Cc}\\p{Cf}\\p{Cn}\\p{Cs}]+$/u', '', $text);\n}", "title": "" }, { "docid": "93b6e22a872e6d7c6235ad553e73089b", "score": "0.64343154", "text": "function whitespace_trim($str){\n\t$string = preg_replace('/\\s+/', '', $str);\n\treturn $string;\n}", "title": "" }, { "docid": "4e216aff8d7bad6465b35ece92d6ed86", "score": "0.6389114", "text": "public function mtrim(): self\n {\n return $this->set('mtrim', true);\n }", "title": "" }, { "docid": "420eb7b322abdaf0cc6538f1d8e7af1d", "score": "0.63849944", "text": "static function trim(&$inValue, $inKey = null) {\n\t\t$inValue = trim($inValue); \n\t}", "title": "" }, { "docid": "f12105a8e739d2cb51a3bc6bbca46210", "score": "0.6374115", "text": "public function trim($charlist = null);", "title": "" }, { "docid": "742f492a461ae959dd4e1afa7eefaaee", "score": "0.63566744", "text": "static function mbTrim($strForTrim) {\r\n return preg_replace(\"/(^\\s+)|(\\s+$)/us\", \"\", $strForTrim);\r\n }", "title": "" }, { "docid": "a3ff3c8037fefea4213bd950ca6e06f7", "score": "0.6354723", "text": "public function trim($x)\n {\n return new Func('TRIM', $x);\n }", "title": "" }, { "docid": "08e37ff2184031c8f54cac728cb22ba6", "score": "0.63384056", "text": "static function trim($word,$option=NULL,$rep=NULL){\r\n if($option===NULL)\r\n return trim($word,$rep);\r\n else if($option===\"right\"){\r\n return rtrim($word,$rep);\r\n }\r\n else if($option===\"left\")\r\n return ltrim($word,$rep);\r\nthrow new Exception(\"Invalid argument\");\r\n}", "title": "" }, { "docid": "29088f65ab1afeea8f7caabbad1694ae", "score": "0.63196427", "text": "function trimByWords( $input )\n {\n return $this->trim( $input , 'by words' );\n }", "title": "" }, { "docid": "67d3bcfa40548d832c4214450c33f53d", "score": "0.63051665", "text": "public function trimString($string){\n\t\treturn mb_strimwidth($string, 0, 50, \"...\");\n\t}", "title": "" }, { "docid": "bddb0140f6386f402aae24e4b6ce657b", "score": "0.62666124", "text": "public function testTrimRight() {\n\t\t$this->object->set(' titon ')->trimRight();\n\t\t$this->assertEquals(' titon', $this->object->value());\n\n\t\t$this->object->set('-titon-')->trimRight('-');\n\t\t$this->assertEquals('-titon', $this->object->value());\n\t}", "title": "" }, { "docid": "e30afdf7b6572ad10fcc390d3c5722ca", "score": "0.6264905", "text": "function quitarBlancos($varchar){\n\treturn trim($varchar);\n}", "title": "" }, { "docid": "86e439159d03174c3114c2ae578aa087", "score": "0.6250969", "text": "function trimLine($txt){\n\t$lines = explode(\"\\n\",$txt);\n\tforeach($lines as $k=>$line){\n\t\t$lines[$k] = ltrim($line);\n\t}\n\t\n\treturn implode(\"\\n\",$lines);\n}", "title": "" }, { "docid": "ce7176d9c1413fcd71963ceae05f88bc", "score": "0.616254", "text": "function TrimSpace(&$string) {\r\n $string = trim($string);\r\n }", "title": "" }, { "docid": "5b6c496a554cd09a85172d0f2ff6f1dc", "score": "0.6142559", "text": "public function testTrimLeft() {\n\t\t$this->object->set(' titon ')->trimLeft();\n\t\t$this->assertEquals('titon ', $this->object->value());\n\n\t\t$this->object->set('-titon-')->trimLeft('-');\n\t\t$this->assertEquals('titon-', $this->object->value());\n\t}", "title": "" }, { "docid": "47661d30d95441e08f95c711beb14ef0", "score": "0.60993594", "text": "function trimwhitespace($source)\n\t{\n\t\t// Pull out the script blocks\n\t\tpreg_match_all(\"!<script[^>]+>.*?</script>!is\", $source, $match);\n\t\t$_script_blocks = $match[0];\n\t\t$source = preg_replace(\"!<script[^>]+>.*?</script>!is\",\n\t\t\t\t\t\t\t '@@@COMPRESSOR:TRIM:SCRIPT@@@', $source);\n\t\n\t\t// Pull out the pre blocks\n\t\tpreg_match_all(\"!<pre>.*?</pre>!is\", $source, $match);\n\t\t$_pre_blocks = $match[0];\n\t\t$source = preg_replace(\"!<pre>.*?</pre>!is\",\n\t\t\t\t\t\t\t '@@@COMPRESSOR:TRIM:PRE@@@', $source);\n\t\n\t\t// Pull out the textarea blocks\n\t\tpreg_match_all(\"!<textarea[^>]+>.*?</textarea>!is\", $source, $match);\n\t\t$_textarea_blocks = $match[0];\n\t\t$source = preg_replace(\"!<textarea[^>]+>.*?</textarea>!is\",\n\t\t\t\t\t\t\t '@@@COMPRESSOR:TRIM:TEXTAREA@@@', $source);\n\t\n\t\t// remove all leading spaces, tabs and carriage returns NOT\n\t\t// preceeded by a php close tag.\n\t\t$source = trim(preg_replace('/((?<!\\?>)\\n)[\\s]+/m', '\\1', $source));\n\t\t\n\t\t//Remove comments\n\t\t$source = preg_replace(\"/<!--.*-->/U\",\"\",$source); \t\n\t\n\t\t// replace textarea blocks\n\t\t$this->trimwhitespace_replace(\"@@@COMPRESSOR:TRIM:TEXTAREA@@@\",$_textarea_blocks, $source);\n\t\n\t\t// replace pre blocks\n\t\t$this->trimwhitespace_replace(\"@@@COMPRESSOR:TRIM:PRE@@@\",$_pre_blocks, $source);\n\t\n\t\t// replace script blocks\n\t\t$this->trimwhitespace_replace(\"@@@COMPRESSOR:TRIM:SCRIPT@@@\",$_script_blocks, $source);\n\t\n\t\treturn $source;\n\t}", "title": "" }, { "docid": "d0540bb37f79ba64672e4474be014b13", "score": "0.6092755", "text": "function trimWords($str,$count){\n $words_array = explode(\" \", $str);\n for($i=0; $i<$count; $i++){\n if($words_array[$i]!==\".\" && $words_array[$i]!==\" \" && $words_array[$i]!==\"&nbsp;\"){\n $words = $words. \" \".trim($words_array[$i]);\n }\n }\n return $words;\n }", "title": "" }, { "docid": "66e35bfa5c27b031163447d4219e66db", "score": "0.60923135", "text": "public static function trimall($user_input)\n\t{\n\t\t$search=array(\" \",\" \",\"\\t\",\"\\n\",\"\\r\");$replace=array(\"\",\"\",\"\",\"\",\"\");\n\t\treturn str_replace($search,$replace,$user_input);\n\t}", "title": "" }, { "docid": "9321cd6fa2556b0c133ce008a7edb979", "score": "0.6059365", "text": "function bb_unspacefy_and_trim($st) {\n\t//$whole_match = $st[0];\n\t$captured = $st[1];\n\t$unspacefied = preg_replace(\"/\\[ (.*?)\\ ]/\", \"[$1]\", $captured);\n\n\treturn $unspacefied;\n}", "title": "" }, { "docid": "42ab83292e15d4c36276245314c33df0", "score": "0.60568315", "text": "function whitespace_clean($text)\r\n{\r\n\t$otext = $text;\r\n\t$text = preg_replace('/\\s\\s+/', ' ', $text);\r\n\t\r\n\trunDebug( __FILE__, __FUNCTION__, __LINE__, \"In: $otext Out:$text\",4);\r\n\t\r\n\treturn trim($text);\t\r\n}", "title": "" }, { "docid": "4de7ba1be26ce437d3bd9c43b0d2764c", "score": "0.60483366", "text": "function ztrim($key,$limit) {\n $redis = Redis::getInstance()->connection();\n $size = $redis->zcard($key);\n if($size > $limit) {\n $delta = ($size - $limit) ;\n $redis->zremrangebyrank($key,0,$delta-1);\n }\n }", "title": "" }, { "docid": "dd7edced042d7f77e8168d984c6ad948", "score": "0.6038717", "text": "function colabs_trim_excerpt($text) {\n\treturn rtrim($text,'[...]');\n}", "title": "" }, { "docid": "74ece060f3abb201ef815524c6925a69", "score": "0.60386765", "text": "function trim_string(string $data){\n $data = strip_tags($data);\n $data = stripslashes($data);\n $data = trim($data);\n\n return $data;\n}", "title": "" }, { "docid": "0c43ebd401bcb7f647aef26d40886383", "score": "0.6033085", "text": "public function trim()\n {\n $this->overrideEncoding();\n \n // \\p{Z} # unicode spaces\n // \\p{C} # unicode catch others\n \n # eregi is case insensitive version of ereg\n $this->str = preg_replace('/(^[\\pZ|\\pC]+)/u', '', $this->str);\n \n //removes chr(0xc2) . chr(0xa0) . '#page#' . chr(0xc2) . chr(0xa0); \n \n $this->resetEncoding(); \n \n return $this;\n }", "title": "" }, { "docid": "a29ee6d0e33020920130efc9b25a499b", "score": "0.602372", "text": "function strTrimTotal($input) \n//-------------------------------------------------------------------------------------------------\n// FUNCTION : strTrimTotal\n//-------------------------------------------------------------------------------------------------\n// version : 1.0\n// date : 2004-01-01\n// Auteur : Denis Léveillé\n// Info : \n{\n\n $input = trim($input);\n $output = '';\n\n for($i=0;$i<strlen($input);$i++) {\n\n if(substr($input, $i, 1) != \" \") {\n\n $output .= trim(substr($input, $i, 1));\n\n } else {\n\n $output .= \" \";\n\n }\n\n }\n\n return $output;\n}", "title": "" }, { "docid": "64eb57b6f6b2d3004a1245e6e094a37e", "score": "0.6022975", "text": "private function _code_trim($code)\n\t{\n\t $code = preg_replace(\"/^\\s*\\n/siU\", \"\", $code);\n\t $code = rtrim($code);\n\t return $code;\n\t}", "title": "" }, { "docid": "610b87112c0beeb6525463c281da5077", "score": "0.6015979", "text": "function trim_text($str='', $length=0, $is_dots=true, $is_strip_html=true) {\n\t\t\tif ($is_strip_html){ $str=strip_tags($str); } //strip tags, if desired\n\t\t\tif (strlen($str) >= $length){ \n\t\t\t\t$spc = strrpos(substr($str, 0, $length), ' '); //find last space within length\n\t\t\t\t$str = substr($str, 0, $spc);\n\t\t\t\tif($is_dots){ $str.='...'; } //add dots (...)\n\t\t\t}\n\t\t\treturn $str;\n\t\t}", "title": "" }, { "docid": "1fc4d93916bc6b476ac45e0786b83532", "score": "0.6005817", "text": "public function trim(array $scripts);", "title": "" }, { "docid": "195232d4e0e3b27e6c275e5b9e21b4f5", "score": "0.5996388", "text": "function trim_string($str, $charlist = \" \\t\\n\\r\\0\\x0B\\xC2\\xA0\"){\n\treturn utf8_trim($str, $charlist);\n}", "title": "" }, { "docid": "62809a4141c894ea17cd21a463f549c6", "score": "0.5995291", "text": "function trimIfString($value) {\n return is_string($value) ? trim($value) : $value;\n }", "title": "" }, { "docid": "6d85b9ec69a5645b14cb83252de455ad", "score": "0.59895664", "text": "protected function getTrimFunction()\n {\n switch ($this->type) {\n case 'ltrim':\n case 'start':\n case 'left':\n return 'ltrim';\n\n case 'rtrim':\n case 'end':\n case 'right':\n return 'rtrim';\n\n case 'trim':\n case 'all':\n case 'both':\n return 'trim';\n }\n\n throw new InvalidArgumentException('The provided trim type is not supported.');\n }", "title": "" }, { "docid": "b7dda91a31c2c68e501fa67b0b0a9c3f", "score": "0.59758645", "text": "static function trim($inString, $inWhere=self::TRIM_END) {\n if (self::TRIM_END == $inWhere) {\n $inString = preg_replace('/(\\r?\\n|\\s)+$/', '', $inString);\n } elseif (self::TRIM_BEGINNING == $inWhere) {\n $inString = preg_replace('/^(\\r?\\n|\\s)+/', '', $inString);\n } elseif (self::TRIM_BOTH == $inWhere) {\n $inString = preg_replace('/(\\r?\\n|\\s)+$/', '', $inString);\n $inString = preg_replace('/^(\\r?\\n|\\s)+/', '', $inString);\n }\n return $inString;\n }", "title": "" }, { "docid": "562d99a732d1775eaedada60d31fd041", "score": "0.59706813", "text": "public function trim($base = 'top-left', $away = array('top', 'bottom', 'left', 'right'), $tolerance = 0, $feather = 0) {\n $awaySuffix = \"\";\n foreach($away as $aw) $awaySuffix .= $aw;\n\n $this->suffixArray['trim'] = \"ba{$base}aw{$awaySuffix}tol{$tolerance}fea{$feather}\";\n $this->triggers['trim'] = array($base, $away, $tolerance, $feather);\n return $this;\n }", "title": "" }, { "docid": "327cc50aee3b8476877558d324c22c8e", "score": "0.596824", "text": "public function testAvoidTrimming():void{\n\t\t$m1 = $this->qrcode->getMatrix('hello')->matrix();\n\t\t$m2 = $this->qrcode->getMatrix('hello ')->matrix(); // added space\n\n\t\t$this::assertNotSame($m1, $m2);\n\t}", "title": "" }, { "docid": "8b327a701e1f3e6fd68a4c375cb1f582", "score": "0.5965974", "text": "function trim_text($input, $length, $ellipses = true, $strip_tag = true,$strip_style = true) {\n //strip tags, if desired\n if ($strip_tag) { $input = strip_tags($input); }\n\n //strip tags, if desired\n if ($strip_style) { $input = preg_replace('/(<[^>]+) style=\".*?\"/i', '$1',$input); }\n\n if ($length == 'full') {\n $trimmed_text=$input;\n } else {\n //no need to trim, already shorter than trim length\n if (strlen($input) <= $length) { return $input; }\n\n //find last space within length\n $last_space = strrpos(substr($input, 0, $length), ' ');\n $trimmed_text = substr($input, 0, $last_space);\n\n //add ellipses (...)\n if ($ellipses) { $trimmed_text .= '...'; }\n }\n\n return $trimmed_text;\n}", "title": "" }, { "docid": "a9b41f9228217141bbd4598445cfa2e8", "score": "0.59624326", "text": "function smarty_validate_transform_trim($value, $params, &$formvars) {\n return trim($value);\n}", "title": "" }, { "docid": "390855c1172d78f198e2a9d9a4f02d26", "score": "0.59498096", "text": "function foundationize_text_trimming ($text, $length) {\n $string = substr($text, 0, $length);\n $string_trimmed = substr($string, 0, strrpos($string, ' ')) . \" ...\";\n echo $string_trimmed;\n}", "title": "" }, { "docid": "48bcf6f5b029b95b3773791a565734c6", "score": "0.5948744", "text": "public static function walk_trim_all(&$s,$key){\n $s=trim($s);\n }", "title": "" }, { "docid": "53b4fccf96341b6d4c61c1978d747f01", "score": "0.59474814", "text": "function removespace($text)\n{\n $text = preg_replace('/[\\t\\n\\r\\0\\x0B]/', '', $text);\n $text = preg_replace('/([\\s])\\1+/', ' ', $text);\n $text = trim($text);\n return $text;\n}", "title": "" }, { "docid": "b4cb07a74239f244be7bdac0a20e5fc3", "score": "0.59257096", "text": "function trimAll(&$item, $key)\n{ \n //echo \"item: $item |\" . trim($item).\"|\\n\";\n $item = trim($item);\n \n}", "title": "" }, { "docid": "4e2c3659bde990302f14ec29a4a192f8", "score": "0.5921747", "text": "function array_trim(&$array) {\r\n foreach ($array as $key => $val) {\r\n if (!strlen($val)) unset($array[$key]);\r\n }\r\n }", "title": "" }, { "docid": "7d330e6e497f09b78bcfd2537a9c292b", "score": "0.590819", "text": "function code_trim($code)\n{\n $code = preg_replace('/^[^0-9a-z\\.\\-_\\/]/i', '', $code);\n $code = preg_replace('/[^0-9a-z\\.\\-_\\/]$/i', '', $code);\n return $code;\n}", "title": "" }, { "docid": "cb0c1b7851424e30894f50f0c548b850", "score": "0.5897813", "text": "function trim_array(&$array) {\r\n\treset($array);\r\n\twhile (list($key, $val) = each($array)) {\r\n\t\tif (is_array($val)) $array[$key] = trim_array($val);\r\n\t\telseif (is_string($val)) $array[$key] = wbb_trim($val); \r\n\t}\r\n\treturn $array;\r\n}", "title": "" }, { "docid": "a1709860936b2f9e25e296deac3b650e", "score": "0.5888464", "text": "protected static function rule_trim($object, $field, $param = array())\n\t{\n\t\tis_null($object->{$field}) OR $object->{$field} = trim($object->{$field});\n\t}", "title": "" }, { "docid": "dce6415a10fd38d2e22fc6ecc5de71de", "score": "0.5873648", "text": "function removeExtraSpace($text)\n{\n\treturn trim(preg_replace('/\\s\\s+/', ' ', $text));\n}", "title": "" }, { "docid": "9e728f75bb5191a9797eb8c8bcc135c6", "score": "0.58687466", "text": "public function trim()\n {\n $this->_value_ = trim($this->_value_);\n return $this;\n }", "title": "" }, { "docid": "c1fced317575c570f8cbb0384ed59686", "score": "0.58666164", "text": "abstract protected function trimWhitespaceFromSpecialCharacters($code);", "title": "" }, { "docid": "c54a40bb70e3dcff114a07d1da5c74ba", "score": "0.58572173", "text": "function pi_util_trim_text($text, $length = 250, $postfix = \"...\") {\n\t$return_text = $text;\n\tif (strlen($text) > $length) {\n\t\t$short_body = substr($text, 0, $length);\n\t\t$last_space = strrpos($short_body, \" \");\n\t\t$short_body = substr($short_body, 0, $last_space);\n\t\t$return_text = $short_body . $postfix;\n\t}\n\treturn $return_text;\n}", "title": "" }, { "docid": "f66b3ab0e3686ebbcda0dcaff56c505b", "score": "0.5843495", "text": "public function getTrimLength(): int\n {\n return $this->trimLength;\n }", "title": "" }, { "docid": "78000810f9d5e757e82977ad6e1b62bc", "score": "0.5828777", "text": "function wp_trim_all_excerpt($text) {\n global $post;\n $raw_excerpt = $text;\n if ( '' == $text ) {\n $text = get_the_content('');\n $text = strip_shortcodes( $text );\n $text = apply_filters('the_content', $text);\n $text = str_replace(']]>', ']]&gt;', $text);\n }\n \n $text = strip_tags($text);\n $excerpt_length = apply_filters('excerpt_length', 17);\n $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');\n $text = wp_trim_words( $text, $excerpt_length, $excerpt_more ); \n \n return apply_filters('wp_trim_excerpt', $text, $raw_excerpt); \n }", "title": "" }, { "docid": "2c0af120ac71b9500dd2f10c01e19067", "score": "0.58263266", "text": "function utf8_trim( $str, $charlist=false)\n{\n\tif($charlist === false)\n\t\treturn trim($str);\n\n\treturn utf8_ltrim(utf8_rtrim($str, $charlist), $charlist);\n}", "title": "" }, { "docid": "5e6e60c2f4cb1bce7f3f4dc4db101f6b", "score": "0.5823827", "text": "public function trim($charlist = null) {\n return $this->trimMe(\"\\\\trim\", $charlist);\n }", "title": "" }, { "docid": "2304f72b50388c34675ef301f5de7330", "score": "0.5808569", "text": "private function useTrim($data, $fromWhere = \"both\")\n {\n if ($fromWhere == \"left\") {\n $data = ltrim($data);\n }\n\n if ($fromWhere == \"right\") {\n $data = rtrim($data);\n }\n\n if ($fromWhere == \"both\") {\n $data = trim($data);\n }\n\n return $data;\n }", "title": "" }, { "docid": "40c41878ebca65f375eb0553d98dac9b", "score": "0.5806331", "text": "function trimString($string, $left = '', $right = ''){\n\treturn rtrim(ltrim(trim($string), $left), $right);\n}", "title": "" }, { "docid": "811119619b37fee0f9e14b0bc7d2511b", "score": "0.58052367", "text": "function stripSpaces($text){\r\n $text=preg_replace('/^\\s+/','',$text);\r\n $text=preg_replace('/\\s+$/','',$text);\r\n return $text;\r\n }", "title": "" }, { "docid": "66c24831dd88d046024fac5af7a79cb9", "score": "0.58009404", "text": "function pams_trim_words( $text, $num_words = 55, $more = null ) {\n if ( null === $more )\n $more = __( '&hellip;' );\n $original_text = $text;\n //$text = wp_strip_all_tags( $text );\n /* translators: If your word count is based on single characters (East Asian characters),\n enter 'characters'. Otherwise, enter 'words'. Do not translate into your own language. */\n if ( 'characters' == _x( 'words', 'word count: words or characters?' ) && preg_match( '/^utf\\-?8$/i', get_option( 'blog_charset' ) ) ) {\n $text = trim( preg_replace( \"/[\\n\\r\\t ]+/\", ' ', $text ), ' ' );\n preg_match_all( '/./u', $text, $words_array );\n $words_array = array_slice( $words_array[ 0 ], 0, $num_words + 1 );\n $sep = '';\n } else {\n $words_array = preg_split( \"/[\\n\\r\\t ]+/\", $text, $num_words + 1, PREG_SPLIT_NO_EMPTY );\n $sep = ' ';\n }\n if ( count( $words_array ) > $num_words ) {\n array_pop( $words_array );\n $text = implode( $sep, $words_array );\n $text = $text . $more;\n } else {\n $text = implode( $sep, $words_array );\n }\n /**\n * Filter the text content after words have been trimmed.\n *\n * @since 3.3.0\n *\n * @param string $text The trimmed text.\n * @param int $num_words The number of words to trim the text to. Default 5.\n * @param string $more An optional string to append to the end of the trimmed text, e.g. &hellip;.\n * @param string $original_text The text before it was trimmed.\n */\n return apply_filters( 'pams_trim_words', $text, $num_words, $more, $original_text );\n}", "title": "" }, { "docid": "5f4b2a9eae7ba739831e30bea40aea02", "score": "0.5799884", "text": "function users_cleanName($name) {\n return trim($name);\n}", "title": "" }, { "docid": "afb02241450dfb02f81861eed71ee36c", "score": "0.57982", "text": "public function cleanWhitespace():PrototypeNode;", "title": "" }, { "docid": "98719422fd526a30f89598e055f157a6", "score": "0.57915276", "text": "function removeWhiteSpace($str) {\r\n $str = str_replace(\"&nbsp;\", \"\", $str);\r\n $str = str_replace(\" \", \"\", $str);\r\n return trim($str);\r\n}", "title": "" }, { "docid": "0b3e8e1575ab226f28e7542e8852e1a6", "score": "0.5786139", "text": "function filtering_trim_excerpt($text) {\n\t\tglobal $post;\n\t\t$filtering_excerpt_len = ($this->opt('filtering_excerpt_length' )) ? ($this->opt('filtering_excerpt_length' )) : '20';\n\t $filtering_excerpt_more = ($this->opt('filtering_excerpt_more' , $this->tset)) ? ($this->opt('filtering_excerpt_more' , $this->tset)) : '';\n\t \t$permalink = get_permalink($post->ID);\n\t\t\t\t\n\n\t\tif ( '' == $text ) {\n\t\t\t$text = get_the_content('');\n\n\t\t\t$text = strip_shortcodes( $text );\n\n\t\t\t$text = apply_filters('the_content', $text);\n\t\t\t$text = str_replace(']]>', ']]>', $text);\n\t\t\t$text = strip_tags($text);\n\n\t\t\t$excerpt_length = $filtering_excerpt_len;\n\t\t\t$words = explode(' ', $text, $excerpt_length + 1);\n\t\t\tif (count($words) > $excerpt_length) {\n\t\t\t\tarray_pop($words);\n\t\t\t\tarray_push($words, ' <a href=\"'. $permalink .'\">... '.$filtering_excerpt_more.'</a>');\n\t\t\t\t$text = implode(' ', $words);\n\t\t\t}\n\t\t}\n\t\treturn $text;\n\n\t}", "title": "" }, { "docid": "8671c6dd0be3b6fe69d0d2a4edd99343", "score": "0.5776223", "text": "function array_trim ( array $aArray, $sChars = null )\n{\n array_walk($aArray, '__array_trim_callback', array('trim', $sChars));\n\treturn $aArray;\n}", "title": "" }, { "docid": "05776dd8f148fe190330540a72581906", "score": "0.5768332", "text": "function str_trim(string $string, string $characters = ' ') : string\n{\n return Str::trim($string, $characters);\n}", "title": "" }, { "docid": "73b13a3e96a49767744890519a08a604", "score": "0.5765627", "text": "function imagetrim(&$im, $bg, $pad=null){\n // Calculate padding for each side.\n if (isset($pad)){\n $pp = explode(' ', $pad);\n if (isset($pp[3])){\n $p = array((int) $pp[0], (int) $pp[1], (int) $pp[2], (int) $pp[3]);\n }else if (isset($pp[2])){\n $p = array((int) $pp[0], (int) $pp[1], (int) $pp[2], (int) $pp[1]);\n }else if (isset($pp[1])){\n $p = array((int) $pp[0], (int) $pp[1], (int) $pp[0], (int) $pp[1]);\n }else{\n $p = array_fill(0, 4, (int) $pp[0]);\n }\n }else{\n $p = array_fill(0, 4, 0);\n }\n\n // Get the image width and height.\n $imw = imagesx($im);\n $imh = imagesy($im);\n\n // Set the X variables.\n $xmin = $imw;\n $xmax = 0;\n\n // Start scanning for the edges.\n for ($iy=0; $iy<$imh; $iy++){\n $first = true;\n for ($ix=0; $ix<$imw; $ix++){\n $ndx = imagecolorat($im, $ix, $iy);\n if ($ndx != $bg){\n if ($xmin > $ix){ $xmin = $ix; }\n if ($xmax < $ix){ $xmax = $ix; }\n if (!isset($ymin)){ $ymin = $iy; }\n $ymax = $iy;\n if ($first){ $ix = $xmax; $first = false; }\n }\n }\n }\n\n // The new width and height of the image. (not including padding)\n $imw = 1+$xmax-$xmin; // Image width in pixels\n $imh = 1+$ymax-$ymin; // Image height in pixels\n\n // Make another image to place the trimmed version in.\n $im2 = imagecreatetruecolor($imw+$p[1]+$p[3], $imh+$p[0]+$p[2]);\n imagesavealpha($im2, true);\n\n // Make the background of the new image the same as the background of the old one.\n $bg2 = imagecolorallocatealpha($im2, 0,0,0,127);\n imagefill($im2, 0, 0, $bg2);\n\n // Copy it over to the new image.\n imagecopy($im2, $im, $p[3], $p[0], $xmin, $ymin, $imw, $imh);\n\n // To finish up, we replace the old image which is referenced.\n $im = $im2;\n}", "title": "" }, { "docid": "9f3cf1939b3f7dca33daec746dcaf0be", "score": "0.57577497", "text": "function rstrip($chars = \" \\t\\n\\r\\0\\x0B\")\n{\n return function ($value) use ($chars) {\n return rtrim($value, $chars);\n };\n}", "title": "" }, { "docid": "00bda471dd8f71cff6107ae8b8798303", "score": "0.57524353", "text": "function strip_between ($input, $b='/*', $e='*/') {\n\t$s = ' '.$input.' ';\n\t$bp = strpos($s, $b);\n\t$ep = strpos($s, $e);\n\n\twhile ($bp && $ep && ($bp < $ep)) {\n\t\t$s = ' '.trim(substr($s, 0, $bp).substr($s, $ep+2)).' ';\n\t\t$bp = strpos($s, $b);\n\t\t$ep = strpos($s, $e);\n\t}\n\n\treturn $s;\n}", "title": "" }, { "docid": "19b4877630eb94f4f9559a98932ea040", "score": "0.5749051", "text": "static function trim_lines($x) {\n if ($x) {\n return preg_replace('@(?<! ) +$@m', '', $x);\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "e80c69a25875ab729b1226a55039c229", "score": "0.57435226", "text": "function stripTextBuffer($text)\n{\n $text = strstr($text, ': '); //Strip everything preceeding ':'\n $text = str_replace(': ', '', $text); //Strip the ':'\n return $text;\n}", "title": "" }, { "docid": "1ac7c0e670a10e2a9af7243cb10fde5f", "score": "0.5724297", "text": "function trim($str) {\n\t\treturn preg_replace('/^[\\pZ\\pC]+|[\\pZ\\pC]+$/u','',$str);\n\t}", "title": "" }, { "docid": "edb9e10ab13047051f8468dbca2e1da1", "score": "0.57218343", "text": "function trimASIN($asin){\n //Global variable passed back to script\n global $ASINs;\n\n //Function: Remove spaces\n function trim_value(&$value){\n $value = trim($value);\n }\n\n //Put each value into an array\n\t$ASINs = explode(PHP_EOL,$asin);\n //Remove spaces from each array value\n\tarray_walk($ASINs, 'trim_value');\n\n}", "title": "" }, { "docid": "dd2df5083c25246204bcc49ef8c30f7d", "score": "0.5720418", "text": "function phpbb_rtrim($str, $charlist = false)\n{\n\tif ($charlist === false)\n\t{\n\t\treturn rtrim($str);\n\t}\n\t\n\t$php_version = explode('.', PHP_VERSION);\n\n\t// php version < 4.1.0\n\tif ((int) $php_version[0] < 4 || ((int) $php_version[0] == 4 && (int) $php_version[1] < 1))\n\t{\n\t\twhile ($str{strlen($str)-1} == $charlist)\n\t\t{\n\t\t\t$str = substr($str, 0, strlen($str)-1);\n\t\t}\n\t}\n\telse\n\t{\n\t\t$str = rtrim($str, $charlist);\n\t}\n\n\treturn $str;\n}", "title": "" }, { "docid": "935893ebfb7db7772db2ac4713909ac7", "score": "0.5716912", "text": "function trim_array($arr) {\n array_walk_recursive($arr, function (&$trma) {\n $trma = trim($trma);\n });\n return $arr;\n }", "title": "" }, { "docid": "66f732455d0aab6a44066bdd53f84880", "score": "0.57076067", "text": "function flag_rules_action_trim($flag, $flagging_user, $cutoff_size) {\n flag_trim_flag($flag, $flagging_user, $cutoff_size);\n}", "title": "" }, { "docid": "e2f0a9d8dda0198cc1dc2d73a4c031db", "score": "0.56977886", "text": "public static function trim($string){\n\n\t\t# Listado de caracteres que eliminará el trim.\n\t\t# Sólamente fué agregado el caracter ASCII 160\n\t\t#\n\t\t# Descripción de los caracteres\n\t\t# ASCII 32 (0x20): un espacio en blanco.\n\t\t# ASCII 9 (0x09): un tabulador.\n\t\t# ASCII 10 (0x0A): una nueva linea.\n\t\t# ASCII 13 (0x0D): un retorno de carro.\n\t\t# ASCII 0 (0x00): el byte NULL.\n\t\t# ASCII 11 (0x0B): un tabulador vertical.\n\t\t# ASCII 160 (0xA0): al aplicar html_entity_decode, los espacios (&nbsp;) los reemplaza por ASCII 160 (0xa0) y no por ASCII 32 (0x20), debido a que usa el charset UTF-8\n\t\t$charlist = \"\\x20\\x09\\x0A\\x0D\\x00\\x0B\\xA0\";\n\n\t\t# Retorno el trim, usando el listado de caracteres\n\t\treturn trim($string,$charlist);\n\t}", "title": "" }, { "docid": "ad600d8441ddd2bec125a2056fafbf18", "score": "0.56878895", "text": "function trimAds($str){\n\t\t$str = str_replace(\"'\", '&#39', $str);\t\t\n\t\t$str_array = explode(\"clear=\", $str);\n\t\treturn $str_array[0];\n\t}", "title": "" }, { "docid": "4775177c9f7436cb574ab7df14554bfb", "score": "0.56853664", "text": "function trim_output($str,$maxlength,$mode=1,$rep='...'){\n $ret=($mode==2?chunk_split($str,30):$str);\n\n if(strlen($ret) > $maxlength){\n $ret=substr($ret,0,$maxlength).$rep;\n }\n return $ret;\n}", "title": "" }, { "docid": "103a79810ad0cfc70f7093f83f1b2a24", "score": "0.56829435", "text": "protected static function trim_this( $data ) {\n if ( is_array( $data ) ) {\n return array_map( 'trim', $data );\n }\n\n return trim( $data );\n\n }", "title": "" }, { "docid": "2c6bc694fe1258378ae26564855a53d5", "score": "0.56679827", "text": "public function attributeTrim($attribute, $params) {\r\n\t\tif ($this->$attribute != null && gettype ( $this->$attribute ) == \"string\") {\r\n\t\t\t$this->$attribute = trim ( $this->$attribute );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "dddbd199ffd0c664a98b364b7fd9cf39", "score": "0.5656914", "text": "public static function trim(string $value, bool $extendMode = false): string\n {\n $result = \\trim($value);\n\n if ($extendMode) {\n $result = \\trim($result, \\chr(0xE3) . \\chr(0x80) . \\chr(0x80));\n $result = \\trim($result, \\chr(0xC2) . \\chr(0xA0));\n $result = \\trim($result);\n }\n\n return $result;\n }", "title": "" }, { "docid": "c31bba617cb469791424600f0c658bbf", "score": "0.56543785", "text": "public function trim($file_source, $file_destination)\n {\n\n /*\n // Make another image to place the trimmed version in.\n $new_image = imagecreatetruecolor(247,247);\n imageAlphaBlending($new_image, false);\n imageSaveAlpha($new_image, true);\n\n // Copy it over to the new image.\n // imagecopyresampled($new_image, $source_image, 0, 0, 0, 0, 247, 247, 256, 256);\n imagecopy($new_image, $source_image, 0, 0, 8, 8, 255, 255);\n\n // Save the image as a PNG\n // imageAlphaBlending($new_image, false);\n // imageSaveAlpha($new_image, true);\n $status = imagejpeg($new_image, $file_destination);\n\n $image = imagecreatefromjpeg($image_filepath);\n return;\n */\n\n // Load image from file\n $image = imagecreatefromjpeg($file_source);\n\n // Initialize padding (unused)\n $padding = 0;\n\n // Set background color to be trimmed\n $background = imagecolorallocate($image, 255, 255, 255);\n\n // Loop through edges, test for background, and set border\n $top = imageSY($image);\n $left = imageSX($image);\n $bottom = 0;\n $right = 0;\n for ($x = 0 ; $x < imagesx($image) ; $x++) {\n for ($y = 0 ; $y < imagesy($image) ; $y++) {\n if(imagecolorat($image, $x, $y) != $background) {\n if($x < $left)\n $left = $x;\n if($x > $right)\n $right = $x;\n if($y > $bottom)\n $bottom = $y;\n if($y < $top)\n $top = $y;\n }\n }\n }\n $right++;\n $bottom++;\n\n // Create new image\n $new_image = imagecreatetruecolor($right-$left+$padding*2, $bottom-$top+$padding*2);\n\n // Fill the background\n imagefill($new_image, 0, 0, $background);\n\n // Copy image\n imagecopy($new_image, $image, $padding, $padding, $left, $top, $right-$left, $bottom-$top);\n\n // Save image\n imagejpeg($new_image, $file_destination);\n\n // Remove images\n imagedestroy($image);\n imagedestroy($new_image);\n\n }", "title": "" }, { "docid": "dc1bb940b8b131c2d4ce23f394bf7530", "score": "0.56538635", "text": "function phpbb_ltrim($str, $charlist = false)\n{\n\tif ($charlist === false)\n\t{\n\t\treturn ltrim($str);\n\t}\n\t\n\t$php_version = explode('.', PHP_VERSION);\n\n\t// php version < 4.1.0\n\tif ((int) $php_version[0] < 4 || ((int) $php_version[0] == 4 && (int) $php_version[1] < 1))\n\t{\n\t\twhile ($str{0} == $charlist)\n\t\t{\n\t\t\t$str = substr($str, 1);\n\t\t}\n\t}\n\telse\n\t{\n\t\t$str = ltrim($str, $charlist);\n\t}\n\n\treturn $str;\n}", "title": "" }, { "docid": "28c81649d6883095ad44396e989a7852", "score": "0.56529856", "text": "function tokens_rtrim( &$tokens ) {\n\twhile (\n\t\tisset( $tokens[$k=count( $tokens )-1][0] ) and\n\t\t$tokens[$k][0] === T_WHITESPACE\n\t) {\n\t\tarray_splice( $tokens, -1 );\n\t}\n}", "title": "" }, { "docid": "2b919ad504c621345ba652bcaeb20e19", "score": "0.56509244", "text": "function trim_str($str, $charset)\r\n{\r\n\treturn rtrim_str(ltrim_str($str, $charset), $charset);\r\n}", "title": "" }, { "docid": "84189fdb7ae1f8119869ad41f52d6940", "score": "0.563936", "text": "function trim_text( $input, $length, $ellipses = true, $strip_html = true ) {\r\n\t\tif ( $strip_html ) {\r\n\t\t\t$input = strip_tags( $input );\r\n\t\t}\r\n\r\n\t\t//no need to trim, already shorter than trim length\r\n\t\tif ( strlen( $input ) <= $length ) {\r\n\t\t\treturn $input;\r\n\t\t}\r\n\r\n\t\t//find last space within length\r\n\t\t$last_space = strrpos( substr( $input, 0, $length ), ' ' );\r\n\t\t$trimmed_text = substr( $input, 0, $last_space );\r\n\r\n\t\t//add ellipses (...)\r\n\t\tif ( $ellipses ) {\r\n\t\t\t$trimmed_text .= '...';\r\n\t\t}\r\n\r\n\t\treturn $trimmed_text;\r\n\t}", "title": "" }, { "docid": "83af89aa689d1d88817cfc7c89408408", "score": "0.5637337", "text": "public function attributeTrim($attribute, $params) {\r\n \tif($attribute==\"condiciones\" && empty($this->condiciones)){\r\n \t\t$this->condiciones = null;\r\n \t}\r\n }", "title": "" }, { "docid": "9d1133c1842e056b5aa8f9ef6d4a2bb5", "score": "0.56344765", "text": "function my_trim_excerpt( $content = '', $word = 55 ) {\r\n\t\t$text = strip_shortcodes( $content );\r\n\t\t\r\n\t\t$text = str_replace(']]>', ']]&gt;', $text);\r\n\t\t$text = strip_tags($text);\r\n\t\t$excerpt_length = apply_filters('excerpt_length', $word );\r\n\t\t$words = explode(' ', $text, $excerpt_length + 1);\r\n\t\tif (count($words) > $excerpt_length) {\r\n\t\t\tarray_pop($words);\r\n\t\t\tarray_push($words, '[...]');\r\n\t\t\t$text = implode(' ', $words);\r\n\t\t}\r\n\t\r\n\t\treturn apply_filters('wp_trim_excerpt', $text, $content);\r\n\t}", "title": "" }, { "docid": "2032839673d58a5ae44d5b40bcf1abb6", "score": "0.5632903", "text": "function strip( $input )\n {\n return $input;\n }", "title": "" }, { "docid": "bee36b52eb40ee874d19b00dcfd10811", "score": "0.56323606", "text": "function strip_whitespace(string $string) : string\n{\n return Str::stripWhitespace($string);\n}", "title": "" } ]
896938eebbc81e647cde6165884b9854
add_action( 'genesis_before_content', 'rrwd_add_cpt_title' );
[ { "docid": "2538a611c6b4c16e156425b61ba96a41", "score": "0.7833579", "text": "function rrwd_add_cpt_title() {\n\n\tif ( is_post_type_archive() ) {\n\n\t ?><header class=\"archive-description\"><h1 class=\"entry-title\"><?php post_type_archive_title(); ?></h1></header><?php\n\t}\n\n}", "title": "" } ]
[ { "docid": "04b3b9b71ba6bed3f66f27c7dc208623", "score": "0.7296971", "text": "function site_title(){\n add_theme_support('title-tag');\n}", "title": "" }, { "docid": "b160c4f45d4ea341aad287b8c0dae3cf", "score": "0.71728647", "text": "function pwtheme_render_title(){\n\tadd_theme_support('title-tag');\n\n add_theme_support( 'post-formats', array('link', 'quote '));\n\n}", "title": "" }, { "docid": "06b65c97627e4bd09e39b4fad3493bd7", "score": "0.7144998", "text": "function theme_slug_setup() {\n\tadd_theme_support( 'title-tag' );\n}", "title": "" }, { "docid": "cfe64c7319ada200792ff85dd7ce4105", "score": "0.712028", "text": "function childtheme_before_widgettitle( $content ) {\n $content = \"<h4 class=\\\"widgettitle\\\">\";\n return $content;\n}", "title": "" }, { "docid": "03b3f32082270fe0944874b3fc914222", "score": "0.7074071", "text": "function bg_cpt_archive_doctitle( $title ) {\n\treturn 'Genesis Framework Code Snippets';\n}", "title": "" }, { "docid": "2265abf6bd1f9d067c222263be0c217c", "score": "0.70095533", "text": "function dahztheme_title_controller(){\n\t do_action( 'dahztheme_title_controller' );\n}", "title": "" }, { "docid": "3a69f2068f46a7384739069a15e85932", "score": "0.70045906", "text": "function register_block_core_post_title() {\n\tregister_block_type_from_metadata(\n\t\t__DIR__ . '/post-title',\n\t\tarray(\n\t\t\t'render_callback' => 'render_block_core_post_title',\n\t\t)\n\t);\n}", "title": "" }, { "docid": "96968dfa7d0e792a4b8e5516de01ec35", "score": "0.6859224", "text": "function custom_cta_init() {\n $args = array(\n 'label' => 'Custom CTAs',\n 'public' => true,\n 'show_ui' => true,\n 'capability_type' => 'page',\n 'hierarchical' => false,\n 'rewrite' => array('slug'=>'custom_cta'),\n 'query_var' => true,\n 'menu_icon' => 'dashicons-megaphone',\n 'supports' => array(\n 'title',\n 'editor'\n )\n );\n register_post_type( 'custom_cta', $args );\n}", "title": "" }, { "docid": "fac708948354b06145102613e9307ace", "score": "0.68400335", "text": "function ch2tf_title_filter ( $title ) {\n if ( is_front_page() )\n $new_title = 'Front Page >> ';\n elseif ( get_post_type() == 'page' )\n $new_title = 'Page >> ';\n elseif ( get_post_type() == 'post' )\n $new_title = 'Post >> ';\n // Append previous title to title prefix\n if ( isset( $new_title ) ) {\n $new_title .= $title;\n // Return new complete title to be displayed\n return $new_title;\n } else {\n return $title;\n }\n}", "title": "" }, { "docid": "c12bc9197b52c9612c8100dd49c4d119", "score": "0.6786092", "text": "function registerCustomCPT()\r\n{\r\n $labels = array(\r\n 'name' => _x('Custom Post List', 'post type general name'),\r\n 'singular_name' => _x('Custom Post', 'post type singular name'),\r\n 'add_new' => _x('Add A Custom Post', 'review item'),\r\n 'add_new_item' => __('Add New Custom Post'),\r\n 'edit_item' => __('Edit Custom Post'),\r\n 'new_item' => __('New Custom Post'),\r\n 'view_item' => __('View Custom Post'),\r\n 'search_items' => __('Search Custom Post'),\r\n 'not_found' => __('Nothing found'),\r\n 'not_found_in_trash' => __('Nothing found in Trash')\r\n );\r\n\r\n $args = array(\r\n 'labels' => $labels,\r\n 'public' => true,\r\n 'publicly_queryable' => true,\r\n 'show_ui' => true,\r\n 'query_var' => true,\r\n //'menu_icon' => get_template_directory_uri() . '/img/review-icon.png',\r\n 'rewrite' => true,\r\n 'capability_type' => 'post',\r\n 'hierarchical' => false,\r\n 'menu_position' => 5,\r\n 'supports' => array('title','thumbnail','editor'),\r\n 'taxonomies' => array('category','post_tag')\r\n );\r\n\r\n register_post_type('my_custom_post', $args);\r\n\r\n}", "title": "" }, { "docid": "ffc0c5b3843ee474b355c613ebb31e39", "score": "0.67821294", "text": "function bediq_template_post_title() {\n ?>\n <header>\n <h2 class=\"page-title\" itemprop=\"name\"><?php the_title(); ?></h2>\n </header><!-- .entry-header -->\n <?php\n}", "title": "" }, { "docid": "5012c445f3d380fd0f2bd4a2c721ad45", "score": "0.67703545", "text": "function childtheme_postheader_posttitle($posttitle ) {\n $posttitle = \"\\n\\n\\t\\t\\t\\t\\t\";\n if (is_single() || is_page()) {\n $posttitle .= '<h1 class=\"entry-title\">' . get_the_title() . \"</h1>\\n\";\n } elseif (is_404()) {\n $posttitle .= '<h1 class=\"entry-title\">' . __('Not Found', 'thematic') . \"</h1>\\n\";\n } else {\n $posttitle .= '<h2 class=\"entry-title\">';\n $posttitle .= sprintf('<a href=\"%s\" title=\"%s\" rel=\"bookmark\">%s</a>',\n apply_filters('the_permalink', get_permalink()),\n sprintf( esc_attr__('%s', 'thematic'), the_title_attribute( 'echo=0' ) ),\n get_the_title());\n $posttitle .= \"</h2>\\n\";\n }\n return $posttitle;\n}", "title": "" }, { "docid": "a3080459320921a9cfe9803f22c53f57", "score": "0.6769553", "text": "function bediq_template_activity_title() {\n ?>\n <header>\n <div class=\"entry-title\" itemprop=\"name\">\n <h1><?php the_title(); ?></h1>\n </div>\n <div class=\"alignright\">\n <?php bediq_print_tax_link( 'things-to-do' ); ?>\n </div>\n </header><!-- .entry-header -->\n\n <?php\n}", "title": "" }, { "docid": "5bbd1e4426e744449c2923139ed79957", "score": "0.67609054", "text": "function test_cpt_init()\n{\n $args = array(\n 'public' => true,\n 'label' => 'TestPosts',\n 'singular_name' => 'TestPost'\n );\n register_post_type('TestPosts', $args);\n}", "title": "" }, { "docid": "34e06ca163e31443267d3d561cd641bd", "score": "0.67301315", "text": "function yachtproject_cpt_yachtreviews() {\n $labels = array(\n 'name' => 'Yacht Reviews',\n 'singular_name' => 'Yacht_Review',\n 'add_new' => 'Create New Yacht Review',\n 'all_items' => 'All Items',\n 'add_new_item' => 'Add Item',\n 'edit_item' => 'Edit Item',\n 'new_item' => 'New Item',\n 'view_item' => 'View Item',\n 'search_item' => 'Search Yacht Review',\n 'not_found' => 'No items found',\n 'not_found_in_trash' => 'No items found in trash',\n 'parent_item_colon' => 'Parent Item',\n );\n\n $args = array(\n 'labels' => $labels,\n 'public' => true,\n 'has_archive' => true,\n 'publicly_queryable' => true,\n 'query_var' => true,\n 'rewrite' => true,\n 'capability_type' => 'post',\n 'hierarchical' => false,\n 'menu_icon' => 'dashicons-palmtree',\n 'supports' => array(\n 'title',\n 'editor',\n 'excerpt',\n 'thumbnail',\n 'revisions',\n ),\n 'taxonomies' => array(\n 'category',\n 'post_tag'\n ),\n 'menu_position' => 5,\n 'exclude_from_search' => false\n );\n register_post_type('Yacht Review', $args);\n}", "title": "" }, { "docid": "9fe2b35d1746ca47670c93cfc55fbb42", "score": "0.6729366", "text": "function theme_support() {\n add_theme_support( 'title-tag' );\n}", "title": "" }, { "docid": "a49911cc56437f82a90a5b8c0536dfa5", "score": "0.66909665", "text": "function echotheme_post_wp_head()\n{ \n\t// run the hook to add custom stuff at end of head\n\tdo_action('echotheme_post_wp_head');\n}", "title": "" }, { "docid": "253651eda90f127972260908f877397d", "score": "0.6690237", "text": "function wd_blog_archive_custom_entry_header() { ?>\n\n <header class=\"wd-entry-header\">\n <div class=\"wrap\">\n <h1 class=\"entry-title\">Blog</h1>\n <?php do_action( 'wd_do_breadcrumbs' ); ?>\n </div>\n </header>\n\n<?php }", "title": "" }, { "docid": "f7363641ba8d15d7a7a53747515ce611", "score": "0.6674355", "text": "function inline_site_title() { do_action( 'inline_site_title' ); }", "title": "" }, { "docid": "c4a5500c7a58ba8b141a1f57b3ec0ef0", "score": "0.6668806", "text": "function function_name() {\n\tadd_theme_support('title-tag'); \n}", "title": "" }, { "docid": "0e4d3bb0f5e54bb90e3da15cf78fa215", "score": "0.6665291", "text": "public function hook_entry_content_before() {\n\t\t\t$after_entry_title = astra_get_option( 'hook-entry-content-before' );\n\t\t\techo do_shortcode( $after_entry_title );\n\t\t}", "title": "" }, { "docid": "4f83e370cf645afa5a4baed25c61279a", "score": "0.665718", "text": "function alice_benham_setup(){\n add_theme_support( 'title-tag' );\n\n}", "title": "" }, { "docid": "e5cb8f5874b094f7f9701ffa23910783", "score": "0.6644812", "text": "function staff_cpt() {\n\n $labels = label_factory('Staff', 'Staff', 'Staff');\n\n $args = array(\n 'label' => 'Staff',\n 'labels' => $labels,\n 'supports' => array( 'title', ),\n 'hierarchical' => true,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 20,\n 'menu_icon' => 'dashicons-nametag',\n 'show_in_admin_bar' => true,\n 'show_in_nav_menus' => false,\n 'can_export' => true,\n 'has_archive' => 'people',\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n );\n register_post_type( 'staff', $args );\n\n}", "title": "" }, { "docid": "1b2289b5601a879426d2a78b54edb9ca", "score": "0.6628969", "text": "function wpb_change_title_text( $title ){\n $screen = get_current_screen();\n \n if ( 'cats' == $screen->post_type ) {\n $title = 'Fyll i kattens namn';\n }\n \n return $title;\n}", "title": "" }, { "docid": "19b7d2d80a296b0ceca13389020a60af", "score": "0.6623299", "text": "function projects_cpt() {\n\n $labels = label_factory('Projects', 'Project', 'Projects');\n\n $args = array(\n 'label' => 'Projects',\n 'labels' => $labels,\n 'supports' => array( 'title', ),\n 'taxonomies' => array( 'project_type' ),\n 'hierarchical' => true,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 20,\n 'menu_icon' => 'dashicons-hammer',\n 'show_in_admin_bar' => true,\n 'show_in_nav_menus' => false,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n 'show_in_rest' => true\n );\n register_post_type( 'projects', $args );\n\n}", "title": "" }, { "docid": "062dbff58c8a94b1719a0b18fcb05937", "score": "0.66134983", "text": "function tha_content_before() {\n\tdo_action( 'tha_content_before' );\n}", "title": "" }, { "docid": "22bd3d492b4f5e09246cba90a278fac9", "score": "0.65953577", "text": "function roots_wp_title($title) {\n if (is_feed()) {\n return $title;\n }\n\n $title .= get_bloginfo('name');\n\n return $title;\n}", "title": "" }, { "docid": "6fe2c764b7deb87f23c942b144101df2", "score": "0.6561696", "text": "function x_doc_title(){\n global $paged;\n \n echo '[';\n if (function_exists('is_tag') && is_tag()) {\n single_tag_title(\"Tag Archive for &quot;\"); echo '&quot; - '; \n } elseif (is_archive()){\n wp_title(''); echo ' In the Past - '; \n } elseif (is_search()) {\n echo 'Search for &quot;'. wp_specialchars(get_search_query()) .'&quot; - '; \n \n } elseif (!(is_404()) && (is_single()) || (is_page())) {\n wp_title(''); echo ' - '; \n } elseif (is_404()) {\n echo 'Not Found - '; \n } if (is_home()) {\n bloginfo('name'); echo ' - '; bloginfo('description'); \n } else {\n bloginfo('name'); \n }\n\n if ($paged > 1) {\n echo ' - page '. $paged; \n }\n echo ' ]';\n}", "title": "" }, { "docid": "22ead323f8b7cf4c5afe38429098558f", "score": "0.6556366", "text": "function alfred_enter_title_here( $title ) {\n\tglobal $post;\n\t\n\tif ( $post->post_type == 'client' ) {\n\t\t$title = __( 'Client Name', 'alfred' );\n\t} elseif ( $post->post_type == 'project' ) {\n\t\t$title = __( 'Project Title', 'alfred' );\n\t} elseif( $post->post_type == 'task' ) {\n\t\t$title = __( 'Task Title', 'alfred ');\n\t}\n\t\n\treturn $title;\n}", "title": "" }, { "docid": "418b7af1cf8c147682db8ec864c0e4dd", "score": "0.65555966", "text": "function aglee_pro_render_title() {\n ?>\n <title><?php wp_title( '|', true, 'right' ); ?></title>\n <?php\n }", "title": "" }, { "docid": "d4ecb9ba86341cd68a0d6fe56a7bd304", "score": "0.6546663", "text": "function news_portal_customize_partial_related_title() {\r\n return get_theme_mod( 'news_portal_related_posts_title' );\r\n}", "title": "" }, { "docid": "5c9d1eb2edcc500dbd68a905d0ae715c", "score": "0.6541305", "text": "function gridbox_customize_partial_blog_title() {\r\n\t$theme_options = gridbox_theme_options();\r\n\techo wp_kses_post( $theme_options['blog_title'] );\r\n}", "title": "" }, { "docid": "5e0e6340aadca59537610336a3672f50", "score": "0.6530618", "text": "function zeo_final_title(){\n\t$zeo_rewrite_title = new zeo_rewrite_title();\n\n\t// We want to act when the page is 99% complete\n\tadd_action('wp_footer', array(&$zeo_rewrite_title, 'wpzeo_footer'));\n\n\t// There is no action hook for \"start of processing\",\n\t// so we use this implicitly.\n\t$zeo_rewrite_title->starting();\n}", "title": "" }, { "docid": "da6800f909abb327cb7efcf532c1c32e", "score": "0.6527209", "text": "function echotheme_pre_wp_head()\n{ \n\t// run the hook to add custom stuff at end of head\n\tdo_action('echotheme_pre_wp_head');\n}", "title": "" }, { "docid": "61250586b93aa0ed071e7c7c6f9501cc", "score": "0.6522895", "text": "function tevolution_post_title()\r\n{\r\n\t$title = get_the_title();\r\n\t$is_related = get_query_var('is_related');\r\n\tif ( strlen( $title ) == 0 )\r\n\t\treturn;\r\n\tif (( is_singular() || is_single()) && !is_front_page() && !is_home() && !$is_related)\r\n\t\t$title = sprintf( '<h1 class=\"entry-title\">%s</h1>', $title );\r\n\telse\r\n\t\t$title = sprintf( '<h2 class=\"entry-title\"><a itemprop=\"url\" href=\"%s\" title=\"%s\" rel=\"bookmark\">%s</a></h2>', get_permalink(), the_title_attribute( 'echo=0' ), $title);\r\n\techo $title;\r\n}", "title": "" }, { "docid": "888a5898f90c78e83e2e4f9d4acbbb0f", "score": "0.6520591", "text": "function ucmaster_wp_title($title) {\n if (is_feed()) {\n return $title;\n }\n\n $title .= get_bloginfo('name');\n\n return $title;\n}", "title": "" }, { "docid": "fc2cb6cea45ad4276452e3a1fcbbe86f", "score": "0.6501714", "text": "function clients_cpt() {\n\n $labels = label_factory('Clients', 'Client', 'Clients');\n\n $args = array(\n 'label' => 'Clients',\n 'labels' => $labels,\n 'supports' => array( 'title', ),\n 'taxonomies' => array( 'client_type' ),\n 'hierarchical' => true,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 20,\n 'menu_icon' => 'dashicons-clipboard',\n 'show_in_admin_bar' => true,\n 'show_in_nav_menus' => false,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n );\n register_post_type( 'clients', $args );\n\n}", "title": "" }, { "docid": "79553cc9861dcd6b2f93bdcc1705b34c", "score": "0.64959294", "text": "function dp_cpt_register() {\n $args = array(\n 'public' => true,\n 'label' => 'Da Popup',\n 'show_in_nav_menus' => false,\n 'menu_position' => 80,\n 'menu_icon' => 'dashicons-welcome-comments',\n 'supports' => array('title', 'thumbnail'),\n 'rewrite' => array('slug' => 'da-popup', 'with_front' => false),\n );\n register_post_type( 'da-popup', $args );\n}", "title": "" }, { "docid": "c10b448f32ac35a0e089c858fde82df2", "score": "0.64957035", "text": "function storefront_post_header() {\n\t\t?>\n\t\t<header class=\"entry-header\">\n\t\t<?php\n \tthe_title( '<h1 class=\"kp-entry-title --entry-title\">', '</h1>' );\n // Mihail update 05-10-19\n\t\t/*if ( is_single() ) {\n\t\t\tstorefront_posted_on();\n\t\t\tthe_title( '<h1 class=\"entry-title\">', '</h1>' );\n\t\t} else {\n\t\t\tif ( 'post' == get_post_type() ) {\n\t\t\t\tstorefront_posted_on();\n\t\t\t}\n\n\t\t\tthe_title( sprintf( '<h2 class=\"alpha entry-title\"><a href=\"%s\" rel=\"bookmark\">', esc_url( get_permalink() ) ), '</a></h2>' );\n\t\t}*/\n\t\t?>\n\t\t</header><!-- .entry-header -->\n\t\t<?php\n\t}", "title": "" }, { "docid": "3f4a9e5d4bfc09297847ba89c48b80bb", "score": "0.64637953", "text": "function change_default_title( $title ){\n $screen = get_current_screen();\n if ( 'coworkers' == $screen->post_type ){\n $title = 'Enter full name here';\n }\n return $title;\n}", "title": "" }, { "docid": "d15cc7fe8d1f50a11d52d5bca65ec400", "score": "0.6460152", "text": "function geraTitle(){\n\n bloginfo('name');\n if (!is_home()) echo ' | ';\n the_title();\n }", "title": "" }, { "docid": "05cd28b989632600306e6507313948b3", "score": "0.644288", "text": "function storefront_post_header() {\n ?>\n <header class=\"entry-header\">\n <?php\n if (is_single()) {\n storefront_posted_on();\n the_title('<h1 class=\"entry-title\">', '</h1>');\n } else {\n if ('post' == get_post_type()) {\n storefront_posted_on();\n }\n\n the_title(sprintf('<h1 class=\"entry-title\"><a href=\"%s\" rel=\"bookmark\">', esc_url(get_permalink())), '</a></h1>');\n }\n ?>\n </header><!-- .entry-header -->\n <?php\n }", "title": "" }, { "docid": "786b0df1367a8ca38a57ceb6f4a54f7e", "score": "0.64404273", "text": "function zues_entry_title() {\n\n\t\tif ( is_singular() ) {\n\t\t\tthe_title( '<h1 '.zues_get_attr( 'entry-title' ).'>', '</h1>' );\n\t\t} else {\n\t\t\tthe_title( sprintf( '<h2 %s><a href=\"%s\" rel=\"bookmark\">', zues_get_attr( 'entry-title' ), esc_url( get_permalink() ) ), '</a></h2>' );\n\t\t}\n\t}", "title": "" }, { "docid": "8fe95d033fe391903fbb02a956a05810", "score": "0.64382845", "text": "function fly_casino_posts() {\r\nif (get_theme_option('affiliate-slug')){\r\n\t$slug=get_theme_option('affiliate-slug');\r\n } else { $slug= 'review'; \r\n\r\n}\r\n\r\n$args = array(\r\n 'labels' => array( \r\n 'name' => __( 'Casinos' ),\r\n 'singular_name' => __( 'Casino' ),\r\n 'add_new' => __( 'Add New Casino' ),\r\n\t'add_new_item' => __( 'Add New Casino' ),\r\n\t'edit' => __( 'Edit Casino' ),\r\n\t'edit_item' => __( 'Edit Casino' ),\r\n\t'new_item' => __( 'New Casino' ),\r\n\t'view' => __( 'View Casino' ),\r\n\t'view_item' => __( 'View Casino' ),\r\n\t'search_items' => __( 'Search Casinos' ),\r\n\t'not_found' => __( 'No Casinos found' ),\r\n\t'not_found_in_trash' => __( 'No Casinos found in Trash' ),\r\n\t'parent' => __( 'Parent Casino' ),\r\n\r\n ),\r\n\r\n 'public' => true,\r\n 'show_ui' => true,\r\n 'capability_type' => 'post',\r\n 'hierarchical' => false,\r\n 'rewrite' => array( 'slug' => $slug, 'with_front' => false ),\r\n 'supports' => array('title', 'editor', 'excerpt', 'thumbnail', 'custom-fields', 'page-attributes','comments','author')\r\n);\r\n\r\nregister_post_type('casino',$args);\r\n\r\n $labels = array(\r\n 'name' => _x( 'Casino Tags', 'Casino tag' ),\r\n 'singular_name' => _x( 'Casino tag', 'Casino tag' ),\r\n 'search_items' => __( 'Search Casino Tags' ),\r\n 'all_items' => __( 'All Casino Tags' ),\r\n 'parent_item' => __( 'Parent Casino Tag' ),\r\n 'parent_item_colon' => __( 'Parent Casino Tag:' ),\r\n 'edit_item' => __( 'Edit Casino Tag' ), \r\n 'update_item' => __( 'Update Casino Tag' ),\r\n 'add_new_item' => __( 'Add New Casino Tag' ),\r\n 'new_item_name' => __( 'New Casino Tag' ),\r\n 'menu_name' => __( 'Casino Tags' ),\r\n ); \t\r\n\r\nregister_taxonomy('casino-tags',array('casino'), array(\r\n 'hierarchical' => false,\r\n 'labels' => $labels,\r\n 'show_ui' => true,\r\n 'query_var' => true,\r\n 'rewrite' => array( 'slug' => 'casinotags' ),\r\n ));\r\n\r\n}", "title": "" }, { "docid": "c44bc6708ceed5822f039f5374fee82a", "score": "0.6438218", "text": "function opubco_custom_title($title, $post_id ) {\n global $post;\n\tif ( is_admin() ) return $title;\n\t\n if ( in_the_loop() ) {\n\n if( get_post_meta($post->ID,'custom_h1', true ) ){\n return get_post_meta( $post->ID,'custom_h1', true );\n } else{\n return $title; \n }\n } else {\n\t $custom_h1 = get_post_meta( $post_id, 'custom_h1', true );\n\t if ( $custom_h1 ) {\n\t\t\t$custom_h1 = trim( $custom_h1 );\n\t\t\tif ( !empty( $custom_h1 ) ) {\n\t\t\t\t$title = $custom_h1;\n\t\t\t}\n\t }\n }\n\n return $title;\n}", "title": "" }, { "docid": "a911bd59ce9ca927cb116216bee4d946", "score": "0.64242095", "text": "function sgwindow_render_title() {\n ?>\n <title><?php wp_title( '|', true, 'right' ); ?></title>\n <?php\n }", "title": "" }, { "docid": "f8e87a2197146ab9d389c9ba4d3ca182", "score": "0.64194953", "text": "function abc_display_page_title() {\r\n\r\n if (is_front_page()) { ?>\r\n\r\n<h1 id=\"hentry-title\">ABC d'air : l'air de A à Z</h1>\r\n\r\n<?php } elseif (is_home()) { ?>\r\n\r\n<h1 id=\"hentry-title\">Blog</h1>\r\n\r\n<?php } elseif (is_post_type_archive()) { ?>\r\n\r\n<h1 id=\"hentry-title\"><?php post_type_archive_title(); ?></h1>\r\n\r\n<?php } elseif (is_archive()) { ?>\r\n\r\n<h1 id=\"hentry-title\">Articles dans la catégorie <?php single_cat_title(); ?></h1>\r\n\r\n<?php } elseif (is_single() || is_page()) { ?>\r\n\r\n<h1 id=\"hentry-title\"><?php echo get_the_title($post->ID); ?></h1>\r\n\r\n<?php }\r\n}", "title": "" }, { "docid": "4d6d6658ea66388a3c3b1a64f13da2e9", "score": "0.6389162", "text": "function px_post_page_title(){\n\t\t\n\t\tif ( is_author() ) {\n\t\t\tglobal $author;\n\t\t\t$userdata = get_userdata($author);\n\t\t\techo __('Author', 'Soccer Club') . \" \" . __('Archives', 'Soccer Club') . \": \".$userdata->display_name;\n\t\t}\n \t\telseif ( is_tag() || is_tax('event-tag') || is_tax('portfolio-tag') || is_tax('sermon-tag') ) {\n\t\t\techo __('Tags', 'Soccer Club') . \" \" . __('Archives', 'Soccer Club') . \": \" . single_cat_title( '', false );\n\t\t}\n \t\telseif ( is_category() || is_tax('event-category') || is_tax('portfolio-category') || is_tax('season-category') || \n\t\tis_tax('sermon-series') || is_tax('sermon-pastors') ) {\n\t\t\techo __('Categories', 'Soccer Club') . \" \" . __('Archives', 'Soccer Club') . \": \" . single_cat_title( '', false );\n\t\t}\n \t\telseif( is_search()){\n\t\t\tprintf( __( 'Search Results %1$s %2$s', 'Soccer Club' ), ': ','<span>' . get_search_query() . '</span>' );\n\t\t}\n \t\telseif ( is_day() ) {\n\t\t\tprintf( __( 'Daily Archives: %s', 'Soccer Club' ), '<span>' . get_the_date() . '</span>' );\n\t\t}\n \t\telseif ( is_month() ) {\n\t\t\tprintf( __( 'Monthly Archives: %s', 'Soccer Club' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'Soccer Club' ) ) . '</span>' );\n\t\t}\n \t\telseif ( is_year() ) {\n\t\t\tprintf( __( 'Yearly Archives: %s', 'Soccer Club' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'Soccer Club' ) ) . '</span>' );\n\t\t}\n \t\telseif ( is_404()){\n\t\t\t_e( 'Error 404', 'Soccer Club' );\n\t\t}\n \t\telseif(!is_page()){\n\t\t\t_e( 'Archives', 'Soccer Club' );\n\t\t}\n\n\t}", "title": "" }, { "docid": "b40a55b51151ae5e3db496e4e6b45728", "score": "0.63813686", "text": "function sample_init() {\n $args = array(\n 'label' => 'Sample CPT',\n 'public' => true,\n 'show_ui' => true,\n 'capability_type' => 'page',\n 'hierarchical' => false,\n 'rewrite' => array('slug'=>'sample'),\n 'query_var' => true,\n 'menu_icon' => 'dashicons-video-alt',\n 'supports' => array(\n 'title',\n 'editor',\n 'excerpt',\n 'thumbnail',\n 'page-attributes',)\n );\n register_post_type( 'sample', $args );\n}", "title": "" }, { "docid": "c2cb716f1c21c8cab782a228b9234203", "score": "0.63734496", "text": "function press_custom_init() {\n $labels = array(\n 'name' => 'Press Articles',\n 'singular_name' => 'Press Article',\n 'add_new' => 'Add Press Article',\n 'add_new_item' => 'Add New Press Article',\n 'edit_item' => 'Edit Press Article',\n 'new_item' => 'New Press Article',\n 'all_items' => 'All Press Articles',\n 'view_item' => 'View Press Article',\n 'search_items' => 'Search Press Articles',\n 'not_found' => 'No Press Articles found',\n 'not_found_in_trash' => 'No Press Articles found in Trash', \n 'parent_item_colon' => '',\n 'menu_name' => 'Press Articles'\n );\n\n $args = array(\n 'labels' => $labels,\n 'description' => 'Water Is My Sky Press Article',\n 'menu_position' => 1,\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true, \n 'show_in_menu' => true, \n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'press-articles' ),\n 'capability_type' => 'post',\n 'has_archive' => true, \n 'hierarchical' => false,\n 'menu_position' => null,\n 'supports' => array( 'title', 'author', 'thumbnail', 'excerpt', 'comments' ), // 'editor', ---removed\n 'taxonomies' => array('category', 'post_tag')\n ); \n\n register_post_type( 'press', $args );\n}", "title": "" }, { "docid": "8137eb059245cfcc47e51bf1a739decf", "score": "0.6367527", "text": "function create_scoutbook_gear() {\n register_post_type( 'gear',\n array(\n 'labels' => array(\n 'name' => 'Gear',\n 'singular_name' => 'Gear',\n 'add_new' => 'Add New',\n 'add_new_item' => 'Add New Gear',\n 'edit' => 'Edit',\n 'edit_item' => 'Edit Gear',\n 'new_item' => 'New Gear',\n 'view' => 'View',\n 'view_item' => 'View Gear',\n 'search_items' => 'Search Gear',\n 'not_found' => 'No Gear found',\n 'not_found_in_trash' => 'No Gear found in Trash',\n 'parent' => 'Parent'\n ),\n 'public' => true,\n 'menu_position' => 15,\n 'supports' => array( 'title', 'editor'),\n 'taxonomies' => array( '' ),\n 'menu_icon' => plugins_url( 'assets/icon-20x20.png', __FILE__ ),\n 'has_archive' => true\n )\n );\n}", "title": "" }, { "docid": "c43e3cc936b1626c535b74c6b1eedd07", "score": "0.6366279", "text": "function wpfstop_change_default_title( $title ){\n $screen = get_current_screen();\n if ( 'medarbejder' == $screen->post_type ){\n $title = 'Medarbejder navn';\n }\n return $title;\n}", "title": "" }, { "docid": "48bd730e883381c01dad0fbffb259c15", "score": "0.63661045", "text": "public function get_title() {\n\t\treturn __( 'aThemes: Posts', 'elementor' );\n\t}", "title": "" }, { "docid": "f0d13c841a197ffac9e2bd3d676ab19b", "score": "0.63660586", "text": "function codex_historia_init() {\n $labels = array(\n 'name' => _x('Historia', 'post type general name'),\n 'singular_name' => _x('Historia', 'post type singular name'),\n 'add_new' => _x('Add New', 'historia'),\n 'add_new_item' => __('Add New Historia'),\n 'edit_item' => __('Edit Historia'),\n 'new_item' => __('New Historia'),\n 'all_items' => __('All Historia'),\n 'view_item' => __('View Historia'),\n 'search_items' => __('Search Historia'),\n 'not_found' => __('No historia found'),\n 'not_found_in_trash' => __('No historia found in Trash'), \n 'parent_item_colon' => '',\n 'menu_name' => __('Historia')\n\n );\n $args = array(\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true, \n 'show_in_menu' => true, \n 'query_var' => true,\n 'rewrite' => true,\n 'capability_type' => 'post',\n 'has_archive' => true, \n 'hierarchical' => false,\n 'menu_position' => null,\n 'supports' => array( 'title', 'editor', 'thumbnail' )\n ); \n register_post_type('historia',$args);\n}", "title": "" }, { "docid": "15ec884665adb147eef363bf3f443454", "score": "0.6363366", "text": "function gutenberg_render_title_tag() {\n\techo '<title>' . wp_get_document_title() . '</title>' . \"\\n\";\n}", "title": "" }, { "docid": "c517a80f54b02f453cb7b6a517cd315e", "score": "0.63594645", "text": "function echotheme_title()\n{\n\t/*\n\t * Print the <title> tag content based on what is being viewed.\n\t */\n\tglobal $page, $paged;\n\t\n\t$separator = ' - ';\n\n\twp_title( $separator, true, 'right' );\n\n\t// Add the blog name.\n\tbloginfo( 'name' );\n\n\t// Add the blog description for the home/front page.\n\t$site_description = get_bloginfo( 'description', 'display' );\n\tif ( $site_description && ( is_home() || is_front_page() ) )\n\t\techo $separator . $site_description;\n\n\t// Add a page number if necessary:\n\tif ( $paged >= 2 || $page >= 2 )\n\t\techo $separator . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) );\n}", "title": "" }, { "docid": "049c394dd82c6fc69504874570aade0f", "score": "0.63578784", "text": "function loor_page_title() {\n ?>\n <header class=\"taxonomy-header\">\n <h1 class=\"taxonomy-title main-title\">\n <?php\n if (is_home()) {\n if (get_option('page_for_posts', true)) {\n echo get_the_title(get_option('page_for_posts', true));\n } else {\n _e('Latest Posts', 'loor');\n }\n } elseif (is_archive()) {\n $term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));\n if ($term) {\n echo $term->name;\n } elseif (is_post_type_archive()) {\n echo get_queried_object()->labels->name;\n } elseif (is_day()) {\n printf(esc_html__('Daily Archives: %s', 'loor'), get_the_date());\n } elseif (is_month()) {\n printf(esc_html__('Monthly Archives: %s', 'loor'), get_the_date('F Y'));\n } elseif (is_year()) {\n printf(esc_html__('Yearly Archives: %s', 'loor'), get_the_date('Y'));\n } elseif (is_author()) {\n $author = get_queried_object();\n printf(esc_html__('Author Archives: %s', 'loor'), $author->display_name);\n } else {\n single_cat_title();\n }\n } elseif (is_search()) {\n printf(esc_html__('Search Results for %s', 'loor'), get_search_query());\n } elseif (is_404()) {\n esc_html_e('Not Found', 'loor');\n } else {\n the_title();\n }\n ?>\n <h1>\n </header>\n <?php\n}", "title": "" }, { "docid": "c2704ecfca15523fc46690b5a896b988", "score": "0.6356882", "text": "function tha_entry_before() {\n\tdo_action( 'tha_entry_before' );\n}", "title": "" }, { "docid": "2e69cf4e19a9969fa27d0b4dccf7f040", "score": "0.635425", "text": "function my_theme_archive_title( $title ) {\n if ( is_category() ) {\n $title = single_cat_title( '', false );\n } elseif ( is_tag() ) {\n $title = single_tag_title( '', false );\n } elseif ( is_post_type_archive() ) {\n $title = post_type_archive_title( '', false );\n } elseif ( is_tax() ) {\n $title = single_term_title( '', false );\n }\n return $title;\n}", "title": "" }, { "docid": "62e57933a76106f19dcf29715aeaf300", "score": "0.6347506", "text": "function cct_default_title( $post_title, $post ){\n\t$date = new DateTime();\n\t$today = $date->getTimestamp();\n\t$custom_post_type = 'product';\n\n // do it only on your custom post type(s)\n if( $post->post_type !== $custom_post_type )\n return $post_title;\n\n\t// create your preferred title here\n\t$post_title = $today;\n\n return $post_title;\n}", "title": "" }, { "docid": "d9db2a5fe743adbb51fb3f56754497bf", "score": "0.6346065", "text": "function custom_theme()\r\n{\r\n add_theme_support('post-thumbnails');\r\n\r\n // Ajouter automatiquement le titre du site dans l'en-tête du site\r\n add_theme_support('title-tag');\r\n\r\n // Logo du site \r\n add_theme_support('custom-logo');\r\n}", "title": "" }, { "docid": "46ed8cd3cf90634ecd23e3791683c9fd", "score": "0.6346016", "text": "function gc_shortcode_title() {\n\t// This is called on the page that is \n\t//using the shortcode so it get's it's title\n\treturn get_the_title(get_the_ID());\n}", "title": "" }, { "docid": "8eab71da907f9e762dddc3abfd361afc", "score": "0.63421726", "text": "function wpb_change_title_text( $title ){\r\n $screen = get_current_screen();\r\n if ( 'nasis_investments' == $screen->post_type ) {\r\n $title = 'Enter property title here';\r\n }\r\n\r\n elseif ( 'nasis_team' == $screen->post_type ) {\r\n $title = 'Enter name here';\r\n }\r\n return $title;\r\n}", "title": "" }, { "docid": "b42b43ce1432ae52d9ba52f155d8f74f", "score": "0.6339416", "text": "function get_post_type_title() {\n\t$post_type = get_query_var( 'post_type' );\n\tif ( is_array( $post_type ) ) {\n\t\t$post_type = reset( $post_type );\n\t}\n\t$post_type_obj = get_post_type_object( $post_type );\n\treturn apply_filters( 'post_type_archive_title', $post_type_obj->labels->name, $post_type );\n}", "title": "" }, { "docid": "36ac9ef2cecd32193046c67f49d3038b", "score": "0.63378495", "text": "function brightbrain_preprocess_page(&$variables, $hook) {\n\n // remove default page title\n $variables['title'] = \"\";\n \n}", "title": "" }, { "docid": "fe5d78cda6a8225ea87d193e25afa4a2", "score": "0.6336322", "text": "function tallyfn_title2($tally_custom_page_title = NULL) {\n\t\n\tglobal $wp_query;\n\t$output = '';\n\t\n\tif ( is_home()){\n\t\t$home_page = get_page( get_queried_object_id() );\n\t\t$output = get_the_title( $home_page->ID );\n\t}elseif ( is_singular() ) {\n\t\t/* Get singular post variables needed. */\n\t\t$post = get_queried_object();\n\t\t$post_id = absint( get_queried_object_id() );\n\t\t$post_type = $post->post_type;\n\t\t$parent = absint( $post->post_parent );\n\t\t/* Get the post type object. */\n\t\t$post_type_object = get_post_type_object( $post_type );\n\t}else{\n\t\t$output = get_the_title();\n\t}\n\t\n\tif( $tally_custom_page_title != NULL ){ echo $tally_custom_page_title; }else{ echo $output; }\n}", "title": "" }, { "docid": "6e0a5803f461185c4c3d42b4cd55902f", "score": "0.6334689", "text": "function get_plugin_page_title() {\n return apply_filters('c3cf_settings_page_title', $this->plugin_title);\n }", "title": "" }, { "docid": "f8c710361ce170ffec46876bc6666404", "score": "0.6331059", "text": "function cptui_register_my_cpt_article() {\nregister_post_type('article', array(\n 'label' => 'Journal',\n 'description' => '',\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'capability_type' => 'post',\n 'map_meta_cap' => true,\n 'hierarchical' => false,\n #'rewrite' => array('slug' => 'article', 'with_front' => true),\n 'rewrite' => false,\n 'query_var' => true,\n 'menu_icon' => '/wp-content/themes/jomi/assets/img/logo-notext-s.png',\n 'supports' => array('title','editor','excerpt','trackbacks','custom-fields','comments','revisions','thumbnail','author','page-attributes','post-formats'),\n 'taxonomies' => array('category','post_tag'),\n 'labels' => array (\n 'name' => 'Journal',\n 'singular_name' => 'Article',\n 'menu_name' => 'Journal',\n 'add_new' => 'Add Article',\n 'add_new_item' => 'Add New Article',\n 'edit' => 'Edit',\n 'edit_item' => 'Edit Article',\n 'new_item' => 'New Article',\n 'view' => 'View Article',\n 'view_item' => 'View Article',\n 'search_items' => 'Search Journal',\n 'not_found' => 'No Journal Found',\n 'not_found_in_trash' => 'No Journal Found in Trash',\n 'parent' => 'Parent Article',\n )\n) ); \n}", "title": "" }, { "docid": "9cdfdbaf66c07c88ee378285337eb172", "score": "0.6330618", "text": "function register_cpt() {\n}", "title": "" }, { "docid": "a8686494d2705b1f5966c9a56bbdab39", "score": "0.6329138", "text": "function the_head_admin() {\n\tdo_action('the_head_admin');\n}", "title": "" }, { "docid": "b02a7c4cf8b055f70b3c148dcd47b111", "score": "0.63285387", "text": "function reach_product_wpseo_title($title) {\n if( is_post_type_archive( 'helpwanted' ) ) {\n //$title = \"Help Wanted - Job Listings In Downeast Maine\";\n }\n\t\tif( is_post_type_archive( 'rentals' ) ) {\n $title = \"Homes & Apartments for rent in Hancock County\";\n }\n\t\tif( is_post_type_archive( 'classifieds' ) || is_front_page() ) {\n $title = \"Find what you're looking for - Hancock County Classifieds\";\n }\n\t\tif( is_post_type_archive( 'realestate' ) ) {\n //$title = \"Find properties for sale in Hancock County \";\n }\n return $title;\n}", "title": "" }, { "docid": "56d458f519cfbc9ced11b4a922cf90e2", "score": "0.63259774", "text": "function bootstrapstarter_wp_setup() {\n\tadd_theme_support( 'title-tag' );\n\tadd_theme_support( 'post-thumbnails' );\n}", "title": "" }, { "docid": "9f833f13f34f08376cfdbdf5a488e56e", "score": "0.6320483", "text": "function ibio_content_archive_setup(){\n add_action( 'body_class', 'ibio_grid_body_class' );\n add_filter( 'genesis_post_title_text', 'ibio_talk_short_title' );\n remove_action( 'genesis_entry_header', 'genesis_post_info', 8 );\n remove_action( 'genesis_entry_content', 'genesis_do_post_content' );\n remove_action( 'genesis_entry_footer', 'genesis_post_meta' );\n}", "title": "" }, { "docid": "9b442f2366dbbd3fb0dcad635e74ddc0", "score": "0.6319547", "text": "function gt_lead_post_type(){\r\n register_post_type('Lead Generation',\r\n array(\r\n 'rewrite' => array('slug' => 'lead_generation'),\r\n 'labels' => array(\r\n 'name' => 'Lead Generation',\r\n 'singular_name' => 'Lead Generation',\r\n 'add_new_item' => 'Add New Lead Generation',\r\n 'edit_item' => 'Edit Lead Generation'\r\n ),\r\n 'menu-icon' => 'dashicons-admin-customizer',\r\n 'public' => true,\r\n 'has_archive' => true,\r\n 'supports' => array(\r\n 'title', 'thumbnail', 'editor', 'excerpt', 'comments'\r\n )\r\n )\r\n );\r\n}", "title": "" }, { "docid": "d8fe42b2454cf9e8af8c49f780f13e90", "score": "0.631611", "text": "function post_type_press() {\n\n register_post_type(\n 'press',\n array('label' => __('Press Article'),\n 'singular_label' => __('Press Article'),\n 'public' => true,\n 'rewrite' => array('slug' => 'press'), // modify the page slug / permalink\n 'show_ui' => true,\n 'capability_type' => 'post',\n 'hierarchical' => false, //it means we cannot have parent and sub pages\n 'query_var' => false,\n 'exclude_from_search' => true,\n 'supports' => array(\n 'title', // entry title\n 'thumbnail', // featured image\n 'editor', //standard wysywig editor\n 'page-attributes'),\n 'labels' => array(\n 'name' => __( 'Press Articles' ),\n 'singular_name' => __( 'Press Article' ),\n 'add_new' => __( 'Add New' ),\n 'add_new_item' => __( 'Add New Press Article' ),\n 'edit' => __( 'Edit' ),\n 'edit_item' => __( 'Edit Press Article' ),\n 'new_item' => __( 'New Press Article' ),\n 'view' => __( 'View Press Articles' ),\n 'view_item' => __( 'View Press Article' ),\n 'search_items' => __( 'Search Press Articles' ),\n 'not_found' => __( 'No Press Article Found' ),\n 'not_found_in_trash' => __( 'No Press Articles Found in Trash' ),\n 'parent' => __( 'Parent Press Article' )\n )\n )\n\n );\n\n register_taxonomy_for_object_type('post_tag', 'press'); // Change to match custom content name\n}", "title": "" }, { "docid": "1e8b6223acb373d5512dba6f3e905de9", "score": "0.631039", "text": "function callie_britt_wp_theme_setup() {\n\t\tadd_filter('wp_title',\t\t\t\t\t\t'callie_britt_wp_title');\n\t\tadd_filter('wp_title_parts',\t\t\t\t'callie_britt_wp_title');\n\t\tadd_filter('document_title_parts',\t\t\t'callie_britt_wp_title');\n\n\t\t// Breadcrumbs link 'All posts'\n\t\tadd_filter('post_type_archive_link',\t\t'callie_britt_get_template_page_link', 10, 2);\n\n\t\t// Comment form fields order\n\t\tadd_filter('comment_form_fields',\t\t\t'callie_britt_comment_form_fields');\n\t}", "title": "" }, { "docid": "b620053fb6e6bbd5a838893ab2a7e1c1", "score": "0.63082194", "text": "function rp_register_scheda_ristorante() {\n\n $rp_schede_labels = array(\n 'name' => __('Schede Ristoranti'),\n 'singular_name' => __('Scheda Ristornate'),\n 'add_new' => __('Aggiungi Nuova'),\n 'add_new_item' => __('Nuova'),\n 'edit_item' => __('Modifica'),\n 'new_item' => __('Nuova'),\n 'all_items' => __('Elenco Schede Ristoranti'),\n 'view_item' => __('Visualizza'),\n 'search_items' => __('Cerca'),\n 'not_found' => __('Scheda non trovato'),\n 'not_found_in_trash' => __('Scheda non trovato nel cestino'),\n );\n\n $rp_schede_cpt = array(\n 'labels' => $rp_schede_labels,\n 'public' => true,\n 'rewrite' => array('slug' => 'ristoranti'),\n 'has_archive' => true,\n 'hierarchical' => false,\n 'menu_position' => 4,\n 'supports' => array(\n 'title',\n 'editor',\n 'thumbnail',\n ),\n );\n\n register_post_type('ristoranti', $rp_schede_cpt);\n\n}", "title": "" }, { "docid": "98415b92873c17d5d7f1835e346a708b", "score": "0.6306103", "text": "function pagelines_filter_title( $title ) {\n\tglobal $wp_query, $s, $paged, $page;\n\t$sep = __( '|','pagelines' );\n\t$new_title = get_bloginfo( 'name' ) . ' ';\n\t$bloginfo_description = get_bloginfo( 'description' );\n\tif( is_feed() ) {\n\t\t$new_title = $title;\n\t} elseif ( ( is_home () || is_front_page() ) && ! empty( $bloginfo_description ) && ! $paged && ! $page ) {\n//\t\t$new_title .= $sep . ' ' . $bloginfo_description;\n\t} elseif ( is_category() ) {\n\t\t$new_title .= $sep . ' ' . single_cat_title( '', false );\n\t} elseif ( is_single() || is_page() ) {\n\t\t$new_title .= $sep . ' ' . single_post_title( '', false );\n\t} elseif ( is_search() ) {\n\t\t$new_title .= $sep . ' ' . sprintf( __( 'Search Results: %s','pagelines' ), esc_html( $s ) );\n\t} else\n\t\t$new_title .= $sep . ' ' . $title;\n\tif ( $paged || $page ) {\n\t\t$new_title .= ' ' . $sep . ' ' . sprintf( __( 'Page: %s', 'pagelines' ), max( $paged, $page ) );\n\t}\n return apply_filters( 'pagelines_meta_title', $new_title );\n}", "title": "" }, { "docid": "feb71caf12c02e6043bfa2591677849c", "score": "0.6304189", "text": "function rz_articles_SEO_post_type() {\n $labels = array(\n 'name' => 'Articles Page SEO',\n 'singular_name' => 'Articles Page SEO',\n 'add_new' => '',\n 'add_new_item' => 'Add Articles Page SEO',\n 'edit_item' => 'Edit Page SEO',\n 'new_item' => 'New Articles Page SEO',\n 'all_items' => 'Articles Page SEO',\n 'view_item' => 'View Articles Page SEO',\n 'search_items' => 'Search Articles Page SEO',\n 'not_found' => 'No Articles Page SEO found',\n 'not_found_in_trash' => 'No Articles Page SEO found in Trash', \n 'parent_item_colon' => '',\n 'menu_name' => 'Articles Page SEO'\n );\n\n $args = array(\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true, \n 'show_in_menu' => 'edit.php?post_type=rz_articles', \n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'articles-seo' ),\n 'capability_type' => 'post',\n 'has_archive' => true, \n 'hierarchical' => true,\n 'menu_position' => null,\n 'supports' => array( 'title' )\n ); \n\n register_post_type( 'rz_articles_seo', $args );\n}", "title": "" }, { "docid": "fc6d57745b6cba23faa445fc1fcec090", "score": "0.62841696", "text": "function theme_name_wp_title( $title, $sep ) {\r\n\tif ( is_feed() ) {\r\n\t\treturn $title;\r\n\t}\r\n\t\r\n\tglobal $page, $paged;\r\n\r\n\t// Add the blog name\r\n\t$title .= get_bloginfo( 'name', 'display' );\r\n\r\n\t// Add the blog description for the home/front page.\r\n\t$site_description = get_bloginfo( 'description', 'display' );\r\n\tif ( $site_description && ( is_home() || is_front_page() ) ) {\r\n\t\t$title .= \" $sep $site_description\";\r\n\t}\r\n\r\n\t// Add a page number if necessary:\r\n\tif ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {\r\n\t\t$title .= \" $sep \" . sprintf( __( 'Page %s', '_s' ), max( $paged, $page ) );\r\n\t}\r\n\r\n\treturn $title;\r\n}", "title": "" }, { "docid": "c94d77c6f446d166d6b9074aeefd8f9f", "score": "0.62778705", "text": "function freelancer_portfolio_custom_init() {\n register_post_type( 'portfolio',\n array(\n 'labels' => array(\n 'name' => __( 'Portfolio', 'freelancer' ),\n 'singular_name' => __( 'Portfolio', 'freelancer' ),\n 'add_new_item' => __( 'Yeni Portfolio Ekle', 'freelancer' )\n ),\n 'public' => true,\n 'supports' => array(\n 'title'\n ),\n 'menu_icon' => 'dashicons-nametag',\n 'rewrite' => array(\n 'slug' => 'portfolio',\n 'with_front' => false\n ),\n 'has_archive' => false,\n )\n );\n}", "title": "" }, { "docid": "3ba3e6022c82e40f0d0c36f8dfee754b", "score": "0.6273711", "text": "function my_theme_archive_title( $title ) {\r\n if ( is_category() ) {\r\n $title = single_cat_title( '', false );\r\n } elseif ( is_tag() ) {\r\n $title = single_tag_title( '', false );\r\n } elseif ( is_author() ) {\r\n $title = '<span class=\"vcard\">' . get_the_author() . '</span>';\r\n } elseif ( is_post_type_archive() ) {\r\n $title = post_type_archive_title( '', false );\r\n } elseif ( is_tax() ) {\r\n $title = single_term_title( '', false );\r\n }\r\n\r\n return $title;\r\n }", "title": "" }, { "docid": "a7632212e55d7db8771944f172af402f", "score": "0.62701726", "text": "function wpbrightonTheme_blog_title() { ?>\n\n\t<div id=\"blog-title\"><span><a href=\"<?php bloginfo('url') ?>/\" title=\"<?php bloginfo('name') ?>\" rel=\"home\"><img src=\"<?php bloginfo('stylesheet_directory') ?>/images/logo.jpg\" width=\"312\"></a></span></div>\n<?php\n}", "title": "" }, { "docid": "97d5f92f60fddc688a4f7c031b12e4f3", "score": "0.62695223", "text": "function title_insert() {\r\n global $post; // VERY important!\r\n\r\n // Retrieve keyword meta data from the SEO Pack\r\n $seokeywords = stripslashes(get_post_meta($post->ID, '_aioseop_title', true));\r\n\r\n if(empty($seokeywords)){\r\n if(is_archive()){ \r\n $seokeywords .= wp_title(\"Asuransi AXA Mandiri |\");\r\n }else{\r\n $seokeywords = get_the_title($post->ID); \r\n }\r\n }\r\n\r\n // Default keywords in case none are specified for the page\r\n // if (empty($seokeywords)) $seokeywords = wp_title('|',true,'');\r\n // else $seokeywords .= wp_title('|',true,'');\r\n // if (empty($seokeywords)) $seokeywords = wp_title('',true,'');\r\n // else $seokeywords .= wp_title('',true,'');\r\n \r\n return $seokeywords;\r\n}", "title": "" }, { "docid": "bdd46851344dea79fe67244ab31be603", "score": "0.6268489", "text": "function childtheme_after_widgettitle( $content ) {\n $content = \"</h4>\\n\";\n return $content;\n}", "title": "" }, { "docid": "b5ace0d42ae56ea4c5ed1eab5e3f8d1b", "score": "0.6264107", "text": "function customPageTitle($string) {\n return sprintf(__('Categories &raquo; %s'), $string);\n}", "title": "" }, { "docid": "c3dee544978c784a9e3cbc753c3f508b", "score": "0.62608975", "text": "function gcpta_title( $title, $sep, $seplocation ) {\n\tglobal $post;\n\n\tif ( ! is_post_type_archive() ) return $title;\n\t\n\t$sep = genesis_get_seo_option( 'doctitle_sep' ) ? genesis_get_seo_option( 'doctitle_sep' ) : '–';\n\t$seplocation = genesis_get_seo_option( 'doctitle_seplocation' ) ? genesis_get_seo_option( 'doctitle_seplocation' ) : 'right';\n\t$post_type = get_post_type_object( $post->post_type );\n\t\n\t/** Determine the doctitle */\n\t$title = genesis_get_option( 'gcpta_doctitle_' . $post->post_type, 'gcpta-settings-' . $post->post_type ) ? genesis_get_option( 'gcpta_doctitle_' . $post->post_type, 'gcpta-settings-' . $post->post_type ) : $post_type->label;\n\t\n\t/** Append site description, if necessary */\n\t$title = genesis_get_option( 'gcpta_description_' . $post->post_type ) ? $title . \" $sep \" . get_bloginfo( 'description' ) : $title;\n\n\t/**\tIf we don't want site name appended */\n\tif ( ! genesis_get_seo_option( 'append_site_title' ) )\n\t\treturn esc_html( trim( $title ) );\n\n\t/** Else append the site name */\n\t$title = 'right' == $seplocation ? $title . \" $sep \" . get_bloginfo( 'name' ) : get_bloginfo( 'name' ) . \" $sep \" . $title;\n\treturn esc_html( trim( $title ) );\n\n}", "title": "" }, { "docid": "9c70276ca7f0d78f7e42a0efc4cfe22a", "score": "0.62555915", "text": "function storefront_page_header() {\n ?>\n <header class=\"entry-header\">\n <?php\n storefront_post_thumbnail('full');\n the_title('<h1 class=\"entry-title\">', '</h1>');\n ?>\n </header><!-- .entry-header -->\n <?php\n }", "title": "" }, { "docid": "525f646894ba93d1cd0df4c1548f846b", "score": "0.62531906", "text": "function my_own_custom_cpt() {\n $labels = array(\n 'name' => 'Book',\n 'singular_name' => 'Book',\n 'add_new' => 'Add New Book',\n 'all_items' => 'All Books',\n 'add_new_item' => 'Add new book',\n 'edit_item' => 'Edit Item',\n 'new_item' => 'New Book',\n 'view_item' => 'View Item',\n 'search_item' => 'Search Book',\n 'not_found' => 'No items found',\n 'not_found_in_trash' => 'No items found in trash',\n 'parent_item_colon' => 'Parent Item'\n );\n\n $args = array(\n 'labels' => $labels,\n 'public' => true,\n 'has_archive' => 'book',\n 'publicly_queryable' => true,\n 'query_var' => true,\n 'rewrite' => true,\n 'capability_type' => 'post',\n 'hierarchical' => false,\n 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ),\n //'taxonomies' => array('category', 'post_tag'),\n\t\t 'menu_position' => 50,\n\t\t 'exclude_from_search' => false\n );\n register_post_type( 'book', $args );\n}", "title": "" }, { "docid": "a959229f594618c319d8a0e41a798b69", "score": "0.6235166", "text": "function followandrew_theme_support() {\n //Adds dynamic title tag support\n add_theme_support('title-tag');\n add_theme_support('custom-logo');\n add_theme_support('post-thumbnails');\n}", "title": "" }, { "docid": "b1b37f3dbd3f8debbf16abb91a299c97", "score": "0.62276626", "text": "function modify_post_title( $data )\n{\n if ( $data['post_type'] == 'msis_29' ) { // If the actual field name of the rating date is different, you'll have to update this.\n //$date = date('m/d/Y h:i:s a', time());\n $typBadania = $data['post_type'];\n $autorid = $data['post_author'];\n $autor = get_userdata($autorid);\n $date = $data['post_date'];\n $title = 'Ankieta ' . $typBadania . '_' . $autor->user_login . '_' . $date;\n $data['post_title'] = $title ; //Updates the post title to your new title.\n }\n return $data; // Returns the modified data.\n}", "title": "" }, { "docid": "e84177b49330ff602349d20b188a7bca", "score": "0.6223283", "text": "function codex_custom_init() {\n $companylabels = array(\n 'name' => 'Company Info',\n 'singular_name' => 'Location',\n 'add_new' => 'Add New Location',\n 'add_new_item' => 'Add New Location',\n 'edit_item' => 'Edit Location',\n 'new_item' => 'New Location',\n 'all_items' => 'Company Info',\n 'view_item' => 'View Location',\n 'search_items' => 'Search Locations',\n 'not_found' => 'No Locations found',\n 'not_found_in_trash' => 'No Locations found in Trash', \n 'parent_item_colon' => '',\n 'menu_name' => 'Company Info'\n );\n\n $companyargs = array(\n 'labels' => $companylabels,\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true, \n\t'show_in_menu' => 'index.php',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'company-info' ),\n 'capability_type' => 'post',\n 'has_archive' => true, \n 'hierarchical' => false,\n 'menu_position' => null,\n 'supports' => array( 'title' )\n ); \n\n register_post_type( 'company', $companyargs );\n}", "title": "" }, { "docid": "9955ea7452cfb088de121587c314117f", "score": "0.622203", "text": "function SYNGetPageTitleTag()\n{\n global $post;\n if(is_home()){\n if(get_post_meta(get_option('page_for_posts'), 'title_tag', true)){\n echo esc_html(get_post_meta(get_option('page_for_posts'), 'title_tag', true));\n }else {\n wp_title();\n }\n }elseif(!is_tax() && !is_category() && !is_search()) {\n if(isset($post->ID) && get_post_meta($post->ID, 'title_tag', true)){\n echo esc_html(get_post_meta($post->ID, 'title_tag', true));\n }elseif(get_query_var('projectAuthor')) {\n $curauth = get_user_by('id', esc_html( get_query_var('projectAuthor') ));\n echo 'Projects by '. $curauth->display_name;\n }else {\n wp_title('-');\n }\n }else {\n wp_title('-');\n }\n\n}", "title": "" }, { "docid": "d1aa0ff08c2d8cae3a8a65cd0543ba06", "score": "0.6219427", "text": "function create_documentaire_cpt() {\n $labels = array(\n 'name' => __( 'Documentaires', 'Post Type General Name', 'club-docu' ),\n 'singular_name' => __( 'Documentaire', 'Post Type Singular Name', 'club-docu' ),\n 'menu_name' => __( 'Documentaires', 'club-docu' ),\n 'name_admin_bar' => __( 'Documentaire', 'club-docu' ),\n 'archives' => __( 'Documentaire Archives', 'club-docu' ),\n 'attributes' => __( 'Documentaire Attributes', 'club-docu' ),\n 'parent_item_colon' => __( 'Parent Documentaire:', 'club-docu' ),\n 'all_items' => __( 'All Documentaires', 'club-docu' ),\n 'add_new_item' => __( 'Add New Documentaire', 'club-docu' ),\n 'add_new' => __( 'Add New', 'club-docu' ),\n 'new_item' => __( 'New Documentaire', 'club-docu' ),\n 'edit_item' => __( 'Edit Documentaire', 'club-docu' ),\n 'update_item' => __( 'Update Documentaire', 'club-docu' ),\n 'view_item' => __( 'View Documentaire', 'club-docu' ),\n 'view_items' => __( 'View Documentaires', 'club-docu' ),\n 'search_items' => __( 'Search Documentaire', 'club-docu' ),\n 'not_found' => __( 'Not found', 'club-docu' ),\n 'not_found_in_trash' => __( 'Not found in Trash', 'club-docu' ),\n 'featured_image' => __( 'Featured Image', 'club-docu' ),\n 'set_featured_image' => __( 'Set featured image', 'club-docu' ),\n 'remove_featured_image' => __( 'Remove featured image', 'club-docu' ),\n 'use_featured_image' => __( 'Use as featured image', 'club-docu' ),\n 'insert_into_item' => __( 'Insert into Documentaire', 'club-docu' ),\n 'uploaded_to_this_item' => __( 'Uploaded to this Documentaire', 'club-docu' ),\n 'items_list' => __( 'Documentaires list', 'club-docu' ),\n 'items_list_navigation' => __( 'Documentaires list navigation', 'club-docu' ),\n 'filter_items_list' => __( 'Filter Documentaires list', 'club-docu' ),\n );\n $args = array(\n 'label' => __( 'Documentaire', 'club-docu' ),\n 'description' => __( 'Club ocuD', 'club-docu' ),\n 'labels' => $labels,\n 'menu_icon' => 'dashicons-format-video',\n 'supports' => array('title', 'editor', 'excerpt', 'thumbnail', ),\n 'taxonomies' => array(),\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 5,\n 'show_in_admin_bar' => true,\n 'show_in_nav_menus' => true,\n 'can_export' => true,\n 'has_archive' => false,\n 'hierarchical' => false,\n 'exclude_from_search' => true,\n 'show_in_rest' => true,\n 'publicly_queryable' => true,\n 'capability_type' => 'post',\n );\n register_post_type( 'club-docu', $args );\n }", "title": "" }, { "docid": "a03a757c3de2d49904e4a541b628988d", "score": "0.6216762", "text": "function create_post_type_testimonial() {\n $labels = array(\n 'name' => __('Depoimentos | Home Page'),\n 'singular_name' => __('Depoimento'),\n 'add_new' => __('Adicionar depoimento'),\n 'add_new_item' => __('Adicionar depoimento'),\n 'edit_item' => __('Editar Depoimento'),\n 'new_item' => __('Novo Depoimento'),\n 'all_items' => __('Todos os depoimentos'),\n 'view_item' => __('Visualizar depoimento'),\n 'search_items' => __('Buscar depoimento'),\n 'not_found' => __('Nenhum depoimento encontrado'),\n 'not_found_in_trash' => __('Nenhum depoimento no lixo'),\n 'menu_name' => __('Depoimentos de Clientes'),\n );\n\n $supports = array('title', 'thumbnail');\n $args = array(\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'query_var' => true,\n 'rewrite' => array('slug' => 'hype-tur'),\n 'capability_type' => 'post',\n 'has_archive' => false,\n 'hierarchical' => false,\n 'menu_position' => 3,\n 'supports' => $supports,\n 'menu_icon' => 'dashicons-thumbs-up',\n );\n register_post_type('testimonial', $args);\n}", "title": "" }, { "docid": "a190f7f480e9c885a177aacb8e0114ed", "score": "0.6216702", "text": "function x_bars_register_post_types() {\n\n register_post_type( 'cs_header', array(\n 'public' => false,\n 'capability_type' => 'page',\n 'supports' => false,\n 'labels' => array(\n 'name' => __( 'Pro Headers', '__x__' ),\n 'singular_name' => __( 'Pro Header', '__x__' ),\n )\n ) );\n\n register_post_type( 'cs_footer', array(\n 'public' => false,\n 'capability_type' => 'page',\n 'supports' => false,\n 'labels' => array(\n 'name' => __( 'Pro Footers', '__x__' ),\n 'singular_name' => __( 'Pro Footer', '__x__' ),\n )\n ) );\n\n}", "title": "" }, { "docid": "5cae3417768ea82029446cf776fc95c0", "score": "0.6214186", "text": "function storefront_post_header() {\n ?>\n <header class=\"entry-header\">\n <?php\n if ( is_single() ) {\n the_title( '<h1 class=\"entry-title\">', '</h1>' );\n ?>\n <div class=\"entry-metas\">\n <?php storefront_post_meta(); ?>\n </div>\n <?php\n } else {\n if ( 'post' === get_post_type() ) {\n storefront_post_meta();\n }\n\n the_title( sprintf( '<h2 class=\"alpha entry-title\"><a href=\"%s\" rel=\"bookmark\">', esc_url( get_permalink() ) ), '</a></h2>' );\n }\n ?>\n </header><!-- .entry-header -->\n <?php\n }", "title": "" }, { "docid": "5bf5f09bb34d49b7afe0d703b728ea99", "score": "0.6210103", "text": "function web_post_type(){\r\n register_post_type('Web Development',\r\n array(\r\n 'rewrite' => array('slug' => 'Web Development'),\r\n 'labels' => array(\r\n 'name' => 'Web Development',\r\n 'singular_name' => 'Web Development',\r\n 'add_new_item' => 'Add New Web Development',\r\n 'edit_item' => 'Edit Web Development'\r\n ),\r\n 'menu-icon' => 'dashicons-editor-removeformatting',\r\n 'public' => true,\r\n 'has_archive' => true,\r\n 'supports' => array(\r\n 'title', 'thumbnail', 'editor', 'excerpt', 'comments'\r\n )\r\n )\r\n );\r\n}", "title": "" }, { "docid": "3a5e146576b49480817d02bb4ef525fc", "score": "0.620859", "text": "function init(){\r\n \t\r\n\t\t\tremove_action( 'genesis_before_post_content', 'genesis_get_comments_template' );\r\n\r\n }", "title": "" }, { "docid": "ac02c15927e8a693dabe680c78222f7e", "score": "0.6202494", "text": "function article_post_type(){\n\n $args = array(\n 'labels' => array(\n 'name' => 'Articles',\n 'singular_name' => 'Article',\n 'menu_name' => 'Articles',\n 'name_admin_bar' => 'Articles',\n 'add_new' => 'Add New',\n 'add_new_item' => 'Add New Article',\n 'edit_item' => 'Edit Article',\n 'new_item' => 'New Article',\n 'view_item' => 'View Article',\n 'search_items' => 'Search Articles',\n 'item_published' => 'Article Published'\n ),\n 'public' => true,\n 'exclude_from_search' => true,\n 'publicly_queryable' => true,\n 'hierarchical' => true,\n 'menu_icon' => 'dashicons-media-spreadsheet',\n 'has_archive' => true,\n 'supports' => array('title', 'excerpt','custom-fields')\n );\n register_post_type('article', $args);\n}", "title": "" } ]
ffc363d7f5f2040613f905c5cd19a92b
Insert a child. Fill the child list from left to right.
[ { "docid": "e15d34f2cb2a1aac09779563cce4cb42", "score": "0.7326382", "text": "abstract public function insert ( \\Hoa\\Tree\\Generic $child );", "title": "" } ]
[ { "docid": "80e576cbff58f77e0258e3141ff730a8", "score": "0.6603798", "text": "public function addChild($child)\r\n\t{\r\n\t\t$this->last = $child->last;\r\n\r\n\t\t$this->entries []= $child;\r\n\t}", "title": "" }, { "docid": "9736874141e4f34fda9eb9e141b8dd76", "score": "0.63700384", "text": "public function addChild(EntityInterface $child, $position = null);", "title": "" }, { "docid": "594ac93de782cb037f57b2f6765807ce", "score": "0.63011825", "text": "public function addChild(Node $child);", "title": "" }, { "docid": "eb1e1c286e39754f4b0a110b9acdcf74", "score": "0.6224624", "text": "public function add_child($child) {\n\t\t$this->children[] = $child;\n\t}", "title": "" }, { "docid": "427e6c9df7dbc6a4899bb04ed71dd3fa", "score": "0.610443", "text": "public function add($child) {\n $this->children[] = $child;\n }", "title": "" }, { "docid": "fc891ab9adc57079611d22c522fa3c41", "score": "0.6075246", "text": "public function testNodeinsertAsChildAtPositionToNewNode()\n {\n $this->haveFixture('animal', 'an_addon', false);\n \n $model13 = Animal::findOne(13);\n $model = new Animal(['name' => 'new']);\n \n $this->expectExceptionMessage('You cannot add nodes to a new node');\n $model13->insertAsChildAtPosition($model, 3);\n }", "title": "" }, { "docid": "8b30a9e0d203e949a96c08f5644952e0", "score": "0.60660046", "text": "protected function append($child): void\n {\n $this->children[] = $child;\n }", "title": "" }, { "docid": "43df0350119183bfd2244667b87f11e5", "score": "0.60505515", "text": "public function addChild(self $child): void\n\t{\n\t\tif (!$this->children->contains($child)) {\n\t\t\t// ...and assign it to collection\n\t\t\t$this->children->add($child);\n\t\t}\n\t}", "title": "" }, { "docid": "0c02aea97a9e9d1ac5e40d04b21b8c73", "score": "0.6038007", "text": "public function shiftChild(MenuPresenceInterface $presence): void\n {\n $children = $this->children ?: [];\n\n if ($children instanceof Collection) {\n $children->prepend($presence);\n } else {\n $children = Arr::prepend($children, $presence);\n }\n\n $this->children = $children;\n }", "title": "" }, { "docid": "2855a204a0688fa81a040bf2f7d1a335", "score": "0.5904116", "text": "function add_child( $child ) {\n\t\tif( $child instanceof ModularPost ) {\n\t\t\t$this->children[] = $child;\n\t\t}\n\t}", "title": "" }, { "docid": "e1ac8d75597104e4586a4949d9b1b41c", "score": "0.5878766", "text": "public function insertChildNode($child, $parent)\n {\n $parent = $this->getNode($parent);\n return $this->insertNode($child, $parent);\n }", "title": "" }, { "docid": "ce2ef7dbd3f0b492c2f899c222fe1898", "score": "0.5875688", "text": "public function insert($val) {\n // Make sure element being inserted is type of Node.\n if (!is_object($val) || getclass($val) !== \"Node\") {\n $node = new Node($val);\n } else {\n $node = $val;\n }\n\n $this->_head->setPrev($node);\n\n $node->setNext($this->_head);\n $node->setPrev($this->_sentinel);\n $this->_head = $node;\n }", "title": "" }, { "docid": "15535e077ff8740f808fd2178ed907a7", "score": "0.58583486", "text": "public function addChild(pdoMap_Core_XML_Node $child) {\n $this->__childs[] = $child;\n // echo 'Add child '.$this->getName().'.'.$child->getName().'<br />';\n }", "title": "" }, { "docid": "eaf2da6a8ec029472edd57544066cdfe", "score": "0.58297724", "text": "function addChild( $ni )\n\t\t{\n\t\t$this->childs[] = $ni ;\n\t\t}", "title": "" }, { "docid": "ca7bab5eea85689e38b1e12fa875babb", "score": "0.577307", "text": "public function populateParentFromSortedByParentIdList() {\n for ($i = 0; $i < sizeof($this->nodeList); $i++) {\n $node = $this->nodeList[$i];\n// echo \"<br>Text: \".$node->getText();\n $this->insertNode($node);\n }\n }", "title": "" }, { "docid": "7920c96af3ede50fd5d133d214a39e93", "score": "0.5772843", "text": "public function addChild($arg = \"\", $index = -1) {\n\t\tif ($index < 0 || $index >= count($this->children)-1) {\n\t\t\tif (is_array($arg)) {\n\t\t\t\tforeach ($arg as $a) {\n\t\t\t\t\t$this -> addChild($a);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($arg instanceof Node) {\n\t\t\t\t\tif ($arg -> parentNode) {\n\t\t\t\t\t\t$arg -> parentNode -> removeChild($arg);\n\t\t\t\t\t}\n\t\t\t\t\t$arg -> parentNode = $this;\n\t\t\t\t\treturn $this -> children[] = $arg;\n\t\t\t\t} elseif (is_string((string) $arg)) {\n\t\t\t\t\t$textNode = new TextNode($arg);\n\t\t\t\t\t$textNode -> parentNode = $this;\n\t\t\t\t\treturn $this -> children[] = $textNode;\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif (is_int($index)) {\n\t\t\tfor ($i = count($this->children); $i >= $index; $i--) {\n\t\t\t\t$child = $this->children[$i];\n\t\t\t\t$this->children[$i+1] = $child;\n\t\t\t}\n\t\t\tif ($arg instanceof Node) {\n\t\t\t\tif ($arg -> parentNode) {\n\t\t\t\t\t$arg -> parentNode -> removeChild($arg);\n\t\t\t\t}\n\t\t\t\t$arg -> parentNode = $this;\n\t\t\t\treturn $this -> children[$index] = $arg;\n\t\t\t} elseif (is_string((string) $arg)) {\n\t\t\t\t$textNode = new TextNode($arg);\n\t\t\t\t$textNode -> parentNode = $this;\n\t\t\t\treturn $this -> children[$index] = $textNode;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a2b5e27a0ff06195a21fd54b84b4ce43", "score": "0.5760453", "text": "public function insertChildBeforeSibling(CategoryTreeNodeInterface $child, $nextSiblingId);", "title": "" }, { "docid": "fecb5ff514766c0f13000b44c594a23f", "score": "0.5758143", "text": "public function addChild(ModelInterface $child, $placeholder = null, $append = false);", "title": "" }, { "docid": "1a44131bd274ab07f34e4d386bcb87d4", "score": "0.5749192", "text": "function addChild( $node )\n\t\t{\n\t\t$this->childs[] = $node ;\n\t\t}", "title": "" }, { "docid": "4fa921c595e8599a3339e50a7ac4da9e", "score": "0.5735673", "text": "private function insertNode($child, $parent)\n {\n $this->db->beginTransaction();\n $sql = \"UPDATE \" . $this->table . \" SET rgt = rgt + 2 WHERE rgt >= ?\";\n $this->modify($sql, [$parent->rgt]);\n\n $sql = \"UPDATE \" . $this->table . \" SET lft = lft + 2 WHERE lft > ?\";\n $this->modify($sql, [$parent->rgt]);\n\n $sql = \"UPDATE \" . $this->table . \" SET lft = ?, rgt = ?, parent_id = ?, lvl = ? WHERE id = ?\";\n $level = $parent->lvl+1;\n $this->modify($sql, [$parent->rgt, $parent->rgt+1, $parent->id, $level, $child]);\n\n return $this->db->commit();\n }", "title": "" }, { "docid": "38a1f8da1a3784bb25ea4db8cf494c66", "score": "0.5717396", "text": "public function addChild(Node $child)\n {\n $this->children[] = $child;\n }", "title": "" }, { "docid": "37dafe9f8b58a69785b42304c6a3c6db", "score": "0.5696161", "text": "public function AddChildElement(IElement $child)\r\n {\r\n $this->Children[] = $child->Render();\r\n }", "title": "" }, { "docid": "c546016c1a56d3e7596cfe121f73e472", "score": "0.56751287", "text": "function addChild($name) {\n\t\tarray_push($this->childrens, $name);\n\t}", "title": "" }, { "docid": "03d024b812d70cf70686ae009d88a6f1", "score": "0.56511766", "text": "public function insertAsLastChildOf(Doctrine_Record $dest);", "title": "" }, { "docid": "148fe6b90598c29358b4b03d50067778", "score": "0.5648358", "text": "public function insert($value)\n {\n if ($this->value <= $value) {\n // Insert in right subtree.\n if ($this->right) {\n // If right child already exists then pass the value to it.\n $this->right->insert($value);\n } else {\n // If not then create a new right child.\n $this->right = new BinaryTreeNode($value);\n }\n } elseif ($this->value > $value) {\n // Insert in left subtree.\n if ($this->left) {\n // If left child already exists then pass the value to it.\n $this->left->insert($value);\n } else {\n // If not then create a new left child.\n $this->left = new BinaryTreeNode($value);\n }\n }\n }", "title": "" }, { "docid": "770de170ec55a55ff97e449efc1cb768", "score": "0.5639118", "text": "final public function addChild ()\n {\n throw new ChildException('Trying to add child to self closing HTML element');\n }", "title": "" }, { "docid": "240baf829a93936123f4ca471a67b16e", "score": "0.56329536", "text": "public function testAddChild_Simple()\n\t{\n\t\t$this->object->AddChild($this->child);\n\t\t$this->assertType(\"child\", $this->object->childList[0]);\n\t\t$this->assertEquals(1, sizeof($this->object->childList));\n\t}", "title": "" }, { "docid": "0b694b240b12fa13e315f16f91aa4d9f", "score": "0.5630805", "text": "public function addChild(CategoryTreeNodeInterface $child);", "title": "" }, { "docid": "2cbb97dc891b929efe2c327865850fe4", "score": "0.5627648", "text": "public function testAddChild_Duplicate()\n\t{\n\t\t$this->child->Save();\n\t\t$this->object->AddChild($this->child);\n\t\t$this->object->AddChild($this->child);\n\t\t$this->assertEquals(1, sizeof($this->object->childList));\n\t}", "title": "" }, { "docid": "1c299f52e581b9209243b205ad0cac8e", "score": "0.5625632", "text": "public function add($child, $type = null, array $options = array());", "title": "" }, { "docid": "1cc310da17c3989a62a240acc15905d9", "score": "0.56057894", "text": "public function insert($i) {\n $this->_nodes[$this->_count] = new Node($i, $this->_pointer, $this->node()->right());\n $this->right()->setLeft($this->_count);\n $this->node()->setRight($this->_count);\n $this->_pointer = $this->_count;\n $this->_count++;\n }", "title": "" }, { "docid": "c937e196ae39e06c0e134de1717abc2d", "score": "0.5593929", "text": "function insertChildBefore (&$node, &$reference) {\r\n if (!is_object ($node)) {\r\n return false;\r\n }\r\n \r\n // root nodes may not be children of other nodes!\r\n if ($node->_type == STRINGPARSER_NODE_ROOT) {\r\n return false;\r\n }\r\n \r\n // is the reference node a child?\r\n $child = $this->_findChild ($reference);\r\n \r\n if ($child === false) {\r\n return false;\r\n }\r\n \r\n // if node already has a parent\r\n if ($node->_parent !== null) {\r\n // remove node from there\r\n $parent =& $node->_parent;\r\n if (!$parent->removeChild ($node, false)) {\r\n return false;\r\n }\r\n unset ($parent);\r\n }\r\n \r\n $index = count ($this->_children) - 1;\r\n // move all nodes to a new index\r\n while ($index >= $child) {\r\n // save object\r\n $object =& $this->_children[$index];\r\n // we have to unset it because else it will be\r\n // overridden in in the loop\r\n unset ($this->_children[$index]);\r\n // put object to new position\r\n $this->_children[$index+1] =& $object;\r\n $index--;\r\n }\r\n $this->_children[$child] =& $node;\r\n return true;\r\n }", "title": "" }, { "docid": "203721a41496b9c5ae576e30ff5a8980", "score": "0.55724764", "text": "public function insert($index, $value) {\n if ($index == 0) {\n $this->pushFront($value);\n return;\n } elseif ($index == $this->size - 1) {\n $this->pushBack($value);\n return;\n }\n $prev = NULL;\n $curr = $this->head;\n $i = 0;\n while ($i < $index) {\n $prev = $curr;\n $curr = $curr->next;\n $i++;\n }\n $node = new Node($value);\n $prev->next = $node;\n $node->next = $curr;\n $this->size++;\n }", "title": "" }, { "docid": "60de54df5f712e0d057c3ae047aa2feb", "score": "0.55688787", "text": "public function addChildNode(\\F3\\Fluid\\Core\\Parser\\SyntaxTree\\NodeInterface $childNode);", "title": "" }, { "docid": "9ca336203d833dadc6703d29f790fd31", "score": "0.55649704", "text": "public function insertChild(Element $element, int $index): self\n {\n if (array_key_exists($index, $this->children)) {\n $this->beforeInsert($element);\n array_splice($this->children, $index, 0, [$element]);\n $this->afterInsert();\n } elseif ($index === count($this->children)) {\n $this->appendChild($element);\n } elseif ($index === 0) {\n $this->prependChild($element);\n } else {\n throw new \\OutOfBoundsException(\n 'index must be a valid key, zero, or length plus one'\n );\n }\n\n return $this;\n }", "title": "" }, { "docid": "270340099e67ec33ae72409a9a0f9fe9", "score": "0.55606025", "text": "public function testAddChild_Modification()\n\t{\n\t\t$this->object->AddChild($this->child);\n\t\t$this->child->attribute = \"changed att\";\n\t\t$this->assertEquals(\"changed att\", $this->object->childList[0]->attribute);\n\t}", "title": "" }, { "docid": "f3f2cfebcbf5bbd1a1d47c457c9a1dbb", "score": "0.55238676", "text": "abstract public function addItemChild($itemName, $childName);", "title": "" }, { "docid": "7cfc1d9be6810adc0330417aef87bd44", "score": "0.5513648", "text": "public function appendChild($child, array $options = array()) \n {\n $this->children[] = $child;\n\n return $child;\n }", "title": "" }, { "docid": "8cc82d57a63f9212eb9d1ad65de54bad", "score": "0.5492509", "text": "public function addChild(HTMLElement $el) {\n\t\tparent::addChild($el);\n\t\t/* Add pointer to last child, and its children */\n\t\t$this->rAddPointers($this->getChild($this->getNoOfChildren()-1));\n\t}", "title": "" }, { "docid": "10f754deb01df0b81a89090768edcae5", "score": "0.54882395", "text": "public final function offsetSet($index, $child) : void\n {\n $this->insert($index, $child, \\true);\n }", "title": "" }, { "docid": "935169502d360ca9a80b9690a1e69595", "score": "0.5478916", "text": "function add_parent($childid,$ar){\n\t\t//get the child and parent nodes\n\t\t$childnode=$this->nodes[$childid];\n\t\t$node=$this->nodes[$childnode->parent];\n\n\t\t//add the parent to the array\n\t\tif(array_key_exists($childnode->parent,$ar)){\n\t\t\t//if the parent is already there add child beside sibling and remove from the end of the array\n\t\t\t$this->repos_children($childnode,$ar);\n\t\t}else{\n\n\t\t\t//add the parent ahead of the child in the array\n\t\t\t$keyindex=array_search($childid,array_keys($ar));\n\t\t\t$copy=$ar;\n\t\t\t$ar=array_splice($ar,0,$keyindex)+array($node->id=>$node)+array_splice($copy,$keyindex);\n\t\t}\n\t\t//add parent if it's not already in the array\n\t\tif($node->parent!=-1){\n\t\t\t$ar=$this->add_parent($node->id,$ar);\n\t\t}\n\t\treturn $ar;\n\t}", "title": "" }, { "docid": "a3a6f79128e614fdef6d74db8d7f7460", "score": "0.54365027", "text": "function appendChildren () {\n $this->menu[]=new Marker('start');\n foreach ( $this->items as $item ) {\n if ( $item->parent_id() == $this->current->id() ) {\n $this->menu[]=$item;\n }\n }\n $check=end($this->menu);\n if ( $check->isStart() )\n array_pop($this->menu);\n else\n $this->menu[]=new Marker('end');\n }", "title": "" }, { "docid": "224f8beb5243bf40e23636cf132bc8ad", "score": "0.5434579", "text": "public function insertObject($obj, $index) {\r\n\t\t$obj->pzkParentId = @$this->id;\r\n\t\tarray_splice($this->children, $index, 0, $obj);\r\n\t}", "title": "" }, { "docid": "f3c721f03a1550367faf3a0f2adc0b26", "score": "0.5422618", "text": "function insertSub ( &$_n, $_payload, $_pos )\n\t{\n\t\t\t//empty pointer from an internal node\n\t\tif ( ! is_object ( $_n ) )\n\t\t{\n\t\t\t//auto leaf\n\t\t\t$_n = new Node ( $_payload->payload [ $_pos ] );\n\t\t} \n\t\t\n\t\t\t//we placed the leaf in an appropriate position and will\n\t\t\t//now continue with our new internal node.\n\t\tif ( ord ( $_payload->payload [ $_pos ] ) < ord ( $_n->char ) )\n\t\t{\n\t\t\t$this->insertSub ( &$_n->left, $_payload, $_pos );\t\n\t\t\n\t\t} else if ( ord ( $_payload->payload [ $_pos ] ) > ord ( $_n->char ) )\n\t\t{\n\t\t\t$this->insertSub ( &$_n->right, $_payload, $_pos );\n\t\t\t\n\t\t} else {\n\t\t\n\t\t\tif ( $_pos+1 == strlen ( $_payload->payload ) )\n\t\t\t{\n\t\t\t\t$_n->word = $_payload; \n\t\t\t\t$this->is_leaf = false;\n\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$this->insertSub ( &$_n->mid, $_payload, $_pos+1 );\n\t\t\n\t\t\t}\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "c0f7d9a3cb082b36bf4ba3e345b56b30", "score": "0.5421232", "text": "public function AddChild(string $childHTML)\r\n {\r\n $this->Children[] = $childHTML;\r\n }", "title": "" }, { "docid": "e20c7e83e2dfdc74f9827c2b7c3760f8", "score": "0.5389573", "text": "abstract public function insert();", "title": "" }, { "docid": "505bf2fca4781a759916f2b97d8c2005", "score": "0.53884023", "text": "function addChild(&$abstractframe)\n {\n $this->m_childs[] = &$abstractframe;\n }", "title": "" }, { "docid": "b9ac63e55dd246fd33296efaaa7f443d", "score": "0.53690076", "text": "public function add_child(SBBCodeParser_Node $child)\r\n\t{\r\n\t\t$this->children[] = $child;\r\n\t\t$child->set_parent($this);\r\n\t}", "title": "" }, { "docid": "8d476f7d08b1799c2b8b8c9e24b4763b", "score": "0.5367927", "text": "public function addChild(PlaceholderInterface $child);", "title": "" }, { "docid": "81c607734ab965981e85846461cb679f", "score": "0.5365173", "text": "public function prepend($obj) {\r\n\t\t$obj->pzkParentId = @$this->id;\r\n\t\tarray_unshift($this->children, $obj);\r\n\t}", "title": "" }, { "docid": "9dbc79addb9a2e01c04e8376038a9c2f", "score": "0.5348243", "text": "function _relocate_children($old_ID, $new_ID)\n {\n }", "title": "" }, { "docid": "2b3e289ba90ed32621e1b278445202c4", "score": "0.5347988", "text": "public abstract function insert();", "title": "" }, { "docid": "1aa7d0bb7c2e8ac929aac4f571020897", "score": "0.53351635", "text": "public function add_child(\\WP_Comment $child)\n {\n }", "title": "" }, { "docid": "12eb89dd0bf304972197e34f8a3c37cf", "score": "0.5326667", "text": "public function addChild(MenuPresenceInterface $presence): void\n {\n $children = $this->children ?: [];\n\n if ($children instanceof Collection) {\n $children->push($presence);\n } else {\n $children[] = $presence;\n }\n\n $this->children = $children;\n }", "title": "" }, { "docid": "5e1612ea02db15822cc531416cc543c4", "score": "0.53145915", "text": "protected function addChildIfMissing(NodeInterface $child)\n {\n $this->addChild($child);\n }", "title": "" }, { "docid": "cbb0f8b335b9131f78a1ef014bd52751", "score": "0.5304051", "text": "public function appendChild($childNode)\r\n {\r\n $this->_childNodes[$childNode->id] = $childNode;\r\n $childNode->setParentNode($this);\r\n }", "title": "" }, { "docid": "6106b880df3541ffce59305600971572", "score": "0.5296531", "text": "public function orX($child): void\n {\n $this->append($child);\n }", "title": "" }, { "docid": "337a15e0544575c8849f49d2552f9ee6", "score": "0.529124", "text": "public function insertAsLastChildOf(BaseObject $node, BaseObject $dest_node)\n {\n $node->setLeftValue($dest_node->getRightValue());\n $node->setRightValue($dest_node->getRightValue() + 1);\n $node->setScopeIdValue($dest_node->getScopeIdValue());\n $node->setParentIdValue($dest_node->getPrimaryKey());\n \n $this->addPreSaveStackEntries($this->shiftRLValues(get_class($node->getPeer()),\n $node->getLeftValue(),\n 2,\n $dest_node->getScopeIdValue()));\n \n $dest_node->setRightValue($dest_node->getRightValue() + 2);\n $this->addPreSaveStackEntries(array($dest_node));\n }", "title": "" }, { "docid": "e6756f17f3b6697dffcf5ce5dfb525e0", "score": "0.52828026", "text": "public final function insert_kids($kids,$insert_position='e')\n\t {\n\t \t//autofix\n\t\tif(!is_array($kids))\n\t\t\t$kids = array($kids);\n\t\t\t\n\t\tif(empty($kids))\n\t\t\treturn TRUE;\n\t\t\n\t\t\n\t\tdebug('requestpos = '.$insert_position);\n\t\t\n\t\tif($insert_position === 'e')\t//insert at the end\n\t\t\t$insert_position = sizeof($this->{$this->kids_field});\n\t\t\t\n\t\t\n\t\tdebug($this->list_kids());\n\t\tarray_splice($this->{$this->kids_field},$insert_position,0,$kids);\n\t\tdebug($this->list_kids());\n\n\t\tforeach($kids as $kid){\n\t\t\t $this->adopt($kid);\n\t\t}\n\t\t\t\n\t\t$i = $insert_position - 1;\n\t\t$end = sizeof($this->{$this->kids_field});\n\t\twhile(++$i < $end){\n\t\t\tdebug(\"inserter -> position old: {$this->{$this->kids_field}[$i]->position} new: $i\");\t\n\t\t\t$this->{$this->kids_field}[$i]->position = $i;\n\t\t}\n\t\t\n\t\t//THIS is fatal here! tree structure gets damaged if some content is invisible to current user!\n\t\t//$this->reposition_kids(); //update left+ right values\n\t\t\n\t\tdebug(array_keys($this->{$this->kids_field}));\n\t\t\t\n\t\t\t//TODO: return number of kids or position of last kid inserted??\n\t\treturn TRUE;\n\t\t\t\n\t}", "title": "" }, { "docid": "52adef91022094420fd579b774a25757", "score": "0.52671343", "text": "private function arrayInsert($node, $value, &$parent)\n\t{\n\t\t$index = 0;\n\t\t$nameRoot =\t$this->formNameRoot($node);\n\n\t\t// See if the parent already has an element by this name\n\t\tif (isset($parent[$nameRoot]))\n\t\t{\n\t\t\t// Is it a single value?\n\t\t\tif(!is_array($parent[$nameRoot]))\n\t\t\t{\n\t\t\t\t// Need to replace the exising item as the zeroth item of the array\n\t\t\t\t$parent[$nameRoot] = array($parent[$nameRoot]);\n\t\t\t\t\n\t\t\t\t// Do the same with any attributes\n\t\t\t\tif (isset($parent[$this->formAttributeName($nameRoot)]))\n\t\t\t\t{\n\t\t\t\t\t$attributeName = $this->formAttributeName($nameRoot);\n\t\t\t\t\t$parent[$attributeName] = array($parent[$attributeName]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Now is array so just add to the end of it.\n\t\t\t$parent[$nameRoot][] = $value;\n\t\t\t\n\t\t\t$index = count($parent[$nameRoot]) - 1; \n\t\t}\n\t\telse\n\t\t{\n\t\t\t$parent[$nameRoot] = $value;\n\t\t}\n\t\t\n\t\t// Add attributes if necessary\n\t\t$this->addAttributes($node, $index, $parent);\n\t}", "title": "" }, { "docid": "bfbc37ea626e09ba418f1a7de27dccdf", "score": "0.52598864", "text": "function newItemBefore()\r\n\t{\r\n\t\t$this->content_obj->newItemBefore();\r\n\t\t$_SESSION[\"il_pg_error\"] = $this->pg_obj->update();\r\n\t\t$this->ctrl->returnToParent($this, \"jump\".$this->hier_id);\r\n\t}", "title": "" }, { "docid": "e5fcf1a4137619b25bd3101c16242271", "score": "0.52546155", "text": "public function insertAsFirstChildOf(Doctrine_Record $dest);", "title": "" }, { "docid": "51dd77516e5b8bb7ec5913f4c6cc970c", "score": "0.5246223", "text": "public function addChild(self $child): self\n {\n $this->children[] = $child;\n\n return $this;\n }", "title": "" }, { "docid": "6b3bf3b44116dadf298eeb2c4deb165e", "score": "0.5244849", "text": "public function addChild(CustomDefAbstract $def)\n\t{\n\t\t$this->children->add($def);\n\t\t$def['parent'] = $this;\n\t\t$this->_onPropertyChanged('children', $this->children, $this->children);\n\t}", "title": "" }, { "docid": "17b9cb3e99d4079268f32a045af7e294", "score": "0.52299786", "text": "function addChildren(array $children) : void;", "title": "" }, { "docid": "b021abcba791b7e80dac390b9585478c", "score": "0.5221758", "text": "public function prependChild(Registry $child) {\n\t\tarray_unshift($this->children, $child);\n\t\t$child->setParent($this);\n\n\t\treturn $child;\n\t}", "title": "" }, { "docid": "99c0ddd60ff68bfcada17fac75aeea87", "score": "0.52216184", "text": "function insertChildAfter (&$node, &$reference) {\r\n if (!is_object ($node)) {\r\n return false;\r\n }\r\n \r\n // root nodes may not be children of other nodes!\r\n if ($node->_type == STRINGPARSER_NODE_ROOT) {\r\n return false;\r\n }\r\n \r\n // is the reference node a child?\r\n $child = $this->_findChild ($reference);\r\n \r\n if ($child === false) {\r\n return false;\r\n }\r\n \r\n // if node already has a parent\r\n if ($node->_parent !== false) {\r\n // remove node from there\r\n $parent =& $node->_parent;\r\n if (!$parent->removeChild ($node, false)) {\r\n return false;\r\n }\r\n unset ($parent);\r\n }\r\n \r\n $index = count ($this->_children) - 1;\r\n // move all nodes to a new index\r\n while ($index >= $child + 1) {\r\n // save object\r\n $object =& $this->_children[$index];\r\n // we have to unset it because else it will be\r\n // overridden in in the loop\r\n unset ($this->_children[$index]);\r\n // put object to new position\r\n $this->_children[$index+1] =& $object;\r\n $index--;\r\n }\r\n $this->_children[$child + 1] =& $node;\r\n return true;\r\n }", "title": "" }, { "docid": "58e01100c77997071f2932685384fede", "score": "0.52188855", "text": "function addChild($key, IBabylonModel $child) : IBabylonModel;", "title": "" }, { "docid": "c36a714b706a319e48c22ffda73b1b0f", "score": "0.52097243", "text": "public function insertAsNextSiblingOf(Doctrine_Record $dest);", "title": "" }, { "docid": "63a85624708cbc33148d4570c08758c8", "score": "0.52069205", "text": "function insertPage()\n\t{\n\t\tglobal $ilCtrl, $lng;\n\t\t\n\t\tinclude_once(\"./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php\");\n\t\t\n\t\t$num = ilChapterHierarchyFormGUI::getPostMulti();\n\t\t$node_id = ilChapterHierarchyFormGUI::getPostNodeId();\n\t\t\n\t\tif (!ilChapterHierarchyFormGUI::getPostFirstChild())\t// insert after node id\n\t\t{\n\t\t\t$parent_id = $this->tree->getParentId($node_id);\n\t\t\t$target = $node_id;\n\t\t}\n\t\telse\t\t\t\t\t\t\t\t\t\t\t\t\t// insert as first child\n\t\t{\n\t\t\t$parent_id = $node_id;\n\t\t\t$target = IL_FIRST_NODE;\n\t\t}\n\n\t\tfor ($i = 1; $i <= $num; $i++)\n\t\t{\n\t\t\t$page = new ilLMPageObject($this->content_object);\n\t\t\t$page->setType(\"pg\");\n\t\t\t$page->setTitle($lng->txt(\"cont_new_page\"));\n\t\t\t$page->setLMId($this->content_object->getId());\n\t\t\t$page->create();\n\t\t\tilLMObject::putInTree($page, $parent_id, $target);\n\t\t}\n\n\t\t$ilCtrl->redirect($this, \"showHierarchy\");\n\t}", "title": "" }, { "docid": "f02978816c47cf1d408435eb44da0edd", "score": "0.5206149", "text": "public function testExistedNodeSiblingsMoveAppendTo()\n {\n $model8 = Animal::findOne(8);\n \n $this->assertTrue($model8->appendTo($model8->parent()));\n $this->assertEquals(3, $model8->weight);\n }", "title": "" }, { "docid": "39e9ea72863f5bf99832a31755313f58", "score": "0.5201473", "text": "public function afterInsert(): void\n {\n if ($this->owner->getAttribute($this->ownerParentIdAttribute)) {\n $this->addTreePathOwnerToParents();\n }\n $this->addTreePathOwnerToOwner();\n }", "title": "" }, { "docid": "aaea34b3cb2190e4dbe5009a4aaa79d8", "score": "0.5192469", "text": "public function insert_as_first_child($target)\n {\n $target = $this->parent_from($target);\n return $this->insert($target, $this->left_column, 1, 1);\n }", "title": "" }, { "docid": "92ceb39e65cc2add8aa9ca335067d796", "score": "0.5191046", "text": "public function insertBefore (DOMNode $newnode , $refnode = null) {}", "title": "" }, { "docid": "a03827bc71f4fa104619fa7b71eaf90d", "score": "0.51883054", "text": "public function addChild(ThemeMenuItem $child)\n {\n }", "title": "" }, { "docid": "ec6bf6fb6259e39affcdcc123a97682f", "score": "0.51852626", "text": "function appendChild(&$treeItem, $parentItem) {\n\t\t$this->trackItem($treeItem);\n\n\t\tif ($parentItem == null) {\n\t//\t\t$parentItem =& $this->_rootNode;\n\t\t\t$this->rootItem->children[] = $treeItem->getId();\n\t\t} else {\n\t\t\t//get the global reference\n\t\t\t$parentItem =& $this->getItem($parentItem);\n\t\t\tif ($treeItem->_expanded) {\n\t\t\t\t$this->expandBranch($parentItem);\n\t\t\t}\n\t//\t\t$parentItem->appendChild($treeItem);\n\t\t\t$parentItem->children[] = $treeItem->getId();\n\t\t\t$treeItem->_parentPointer = $parentItem->getId();\n\t\t}\n\t}", "title": "" }, { "docid": "c4e6ae71171e4e9c3fee9195e9b25b2a", "score": "0.5178463", "text": "public function insertAsFirstChildOf(BaseObject $node, BaseObject $dest_node)\n {\n $node->setLeftValue($dest_node->getLeftValue() + 1);\n $node->setRightValue($dest_node->getLeftValue() + 2);\n $node->setScopeIdValue($dest_node->getScopeIdValue());\n $node->setParentIdValue($dest_node->getPrimaryKey());\n $this->addPreSaveStackEntries($this->shiftRLValues(get_class($node->getPeer()),\n $node->getLeftValue(),\n 2,\n $dest_node->getScopeIdValue()));\n\n $dest_node->setRightValue($dest_node->getRightValue() + 2);\n $this->addPreSaveStackEntries(array($dest_node));\n }", "title": "" }, { "docid": "6e050a97fd636b461e3fe7c2c7e5e68f", "score": "0.51538146", "text": "public function offsetSet(mixed $name, mixed $child): void\n {\n $this->add($child);\n }", "title": "" }, { "docid": "7d66e380e7e891e147ee01b44e3ddb19", "score": "0.514545", "text": "function add_children(){\n\t\t\t\t\t//if the array has a parent add it to the parents child array\n\t\tforeach ($this->nodes as $node){\n\t\t\tif($node->parent!=-1){\n\t\t\t\tif(isset($this->nodes[$node->parent])){\n\t\t\t\t\t$parent=$this->nodes[$node->parent];\n\t\t\t\t\t$parent->add_child($node->id);\n\t\t\t\t}else{\n\t\t\t\t\tprint_error('nonode','socialwiki');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5a5162342c5002380077d4e59fbe44d1", "score": "0.5140872", "text": "public function insertChildBefore(&$node, &$reference)\n {\n if (! is_object($node)) {\n return false;\n }\n\n // root nodes may not be children of other nodes!\n if ($node->_type == self::NODE_ROOT) {\n return false;\n }\n\n // is the reference node a child?\n $child = $this->_findChild($reference);\n\n if ($child === false) {\n return false;\n }\n\n // if node already has a parent\n if ($node->_parent !== null) {\n // remove node from there\n $parent =& $node->_parent;\n if (! $parent->removeChild($node, false)) {\n return false;\n }\n unset($parent);\n }\n\n $index = count($this->_children) - 1;\n // move all nodes to a new index\n while ($index >= $child) {\n // save object\n $object =& $this->_children[$index];\n // we have to unset it because else it will be\n // overridden in in the loop\n unset($this->_children[$index]);\n // put object to new position\n $this->_children[$index+1] =& $object;\n $index--;\n }\n $this->_children[$child] =& $node;\n return true;\n }", "title": "" }, { "docid": "b904de5b0d74c96cabdd62374a8849b6", "score": "0.51288885", "text": "public function addChildren(array $children);", "title": "" }, { "docid": "daf064ce5d7a6fd92631385f3f388db8", "score": "0.5108242", "text": "public function testAddChild_Loop()\n\t{\n\t\t$someChild1 = new child('somechild1 att');\n\t\t$someChild2 = new child('somechild2 att');\n\t\t$someChild3 = new child('somechild3 att');\n\n\t\t$childList = array($someChild1, $someChild2, $someChild3);\n\n\t\tforeach ($childList as $child)\n\t\t{\n\t\t\t$this->object->AddChild($child);\n\t\t}\n\n\t\t$this->assertEquals('somechild1 att', $this->object->childList[0]->attribute);\n\t\t$this->assertEquals('somechild2 att', $this->object->childList[1]->attribute);\n\t\t$this->assertEquals('somechild3 att', $this->object->childList[2]->attribute);\n\t}", "title": "" }, { "docid": "a4bdc2dd839ff4e5f459009c9947ca95", "score": "0.5105871", "text": "public function set($child) {\n\t\t$this->childs = array($child);\n\t}", "title": "" }, { "docid": "b919f71391497fa6b75e221236506fe5", "score": "0.5076281", "text": "public function insert($item)\n {\n $this->insertItem($item, $this->root);\n }", "title": "" }, { "docid": "172d7b8d6ea923ac3014b664a0887a98", "score": "0.5064853", "text": "function add($parent_id, $child_num = 0, $misc_data = false)\n\t{\n\t\tglobal $DBPrefix, $db;\n\t\tif(!is_numeric($parent_id) || $parent_id < 0)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif($parent_id != 0)\n\t\t{\n\t\t\t$query = \"SELECT left_id, right_id, level FROM \" . $DBPrefix . \"categories WHERE cat_id = :parent_id\";\n\t\t\t$params = array();\n\t\t\t$params[] = array(':parent_id', $parent_id, 'int');\n\t\t\t$db->query($query, $params);\n\t\t\tif($db->numrows() != 1)\n\t\t\t{ // Row must exist.\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$parent = $db->result();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Virtual root element as parent.\n\t\t\t$parent = $this->get_virtual_root();\n\t\t}\n\t\t$children = $this->get_children($parent['left_id'], $parent['right_id'], $parent['level']);\n\n\t\tif(count($children) == 0)\n\t\t{\n\t\t\t$child_num = 0;\n\t\t}\n\t\tif($child_num == 0 || (count($children) - $child_num) <= 0 || (count($children) + $child_num + 1) < 0)\n\t\t{\n\t\t\t$boundry = array('left_id', 'right_id', $parent['left_id']);\n\t\t}\n\t\telseif($child_num != 0)\n\t\t{\n\t\t\t// Some other child.\n\t\t\tif($child_num < 0)\n\t\t\t{\n\t\t\t\t$child_num = count($children) + $child_num + 1;\n\t\t\t}\n\t\t\tif($child_num > count($children))\n\t\t\t{\n\t\t\t\t$child_num = count($children);\n\t\t\t}\n\t\t\t$boundry = array('right_id', 'left_id', $children[$child_num - 1]['right_id']);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Make a hole for the new element.\n\t\t$query = \"UPDATE \" . $DBPrefix . \"categories SET left_id = left_id + 2 WHERE \" . $boundry[0] . \" > \" . $boundry[2] . \" AND \" . $boundry[1] . \" > \" . $boundry[2];\n\t\t$db->direct_query($query);\n\t\t$query = \"UPDATE \" . $DBPrefix . \"categories SET right_id = right_id + 2 WHERE \" . $boundry[1] . \" > \" . $boundry[2];\n\t\t$db->direct_query($query);\n\n\t\t// Insert the new element.\n\t\t$data = array(\n\t\t\t'left_id' => $boundry[2] + 1,\n\t\t\t'right_id' => $boundry[2] + 2,\n\t\t\t'level' => $parent['level'] + 1,\n\t\t\t'parent_id' => $parent_id\n\t\t);\n\t\tif($misc_data && is_array($misc_data))\n\t\t{\n\t\t\t$data = array_merge($misc_data, $data);\n\t\t}\n\n\t\t$query = \"INSERT INTO \" . $DBPrefix . \"categories (parent_id, left_id, right_id, level, cat_name, cat_colour, cat_image)\n\t\t\t\tVALUES (:parent, :left, :right, :level, :name, :colour, :image)\";\n\t\t$params = array();\n\t\t$params[] = array(':parent', $data['parent_id'], 'str');\n\t\t$params[] = array(':left', $data['left_id'], 'str');\n\t\t$params[] = array(':right', $data['right_id'], 'str');\n\t\t$params[] = array(':level', $data['level'], 'str');\n\t\t$params[] = array(':name', $data['cat_name'], 'str');\n\t\t$params[] = array(':colour', $data['cat_colour'], 'str');\n\t\t$params[] = array(':image', $data['cat_image'], 'str');\n\t\t$db->query($query, $params);\n\n\t\tif(!$misc_data)\n\t\t{\n\t\t\treturn $db->lastInsertId();\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "c99f9056ec5f2c9131b36f7dd54beaff", "score": "0.50636923", "text": "public function insert_as_next_sibling($target)\n {\n $target = $this->parent_from($target, $this->parent_column);\n return $this->insert($target, $this->right_column, 1, 0);\n }", "title": "" }, { "docid": "bc7ca92afc7e763c448d72905cf4e76e", "score": "0.50544715", "text": "public function replaceChildren($parent, $startChildIndex, $stopChildIndex, $t);", "title": "" }, { "docid": "cff12f1a2672a5f67dcaea9039fdcb82", "score": "0.5049738", "text": "public function addChild(Doctrine_Record $record);", "title": "" }, { "docid": "9159c3211366efaa5363f74ab340927a", "score": "0.50333834", "text": "public function addChild(MessagePart $part, $position = null)\n {\n if ($part !== $this) {\n $part->parent = $this;\n array_splice(\n $this->children,\n ($position === null) ? count($this->children) : $position,\n 0,\n [ $part ]\n );\n $this->onChange();\n }\n }", "title": "" }, { "docid": "6aaac6d419c3618fd0bb11c1d564da92", "score": "0.50275004", "text": "public function addChild($new_controller, $block_text_id, $new_template = '', $template_position = '') {\n\t\t// append child to the controller children list\n\t\t$new_block = array();\n\t\t$new_block['parent_instance_id'] = $this->instance_id;\n\t\t$new_block['instance_id'] = $block_text_id . $this->instance_id;\n\t\t$new_block['block_id'] = $block_text_id;\n\t\t$new_block['controller'] = $new_controller;\n\t\t$new_block['block_txt_id'] = $block_text_id;\n\t\t$new_block['template'] = $new_template;\n\t\t// This it to position element to the placeholder.\n\t\t// If not set emenet will not be displayed in place holder.\n\t\t// To use manual inclusion to parent template ignore this parameter\n\t\t$new_block['position'] = $template_position;\n\t\tarray_push($this->children, $new_block);\n\t}", "title": "" }, { "docid": "2aa379aac8231d5fe0aa61486b786663", "score": "0.5021345", "text": "public function addChildNode( SimpleXMLElement $oChild ) \n\t\t{\n\t\t\t$oParentDOM = dom_import_simplexml( $this );\n\t\t\t$oChildDOM = dom_import_simplexml( $oChild );\n\t\t\t$oNewParentDOM = $oParentDOM->ownerDocument->importNode( $oChildDOM, true );\n\t\t\t$oParentDOM->appendChild( $oNewParentDOM );\n\t\t\n\t\t}", "title": "" }, { "docid": "7f3ff635c8d46fde8809a922745401ef", "score": "0.5015236", "text": "public function add($child)\r\n {\r\n if ($child instanceof tag) {\r\n if ($child->id && array_key_exists($child->id,$this->ref)) {\r\n return $this->ref[$child->id]; \r\n }\r\n $child->tagdep = abs($this->tagdep) + 1;\r\n $this->tagdep = abs($this->tagdep) * -1;\r\n }\r\n //Append child to childs repo\r\n $this->childs[] = $child;\r\n //If child isn't object return $this tag\r\n if (!is_object($child)) {\r\n return $this;\r\n }\r\n if ($child->id) {\r\n $this->ref[$child->id] =& $child;\r\n }\r\n $child->parent =& $this;\r\n return $child;\r\n }", "title": "" }, { "docid": "e32b268a2465a9187efa79d9a34a93f5", "score": "0.500931", "text": "public function addChild($itemID){\n $child = new FPNode($itemID,1,$this);\n array_push($this->children, $child);\n return $child;\n }", "title": "" }, { "docid": "2b82d816427e9227cfe6e81ab9ebdfe2", "score": "0.500122", "text": "protected function createDuplicate($index = null, $insert = true)\n {\n $child = clone $this->field;\n\n if ($index === null) {\n $index = $this->index++;\n }\n\n if ($insert) {\n $this->children[$index] = $child;\n }\n\n $child->setParent($this);\n $this->prepareChild($child, $index, $this->parentPath);\n\n return $child;\n }", "title": "" }, { "docid": "e39b23d2d55d8f2d242b4aafe09ea3df", "score": "0.49951902", "text": "function add($n)\n\t{\n\t\tif (is_array($n))\n\t\t{\n\t\t\tfor($i = 0; $i < count($n); ++$i)\n\t\t\t{\n\t\t\t\t$this->children[] = $n[$i];\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->children[] = $n;\n\t\t}\n\t}", "title": "" }, { "docid": "e39b23d2d55d8f2d242b4aafe09ea3df", "score": "0.49951902", "text": "function add($n)\n\t{\n\t\tif (is_array($n))\n\t\t{\n\t\t\tfor($i = 0; $i < count($n); ++$i)\n\t\t\t{\n\t\t\t\t$this->children[] = $n[$i];\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->children[] = $n;\n\t\t}\n\t}", "title": "" }, { "docid": "90e43825d2e8aaa307e1279b6d1c55d3", "score": "0.4975423", "text": "public function addChild($route, Action $action) {\n // and extend the segment to contain the whole expression\n // if it contains a `/`\n if(substr_compare($route, '</', 0, 2) === 0) {\n preg_match('/<\\/.*?\\/>[^\\/]*/', $route, $matches);\n $segment = $matches[0];\n $segment_length = strlen($segment);\n if($segment_length < strlen($route))\n $remaining = substr($route, $segment_length + 1);\n } else {\n list($segment, $remaining) = preg_split(self::URL_SEGMENT_DELIMITER, $route, 2) + array(null, null);\n }\n\n if(!isset($this->children[$segment])) {\n $this->children[$segment] = new Node();\n }\n\n if(isset($remaining) && strlen($remaining) > 0) {\n $this->children[$segment]->addChild($remaining, $action);\n } else\n $this->children[$segment]->setAction($action);\n\n }", "title": "" }, { "docid": "151ebd03386b3873861c869f3c3791a3", "score": "0.4962447", "text": "public function append($obj) {\r\n\t\t$obj->pzkParentId = @$this->id;\r\n\t\t$this->children[] = $obj;\r\n\t}", "title": "" }, { "docid": "36e7227ff368f9fa0def9c196a3b8911", "score": "0.49612287", "text": "function append($node) {\n\t\tif (!is_array($node)) {\n\t\t\t$this->child[]=$node;\n\t\t} else if (is_array($node)) {\n\t\t\tfor ($childIdx=0; $childIdx<count($node); $childIdx++)\n\t\t\t\t$this->child[]=$node[$childIdx];\n\t\t}\n\t}", "title": "" }, { "docid": "84c2bbf193db80c789ccc2c9d3caf452", "score": "0.49608347", "text": "public function moveNode(?PhpcrChildrenInterface $newParent = null, ?string $newNodename = null);", "title": "" } ]
435b7a5f831e2404b9ff7dc5cab9e121
Remove unnecessary admin pages
[ { "docid": "0545c203f7413d350696c2d996207754", "score": "0.0", "text": "function remove_menus(){\n remove_submenu_page( 'themes.php', 'customize.php', 'theme-editor.php' );\n}", "title": "" } ]
[ { "docid": "347963163c7aae4a665490cd7370f66c", "score": "0.7928792", "text": "public function hide_admin_pages() {\n\t\tremove_menu_page( 'users.php' );\n\t\tremove_menu_page( 'tools.php' );\n\t\tremove_menu_page( 'edit-comments.php' );\n\t\tremove_menu_page( 'themes.php' );\n\t\tremove_menu_page( 'plugins.php' );\n\t\tremove_menu_page( 'options-general.php' );\n\t\tremove_menu_page( 'wpcf7' );\n\t\tremove_menu_page( 'Wordfence' );\n\t\tremove_menu_page( 'edit.php?post_type=acf-field-group' );\n\t}", "title": "" }, { "docid": "1ef40f2bf01db2b53dfb7816d905cf60", "score": "0.7308754", "text": "function remove_admin() {\n\tremove_menu_page('link-manager.php');\n\tremove_menu_page('edit-comments.php');\t\n}", "title": "" }, { "docid": "e562499221b0aae91fed4d38ca0eb9b4", "score": "0.7225725", "text": "function remove_admin_menus() {\n if(!is_admin()) {\n remove_menu_page( 'tools.php' );\n remove_menu_page( 'index.php' );\n remove_menu_page( 'edit-comments.php' );\n remove_menu_page( 'edit.php' );\n remove_menu_page( 'index.php' );\n remove_submenu_page( 'upload.php', 'wp-smush-bulk' );\n remove_meta_box('pageparentdiv', 'page', 'normal');\n }\n}", "title": "" }, { "docid": "7ac0590265feb37389804cab8013766b", "score": "0.7182009", "text": "function nm_vc_remove_admin_menus() {\r\n\t\t\t\t\tremove_submenu_page( 'vc-general', 'vc-automapper' );\r\n\t\t\t\t\tremove_submenu_page( 'vc-general', 'edit.php?post_type=vc_grid_item' );\r\n\t\t\t\t\t//remove_submenu_page( 'vc-general', 'vc-welcome' ); // Note: Don't disable, this page is displayed after plugin activation (blank page with permission message displaying otherwise)\r\n\t\t\t\t}", "title": "" }, { "docid": "6371b10f603839115ffd1b7df6cf0acb", "score": "0.7162128", "text": "function thistle_remove_admin_menu_page() {\n if ( ! current_user_can( 'administrator' ) ) {\n remove_menu_page( 'tools.php' );\n remove_menu_page( 'options-general.php' );\n }\n }", "title": "" }, { "docid": "e38612810611ba1924b4ba843d72695c", "score": "0.71587473", "text": "function t_seed_remove_admin_menus() {\n // remove_menu_page( 'edit.php' ); // posts\n remove_menu_page( 'edit-comments.php' ); // comments\n // remove_menu_page( 'edit.php?post_type=page' ); // pages\n}", "title": "" }, { "docid": "2df25678b68f0536b3ec8d3d0fed8f48", "score": "0.7142277", "text": "function boilerplate_admin() {\n // Configure these depending on what you want to show/hide\n //remove_menu_page( 'edit-comments.php' );\n //remove_menu_page( 'upload.php' );\n //remove_menu_page( 'edit.php' );\n //remove_menu_page( 'tools.php' );\n //remove_menu_page( 'plugins.php' );\n //remove_menu_page( 'themes.php' );\n}", "title": "" }, { "docid": "373a475bd93896f33c175b8425fea97c", "score": "0.69418436", "text": "public function admin_remove_menu_pages()\n {\n if (!$this->is_dev_user) {\n // Hide ACF\n remove_menu_page('edit.php?post_type=acf-field-group');\n }\n }", "title": "" }, { "docid": "8cc5d7265ee3d6c75613bf97382890cc", "score": "0.6806425", "text": "function remove_posts_from_admin() {\n\t// remove_menu_page( 'edit.php' ); //Remove posts\n\tremove_menu_page( 'edit-comments.php' ); //Remove comments\n}", "title": "" }, { "docid": "f97284b80d38948bb86c912ac28a1d41", "score": "0.67999876", "text": "function clean_admin_bar()\n{\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('wp-logo');\n // $wp_admin_bar->remove_menu('customize');\n $wp_admin_bar->remove_menu('updates');\n $wp_admin_bar->remove_menu('comments');\n $wp_admin_bar->remove_menu('itsec_admin_bar_menu');\n $wp_admin_bar->remove_menu('wpseo-menu');\n}", "title": "" }, { "docid": "1ac3b4aefe54576b5e6ad342e879ba60", "score": "0.6780593", "text": "function hide_admin_links() {\n\tremove_menu_page('link-manager.php');\n}", "title": "" }, { "docid": "60276bd06a93fce2670727651c3f261b", "score": "0.6731815", "text": "function th_remove_admin_menu_items()\n{\n //remove_menu_page('index.php'); // Dashboard\n //remove_menu_page('edit.php'); // Posts\n //remove_menu_page('upload.php'); // Media\n //remove_menu_page('link-manager.php'); // Links\n //remove_menu_page('edit.php?post_type=page'); // Pages\n //remove_menu_page('edit-comments.php'); // Comments\n //remove_menu_page('themes.php'); // Appearance\n //remove_menu_page('plugins.php'); // Plugins\n //remove_menu_page('users.php'); // Users\n //remove_menu_page('tools.php'); // Tools\n //remove_menu_page('options-general.php'); // Settings\n}", "title": "" }, { "docid": "29d2d3387bddcc32bb2294954eb94543", "score": "0.67252076", "text": "function remove_admin_bar() { \n\treturn false; \n}", "title": "" }, { "docid": "5704a792d3623ffbe8421d89bcdd0b0e", "score": "0.67191064", "text": "function remove_admin_bar_menus() {\n if(!is_admin()) {\n global $wp_admin_bar;\n $wp_admin_bar->remove_node('wp-logo');\n $wp_admin_bar->remove_menu('comments');\n $wp_admin_bar->remove_menu('new-content');\n $wp_admin_bar->remove_menu('wpseo-menu');\n }\n}", "title": "" }, { "docid": "b3288b8022ef46c46da043ff5d7c10be", "score": "0.66884726", "text": "function theme_remove_admin_bar() {\n return false;\n}", "title": "" }, { "docid": "0e1a773885afca06f6f885d44dffdce5", "score": "0.66856366", "text": "function thistle_remove_admin_footer() {\n if ( ! current_user_can( 'administrator' ) ) {\n add_filter( 'admin_footer_text', '__return_empty_string' );\n add_filter( 'update_footer', '__return_empty_string' );\n }\n }", "title": "" }, { "docid": "455d0a288f4d524608b04cfe779ba3c6", "score": "0.6681492", "text": "function remove_menus(){\n remove_menu_page('index.php'); //Dashboard\n remove_menu_page('jetpack'); //Jetpack*\n remove_menu_page('edit.php'); //Posts\n remove_menu_page('edit-comments.php'); //Comments\n\n if (!is_admin()) {\n remove_menu_page('plugins.php'); //Plugins\n remove_menu_page('users.php'); //Users\n remove_menu_page('options-general.php'); //Settings\n remove_menu_page('tools.php'); //Tools\n remove_menu_page('edit.php?post_type=acf-field-group'); //Advanced Custom Fields - Plugin\n remove_menu_page('admin.php?page=site-migration-export'); //All-in-One Site Migration - Plugin\n }\n}", "title": "" }, { "docid": "d85cc3b6db6d77c857d429dad117b4e4", "score": "0.66780275", "text": "public function remove_admin_bar_links() {\t\n\t\tglobal $wp_admin_bar;\n\t\n\t\t$wp_admin_bar->remove_menu( 'comments' );\n\t\t$wp_admin_bar->remove_menu( 'new-content' );\n\t\t$wp_admin_bar->remove_menu( 'blog-6-n' );\n\t\t$wp_admin_bar->remove_menu( 'blog-6-c' );\n\t\n\t}", "title": "" }, { "docid": "8cd456edb53160fe66fb9f7ce9f616e4", "score": "0.6676081", "text": "public function hide_menu_pages() {\n\t\tremove_submenu_page( 'forminator', 'forminator-poll-wizard' );\n\t\tremove_submenu_page( 'forminator', 'forminator-poll-view' );\n\t}", "title": "" }, { "docid": "99d26dad0a4c0441fb94653a0a8a65c5", "score": "0.6653644", "text": "public function removeAdminMenuItem()\n {\n remove_menu_page('edit-comments.php');\n }", "title": "" }, { "docid": "d00b10a46846291493a4a7e3e1b2b5d8", "score": "0.6595111", "text": "function remove_footer_admin () {\n\t\techo \"\";\n\t}", "title": "" }, { "docid": "30b5981f62f03bf378a6a0d33e8c897e", "score": "0.6590131", "text": "function remove_admin_bar_links() {\n global $wp_admin_bar;\n \n //$wp_admin_bar->remove_menu('wp-logo');\n //$wp_admin_bar->remove_menu('updates');\n //$wp_admin_bar->remove_menu('my-account');\n //$wp_admin_bar->remove_menu('site-name');\n //$wp_admin_bar->remove_menu('my-sites');\n //$wp_admin_bar->remove_menu('get-shortlink');\n //$wp_admin_bar->remove_menu('edit');\n //$wp_admin_bar->remove_menu('new-content');\n //$wp_admin_bar->remove_menu('comments');\n //$wp_admin_bar->remove_menu('search');\n }", "title": "" }, { "docid": "abf9ce31484d9f83e14194abb92bf880", "score": "0.65712553", "text": "function remove_admin_bar() {\n\tif (!current_user_can('administrator') && !is_admin()) {\n\t show_admin_bar(false);\n\t}\n}", "title": "" }, { "docid": "fc80349d60f093f856dc05440e865319", "score": "0.6549947", "text": "function remove_menu_items_from_admin()\n{\n remove_menu_page('cptui_main_menu');\n remove_menu_page('edit.php?post_type=acf-field-group');\n}", "title": "" }, { "docid": "70f61e1eefa0e9d78f57c41a12d01acb", "score": "0.6536436", "text": "function sc_remove_admin_menus() {\n\n $options = get_option('sc_utility_settings');\n\n // Hide Shield Security.\n if (isset($options['shield']) == 1)\n remove_menu_page( 'icwp-wpsf' );\n\n if (isset($options['comments']) == 1)\n remove_menu_page('edit-comments.php'); // Comments\n if (isset($options['tools']) == 1)\n remove_menu_page('tools.php'); // Tools\n if (isset($options['appearance']) == 1)\n remove_menu_page('themes.php'); // Appearance\n if (isset($options['media']) == 1)\n remove_menu_page('upload.php'); // Media\n if (isset($options['links']) == 1)\n remove_menu_page('link-manager.php'); // Links\n if (isset($options['pages']) == 1)\n remove_menu_page('edit.php?post_type=page'); // Pages\n if (isset($options['plugins']) == 1)\n remove_menu_page('plugins.php'); // Plugins\n if (isset($options['posts']) == 1)\n remove_menu_page('edit.php'); // Posts\n if (isset($options['users']) == 1)\n remove_menu_page('users.php'); // Users\n if (isset($options['settings']) == 1)\n remove_menu_page('options-general.php'); // Settings\n \n // Add 'menus' link to side admin menu.\n if (isset($options['add_menus']) == 1)\n add_menu_page(__('Menus'), __('Menus'), 'read', 'nav-menus.php');\n // Add 'widgets' link to side admin menu.\n if (isset($options['add_widgets']) == 1)\n add_menu_page(__('Widgets'), __('Widgets'), 'read', 'widgets.php');\n}", "title": "" }, { "docid": "6e7a4fe2192f8b5d09f46cb47155c2be", "score": "0.65238005", "text": "function rd_remove_admin_posts() {\n add_action( 'admin_menu', 'rd_remove_admin_posts_menu' );\n function rd_remove_admin_posts_menu() {\n remove_menu_page( 'edit.php' );\n }\n\n // Removes from admin bar\n add_action( 'wp_before_admin_bar_render', 'rd_admin_bar_render_posts' );\n function rd_admin_bar_render_posts() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('posts');\n }\n}", "title": "" }, { "docid": "9e5cf3075473ea0f11b67468f64c7fbf", "score": "0.6509208", "text": "function ct_remove_admin_bar() {\n\tif ( !current_user_can( 'administrator' ) && !is_admin() ) {\n\t\tshow_admin_bar( false );\n\t}\n}", "title": "" }, { "docid": "bc615fd46c4a370f79c025cadc93f6c9", "score": "0.6506231", "text": "function remove_admin_bar() {\n if (!current_user_can('administrator') && !is_admin()) {\n show_admin_bar(false);\n }\n}", "title": "" }, { "docid": "e98c1b76e9800f31f029d48970028476", "score": "0.6501038", "text": "function wlcms_admin_bar()\r\n{\r\n if (current_user_can('activate_plugins'))\r\n return;\r\n\r\n global $wp_admin_bar;\r\n\r\n if (get_option('wlcms_o_hide_posts'))\r\n $wp_admin_bar->remove_menu('new-post', 'new-content');\r\n if (get_option('wlcms_o_hide_comments'))\r\n $wp_admin_bar->remove_menu('comments');\r\n if (get_option('wlcms_o_hide_media'))\r\n $wp_admin_bar->remove_menu('media');\r\n\r\n $wp_admin_bar->remove_menu('appearance');\r\n\r\n}", "title": "" }, { "docid": "1d20b2fd8444bc08b434e07a15f6c4fb", "score": "0.64978087", "text": "function sp_remove_admin_bar_links() {\n\tglobal $wp_admin_bar;\n\t$wp_admin_bar->remove_menu('comments');\n\t$wp_admin_bar->remove_menu('wp-logo');\n}", "title": "" }, { "docid": "e36376ec00d3ea1ef5644909681cadc6", "score": "0.6476799", "text": "public function remove_admin_bar_items() {\n\t\t global $wp_admin_bar;\n\t\t \n\t\t $wp_admin_bar->remove_menu('wp-logo'); /* Remove WordPress Logo */\n\t\t // $wp_admin_bar->remove_menu('comments'); /* Remove 'Add New > Posts' */\n\t\t // $wp_admin_bar->remove_menu('new-post'); /* Remove 'Add New > Posts' */\n\t\t}", "title": "" }, { "docid": "a00068cda646912be3fa26e5a42d8a06", "score": "0.6461584", "text": "public function remove_admin_menu_items() {\n\t\t\t// Remove 'Comments'\n\t\t\t// remove_menu_page('edit-comments.php');\n\n\t\t\t// Remove submenu item: 'Appearance > Customize'\n\t\t\tremove_submenu_page( 'themes.php', 'themes.php' ); // hide the theme selection submenu\n\t\t\tremove_submenu_page( 'themes.php', 'customize.php' ); \n\t\t remove_submenu_page( 'themes.php', 'widgets.php' ); // hide the widgets submenu\n\n\t\t // these are theme-specific. Can have other names or simply not exist in your current theme.\n\t\t remove_submenu_page( 'themes.php', 'custom-header' );\n\t\t remove_submenu_page( 'themes.php', 'custom-background' );\n\n\n\t\t\t// Conditional removals \n\t\t\tif(!current_user_can('edit_themes')) { // Remove items for editors and below\n\t\t\t\tremove_menu_page('tools.php'); \n\t\t\t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "ce18dafcd0e2d010e4dceb19726c165b", "score": "0.6438824", "text": "function tweaks_remove_menus() {\n\n\t/* Check if the logged in user is an administrator */\n\tif ( ! current_user_can( 'manage_options' ) ) {\n\n\t\t/* Jetpack */\n\t\tremove_menu_page( 'jetpack' );\n\n\t\t/* Settings */\n\t\tremove_menu_page( 'options-general.php' );\n\n\t\t/* Tools */\n\t\tremove_menu_page( 'tools.php' );\n\t}\n}", "title": "" }, { "docid": "11fc217d8ed3565a9b7dad72de276e12", "score": "0.64267796", "text": "function exclude_pages_from_admin() {\n\n global $pagenow;\n\n // Get roles to current user\n $user = wp_get_current_user();\n $role = (array) $user->roles;\n\n $restrictedPages = array(\n 'edit-comments.php',\n 'tools.php',\n );\n\n // If user has role xtec_teacher, filter only restricted pages\n if ( in_array( 'xtec_teacher', $role ) ){\n if ( in_array( $pagenow, $restrictedPages )) {\n wp_die( __( 'You do not have permission to do that.' ) );\n } else {\n return ;\n }\n }\n\n // If user only has role contributor, filter also simple calendar pages\n if ( in_array( 'contributor', $role ) ){\n $restrictedPagesWithPost = array (\n 'edit.php?post_type=calendar',\n 'post-new.php?post_type=calendar',\n 'edit.php?post_type=gce_feed',\n 'post-new.php?post_type=gce_feed',\n );\n\n $postUrl = $pagenow . '?post_type=' . get_current_post_type();\n\n if ( in_array( $pagenow, $restrictedPages ) || in_array( $postUrl, $restrictedPagesWithPost )) {\n wp_die( __( 'You do not have permission to do that.' ) );\n }\n }\n\n}", "title": "" }, { "docid": "12af74d4dd4b71d9c505b95aeba20f45", "score": "0.6415999", "text": "function wps_admin_bar() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('wp-logo');\n $wp_admin_bar->remove_menu('about');\n $wp_admin_bar->remove_menu('wporg');\n $wp_admin_bar->remove_menu('documentation');\n $wp_admin_bar->remove_menu('support-forums');\n $wp_admin_bar->remove_menu('feedback');\n $wp_admin_bar->remove_menu('view-site');\n}", "title": "" }, { "docid": "12af74d4dd4b71d9c505b95aeba20f45", "score": "0.6415999", "text": "function wps_admin_bar() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('wp-logo');\n $wp_admin_bar->remove_menu('about');\n $wp_admin_bar->remove_menu('wporg');\n $wp_admin_bar->remove_menu('documentation');\n $wp_admin_bar->remove_menu('support-forums');\n $wp_admin_bar->remove_menu('feedback');\n $wp_admin_bar->remove_menu('view-site');\n}", "title": "" }, { "docid": "bbfd7e2546c1cdf9fd44f1e1f580bc7a", "score": "0.6402539", "text": "function remove_site_heath() {\n if (!is_xtec_super_admin()) {\n remove_meta_box('dashboard_site_health', 'dashboard', 'normal');\n remove_submenu_page('tools.php', 'site-health.php');\n }\n}", "title": "" }, { "docid": "d376d4b89c0ae17a26fdef36b419dec3", "score": "0.63906825", "text": "function my_remove_admin_items() {\r\n\t\r\n\t//Dashboard\r\n\t//remove_menu_page( 'index.php' ); \r\n\tremove_submenu_page( 'index.php', 'update-core.php' ); //Updates\r\n\r\n\t//Posts\r\n\t//remove_menu_page( 'edit.php' ); \r\n\t//remove_submenu_page( 'edit.php', 'post-new.php' ); //Add New [post]\r\n\t//remove_submenu_page( 'edit.php', 'edit-tags.php?taxonomy=category' ); //Categories [post]\r\n\t//remove_submenu_page( 'edit.php', 'edit-tags.php?taxonomy=post_tag' ); //Tags [post]\r\n\t\r\n\t//Media\r\n\t//remove_menu_page( 'upload.php' ); \r\n\t//remove_submenu_page( 'upload.php', 'media-new.php' ); //Add New [media]\r\n\t\r\n\t//Pages\r\n\t//remove_menu_page( 'edit.php?post_type=page' );\r\n\t//remove_submenu_page( 'edit.php?post_type=page', 'post-new.php?post_type=page' ); //Add New [page]\r\n\t\r\n\t//Comments\r\n\tremove_menu_page( 'edit-comments.php' ); \r\n\t\r\n\t//Appearance\r\n\t//remove_menu_page( 'themes.php' ); \r\n\t//remove_submenu_page( 'themes.php', 'widgets.php' ); //Widgets\r\n\t//remove_submenu_page( 'themes.php', 'nav-menus.php' ); //Menus\r\n\tremove_submenu_page( 'themes.php', 'theme-editor.php' ); //Editor [theme]\r\n\t\r\n\t//Plugins\r\n\t//remove_menu_page( 'plugins.php' ); \r\n\t//remove_submenu_page( 'plugins.php', 'plugin-install.php' ); //Add New [plugins]\r\n\tremove_submenu_page( 'plugins.php', 'plugin-editor.php' ); //Editor [plugins]\r\n\t\r\n\t//Users\r\n\t//remove_menu_page( 'users.php' ); \r\n\t//remove_submenu_page( 'users.php', 'user-new.php' ); //Add New [users]\r\n\t//remove_submenu_page( 'users.php', 'profile.php' ); //Your Profile\r\n\t\r\n\t//Tools\r\n\t//remove_menu_page( 'tools.php' ); \r\n\t//remove_submenu_page( 'tools.php', 'import.php' ); //Import\r\n\t//remove_submenu_page( 'tools.php', 'export.php' ); //Export\r\n\t\r\n\t//Settings\r\n\t//remove_menu_page( 'options-general.php' ); //Settings\r\n\t//remove_submenu_page( 'options-general.php', 'options-writing.php' ); //Writing\r\n\t//remove_submenu_page( 'options-general.php', 'options-reading.php' ); //Reading\r\n\t//remove_submenu_page( 'options-general.php', 'options-discussion.php' ); //Discussion\r\n\t//remove_submenu_page( 'options-general.php', 'options-media.php' ); //Media\r\n\t//remove_submenu_page( 'options-general.php', 'options-privacy.php' ); //Privacy\r\n\t//remove_submenu_page( 'options-general.php', 'options-permalink.php' ); //Permalinks\r\n\t\r\n\t\r\n\t\r\n\t//Profile\r\n remove_menu_page( 'profile.php' );\r\n\t\r\n\t//Plugins Added\r\n remove_menu_page( 'wp_admin_ui_customize' ); //Settings\t\r\n\t//remove_menu_page( 'snippets' ); //Settings\t\r\n remove_menu_page( 'shortcodes-ultimate' );\r\n}", "title": "" }, { "docid": "ac747c66552ae7e415d0f002da6cfd41", "score": "0.6387692", "text": "function remove_admin_bar_links() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('wp-logo');\n $wp_admin_bar->remove_menu('comments');\n}", "title": "" }, { "docid": "df026509f17d4bb8165f8e6c1d0f8491", "score": "0.63762283", "text": "function maksimer_admin_bar() {\n\t\tglobal $wp_admin_bar;\n\t\t$wp_admin_bar->remove_menu( 'widgets' );\n\t\t$wp_admin_bar->remove_menu( 'wpseo-menu' );\n\t\t$wp_admin_bar->remove_menu( 'wp-logo' );\n\t\t$wp_admin_bar->remove_menu( 'dashboard' );\n\t\t$wp_admin_bar->remove_menu( 'themes' );\n\t\t$wp_admin_bar->remove_menu( 'menus' );\n\t\t$wp_admin_bar->remove_menu( 'comments' );\n\t\t$wp_admin_bar->remove_menu( 'new-user' );\n\t\t$wp_admin_bar->remove_menu( 'new-media' );\n\t}", "title": "" }, { "docid": "bda35559299f535a3b410c85e3bbd1fb", "score": "0.6372574", "text": "function th_remove_admin_bar_items()\n{\n global $wp_admin_bar;\n\n $wp_admin_bar->remove_menu('wp-logo');\n $wp_admin_bar->remove_menu('about');\n $wp_admin_bar->remove_menu('wporg');\n $wp_admin_bar->remove_menu('documentation');\n $wp_admin_bar->remove_menu('support-forums');\n $wp_admin_bar->remove_menu('feedback');\n //$wp_admin_bar->remove_menu('view-site');\n //$wp_admin_bar->remove_menu('updates');\n //$wp_admin_bar->remove_menu('my-account');\n //$wp_admin_bar->remove_menu('site-name');\n //$wp_admin_bar->remove_menu('my-sites');\n //$wp_admin_bar->remove_menu('get-shortlink');\n //$wp_admin_bar->remove_menu('edit');\n $wp_admin_bar->remove_menu('new-content');\n $wp_admin_bar->remove_menu('comments');\n //$wp_admin_bar->remove_menu('search');\n //$wp_admin_bar->remove_menu('my-account-with-avatar');\n //$wp_admin_bar->remove_menu('edit-profile');\n //$wp_admin_bar->remove_menu('logout');\n\n}", "title": "" }, { "docid": "f7176d3d8ff8f65c2beed4173ebafd1e", "score": "0.6345386", "text": "function custom_menu_page_removing() {\n remove_menu_page('edit-comments.php');\n remove_menu_page('tools.php');\n remove_menu_page('users.php');\n}", "title": "" }, { "docid": "78bdb3cd01fd0f0fd91d56c9e7d8660c", "score": "0.63282883", "text": "public function remove_menus () {\n\t\n\t\t// List of items to remove\n\t\t$restricted_sub_level = array(\n\t\t\t'index.php' => 'TOP',\n\t\t\t'edit-tags.php?taxonomy=category' =>'edit.php', // This doesn't actually do anything since posts aren't present, but left here so that you can see how to remove sub menus if needed in your own projects\n\t\t\t'options-discussion.php' => 'options-general.php',\n\t\t\t'edit.php' => 'TOP',\n\t\t\t'edit-comments.php' => 'TOP',\n\t\t\t'tools.php' => 'TOP',\n\t\t\t'link-manager.php' => 'TOP',\n\t\t);\n\t\tforeach( $restricted_sub_level as $page => $top ) {\n\t\n\t\t\t// If a top leve page, then remove whole block\n\t\t\tif ( 'TOP' == $top )\n\t\t\t\tremove_menu_page( $page );\n\t\t\telse\n\t\t\t\tremove_submenu_page( $top, $page );\n\t\n\t\t}\n\t\n\t\t// Redirect from dashboard to edit pages - Thanks to WP Engineer for this code snippet ... http://wpengineer.com/redirects-to-another-page-in-wordpress-backend/\n\t\tif ( preg_match( '#wp-admin/?(index.php)?$#', esc_url( $_SERVER['REQUEST_URI'] ) ) )\n\t\t\twp_redirect( admin_url( 'edit.php?post_type=page' ) );\n\t\n\t}", "title": "" }, { "docid": "8a4456db5502c27d1ac6a5db7fef69b5", "score": "0.6321885", "text": "function my_remove_admin_menus() {\n remove_menu_page( 'edit-comments.php' );\n}", "title": "" }, { "docid": "9c4448b895921c2a7d33914853d987f7", "score": "0.6321066", "text": "function my_remove_menu_pages() {\n remove_menu_page('edit.php?post_type=acf-field-group');\n remove_menu_page('fac');\n remove_menu_page('cptui_main_menu');\n remove_menu_page('tools.php');\n //remove_menu_page('plugins.php');\n}", "title": "" }, { "docid": "2e5aa21a159474e408c77da2b49683f0", "score": "0.63204765", "text": "function change_footer_admin () {\n if(!is_admin()) {\n return ' ';\n }\n}", "title": "" }, { "docid": "27a68d286f77f8169cb2cbcf64aae7a8", "score": "0.63008595", "text": "function abide_admin_bar_render() {\n\t\n global $wp_admin_bar;\n\t\n\t$wp_admin_bar->remove_menu('customize');\n $wp_admin_bar->remove_node('wp-logo');\n $wp_admin_bar->remove_menu('new-post');\n $wp_admin_bar->remove_menu('search');\n $wp_admin_bar->remove_menu('themes');\n $wp_admin_bar->remove_menu('widgets');\n $wp_admin_bar->remove_node('updates');\n $wp_admin_bar->remove_menu('searchwp');\n $wp_admin_bar->remove_menu('delete-cache');\n\t$wp_admin_bar->remove_menu('litespeed-menu');\n\t\n}", "title": "" }, { "docid": "607564536c5f7729cc89ceb1eaa28d72", "score": "0.6297463", "text": "static function deleteAll() {\n adminGateKeeper();\n new Cache(\"admin_tabs\", NULL, \"session\");\n }", "title": "" }, { "docid": "fb87122e427a7adc657b52f3400cc23d", "score": "0.629625", "text": "function sc_remove_toolbar_nodes($wp_admin_bar) { \n global $wp_admin_bar;\n $options = get_option('sc_utility_settings');\n \n if (isset($options['top_admin']) == 1) {\n $wp_admin_bar->remove_menu('updates');\n $wp_admin_bar->remove_menu('comments');\n $wp_admin_bar->remove_menu('new-content');\n $wp_admin_bar->remove_menu('themes');\n $wp_admin_bar->remove_menu('widgets');\n $wp_admin_bar->remove_menu('menus');\n $wp_admin_bar->remove_menu('customize');\n }\n}", "title": "" }, { "docid": "698730553bd99849cdeedb28d1e30b18", "score": "0.62942576", "text": "public function restrict_options_page() {\n\t\t// If the user does not have access to publish posts\n\t\tif ( !current_user_can( 'publish_pages' ) ) {\n\t\t\t// Remove the \"Tools\" menu\n\t\t\tremove_menu_page( 'indeed-apply' );\n\t\t}\n\t}", "title": "" }, { "docid": "95007b19b34642ef1e55740873adf4bd", "score": "0.6288244", "text": "function remove_footer_admin () {\n echo 'Theme by <a href=\"http://rocketrepublic.com\">Rocket Republic</a>.';\n }", "title": "" }, { "docid": "46e8665b432535835686a024fcb595ba", "score": "0.6281604", "text": "static function remove_footer_admin()\n {\n echo 'Realisee par accent com';\n }", "title": "" }, { "docid": "4485a57a75d574f29f996c7cc180e29b", "score": "0.627914", "text": "public function remove_original_page() {\n\t\tremove_submenu_page( 'index.php', 'index.php' );\n\t}", "title": "" }, { "docid": "bda7be9437e9c8a7f08c9ab6e66b3131", "score": "0.6277258", "text": "function disable_wp_admin_access() {\r\n\t\tif ( wplab_unicum_utils::is_unyson() && filter_var( fw_get_db_settings_option( 'logout_non_admins' ), FILTER_VALIDATE_BOOLEAN ) && ! current_user_can( 'manage_options' ) && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {\r\n \t\twp_redirect( home_url() );\r\n\t\t\texit;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "15c989c5d0db2eb110510ca829a8cc72", "score": "0.626858", "text": "function compresso_remove_menus() {\n\tremove_menu_page( 'edit.php' );\n\tremove_menu_page( 'edit-comments.php' );\n}", "title": "" }, { "docid": "1396ce1ab0da14b20cbb81c0260122f8", "score": "0.62438613", "text": "public function admin_bar() {\n\t\tglobal $wp_admin_bar;\n\n\t\t$wp_admin_bar->remove_menu( 'new-content' );\n\t}", "title": "" }, { "docid": "235e530f146ed9a2e5e34f95da6d55d7", "score": "0.62431043", "text": "function my_remove_menu_pages() {\n\t//remove_menu_page('link-manager.php');// Removes 'Links'\n\t//remove_menu_page('upload.php');// Removes 'Media'\n\t//remove_menu_page('edit-comments.php');// Removes 'Comments'\n\t//remove_menu_page('plugins.php');// Removes 'Plugins'\n\t//remove_menu_page('users.php');// Removes 'Users'\n\t//remove_menu_page('edit.php');// Removes 'Posts'\n\t//remove_menu_page('tools.php');// Removes 'Tools'\n\t//remove_menu_page('wp-security-scan/securityscan.php');\t// Removes 'Security'\n\t//remove_menu_page('options-general.php');\t// Removes 'options'\n\t//remove_menu_page('wpseo_dashboard');\t// Removes 'SEO'\n\t//SubMenu\n\t//remove_submenu_page ( 'options-general.php', 'options-permalink.php' ); //\n\t//remove_submenu_page ( 'options-general.php', 'options-writing.php' ); //\n\t//remove_submenu_page ( 'options-general.php', 'options-reading.php' ); //\n\t//remove_submenu_page ( 'options-general.php', 'options-discussion.php' ); //\n\t//remove_submenu_page ( 'options-general.php', 'options-media.php' ); //\n\t//remove_submenu_page ( 'options-general.php', 'options-privacy.php' ); //\n\t//remove_submenu_page ( 'options-general.php', 'wordpress-firewall-2/wordpress-firewall-2.php' ); //\n\t//remove_submenu_page ( 'options-general.php', 'secure-wordpress.php' ); //\n\t//remove_submenu_page ( 'index.php', 'akismet-stats-display' ); //\n\t//remove_submenu_page ( 'index.php', 'update-core.php' ); //\n\t//remove_submenu_page ( 'themes.php', 'themes.php' ); //\t\n}", "title": "" }, { "docid": "319c2d4942ac491625964f64381be8fb", "score": "0.6240775", "text": "public function remove() {\n if (!is_admin()) { return false; }\n\n add_action('admin_menu', [$this, '_remove']);\n }", "title": "" }, { "docid": "30bdf6952f746996a675cee77dc2417b", "score": "0.6237275", "text": "function tweaks_admin_bar() {\n\tglobal $wp_admin_bar;\n\n\t/* WordPress Logo */\n\t$wp_admin_bar->remove_menu( 'wp-logo' );\n\n\t/* Yoast SEO */\n\t$wp_admin_bar->remove_menu( 'wpseo-menu' );\n}", "title": "" }, { "docid": "d41d0af72f7fa3030e8351d485280bae", "score": "0.623482", "text": "public function adminPages(){\r\n\t\t\t\t\t\t\r\n\t\t\tGlobalsUC::$alterViewHeaderPrefix = $this->pluginTitle;\r\n\t\t\t\r\n\t\t\tif(!empty($this->arrAllowedViews) && in_array(self::$view, $this->arrAllowedViews) == false){\r\n\t\t\t\t\r\n\t\t\t\techo esc_html__(\"this view not allowed in the plugin\", \"unlimited_elements\");\r\n\t\t\t\treturn(false);\r\n\t\t\t}\r\n\r\n\t\t\t$this->createTables();\r\n\t\t\t\r\n\t\t\tparent::adminPages();\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "d610380a837658201f6fa005cc7f91cd", "score": "0.62287706", "text": "public function action_admin_menu() {\n\t\t// Remove Posts menu item\n\t\tglobal $menu, $submenu;\n\t\tunset( $menu[5] );\n\t\tunset( $submenu['edit.php']);\n\n\t\t// Hide Right Now metabox since it's generally useless for us\n\t\tremove_meta_box( 'dashboard_right_now', 'dashboard', 'core' );\n\t\tremove_meta_box( 'dashboard_recent_comments', 'dashboard', 'core' );\n\t\tremove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'core' );\n\t\tremove_meta_box( 'dashboard_quick_press', 'dashboard', 'core' );\n\t}", "title": "" }, { "docid": "72c110470ee40c7eb620e4026a01f853", "score": "0.6223304", "text": "function wpwebapp_disable_admin_bar() {\n $disable_admin_bar = wpwebapp_get_block_admin_access();\n if ( $disable_admin_bar == 'hide' ) {\n show_admin_bar( false );\n }\n}", "title": "" }, { "docid": "062c5e1c511a86aa2c82d26bdbafe7a5", "score": "0.6219027", "text": "function annointed_admin_bar_remove() {\n global $wp_admin_bar;\n\n /* Remove their stuff */\n $wp_admin_bar->remove_menu('wp-logo');\n}", "title": "" }, { "docid": "e75e3ccb5ea3f46a22454f203084bb70", "score": "0.61836505", "text": "function admin_bar_render() {\n\t\n global $wp_admin_bar;\n\t$wp_admin_bar->remove_menu('customize');\n $wp_admin_bar->remove_node('wp-logo');\n $wp_admin_bar->remove_menu('new-post');\n $wp_admin_bar->remove_menu('search');\n $wp_admin_bar->remove_menu('themes');\n $wp_admin_bar->remove_menu('widgets');\n $wp_admin_bar->remove_node('updates');\n $wp_admin_bar->remove_menu('searchwp');\n $wp_admin_bar->remove_menu('delete-cache');\n\t$wp_admin_bar->remove_menu('litespeed-menu');\n\t\n}", "title": "" }, { "docid": "e102b72fca1a3eacf4128b0799979f7f", "score": "0.61777717", "text": "function remove_footer_admin () {\n echo '';\n}", "title": "" }, { "docid": "aff904c986504c6666644187f3c7b936", "score": "0.61699015", "text": "function remove_thematic_hooks(){\n\tremove_action('thematic_header', 'thematic_access', 9);\n\tremove_action('thematic_footer', 'thematic_siteinfo', 30);\n}", "title": "" }, { "docid": "f27243db1594e45e1ebf58996f6c9a57", "score": "0.6164968", "text": "function d7_remove_menus(){\n\tremove_menu_page('edit.php');\n\tremove_menu_page('edit-comments.php');\n\tremove_submenu_page('themes.php', 'theme-editor.php');\n\tremove_submenu_page('plugins.php', 'plugin-editor.php');\n}", "title": "" }, { "docid": "aa32eaa3aad03dbbf2dc885d663ae22a", "score": "0.61584187", "text": "function torlesse_remove_dashboard_menus() {\n\n\tglobal $menu;\n $restricted = array(\n \t__('Dashboard'),\n \t__('Posts'),\n \t__('Media'),\n \t__('Links'),\n \t__('Pages'),\n \t__('Comments'),\n \t__('Appearance'),\n \t__('Plugins'),\n \t__('Users'),\n \t__('Tools'),\n \t__('Settings')\n );\n end($menu);\n while( prev($menu) ) {\n $value = explode( ' ', $menu[key($menu)][0] );\n if( in_array($value[0] != NULL ? $value[0] : \"\" , $restricted) ) {\n\t unset( $menu[key($menu)] );\n }\n }\n\n}", "title": "" }, { "docid": "1077f2d3eb8b9b71a91b777767ef8011", "score": "0.6149441", "text": "function _unauthorizedPage()\r\n\t{\r\n\t\t$data['siteAdmin'] = $this->_is_siteAdmin();\r\n\t\t$this->load->view('site_admin/unauthorized', $data);\r\n\t}", "title": "" }, { "docid": "783944e9a241f9eb574e0ee7a3b3cc1e", "score": "0.6143581", "text": "function clean_setup () {\n remove_action('wp_head', 'wp_generator'); // #1\n remove_action('wp_head', 'wlwmanifest_link'); // #2\n remove_action('wp_head', 'rsd_link'); // #3\n remove_action('wp_head', 'wp_shortlink_wp_head'); // #4\n remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10); // #5\n add_filter('the_generator', '__return_false'); // #6\n add_filter('show_admin_bar','__return_false'); // #7\n remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); // #8\n remove_action( 'wp_print_styles', 'print_emoji_styles' );\n}", "title": "" }, { "docid": "272a6120507064bd79d843934db69dd9", "score": "0.6142652", "text": "function remove_admin_login_header() {\n remove_action('wp_head', '_admin_bar_bump_cb');\n}", "title": "" }, { "docid": "cf22b9d7beb0271abca3d26009b3bae8", "score": "0.6140936", "text": "function nm_remove_redux_menu() {\r\n\t\tremove_submenu_page( 'tools.php', 'redux-about' );\r\n\t}", "title": "" }, { "docid": "100a4cf09db675a7b9ce0d3e5f0b14bb", "score": "0.61393976", "text": "public function hideAdminBar() {\n show_admin_bar(false);\n }", "title": "" }, { "docid": "b6e744cddc87b4b95a9dbe894efe75c2", "score": "0.6132776", "text": "function acswpmu_admin_page() {\r\n\tif (!current_user_can('manage_options')) {\r\n\t\twp_die( __('You do not have sufficient permissions to access this page.', 'acswpmu_trdom') );\r\n\t}\r\n\t// register globals\r\n\tglobal $wpdb;\r\n\t// include the adminpage\r\n\tinclude('adminpage-add-cloned-sites.php');\r\n}", "title": "" }, { "docid": "f6c945978d3162c80f21c39aaa31a103", "score": "0.6130805", "text": "function remove_homemenu() {\n\t// Unregister Home Menu Five - replaced with Division Links in SAEM Silver\n\tunregister_sidebar( 'home-menu-five' );\n}", "title": "" }, { "docid": "bf07e8ed86433792eb8daef79a83f936", "score": "0.6126505", "text": "function remove_admin_login_header() {\n\tremove_action( 'wp_head', '_admin_bar_bump_cb' );\n}", "title": "" }, { "docid": "9b4398a91efdeb66470b5f08d5e6f4b2", "score": "0.61264795", "text": "function hide_admin_bar() {\n\tremove_action('admin_footer', 'wp_admin_bar_render', 1000);\n\tfunction remove_padding_admin_bar() {\n\t\techo '<style>body.admin-bar #wpcontent, body.admin-bar #adminmenu {padding-top: 0px !important;}</style>';\n\t}\n\tadd_filter('admin_head', 'remove_padding_admin_bar');\n}", "title": "" }, { "docid": "e46658ad8eeefe370a0d3a3bcdbce978", "score": "0.61239916", "text": "function clean_stuff_up() {\n\t// windows live\n\tremove_action('wp_head', 'rsd_link');\n\tremove_action('wp_head', 'wlwmanifest_link');\n\t// wordpress gen tag\n\tremove_action('wp_head', 'wp_generator');\n\t// comments RSS\n\tremove_action( 'wp_head', 'feed_links_extra', 3 );\n\tremove_action( 'wp_head', 'feed_links', 3 );\n}", "title": "" }, { "docid": "f5b78dacf8984911284efa22686484c9", "score": "0.6123338", "text": "function remove_page_metaboxes() {\n\t\tremove_meta_box( 'commentstatusdiv', 'page', 'normal' );\n\t\tremove_meta_box( 'commentsdiv', 'page', 'normal' );\n\t}", "title": "" }, { "docid": "806e00e41791957dd885753b0e6ccecc", "score": "0.6115431", "text": "function remove_menus(){\n \n\t// remove_menu_page( 'index.php' ); //Dashboard\n\t// remove_menu_page( 'edit.php' ); //Posts\n\t// remove_menu_page( 'upload.php' ); //Media\n\t// remove_menu_page( 'edit.php?post_type=page' ); //Pages\n\t// remove_menu_page( 'edit-comments.php' ); //Comments\n\t// remove_menu_page( 'themes.php' ); //Appearance\n\t// remove_menu_page( 'plugins.php' ); //Plugins\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 \n}", "title": "" }, { "docid": "6d74f408825ebe442ba4907cbb21a125", "score": "0.61106765", "text": "public function admin_head() {\n\t\tremove_submenu_page( 'index.php', 'cookie-notice-welcome' );\n\t\t\n\t\tif ( isset( $_GET['page'] ) && $_GET['page'] === 'cookie-notice-welcome' )\n\t\t\tremove_all_actions( 'admin_notices' );\n\t}", "title": "" }, { "docid": "1c1b35b944eefee717206ea449c64e5e", "score": "0.61049587", "text": "function remove_footer_admin () {\n echo \"WWOOF Theme by GippslandWeb\";\n}", "title": "" }, { "docid": "a7df0c8cd27eb1ef96439990185578a6", "score": "0.6099124", "text": "public function membpress_remove_admin_notices()\n\t{\n\t\t// only remove admin notices while in membpress plugin\n\t\tglobal $pagenow;\n\t\t\n\t if ($pagenow == 'admin.php' && isset($_GET['page']) && stristr($_GET['page'], 'membpress'))\n\t\t{\n\t\t\t// we are in membpress plugin, remove all other notices except membpress own notices\n\t\t\t\n\t\t\tglobal $wp_filter;\n\t\t\t\n\t\t\tforeach( array('admin_notices', 'all_admin_notices', 'network_admin_notices', 'user_admin_notices' ) as $hook_name )\n\t\t\t{\n\t\t\t\t$this->membpress_remove_admin_notices_hook( $hook_name );\n\t\t\t} \n\t\t}\n\t}", "title": "" }, { "docid": "71944fae49180aa06f8f2eee33826afb", "score": "0.60775536", "text": "function xchildthemex_maybe_disable_yoast_page_analysis() {\n\tif ( ! xchildthemex_is_edit_screen() ) {\n\t\treturn;\n\t}\n\t// Disable Yoast admin columns.\n\tadd_filter( 'wpseo_use_page_analysis', '__return_false' );\n}", "title": "" }, { "docid": "5eefc93095eec932288d8f8e98e8fd27", "score": "0.6058809", "text": "function uncode_remove_adminbar_margin()\n{\n\tremove_action('wp_head', '_admin_bar_bump_cb');\n}", "title": "" }, { "docid": "3d8004fcc47bc030a60a1f709da2a7f9", "score": "0.6057995", "text": "function aspen_disablewpd_add_page() {\n $page = add_management_page(\n\t'DisableWPD','Disable WP_DEBUG','manage_options','disable_wpdebug', 'aspen_disablewpd_admin');\n add_action('admin_print_styles-' . $page, 'aspen_disablewpd_load_styles');\n}", "title": "" }, { "docid": "9d8c536502f090459df361656817c2e5", "score": "0.60556006", "text": "public function removeOptionsPage() {\n\n // Check if it's the main site\n if (is_main_site()) {\n return;\n }\n\n //Hide \"Settings → LiteSpeed Cache\".\n remove_submenu_page('options-general.php', 'litespeed-cache-options');\n\n //Hide \"LiteSpeed Cache\".\n remove_menu_page('litespeed');\n //Hide \"LiteSpeed Cache → Dashboard\".\n remove_submenu_page('litespeed', 'litespeed');\n //Hide \"LiteSpeed Cache → Presets\".\n remove_submenu_page('litespeed', 'litespeed-presets');\n //Hide \"LiteSpeed Cache → General\".\n remove_submenu_page('litespeed', 'litespeed-general');\n //Hide \"LiteSpeed Cache → Cache\".\n remove_submenu_page('litespeed', 'litespeed-cache');\n //Hide \"LiteSpeed Cache → CDN\".\n remove_submenu_page('litespeed', 'litespeed-cdn');\n //Hide \"LiteSpeed Cache → Image Optimization\".\n remove_submenu_page('litespeed', 'litespeed-img_optm');\n //Hide \"LiteSpeed Cache → Page Optimization\".\n remove_submenu_page('litespeed', 'litespeed-page_optm');\n //Hide \"LiteSpeed Cache → Database\".\n remove_submenu_page('litespeed', 'litespeed-db_optm');\n //Hide \"LiteSpeed Cache → Crawler\".\n remove_submenu_page('litespeed', 'litespeed-crawler');\n //Hide \"LiteSpeed Cache → Toolbox\".\n remove_submenu_page('litespeed', 'litespeed-toolbox');\n }", "title": "" }, { "docid": "b428106c27b23dc8e1f3d48f71892905", "score": "0.6045899", "text": "function wpse26980_remove_tools() {\n $user = wp_get_current_user();\n if(!(current_user_can('administrator'))) {\n remove_menu_page( 'tools.php' );\n remove_menu_page( 'wpcf7' );\n remove_menu_page( 'edit-comments.php' );\n }\n}", "title": "" }, { "docid": "b428106c27b23dc8e1f3d48f71892905", "score": "0.6045899", "text": "function wpse26980_remove_tools() {\n $user = wp_get_current_user();\n if(!(current_user_can('administrator'))) {\n remove_menu_page( 'tools.php' );\n remove_menu_page( 'wpcf7' );\n remove_menu_page( 'edit-comments.php' );\n }\n}", "title": "" }, { "docid": "e2ca176744ba37a3621dab0490766bd5", "score": "0.6042107", "text": "function mgm_exclude_default_pages(){\t\r\n\t// system\r\n\t$system_obj = mgm_get_class('system');\r\n\t// init\r\n\t$hide_pages = array();\r\n\t// get all pages\r\n\t$pages = get_pages();\t\t\r\n\t// count\r\n\tif(count($pages)){\r\n\t\t// user logged in\r\n\t\tif( is_user_logged_in() ){\r\n\t\t\t$hide_urls = array('login','register','lostpassword','userprofile');\r\n\t\t}else{\r\n\t\t\t$hide_urls = array('profile','membership_contents','membership_details','userprofile');\r\n\t\t}\r\n\r\n\t\t// other\r\n\t\t$hide_urls[] = 'transactions';\r\n\r\n\t\t// register disabled\r\n\t\tif ( ! get_option('users_can_register') ){\r\n\t\t\t$hide_urls[] = 'register';\r\n\t\t}\t\r\n\t\t// make unique\r\n\t\t$hide_urls = array_unique($hide_urls);\r\n\t\t// permalink\r\n\t\tforeach($pages as $page){\r\n\t\t\t// permalink\r\n\t\t\t$permalink = trailingslashit(get_permalink($page->ID));\r\n\t\t\t// pages to hide\r\n\t\t\tforeach($hide_urls as $url){\r\n\t\t\t\t// match\r\n\t\t\t\tif(trailingslashit($system_obj->setting[$url.'_url']) == $permalink){\r\n\t\t\t\t\t// hide\r\n\t\t\t\t\t$hide_pages[] = $page->ID;\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\r\n\t\t// hide by slug\r\n\t\tforeach ($hide_urls as $slug) {\r\n\t\t\tif( $page = get_page_by_path($slug) ){\r\n\t\t\t\t// hide\r\n\t\t\t\t$hide_pages[] = $page->ID;\t\r\n\t\t\t}\r\n\t\t}\r\n\t}\t\t\t\t\t\r\n\t// return \r\n\treturn $hide_pages;\r\n}", "title": "" }, { "docid": "533815d259bdaf830f17e4ae490a9265", "score": "0.60329914", "text": "function fgSetupActions() {\n\tremove_action('wp_head', 'rsd_link');\n\tremove_action('wp_head', 'wlwmanifest_link');\n\tremove_action('wp_head', 'wp_generator');\n}", "title": "" }, { "docid": "cd1ef2ab51e6cf83451e46b134592fe9", "score": "0.602952", "text": "function mmc_dashboard(){\n\tif( current_user_can('manage_options') ){\n\t\t//remove quick press for admins\n\t\tremove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n\t}else{\n\t\t//remove news and events for every other type of user\n\t\tremove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n\t}\t\n\n\t\n}", "title": "" }, { "docid": "eadd8f08ef18aa79b5719d46fc0c67a1", "score": "0.60276127", "text": "public function clean_on_after_setup_theme() {\n\t\t\t// Remove JSON API links in header html.\n\n\t\t\t// Remove the REST API lines from the HTML Header.\n\t\t\tif ( has_action( 'wp_head', 'rest_output_link_wp_head' ) ) {\n\t\t\t\tremove_action( 'wp_head', 'rest_output_link_wp_head', 10 );\n\t\t\t}\n\n\t\t\tif ( has_action( 'wp_head', 'wp_oembed_add_discovery_links' ) ) {\n\t\t\t\tremove_action( 'wp_head', 'wp_oembed_add_discovery_links', 10 );\n\t\t\t}\n\n\t\t\t// Remove the REST API endpoint.\n\t\t\tif ( has_action( 'wp_head', 'wp_oembed_register_route' ) ) {\n\t\t\t\tremove_action( 'wp_head', 'wp_oembed_register_route' );\n\t\t\t}\n\n\t\t\t// Turn off oEmbed auto discovery.\n\t\t\tadd_filter( 'embed_oembed_discover', '__return_false' );\n\n\t\t\t// Don't filter oEmbed results.\n\t\t\tif ( has_filter( 'oembed_dataparse', 'wp_filter_oembed_result' ) ) {\n\t\t\t\tremove_filter( 'oembed_dataparse', 'wp_filter_oembed_result', 10 );\n\t\t\t}\n\n\t\t\t// Remove oEmbed discovery links.\n\t\t\tif ( has_action( 'wp_head', 'wp_oembed_add_discovery_links' ) ) {\n\t\t\t\tremove_action( 'wp_head', 'wp_oembed_add_discovery_links' );\n\t\t\t}\n\n\t\t\t// Remove oEmbed-specific JavaScript from the front-end and back-end.\n\t\t\tif ( has_action( 'wp_head', 'wp_oembed_add_host_js' ) ) {\n\t\t\t\tremove_action( 'wp_head', 'wp_oembed_add_host_js' );\n\t\t\t}\n\n\t\t\t// Remove all embeds rewrite rules.\n\t\t\t/* add_filter( 'rewrite_rules_array', 'disable_embeds_rewrites' ); */\n\n\t\t\t// Snippet completely disable the REST API and shows {\"code\":\"rest_disabled\",\"message\":\"The REST API is disabled on this site.\"}.\n\n\t\t\t// Filters for WP-API version 1.x.\n\t\t\tadd_filter( 'json_enabled', '__return_false' );\n\t\t\tadd_filter( 'json_jsonp_enabled', '__return_false' );\n\n\t\t\t// Filters for WP-API version 2.x.\n\t\t\tadd_filter( 'rest_enabled', '__return_false' );\n\t\t\tadd_filter( 'rest_jsonp_enabled', '__return_false' );\n\t\t}", "title": "" }, { "docid": "a387fcc9d18f66acc05ed8e784c78675", "score": "0.6024474", "text": "function inspiry_restrict_admin_access() {\n\n\t\tif ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {\n\t\t\t// let it go\n\t\t} else if ( isset( $_GET['action'] ) && ( $_GET['action'] == 'delete' ) ) {\n\t\t\t// let it go as it is from my properties delete button\n\t\t} else {\n\t\t\tif ( inspiry_is_user_restricted() ) {\n\t\t\t\twp_redirect( esc_url_raw( home_url( '/' ) ) );\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "52e9c2123b8b0d57169123fdad91a4da", "score": "0.6024379", "text": "function Wps_remove_menu_elements()\n {\n remove_submenu_page( 'plugins.php', 'plugin-editor.php' ); //plugin editor\n }", "title": "" }, { "docid": "00d3da9e138ca11d3b7921bc85a9136a", "score": "0.60211056", "text": "protected function removeFromMeta()\n {\n $pageList = new PageList($this->theme);\n $pageList->removeSubtree($this);\n }", "title": "" }, { "docid": "70e8527afe1b68ae437bd34b28318588", "score": "0.60206336", "text": "function wp_logo_admin_bar_remove() {\n\t\tglobal $wp_admin_bar;\n\n\t\t/* Remove their stuff */\n\t\t$wp_admin_bar->remove_menu('wp-logo');\n\t}", "title": "" }, { "docid": "8cb20aa532a1bccae34c88cd7ca54408", "score": "0.6014932", "text": "function cm2_admin_bar() {\n\tglobal $wp_admin_bar;\n\t$wp_admin_bar->remove_node('wp-logo');\n\t$wp_admin_bar->remove_node('comments');\n}", "title": "" }, { "docid": "7316c5b1b5bf9d06fcb5a7906c7425f3", "score": "0.59940726", "text": "function maksimer_customize_sidebar_menu() {\n\t\tremove_menu_page( 'index.php' );\n\t\tremove_menu_page( 'separator1' );\n\t\tremove_menu_page( 'upload.php' );\n\t\tremove_menu_page( 'edit-comments.php' );\n\t\tremove_submenu_page( 'themes.php', 'customize.php' );\n\t\tremove_submenu_page( 'edit.php', 'edit-tags.php?taxonomy=post_tag' );\n\t\tadd_management_page( __( 'Updates', 'maksimer_lang' ), __( 'Updates', 'maksimer_lang' ), 'update_core', 'update-core.php' );\n\n\t\tif ( ! current_user_can( 'administrator' ) ) {\n\t\t\tremove_menu_page( 'wpcf7' );\n\t\t\tremove_menu_page( 'tools.php' );\n\t\t\tremove_menu_page( 'edit.php?post_type=acf-field-group' );\n\t\t\tremove_menu_page( 'themes.php' );\n\t\t\tadd_menu_page( __( 'Menu' ), __( 'Menu' ), 'edit_theme_options', 'nav-menus.php', '', 'dashicons-menu', 60 );\n\t\t}\n\t}", "title": "" }, { "docid": "5ebfdf7860ea1ac49c14690231d8d0e0", "score": "0.5989185", "text": "function xtec_remove_menu_pages() {\n\n $user = wp_get_current_user();\n $roles = (array) $user->roles;\n\n if ( in_array( 'contributor', $roles ) || in_array( 'xtec_teacher', $roles )) {\n remove_menu_page('edit-comments.php');\n remove_menu_page('edit.php?post_type=calendar');\n remove_menu_page('tools.php');\n }\n}", "title": "" }, { "docid": "a72da33e622495e1f808df185c2db6c5", "score": "0.5986291", "text": "public static function addPagesToAdminMenu()\n\t{\n\t\tadd_menu_page(static::$pluginName, sprintf('%s <span class=\"awaiting-mod\" data-tolstoycomments>0</span>', static::$pluginShortName), 'moderate_comments', static::$pluginSlug, function() {}, 'dashicons-admin-comments', 76);\n\t\tadd_submenu_page(self::$pluginSlug, self::$pluginName, __('Settings', 'tolstoycomments'), 'moderate_comments', self::$pluginSlug.'_settings', [SettingsPage::class, 'show']);\n\t}", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "a433e4db90e8b2bc1724f47789dc0d06", "score": "0.0", "text": "public function edit($id)\n {\n //\n }", "title": "" } ]
[ { "docid": "63925fbab89765f6ec514208a03fc871", "score": "0.78354216", "text": "public function edit(Resource $resource)\n {\n return view('resource.edit', compact('resource'));\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.7692893", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "3e4affd8df1c5ef8f2afe9c9c3221248", "score": "0.7487642", "text": "public function edit($id)\n {\n // show form to edit\n }", "title": "" }, { "docid": "e148f1d3d9a48b05d53bc0934e9c8555", "score": "0.74829096", "text": "public function edit(Request $request, $resource)\n {\n $this->authorize('update', $resource);\n\n $this->event('updating', $resource->load($this->with)); \n\n if($this instanceof Compact) {\n $this->editingResource = $resource;\n\n return $this->index($request, app(Builder::class));\n }\n\n return view($this->editView)\n ->withForm($this->form()->setModel($resource))\n ->withName($this->name())\n ->withTitle($this->title())\n ->withActions($this->getActions())\n ->withRouteParameters((array) $this->routeParameters('edit', $resource));\n }", "title": "" }, { "docid": "4de13c28a63d7306cf639907e8ef1d9c", "score": "0.7343273", "text": "public function edit($resource, $resourceId)\n {\n return view('microboard::resource.edit', compact('resource', 'resourceId'));\n }", "title": "" }, { "docid": "4020b0e5a357920b39cf24e715e8cab6", "score": "0.7274648", "text": "public function edit($id) {\n ${$this->resource} = $this->model->findOrFail($id);\n\n App::setLocale(Helpers::getLang());\n\n return view($this->view_path . '.edit', compact($this->resource));\n }", "title": "" }, { "docid": "0cd4d6ca6f0a2017970904abf26fd651", "score": "0.7259789", "text": "public function edit($id)\n {\n return view('resource::edit');\n }", "title": "" }, { "docid": "256cb5b6f36786b11ec44b4af931758b", "score": "0.72310144", "text": "public function edit(Resource $resource)\n {\n\t\t\t\t$Item = $resource; $Actions = Action::all()->toArray();\n\t\t\t\t$Item[\"actions\"] = array_keys(str_split(str_replace(\".\",\"\",$this->floattostr ( $Item->action ))),\"1\");\n return view(\"resource.create\",compact(\"Item\",\"Actions\"))->with([\"update\"=>true]);\n }", "title": "" }, { "docid": "65ada685cf8e833ca627450ccc9d2441", "score": "0.7191711", "text": "public function edit($id)\n {\n $resource = Resource::find($id);\n \n return view('resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "0cf290df710095ca7ea001893658b9e6", "score": "0.71411604", "text": "public function editAction()\n {\n $page = $this->_helper->db->findById();\n $form = $this->_getForm($page);\n $this->view->form = $form;\n $this->_processPageForm($page, $form, 'edit');\n }", "title": "" }, { "docid": "5aefc7fd6a02ad9693185ed9c8d5b8d2", "score": "0.7032755", "text": "public function editAction() \n {\n $id = $this->request->get('id');\n\n // load the recipe from the database\n $recipe = Recipe::findFirst($id);\n\n $this->view->recipe = $recipe;\n $this->view->submit = \"editSubmit\";\n $this->view->title = \"Edit a recipe\";\n $this->view->pick('admin/add');\n }", "title": "" }, { "docid": "9126d463642a49ad64ccc9d4ccaea048", "score": "0.7032053", "text": "public function edit($id)\n {\n // Get the resource\n $object = $this->api()->show($id);\n\n // Get the form options\n $options = method_exists($this, 'formOptions') ? $this->formOptions($object) : [$this->package => $object];\n\n // Render edit view\n return $this->content( 'edit', $options );\n }", "title": "" }, { "docid": "c7274abf6ae2de7d4553b1b4b51a2134", "score": "0.6967485", "text": "public function edit()\n {\n /** @var Request $request */\n $request = app(Request::class);\n $formbuilder = app(FormBuilder::class);\n $args = $request->route()->parameters();\n\n $referer = url()->previous();\n $route = Route::getCurrentRoute()->getName();\n $model = $this->getEditModel($request, $args);\n\n $form_data = $this->getEditFormData($model, $request, $args);\n $form_data = array_merge(['prev_url' => $referer], $form_data);\n\n $url = (empty($this->route_update)) ? route(str_replace('edit', 'update', $route), $args) : $this->route_update;\n\n $form = $formbuilder->create($this->form_class, [\n 'method' => 'PUT',\n 'url' => $url,\n 'data' => $form_data,\n 'model' => $model,\n ]);\n\n $breadcrumb = $this->getEditBreadcrumb($model, $request, $args);\n\n if($request->ajax()) {\n return view($this->form_view, compact('form', 'breadcrumb', 'model', 'args', 'layout', 'section', 'request', 'form_data'));\n } else {\n $layout = $this->layout;\n $section = $this->section;\n $view = $this->form_view;\n return view('cms-package::default-resources.layout-extender', compact('form', 'breadcrumb', 'model', 'args', 'layout', 'section', 'layout', 'section', 'view', 'request', 'form_data'));\n }\n }", "title": "" }, { "docid": "052fcb4be65ef559048af91970a9092c", "score": "0.6962541", "text": "public function edit($id)\n {\n // we don't need this method which shows a form to edit\n }", "title": "" }, { "docid": "a801700662a2deaaefc059a611aa40bd", "score": "0.69617313", "text": "public function editformAction() {\r\n\t\tif (($messages = $this->_messages->getMessages ())) {\r\n\t\t\t$this->view->assign ( 'messages', $messages );\r\n\t\t}\r\n\t\t\r\n\t\t$info = $this->_tree->getNodeInfo ( $this->_request->getParam ( $this->_id_field ) );\r\n\t\t$form = new Bel_Forms_Builder ( $this->_formname, $this->_form_edit_action );\r\n\t\t$form->addElement ( 'hidden', $this->_id_field, array ('value' => $info->{$this->_id_field} ) );\r\n\t\t$form->populateForm ( $info );\r\n\t\t$this->view->assign ( 'form', $form );\r\n\t\t$this->view->display ( $this->_form_template );\r\n\t}", "title": "" }, { "docid": "83b72662162c1c99a4a9ec1b7b4e6edc", "score": "0.69612134", "text": "public function show_editform()\n {\n $this->item_form->display();\n }", "title": "" }, { "docid": "aaf7cccb1997350d3476b1b809c87285", "score": "0.6960807", "text": "public function edit(Resource $resource)\n {\n try {\n $grou = Groups::with([])->get();\n return view('resource.edit')->with(['groups' => $resource, 'op' => $grou]);\n } catch (\\Exception $e) {\n session()->flash('flash_error', 'Something went wrong');\n return Redirect::back();\n }\n }", "title": "" }, { "docid": "f8826a70c4e190274cdb2b9b04638375", "score": "0.6959897", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('FormBundle:Form')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Form entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('FormBundle:Form:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "627cc08a03d861bf43b77f13aa1b356b", "score": "0.6949801", "text": "public function edit($id)\n { \n return $this->showForm($id);\n }", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.6945275", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.6945275", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "167dafd94209f70f38ffcad67381a2e9", "score": "0.69375557", "text": "public function edit() {\n\t\t$this->mode = 'edit';\n\t\t$this->submit();\n\t}", "title": "" }, { "docid": "8c9d1b02602edc2dd288db289ad2a173", "score": "0.69332457", "text": "public function editAction()\n {\n // returning due to validation:\n if (isset($this->view->form)) {\n return;\n }\n \n $this->view->form = $this->_getCarForm();\n \n // Retrieve the record for editing:\n $manager = new Lightman_Managers_Car();\n $carId = $this->getRequest()->getParam('id');\n $data = $manager->fetch($carId);\n $this->view->form->populate($data[0]);\n $this->view->form->setAction('/car/save');\n }", "title": "" }, { "docid": "6eef3a46914dacc1a3123674c081e2a5", "score": "0.69211656", "text": "public function edit($id)\n {\n $model = $this->resourceModel::find($id);\n\n if (!is_null($this->relatedModel)) {\n $model->load($this->relatedModel);\n }\n\n $this->beforeEdit($model);\n\n $this->viewData['resourceData'] = $model;\n\n return view(\n \"{$this->viewBaseDir}.{$this->viewFiles['edit']}\",\n $this->viewData\n );\n }", "title": "" }, { "docid": "7abb5638b8fab40720496e4c8e4e6ee3", "score": "0.69126725", "text": "public function action_edit()\n\t{\n\t\t$id = $this->request->param('id');\n\n\t\tif ($id === null)\n\t\t{\n\t\t\t$this->redirect(Route::url('customer', array('action' => 'new')));\n\t\t} // if\n\n\t\t$model = ORM::factory('Customer')->where('id', '=', $id)->find();\n\n\t\t$this->content = View::factory('customer/form', array(\n\t\t\t'title' => __('Edit customer \":customer\"', array(':customer' => $model->company ?: $model->name)),\n\t\t\t'customer' => $model,\n\t\t\t'properties' => $model->get_properties(),\n\t\t\t'ajax_url' => Route::url('customer', array('action' => 'save', 'id' => $id)),\n\t\t\t'invoices' => $model->invoices->order_by('id', 'DESC')->limit(20)->find_all()\n\t\t));\n\t}", "title": "" }, { "docid": "7e98823aebb6ba9203517ae50d88ad7a", "score": "0.69074184", "text": "function edit(){\n\t\t$id = $this->input->get('id');\n\t\t$data = array();\n\t\t$data['title']\t\t= 'Edit '.$this->title;\n\t\t$data['controller']\t= $this->controller;\n\t\t$data['state']\t\t= 'edit';\n\t\t$data['id'] \t\t= $id;\n\n\t\t// because it's simple index and form, use common form\n\t\t$data['table_field'] = $this->group->table_field;\n\t\t$data['primary_key'] = $this->group->primary_key;\n\t\t$data['content']\t= 'content/common/form';\n\t\t$data['datas'] = $this->group->get(decrypt_id($id));\n\n\t\t$this->template($data);\n\t}", "title": "" }, { "docid": "442f0c0607d600b71f651788512fa4e2", "score": "0.68972987", "text": "public function edit()\n {\n return view('backend::edit');\n }", "title": "" }, { "docid": "9443931fcf9450e4082ea1fcc8f7947f", "score": "0.685467", "text": "public function editAction()\n {\n $category = $this->_helper->db->findById();\n $form = $this->_getForm($category);\n $this->view->form = $form;\n $this->_processPageForm($category, $form, 'edit'); \n }", "title": "" }, { "docid": "572f29a2affec4fc1f0fcd8cf08070ff", "score": "0.68250066", "text": "public function edit($id){\n \n try {\n $resource = Resource::withTrashed()->findOrFail($id); \n }catch (ModelNotFoundException $e){\n $errors = collect(['El recurso con ID '.$id.' no se encuentra.']);\n return back()\n ->withInput()\n ->with('errors', $errors);\n }\n $resourceStatuses = ResourceStatus::orderBy('name', 'ASC')->get();\n $resourceTypes = ResourceType::orderBy('name', 'ASC')->get();\n $dependencies = Dependency::orderBy('name', 'ASC')->get();\n $resourceCategories = ResourceCategory::orderBy('name', 'ASC')->get();\n $physicalStates = PhysicalState::orderBy('name', 'ASC')->get();\n $spaces = Space::orderBy('name', 'ASC')->get();\n\n return view('admin.resources.create_edit')\n ->with('resource', $resource)\n ->with('resourceStatuses', $resourceStatuses)\n ->with('resourceTypes', $resourceTypes)\n ->with('dependencies', $dependencies)\n ->with('resourceCategories', $resourceCategories)\n ->with('physicalStates', $physicalStates)\n ->with('spaces', $spaces)\n ->with('title_page', 'Editar recurso: '.$resource->name)\n ->with('menu_item', $this->menu_item);\n }", "title": "" }, { "docid": "92c9e3a1c5275112cb6b6e51244fca5c", "score": "0.6815314", "text": "public function edit($id)\n {\n $model = static::$model;\n $className = $this->getClass();\n\n $item = $className::find($id);\n\n $formOptions = [\n 'route' => ['admin.' . strtolower($this->getClassNameFromModel()) . '.update', $id],\n 'method' => 'put',\n ];\n\n return view('pilot::admin.' . static::$viewFolder . '.form', compact('item', 'formOptions', 'model'));\n }", "title": "" }, { "docid": "23a4ee1572e6b647de73c414d405951f", "score": "0.68132675", "text": "public function edit($id)\n {\n //\n $form = Form::find($id);\n return view('forms.edit',compact('form','id'));\n\n }", "title": "" }, { "docid": "a3f2b74e4e1ef90e3f2b369f12999507", "score": "0.68113613", "text": "public function edit($id)\n {\n\t\t$params = [\n\t\t\t'data' => $this->repository->findById($id),\n\t\t];\n\n\t\treturn view('admin.pages.material-form-update', ['page' => 'material'])->with($params);\n\t}", "title": "" }, { "docid": "873a08d0f357fca631ccc7259052d9ce", "score": "0.68018645", "text": "public function edit()\n {\n return view('common::edit');\n }", "title": "" }, { "docid": "ea939d247defa384f3c7bb826e339c02", "score": "0.6799606", "text": "public function edit($id)\n {\n $product = Product::findOrFail($id);\n return view('Admin/product/form',compact('product'));\n }", "title": "" }, { "docid": "81e049bcae69bcc2654f7dc4038b4aaf", "score": "0.679763", "text": "public function edit($id)\n {\n $requestform = requestform::findOrFail($id);\n\n return view('RequestForms.requestforms.edit', compact('requestform'));\n }", "title": "" }, { "docid": "e3fad094d4252fd72e2502d403dfc367", "score": "0.67960227", "text": "public function edit()\n {\n return view('product::edit');\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "8566978c055c66cbf8d8ff39c2b4fa99", "score": "0.6789007", "text": "public function getEditForm($id){\n $data = $this->model->findOrFail($id);\n return view('administrator.pages.update_form')->with(compact('data'));\n }", "title": "" }, { "docid": "d8b4457853a470b2a27d3bf2af2f3273", "score": "0.67831767", "text": "public function edit($id)\n {\n return view('operationmanager::edit');\n }", "title": "" }, { "docid": "3e2f2a29164ba9a0158e7b2fd5bd8f61", "score": "0.6764436", "text": "public function edit() {\n\t\tglobal $DIC;\n\t\t$tpl = $DIC['tpl'];\n\n\t\t$this->initForm(\"edit\");\n\t\t$this->getValues();\n\n\t\t$tpl->setContent($this->form->getHTML());\n\t}", "title": "" }, { "docid": "df462f5d85bc8fd7cf9dce14953e8abf", "score": "0.67639047", "text": "public function edit()\n {\n return view('offer::edit');\n }", "title": "" }, { "docid": "418884af8e182e5d20016d3fb1359c7e", "score": "0.67567337", "text": "public function editAction()\n {\n $em = $this->getDoctrine()->getManager();\n\t\t/* Template fields */\n\t\t$GlobalFields = new GlobalFields();\n\t\t$globalfieldsarray = $GlobalFields->getGlobalFields($this, $em);\n\t\t\n\t\t$entity = $globalfieldsarray[\"empleado\"];\n\t\t$entity->setUserName($entity->getUsuario()->getUserName());\n\t\t$entity->setPassword($entity->getUsuario()->getPassword());\n\t\t\n $editForm = $this->createForm(new EmpleadoType(), $entity);\n\n return $this->render('SystemEmpleadoBundle:EditarPerfil:edit.html.twig', array(\n\t\t\t'globalfieldsarray' => $globalfieldsarray,\n 'edit_form' => $editForm->createView(),\n 'error' => NULL,\n ));\n }", "title": "" }, { "docid": "c3a72c58c6b66c9b866217649ddaef6a", "score": "0.67562574", "text": "public function edit()\n {\n return view('sallereservation::edit');\n }", "title": "" }, { "docid": "f9f7f910c8b16a5d918564783761275b", "score": "0.67492944", "text": "public function edit($id, Request $request)\n {\n $resource = MyResource::find($id);\n if ($resource != null) {\n if ($request->user()->id == $resource->user->id || $request->user()->hasRole('Admin')) {\n $modules = Module::getFormModulesArray();\n return view('resources.edit', compact('resource', 'modules'));\n } else {\n return abort(401, 'You\\'re not allowed to edit this resource!');\n }\n }\n }", "title": "" }, { "docid": "06a1955be6e482728e09337f630bb727", "score": "0.67316383", "text": "public function editAction($id)\n {\n $user = $this->getUser();\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('SifoSharedBundle:Program')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Program entity.');\n }\n\n $form = $this->createEditForm($entity);\n\n return $this->render('SifoAdminBundle:edit:layout.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'user' => $user,\n ));\n }", "title": "" }, { "docid": "444f98d0090cda3d8ec6a32c569483fe", "score": "0.6730375", "text": "public function edit()\n {\n return view('item::edit');\n }", "title": "" }, { "docid": "3511b1492265afe62ecb75757f43c811", "score": "0.67264074", "text": "protected function showForm() {\n\t\t// Setup header Data\n\t\t$titleStr = '';\n\t\tswitch ($this->mode) {\n\t\t\tcase 'delete':\n\t\t\t\t$titleStr = 'Delete';\n\t\t\t\tbreak;\n\t\t\tcase 'edit':\n\t\t\t\t$titleStr = 'Edit';\n\t\t\t\tbreak;\n\t\t\tcase 'add':\n\t\t\tdefault:\n\t\t\t\t$titleStr = 'Add';\n\t\t\t\tbreak;\n\t\t}\n\t\tif (!isset($this->data['form']) || empty($this->data['form'])) {\n\t\t\t$this->data['form'] = $this->form->get();\n\t\t}\n\t\t$this->data['subTitle'] = $titleStr.\" \".$this->_NAME;\n\t\t$this->data['thisItem']['id'] = $this->recordId;\n\t\t$this->data['thisItem']['ownerId'] = (isset($this->dataModel->recordOwnerId) ? $this->dataModel->recordOwnerId : -1);\n\t\t$this->data['currUser'] = $this->params['currUser'];\n\t\t$this->params['content'] = $this->load->view($this->views['EDIT'],$this->data,true);\n\t\t$this->params['pageType'] = PAGE_FORM;\n\t\t$this->displayView();\n\t}", "title": "" }, { "docid": "32e951846997ccc0adda9087b6a46d09", "score": "0.6724373", "text": "public function edit($id){\n return $this->form($id);\n }", "title": "" }, { "docid": "3cb809ceeb3604d4bdf66da701d2423d", "score": "0.67104334", "text": "public function showEdit($id)\n {\n return $this->view('edit', [\n 'model' => $this->service->find($id)\n ]);\n }", "title": "" }, { "docid": "56f9be8327c6825b7bab6704e048d9b7", "score": "0.67073035", "text": "public function edit(Request $request, $client, $resource)\n\t{\n\t\t$resource = Resource::findBySlug($client, $resource);\n\n\t\tif (!$resource) {\n\t\t\treturn response(view('resources.404'), 404);\n\t\t}\n\n\t\t$this->authorize('manage', $resource);\n\n\t\t$resource->load('client', 'tags', 'type');\n\n\t\treturn view('resources.edit', ['client' => $resource->client, 'resource' => $resource]);\n\t}", "title": "" }, { "docid": "41b2f68ed73a5cc186c76264c0d17f7a", "score": "0.6706397", "text": "public function edit($id)\n\t{\n\t\t$question = Question::find($id);\n\t \n\t \n $display = Question::$display;\n\n\t\treturn view('admin.question.edit', compact('question', \"display\"));\n\t}", "title": "" }, { "docid": "e825c5f01addbfd2313d771317890d1d", "score": "0.6702575", "text": "public function editAction() {\n\t\t$this->enableLayout();\n\t\t$id\t\t = $this->getRequest()->getParam('id');\n\t\t$product = Object_Abstract::getById($id);\n\n\t\t$user\t\t\t\t = ParagonFramework_Models_User::getUser();\n\t\t$configReader\t\t = ParagonFramework_ConfigReader::getInstance();\n\t\t$configReaderView\t = $this->getView($user, $configReader);\n\n\t\t$templateName = $configReaderView->getTemplate();\n\n\t\t$plugin\t\t\t\t = ParagonFramework_Plugin::getInstance();\n\t\t$templateFilePath\t = $plugin->getDeployPath() . '/templates/' . $templateName;\n\n\t\t$this->view->pathToSnipplet\t = $templateFilePath;\n\t\t$this->view->user\t\t\t = $user;\n\t\t$this->view->product\t\t = $product;\n\t}", "title": "" }, { "docid": "9b1f710040cf008ce0cc39a2446c2e3f", "score": "0.66995674", "text": "public function edit()\n\t{\n\t\t$this->subcontrollers[\"form\"] = new Form\\FormController($this->config, \"Form\", \"index\", array());\n\n\n\t\t// $this->context[\"forms\"] = $this->form_controller->get_forms($this->forms);\n\t\t// var_dump($this->context[\"forms\"]);\n\t}", "title": "" }, { "docid": "281109723855c04252dbc51f84833e23", "score": "0.6693279", "text": "public function editAction()\n\t{\n\t\t// We first retrieve the report ID\n\t\t$id = $this->getRequest()->getParam('id');\n\t\t// Then we generate the report path\n\t\t$path = Mage::getBaseDir('var') . DS . 'report';\n\n\t\t// Load the report\n\t\t$model = Mage::getModel('reportsviewer/report')->load($id, $path);\n\n\t\t// Register the data so we can use it in the form\n\t\tMage::register('report_data', $model);\n\n\t\t// Layout loading / rendering\n\t\t$this->loadLayout();\n\t\t$this->_setActiveMenu('system/tools/reportsviewer');\n\n\t\t$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);\n\n\t\t$this->_addContent($this->getLayout()->createBlock('reportsviewer/adminhtml_reportsviewer_edit'));\n\n\t\t$this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);\n\n\t\t$this->renderLayout();\n\t}", "title": "" }, { "docid": "e229be1f6baba6da610f480a33455c90", "score": "0.6690778", "text": "public function edit($id)\n {\n $resource = $this->findResource($id);\n\n return view($this->getTemplatePath('edit'), compact('resource'));\n }", "title": "" }, { "docid": "ea46a3f45fe3107a2b87f10fd7bb2223", "score": "0.6688617", "text": "public function edit(Record $record)\n {\n $this->authorize('edit', $record);\n\n $fieldChanges = $this->requestProcessor->fromFieldsRequest(\n $record->recordType->fields(), \"field_\");\n $linkChanges = $this->requestProcessor->getLinkChanges(\n $record->recordType);\n $record->updateData($fieldChanges);\n return view('record.edit', [\n \"record\" => $record,\n \"idPrefix\" => \"\",\n \"returnTo\" => $this->requestProcessor->returnURL(),\n \"linkChanges\" => $linkChanges,\n \"nav\" => $this->navigationMaker->recordNavigation($record, \"Edit\")\n ]);\n }", "title": "" }, { "docid": "15c7a9f1bc35a63d24f1c419ea44bb8e", "score": "0.6687803", "text": "public function edit($id)\n {\n $countries = Country::all();\n $roles = Role::all();\n $admin = Admin::find($id);\n $pageTitle = trans(config('dashboard.trans_file').'edit');\n $submitFormRoute = route('admins.update', $id);\n $submitFormMethod = 'put';\n return view(config('dashboard.resource_folder').$this->controllerResource.'form', compact('countries', 'roles', 'admin', 'pageTitle', 'submitFormRoute', 'submitFormMethod'));\n }", "title": "" }, { "docid": "bf49bc8226e13e2862c2259d16e93588", "score": "0.6680715", "text": "public function edit($id)\n {\n $product = Product::find($id);\n return view('products.edit_form')->with('product', $product)->with('manufacturers', Manufacturer::all());\n }", "title": "" }, { "docid": "3e9f248cdce27ef62f9af24dbc0c177d", "score": "0.66793704", "text": "public function edit($id)\n {\n $edit_object = $this->objectRepository->find($id);\n return view('admin.Object.edit-object',compact('edit_object'));\n }", "title": "" }, { "docid": "6d7fd6cc71038b382ce6486ecbf4fe92", "score": "0.6670073", "text": "public function viewEdit()\n {\n if (isset($_GET['id'])) {\n $data['product'] = Product::getById($_GET['id']);\n View::render('Products/edit.php', $data);\n } else {\n echo 'Page not found';\n }\n }", "title": "" }, { "docid": "136c14e90c2ade2a65f234ee3ff6ac85", "score": "0.66696644", "text": "public function edit($id)\n {\n // get the nerd\n $employee = Employee::find($id);\n\n // show the edit form and pass the nerd\n return View::make('employee.edit')\n ->with('employee', $employee);\n }", "title": "" }, { "docid": "419edcb2aed17f9ea1df57d9b28b5be3", "score": "0.6668747", "text": "public static function edit()\r\n {\r\n $record = todos::findOne($_REQUEST['id']);\r\n self::getTemplate('edit_task', $record);\r\n }", "title": "" }, { "docid": "7ab4920df56f35f41b7bed2b83e1e12f", "score": "0.6665399", "text": "public function edit($id)\n\t{\n\t\t$product = Product::findOrFail($id);\n\t\t$show = false;\n\t\treturn View::make('admin.product.new_edit_product', compact('product', 'show'));\n\t}", "title": "" }, { "docid": "261de490d37bf33e08a7b49ebcdbaf10", "score": "0.66629046", "text": "public function edit($id)\n\t{\n\t\tif(Auth::user() && Auth::user()->id == Config::get('laracancan.super_admin')) {\n\t\t\t$resource = Resource::find($id);\n\t\t\treturn view('laracancan::resource.edit')\n\t\t\t\t->with('resource', $resource);\n\t\t}\n\n\t\treturn response(view('laracancan::master.401'), 401);\n\t}", "title": "" }, { "docid": "324456cc428b315bcf53fd80359eafa2", "score": "0.6654099", "text": "public function edit($id)\n {\n $forms = Form::Find($id);\n return view('be/forms/edit', ['forms'=>$forms ]);\n }", "title": "" }, { "docid": "3e646f91bbc9b42ba119ea81f1e01e36", "score": "0.66473585", "text": "public function edit($id)\n {\n\n $formulario = new FormBuilder($this->class::findOrFail($id),$this->formFields);\n $modelo = $this->model;\n return view($this->chooseView('edit'), compact('formulario', 'modelo'));\n }", "title": "" }, { "docid": "7c426795b6ade66a5e5ef6b740010b61", "score": "0.6642236", "text": "public function editAction(){\n if($this->_getParam('id',false)){\n $form = new HelpForm();\n $form->submit->setLabel('Submit changes');\n $form->author->setValue($this->getIdentityForForms());\n $this->view->form = $form;\n if($this->getRequest()->isPost() \n && $form->isValid($this->_request->getPost())){\n if ($form->isValid($form->getValues())) {\n $where = array();\n $where[] = $this->_help->getAdapter()->quoteInto('id = ?', \n $this->_getParam('id'));\n $this->_help->update($form->getValues(),$where);\n $this->getFlash()->addMessage('You updated: <em>' \n . $form->getValue('title')\n . '</em> successfully. It is now available for use.');\n $this->_redirect('admin/help/');\n } else {\n $form->populate($form->getValues());\n }\n } else {\n $form->populate($this->_help->fetchRow('id= ' \n . $this->_getParam('id'))->toArray());\n }\n } else {\n throw new Pas_Exception_Param($this->_missingParameter, 500);\n }\n }", "title": "" }, { "docid": "45821cecfbb5732cd269059f6aad418f", "score": "0.66403663", "text": "function edit()\n\t{\n\t\tJRequest::setVar( 'view', 'editlieux' );\n\t\tJRequest::setVar( 'layout', 'edit_form' );\n\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "ccb8cbed1c0323296fb99a02c5821089", "score": "0.6636548", "text": "public function editAction() {\n \n View::renderTemplate('Settings/edit.html', [\n 'user' => $this->user\n ]);\n }", "title": "" }, { "docid": "0da44488fa19010ad9532838a532cf8a", "score": "0.66324544", "text": "public function edit(FormBuilder $formBuilder, $id)\n {\n $data['title'] = $this->title;\n $tbl = User::find($id);\n $data['form'] = $formBuilder->create('App\\Forms\\UserForm', [\n 'method' => 'PUT',\n 'model' => $tbl,\n 'url' => route($this->uri.'.update', $id)\n ])\n ->modify('role', 'choice', [\n 'selected' => null\n ])\n ->modify('password', 'password', [\n 'value' => '',\n 'attr' => ['data-validation' => '']\n ]);\n $data['back'] = route($this->uri.'.index');\n return view($this->folder.'.create', $data);\n }", "title": "" }, { "docid": "d89d877aeb4e888fc162f4776686a75f", "score": "0.66217417", "text": "public function edit()\n {\n return view('satuan::edit');\n }", "title": "" }, { "docid": "afb09dad84e30958b4252ef05c35ffd3", "score": "0.66183454", "text": "public function editView() {\n $this->edit = true;\n $this->addView();\n }", "title": "" }, { "docid": "da2c7e0272b4f7cc0f2b78554d9864cb", "score": "0.66176736", "text": "public function edit($id)\n {\n return view('employee::edit');\n }", "title": "" }, { "docid": "d6c2c7e0ddbac0b65be0ee74a7fcd796", "score": "0.6614968", "text": "public function edit($id)\n {\n return view('consultas::edit');\n }", "title": "" }, { "docid": "05a97cb5f26b111f1833f8ff3fcfa159", "score": "0.6611799", "text": "public function edit() {\n\n \t\tif (!$this->user || !$_POST)\n \t\tRouter::redirect('/organizations/index');\n\n \t$organization_id = $_POST['organization_id'];\n\n\t\t# Transfer POST data to Organization object\n\t\t$organization = new Organization();\n\t\t$organization->findInDb ($organization_id);\n\n # Setup view\n\t\t$this->template->content = View::instance('v_organizations_edit');\n\t\t$this->template->title = \"Edit Organization\";\n\t\t$this->template->client_files_body = \"<script src='/js/hide-category-navigation.js' type='text/javascript'></script>\";\n\n\t\t$this->template->content->organization = $organization;\n\n \techo $this->template;\n }", "title": "" }, { "docid": "b492e01b8e4a4d95cb491744ad7b75fd", "score": "0.6607943", "text": "public function edit($id)\n {\n abort_if(Gate::denies('user_access'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n $forms = Form::findOrFail($id);\n return view('admin.form.edit', compact('forms'));\n }", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "69349f7253951cb5e1d148a7d1e3929b", "score": "0.6607782", "text": "function edit($request) {\n\t\tif(!$this->currentRecord) {\n\t\t\treturn $this->httpError(404);\n\t\t}\n\t\tif(!$this->currentRecord->canEdit(Member::currentUser())) {\n\t\t\treturn $this->httpError(403);\n\t\t}\n\n\t\treturn $this->render(array(\n\t\t\t'Form' => $this->EditForm(),\n\t\t\t'ExtraForm' => $this->DeleteForm()\n\t\t));\n\t}", "title": "" }, { "docid": "1103d1caa349a1d4f5beb8012d42d974", "score": "0.66074175", "text": "public function edit($id)\n {\n return view('apollo::edit');\n }", "title": "" }, { "docid": "4c41c54cdabcef7aee925039ff148afa", "score": "0.66037405", "text": "public function edit()\n {\n // return view('master::edit');\n }", "title": "" }, { "docid": "18ea739bdb9f6382c60e491e54174aee", "score": "0.6600729", "text": "public function edit($id)\n {\n return view('book.form', compact('id'));\n }", "title": "" }, { "docid": "2a47ad7ce79b806f24d1a15c7fc9c440", "score": "0.6596694", "text": "public function edit($id)\n {\n return view('frontend::edit');\n }", "title": "" }, { "docid": "12259e1dd0f580f13929c361e6808b7f", "score": "0.65930325", "text": "public function edit($id)\n {\n return view('helpcentermodule::edit');\n }", "title": "" }, { "docid": "a6922b424cc81f43c7dfdb03fa2fdd30", "score": "0.6587789", "text": "public function edit($id)\n\t{\n\n\t\t$record=LegalAssistance::find($id);\n\t\t$elements_data=$this->generate_form($record->toArray());\n\t\t$data['elements_data']=$elements_data;\n\t\t$data['can_import']=true;\n\t\t$data['centers']=retrieveField(Center::all(),'name');\n\t\t$data['submit_url']='legalassistance.update';\n\t\t$data['heading']='Legal Assistance';\n\t\t$data['go_back']='legalassistance.index';\n\t\t$data['record_id']=$record['id'];\n\n\t\treturn View::make('layouts.records.edit')->with('data', $data);\n\t}", "title": "" }, { "docid": "c0ed2d04ca6f88da3fdd5ba24182cabd", "score": "0.65859956", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('StalkAdminBundle:Faq')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Faq entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('StalkAdminBundle:Faq:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "69f193cd505298f2c28370b8b0c844c4", "score": "0.65842503", "text": "public function edit($id)\n {\n $especialidade = Especialidade::find($id);\n\n if (is_null($especialidade)) {\n return $this->retornaMensagemNaoEncontrado(false);\n } else {\n return view('especialidade.especialidadeForm')\n ->with('titulo', 'Especialidades - Alteração')\n ->with('especialidade', $especialidade);\n }\n }", "title": "" }, { "docid": "364ca1756970ce6a0c4ca2c96ab66a99", "score": "0.65837765", "text": "function edit() {\n //$this->view->render('Pharmacy/edit');\n }", "title": "" }, { "docid": "b14f129d44d316c72400cd045d6a4e84", "score": "0.65830815", "text": "public function edit($id)\n {\n $formation = Formation::findOrFail($id);\n return view('/formation.update-form', compact('formation'));\n }", "title": "" }, { "docid": "5189a2b2eec4b70ad630efbb5387c44a", "score": "0.6579895", "text": "public function edit(Request $request)\n {\n $id = $request->id;\n if(!$id){\n $request->session()->flash('error', \"Something Went Wrong!.\");\n return redirect(route('manage-contractor-resources'))->withInput();\n }\n $data['chapters'] = Chapter::all();\n $data['info'] = $info = ContractorResource::find($id);\n if(!$info) {\n $request->session()->flash('error', \"Unable to find contractor resource.\");\n return redirect(route('manage-contractor-resources'))->withInput();\n }\n $data['title'] = \"Manage Contractor Resources - Edit\";\n return view('manage_contractor_resources.edit', $data);\n }", "title": "" }, { "docid": "a21034b7eacdbe071c44a2839d5a86e5", "score": "0.6579643", "text": "public function edit()\n\t{\n\t\t$jInput = JFactory::getApplication()->input;\n\t\t$jInput->set('view', 'template');\n\t\t$jInput->set('layout', 'default');\n\t\t$jInput->set('hidemainmenu', 1);\n\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "12c851ca81effd8d08719b4e8d030021", "score": "0.6579554", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('DevPCultBundle:Representation')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Representation entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('DevPCultBundle:Representation:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "82fbbfb6e7f70c57e4866451e08650ae", "score": "0.6572959", "text": "public function edit()\n {\n return view('licenca.edit');\n }", "title": "" }, { "docid": "293e4323f95692bc641e5529b888814d", "score": "0.6572167", "text": "public function edit($id) {\n\n\t\treturn view('balance.entry.edit', \n\t\t\t[\n\t\t\t'title' => 'Editar Registro',\n\t\t\t'action' => [\n\t\t\t'name' => 'edit',\n\t\t\t'value' => 'Editar',\n\t\t\t'route' => '/entry/update/'.$id,\n\t\t\t],\n\t\t\t'concepts' => Concepts::all('name', 'id'),\n\t\t\t'entry' => count(old()) > 0 ? $this->createEntry (old()) : $this->show($id)[0]\n\t\t\t]\n\t\t\t);\n\t}", "title": "" }, { "docid": "f49e849e4d81c6dd329330e95933d929", "score": "0.65693146", "text": "public function showEditForm($jobId) {\n $job = Job::find($jobId);\n return view('jobs/edit', [\n 'job' => $job\n ]);\n }", "title": "" }, { "docid": "87f80527ccf944a69125ffa41418e52d", "score": "0.656931", "text": "public function edit()\n {\n return view('inventory::edit');\n }", "title": "" }, { "docid": "8e54661cceae01836ae81c249aa4446e", "score": "0.6568565", "text": "public function edit($id)\n {\n return view('bodeguero/historial.form', [\n 'historial' => Historial::find($id), \n 'is_editing' => true\n ]);\n }", "title": "" }, { "docid": "544a3a2d2b88694a924ab6829e4dee76", "score": "0.6568338", "text": "public function editAction()\n {\n // returning due to validation:\n if (isset($this->view->form)) {\n return;\n }\n \n $this->view->form = $this->_getTaskForm();\n \n // Get the assignees droplist ready:\n $assignees = $this->_getAssigneesList();\n $this->view->assignees = $assignees;\n \n // Retrieve the record for editing:\n $manager = new Lightman_Managers_Task();\n $taskId = $this->getRequest()->getParam('id');\n $data = $manager->fetch($taskId);\n $this->view->form->populate($data[0]);\n $this->view->form->setAction('/task/save');\n }", "title": "" } ]
137d4a5ae2406e0c07547e3536a11ea2
Number of conversations attached to the issue at this point in time. Generated from protobuf field int64 labeled_conversations_count = 2;
[ { "docid": "c4e51285ec6e86af1fdfce99a524e04a", "score": "0.78765357", "text": "public function getLabeledConversationsCount()\n {\n return $this->labeled_conversations_count;\n }", "title": "" } ]
[ { "docid": "daaf896d6f4dacb32ca9dd026c952f15", "score": "0.77743006", "text": "public function setLabeledConversationsCount($var)\n {\n GPBUtil::checkInt64($var);\n $this->labeled_conversations_count = $var;\n\n return $this;\n }", "title": "" }, { "docid": "37b4693b66373ed10dcb57679fcfb855", "score": "0.62456346", "text": "public function getConversationCount()\n {\n return $this->conversation_count;\n }", "title": "" }, { "docid": "13ceeb7d6a83ebebd5971b6a4d17e633", "score": "0.6146061", "text": "public function getAnalyzedConversationsCount()\n {\n return $this->analyzed_conversations_count;\n }", "title": "" }, { "docid": "658924479ce3b4f762675d96cca05f6e", "score": "0.6103966", "text": "public function getUnclassifiedConversationsCount()\n {\n return $this->unclassified_conversations_count;\n }", "title": "" }, { "docid": "28e00c9ebf88258d0a382a96d1076d72", "score": "0.59877443", "text": "public function setUnclassifiedConversationsCount($var)\n {\n GPBUtil::checkInt64($var);\n $this->unclassified_conversations_count = $var;\n\n return $this;\n }", "title": "" }, { "docid": "e8917937e9e1f6e5cbefbdca972ec044", "score": "0.58598393", "text": "public function setAnalyzedConversationsCount($var)\n {\n GPBUtil::checkInt64($var);\n $this->analyzed_conversations_count = $var;\n\n return $this;\n }", "title": "" }, { "docid": "1b019451c17be555487e9e60a4b854c1", "score": "0.5850171", "text": "public function setConversationCount($var)\n {\n GPBUtil::checkInt32($var);\n $this->conversation_count = $var;\n\n return $this;\n }", "title": "" }, { "docid": "0fa610af7fa36e4575c80e1b7f072b0c", "score": "0.58095014", "text": "public function getTrainingConversationsCount()\n {\n return $this->training_conversations_count;\n }", "title": "" }, { "docid": "5d4c20d081852be7d9ffe1f57fc728f2", "score": "0.55084246", "text": "public function setTrainingConversationsCount($var)\n {\n GPBUtil::checkInt64($var);\n $this->training_conversations_count = $var;\n\n return $this;\n }", "title": "" }, { "docid": "fa6aaa0cb344d38b83b01568e0a759ce", "score": "0.5401659", "text": "public function test_get_conversation_counts_test_cases() {\n $typeindividual = \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL;\n $typegroup = \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP;\n $typeself = \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF;\n list($user1, $user2, $user3, $user4, $user5, $user6, $user7, $user8) = [0, 1, 2, 3, 4, 5, 6, 7];\n $conversations = [\n [\n 'type' => $typeindividual,\n 'users' => [$user1, $user2],\n 'messages' => [$user1, $user2, $user2],\n 'favourites' => [$user1],\n 'enabled' => null // Individual conversations cannot be disabled.\n ],\n [\n 'type' => $typeindividual,\n 'users' => [$user1, $user3],\n 'messages' => [$user1, $user3, $user1],\n 'favourites' => [],\n 'enabled' => null // Individual conversations cannot be disabled.\n ],\n [\n 'type' => $typegroup,\n 'users' => [$user1, $user2, $user3, $user4],\n 'messages' => [$user1, $user2, $user3, $user4],\n 'favourites' => [],\n 'enabled' => true\n ],\n [\n 'type' => $typegroup,\n 'users' => [$user2, $user3, $user4],\n 'messages' => [$user2, $user3, $user4],\n 'favourites' => [],\n 'enabled' => true\n ],\n [\n 'type' => $typegroup,\n 'users' => [$user6, $user7],\n 'messages' => [$user6, $user7, $user7],\n 'favourites' => [$user6],\n 'enabled' => false\n ],\n [\n 'type' => $typeself,\n 'users' => [$user8],\n 'messages' => [$user8],\n 'favourites' => [],\n 'enabled' => null // Self-conversations cannot be disabled.\n ],\n ];\n\n return [\n 'No conversations' => [\n 'conversationConfigs' => $conversations,\n 'deletemessagesuser' => null,\n 'deletemessages' => [],\n 'arguments' => [$user5],\n 'expectedcounts' => ['favourites' => 1, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 0,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 0,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'expectedunreadcounts' => ['favourites' => 0, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 0,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 0,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'deletedusers' => []\n ],\n 'No individual conversations, 2 group conversations' => [\n 'conversationConfigs' => $conversations,\n 'deletemessagesuser' => null,\n 'deletemessages' => [],\n 'arguments' => [$user4],\n 'expectedcounts' => ['favourites' => 1, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 0,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 2,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'expectedunreadcounts' => ['favourites' => 0, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 0,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 2,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'deletedusers' => []\n ],\n '2 individual conversations (one favourited), 1 group conversation' => [\n 'conversationConfigs' => $conversations,\n 'deletemessagesuser' => null,\n 'deletemessages' => [],\n 'arguments' => [$user1],\n 'expectedcounts' => ['favourites' => 2, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'expectedunreadcounts' => ['favourites' => 1, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'deletedusers' => []\n ],\n '1 individual conversation, 2 group conversations' => [\n 'conversationConfigs' => $conversations,\n 'deletemessagesuser' => null,\n 'deletemessages' => [],\n 'arguments' => [$user2],\n 'expectedcounts' => ['favourites' => 1, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 2,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'expectedunreadcounts' => ['favourites' => 0, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 2,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'deletedusers' => []\n ],\n '2 group conversations only' => [\n 'conversationConfigs' => $conversations,\n 'deletemessagesuser' => null,\n 'deletemessages' => [],\n 'arguments' => [$user4],\n 'expectedcounts' => ['favourites' => 1, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 0,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 2,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'expectedunreadcounts' => ['favourites' => 0, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 0,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 2,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'deletedusers' => []\n ],\n 'All conversation types, delete a message from individual favourited, messages remaining' => [\n 'conversationConfigs' => $conversations,\n 'deletemessagesuser' => $user1,\n 'deletemessages' => [0],\n 'arguments' => [$user1],\n 'expectedcounts' => ['favourites' => 2, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'expectedunreadcounts' => ['favourites' => 1, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'deletedusers' => []\n ],\n 'All conversation types, delete a message from individual non-favourited, messages remaining' => [\n 'conversationConfigs' => $conversations,\n 'deletemessagesuser' => $user1,\n 'deletemessages' => [3],\n 'arguments' => [$user1],\n 'expectedcounts' => ['favourites' => 2, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'expectedunreadcounts' => ['favourites' => 1, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'deletedusers' => []\n ],\n 'All conversation types, delete all messages from individual favourited, no messages remaining' => [\n 'conversationConfigs' => $conversations,\n 'deletemessagesuser' => $user1,\n 'deletemessages' => [0, 1, 2],\n 'arguments' => [$user1],\n 'expectedcounts' => ['favourites' => 1, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'expectedunreadcounts' => ['favourites' => 0, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'deletedusers' => []\n ],\n 'All conversation types, delete all messages from individual non-favourited, no messages remaining' => [\n 'conversationConfigs' => $conversations,\n 'deletemessagesuser' => $user1,\n 'deletemessages' => [3, 4, 5],\n 'arguments' => [$user1],\n 'expectedcounts' => ['favourites' => 2, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 0,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'expectedunreadcounts' => ['favourites' => 1, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 0,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'deletedusers' => []\n ],\n 'All conversation types, delete all messages from individual favourited, no messages remaining, different user' => [\n 'conversationConfigs' => $conversations,\n 'deletemessagesuser' => $user1,\n 'deletemessages' => [0, 1, 2],\n 'arguments' => [$user2],\n 'expectedcounts' => ['favourites' => 1, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 2,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'expectedunreadcounts' => ['favourites' => 0, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 2,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'deletedusers' => []\n ],\n 'All conversation types, delete all messages from individual non-favourited, no messages remaining, different user' => [\n 'conversationConfigs' => $conversations,\n 'deletemessagesuser' => $user1,\n 'deletemessages' => [3, 4, 5],\n 'arguments' => [$user3],\n 'expectedcounts' => ['favourites' => 1, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 2,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'expectedunreadcounts' => ['favourites' => 0, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 2,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'deletedusers' => []\n ],\n 'All conversation types, delete some messages from group non-favourited, messages remaining,' => [\n 'conversationConfigs' => $conversations,\n 'deletemessagesuser' => $user1,\n 'deletemessages' => [6, 7],\n 'arguments' => [$user1],\n 'expectedcounts' => ['favourites' => 2, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'expectedunreadcounts' => ['favourites' => 1, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'deletedusers' => []\n ],\n 'All conversation types, delete all messages from group non-favourited, no messages remaining,' => [\n 'conversationConfigs' => $conversations,\n 'deletemessagesuser' => $user1,\n 'deletemessages' => [6, 7, 8, 9],\n 'arguments' => [$user1],\n 'expectedcounts' => ['favourites' => 2, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'expectedunreadcounts' => ['favourites' => 1, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 0,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'deletedusers' => []\n ],\n 'All conversation types, another user soft deleted' => [\n 'conversationConfigs' => $conversations,\n 'deletemessagesuser' => null,\n 'deletemessages' => [],\n 'arguments' => [$user1],\n 'expectedcounts' => ['favourites' => 2, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'expectedunreadcounts' => ['favourites' => 1, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'deletedusers' => [$user2]\n ],\n 'All conversation types, all group users soft deleted' => [\n 'conversationConfigs' => $conversations,\n 'deletemessagesuser' => null,\n 'deletemessages' => [],\n 'arguments' => [$user1],\n 'expectedcounts' => ['favourites' => 2, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'expectedunreadcounts' => ['favourites' => 1, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 1,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'deletedusers' => [$user2, $user3, $user4]\n ],\n 'Group conversation which is disabled, favourited' => [\n 'conversationConfigs' => $conversations,\n 'deletemessagesuser' => null,\n 'deletemessages' => [],\n 'arguments' => [$user6],\n 'expectedcounts' => ['favourites' => 1, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 0,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 0,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'expectedunreadcounts' => ['favourites' => 0, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 0,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 0,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'deletedusers' => []\n ],\n 'Group conversation which is disabled, non-favourited' => [\n 'conversationConfigs' => $conversations,\n 'deletemessagesuser' => null,\n 'deletemessages' => [],\n 'arguments' => [$user7],\n 'expectedcounts' => ['favourites' => 1, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 0,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 0,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'expectedunreadcounts' => ['favourites' => 0, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 0,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 0,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'deletedusers' => []\n ],\n 'Conversation with self' => [\n 'conversationConfigs' => $conversations,\n 'deletemessagesuser' => null,\n 'deletemessages' => [],\n 'arguments' => [$user8],\n 'expectedcounts' => ['favourites' => 0, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 0,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 0,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 1\n ]],\n 'expectedunreadcounts' => ['favourites' => 0, 'types' => [\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 0,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP => 0,\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF => 0\n ]],\n 'deletedusers' => []\n ],\n ];\n }", "title": "" }, { "docid": "8e3a9b1988b0642a40e5fdd34a1de1e3", "score": "0.52468765", "text": "public function test_count_unread_conversations() {\n $this->resetAfterTest(true);\n\n // Create some users.\n $user1 = self::getDataGenerator()->create_user();\n $user2 = self::getDataGenerator()->create_user();\n $user3 = self::getDataGenerator()->create_user();\n $user4 = self::getDataGenerator()->create_user();\n\n // The person wanting the conversation count.\n $this->setUser($user1);\n\n // Send some messages back and forth, have some different conversations with different users.\n $this->send_fake_message($user1, $user2, 'Yo!');\n $this->send_fake_message($user2, $user1, 'Sup mang?');\n $this->send_fake_message($user1, $user2, 'Writing PHPUnit tests!');\n $this->send_fake_message($user2, $user1, 'Word.');\n\n $this->send_fake_message($user1, $user3, 'Booyah');\n $this->send_fake_message($user3, $user1, 'Whaaat?');\n $this->send_fake_message($user1, $user3, 'Nothing.');\n $this->send_fake_message($user3, $user1, 'Cool.');\n\n $this->send_fake_message($user1, $user4, 'Hey mate, you see the new messaging UI in Moodle?');\n $this->send_fake_message($user4, $user1, 'Yah brah, it\\'s pretty rad.');\n $this->send_fake_message($user1, $user4, 'Dope.');\n\n // Check the amount for the current user.\n $this->assertEquals(3, core_message\\api::count_unread_conversations());\n\n // Check the amount for the second user.\n $this->assertEquals(1, core_message\\api::count_unread_conversations($user2));\n }", "title": "" }, { "docid": "1b68be8ae3d36baeec2c92cf6c69890d", "score": "0.52106625", "text": "public function unreadCounter()\n {\n return Conversation::whereHas('messages.status', function ($query) {\n $query->where('status', 0)->where('user_id', $this->id);\n })->count();\n }", "title": "" }, { "docid": "1397eb0c9f8fc5070519e7f42e2b7369", "score": "0.5188251", "text": "function get_interactions_count()\n {\n \tif($this->debug>1){error_log('New LP - In learnpathItem::get_interactions_count()',0);}\n \t$res = 0;\n \tif(!empty($this->interactions_count)){\n \t\t$res = $this->interactions_count;\n \t}\n \treturn $res;\n }", "title": "" }, { "docid": "cc8539655baadcb709534c33c43810d5", "score": "0.5138835", "text": "public function getNoOfNotificationMessages() {\n $sqlQuery = \"select count(*) from laf873.messages where sentBy = 87;\";\n $statement = $this->_dbHandle->prepare($sqlQuery);\n $statement->execute();\n\n $count = $statement->fetchColumn();\n\n return $count;\n }", "title": "" }, { "docid": "d52c0a49522b5699e22f8c8c72cbcce6", "score": "0.5124166", "text": "public function countMessages(){\n return imap_num_msg($this->connection);\n }", "title": "" }, { "docid": "96e67ccb0121c935a2b16c40c82ccbfd", "score": "0.50879323", "text": "function get_messages_count()\n\t{\n\t\t$query = \"SELECT COUNT(*) AS count FROM yacrs_message_tag_link WHERE tag_id = {$this->id};\";\n\t\t$result = dataConnection::runQuery($query);\n\t\tif($result == false)\n\t\t\treturn 0;\n\t\telse\n\t\t\treturn $result['0']['count'];\n\t}", "title": "" }, { "docid": "3875a6055e7a1702da1502384187f751", "score": "0.5069743", "text": "public function count() {\n return count($this->messages);\n }", "title": "" }, { "docid": "e6e1f86da0e4901fbad5488533767639", "score": "0.5003801", "text": "public function getMessageCountAttribute ()\n {\n $this->loadMissing('messages');\n\n return $this->messages->count();\n }", "title": "" }, { "docid": "2087308c2b82d732bf202013ba9cf34a", "score": "0.49535453", "text": "public function buildConversations();", "title": "" }, { "docid": "b53bcf333a49442617b7d44f070ef8f0", "score": "0.49387383", "text": "public function getMessageCount() {\n $sql = 'SELECT COUNT(cmid) FROM {custom_chat_message} WHERE cid = :cid';\n return db_query($sql, array(':cid' => $this->get('cid')))->fetchField();\n }", "title": "" }, { "docid": "b5d34fdaa730b223da6369acfd851f20", "score": "0.49261135", "text": "public function getConversationCountTimeSeries()\n {\n return $this->conversation_count_time_series;\n }", "title": "" }, { "docid": "097b9c33ddaae8a209260f01e36084dd", "score": "0.49134842", "text": "public function count()\n {\n return count($this->messages);\n }", "title": "" }, { "docid": "8a170422a8645c8695823e19aa0508d8", "score": "0.49070877", "text": "public function count()\n {\n return count($this->_backend->getMessages());\n }", "title": "" }, { "docid": "9a3fe684da81f95a22dae88fa33187ba", "score": "0.48921615", "text": "public function count() {\n\t\treturn count($this->messages);\n\t}", "title": "" }, { "docid": "1c7cf5a0c744c435eeb319ebae83b610", "score": "0.4865865", "text": "public function test_count_unread_conversations_disabled() {\n $this->resetAfterTest(true);\n\n // Create some users.\n $user1 = self::getDataGenerator()->create_user();\n $user2 = self::getDataGenerator()->create_user();\n $user3 = self::getDataGenerator()->create_user();\n $user4 = self::getDataGenerator()->create_user();\n\n // The person wanting the conversation count.\n $this->setUser($user1);\n\n // Send some messages back and forth, have some different conversations with different users.\n $this->send_fake_message($user1, $user2, 'Yo!');\n $this->send_fake_message($user2, $user1, 'Sup mang?');\n $this->send_fake_message($user1, $user2, 'Writing PHPUnit tests!');\n $this->send_fake_message($user2, $user1, 'Word.');\n\n $this->send_fake_message($user1, $user3, 'Booyah');\n $this->send_fake_message($user3, $user1, 'Whaaat?');\n $this->send_fake_message($user1, $user3, 'Nothing.');\n $this->send_fake_message($user3, $user1, 'Cool.');\n\n $this->send_fake_message($user1, $user4, 'Hey mate, you see the new messaging UI in Moodle?');\n $this->send_fake_message($user4, $user1, 'Yah brah, it\\'s pretty rad.');\n $this->send_fake_message($user1, $user4, 'Dope.');\n\n // Let's disable the last conversation.\n $conversationid = core_message\\api::get_conversation_between_users([$user1->id, $user4->id]);\n core_message\\api::disable_conversation($conversationid);\n\n // Check that the disabled conversation was not included.\n $this->assertEquals(2, core_message\\api::count_unread_conversations());\n }", "title": "" }, { "docid": "e1ff61a74eb8fc7d2437ae4c7a17b5e8", "score": "0.48553303", "text": "public function count()\n {\n return (int)$this->getAttribute('ApproximateNumberOfMessages');\n }", "title": "" }, { "docid": "431f78f319409870247890f9bdf7a4d4", "score": "0.48344016", "text": "public function getCount()\n {\n return $this->get('msg_count');\n }", "title": "" }, { "docid": "ac85509cf666bc4cc04206e1957f556c", "score": "0.48249483", "text": "public function getMessageCounts()\n {\n return $this->container->MessageCounts->getMessageCounts( $this->getId() );\n }", "title": "" }, { "docid": "125c0bc374a896cca205ad27f46df217", "score": "0.48243138", "text": "public function netPeerCount()\n {\n return $this->request('net_peerCount', []);\n }", "title": "" }, { "docid": "d82e248743b5a4f213401813ffd8b7ec", "score": "0.4814894", "text": "public function count()\n {\n return $this->messages->count();\n }", "title": "" }, { "docid": "3aaf36857b941ea3bbb0e618d3de4449", "score": "0.48063332", "text": "public function newMessagesCount()\n {\n return count($this->threadsWithNewMessages());\n }", "title": "" }, { "docid": "b29b040a76fa01334251a586eed4c5c5", "score": "0.480214", "text": "public function numMessages() {\n if (!isset($this->_numMessages))\n $this->_numMessages = imap_num_msg($this->stream);\n return $this->_numMessages;\n }", "title": "" }, { "docid": "7fd93303f4cf6ae2d92ca6d568c785c5", "score": "0.47845477", "text": "public function count()\n {\n return count($this->_messages);\n }", "title": "" }, { "docid": "b37dce3b805ca5fb5703f74b6633e467", "score": "0.47782815", "text": "public function getReplyCountAttribute()\n {\n $count = $this->posts->count() - 1;\n\n return $count > 0 ? $count . ' ' . str_plural('reply', $count) : null;\n }", "title": "" }, { "docid": "bdf3b13d6fc0c0d9b2ef962ab4d6ed66", "score": "0.47780687", "text": "public function countLabelData() {\n\t\treturn count($this->getLabelData());\n\t}", "title": "" }, { "docid": "56b0f203dd0cd0200db440e8c5703cf8", "score": "0.4753018", "text": "public function test_create_conversation_duplicate_conversations() {\n global $DB;\n $user1 = $this::getDataGenerator()->create_user();\n\n \\core_message\\api::create_conversation(\\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF, [$user1->id]);\n \\core_message\\api::create_conversation(\\core_message\\api::MESSAGE_CONVERSATION_TYPE_SELF, [$user1->id]);\n\n $convhash = \\core_message\\helper::get_conversation_hash([$user1->id]);\n $countconversations = $DB->count_records('message_conversations', ['convhash' => $convhash]);\n $this->assertEquals(1, $countconversations);\n $this->assertNotEmpty($conversation = \\core_message\\api::get_self_conversation($user1->id));\n }", "title": "" }, { "docid": "56a12e0226294668022818c6934474c7", "score": "0.47266167", "text": "public function _getUnverifiedContributorCount(){\n\t\t$this->messages = null; // We need to make sure the amount is correct for these so reload them\n\t\t$this->getMessages();\n\n\t\t$total = 0;\n\t\tforeach ($this->messages as $message) {\n\t\t\t/* @var $message messageModel */\n\t\t\tif($message->shouldDisplay()){\n\t\t\t\t$total ++;\n\t\t\t}\n\t\t}\n\t\treturn $total;\n\t}", "title": "" }, { "docid": "57cca6e32ce0d5f14a203897028d7e43", "score": "0.46854565", "text": "public function getCount()\n {\n return $this->readOneof(2);\n }", "title": "" }, { "docid": "8c8c98342e3588ec280ca2f9215b1a7a", "score": "0.46824542", "text": "protected function messagesSent()\n {\n $s = 0;\n foreach ($this->chat() as $c) {\n if ($c->uid == $this->id) {\n $s++;\n }\n }\n return $s;\n }", "title": "" }, { "docid": "c2d605f655f9320b99d64bca966be5dc", "score": "0.46718037", "text": "public function testGroupV2GetGroupOptionalConversations()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "a5e0f55640fa6df66c4a994d2b0d120d", "score": "0.465227", "text": "protected function countPendingInvites()\n {\n $searchModel = new MembershipSearch();\n $searchModel->community_id = $this->community->id;\n $searchModel->status = Membership::STATUS_INVITED;\n return $searchModel->search([])->getCount();\n }", "title": "" }, { "docid": "e793e253d1cce464752745e3b7490629", "score": "0.4620117", "text": "function get_tags_count()\n\t{\n\t\t$query = \"SELECT COUNT(*) AS count FROM yacrs_message_tag_link WHERE message_id = {$this->id};\";\n\t\t$result = dataConnection::runQuery($query);\n\t\tif($result == false)\n\t\t\treturn 0;\n\t\telse\n\t\t\treturn $result['0']['count'];\n\t}", "title": "" }, { "docid": "3d3ba0a77d07aaadce289ec083e6489c", "score": "0.4616937", "text": "public function count()\n {\n return $this->replySize;\n }", "title": "" }, { "docid": "15cd3402af100080da7507b84290568d", "score": "0.4578658", "text": "public function count()\n {\n return count($this->messages, COUNT_RECURSIVE) - count($this->messages);\n }", "title": "" }, { "docid": "2bb0b3383de39b5ceb87049382222b79", "score": "0.45768586", "text": "public function unreadCount()\n {\n $messages = Message::where(['displayed' => 0, 'recipient_id' => $this->id])->cursor();\n\n $user_ids = [];\n $users = [];\n\n foreach($messages as $message)\n {\n if(!in_array($message->sender_id, $user_ids))\n $user_ids[] = $message->sender_id;\n }\n foreach($user_ids as $id)\n {\n $users[] = User::find($id);\n }\n $users = array_filter($users, function($id) {\n return ($this->hasContact($id));\n });\n\n return count($users);\n }", "title": "" }, { "docid": "ba8628521853202f78c3432bc9252ff0", "score": "0.45764688", "text": "public function getMessagesCount()\n {\n /**\n * @var Symfony\\Component\\HttpFoundation\\RequestStack\n */\n $requestStack = $this->container->get('request_stack');\n\n $qb = $this->getDoctrine()->getManager()->createQueryBuilder();\n\n $count = $qb->select('count(c.id)')\n ->from('App:Contact', 'c')\n ->getQuery()\n ->getSingleScalarResult();\n\n if (null === $requestStack->getParentRequest()) {\n return $count;\n }\n\n return new Response($count);\n }", "title": "" }, { "docid": "16d454c49a9bd62d63652a9c447e91c4", "score": "0.45754036", "text": "public function setDetectionCount($var)\n {\n GPBUtil::checkInt32($var);\n $this->detection_count = $var;\n\n return $this;\n }", "title": "" }, { "docid": "733d4885819c6ded2d88e1a0983f221a", "score": "0.4561211", "text": "public function get_number_of_messages(){\n\t\t$query = $this->db->query(\"SELECT * FROM messages\");\n\t\treturn $query->num_rows();\n\t}", "title": "" }, { "docid": "21b6a2833ad7fb468157f479557d2aa9", "score": "0.45450363", "text": "function cubic_get_notifications_count() {\n\tglobal $USER;\n\t\n\t$html = '';\n\tif(isloggedin() && !isguestuser()) {\n\t\t$notifications = cubic_get_notifications_list(cubic_get_courses_list(), 0, true, true);\n\n\t\tif($notifications > 0 && $notifications < 100) {\n\t\t\t$html = '<span class=\"counter\">'.$notifications.'</span>';\n\t\t}\n\t\telse if($notifications >= 100) {\n\t\t\t$html = '<span class=\"counter\">99</span>';\n\t\t}\n\t}\n\t\n\treturn $html;\n}", "title": "" }, { "docid": "fa711eae3cf631b13ab4e65234b1e191", "score": "0.45401248", "text": "public function getReplyCount()\n {\n return $this->reply_count;\n }", "title": "" }, { "docid": "530ad7587a2f9abf5c94de02ea53f319", "score": "0.45313948", "text": "public function getLabelCounts()\n {\n return $this->labels;\n }", "title": "" }, { "docid": "8854214b8daac57f80c999b896ffa52a", "score": "0.4528884", "text": "public function test_get_conversations_no_restrictions() {\n global $DB;\n\n $user1 = self::getDataGenerator()->create_user();\n // Self-conversation should exists.\n $this->assertCount(1, \\core_message\\api::get_conversations($user1->id));\n\n // Get a bunch of conversations, some group, some individual and in different states.\n list($user1, $user2, $user3, $user4, $ic1, $ic2, $ic3,\n $gc1, $gc2, $gc3, $gc4, $gc5, $gc6) = $this->create_conversation_test_data();\n\n // Get all conversations for user1.\n $conversations = core_message\\api::get_conversations($user1->id);\n\n // Verify there are 2 individual conversation, 2 group conversations, 2 empty group conversations,\n // and a self-conversation.\n // The conversations with the most recent messages should be listed first, followed by the empty\n // conversations, with the most recently created first.\n $this->assertCount(7, $conversations);\n $typecounts = array_count_values(array_column($conversations, 'type'));\n $this->assertEquals(2, $typecounts[1]);\n $this->assertEquals(4, $typecounts[2]);\n $this->assertEquals(1, $typecounts[3]);\n\n // Those conversations having messages should be listed after self-conversation, ordered by most recent message time.\n $this->assertEquals($gc3->id, $conversations[0]->id);\n $this->assertEquals(\\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP, $conversations[0]->type);\n $this->assertFalse($conversations[1]->isfavourite);\n $this->assertCount(1, $conversations[0]->members);\n $this->assertEquals(4, $conversations[0]->membercount);\n $this->assertCount(1, $conversations[0]->messages);\n $message = $DB->get_record('messages', ['id' => $conversations[0]->messages[0]->id]);\n $expectedmessagetext = message_format_message_text($message);\n $this->assertEquals($expectedmessagetext, $conversations[0]->messages[0]->text);\n $this->assertEquals($user1->id, $conversations[0]->messages[0]->useridfrom);\n\n $this->assertEquals($gc2->id, $conversations[1]->id);\n $this->assertEquals(\\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP, $conversations[1]->type);\n $this->assertFalse($conversations[1]->isfavourite);\n $this->assertCount(1, $conversations[1]->members);\n $this->assertEquals(3, $conversations[1]->membercount);\n $this->assertCount(1, $conversations[1]->messages);\n $message = $DB->get_record('messages', ['id' => $conversations[1]->messages[0]->id]);\n $expectedmessagetext = message_format_message_text($message);\n $this->assertEquals($expectedmessagetext, $conversations[1]->messages[0]->text);\n $this->assertEquals($user4->id, $conversations[1]->messages[0]->useridfrom);\n\n $this->assertEquals($ic2->id, $conversations[2]->id);\n $this->assertEquals(\\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL, $conversations[2]->type);\n $this->assertFalse($conversations[2]->isfavourite);\n $this->assertCount(1, $conversations[2]->members);\n $this->assertEquals($user3->id, $conversations[2]->members[$user3->id]->id);\n $this->assertEquals(2, $conversations[2]->membercount);\n $this->assertCount(1, $conversations[2]->messages);\n $message = $DB->get_record('messages', ['id' => $conversations[2]->messages[0]->id]);\n $expectedmessagetext = message_format_message_text($message);\n $this->assertEquals($expectedmessagetext, $conversations[2]->messages[0]->text);\n $this->assertEquals($user1->id, $conversations[2]->messages[0]->useridfrom);\n\n $this->assertEquals($ic1->id, $conversations[3]->id);\n $this->assertEquals(\\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL, $conversations[3]->type);\n $this->assertFalse($conversations[3]->isfavourite);\n $this->assertCount(1, $conversations[3]->members);\n $this->assertEquals(2, $conversations[3]->membercount);\n $this->assertCount(1, $conversations[3]->messages);\n $message = $DB->get_record('messages', ['id' => $conversations[3]->messages[0]->id]);\n $expectedmessagetext = message_format_message_text($message);\n $this->assertEquals($expectedmessagetext, $conversations[3]->messages[0]->text);\n $this->assertEquals($user2->id, $conversations[3]->messages[0]->useridfrom);\n\n // Of the groups without messages, we expect to see the most recently created first.\n $this->assertEquals($gc5->id, $conversations[4]->id);\n $this->assertEquals(\\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP, $conversations[4]->type);\n $this->assertFalse($conversations[4]->isfavourite);\n $this->assertCount(0, $conversations[4]->members); // No members returned, because no recent messages exist.\n $this->assertEquals(3, $conversations[4]->membercount);\n $this->assertEmpty($conversations[4]->messages);\n\n $this->assertEquals($gc4->id, $conversations[5]->id);\n $this->assertEquals(\\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP, $conversations[5]->type);\n $this->assertFalse($conversations[5]->isfavourite);\n $this->assertCount(0, $conversations[5]->members);\n $this->assertEquals(3, $conversations[5]->membercount);\n $this->assertEmpty($conversations[5]->messages);\n\n // Verify format of the return structure.\n foreach ($conversations as $conv) {\n $this->assertObjectHasAttribute('id', $conv);\n $this->assertObjectHasAttribute('name', $conv);\n $this->assertObjectHasAttribute('subname', $conv);\n $this->assertObjectHasAttribute('imageurl', $conv);\n $this->assertObjectHasAttribute('type', $conv);\n $this->assertObjectHasAttribute('isfavourite', $conv);\n $this->assertObjectHasAttribute('membercount', $conv);\n $this->assertObjectHasAttribute('isread', $conv);\n $this->assertObjectHasAttribute('unreadcount', $conv);\n $this->assertObjectHasAttribute('members', $conv);\n foreach ($conv->members as $member) {\n $this->assertObjectHasAttribute('id', $member);\n $this->assertObjectHasAttribute('fullname', $member);\n $this->assertObjectHasAttribute('profileimageurl', $member);\n $this->assertObjectHasAttribute('profileimageurlsmall', $member);\n $this->assertObjectHasAttribute('isonline', $member);\n $this->assertObjectHasAttribute('showonlinestatus', $member);\n $this->assertObjectHasAttribute('isblocked', $member);\n $this->assertObjectHasAttribute('iscontact', $member);\n $this->assertObjectHasAttribute('isdeleted', $member);\n $this->assertObjectHasAttribute('canmessage', $member);\n $this->assertObjectHasAttribute('requirescontact', $member);\n $this->assertObjectHasAttribute('contactrequests', $member);\n }\n $this->assertObjectHasAttribute('messages', $conv);\n foreach ($conv->messages as $message) {\n $this->assertObjectHasAttribute('id', $message);\n $this->assertObjectHasAttribute('useridfrom', $message);\n $this->assertObjectHasAttribute('text', $message);\n $this->assertObjectHasAttribute('timecreated', $message);\n }\n }\n }", "title": "" }, { "docid": "5cda3810c7eab8f02a8c1028f982722c", "score": "0.45172182", "text": "public function repliesCount()\n {\n return $this->hasOne(Reply::class)\n ->selectRaw('ticket_id, count(*) as aggregate')\n ->groupBy('ticket_id');\n }", "title": "" }, { "docid": "701c3e7be27c9a20810f8064a816b83d", "score": "0.45115998", "text": "public function getAllNotificationCount()\n {\n $sellerId = $this->helperData->getCustomerId();\n $ids = $this->notificationHelper->getAllNotificationIds($sellerId);\n $collectionData = $this->collectionFactory->create()\n ->addFieldToFilter(\n 'entity_id',\n [\"in\" => $ids]\n );\n return count($collectionData);\n }", "title": "" }, { "docid": "6423a6c99e67c8faedc0a9efc7065d63", "score": "0.45112973", "text": "public function test_get_individual_conversations_between_users_partial_conversations() {\n $generator = $this->getDataGenerator();\n $user1 = $generator->create_user();\n $user2 = $generator->create_user();\n $user3 = $generator->create_user();\n $type = \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL;\n\n $conversation1 = \\core_message\\api::create_conversation($type, [$user1->id, $user2->id]);\n $conversation2 = \\core_message\\api::create_conversation($type, [$user1->id, $user3->id]);\n\n $results = \\core_message\\api::get_individual_conversations_between_users([\n [$user1->id, $user2->id],\n [$user2->id, $user3->id],\n [$user1->id, $user3->id]\n ]);\n $this->assertDebuggingCalled();\n\n $result = array_map(function($result) {\n if ($result) {\n return $result->id;\n } else {\n return $result;\n }\n }, $results);\n\n $this->assertEquals(\n [$conversation1->id, null, $conversation2->id],\n $result\n );\n }", "title": "" }, { "docid": "e3f06415ac0ff2f5cc9170d461d19188", "score": "0.4509167", "text": "public function count() {\r\n if ($this->hasMessages()) {\r\n $count = 0;\r\n foreach (parent::getMessages() as $messages) {\r\n $count += count($messages);\r\n }\r\n return $count;\r\n }\r\n return 0;\r\n }", "title": "" }, { "docid": "9e665ee7c8c07f3fb01b6210821b959d", "score": "0.45046693", "text": "public function countRecentMessages(){\n return imap_num_recent($this->connection);\n }", "title": "" }, { "docid": "61ff065f31ca2bef68ba14d4674ea60a", "score": "0.4502635", "text": "public function getQuestionCount(){\n return $this->getLinkedQuestionId()->count();\n }", "title": "" }, { "docid": "4f762b1f358cd54026b3f2686ac1b6d4", "score": "0.45019075", "text": "public function unreadMessagesCount()\n {\n return Message::unreadForUser($this->getKey())->count();\n }", "title": "" }, { "docid": "f1e59bdd31abe990af69f099f6731904", "score": "0.4494237", "text": "public function getCloseApproachCount();", "title": "" }, { "docid": "7acca31fdd8c4f28239c6753bad05e35", "score": "0.44931617", "text": "public function unreadMessagesCount()\n {\n return count($this->unreadMessages());\n }", "title": "" }, { "docid": "5b53ed772eabf4731d46fbcd95a6b0b5", "score": "0.4488858", "text": "public function numUnread() {\n if (!isset($this->_numUnread)) {\n $status = $this->status();\n if ($status && isset($status->unseen))\n $this->_numUnread = $status->unseen;\n }\n return $this->_numUnread;\n }", "title": "" }, { "docid": "f3ea860c0b93b8c981615b70e9904436", "score": "0.4482556", "text": "public function test_count_conversation_members_existing_conversation() {\n $user1 = self::getDataGenerator()->create_user();\n $user2 = self::getDataGenerator()->create_user();\n\n $conversation = \\core_message\\api::create_conversation(\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL,\n [\n $user1->id,\n $user2->id\n ]\n );\n $conversationid = $conversation->id;\n\n $this->assertEquals(2,\n \\core_message\\api::count_conversation_members($conversationid));\n }", "title": "" }, { "docid": "6b0e0751e4961e8c641c4e54bc365544", "score": "0.4475481", "text": "public function conversations()\n {\n return $this->belongsToMany('Framework\\Conversation');\n }", "title": "" }, { "docid": "e0b859548a937f68ad8103a96346fa28", "score": "0.44728106", "text": "public function test_get_conversation_messages_limitnum() {\n // Create some users.\n $user1 = self::getDataGenerator()->create_user();\n $user2 = self::getDataGenerator()->create_user();\n $user3 = self::getDataGenerator()->create_user();\n $user4 = self::getDataGenerator()->create_user();\n\n // Create group conversation.\n $conversation = \\core_message\\api::create_conversation(\n \\core_message\\api::MESSAGE_CONVERSATION_TYPE_GROUP,\n [$user1->id, $user2->id, $user3->id, $user4->id]\n );\n\n // The person doing the search.\n $this->setUser($user1);\n\n // Send some messages back and forth.\n $time = 1;\n testhelper::send_fake_message_to_conversation($user1, $conversation->id, 'Message 1', $time + 1);\n testhelper::send_fake_message_to_conversation($user2, $conversation->id, 'Message 2', $time + 2);\n testhelper::send_fake_message_to_conversation($user1, $conversation->id, 'Message 3', $time + 3);\n testhelper::send_fake_message_to_conversation($user3, $conversation->id, 'Message 4', $time + 4);\n\n // Retrieve the messages from $time, which should be all of them.\n $convmessages = \\core_message\\api::get_conversation_messages($user1->id, $conversation->id, 2, 1);\n\n // Confirm the conversation id is correct.\n $messages = $convmessages['messages'];\n $this->assertEquals($conversation->id, $convmessages['id']);\n\n // Confirm the message data is correct.\n $messages = $convmessages['messages'];\n $this->assertEquals(1, count($messages));\n\n $message1 = $messages[0];\n\n $this->assertContains('Message 3', $message1->text);\n\n // Confirm the members data is correct.\n $members = $convmessages['members'];\n $this->assertEquals(1, count($members));\n }", "title": "" }, { "docid": "a795215908193e1efaa8b2c94b9651c2", "score": "0.4452451", "text": "public function get_message_count ()\n {\n $count = $this->_imap_connection->get_message_count($this->_mailbox_path);\n $this->message_count = $count;\n $this->_lock_property('message_count');\n return $count;\n }", "title": "" }, { "docid": "412ff36125e5df87fa11355f0637298f", "score": "0.44448268", "text": "public function getParticipantsAttribute()\n {\n return $this->users()->count();\n }", "title": "" }, { "docid": "f733f5b1cb9cc2b66f3558d69195ecfa", "score": "0.44365257", "text": "public function countBlogCommentResponses() {\n\t\treturn $this->countCommentResponses('com.woltlab.blog.entryComment');\n\t}", "title": "" }, { "docid": "51ec159bb7436f131128d01815544efe", "score": "0.4435589", "text": "public function newThreadsCount()\n {\n return $this->threadsWithNewMessages()->count();\n }", "title": "" }, { "docid": "c72be8c4936b8139a71171af05f8a46c", "score": "0.44351238", "text": "public function actionCount()\n {\n return Message::find()->byRecipient()->unread()->count();\n }", "title": "" }, { "docid": "6925da70eb2f224ca71a45ea516ebfda", "score": "0.4431104", "text": "public function getUnreadMessageCount();", "title": "" }, { "docid": "5da0aee39e98f3ed5945b38005489bc0", "score": "0.44310042", "text": "public function getDetectionCount()\n {\n return $this->detection_count;\n }", "title": "" }, { "docid": "d377ba1a41060223d87b5af7827d8c6e", "score": "0.4430026", "text": "public function getNotificationsCountAttribute()\n {\n if (!$this->relationLoaded('notificationsCount')) {\n $this->load('notificationsCount');\n }\n\n $related = $this->getRelation('notificationsCount');\n\n // then return the count directly\n return ($related) ? (int)$related->aggregate : 0;\n }", "title": "" }, { "docid": "298af93982dd6d5b041ed994ff0c48e4", "score": "0.44090086", "text": "public function getReplyCounts($data) {\r\n foreach($data as $key => $row) {\r\n \t$data[$key]['Forum']['replyCount'] = $this->Topic->find('count', array('conditions' => array('forum_id' => $data[$key]['Forum']['id'], 'parent_id' => 0)));\r\n }\r\n return $data;\r\n\t}", "title": "" }, { "docid": "c5f853493684de39b0b258d45ca25e5b", "score": "0.4407378", "text": "public function getUnConfirmedCount()\n {\n return $this->getConfirmations()->where(['announcement_user.confirmed' => false])->count();\n }", "title": "" }, { "docid": "e0bb5c7b8138470648091ac4967077d5", "score": "0.44023585", "text": "public function getCurrentCollaboratorsCount()\n {\n if (!isset($this->properties[__METHOD__])) {\n $this->properties[__METHOD__] = $this->user->getCollaboratorsCount();\n }\n\n return $this->properties[__METHOD__];\n }", "title": "" }, { "docid": "3380c4fb53fc0307aec831f37945ca5b", "score": "0.4392602", "text": "public function getMutualFriendsCount($other)\n {\n return $this->getMutualFriendsQueryBuilder($other)->count();\n }", "title": "" }, { "docid": "0d3378b75b277502b9e6b1f982e0b544", "score": "0.43770587", "text": "public function getDiscCountAttribute(){\n return Discussion::countDiscuss('user_production', $this->id);\n }", "title": "" }, { "docid": "9bbf1dc00d7811eddaa149208ab0358b", "score": "0.43770555", "text": "public function no_of_rows_services_message_list()\n\t{\n\t\t\n\t\t$sql=\"select * from services_message\t order by services_message_id DESC\";\n\t\t$query=$this->db->query($sql);\n\t\treturn $query->num_rows;\n\t}", "title": "" }, { "docid": "cc2e87ea304dee7761437ec8cf026b30", "score": "0.4377027", "text": "public function countEmails() {\n\t\treturn count($this->emails);\n\t}", "title": "" }, { "docid": "7f983e0b006aa0546812e52edf80e909", "score": "0.43752205", "text": "public function newThreadsCount()\n {\n return count($this->threadsWithNewMessages());\n }", "title": "" }, { "docid": "b19e33b447143079b4d98b3bd5a718f9", "score": "0.43697706", "text": "public function getNotificationCount(){\n\t\t$user = Auth::user();\n\t\t$count = $user->unreadNotifications()->count();\n\t\treturn ['count' => $count];\n\t}", "title": "" }, { "docid": "3bba7a3600fbda73c547316da440ccaa", "score": "0.43655497", "text": "public function countUnreadMessages() {\n $c = $this->xpdo->newQuery('disThread');\n $c->innerJoin('disThreadUser','Users');\n $c->leftJoin('disThreadRead','Reads','Reads.user = '.$this->get('id').' AND disThread.id = Reads.thread');\n $c->where(array(\n 'disThread.private' => true,\n 'Users.user' => $this->get('id'),\n 'Reads.thread:IS' => null,\n ));\n return $this->xpdo->getCount('disThread',$c);\n }", "title": "" }, { "docid": "1384029984880340ed8b1d6268b98552", "score": "0.43623972", "text": "public function getSpamComplaintCount()\n {\n return $this->SpamComplaintCount;\n }", "title": "" }, { "docid": "6a21609b3f77ab3cd982074d1977f3b5", "score": "0.43548816", "text": "function unread_note_chat_count(){\n global $config, $lang, $results;\n\n $user_id = $_REQUEST[\"user_id\"];\n\n $notification_count = ORM::for_table($config['db']['pre'].'push_notification')\n ->where(array(\n 'owner_id' => $user_id,\n 'recd' => '0',\n ))\n ->count();\n\n $chat_count = ORM::for_table($config['db']['pre'].'messages')\n ->where(array(\n 'to_id' => $user_id,\n 'seen' => '0',\n ))\n ->count();\n\n $results['unread_notification'] = $notification_count;\n $results['unread_chat'] = $chat_count;\n send_json($results);\n die();\n}", "title": "" }, { "docid": "6021561591700229acb7f48ca48fec03", "score": "0.4352784", "text": "public function getMessageCount($data) {\n $messages = array();\n\n $length = count($data);\n\n for($i = 0; $i < $length; $i++) {\n if(in_array($data[$i][\"params\"][\"message\"], $data[$i][\"params\"])) {\n $messages[] = $data[$i][\"params\"];\n }\n \n } \n\n\n return count($messages);\n\n\n }", "title": "" }, { "docid": "2ffafb1adfb6571f3aeb469b827751e1", "score": "0.4351708", "text": "public function getInitialChannels()\n {\n if (is_null($this->initial_channels)) {\n $this->initial_channels = new ConversationIds();\n }\n return $this->initial_channels;\n }", "title": "" }, { "docid": "9e48bc038799fb53f8a295f48fbc6122", "score": "0.4347882", "text": "public function getGroupLength()\n {\n if (isset($this->data[$this->position]) == true) {\n return count($this->data[$this->position][0]['citationItems']);\n }\n\n return 0;\n }", "title": "" }, { "docid": "a2b912d71decb039650888869afd4269", "score": "0.43458664", "text": "public function getNewsFacebookCommentCount($ogObject)\n {\n return $ogObject['share']['comment_count'];\n }", "title": "" }, { "docid": "91698f071d939af81577fab8ad07d6a0", "score": "0.43424404", "text": "public function numberOfFriends()\n {\n return $this->friends()->count();\n }", "title": "" }, { "docid": "b94e47c103b57a032878b3db5670cf91", "score": "0.43414125", "text": "public function getConversationId()\n {\n return $this->conversationId;\n }", "title": "" }, { "docid": "70051c00feb011f7aca2cf4dbe715dc3", "score": "0.43407276", "text": "public static function imap_count_unread()\n\t{\n\t\t$total_messages = 0;\n\t\t\n\t\tforeach (static::$_imap_connections AS $connection)\n\t\t{\n\t\t\t$imap_object = imap_check($connection);\n\t\t\t$total_messages = $total_messages + (int)$imap_object->Nmsgs;\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $total_messages;\n\t\t\n\t}", "title": "" }, { "docid": "3d54d9dc2be9dab71a8c4fce9c6c7a22", "score": "0.43345734", "text": "function imap_num_msg ($imap_stream) {}", "title": "" }, { "docid": "d3fcf5a25697cd4fe2279075defbde9f", "score": "0.43341267", "text": "protected function countPendingApprovals()\n {\n $searchModel = new MembershipSearch();\n $searchModel->community_id = $this->community->id;\n $searchModel->status = Membership::STATUS_APPLICANT;\n return $searchModel->search([])->getCount();\n }", "title": "" }, { "docid": "78f8af08a99f7cd37cee4c3b9d5a910e", "score": "0.43335056", "text": "public function count($message_type = NULL)\n {\n $messages = $this->_session_get();\n if (empty($message_type))\n {\n $msg_count = count($messages, COUNT_RECURSIVE);\n }\n else\n {\n $msg_count = count($this->peek($message_type));\n }\n return $msg_count;\n }", "title": "" }, { "docid": "3eb569f9e1c4f96272bc6173199f11f0", "score": "0.43305138", "text": "public static function getNumberOfImages()\n {\n return self::$database->retrieve(\"SELECT COUNT(*) FROM MessageImages\")[0]['COUNT(*)'];\n }", "title": "" }, { "docid": "c1ec81e4411bcc1172b43a01d4918af6", "score": "0.4313408", "text": "public function getThreadStatusLabel() {\n\t\t//if this is a thread starter, act as normal\n\t\tif ($this->get('thread_id') == 0) {\n\t\t\treturn Crm_Issue_Model::_getStatusLabelStatic($this->get('status_id'));\n\t\t}\n\t\t//else, we have a reply, get the parent by thread_id\n\t\tif (!isset(Crm_Issue_Model::$_globalCache[$this->get('thread_id')])) {\n\t\t\t//load up the parent thread\n\t\t\tCrm_Issue_Model::$_globalCache[$this->get('thread_id')] = new Crm_Issue_Model();\n\t\t\tCrm_Issue_Model::$_globalCache[$this->get('thread_id')]->load($this->get('thread_id'));\n\t\t}\n\n\t\t$parent = Crm_Issue_Model::$_globalCache[$this->get('thread_id')];\n\t\treturn Crm_Issue_Model::_getStatusLabelStatic($parent->get('status_id'));\n\t}", "title": "" }, { "docid": "46510a5be5311b52ef635245885c82bd", "score": "0.43026304", "text": "public function test_get_conversations_limit_offset() {\n // Get a bunch of conversations, some group, some individual and in different states.\n list($user1, $user2, $user3, $user4, $ic1, $ic2, $ic3,\n $gc1, $gc2, $gc3, $gc4, $gc5, $gc6) = $this->create_conversation_test_data();\n\n // Get all conversations for user1, limited to 1 result.\n $conversations = core_message\\api::get_conversations($user1->id, 0, 1);\n\n // Verify the first conversation.\n $this->assertCount(1, $conversations);\n $conversation = array_shift($conversations);\n $this->assertEquals($conversation->id, $gc3->id);\n\n // Verify the next conversation.\n $conversations = \\core_message\\api::get_conversations($user1->id, 1, 1);\n $this->assertCount(1, $conversations);\n $this->assertEquals($gc2->id, $conversations[0]->id);\n\n // Verify the next conversation.\n $conversations = \\core_message\\api::get_conversations($user1->id, 2, 1);\n $this->assertCount(1, $conversations);\n $this->assertEquals($ic2->id, $conversations[0]->id);\n\n // Skip one and get both empty conversations.\n $conversations = \\core_message\\api::get_conversations($user1->id, 4, 2);\n $this->assertCount(2, $conversations);\n $this->assertEquals($gc5->id, $conversations[0]->id);\n $this->assertEmpty($conversations[0]->messages);\n $this->assertEquals($gc4->id, $conversations[1]->id);\n $this->assertEmpty($conversations[1]->messages);\n\n // Ask for an offset that doesn't exist and verify no conversations are returned.\n $conversations = \\core_message\\api::get_conversations($user1->id, 10, 1);\n $this->assertCount(0, $conversations);\n }", "title": "" }, { "docid": "f6949d5c520f79b51c1da911ea58561d", "score": "0.42963973", "text": "public function getTotalMessages() {\n\t\t// Count the messages in the participants table\n\t\treturn PersonalMessageParticipant::model()->count('user_id=:id', array(':id' => Yii::app()->user->id));\n\t}", "title": "" }, { "docid": "9a3db29c6f2e64aed218373753e5ec08", "score": "0.42948985", "text": "public function getunreadmessagecount()\n {\n // Fetch the request data in JSON format and convert it into object\n $request_data = $this->request->input('json_decode');\n $chatCountArray = array();\n switch (true) {\n // When request is not made using POST method\n case!$this->request->isPost() :\n $success = false;\n $status = BAD_REQUEST;\n $message = 'Request cannot be empty.';\n break;\n // Request is valid and phone no, user_token and relationship_id are present\n case!empty($request_data) && !empty($request_data->phone_no) && !empty($request_data->user_token): // && !empty($request_data->relationship_id):\n // Check if phone no exists\n $data = $this->User->findUser($request_data->phone_no);\n\n // Check if record exists\n if (count($data) != 0) {\n // Check user is verified\n if ($data[0]['User']['verified'] !== true) {\n $success = false;\n $status = UNAUTHORISED;\n $message = 'User not verified';\n } else { // Credentials are valid\n \n $relationship_id = isset($request_data->relationship_id) ? $request_data->relationship_id :'';\n // Fetch the chat records, starting from the last chat id, if present\n $chatCountArray = $this->Chat->fetchUnreadMessageCount($data, $relationship_id );\n\n if (count($chatCountArray) > 0) {\n $success = true;\n $status = SUCCESS;\n $message = 'Chat message(s) found.';\n } else {\n $success = false;\n $status = SUCCESS;\n $message = 'chat message(s) not found.';\n }\n \n }\n }\n // Return false if record not found\n else {\n $success = false;\n $status = UNAUTHORISED;\n $message = 'User not registered.';\n }\n break;\n // Phone no. blank in request\n case!empty($request_data) && empty($request_data->phone_no):\n $success = false;\n $status = BAD_REQUEST;\n $message = 'Phone no. cannot be blank.';\n break;\n // User Token blank in request\n case!empty($request_data) && empty($request_data->user_token):\n $success = false;\n $status = BAD_REQUEST;\n $message = 'User token cannot be blank.';\n break;\n /*// Relationship Id blank in request\n case!empty($request_data) && empty($request_data->relationship_id):\n $success = false;\n $status = BAD_REQUEST;\n $message = 'Relationship Id cannot be blank.';\n break;*/\n // Parameters not found in request\n case empty($request_data):\n $success = false;\n $status = BAD_REQUEST;\n $message = 'Request cannot be empty.';\n break;\n }\n\n $out = array(\n \"success\" => $success,\n \"message\" => $message,\n \"chatCountArray\" => $chatCountArray\n );\n \n \n return new CakeResponse(array('status' => $status, 'body' => json_encode($out), 'type' => 'json'));\n }", "title": "" } ]
42915901a62609ed2bf90312b6dd8e97
Get the number of rows total in the list
[ { "docid": "807be0e873c6608cce9451bc9760bcbf", "score": "0.7559461", "text": "protected function getListRowCount()\n {\n return count($this->findAllContentBlocks());\n }", "title": "" } ]
[ { "docid": "1e3110f0e0c78835da145d9198769925", "score": "0.79730535", "text": "public function getTotalRows();", "title": "" }, { "docid": "d8d922db3afd08ebadbd0a03459f17d8", "score": "0.78241897", "text": "function getRowCount() {\n\t\treturn (count($this->items));\n\t}", "title": "" }, { "docid": "63fbedd5907d63dd94ab513f63dae4f9", "score": "0.7821151", "text": "public function getRowsCount(): int\r\n {\r\n return (int) count($this->data['rows']);\r\n }", "title": "" }, { "docid": "645268bb4a9e1b03f503e9bae6474c02", "score": "0.7804601", "text": "public function getRowsCount();", "title": "" }, { "docid": "55f2c0b9a5da862b07de9a47d84e48dd", "score": "0.7771606", "text": "public function getRows(): int\n {\n return count($this->data);\n }", "title": "" }, { "docid": "1898cd1cb74d1e8545527129f88680ae", "score": "0.7748866", "text": "public function getNumRows();", "title": "" }, { "docid": "1898cd1cb74d1e8545527129f88680ae", "score": "0.7748866", "text": "public function getNumRows();", "title": "" }, { "docid": "ba1b97053cfaaf9041d05cb09062cc75", "score": "0.7670253", "text": "public function getRowsCount()\n {\n return $this->count(self::ROWS);\n }", "title": "" }, { "docid": "ba1b97053cfaaf9041d05cb09062cc75", "score": "0.7670253", "text": "public function getRowsCount()\n {\n return $this->count(self::ROWS);\n }", "title": "" }, { "docid": "ba1b97053cfaaf9041d05cb09062cc75", "score": "0.7670253", "text": "public function getRowsCount()\n {\n return $this->count(self::ROWS);\n }", "title": "" }, { "docid": "f288f3ec2b50e647fab36120071d9fee", "score": "0.7646263", "text": "abstract public function NumRows();", "title": "" }, { "docid": "a359278fa8dcba4188814c91b572fcd4", "score": "0.76274437", "text": "public function count()\n {\n return $this->totalRows;\n }", "title": "" }, { "docid": "c3d9d5bde849cad9fbfe06705fd0cf9a", "score": "0.7608492", "text": "public function getAllRowsCount(): int\r\n {\r\n return (int) $this->data['totalResults'];\r\n }", "title": "" }, { "docid": "bb8f004bdc47671a01e655891daea576", "score": "0.7593309", "text": "function getRowCount() {\n\t\treturn (count($this->results));\n\t}", "title": "" }, { "docid": "68957ceedd8d0bbc984af3fa0499296b", "score": "0.7585865", "text": "private static function totalRows()\n\t{\n\t\tself::$totalRows = count(self::$query);\n\t\treturn self::$totalRows;\n\t}", "title": "" }, { "docid": "6e645893f5bf97e88a7842a132652ff2", "score": "0.7556018", "text": "public function countRows(): int\n {\n return count($this->rows);\n }", "title": "" }, { "docid": "8451893dbd7707382acba3522cb2ef5d", "score": "0.7554474", "text": "function getRowsTotalCount() {\n\t\treturn $this->rowsTotalCount;\n\t}", "title": "" }, { "docid": "196600319d049da70c4245b64091061a", "score": "0.74809176", "text": "public function countRows()\n {\n return count($this->rows);\n }", "title": "" }, { "docid": "a57c659bc1d7e03523ae6ad6fd6e2cc2", "score": "0.74790096", "text": "public abstract function getNumRows();", "title": "" }, { "docid": "96ad6f1a13eba65409c482865608fde8", "score": "0.7463688", "text": "public function NumRows() {\n\t\treturn $this->_numRows;\n\t}", "title": "" }, { "docid": "7beff2b3132285be1e68ed340b0beedf", "score": "0.7449952", "text": "public function get_total_rows()\n\t{\n\t\t$this->db->from('items');\n\t\t$this->db->where('deleted', 0);\n\n\t\treturn $this->db->count_all_results();\n\t}", "title": "" }, { "docid": "ab882002e8269f6c1cbbae141871bcc4", "score": "0.74484086", "text": "public function getTotalElementsCount(): int;", "title": "" }, { "docid": "9baa6811d74fd4b78142ac6683cc48e7", "score": "0.74363613", "text": "public function getTotalRows() \r\n {\r\n $query = $this->query('SELECT FOUND_ROWS()'); \r\n\t\treturn (int)current(mysql_fetch_assoc($query)); //change reset to current by eyrad4\r\n }", "title": "" }, { "docid": "5e919b970a233074dbd62df2be03cdf0", "score": "0.74339134", "text": "public function getTotalNumberOfRows() {\n return $this->totalNumRows;\n }", "title": "" }, { "docid": "f6e0f09a3f5320ec428f49233ccade9f", "score": "0.7424168", "text": "abstract public function num_rows ( /* void */ );", "title": "" }, { "docid": "904e9d2797f468919991d44f685ffd99", "score": "0.74065214", "text": "public function rowsCount()\n {\n return $this->rows;\n }", "title": "" }, { "docid": "090603ec70f2b1522adf19a77d66570f", "score": "0.74027795", "text": "public function getRowCount() {\n\t\treturn $this->count();\n\t}", "title": "" }, { "docid": "e71e1b07d6f609e0c0ef850ae32b805e", "score": "0.7401123", "text": "protected function calculateTotalItemCount()\n {\n return count($this->_data);\n }", "title": "" }, { "docid": "a4a3f58835e44b0a1b2bc6980893815f", "score": "0.7393527", "text": "public function getRowCount()\n {\n \treturn $this->CountResults;\n }", "title": "" }, { "docid": "f714c99d3bb087c7940c9d0da5593de3", "score": "0.73899543", "text": "public function totalCount();", "title": "" }, { "docid": "a61a75769ea53e16fd5351c302e4ac47", "score": "0.73824996", "text": "public function getNumberRows() {\n\t\treturn $this->_numberrows;\n\t}", "title": "" }, { "docid": "3f0a268e67e54b97586138584b8109c4", "score": "0.7361594", "text": "public function num_rows()\n {\n return $this->count(TRUE);\n }", "title": "" }, { "docid": "d4a259faec7a6d761c8261ae990f55a4", "score": "0.736122", "text": "public function getNumRows() {\n\t\treturn $this->num_rows;\n\t}", "title": "" }, { "docid": "f297d184e29390ea90aee852809b2f9f", "score": "0.7356151", "text": "public function count()\n {\n return count($this->rows);\n }", "title": "" }, { "docid": "fc2e3903f0861a08831cd9006ab0ec19", "score": "0.7356058", "text": "public function getRowCount(): int\n {\n return $this->_rows;\n }", "title": "" }, { "docid": "e4078bed5fbd1037a6a30a4e20838b4e", "score": "0.7354693", "text": "public function getRowsNum()\n\t{\n\t\treturn count($this->table);\n\t}", "title": "" }, { "docid": "aeff2ff430d55c6ad23354864cfa2f62", "score": "0.73365855", "text": "function getRowCount() {\n\t\treturn (count($this->rs));\n\t}", "title": "" }, { "docid": "4621df61bceee34e268c0bf9c70cbc36", "score": "0.7300063", "text": "public function getNumberOfRows()\n {\n return $this->numOfRows;\n }", "title": "" }, { "docid": "cf2b85ddc094633979a5b7178e9cafb3", "score": "0.7294781", "text": "public function getNumRows()\n\t{\n\t\tif ( is_null($this->num_rows) )\n\t\t{\n\t\t\t$this->num_rows = $this->result->num_rows;\n\t\t}\n\n\t\treturn $this->num_rows;\n\t}", "title": "" }, { "docid": "24ec69433789fd855ba36d70229004a8", "score": "0.72851545", "text": "public function countRows(){\n return $this->_table->countRows();\n }", "title": "" }, { "docid": "b19a96d555f170e9a7e9f0ba02135057", "score": "0.72832865", "text": "public function getTotalCount();", "title": "" }, { "docid": "84273b3ed90044240c4b98e8372f2f92", "score": "0.7281406", "text": "public function getNumRows(){\n if ($this->Resource){\n return mysqli_num_rows($this->Resource);\n }\n }", "title": "" }, { "docid": "a3e72be2d9716318d0cf67d59a352195", "score": "0.7276082", "text": "function getRowCount() {\n\t\treturn (count($this->objects));\n\t}", "title": "" }, { "docid": "96416cdd8ac72689a4dfbfad88251794", "score": "0.7275302", "text": "public function total_number_of_cells()\n\t\t{\t\t\t\n\t\t\t$cells = $this->mdl_cells->all();\n\t\t\techo $cells->num_rows();\n\t\t}", "title": "" }, { "docid": "2f6d796e214f5879bae2c7dbb52e6431", "score": "0.72733516", "text": "function totalRows($result) {\n\t\t\t\treturn mysql_num_rows($result);\n\t\t\t}", "title": "" }, { "docid": "8f58e96f1117fb877afafae95c6f2971", "score": "0.72560376", "text": "public function numberRows() {\n $valueReturn = 0;\n if (isset($this->_result))\n $valueReturn = pg_num_rows($this->_result);\n return $valueReturn;\n }", "title": "" }, { "docid": "a075431557f2886a9729bd101b22d91b", "score": "0.72544855", "text": "function getNumRows() {\n\t\t$resID = count($this->resultSet) -1;\n\t\treturn @sqlite_num_rows($this->resultSet[$resID]);\n\t}", "title": "" }, { "docid": "c1f8c657915b54a17ad34407ec6caa2f", "score": "0.722893", "text": "public function getTotalRows()\n {\n return $this->totalRows;\n }", "title": "" }, { "docid": "ad2194b2b6530f446ecdddb37bdb2d0c", "score": "0.72252965", "text": "public function num_rows() {\n\t\tif ( ! is_numeric($this->num_rows) ) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn $this->num_rows;\n\t}", "title": "" }, { "docid": "de9afc6fbca0c82188ba255fd7dcdda7", "score": "0.72189426", "text": "public function getRowCount() {\n return count($this->tableRows);\n }", "title": "" }, { "docid": "3d46176ace569065ff7417ae53ae4cbe", "score": "0.7216355", "text": "public static function getRowCount() {\r\n\t\t\r\n\t\treturn static::properties()->table->getRowCount();\r\n\t\t\r\n\t}", "title": "" }, { "docid": "eb1b9becfb73882772744feb5306046e", "score": "0.72152287", "text": "public function getNumRows($result) : int;", "title": "" }, { "docid": "3e3da5905d3680fe57f89cc9158f1843", "score": "0.720849", "text": "public function getCount(): int\n {\n return count($this->data);\n }", "title": "" }, { "docid": "5f62a61581bb0e32339bd6050ee48e63", "score": "0.7189396", "text": "public function getRowCount();", "title": "" }, { "docid": "c6064259e1788c160d7397b6444168e9", "score": "0.7188424", "text": "public function getTotalRowCount()\n {\n return $this->getResult()->getTotalRowCount();\n }", "title": "" }, { "docid": "c679a526d21eb0f0b06f51f6e5f301e2", "score": "0.7186627", "text": "function getRowsCount() {\n\t\treturn $this->rowsCount;\n\t}", "title": "" }, { "docid": "f2b15621f57d6c1e0f8a91fc4dfc932f", "score": "0.7184856", "text": "public function getTotalCount(): int\n {\n $dataSource = clone $this->dibiFluent;\n return $dataSource->count();\n }", "title": "" }, { "docid": "adede13ee2bdbe197672bd07f0f97da5", "score": "0.7132834", "text": "function getRowCount() { }", "title": "" }, { "docid": "faf19adc49543abfdaade6ac1e27b73e", "score": "0.7132497", "text": "function get_num_rows() {\r\n\t\treturn $this->rows;\r\n\t}", "title": "" }, { "docid": "59a8872b941680380f2e660d4ccdd35c", "score": "0.711148", "text": "function numRows(){\n\t\treturn ($this -> result != null)?$this -> result -> num_rows : 0;\n\t}", "title": "" }, { "docid": "09d978fa5da56659f5fed70211c6ab97", "score": "0.7109886", "text": "public function getNumRows() {\n\t\tif( $this->result === null )\n\t\t\treturn 0;\n\t\treturn mysql_num_rows($this->result);\n\t}", "title": "" }, { "docid": "6ea5c16ca10ae0b7801b699fdb5983ab", "score": "0.7106743", "text": "public function geNumRows()\n\t{\n\t\t$rows = $this->sql_run2->num_rows;\n\t\treturn $rows;\n\t}", "title": "" }, { "docid": "e80bea89c08d0db60a6597df5757dc35", "score": "0.71053", "text": "public function fNumRows(){\n\t\treturn mysqli_num_rows($this->resultSet);\n\t}", "title": "" }, { "docid": "7b3c43a17290efa5d14d42f3d1713c85", "score": "0.7100769", "text": "public function count() {\n return count( $this->getList() );\n }", "title": "" }, { "docid": "ce7b89e8c9fc4307186e6908ab548f06", "score": "0.7099495", "text": "public function count() {\n return count($this->list);\n }", "title": "" }, { "docid": "14411f42acd455f85f47caebc00bf91f", "score": "0.70990217", "text": "public function getNumRows($result) {\n\t\treturn is_array($result) ? count($result) : 0;\n\t}", "title": "" }, { "docid": "1906e7db75d9b6b457b70ee2c954eb7e", "score": "0.7092817", "text": "function item_count($sql){\n\t\t$list = array();\n\t\t$rs= $this->connection->query($sql);\n\t\tif($rs === false) {\n\t\t\tif($this->logging) echo ('Wrong SQL: ' . $sql . ' Error: ' . $this->connection->error.' -- '.E_USER_ERROR);\n\t\t\treturn 0;\n\t\t} else {\n\t\t\t$count=$rs->num_rows;\n\t\t\t$rs->free_result();\n\t\t\treturn $count;\n\t\t}\n\t}", "title": "" }, { "docid": "04cafcef3997bcee4f2834a48b38add4", "score": "0.7087702", "text": "public function count(): int\n {\n return count($this->list);\n }", "title": "" }, { "docid": "eeb5b689269b39b60de6ca0b8178fadb", "score": "0.70863336", "text": "function numrows() {\n\t\treturn $this->numrows;\n\t}", "title": "" }, { "docid": "9db6ca35be453c4a3f7870c8928c49b4", "score": "0.70834666", "text": "public function getCount()\n {\n $it = $this->getIterator();\n while($it->valid() ){\n $it->next();\n }\n return count($this->data);\n }", "title": "" }, { "docid": "8e291d1c653e686ab9bc87ba07e125e0", "score": "0.707803", "text": "function getRowCount() { \n\t\treturn $this->tableModel->getRowCount();\n\t}", "title": "" }, { "docid": "5bb34ae6a859b41dd0bd6f76ef5fe8fd", "score": "0.7071738", "text": "public function count()\n {\n return $this->row_number;\n }", "title": "" }, { "docid": "d34cd19d0b31ad5926f82ed3b892e76d", "score": "0.70661473", "text": "function count_all_num_rows()\n {\n return $this->db->count_all($this->tableName);\n }", "title": "" }, { "docid": "cced51079f6ba8a8f554567a49ccf68a", "score": "0.70603687", "text": "public function getTotal() {\n return count($this->findAll());\n }", "title": "" }, { "docid": "771dacc001a891ac211eeef7e804e1be", "score": "0.7047209", "text": "public function count(){\n\t\t\t\t$count = 0;\n\n\t\t\t\tforeach ($this->items as $item) {\n\t\t\t\t\t$count += $item['qty'];\n\t\t\t\t}\n\n\t\t\t\treturn $count;\n\t\t\t}", "title": "" }, { "docid": "71a196d4cfb23ea63d8c868f4b0235e1", "score": "0.7044997", "text": "public function getTotalItemsCount()\n {\n return 10;\n }", "title": "" }, { "docid": "ec3a322b0775b906a3fb0f17fea5f967", "score": "0.70421296", "text": "function getNumRows() {\n return $result->num_rows;\n }", "title": "" }, { "docid": "d68fb2692b460d4f5735914df02452db", "score": "0.702795", "text": "public function getTotalItems(): int\n {\n return $this->totalItems;\n }", "title": "" }, { "docid": "bae537ddbcfa4cf27f307b37fdd0421e", "score": "0.70260674", "text": "public function getRows() {\r\n\t\treturn count($this->array);\r\n\t}", "title": "" }, { "docid": "9d018a59927076a0496278eccc3054f9", "score": "0.7014568", "text": "public static function get_total_items() {\n\t\treturn (int) self::db()->singleQuery('\n SELECT COUNT(1)\n FROM items');\n\t}", "title": "" }, { "docid": "c330b54acb2b1ae9b140f7ccec546081", "score": "0.7014558", "text": "public function getCount() {\r\n\t\t\treturn sizeof($this->items);\r\n\t\t}", "title": "" }, { "docid": "f3688c1ce60e493e5f8900d0c67adb5b", "score": "0.70127064", "text": "function getNumberRows($result){\n\t\t\treturn $result->num_rows;\n\t\t}", "title": "" }, { "docid": "7c77270567ce83c30811acb9b0d43234", "score": "0.7008296", "text": "public function count()\n {\n return count($this->List);\n }", "title": "" }, { "docid": "ab46b224d72f5591925ca4dbe61bbe9f", "score": "0.6999623", "text": "public function numRows()\n\t\t{\n\t\t\treturn $this->result->num_rows;\n\t\t}", "title": "" }, { "docid": "c38b872b44821fd2cf3de5a9032569aa", "score": "0.6999479", "text": "public function getCount()\n {\n return iterator_count($this->iterator);\n }", "title": "" }, { "docid": "523398879ef0443e1ec9460c10c5cbe4", "score": "0.6993627", "text": "public function numRows()\n\t{\n\t\tif (count($this->table))\n\t\t{\n\t\t\treset($this->table);\n\n\t\t\treturn count($this->table);\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "title": "" }, { "docid": "179d77fff94dc4754142df365cdc8ecc", "score": "0.6988088", "text": "function count() : int { return count($this->data); }", "title": "" }, { "docid": "17491c1f757e7feb7a54da85bb84a55d", "score": "0.698171", "text": "protected function getRowCount() {\n\t\treturn self::dbConnect()->rowCount();\n\t}", "title": "" }, { "docid": "eff286ec40d083db2f0e930d5dcf1153", "score": "0.69739455", "text": "private function getTotalNumRows()\n {\n try {\n\n $conditions = array(\n 'conditions' => array(\n 'ShopProdutoCategoria.id_produto_default' => $this->id_produto,\n 'ShopProdutoCategoria.categoria_primaria' => 'True',\n 'ShopProdutoCategoria.id_categoria_default' => $this->id_categoria\n ),\n 'limit' => 1\n );\n\n return $this->find('count', $conditions);\n\n } catch (\\PDOException $e) {\n \\Exception\\VialojaDatabaseException::errorHandler($e);\n }\n\n }", "title": "" }, { "docid": "0d4733cd1b5a696d45fa16ecd49a3ad8", "score": "0.6973772", "text": "public function numRows()\n\t\t{\n\t\treturn $this->numRows;\n\t\t\n\t\t}", "title": "" }, { "docid": "7e8951900abc940720865bd0e162fd10", "score": "0.6972442", "text": "public function numRows ()\n {\n return $this->numRows;\n }", "title": "" }, { "docid": "2a7c98912cee6a233379904a93de3e21", "score": "0.6969535", "text": "public function getTotalCount()\r\n {\r\n return $this->items_total;\r\n }", "title": "" }, { "docid": "4176ce71b8b2b502385ea38c6d21f97b", "score": "0.696477", "text": "public function size(){\n return count($this->list);\n }", "title": "" }, { "docid": "07241fcdd40b78c9e4156006a2298f86", "score": "0.6951807", "text": "public function count() {\n return count($this->records);\n }", "title": "" }, { "docid": "e86d1719770c5fb8080764834d4cb3b5", "score": "0.6951174", "text": "function num_rows() {\r\n # possible to walk through the result set once. By storing the row count\r\n # this problem is avoided.\r\n # Once the number of rows has been calculated it is stored in $RowCount.\r\n if ($this->RowCount != -1) {\r\n return $this->RowCount;\r\n }\r\n\r\n # Many ODBC drivers don't support odbc_num_rows() on SELECT statements.\r\n $num_rows = odbc_num_rows($this->Query_ID);\r\n\r\n # This is a workaround. It is intended to be ugly.\r\n if ($num_rows < 0) {\r\n $i=10;\r\n while (odbc_fetch_row($this->Query_ID, $i)) \r\n $i*=10;\r\n\r\n $j=0;\r\n while ($i!=$j) {\r\n $k= $j+intval(($i-$j)/2);\r\n if (odbc_fetch_row($this->Query_ID, $k))\r\n $j=$k;\r\n else \r\n $i=$k;\r\n if (($i-$j)==1) {\r\n if (odbc_fetch_row($this->Query_ID, $i)) \r\n $j=$i;\r\n else \r\n $i=$j; \r\n };\r\n //printf(\"$i $j $k <br>\");\r\n };\r\n $num_rows=$i;\r\n }\r\n\r\n $this->RowCount = $num_rows;\r\n return $num_rows;\r\n }", "title": "" }, { "docid": "6d6a1717d0c3bb3b776430d25d194fe9", "score": "0.69505703", "text": "public function getTotalRecords() {\n \treturn $this->size();\n }", "title": "" }, { "docid": "f2cdc2ecf09f5ac5e02513025aad43a3", "score": "0.69448245", "text": "public function getNumRows() {\n $ItNumRows = $this->RsResult->num_rows;\n if($ItNumRows === false) {\n throw new ErrorHandler(EXC_DB_NUMROWS);\n } else {\n return $ItNumRows;\n }\n }", "title": "" }, { "docid": "3fa2ba440e6b769f5621529435830787", "score": "0.6938964", "text": "public function row_count() \r\n\t{\r\n\t\treturn $this->result->rowCount();\r\n\t}", "title": "" }, { "docid": "8d92865bf85dd432f686c828df533d05", "score": "0.6935455", "text": "public function rowCount()\n {\n return $this->statment->rowCount();\n }", "title": "" }, { "docid": "15ff67c9bc205981829c3e07833c7ff1", "score": "0.6929227", "text": "private function getTotal(){\n $sql = new Sql($this->DbAdapter);\n $select = $sql->select($this->tableName);\n $statement = $sql->prepareStatementForSqlObject($select);\n return $statement->execute()->count();\n }", "title": "" } ]
627c1ea6989e0986f8815fdf900c162e
Create a new controller instance.
[ { "docid": "4c4c79f33dd3495cc88ee404af8bd661", "score": "0.0", "text": "public function __construct()\n {\n $this->middleware('guest');\n }", "title": "" } ]
[ { "docid": "bd1ee0eb805b9537f7b5fffd7bc75869", "score": "0.7934717", "text": "protected function createController()\n\t{\n\t\t$this->createParentControllerIfNotExists();\n\n\t\t$this->create('Controller', $this->data->get('controller.path'), [\n\t\t\t'name' => $this->data->get('controller.name'),\n\t\t\t'namespace' => $this->data->get('controller.namespace'),\n\t\t\t'parent' => $this->data->get('base_controller.name'),\n\t\t\t'parent_namespaced' => $this->data->get('base_controller.namespaced'),\n\t\t]);\n\t}", "title": "" }, { "docid": "8fc472ca59d683f1b71ce35c8d9cd840", "score": "0.79196423", "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 ]);\n }", "title": "" }, { "docid": "586d07833162bcc0f3d9ef3beb9597eb", "score": "0.75784665", "text": "private function makeController()\r\n {\r\n\r\n new MakeController($this, $this->files);\r\n\r\n }", "title": "" }, { "docid": "c93c248aa366a21a75f395554a1b6d92", "score": "0.7545241", "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('tenant:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') ? $modelName : null,\n ]);\n }", "title": "" }, { "docid": "6d22add10fa68cef458f5bce88d0fc82", "score": "0.7471624", "text": "public static function create()\n\t{\n\t\t//check, if an ObjectController instance already exists\n\t\tif(ObjectController::$objectController == null)\n\t\t{\n\t\t\tObjectController::$objectController = new ObjectController();\n\t\t}\n\n\t\treturn ObjectController::$objectController;\n\t}", "title": "" }, { "docid": "0b66faaecec66cfdcab2e8144eedde9c", "score": "0.7285359", "text": "public function create()\n {\n // See register controller\n }", "title": "" }, { "docid": "5905a13dea41ead7716acf26c8e1b561", "score": "0.72167856", "text": "public function createController() \n\t{\n if (!class_exists($this->controller))\n {\n new InvalidPageException(Method::GET, null);\n header('Location: /document/pagenotfound'); \n }\n \n return new $this->controller($this->action,$this->urlvalues, $this->postvalues, $this->filevalues, $this->id, $this->userid, $this->state, $this->admin);\n\t}", "title": "" }, { "docid": "44397456b6f80012d882544513cb3343", "score": "0.71994245", "text": "private function makeContoller()\n {\n $this->warn(\"Creating Controller\");\n\n $contents = file_get_contents( __DIR__.'../../../resources/base_files/controller.php');\n $updated_contents = $this->updateFileContents($contents);\n $path = base_path() .'/packages/'.$this->packageName.'/Http/Controllers/'.$this->packageName.'Controller.php';\n\n file_put_contents($path, $updated_contents);\n }", "title": "" }, { "docid": "e221633d04fc2f4f5f4d8a2362428823", "score": "0.69536394", "text": "abstract protected function controllerConstruct();", "title": "" }, { "docid": "fb60484fbf762e91b17b69f41086c2c6", "score": "0.6904606", "text": "private function makeController($controllerClassName)\n {\n if ($this->controllerFactory !== null) {\n return call_user_func($this->controllerFactory, $controllerClassName);\n }\n\n return new $controllerClassName;\n }", "title": "" }, { "docid": "88a72e1c8a3b541250666d8d876df9b1", "score": "0.6892876", "text": "public function createController($pi, array $params)\n {\n $container = include __DIR__ . '/dic.php';\n $class = __NAMESPACE__ . '\\\\Controller';\n\n return $container->get($class);\n }", "title": "" }, { "docid": "f5c573357e8982b856f3cf95f34207d4", "score": "0.6804621", "text": "public function controller()\n {\n $this->setClassname($this->getArgument(0));\n\n $this->generateClass('Http/Controllers', 'controller.stub', [\n 'classname' => $this->getClassname(),\n ]);\n }", "title": "" }, { "docid": "7768e52ada3641234c165223358c3965", "score": "0.66875744", "text": "private function getController(): IndexController\n {\n return new IndexController($this->getContainer());\n }", "title": "" }, { "docid": "d57ef5a3ee0ea199899f50a3bc03b48b", "score": "0.65677804", "text": "public function createController($pi, array $params)\n {\n $page = isset($params['page']) ? $params['page'] : 'main';\n $page = preg_replace('/_page$/', '', $page);\n $class = 'phpList\\plugin\\\\' . $pi . '\\\\' . ucfirst($page) . 'Controller';\n\n return new $class();\n }", "title": "" }, { "docid": "72d5a441f81890687fc2dd00df3baf73", "score": "0.65138745", "text": "public static function getInstance() \n {\n $class = __CLASS__;\n if (!isset(self::$_Controller)) {\n return new $class();\n }\n return self::$_Controller;\n }", "title": "" }, { "docid": "75acb5ec39d0d68eed980ebdb37bc967", "score": "0.6485421", "text": "public static function ctrl_maker($ctrl_name)\n \t{\n \t\tif (file_exists(\"app/controllers/{$ctrl_name}.php\")) {\n \t\t\techo \"Existing [{$ctrl_name}] Controller found, try again \\n\";\n \t\t\texit;\n \t\t}\n\n \t\t//Create and write File to controller Dir\n \t\t$controller = fopen(\"app/controllers/{$ctrl_name}.php\",\"w\");\n \t\tfwrite($controller, self::wfile($ctrl_name));\n\n \t\t//Throw response\n \t\techo \"Controller [{$ctrl_name}] created successfully \\n\";\n \t}", "title": "" }, { "docid": "cb636a4bd71a574d37ddab166dd7fcc1", "score": "0.6446192", "text": "private function createController($name, $option = \"false\")\n {\n $container = controllers_path();\n $name = preg_replace('/controller/i', 'Controller', ucfirst($name));\n $append = <<<EOF\n\n /**\n * Controller Index\n *\n * @return mixed\n **/\n public function index()\n {\n\n }\n\n\n /**\n * Fetch resource\n *\n * @return mixed\n **/\n public function fetch()\n {\n\n }\n\n\n /**\n * Show all/a resource(s)\n *\n * @param \\$id\n * @return mixed\n **/\n public function show(\\$id)\n\t{\n\n\t}\n\n\n /**\n * Create a resource\n *\n * @return mixed\n * */\n public function create()\n {\n\n }\n\n\n /**\n * Store the resource\n *\n * @return mixed\n * */\n public function store()\n {\n\n }\n\n\n /**\n * Edit a resource\n *\n * @param \\$id\n * @return mixed\n */\n public function edit(\\$id)\n {\n\n }\n\n\n /**\n * update the resource\n *\n * @return mixed\n */\n public function update()\n {\n\n }\n\n\n /**\n * Destroy a resource\n *\n * @param \\$id\n */\n public function destroy(\\$id)\n {\n\n }\n\n\nEOF;\n\n /**\n * if $option is 'empty', return an empty class\n */\n $methods = ($option == \"true\") ? '' : $append;\n\n $sub = preg_replace('/(.*)\\/(.*)/', '$2', $name);\n $data = <<<EOF\n<?php\n\nclass {$sub}\n{\n {$methods}\n}\n\nEOF;\n\n if (file_exists(\"{$container}/{$name}.php\")):\n return die(\"controller '{$name}' already exists.\\n\");\n endif;\n\n $file = fopen(\"{$container}/{$name}.php\", 'x');\n fwrite($file, $data);\n\n return die(\"'{$sub}' class created.\\n\");\n }", "title": "" }, { "docid": "e7d30d8ef2c251016e0dac7a6ede050c", "score": "0.6426407", "text": "public static function factory($controllerName, $layoutName, $action, $agent)\n {\n // Determine full classname\n $className = self::getClassName($controllerName);\n\n // Construct and return Controller\n return new $className($layoutName, $action, $agent);\n }", "title": "" }, { "docid": "2340da4739a3d4f3af4a806c3b40163c", "score": "0.6424097", "text": "public function incluirController() {\n $controller = $this->name . 'Controller';\n $this->controller = new $controller;\n }", "title": "" }, { "docid": "62acacd9eda2a0af65323ac3d09ec0fd", "score": "0.63956344", "text": "protected function createController( ezcMvcRoutingInformation $routingInformation, ezcMvcRequest $request )\n {\n $controllerClass = $routingInformation->controllerClass;\n $controller = new $controllerClass( $routingInformation->action, $request );\n return $controller;\n }", "title": "" }, { "docid": "9964315b7852ff5fa78452a1123ffbf4", "score": "0.63953257", "text": "public function postController(Request $request){\n $data = $request->json()->all();\n $controller = Controller::create([\n 'controller'=> $data['controller'],\n ]);\n return response()->json($controller, 201);\n }", "title": "" }, { "docid": "6dfca3c8cec5e1689beed63c582777e1", "score": "0.63864696", "text": "public function createController($class) {\n\t\t$replace = [];\n\t\t$file = [];\n\n\t\t$stub='/stubs/EditoraController.20220812.stub';\n\t\tif ($this->old_school_controllers)\n\t\t{\n\t\t\t$stub='/stubs/EditoraController.stub';\n\t\t}\n\n\t\tif (!file_exists(app_path() . '/Http/Controllers/Editora/'))\n\t\t\tmkdir(app_path() . '/Http/Controllers/Editora/', 0755, true);\n\n\t\tif (!file_exists(app_path() . '/Http/Controllers/Editora/' . $class->name . '.php') || $this->force_overwrite_controllers) {\n\n\t\t\tif (file_exists(__DIR__ . $stub)) {\n\t\t\t\t$file = file_get_contents(__DIR__ . $stub);\n\n\t\t\t\t$repositoryNamespace = 'App\\Http\\Controllers\\Editora';\n\t\t\t\t$replace[\"DummyNamespace\"] = 'App\\Http\\Controllers\\Editora';\n\t\t\t\t$replace[\"DummyModelClass\"] = $class->name . 'Extraction';\n\t\t\t\t$replace[\"DummyClass\"] = $class->name;\n\t\t\t\t$replace[\"DummyLowerCaseClass\"] = strtolower($class->name);\n\n\t\t\t\t$file = str_replace(array_keys($replace), array_values($replace), $file);\n\n\t\t\t\t$file_php = fopen(app_path() . '/Http/Controllers/Editora/' . $class->name . '.php', \"w\");\n\t\t\t\tfwrite($file_php, $file);\n\t\t\t\tfclose($file_php);\n\n\t\t\t\techo(\"Create \" . $class->name . \" Controller \\n\");\n\t\t\t} else {\n\t\t\t\techo \"Not exist stub controller \\n\";\n\t\t\t}\n\t\t} else {\n\t\t\techo \"Exist \" . $class->name . \" Controller \\n\";\n\t\t}\n\t}", "title": "" }, { "docid": "cbd895cf654881e4d256ac3844370a33", "score": "0.6360979", "text": "private function initController($controller) {\n\n $file = __DIR__ . '/../controllers/' . $controller . 'Controller.php';\n include_once $file;\n $controller = $controller . 'Controller';\n return new $controller;\n }", "title": "" }, { "docid": "c0c517ef5bcb5856fd2a2deeb4b02326", "score": "0.6323563", "text": "public function createController(): void\n {\n $this->checkDsToken();\n // Call the worker method\n $args = $this->getTemplateArgs();\n $results = $this->addActiveUser($args[\"envelope_args\"]);\n\n if ($results) {\n $this->clientService->showDoneTemplate(\n \"Create a new active eSignature user\",\n \"Create a new active eSignature user\",\n \"Results from eSignUserManagement:createUser method:\",\n json_encode(($results->__toString()))\n );\n }\n }", "title": "" }, { "docid": "53355a54bdfca52319b0b386c404dc0c", "score": "0.63204664", "text": "private function instantiateControllers()\n {\n $this->app['payments.controller'] = function () {\n return new PaymentsController($this->app['payments.service'], $this->app['payments.validator']);\n };\n }", "title": "" }, { "docid": "9a984469cd357201ffb0fbfd42e53081", "score": "0.62975997", "text": "public static function inst($controller) {\n $controllerName = $controller.'Controller';\n $fname = str_replace('_', '/', $controller).'.php';\n if (!class_exists($controllerName)) {\n if (!include(wheel::$conf['local_inc_dir'].'/controllers/'.$fname))\n throw new wheelException('Could not load file for controller '. $controller.' - please verify file is in the right location');\n }\n return new $controllerName();\n }", "title": "" }, { "docid": "adb31cc89366698aa5547192a77b1f97", "score": "0.6294923", "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 $arrDataFromForm = $form->getData();\n\n try {\n $service->createController($arrDataFromForm);\n //return $this->redirect()\n // ->toRoute($this->route, array('controller' => 'gerador', 'action' => 'criarController'));\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": "75c68b107831d5c640d18447761d5a7d", "score": "0.6283691", "text": "public static function factory(App $app, $controller_name)\n {\n if (!isset($app) || (isset($app) && !$app instanceof App))\n Throw new Error('Controller factory needs an app object.');\n\n // App or framework controller?\n $class = ($app->isSecure() ? '\\\\Web\\\\Framework\\\\AppsSec' : '\\\\Web\\\\Apps') . \"\\\\\" . $app->getName() . '\\\\Controller\\\\' . $controller_name . 'Controller';\n\n // Create controller object\n return new $class($controller_name, $app);\n }", "title": "" }, { "docid": "d9df194088048f2e2b032f201a82e8b3", "score": "0.6262158", "text": "protected function instantiateController($class) {\n\t\treturn new $class();\n\t}", "title": "" }, { "docid": "97d8642dd6ae6270fb8b77bde9f1de31", "score": "0.626122", "text": "public function new_route_controller( $namespace ) {\n\t\t// Do we want to auto start our controllers?\n\t\tif ( $this->config['routing']['auto_start_controllers'] ) {\n\t\t\t// Let's get our class name from the namespace\n\t\t\t$name_parts = explode( '/', $namespace ); \n\n\t\t\t// Let's convert our url endpoint name to a legit classname\n\t\t\t$name_parts = array_map(\n\t\t\t\tfunction( $string ) {\n\t\t\t\t\t$string = str_replace( '-', '_', $string ); // Turn all hyphens to underscores\n\t\t\t\t\t$string = str_replace( '_', ' ', $string ); // Turn all underscores to spaces (for easy casing)\n\t\t\t\t\t$string = ucwords( $string ); // Uppercase each first letter of each \"word\"\n\t\t\t\t\t$string = str_replace( ' ', '', $string ); // Remove spaces. BOOM! Zend-compatible camel casing\n\n\t\t\t\t\treturn $string;\n\t\t\t\t},\n\t\t\t\t$name_parts\n\t\t\t);\n\n\t\t\t// Create a callable classname\n\t\t\t$classname = implode( '\\\\', $name_parts );\n\t\t\t$class = $this->config['routing']['controller_base_namespace'] . $classname;\n\n\t\t\t// Does the class exist? (Autoload it if its not loaded/included yet)\n\t\t\tif ( class_exists( $class, true ) ) {\n\t\t\t\t// Instanciate the controller and keep an easy reference to it\n\t\t\t\t$this->controller = new $class( $this->request, $this->response, $this->service, $this );\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "1eb2ffcd396865a14ff746907387f0c6", "score": "0.62481457", "text": "protected function getController($className, array $controllerArgs = null)\n {\n $class = new ReflectionClass($className);\n if ($controllerArgs === null) {\n $controller = $class->newInstance();\n } else {\n $controller = $class->newInstanceArgs($controllerArgs);\n }\n $controller->setContainer($this->getContainer());\n $controller->setLogger($this->getLogger());\n $controller->init();\n return $controller;\n }", "title": "" }, { "docid": "1f3acdf88cb0b7dccd1cab7a0e225b29", "score": "0.6216539", "text": "public static function createController($config, $comm = null) {\n\n $templateDirectory = __DIR__.'/stubs';\n\n CoreHelper::log(\"info\", \"Creating controller...\", $comm);\n $md = file_get_contents($templateDirectory.\"/controller.stub\");\n\n $md = str_replace(\"__controller_class_name__\", $config->controllerName, $md);\n $md = str_replace(\"__model_name__\", $config->modelName, $md);\n $md = str_replace(\"__crud_name__\", $config->crudName, $md);\n $md = str_replace(\"__view_column__\", $config->crud->view_col, $md);\n\n // Listing columns\n $listing_cols = \"\";\n foreach ($config->crud->fields as $field) {\n $listing_cols .= \"'\".$field['colname'].\"', \";\n }\n $listing_cols = trim($listing_cols, \", \");\n\n // Module\n $module = Module::where('slug', $config->crud->module);\n\n $md = str_replace(\"__listing_cols__\", $listing_cols, $md);\n $md = str_replace(\"__view_folder__\", snake_case($config->crudName), $md);\n $md = str_replace(\"__route_resource__\", snake_case($config->crudName), $md);\n $md = str_replace(\"__db_table_name__\", $config->dbTableName, $md);\n $md = str_replace(\"__singular_var__\", $config->singularVar, $md);\n $md = str_replace(\"__module__\", $module['name'], $md);\n\n file_put_contents(base_path('app/Modules/'.$module['name'].'/Http/Controllers/'.$config->controllerName.\".php\"), $md);\n }", "title": "" }, { "docid": "9a1cc018242715a0160a8ba04e04d0bd", "score": "0.61998004", "text": "private static function createController ($name)\r\n {\r\n if (strpbrk($name, \"\\\\/?%*:|\\\"<>\")) {\r\n echo $name . ' isn\\'t a valid controller name' . \"\\n\";\r\n return;\r\n }\r\n\r\n $name = ucwords(strtolower($name));\r\n $filer = new WalrusFileManager(ROOT_PATH);\r\n\r\n if (!file_exists(ROOT_PATH . 'engine/controllers/' . $name . 'Controller.php')) {\r\n\r\n // @TODO: catch isn't working ?\r\n try {\r\n $filer->setCurrentElem('Walrus/core/sample/controller.sample');\r\n $controller = $filer->getFileContent();\r\n $controller = str_replace('%name%', $name, $controller);\r\n\r\n $filer->setCurrentElem('engine/controllers');\r\n $filer->fileCreate($name . 'Controller.php');\r\n $filer->setCurrentElem('engine/controllers/' . $name . 'Controller.php');\r\n $filer->changeFileContent($controller);\r\n echo 'New controller created in engine/controllers with the name ' . $name . 'Controller.php' . \"\\n\";\r\n } catch (Exception $e) {\r\n echo 'Exception: ' . $e->getMessage() . \"\\n\";\r\n return;\r\n }\r\n } else {\r\n echo $name . 'Controller.php already exist' . \"\\n\";\r\n }\r\n\r\n if (!file_exists(ROOT_PATH . 'www/templates/' . $name)) {\r\n\r\n try {\r\n\r\n $filer->setCurrentElem('www/templates');\r\n $filer->folderCreate(strtolower($name));\r\n\r\n echo 'New templates directory created in www/templates with the name ' . $name . \"\\n\";\r\n } catch (Exception $e) {\r\n echo 'Exception: ' . $e->getMessage() . \"\\n\";\r\n return;\r\n }\r\n } else {\r\n echo $name . ' template directory already exist' . \"\\n\";\r\n }\r\n\r\n }", "title": "" }, { "docid": "7991aa5da4a05993d0bcdb2cd110d8c1", "score": "0.6191357", "text": "function getController($controller)\n{\n $ctrl_name = ucfirst($controller) . 'Controller';\n include_once(APP_CONTROLLERS . $ctrl_name . '.php');\n return new $ctrl_name();\n}", "title": "" }, { "docid": "ece691d92559c8f2397b402a34c03523", "score": "0.61910933", "text": "protected function createRegisterController()\r\n {\r\n file_put_contents(\r\n path('app/Controllers/Auth/RegisterController.php'),\r\n $this->compileRegisterControllerTemp()\r\n );\r\n }", "title": "" }, { "docid": "5443c2363b3d31c386455f04837cdb5c", "score": "0.6187821", "text": "protected static function createInstance()\n {\n\n if (defined('BUIZ_CONTROLLER'))\n $flowController = 'LibFlow'.ucfirst(BUIZ_CONTROLLER);\n else\n $flowController = 'LibFlowApachemod';\n\n self::$instance = new $flowController();\n\n }", "title": "" }, { "docid": "20d843346cbe0a3b4e3d2a396049130d", "score": "0.6175614", "text": "public function create()\n {\n dd('ehExamplesController@create()');\n }", "title": "" }, { "docid": "09aab347ece7f5d31ce863e81c0aeb5c", "score": "0.6171574", "text": "protected function createController($controller)\n {\n $this->checkClass($controller);\n $handler = Application::container()->make($controller);\n if (! $handler instanceof ControllerInterface) {\n throw new InvalidControllerException(\n \"The class '{$controller}' does not implement ControllerInterface.\"\n );\n }\n return $handler;\n }", "title": "" }, { "docid": "320e267b303f4685e52514f9cdbd0cf6", "score": "0.61517256", "text": "public function createControllerByID($id)\r\n {\r\n $ret = parent::createControllerByID($id);\r\n if (!empty($ret)) {\r\n return $ret;\r\n } else {\r\n $this->controllerNamespace = $this->fallbackControllerNamespace;\r\n return parent::createControllerByID($id);\r\n }\r\n }", "title": "" }, { "docid": "1c6937b6ddb8471e5090c844698c096a", "score": "0.6137554", "text": "protected function createHomeController()\r\n {\r\n file_put_contents(\r\n path('app/Controllers/HomeController.php'),\r\n $this->compileHomeControllerTemp()\r\n );\r\n }", "title": "" }, { "docid": "feaa9cda25e1119c8673a0964cb215d5", "score": "0.61270726", "text": "protected function getMaker_AutoCommand_MakeControllerService()\n {\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\symfony\\\\console\\\\Command\\\\Command.php';\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\symfony\\\\maker-bundle\\\\src\\\\Command\\\\MakerCommand.php';\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\symfony\\\\maker-bundle\\\\src\\\\MakerInterface.php';\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\symfony\\\\maker-bundle\\\\src\\\\Maker\\\\AbstractMaker.php';\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\symfony\\\\maker-bundle\\\\src\\\\Maker\\\\MakeController.php';\n\n $a = ($this->privates['maker.file_manager'] ?? $this->getMaker_FileManagerService());\n\n $this->privates['maker.auto_command.make_controller'] = $instance = new \\Symfony\\Bundle\\MakerBundle\\Command\\MakerCommand(new \\Symfony\\Bundle\\MakerBundle\\Maker\\MakeController($a), $a, ($this->privates['maker.generator'] ?? $this->getMaker_GeneratorService()));\n\n $instance->setName('make:controller');\n\n return $instance;\n }", "title": "" }, { "docid": "dfb02f31f17c5fb00847b5714a26516e", "score": "0.6124433", "text": "protected function generateController(array $options) \n\t{\n\t\t$this->progress[] = 'Create controller';\n\n\t\t$controllersPath = $options['paths']['controllers_path'];\n\t\t$servicesPath = $options['paths']['services_path'];\n\t\t$requestsPath = $options['paths']['requests_path'];\n\t\t$viewsPath = $options['paths']['views_path'];\n\t\t$entityName = $options['entity_name'];\n\t\t$files = $options['files'];\n\n\t\tif ($this->fileSystem->exists(base_path($controllersPath) . $entityName . 'Controller.php')) {\n\t\t\t$this->progress[] = 'Controller already exists';\n\t\t\treturn;\n\t\t}\n\n\t\t$config['namespace'] = $this->getNamespaceFromPath($controllersPath);\n\t\t$config['servicesNamespace'] = $this->getNamespaceFromPath($servicesPath);\n\t\t$config['requestsNamespace'] = $this->getNamespaceFromPath($requestsPath);\n\t\t$config['viewsPath'] = $this->getFullViewsPathFromPath($viewsPath);\n\t\t$config['createRequest'] = (in_array('createrequest', $files) ? \"{$entityName}CreateRequest\" : 'Request' );\n\t\t$config['updateRequest'] = (in_array('updaterequest', $files) ? \"{$entityName}UpdateRequest\" : 'Request' );\n\t\t$config = $this->addEntityNameVariations($config, $entityName);\n\n\t\t$useClasses = [];\n\t\t$useClasses[] = $config['servicesNamespace'] . '\\\\' . $entityName . 'Service';\n\t\tif (in_array('createrequest', $files)) {\n\t\t\t$useClasses[] = $config['requestsNamespace'] . '\\\\' . $config['createRequest'];\n\t\t}\n\t\tif (in_array('updaterequest', $files)) {\n\t\t\t$useClasses[] = $config['requestsNamespace'] . '\\\\' . $config['updateRequest'];\n\t\t}\n\t\tif (count($useClasses) === 1) {\n\t\t\t$config['requestsNamespace'] = 'Illuminate\\Http';\n\t\t\t$useClasses[] = 'Illuminate\\Http\\Request';\n\t\t}\n\n\t\t$config['useStatements'] = '';\n\t\tforeach ($useClasses as $useClass) {\n\t\t\t$config['useStatements'] .= \"use {$useClass}; \\n\";\n\t\t}\n\t\t$config['useStatements'] = rtrim($config['useStatements']);\n\t\t\n\t\t$controllerTemplate = $this->controllerBuilder->create($config);\n\t\t$this->makeDirectoryIfNecessary($controllersPath);\n\t\t$this->fileSystem->put(base_path($controllersPath) . $entityName . 'Controller.php', $controllerTemplate);\n\n\t\t$this->progress[] = 'Success';\n\t}", "title": "" }, { "docid": "40f73be6ff50aaa31634ebfff605297a", "score": "0.6120663", "text": "private function _createControllerModel()\n {\n\n //echo \"creando archivo de controller\";\n\n $model_controller = new \\application\\modules\\system\\model\\ControllerModel();\n $model_module = new \\application\\modules\\system\\model\\ModuleModel();\n\n // lets set the controller params\n $model_controller->controller_description = 'Controller created automatically '\n . ' from model';\n $model_controller->controller_model_id = $this->_id_value;\n $model_controller->controller_name = strtolower($this->_model_name);\n $model_controller->controller_module = $model_module->find('module', ['id_module' => $this->_module_id], 'one')->module;\n $model_controller->controller_module_id = $this->_module_id;\n $model_controller->view_dependency = $this->_controller_dependencys;\n $model_controller->controller_path = __MODULEFOLDER__ . '/' . $model_controller->controller_module . '/controller/';\n\n //create a new controller for this model\n $model_controller->createController();\n\n // create asociatcion , module,controller->model\n $model_controller_model = new ModuleControllerModel();\n $model_controller_model->id_controller = $model_controller->_id_value;\n $model_controller_model->id_module = $this->_module_id;\n $model_controller_model->id_model = $this->_id_value;\n $model_controller_model->createModelControllerModule();\n }", "title": "" }, { "docid": "0dabd0b6625b8176c59d525592b88eb1", "score": "0.60779977", "text": "public function makeController($controllerPath, $controller, $action)\n\t{\n\t\tif (!$this->frontController)\n\t\t\tthrow new \\RuntimeException('You must set frontController before calling this func.');\n\n\t\t$className = $this->createClassName($controllerPath, $controller);\n\t\t$actionName = $this->getActionMethod($action);\n\n\t\ttry {\n\t\t\tif (!class_exists($className) || !method_exists($className, $actionName))\n\t\t\t\treturn false;\n\t\t} catch (\\Exception $e) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$class = new $className($this->frontController);\n\t\tif (!$class instanceof \\KZ\\Controller)\n\t\t\tthrow new \\RuntimeException('Controller must be instance of \\KZ\\Controller.');\n\n\t\treturn $class;\n\t}", "title": "" }, { "docid": "46a9eceb74f42943d037f0f8fb2b933a", "score": "0.6077509", "text": "public function createRequestController(Request $aRequest)\n {\n \t$sControllerName = $aRequest->string($this->sControllerParam) ;\n \t\n \t$sControllerClass = $this->transControllerClass($sControllerName) ;\n \t\n \treturn $sControllerClass? new $sControllerClass($aRequest): null ;\n }", "title": "" }, { "docid": "c6ec4073881c5196194e82ee78c6155e", "score": "0.6073948", "text": "public function CreateController(\\Doctrine\\ORM\\EntityManager $entityManager) {\r\n\r\n //does the class exist? \r\n if (class_exists($this->controller)) {\r\n $parents = class_parents($this->controller);\r\n //does the class extend the controller class?\r\n if (in_array(\"Alt68\\\\Sys\\\\BaseController\", $parents)) {\r\n //does the class contain the requested method?\r\n if (method_exists($this->controller, $this->action)) {\r\n return new $this->controller($entityManager, $this->action, $this->urlvalues);\r\n }\r\n }\r\n }\r\n\r\n // if any error create error page\r\n\r\n $this->controller = $this->controllerNamespaceName .\r\n CommonService::getConfigValue('mainController');\r\n $this->action = 'error';\r\n\r\n return new $this->controller($entityManager, $this->action, $this->urlvalues);\r\n }", "title": "" }, { "docid": "414cc4037aacb1536e895af52a5753cd", "score": "0.60387444", "text": "private function getController(): SecurityController\n {\n return new SecurityController(\n $this->alert,\n $this->config,\n $this->repository,\n $this->toggleTwoFactorService,\n $this->twoFactorSetupService\n );\n }", "title": "" }, { "docid": "7024dca89692e6831b1a364e33d90086", "score": "0.60160553", "text": "public static function createController($inputName)\n {\n $pluginName = StringHelper::camelCase($inputName);\n\n mkdir('craft/plugins/' . $pluginName . '/controllers');\n\n $controller = fopen('craft/plugins/' . $pluginName . '/controllers/' . StringHelper::upperNoSpaces($inputName) . 'Controller.php', 'w');\n fwrite($controller, ContentHelper::generateControllerContent($inputName));\n fclose($controller);\n return;\n }", "title": "" }, { "docid": "6d3db3d7f88034ec7c0db252b9d435c0", "score": "0.6002788", "text": "public function __construct(){\n\t\t$this->crimeController = new crimeController();\n\t}", "title": "" }, { "docid": "9b5c2275d9ffcaf65871350494345c0c", "score": "0.6000697", "text": "function &get_instance(){\n\t return Controller::get_instance();\n\t }", "title": "" }, { "docid": "95c55b5934df2b2fef9a9c0ba3e78c91", "score": "0.5998441", "text": "protected function setupController()\n {\n }", "title": "" }, { "docid": "0d085febcc69eecde78c718eff8bb5b2", "score": "0.5995643", "text": "private function create_migration_controller()\n {\n $controller = $this->location . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR . $this->controller_name . '.php';\n if (is_file($controller))\n {\n throw new RuntimeException('The ' . $this->controller_name . ' controller aleardy exists!');\n }\n else\n {\n $template_name = \"migration_controller\";\n $args = array(\n 'class_name' => ApplicationHelpers::camelize($this->controller_name),\n );\n\n if ($this->run_from_web === FALSE)\n {\n $args['extra'] = ' $this->input->is_cli_request() or exit(\"Execute via command line: php index.php migrate\");';\n }\n else\n {\n $args['extra'] = PHP_EOL;\n }\n\n $template = new TemplateScanner($template_name, $args);\n $controller_contents = $template->parse();\n\n if (!file_put_contents($controller, $controller_contents))\n {\n throw new RuntimeException('Could not create migration controller...' . PHP_EOL);\n }\n\n return TRUE;\n }\n }", "title": "" }, { "docid": "d100a28ce6d77b6f197f6d776534f5a9", "score": "0.59911996", "text": "function __construct(Controller $controller)\n {\n $this->_controller = $controller;\n }", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5985074", "text": "public function getController();", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5985074", "text": "public function getController();", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5985074", "text": "public function getController();", "title": "" }, { "docid": "3d68780a3dae015b84166f917045917b", "score": "0.5978511", "text": "function __construct($class){\n\t\t$this->controller = new $class();\n\t\t}", "title": "" }, { "docid": "7e39a9533343a65165e1fb5bb10d9c81", "score": "0.5962812", "text": "private function addController($controller)\r\n {\r\n try {\r\n $object = new $controller($this->app);\r\n\r\n // App\\Controllers\\HomeController\r\n $this->controllers[$controller] = $object;\r\n } catch (Exception $e) {\r\n echo $e->getMessage();\r\n pred($e->getTrace());\r\n }\r\n }", "title": "" }, { "docid": "e764e6e99310cc69470cb81487b06f38", "score": "0.5956204", "text": "protected function createLoginController()\r\n {\r\n file_put_contents(\r\n path('app/Controllers/Auth/LoginController.php'),\r\n $this->compileLoginControllerTemp()\r\n );\r\n }", "title": "" }, { "docid": "85ce2faaab2f738d464b8e593b227bbc", "score": "0.5949653", "text": "private function use_controller() {\n\n\t\t// Find out which controller to use.\n\t\tif ( $this->request->is_front ) {\n\n\t\t\t$Controller = new Front;\n\n\t\t} elseif ( $this->request->is_dashboard ) {\n\n\t\t\t$Controller = new Dashboard;\n\n\t\t} elseif ( $this->request->is_system ) {\n\n\t\t\t$Controller = new System;\n\n\t\t} elseif ( $this->request->is_auth ) {\n\n\t\t\t$Controller = new Auth;\n\n\t\t} elseif ( $this->request->is_api ) {\n\n\t\t\t$Controller = new API;\n\n\t\t}\n\n\t\t// Load the route.\n\t\t$Controller->load_route( $this->request );\n\n\t}", "title": "" }, { "docid": "3931ba5a979acbd9aa891f561cae7af4", "score": "0.5931807", "text": "public static function GetController($action)\n\t{\n\t\t$controller = null;\n\n\t\tswitch ($action) {\n\t\t\tcase 'search':\n\t\t\t\t$controller = new Controller_Search();\n\t\t\t\tbreak;\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('plain', true);\n\t\t\t\tbreak;\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('plain', true);\n\t\t\t\tbreak;\n\t\t\tcase 'history':\n\t\t\t\t$controller = new Controller_History();\n\t\t\t\tbreak;\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new Controller_Snapshot();\n\t\t\t\tbreak;\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new Controller_Tag();\n\t\t\t\tbreak;\n\t\t\tcase 'tags':\n\t\t\t\t$controller = new Controller_Tags();\n\t\t\t\tbreak;\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new Controller_Heads();\n\t\t\t\tbreak;\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new Controller_Blame();\n\t\t\t\tbreak;\n\t\t\tcase 'blob':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('plain', true);\n\t\t\t\tbreak;\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GITPHP_FEED_FORMAT_RSS);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GITPHP_FEED_FORMAT_ATOM);\n\t\t\t\tbreak;\n\t\t\tcase 'commit':\n\t\t\t\t$controller = new Controller_Commit();\n\t\t\t\tbreak;\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new Controller_Project();\n\t\t\t\tbreak;\n case 'tree':\n\t\t\tdefault:\n $controller = new Controller_Tree();\n\t\t}\n\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "d57a13e96b207607fc9ba7327e52d77e", "score": "0.5927687", "text": "private function _buildController($controller_name) {\r\n\t\t\r\n\t\t$model_name = Inflector::singularize($controller_name);\r\n\t\t$controller_name = Inflector::pluralize($controller_name);\r\n\r\n\t\t$this->controller = new Controller();\r\n\t\t$collection = new ComponentCollection();\r\n\t\t$this->controller->request = new CakeRequest();\r\n\t\t$this->Image =& new ImageComponent($collection);\r\n\t\t$this->PDFMenu =& new PDFMenuComponent($collection);\r\n\r\n\t\t$this->controller->name = $controller_name;\r\n\t\t$this->controller->{$model_name} = $this->{$model_name};\r\n\r\n\t\t$this->Image->initialize($this->controller, $this->files_dry_run);\r\n\t\t$this->PDFMenu->initialize($this->controller, $this->files_dry_run);\r\n\r\n\t}", "title": "" }, { "docid": "181c88b44dd8c624423841bce0a25ad4", "score": "0.59190243", "text": "protected function controller($name)\n {\n $space = explode('/', $name);\n $className = last($space);\n $namespace = 'App\\Http\\Controllers';\n $modelPath = str_replace('/', '\\\\', $name);\n $requestPath = $modelPath . 'Request';\n $servicePath = $modelPath . 'Service';\n $resourcePath = $modelPath . 'Resource';\n\n if (count($space) > 1) {\n $namespace .= \"\\\\\" . str_replace('/', '\\\\', str_replace(\"/\". $className, '', $name));\n }\n\n $direcotory = app_path(str_replace('App/', '', str_replace('\\\\', '/', $namespace)));\n\n $controllerTemplate = str_replace(\n [\n '{{DummyNamespace}}',\n '{{requestPath}}',\n '{{servicePath}}',\n '{{resourcePath}}',\n '{{modelName}}',\n '{{modelNamePluralLowerCase}}',\n '{{modelNameSingularLowerCase}}'\n ],\n [\n $namespace,\n $requestPath,\n $servicePath,\n $resourcePath,\n $className,\n strtolower(str_plural($className)),\n strtolower($className)\n ],\n $this->getStub('ControllerAjax')\n );\n\n if(!file_exists($direcotory))\n mkdir($direcotory, 0777, true);\n\n file_put_contents(app_path(\"/Http/Controllers/{$name}Controller.php\"), $controllerTemplate);\n }", "title": "" }, { "docid": "a8d8aed9f45c7f10fa763f95b96cb019", "score": "0.59000975", "text": "public static function factory($name)\n {\n $class = self::toClass($name);\n include APPLICATION_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR . $class . '.php';\n return new $class();\n }", "title": "" }, { "docid": "29b809a46b9dbf7606b6a90ce383619a", "score": "0.589585", "text": "private function getController(string $dir) {\n $dir = str_replace('/', '\\\\', $dir);\n $class = 'Controller\\\\' . $dir;\n \n $controller = new $class($this, $this->library, $this->session, $this->cache);\n return $controller;\n }", "title": "" }, { "docid": "7651f62b6c93723a9c372dc1a5f871df", "score": "0.589468", "text": "public function initController($controller, $path)\n {\n if($path)\n {\n $controller = $this->name . '\\\\Controller\\\\' . $path . '\\\\' . $controller;\n }\n else\n {\n $controller = $this->name . '\\\\Controller\\\\' . $controller;\n }\n\n return new $controller();\n }", "title": "" }, { "docid": "903cd6f46161ed593e91fd8d1e441e4e", "score": "0.588756", "text": "private function load_controller()\n\t{\n\t\t// If no controller is set through the uri array then set it to default\n\t\tif (Router::uri(1) === null)\n\t\t\tRouter::uri(1, Config::$config[$this->data['app']['name']]['default_controller']);\n\n\t\trequire DOC_ROOT . 'apps/' . $this->app_name . '/controllers/controller.' . Router::uri(1) . '.php';\n\t\t\n\t\t$controller_name = String::uc_slug(Router::uri(1), '_') . '_Controller';\n\t\t$controller_obj = new $controller_name($this->data);\n\t}", "title": "" }, { "docid": "18f6b019957cbd45ff8dd1ea670e90a4", "score": "0.58828807", "text": "public function action_controller( $params ) \n\t{\t\n\t\t$options = \\CCDataObject::assign( $params );\n\t\t\n\t\t$name = $options->get( 0, null );\n\t\t$parent = $options->get( 1, null );\n\t\t\n\t\t// get name if we dont have one\n\t\twhile( !$name ) \n\t\t{\n\t\t\t$name = $this->read( 'Please enter the controller name: ' );\n\t\t}\n\t\t\n\t\t// fix controller suffix\n\t\tif ( substr( $name, ( strlen( 'Controller' ) * -1 ) ) != 'Controller' )\n\t\t{\n\t\t\t$name .= 'Controller';\n\t\t}\n\t\t\n\t\t// try to resolve the path\n\t\tif ( !$path = \\CCPath::controllers( str_replace( '_', '/', $name ), EXT ) )\n\t\t{\n\t\t\t$this->error( 'Could not resolve the path. Check if the namespace is registered.' ); return;\n\t\t}\n\t\t\n\t\t// parent\n\t\tif ( is_null( $parent ) )\n\t\t{\n\t\t\t$parent = '\\\\CCController';\n\t\t} \n\t\t\n\t\t// view controller\n\t\tif ( $options->get( 'view', false ) )\n\t\t{\n\t\t\t$parent = '\\\\CCViewController';\n\t\t}\n\t\t\n\t\t// create the class\n\t\t$class = \\CCShipyard::create( 'class', $name, $parent );\n\t\t\n\t\t// get the actions\n\t\t$actions = array( 'index' );\n\t\t\n\t\tif ( $options->get( 'actions', false ) )\n\t\t{\n\t\t\t$actions = array_merge( $actions, explode( ',', $options->get( 'actions' ) ) );\n\t\t}\n\t\t\n\t\tforeach( $actions as $action )\n\t\t{\n\t\t\t$action = trim( $action );\n\t\t\t\n\t\t\t$class->add( 'function', 'action_'.$action, 'protected', 'echo \"'.$name.' '.$action.' action\";', ucfirst($action).\" action\\n@return void|CCResponse\" );\n\t\t\t$class->add( 'line', 2 );\n\t\t}\n\t\t\n\t\t// add static init\n\t\tif ( !$options->get( 'no-events', false ) )\n\t\t{\n\t\t\t$class->add( 'function', 'wake', 'protected', '//', \"Controller wake\\n@return void|CCResponse\" );\n\t\t\t$class->add( 'line', 2 );\n\t\t\t$class->add( 'function', 'sleep', 'protected', '//', \"Controller wake\\n@return void\" );\n\t\t}\n\t\t\t\t\t\t\n\t\t// check for overwrite\n\t\tif ( file_exists( $path ) )\n\t\t{\n\t\t\tif ( !$this->confirm( \"The class already exists. Do you wish to overwrite it?\", true ) ) \n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// write file\n\t\t\\CCFile::write( $path, $class->output() );\n\t}", "title": "" }, { "docid": "986593fadac4a233b16d6411512510b2", "score": "0.5880932", "text": "public function getController($controller_name)\n {\n return Controller::factory($this, $controller_name);\n }", "title": "" }, { "docid": "48be68f2d9bd5c305c8873ab5aff62d3", "score": "0.58794177", "text": "public function create()\n\t{\n\t\t//\n\n return view ('control.create');\n\t}", "title": "" }, { "docid": "cd98ae6932161ed0431f62e5eec26b70", "score": "0.587036", "text": "function __contruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contruct();//Chamando o construtor da classe pai\n\t}", "title": "" }, { "docid": "df206b51af190c78d40f349a9ca3622c", "score": "0.58663046", "text": "private function buildController(Request $request) {\n // With redirection, all incoming URLs are like :\n // index.php?controller=XXX&action=YYY&id=ZZZ\n $controllerSuffix = \"Home\"; // Default controller suffix is \"Home\" to call ControllerHome\n if ($request->existsParameter('controller')) {\n $controllerSuffix = $request->getParameter('controller');\n // First letter to uppercase\n $controllerSuffix = ucfirst(strtolower($controllerSuffix));\n }\n // Once we have the Suffix we can create the controller filename\n $controllerClass = \"Controller\" . $controllerSuffix;\n $controllerFilePath = \"Controller/\" . $controllerClass . \".php\";\n if (file_exists($controllerFilePath)) {\n // Now the right controller matching with the url request is required\n require($controllerFilePath);\n // We instantiate a new controller object \n $controller = new $controllerClass();\n $controller->setRequest($request);\n return $controller;\n }\n else\n throw new Exception(\"File '$controllerFilePath' not found\");\n }", "title": "" }, { "docid": "4dfca9238fe442ba82b785971608ec5d", "score": "0.5859159", "text": "public function testCreateController()\n {\n $module = new Module('app');\n $module->setModule('base', new Module('base'));\n $defaultController = ['class' => 'yii\\web\\Controller'];\n $otherController = ['class' => 'yii\\web\\Controller'];\n $module->getModule('base')->controllerMap = [\n 'default' => $defaultController,\n 'other' => $otherController,\n ];\n\n list($controller, $action) = $module->createController('base');\n $this->assertSame('', $action);\n $this->assertSame('app/base/default', $controller->uniqueId);\n\n list($controller, $action) = $module->createController('base/default');\n $this->assertSame('', $action);\n $this->assertSame('app/base/default', $controller->uniqueId);\n\n list($controller, $action) = $module->createController('base/other');\n $this->assertSame('', $action);\n $this->assertSame('app/base/other', $controller->uniqueId);\n\n list($controller, $action) = $module->createController('base/default/index');\n $this->assertSame('index', $action);\n $this->assertSame('app/base/default', $controller->uniqueId);\n\n list($controller, $action) = $module->createController('base/other/index');\n $this->assertSame('index', $action);\n $this->assertSame('app/base/other', $controller->uniqueId);\n\n list($controller, $action) = $module->createController('base/other/someaction');\n $this->assertSame('someaction', $action);\n $this->assertSame('app/base/other', $controller->uniqueId);\n\n $controller = $module->createController('bases/default/index');\n $this->assertFalse($controller);\n\n $controller = $module->createController('nocontroller');\n $this->assertFalse($controller);\n }", "title": "" }, { "docid": "89d925edef45d461446d7de08413bdcc", "score": "0.5853714", "text": "public function create() {}", "title": "" }, { "docid": "89d925edef45d461446d7de08413bdcc", "score": "0.5853714", "text": "public function create() {}", "title": "" }, { "docid": "c012a06c01a8723b409f5711fd9f32fc", "score": "0.58479625", "text": "public function __construct()\n {\n $this->ctrlHome = new HomeController();\n $this->ctrlAdministration = new AdministrationController();\n }", "title": "" }, { "docid": "e391ad7de7d9c70f4f5ada285f6f9e34", "score": "0.58444035", "text": "public function __construct()\n {\n $model = 'Model'.str_replace('Controller','',static::class);\n $this->request = $GLOBALS['request'];\n $this->response = $GLOBALS['response'];\n $this->model = new $model;\n }", "title": "" }, { "docid": "9e818a4d637c746887563487d241a1a2", "score": "0.5828917", "text": "public static function getInstance() {\n\n if( isset( $_REQUEST['api'] ) && filter_input( INPUT_GET, 'api', FILTER_VALIDATE_BOOLEAN ) ){\n\n if( !isset( $_REQUEST['action'] ) || empty( $_REQUEST['action'] ) ){\n header( \"Location: \" . INIT::$HTTPHOST . INIT::$BASEURL . \"api/docs\", true, 303 ); //Redirect 303 See Other\n die();\n }\n\n $_REQUEST[ 'action' ][0] = strtoupper( $_REQUEST[ 'action' ][ 0 ] );\n\n //PHP 5.2 compatibility, don't use a lambda function\n $func = create_function( '$c', 'return strtoupper($c[1]);' );\n\n $_REQUEST[ 'action' ] = preg_replace_callback( '/_([a-z])/', $func, $_REQUEST[ 'action' ] );\n $_POST[ 'action' ] = $_REQUEST[ 'action' ];\n\n //set the log to the API Log\n Log::$fileName = 'API.log';\n\n }\n\n //Default : catController\n $action = ( isset( $_POST[ 'action' ] ) ) ? $_POST[ 'action' ] : ( isset( $_GET[ 'action' ] ) ? $_GET[ 'action' ] : 'cat' );\n $className = $action . \"Controller\";\n\n //Put here all actions we want to be performed by ALL controllers\n require_once INIT::$MODEL_ROOT . '/queries.php';\n\n return new $className();\n\n }", "title": "" }, { "docid": "c167b1ad8a774d33f321682f8bf85138", "score": "0.58256966", "text": "public function createEndpoint()\n {\n $stack = $this->getMiddleware(Controller\\CreateActionController::class);\n $this->app->post(\"/{$this->name}\", $stack, \"{$this->name}.create\");\n return $this;\n }", "title": "" }, { "docid": "441ddd8ff482b1f4a290fc202d094f4f", "score": "0.5820733", "text": "public function __construct(\\Jazzee\\Interfaces\\AdminController $controller);", "title": "" }, { "docid": "ab1cb66e4ea5f6709ca6b9444df42925", "score": "0.5819755", "text": "public function __construct () \r\n\t\t{\r\n\t\t\t// Get the controller values, action and parameter from URL and set class properties.\r\n\t\t\t$this->get_url_data();\r\n\r\n\t\t\t/**\r\n\t\t\t * Check if controller exists.\r\n\t\t\t * If not add the standard controller (controllers/home-controller.php) and call index() method.\r\n\t\t\t*/\r\n\t\t\tif ( ! $this->controlador )\r\n\t\t\t{\r\n\t\t\t\t// Add the standard controller\r\n\t\t\t\trequire_once ABSPATH . '/controllers/home-controller.php';\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * Generate controller object \"home-controller.php\"\r\n\t\t\t\t * This controller should have a class called HomeController\r\n\t\t\t\t*/\r\n\t\t\t\t$this->controlador = new HomeController();\r\n\r\n\t\t\t\t// Call index() method\r\n\t\t\t\t$this->controlador->index();\r\n\t\t\t\treturn;\t\t\t\r\n\t\t\t} // ! $this->controlador\r\n\r\n\t\t\t// If controller doesn't exist, nothing happens\r\n\t\t\tif ( ! file_exists( ABSPATH . '/controllers/' . $this->controlador . '.php' ) ) \r\n\t\t\t{\r\n\t\t\t\t// Page not found\r\n\t\t\t\trequire_once ABSPATH . $this->not_found;\r\n\t\t\t\treturn;\r\n\t\t\t} // file_exists\r\n\r\n\t\t\t// Include controller file\r\n\t\t\trequire_once ABSPATH . '/controllers/' . $this->controlador . '.php';\r\n\r\n\t\t\t/**\r\n\t\t\t * Remove invalid characters from controller name to generate class name.\r\n\t\t\t * e.g: If file name is \"news-controller.php\", the class should be named NewsController.\r\n\t\t\t*/\r\n\t\t\t$this->controlador = preg_replace( '/[^a-zA-Z]/i', '', $this->controlador );\r\n\r\n\t\t\t// If controller's class doesn't exist, nothing happens\r\n\t\t\tif ( ! class_exists( $this->controlador ) ) \r\n\t\t\t{\r\n\t\t\t\t// Page not found\r\n\t\t\t\trequire_once ABSPATH . $this->not_found;\r\n\t\t\t\treturn;\r\n\t\t\t} // class_exists\r\n\r\n\t\t\t// Generate controller class's object and send the parameters\r\n\t\t\t$this->controlador = new $this->controlador( $this->parametros );\r\n\r\n\t\t\t// Remove invalid characters fromethod name.\r\n\t\t\t$this->acao = preg_replace( '/[^a-zA-Z]/i', '', $this->acao );\r\n\r\n\t\t\t// If the method exists, run it and send the parameters\r\n\t\t\tif ( method_exists( $this->controlador, $this->acao ) )\r\n\t\t\t{\r\n\t\t\t\t$this->controlador->{$this->acao}( $this->parametros );\r\n\t\t\t\treturn;\r\n\t\t\t} // method_exists\r\n\r\n\t\t\t// Without action, calls index method\r\n\t\t\tif ( ! $this->acao && method_exists( $this->controlador, 'index' ) ) \r\n\t\t\t{\r\n\t\t\t\t$this->controlador->index( $this->parametros );\t\t\r\n\t\t\t\treturn;\r\n\t\t\t} // ! $this->acao \r\n\r\n\t\t\t// Page not found\r\n\t\t\trequire_once ABSPATH . $this->not_found;\r\n\t\t\treturn;\r\n\t\t}", "title": "" }, { "docid": "34844035a0c313ec42e7eaf1afa3065d", "score": "0.58110505", "text": "public function setupController()\n {\n \t$serviceLocator = $this->getApplicationServiceLocator();\n \t\n $this->setController(new ComponentsController( $serviceLocator ));\n $this->getController()->setServiceLocator( $serviceLocator );\n $this->setRequest(new Request());\n $this->setRouteMatch(new RouteMatch(array('controller' => '\\UIComponents\\Controller\\Components', 'action' => 'index')));\n $this->setEvent(new MvcEvent());\n $config = $serviceLocator->get('Config');\n $routerConfig = isset($config['router']) ? $config['router'] : array();\n $router = HttpRouter::factory($routerConfig);\n $this->getEvent()->setRouter($router);\n $this->getEvent()->setRouteMatch($this->getRouteMatch());\n $this->getController()->setEvent($this->getEvent());\n $this->setResponse(new Response());\n \n $this->setZfcUserValidAuthMock();\n }", "title": "" }, { "docid": "a5957a33fd679962035a8954188adc3d", "score": "0.5803588", "text": "public function testCreateTheControllerClass()\n {\n $controller = new DiceGame();\n $this->assertInstanceOf(\"\\Ampheris\\ampController\\DiceGame\", $controller);\n }", "title": "" }, { "docid": "3c8672a4ab44565b758888a22784fc6a", "score": "0.58019835", "text": "private function _loadExistingController() {\n $file = $this->_controllerPath . $this->_url[1] . '.php';\n \n if (file_exists($file)) {\n require $file;\n $this->_controller = new $this->_url[1];\n $this->_controller->loadModel($this->_url[1], $this->_modelPath);\n } else {\n $this->_error();\n }\n }", "title": "" }, { "docid": "8ed601196501353ac907825ec55208f4", "score": "0.5797926", "text": "protected function getAuthController(): AuthController\n {\n return new AuthCtrl();\n }", "title": "" }, { "docid": "35c04f36e6686376a85a41edc2a73614", "score": "0.57961756", "text": "public function run()\n {\n $url = self::parseUrl(); // Get sanitized url array\n\n if (file_exists(Path::CONTROLLER_PATH . ucfirst($url[0]) . self::CONTROLLER . \".php\")) {\n $this->controller = ucfirst($url[0]) . self::CONTROLLER; // Capitalize firts letter of controller file\n unset($url[0]); // Remove controller name from url\n }\n \n // Create a new instance of founded controller.\n $className = $this->namespace . $this->controller;\n $this->controller = new $className;\n\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]); // Remove method name from url\n }\n }\n\n $this->params = $url ? array_values($url) : [];\n\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "title": "" }, { "docid": "5404dfc85e5adc922cf24c054703a005", "score": "0.57896876", "text": "public static function getController()\n {\n return self::$instance;\n }", "title": "" }, { "docid": "fc9c9115cba804e7db3b3d49bf5e7a27", "score": "0.5785685", "text": "public function create(){\n\t\t//non-cli request\n\t}", "title": "" }, { "docid": "9078992e89b7bb474dff25ce94989df2", "score": "0.5785085", "text": "public static 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": "f5f543afe38b9e29fb7131e5b7ce724f", "score": "0.5768897", "text": "public static function getController ()\n {\n self::getInstance();\n return self::$_controller;\n }", "title": "" }, { "docid": "06e437b3d8f0ef39c9c2664758c0c1ed", "score": "0.5759767", "text": "public function setController($val)\n {\n $this->_propDict[\"controller\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "b327f30a2114560543450f05e31a181b", "score": "0.57568383", "text": "public function __construct()\n\t\t{\n\t\t\t$this->Controller = $this->getController().'Controller';\n\n\t\t\t// On inclut le model de la class controller\n\t\t\t$model = $this->getController().'Model';\n\t\t\t// on test que le fichier model existe\n\t\t\tif(file_exists(ROOT_PAGES.$this->getController().__DS__.$model.'.php'))\n\t\t\t{\n\t\t\t\tinclude ROOT_PAGES.$this->getController().__DS__.$model.'.php';\t\n\t\t\t\t$this->$model = new $model($this->getController());\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "4b21a26d8fd938d2bfbcd330533a6d54", "score": "0.57491434", "text": "public function create(Request $request){\n $ProductController = BuyMakeProduct::create($request->all());\n return view('welcome');\n }", "title": "" }, { "docid": "4646ca16c9933666e66043139537df93", "score": "0.574532", "text": "function UserController() // constructor\n {\n }", "title": "" }, { "docid": "4970bdf134efda6be8fc94534eec2ec8", "score": "0.5742138", "text": "protected function handleController() {\n $c = Config::getInstance();\n \n $controllerName = $c->getControllerName();\n $action_name = $c->getActionName();\n if (!empty($_GET[$controllerName])) {\n $controller = $_GET[$controllerName];\n } else {\n $controller = \"home\"; // If any controller, this is the default.\n }\n\n $class = ucfirst($controller) . 'Controller';\n $c = new $class();\n $c->setup();\n }", "title": "" }, { "docid": "0a7d4148e0bb3ee841aa635d286b1157", "score": "0.57387894", "text": "public function __construct() {\n $url = $this->getUrl();\n\n // Check for 1st part if the url: localhost/mm/pages\n if (isset($url[0])) {\n\n // Prepare the class name\n $controller = ucwords(strtolower($url[0]));\n\n // Check if controller exists\n if (file_exists(\"../app/controllers/\" . $controller . \".php\")) {\n\n // If exists, set as controller\n $this->currentController = $controller;\n\n // Unset the first word\n unset($url[0]);\n }\n }\n\n // Require the controller\n require_once \"../app/controllers/\" . $this->currentController . \".php\";\n\n // Instantiate controller class\n $this->currentController = new $this->currentController;\n\n // Check for 2nd part if the url: localhost/mm/pages/about\n if (isset($url[1])) {\n\n // Prepare the method name\n $method = strtolower($url[1]);\n\n // check if methed exits in the currentController\n if (method_exists($this->currentController, $method)) {\n\n $this->currentMethod = $method;\n\n // Unset the second word\n unset($url[1]);\n }\n }\n\n // Move other params from URL to params array\n $this->params = $url ? array_values($url) : [];\n call_user_func_array([$this->currentController, $this->currentMethod], $this->params);\n }", "title": "" }, { "docid": "4b83dec6b24f4f923c1ce547a3d9c6db", "score": "0.57330596", "text": "public function GenerateController()\n {\n $fileName2='../application/controller/'.$this->className.\"sController.php\";\n\n $fn=fopen($fileName2,'w') or die(\"can't open file\");\n $stringData=\"<?php \\n \\n require_once('controller.php');\\n\";\n\n fwrite($fn,$stringData);\n $string=\"\\n if(isset($\".\"_REQUEST['\".\"action\".\"'])){\\n $\".\"controller_templet=new Controller($\".\"_REQUEST['action']);\\n\\t if($\".\"controller_templet->getAction()=='view'){\\n\";\n $string.=\"\\t\\t $\".$this->className.\"=new \".$this->className.\"Service();\\n \\t\\t echo json_encode( $\".$this->className.\"->view());\\n }\";\n fwrite($fn,$string);\n //fwrite($fn,$stringData);\n $string2=\"\\t else if($\".\"controller_templet->getAction()=='add'){\\n\";\n $string2.=\"\\t \\t $\".$this->className.\"=new \".$this->className.\"Service();\\n \";\n fwrite($fn,$string2);\n //set varible\n for($i=1;$i<sizeof($this->table_names);$i++){\n\n $string3=\"\\t \\t $\".$this->className.\"->set\".$this->table_names[$i].\"($\".\"_REQUEST['\".$this->table_names[$i].\"']);\\n\";\n fwrite($fn,$string3);\n }\n $string4=\"\\t \\t echo json_encode( $\".$this->className.\"->save());\\n }\\n else if($\".\"controller_templet->getAction()=='edit'){\\n \\t \\t $\".$this->className.\"=new \".$this->className.\"Service();\\n \";\n fwrite($fn,$string4);\n for($i=0;$i<sizeof($this->table_names);$i++){\n\n $string3=\"\\t \\t $\".$this->className.\"->set\".$this->table_names[$i].\"($\".\"_REQUEST['\".$this->table_names[$i].\"']);\\n\";\n fwrite($fn,$string3);\n }\n $string4=\"\\t \\t echo json_encode( $\".$this->className.\"->update()); }\\n else if($\".\"controller_templet->getAction()=='delete'){\\n \\t \\t $\".$this->className.\"=new \".$this->className.\"Service();\\n \";\n fwrite($fn,$string4);\n $string3=\"\\t \\t $\".$this->className.\"->set\".$this->table_names[0].\"($\".\"_REQUEST['\".$this->table_names[0].\"']);\\n\";\n fwrite($fn,$string3);\n $string5=\"echo json_encode( $\".$this->className.\"->delete()); \\n}else if($\".\"controller_templet->getAction()=='viewCombo'){ \\n\\t\\t $\".$this->className.\"=new \".$this->className.\"Service();\\n \\t\\t echo json_encode( $\".$this->className.\"->viewConbox());\\n\\t\\t} \\n} ?>\";\n fwrite($fn,$string5);\n fclose($fn);\n }", "title": "" } ]
19f64fd895584ff7fa3c1e16a01854ca
Send an email with a link to activate the users' account
[ { "docid": "91a688c71f681c923a3a32f63d326fc7", "score": "0.0", "text": "function sendRecoverPasswordEmail() {\n\t\t$session = SessionWrapper::getInstance(); \n\t\t$template = new EmailTemplate(); \n\t\t// create mail object\n\t\t$mail = getMailInstance(); \n\n\t\t// assign values\n\t\t$template->assign('firstname', $this->getFirstName());\n\t\t// just send the parameters for the activationurl, the actual url will be built in the view \n\t\t// $template->assign('resetpasswordurl', array(\"controller\"=> \"user\",\"action\"=> \"resetpassword\", \"actkey\" => $this->getActivationKey(), \"id\" => encode($this->getID())));\n\t\t$viewurl = $template->serverUrl($template->baseUrl('user/resetpassword/id/'.encode($this->getID()).\"/actkey/\".$this->getActivationKey().\"/\")); \n\t\t$template->assign('resetpasswordurl', $viewurl);\n\t\t\n\t\t$mail->clearRecipients();\n\t\t$mail->clearSubject();\n\t\t$mail->setBodyHtml('');\n\t\t\n\t\t// configure base stuff\n\t\t$mail->addTo($this->getEmail());\n\t\t// set the send of the email address\n\t\t$mail->setFrom(getDefaultAdminEmail(), getDefaultAdminName());\n\t\t\n\t\t$mail->setSubject($this->translate->_('profile_email_subject_recoverpassword'));\n\t\t// render the view as the body of the email\n\t\t$mail->setBodyHtml($template->render('recoverpassword.phtml'));\n\t\t// debugMessage($template->render('recoverpassword.phtml')); \n\t\ttry {\n\t\t\t$mail->send();\n\t\t} catch (Exception $e) {\n\t\t\t$session->setVar(ERROR_MESSAGE, 'Email notification not sent! '.$e->getMessage());\n\t\t}\n\t\t\n\t\t$mail->clearRecipients();\n\t\t$mail->clearSubject();\n\t\t$mail->setBodyHtml('');\n\t\t$mail->clearFrom();\n\t\t\n\t\treturn true;\n }", "title": "" } ]
[ { "docid": "c13873e8efefb2126fef1eb35c0989d2", "score": "0.8345931", "text": "public function sendActivationEmail()\n {\n $url = 'http://'.$_SERVER['HTTP_HOST'].'/signup/activate/'.$this->activation_token;\n\n $text = View::getTemplate('Signup/activation_email.txt', ['url' => $url]);\n $html = View::getTemplate('Signup/activation_email.html', ['url' => $url]);\n\n Mail::send(Config::BRAND_NAME, $this->email, $this->name, \"Account Activation\", $text, $html);\n }", "title": "" }, { "docid": "7139312660c9b5c7f89f272fd5d53fd2", "score": "0.81368256", "text": "public function sendActivationEmail(): void\n {\n $url = 'http://' . $_SERVER['HTTP_HOST'] . '/signup/activate/' . $this->activation_token;\n\n $html_body = View::getTemplate('Signup/activation-email.html', [\n 'url' => $url,\n 'username' => $this->username\n ]);\n $plaintext_body = View::getTemplate('Signup/activation-email.txt', [\n 'url' => $url,\n 'username' => $this->username\n ]);\n\n Mail::send($this->email, 'Account activation', $html_body, $plaintext_body);\n }", "title": "" }, { "docid": "547af11cc372b43f58dcbf2eaa7bdf80", "score": "0.81339395", "text": "public function activation_link()\n {\n $from = \"[email protected]\";\n $to = \"\";\n $subejct = \"\";\n $message = \"\";\n \n if($this->send_email($from, $to, $subejct, $message) == TRUE)\n {\n $data['icon'] = \"<i class='fa fa-envelope-o'></i>\";\n $data['title'] = \"<h4>Email was successfully sent to you.</h4>\";\n $data['content'] = \"<p>Visit your emails and click on the link sent to acivate your account.</p>\";\n }\n else\n {\n $data['icon'] = \"<i class='fa fa-times-circle-o error-color'></i>\";\n $data['title'] = \"<h4>Email could not be sent.</h4>\";\n $data['content'] = \"<p>An error occrued while sending a confirmation email.</p>\";\n }\n \n $this->load->view(\"app/templates/auth-header\");\n $this->load->view(\"app/feedback/feedback\", $data);\n $this->load->view(\"app/templates/auth-footer\");\n }", "title": "" }, { "docid": "257f528c5938f723c6f50b1d7f769e69", "score": "0.7894723", "text": "private function send_activation_link($user_id) {\r\n $this->load->library('email');\r\n\t\t$config['mailtype'] = 'html';\r\n\t\t\r\n\t\t$user = $this->users->get_user($user_id);\r\n\t\t$this->email->initialize($config);\r\n\r\n $this->email->from(EMAIL_NO_REPLY, EMAIL_NO_REPLY_SENDER);\r\n $this->email->to($user->email);\r\n $this->email->subject('Activate your account');\r\n\t\t$msg = $this->load->view('layouts/email', array('view' => 'emails/activation_link','user' => $user), TRUE);\r\n\t\t$this->email->message($msg);\r\n\t\t\r\n\t\t#$this->email->message();\r\n\t\t\r\n\t\t\r\n $this->email->send();\r\n\t\t#echo $site_url;\r\n #redirect('login/check_your_email');\r\n }", "title": "" }, { "docid": "fc495a41211e498940f38b02688a979d", "score": "0.7775399", "text": "public function emailActivation($user) {\t\t\r\n\t\t$passwd = $user->getPassword();\r\n\t\t$timestamp = $user->getRegistrationTimeStamp();\r\n\t\t$emailAddress = $user->getEmail();\r\n\t\t\r\n\t\t$host = $_SERVER['HTTP_HOST'];\r\n\t\t$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\\\');\r\n\t\t$extra = \"activate.php?hash=\".md5($passwd)\r\n\t\t\t\t.\"&stamp=\".base64_encode($timestamp);\r\n\t\t\r\n\t\t$url = \"http://$host$uri/$extra\";\r\n\t\t\r\n\t\t//send out email with link to activate.php?hash=[password]&stamp=[timestamp]\r\n\t\t$subject = \"Complete your registration with Hypercities\";\r\n\t\t$message = \"<html>\"\r\n\t\t\t\t. \"To complete your registration with Hypercities,\"\r\n\t\t\t\t. \"click on the following link.<br><br>\"\r\n\t\t\t\t. \"<a href=\\\"$url\\\">Activate my account</a><br><br>\"\r\n\t\t\t\t. \"or copy and paste the following URL in to your browser.<br><br>\"\r\n\t\t\t\t. $url. \"<br><br>Thanks!<br>The Hypercities Team<br>\"\r\n\t\t\t\t. \"</html>\";\r\n\t\t\r\n\t\treturn $this->email($emailAddress, $subject, $message);\r\n\t}", "title": "" }, { "docid": "c437b3c4e305900da0bab0b3e728a2e5", "score": "0.7736789", "text": "public function sendActivationCode() {\n $username = $this->user->getUsername();\n $email = $this->user->getEmail();\n $activationCode = $this->user->getActive();\n $this->mailer->sendActivationCode($username, $email, $activationCode);\n }", "title": "" }, { "docid": "109ae7b3f02502af1b0b69f57712e86e", "score": "0.7702363", "text": "public function activateAccountAction(){\n $email = $_GET['email'] ?? '';\n View::renderBlade('login/resend_activation_link',['email'=>$email]);\n }", "title": "" }, { "docid": "246565dfec9b4519bcbc83d9b8e6050f", "score": "0.76923317", "text": "private function _sendActivationEmail($token)\n {\n // Note hardcoded protocol\n $url = 'http://'.$_SERVER['HTTP_HOST'].'/NSBA/activate_account.php?token=' . $token;\n\n $body = <<<EOT\n\n<p>Please click on the following link to activate your account.</p>\n\n<p><a href=\"$url\">$url</a></p>\n\nEOT;\n\n Mail::send($this->firstName, $this->email, 'Activate account', $body);\n }", "title": "" }, { "docid": "9197f81b124eb98da8a171d7dbdc8248", "score": "0.76137185", "text": "private function sendActivationMail()\n {\n $this->setForgotPasswordToken();\n return Yii::$app->mailer->compose([\n 'html' => 'passwordResetToken-html',\n 'text' => 'passwordResetToken-text',\n ], [\n 'user' => $this,\n 'resetLink' => Yii::$app->urlManager->createAbsoluteUrl(['site/reset-password','token' => $this->password_reset_token,])\n ])\n ->setFrom([Yii::$app->params['adminEmail'] => Yii::$app->name . ' robot'])\n ->setTo($this->email)\n ->setSubject(Yii::$app->name . ' ' . Yii::t('app', 'Account Aktivierung'))\n ->send();\n }", "title": "" }, { "docid": "da49237571cd4387ebaa794c8dc3adf2", "score": "0.759444", "text": "public function activateemailAction()\n {\n $this->_getHelper()->activateEmail();\n }", "title": "" }, { "docid": "4c15cdedf56c22b1166dc0ea09bdc44d", "score": "0.75186056", "text": "function activationLink($toEmail,$toUsername,$user_id)\n\t\t{\n\t\t\t$activationMessage = $this->link.'email-verification.php?activated=true&uid='.$user_id.'&mail='.$toEmail;\n\t\t\t$subject = 'Email Verification Of Your Account';\n\t\t\t$htmlBody = '<p>To verify your account please click on the following link.. </p>\n\t\t\t\t\t\t\t<p>'.$activationMessage.'</p>\n\t\t\t\t\t\t\t<p>Thanks And Regards</p>\n\t\t\t\t\t\t\t<p>CygnaTech Team</p>';\n\t\t\t\n\t\t\t//calling firemail\n\t\t\t$mailSent = $this->fireMail($toEmail,$toUsername,$subject,$htmlBody);\n\t\t\treturn $mailSent;\n\t\t}", "title": "" }, { "docid": "fd5774cf6c7a88bae79e7a1bde2ca6a4", "score": "0.74844605", "text": "public function send_activateaccount($email, $activate_token) {\n $this->db->from('UserInfo');\n $this->db->where('email', $email);\n $records = $this->db->get()->row();\n if (empty($records)) {\n return \"email_not_exist\";\n } else {\n $data = array(\n 'encoded_email' => rawurlencode($email),\n 'activate_token' => $activate_token\n );\n \n $config = $this->email_config();\n \n $this->load->library('email', $config);\n $this->email->initialize($config);\n $this->email->set_newline(\"\\r\\n\");\n $this->email->from($config['smtp_user'], 'CytoInformatics');\n \n $this->email->to($email);\n $this->email->subject('Activate Your Account - CytoInformatics');\n $this->email->message($this->load->view('email_activateaccount', $data, true));\n if($this->email->send()) {\n return \"success\";\n } else {\n return \"failed_to_send\";\n }\n \n// $this->email->send();\n// echo $this->email->print_debugger();\n }\n }", "title": "" }, { "docid": "956ce115c87e3faee6260442dbfc1274", "score": "0.74372977", "text": "function sendActivation($row) {\n $url_activation = \"http://\" . $_SERVER['HTTP_HOST'] . Url_Create('activation', 'act=' . md5($row['TickleID']));\n $mail_content = \"<p>\" . $row['FirstName'] . \", thank you for creating a TickleTrain account!</p>\n <p>Please <a href='\" . $url_activation . \"'>click</a> the link below to authenticate your account.<br/>\n <a href='\" . $url_activation . \"'>\" . $url_activation . \"</a></p>\n <br/>\n <p><b>Username: \" . $row['UserName'] . \"</b><br/>\n <b>Password: ********</b></p>\n <p>Once you have logged in, watch our <i>Getting Started video</i> and you'll be up and running in minutes. Be sure and visit your Settings page to setup your email account and signature. We look forward to putting your emails to work for you.</p>\n <p>Send it and forget it!<br><a href=\\\"www.tickletrain.com\\\">www.tickletrain.com</a></p>\"; \n return SendMail($row['EmailID'], \"[email protected]\", \"Welcome to TickleTrain\", $mail_content, 'mail', true, array('[email protected]', '[email protected]'));\n}", "title": "" }, { "docid": "b8271c6f67ade898d3afdc6af91d7c79", "score": "0.74224377", "text": "public function sendUserActivation($user) {\n $mail=new P2Mail;\n $mail->to=$user->eMail;\n $mail->from=Yii::app()->params['adminEmail'];\n\n $mail->body=$this->renderMail('activate',array(\n 'mail'=>$mail,\n 'user'=>$user,\n ),true);\n $mail->send();\n }", "title": "" }, { "docid": "ab026526392bf5d2a5bbf57f07b9946a", "score": "0.7415205", "text": "function sendActivation() {\n\t\t$userID = getRequest('user', 'integer');\n\t\t$user = new user($userID);\n\t\t$template = new template;\n\t\tif (!$user->exists()) {\n\t\t\taddError('invalid user account');\n\t\t} elseif ($user->get('status') != 'new') {\n\t\t\taddError('the user account has already been activated');\n\t\t} else {\n\t\t\t$userActivation = $user->getActivationRecord();\n\t\t\t$hashstring = $user->get('userID').$user->get('email').time();\n\t\t\t$userActivation->set('activationCode', md5($hashstring));\n\t\t\tif ($userActivation->exists()) {\n\t\t\t\t$userActivation->set('expiration', date('Y-m-d', strtotime('1 week')));\n\t\t\t\t$userActivation->set('activated', 0);\n\t\t\t\t$set = $userActivation->update();\n\t\t\t} else {\n\t\t\t\t$userActivation->set('userID', $user->get('userID'));\n\t\t\t\t$set = $userActivation->save();\n\t\t\t}\n\t\t\tif ($set) {\n\t\t\t\t$template->assignClean('user', $user->fetchArray());\n\t\t\t\t$template->assignClean('activationCode', $userActivation->get('activationCode'));\n\t\t\t\tif (!usersController::sendActivationEmail($template, $user->get('email'))) {\n\t\t\t\t\taddSuccess('your activation code has been emailed to you');\n\t\t\t\t} else {\n\t\t\t\t\taddError('an error occurred while sending your activation code, please try again later');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\taddError('an error occurred while setting the activation code, please try again later');\n\t\t\t}\n\t\t}\n\t\t$template->addMeta('<meta name=\"robots\" content=\"noindex, nofollow\" />', 'robots');\n\t\t$template->addMeta('<meta name=\"googlebot\" content=\"noindex, nofollow\" />', 'googlebot');\n\t\t$template->addStyle('/css/'.systemSettings::get('SOURCEDIR').'/site/main.css');\n\t\t$template->addScript('/js/'.systemSettings::get('SOURCEDIR').'/site/main.js');\n\t\t$template->assignClean('_TITLE', systemSettings::get('SITENAME').' Users');\n\t\t$template->assignClean('hotTitles', gameTitlesController::getTitles('weight'));\n\t\t$template->assignClean('loggedin', userCore::isLoggedIn());\n\t\t$template->setSystemDataGateway();\n\t\t$template->getSystemMessages();\n\t\t$template->display('user/activation.htm');\n\t}", "title": "" }, { "docid": "0bb2aa3a82bf14895a58dc042251068a", "score": "0.73678607", "text": "public function sendActivationEmail($user)\n\t\t{\n\t\t\trequire 'vendor/autoload.php';\n\n\t\t\t$sendgrid_apikey = NotificationParams::EMAIL_PROVIDER_API_KEY;\n\t\t\t$sendgrid = new SendGrid($sendgrid_apikey);\n\n\t\t\t$url = 'https://api.sendgrid.com/';\n\t\t\t$pass = $sendgrid_apikey;\n\n\t\t\t$params = array(\n\t\t\t\t \"to\" => $user->user_email,\n\t\t\t\t \"formname\" => \"Yobichain\",\n\t\t\t\t\"from\" => \"[email protected]\",\n\t\t\t\t\"subject\" => \"Account activation <> \" . $user->user_name,\n\t\t\t\t\"html\" => $this->email_top . \n\t\t\t\t\t\t\t\"<p>Hi \" . $user->user_name.\"!<br/><br/>Welcome to Yobichain. Your details are:</p>\n\t\t\t\t\t\t\t\t<table rules='all' style='border-color: #dfd9c2;' cellpadding=10>\n\t\t\t\t\t\t\t\t\t<tr><td>Name:</td><td>\" . $user->user_name.\"</td></tr>\n\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t<p>If the details are correct, click the 'Activate account' button below and your login credentials will be emailed to you.</p>\n\t\t\t\t\t\t\t<p style='padding:3px;'><br/><a href='\" . $this->base_url.\"/user_activate.php?user_email=\" . urlencode($user->user_email).\"&random=\" . $user->random.\"' style='font-family: Helvetica, Arial, sans-serif; font-size: 14px; color: #ffffff; font-weight: bold; border-radius: 6px; background: #427db5; border-style:solid; border-color:#417db4; border-width:1px; text-align:center; padding-top:11px; padding-bottom:11px; padding-left:22px; padding-right:22px; text-decoration: none; border-top-color:#417db4; border-bottom-color:#9A6E19; border-left-color:#C59B29; border-right-color:#C59B29;'>Activate account</a><br/>&nbsp;<br/>&nbsp;</p>\n\t\t\t\t\t\t\t<p>If you are unable to click the button above, copy paste this link in your browser and press Enter: $this->base_url/user_activate.php?user_email=\" . urlencode($user->user_email).\"&random=\" . $user->random.\"</p><br/>\n\t\t\t\t\t\t\t\" . $this->email_bottom,\n\t\t\t);\n\t\t\t\t\n\t\t\t$request = $url.'api/mail.send.json';\n\n\t\t\t//Generate curl request\n\t\t\t$session = curl_init($request);\n\t\t\t//Tell PHP not to use SSLv3 (instead opting for TLS)\n\t\t\tcurl_setopt($session, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2);\n\t\t\tcurl_setopt($session, CURLOPT_HTTPHEADER, array('Authorization: Bearer ' . $sendgrid_apikey));\n\t\t\t//Tell curl to use HTTP POST\n\t\t\tcurl_setopt ($session, CURLOPT_POST, true);\n\t\t\t//Tell curl that this is the body of the POST\n\t\t\tcurl_setopt ($session, CURLOPT_POSTFIELDS, $params);\n\t\t\t//Tell curl not to return headers, but do return the response\n\t\t\tcurl_setopt($session, CURLOPT_HEADER, false);\n\t\t\tcurl_setopt($session, CURLOPT_RETURNTRANSFER, true);\n\n\t\t\t//obtain response\n\t\t\t$response = curl_exec($session);\n\t\t\tcurl_close($session);\n\n\t\t\t//print everything out\n\t\t\tprint_r($response);\n\t\t}", "title": "" }, { "docid": "71beb7278c9fcc7041e7c9f7cefb8c2f", "score": "0.7355147", "text": "function sendActivationEmail($activationLink,$userEmail){\n\t\t// the message\n\t\t$msg = \"Welcome Sequence Builder...<br/>If you registered in the coolest website ever *SEQUENCE BUILDER*, click the following link to activate your account <br/> $activationLink <br/>Otherwise, ignore our email please!\";\n\t\t// use wordwrap() if lines are longer than 70 characters\n\t\t$msg = wordwrap($msg,70);\n\t\t// send email\n\t\tmail($userEmail,\"Activation Email\",$msg);\n\t}", "title": "" }, { "docid": "435a9d73eebd9334655243a5d8c2dc3e", "score": "0.73529303", "text": "function send_activation_email($conn) {\n // token is hash of current timestamp\n $token = password_hash(date_timestamp_get(date_create()), PASSWORD_DEFAULT);\n store_token_in_db($token, $conn);\n\n // use SendGrid to send email\n $sendgrid = new SendGrid(getenv(\"SENDGRID_USERNAME\"),\n getenv(\"SENDGRID_PASSWORD\"));\n\n $message = new SendGrid\\Email();\n $message->addTo($_POST[\"email\"])\n ->setFrom(\"[email protected]\")\n ->setSubject(\"Activate Your PC Showcase Account\")\n ->setText(\"Visit this link to activate your account:\n http://pc-showcase.herokuapp.com/activate_account.php?email=\" .\n $_POST[\"email\"] . \"&token=$token\")\n ->setHtml(\"<html>\n <head>\n <title>PC Showcase Account Activation</title>\n </head>\n <body>\n Click\n <a href='http://pc-showcase.herokuapp.com/activate_account.php?email=\" .\n $_POST[\"email\"] . \"&token=$token'>here</a>\n to activate your account.\n </body>\n </html>\");\n\n $sendgrid->send($message);\n}", "title": "" }, { "docid": "429bd102478965d1a9d359f9f482504d", "score": "0.73518586", "text": "public function createTokenAndSendActivationCode()\n {\n (new UserActivation())->sendActivationMail($this);\n }", "title": "" }, { "docid": "6462efa82e280db3bdc725f140877e83", "score": "0.7334104", "text": "public function sendActivationEmail()\n {\n return $this->notify(new AccountActivation($this));\n }", "title": "" }, { "docid": "bf53784503eaf7d04c92e01a873af6db", "score": "0.731767", "text": "public function sendActivation($user, $email, $pass, $token, $config){\n $from = \"From: \".$config['EMAIL_FROM_NAME'].\" <\".$config['EMAIL_FROM_ADDR'].\">\";\n $subject = $config['SITE_NAME'].\" - Welcome!\";\n $body = $user.\",\\n\\n\"\n .\"Welcome! You've just registered at \".$config['SITE_NAME'].\" \"\n .\"with the following username:\\n\\n\"\n .\"Username: \".$user.\"\\n\\n\"\n .\"Please visit the following link in order to activate your account: \"\n .$config['WEB_ROOT'].\"register?mode=activate&user=\".urlencode($user).\"&activatecode=\".$token.\" \\n\\n\"\n .$config['SITE_NAME'];\n\n return mail($email,$subject,$body,$from);\n }", "title": "" }, { "docid": "dace00e9ca2fbddaf44455a4fee575bf", "score": "0.731465", "text": "public function send_act_email()\n\t{\n\t\tif ($this->edit_extra && !$this->userdata['u_activated'] && $this->userdata['u_confirm_hash'] && $this->userdata['u_confirm_hash'] != '.')\n\t\t{\n\t\t\t$mail = new Notify_mail();\n\t\t\t$mail->AddAddress($this->userdata['u_email']);\n\t\t\t$mail->Subject = sprintf(Fsb::$session->lang('subject_register'), Fsb::$cfg->get('forum_name'));\n\t\t\t$mail->set_file(ROOT . 'lang/' . Fsb::$cfg->get('default_lang') . '/mail/register_reconfirm.txt');\n\t\t\t$mail->set_vars(array(\n\t\t\t\t'FORUM_NAME' =>\t\tFsb::$cfg->get('forum_name'),\n\t\t\t\t'LOGIN' =>\t\t\t$this->userdata['u_login'],\n\t\t\t\t'U_CONFIRM' =>\t\tFsb::$cfg->get('fsb_path') . '/index.' . PHPEXT . '?p=login&id=' . $this->id . '&confirm=' . urlencode($this->userdata['u_confirm_hash']),\n\t\t\t\t'U_FORUM' =>\t\tFsb::$cfg->get('fsb_path'),\n\t\t\t));\n\t\t\t$mail->Send();\n\t\t\t$mail->SmtpClose();\n\t\t}\n\n\t\tLog::user($this->id, 'send_act_email');\n\t\tHttp::redirect(ROOT . 'index.' . PHPEXT . '?p=modo&amp;module=user&amp;id=' . $this->id);\n\t}", "title": "" }, { "docid": "cbafaac5a2a0494f221f08409b720d36", "score": "0.71776545", "text": "function send_email_activation($useremail)\n {\n global $ilance, $ilconfig, $phrase, $ilpage;\n $sql = $ilance->db->query(\"\n SELECT *\n FROM \" . DB_PREFIX . \"users\n WHERE email = '\" . $ilance->db->escape_string($useremail) . \"'\n AND status = 'unverified'\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql) > 0)\n {\n $res = $ilance->db->fetch_array($sql, DB_ASSOC);\n $member['userid'] = $res['user_id'];\n $link = HTTP_SERVER . $ilpage['registration'] . '?cmd=activate&u=' . $ilance->crypt->three_layer_encrypt($member['userid'], $ilconfig['key1'], $ilconfig['key2'], $ilconfig['key3']);\n $ilance->email->mail = $res['email'];\n $ilance->email->slng = fetch_user_slng($res['user_id']);\n $ilance->email->get('registration_email');\t\t\n $ilance->email->set(array(\n '{{username}}' => $res['username'],\n '{{user_id}}' => $res['user_id'],\n '{{first_name}}' => $res['first_name'],\n '{{last_name}}' => $res['last_name'],\n '{{phone}}' => $res['phone'],\n '{{http_server}}' => HTTP_SERVER,\n '{{site_name}}' => SITE_NAME,\n '{{staff}}' => SITE_EMAIL,\n '{{link}}' => $link,\n ));\n $ilance->email->send();\n return true;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "afe8c83af8217c0fba5dcad194e9a540", "score": "0.715211", "text": "public function resendemail($id=null)\r\n{\r\n $this->User->id = $id;\r\n if($this->User->exists()){\r\n\r\n\t $templateVars = array(); \r\n\t $templateVars['code'] = 'http://' . env('SERVER_NAME') . '/users/activate/' . $id. '/' . $this->User->getActivationHash();\r\n\t $templateVars['name'] = $this->User->field(\"first_name\");\r\n\t $templateVars['subject'] = \"Call Commission - Activation email resend\"; \r\n \r\n\t \r\n\t $this->__sendEmail($templateVars,'sign_up',null,$this->User->field(\"email\"));\r\n\t \r\n\t $this->Session->setFlash('An email has been sent please activate your account then log in .','flash_good');\r\n $this->redirect('login');\r\n }\r\n \r\n \r\n \r\n}", "title": "" }, { "docid": "5c8449651332e9bfa0fd94457d883580", "score": "0.70883447", "text": "public static function authe_activation($user_id) {\n $user = model('user')->get($user_id);\n\n // Setting message\n $link = site_url('auth/activate') . '/' . $user->activation_code;\n $body = get_instance()->load->view('emails/authe/activation', array('link'=>$link), TRUE);\n\n self::send('Account Activation', $body, $user->email);\n }", "title": "" }, { "docid": "8aff0bb5c9a12d939b09ccfe2eb15d70", "score": "0.70791024", "text": "public function sendActivationEmail($user) {\n\n\t$enc_user_id = base64_encode($user->id);\n\t$activation_code = $user->getActivationCode();\n\t$data = [\n\t\t'fullname' => $user->getFullName(),\n\t\t'firstname' => $user->first_name,\n\t\t'usertype' => $user->user_type,\n\t\t'email' => $user->email,\n\t\t'confirmlink' => \"http://Chefmes.com/user/activate/{$enc_user_id}/{$activation_code}\"\n\t];\n\t$this->notificationService->sendEmail($data, NotificationType::SignUpConfirmation);\n }", "title": "" }, { "docid": "1a977027a14eadcc586c771cb7e0ca3d", "score": "0.704929", "text": "public function show(){\n\t\t$url = $_SERVER[\"REQUEST_URI\"];\n\t\t$params = explode(\"/\", $url);\n\t\t$user_id = $params[2];\n\t\t$user = User::find_by(['id' => $user_id]);\n\t\tif(is_null($user_id) || !isset($user_id) || is_null($user)){\n\t\t\t$message = \"Your activation link is wrong\";\n\t\t}else{\n\t\t\t$user->update(['email_confirmed' => true]);\n\t\t\t$message = \"You have successfully activated your account, log in now!\";\n\t\t}\n\t\tload_template(\"views/activation/show.php\", ['message' => $message]);\n\t}", "title": "" }, { "docid": "e6465a64d4c87ed614bee597e794fa4e", "score": "0.7044169", "text": "function activate() {\n\t\t$username = $this->uri->segment(3);\n\t\t$key = $this->uri->segment(4);\n\n\t\t// Activate user\n\t\tif ($this->dx_auth->activate($username, $key)) {\n\t\t\t$this->data['auth_message'] = 'Your account have been successfully activated. '.anchor(site_url($this->dx_auth->login_uri), 'Login');\n\t\t\t$this->load->view($this->dx_auth->activate_success_view, $this->data);\n\t\t} else {\n\t\t\t$this->data['auth_message'] = 'The activation code you entered was incorrect. Please check your email again.';\n\t\t\t$this->load->view($this->dx_auth->activate_failed_view, $this->data);\n\t\t}\n\t}", "title": "" }, { "docid": "617cc3a6323279150b7660998e6650cb", "score": "0.704141", "text": "public function sendActivationCode()\n\t{\n\t\t$user = $this->user;\n\n\t\t$activation_url = $this->app->uri->getRegister('activate', ['user_id' => $user->id, 'code' => $user->activation_code]);\n\t\t$activation_form_url = $this->app->uri->getRegister('activate_form');\n\n\t\t$search = ['{ACTIVATION_URL}', '{ACTIVATION_FORM_URL}', '{ACTIVATION_CODE}'];\n\t\t$replace = [App::e($activation_url), App::e($activation_form_url), App::e($user->activation_code)];\n\n\t\t$this->addSearchReplace($search, $replace);\n\n\t\t$this->app->mail($this->user->email, $this->getString('email_user_activation_code_subject'), $this->getString('email_user_activation_code_message'));\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "7c84310c77b1c88aee4f270c579c76ae", "score": "0.7036797", "text": "public function activateUser($user_id, $activation_key, $activate_by_email = TRUE) {\r\n \r\n }", "title": "" }, { "docid": "faa2caedde829c0e42dcd3602a2b3e0a", "score": "0.70248574", "text": "function notifyActivatedAccount($user) {\n\t\t$this->Email->to = $user['User']['email'];\n\t\t// $this->Email->bcc = array('[email protected]'); \n\t\t$this->Email->subject = 'Активиран акаунт в Opi-bg.com';\n\t\t$this->Email->replyTo = '[email protected]';\n\t\t$this->Email->from = 'No Reply <[email protected]>';\n\t\t$this->Email->template = 'user_activated'; // note no '.ctp'\n\t\t//Send as 'html', 'text' or 'both' (default is 'text')\n\t\t$this->Email->sendAs = 'both'; // because we like to send pretty mail\n\t\t//Set view variables as normal\n\t\t$this->controller->set('user', $user);\n\t\t$this->controller->set('recovery_key', $user['User']['recovery_key']);\n\t\t//Do not pass any args to send()\n\t\t$this->Email->send();\n\t}", "title": "" }, { "docid": "5ed8296ed1923ed4bdaf281fcbe7cdb0", "score": "0.7015142", "text": "public function sendActivationToken()\n {\n $token = md5(str_random(40));\n\n auth()->user()->meta->update([\n 'activation_token' => $token\n ]);\n\n return auth()->user()->notify(new ActivateUserEmail($token));\n }", "title": "" }, { "docid": "1db1c55176c8730b651577a93ce3c1b3", "score": "0.6995714", "text": "function send_email_activation_with_redirect_link($useremail,$redirect)\n {\n global $ilance, $ilconfig, $phrase, $ilpage;\n $sql = $ilance->db->query(\"\n SELECT *\n FROM \" . DB_PREFIX . \"users\n WHERE email = '\" . $ilance->db->escape_string($useremail) . \"'\n AND status = 'unverified'\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql) > 0)\n {\n $res = $ilance->db->fetch_array($sql, DB_ASSOC);\n $member['userid'] = $res['user_id'];\n $link = (isset($redirect)) ? HTTP_SERVER . $ilpage['registration'] . '?redirect=' . urlencode($redirect) . '&cmd=activate&u=' . $ilance->crypt->three_layer_encrypt($member['userid'], $ilconfig['key1'], $ilconfig['key2'], $ilconfig['key3']) : HTTP_SERVER . $ilpage['registration'] . '?cmd=activate&u=' . $ilance->crypt->three_layer_encrypt($member['userid'], $ilconfig['key1'], $ilconfig['key2'], $ilconfig['key3']);\n $ilance->email->mail = $res['email'];\n $ilance->email->slng = fetch_user_slng($res['user_id']);\n $ilance->email->get('registration_email');\t\t\n $ilance->email->set(array(\n '{{username}}' => $res['username'],\n '{{user_id}}' => $res['user_id'],\n '{{first_name}}' => $res['first_name'],\n '{{last_name}}' => $res['last_name'],\n '{{phone}}' => $res['phone'],\n '{{http_server}}' => HTTP_SERVER,\n '{{site_name}}' => SITE_NAME,\n '{{staff}}' => SITE_EMAIL,\n '{{link}}' => $link,\n ));\n $ilance->email->send();\n return true;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "5802617a31a766cebbe0fae684facf68", "score": "0.6987281", "text": "private function sendEmail($user, $code){\n Mail::send('emails.activation', [\n\n 'user' => $user,\n 'code' => $code\n ], function($message) use ($user){\n\n $message -> to ($user->email); \n $message -> subject(\"Hello \" . $user ->first_name , \"here you can activate your account.\");\n\n } );\n\n\n }", "title": "" }, { "docid": "7fb3440977a36b188deaefcb5efdac02", "score": "0.6957222", "text": "function activate() {\n\t\t$activationCode = getRequest('activationCode', 'alphanum');\n\t\t$sql = \"SELECT * FROM `userActivations` WHERE `activationCode` = '\".$activationCode.\"'\";\n\t\t$result = query($sql);\n\t\tif ($result->rowCount > 0) {\n\t\t\t$row = $result->fetchRow();\n\t\t\t$userActivation = new userActivation;\n\t\t\t$userActivation->loadRecord($row);\n\t\t\tif (strtotime($userActivation->get('expiration')) < time()) {\n\t\t\t\t// expired, send new activation\n\t\t\t\taddError('your activation timeframe has expired, a new activation code will be emailed to you');\n\t\t\t\tredirect('/user/activation/action/sendActivation/user/'.$userActivation->get('userID'));\n\t\t\t} elseif (strtotime($userActivation->get('activated'))) {\n\t\t\t\t// already activated\n\t\t\t\taddError('your account has already been activated');\n\t\t\t} elseif ($activationCode == $userActivation->get('activationCode')) {\n\t\t\t\t// activate\n\t\t\t\t$user = new user($userActivation->get('userID'));\n\t\t\t\t$user->set('status', 'active');\n\t\t\t\tif (!$user->update()) {\n\t\t\t\t\taddError('an error has occurred while activating your account, please try again later');\n\t\t\t\t} else {\n\t\t\t\t\taddSuccess('your account has been activated');\n\t\t\t\t\taddSuccess('you may log in with your username and password');\n\t\t\t\t\t$userActivation->set('activated', 'NOW()', false);\n\t\t\t\t\t$userActivation->enclose('activated', false);\n\t\t\t\t\tif (!$userActivation->update()) {\n\t\t\t\t\t\ttrigger_error('Unable to update activation date for user activation record '.$userActivation->get('userActivationID'.' on '.date('Y-m-d H:i:s')), E_USER_NOTICE);\n\t\t\t\t\t}\n\t\t\t\t\tredirect('/');\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\taddError('invalid activation code');\n\t\t}\n\t\t$template = new template;\n\t\t$template->addMeta('<meta name=\"robots\" content=\"noindex, nofollow\" />', 'robots');\n\t\t$template->addMeta('<meta name=\"googlebot\" content=\"noindex, nofollow\" />', 'googlebot');\n\t\t$template->addStyle('/css/'.systemSettings::get('SOURCEDIR').'/site/main.css');\n\t\t$template->addScript('/js/'.systemSettings::get('SOURCEDIR').'/site/main.js');\n\t\t$template->assignClean('_TITLE', systemSettings::get('SITENAME').' Users');\n\t\t$template->assignClean('hotTitles', gameTitlesController::getTitles('weight'));\n\t\t$template->assignClean('loggedin', userCore::isLoggedIn());\n\t\t$template->setSystemDataGateway();\n\t\t$template->getSystemMessages();\n\t\t$template->display('user/activation.htm');\n\t}", "title": "" }, { "docid": "1d568397409ab408b8e4ab3a32380bfc", "score": "0.6916384", "text": "public function activateByAdmin($user, $email, $pass, $token, $config){\n $from = \"From: \".$user.\" <\".$email.\">\";\n $subject = $config['SITE_NAME'].\" - User Account Activation!\";\n $body = \"Hello Admin,\\n\\n\"\n .$user.\" has just registered at \".$config['SITE_NAME']\n .\" with the following details:\\n\\n\"\n .\"Username: \".$user.\"\\n\"\n .\"E-mail: \".$email.\"\\n\\n\"\n .\"You should check this account and if neccessary, activate it. \\n\\n\"\n .\"Use this link to activate the account.\\n\\n\"\n .$config['WEB_ROOT'].\"register.php?mode=activate&user=\".urlencode($user).\"&activatecode=\".$token.\" \\n\\n\"\n .\"Thanks.\\n\\n\"\n .$config['SITE_NAME'];\n\n $adminemail = $config['EMAIL_FROM_ADDR'];\n return mail($adminemail,$subject,$body,$from);\n }", "title": "" }, { "docid": "c804fecffbd5956159f4e2c3c1a746f9", "score": "0.6914365", "text": "public function doActivatingUser()\r\n {\r\n $email = Input::get(\"email\");\r\n $code = Input::get(\"code\");\r\n $status = \"error\";\r\n\r\n if ($email && $code) {\r\n\r\n try {\r\n $user = Sentry::findUserByLogin($email);\r\n\r\n // Attempt to activate the user\r\n if ($user->attemptActivation($code)) {\r\n $result = \"Пользователь активирован\";\r\n $status = \"success\";\r\n Sentry::login($user, false);\r\n } else {\r\n $result = \"Ошибка. Пользователя код активации не подходит\";\r\n }\r\n\r\n } catch (\\Cartalyst\\Sentry\\Users\\UserNotFoundException $e) {\r\n $result = \"Пользователь не найден\";\r\n } catch (\\Cartalyst\\Sentry\\Users\\UserAlreadyActivatedException $e) {\r\n $result = \"Пользователь уже активирован\";\r\n }\r\n\r\n return View::make('registration::activatingUser', compact(\"result\", \"status\"));\r\n } else {\r\n $result = \"Неверные входные данные. Email или код активации неверные \";\r\n return View::make('registration::activatingUser', compact(\"result\"));\r\n }\r\n }", "title": "" }, { "docid": "7ded4bcc430f4b7892381e3a392f3990", "score": "0.6914274", "text": "public function toMail()\n {\n return (new MailMessage)\n ->subject('Account activation')\n ->line([\n 'In order to activate your account you need to confirm your email.',\n 'Click in the button below to activate your account:',\n ])\n ->action('Activate my Account', url('activate/' . $this->token . '/' . $this->email));\n }", "title": "" }, { "docid": "73d488ad4bfe0f4b0704bbeb0ceecbfb", "score": "0.68817693", "text": "public function actionActivate()\n\t{\n\t\t// 1. User clicks on the link sent with the email\n\t\t// 2. User manually enters his verification code.\n\n\t\tif($_GET['vcode'])\n\t\t{\n\t\t\t// This is routine 1.\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// This is routine 2.\n\t\t\t// User will be asked his username, email and verification code.\n\t\t\t$FormModel = new FormActivate;\n\t\t\t$this->render('activate');\n\t\t}\n\t}", "title": "" }, { "docid": "cc64f1c02af03e5bfc165afc27454c88", "score": "0.68793416", "text": "function sendActivationConfirmationNotification() {\n\t\t$template = new EmailTemplate();\n\t\t# create mail object\n\t\t$mail = getMailInstance();\n\t\t$view = new Zend_View();\n\t\t$session = SessionWrapper::getInstance();\n\t\n\t\t// assign values\n\t\t$template->assign('firstname', $this->getFirstName());\n\t\t$subject = \"Account Activation\";\n\t\t$save_toinbox = true;\n\t\t$type = \"useraccount\";\n\t\t$subtype = \"profile_activated\";\n\t\t$message_contents = \"<p>This is to confirm that your Account has been successfully activated. </p>\n\t\t<p>You can login anytime at \".$view->serverUrl($view->baseUrl('user/login')).\" using any of your identities(email or username) and the password you provided during registration. </p>\n\t\t<p>If you happen to forget your login credentials, go to \".$view->serverUrl($view->baseUrl('user/recoverpassword')).\". For any other issues, questions or feedback, please feel free to contact us.</p>\";\n\t\t$template->assign('contents', $message_contents);\n\t\n\t\t$mail->clearRecipients();\n\t\t$mail->clearSubject();\n\t\t$mail->setBodyHtml('');\n\t\n\t\t// configure base stuff\n\t\t$mail->addTo($this->getEmail(), $this->getName());\n\t\t// set the send of the email address\n\t\t$mail->setFrom(getDefaultAdminEmail(), getDefaultAdminName());\n\t\n\t\t$subject = sprintf($this->translate->_('profile_email_subject_invite_confirmation'), getAppName());\n\t\t$mail->setSubject($subject);\n\t\t// render the view as the body of the email\n\t\n\t\t$html = $template->render('default.phtml');\n\t\t$mail->setBodyHtml($html);\n\t\t// debugMessage($html); // exit();\n\t\t\t\n\t\ttry {\n\t\t\t$mail->send();\n\t\t} catch (Exception $e) {\n\t\t\t$session->setVar(ERROR_MESSAGE, 'Email notification not sent! '.$e->getMessage());\n\t\t}\n\t\n\t\t$mail->clearRecipients();\n\t\t$mail->clearSubject();\n\t\t$mail->setBodyHtml('');\n\t\t$mail->clearFrom();\n\t\n\t\tif($save_toinbox){\n\t\t\t# save copy of message to user's application inbox\n\t\t\t$message_dataarray = array(\n\t\t\t\t\t\"senderid\" => DEFAULT_ID,\n\t\t\t\t\t\"subject\" => $subject,\n\t\t\t\t\t\"contents\" => $message_contents,\n\t\t\t\t\t\"html\" => $html,\n\t\t\t\t\t\"type\" => $type,\n\t\t\t\t\t\"subtype\" => $subtype,\n\t\t\t\t\t\"refid\" => $this->getID(),\n\t\t\t\t\t\"recipients\" => array(\n\t\t\t\t\t\t\tmd5(1) => array(\"recipientid\" => $this->getID())\n\t\t\t\t\t)\n\t\t\t); // debugMessage($message_dataarray);\n\t\t\t// process message data\n\t\t\t$message = new Message();\n\t\t\t$message->processPost($message_dataarray);\n\t\t\t$message->save();\n\t\t}\n\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "ea07d6a5c48fc91d9af6451964a9cda6", "score": "0.6833784", "text": "function sendNewEmailActivation() {\n\t\t$session = SessionWrapper::getInstance();\n\t\t$template = new EmailTemplate();\n\t\t# create mail object\n\t\t$mail = getMailInstance();\n\t\t$view = new Zend_View();\n\t\t\n\t\t// assign values\n\t\t$template->assign('firstname', $this->getFirstName());\n\t\t$template->assign('newemail', $this->getTempEmail());\n\t\t$viewurl = $template->serverUrl($template->baseUrl('profile/newemail/id/'.encode($this->getID()).'/actkey/'.$this->getActivationKey()));\n\t\t$template->assign('activationurl', $viewurl);\n\t\t\n\t\t$mail->clearRecipients();\n\t\t$mail->clearSubject();\n\t\t$mail->setBodyHtml('');\n\t\t\n\t\t// configure base stuff\n\t\t$mail->addTo($this->getEmail(), $this->getName());\n\t\t// set the send of the email address\n\t\t$mail->setFrom(getDefaultAdminEmail(), getDefaultAdminName());\n\t\t\n\t\t$mail->setSubject($this->translate->_('profile_email_subject_changeemail'));\n\t\t// render the view as the body of the email\n\t\t$mail->setBodyHtml($template->render('emailchangenotification.phtml'));\n\t\t// debugMessage($template->render('emailchangenotification.phtml')); exit();\n\t\ttry {\n\t\t\t$mail->send();\n\t\t} catch (Exception $e) {\n\t\t\t$session->setVar(ERROR_MESSAGE, 'Email notification not sent! '.$e->getMessage());\n\t\t}\n\t\n\t\t$mail->clearRecipients();\n\t\t$mail->clearSubject();\n\t\t$mail->setBodyHtml('');\n\t\t$mail->clearFrom();\n\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "e1a37bb8f8b971b447b0d443b420d74c", "score": "0.68323946", "text": "public function sendAskForActivateEmail($activatelinkurl, $storeviewId)\n\t{\n\t\tif (!Mage::getStoreConfig(MageParts_ConfirmCustomer_Helper_Data::MP_CC_ENABLED, $storeviewId)) {\n\t\t\treturn $this;\n\t\t}\n\n\t\t// make sure activate e-mails are enabled before sending any\n\t\t$enabled = (intval(Mage::getStoreConfig(self::XML_PATH_ACTIVATE_EMAIL_ENABLED, $storeviewId)) == 1) ? true : false;\n\t\tif (!$enabled) {\n\t\t\treturn $this;\n\t\t}\n\n\t\t$translate = Mage::getSingleton('core/translate');\n\n\t\t/* @var $translate Mage_Core_Model_Translate */\n\t\t$translate->setTranslateInline(false);\n\n\t\t$this->setActivatelinkurl($activatelinkurl);\n\n\t\tMage::getModel('core/email_template')\n\t\t\t->setDesignConfig(array('area' => 'frontend', 'store' => $storeviewId))\n\t\t\t->sendTransactional(\n\t\t\t\tMage::getStoreConfig(self::XML_PATH_ASK_FOR_ACTIVATE_EMAIL_TEMPLATE, $storeviewId),\n\t\t\t\tMage::getStoreConfig(self::XML_PATH_ACTIVATE_EMAIL_IDENTITY, $storeviewId),\n\t\t\t\t$this->getEmail(),\n\t\t\t\t$this->getName(),\n\t\t\t\tarray('customer' => $this));\n\n\t\t$translate->setTranslateInline(true);\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "21adc45a076aa826a68ee167dbf185bf", "score": "0.6784705", "text": "public function index()\n\t{\n\t\t$to = '[email protected]';\n\t\t$subject = 'Account Activation';\n\t\t$message = 'Hi Mosfeck,<br><br>Thanks Your account created successfuly.\n\t\t\t\tPlease click below link to activate your account<br>'\n\t\t\t\t.'<a href=\"'.base_url().'/testmail/verify\" target=\"_blank\">\n\t\t\t\tActivate now</a><br><br>Thanks<br>Team';\n\n\t\t$email = \\Config\\Services::email();\n\t\t$email->setTo($to);\n\t\t$email->setFrom('[email protected]');\n\t\t// $email->setCC('[email protected]');\n\t\t// $email->setBCC('[email protected]');\n\t\t$email->setSubject($subject);\n\t\t$email->setMessage($message);\n\t\t$filepath = 'public/assets/images/image1.jpg';\n\t\t// print_r($filepath);exit;\n\t\t$email->attach($filepath);\n\n\t\tif($email->send())\n\t\t{\n\t\t\techo \"Account Create successfully. Please activate your account\";\n\t\t}else{\n\t\t\t$data = $email->printDebugger(['headers']);\n\t\t\tprint_r($data);\n\t\t}\n\t}", "title": "" }, { "docid": "e4ddf0fc30cdd5d6868ca2621b2123b1", "score": "0.6767746", "text": "function activate_user() {\n\n\tif($_SERVER['REQUEST_METHOD'] == \"GET\") {\n\n\t\tif(isset($_GET['email'])) {\n\n\t\t\t$email = clean($_GET['email']);\n\t\t\t$validation_code = clean($_GET['code']);\n\n\t\t\t$sql = \"SELECT id FROM users WHERE email = '\".escape($_GET['email']).\"' AND validation_code = '\".escape($_GET['code']).\"' \";\n\t\t\t$result = query($sql);\n\t\t\tconfirm($result);\n\n\t\t\tif(row_count($result) == 1) {\n\n\t\t\t$sql2 = \"UPDATE users SET active = 1, validation_code = 0 WHERE email = '\".escape($email).\"' AND validation_code = '\".escape($validation_code).\"' \";\t\n\t\t\t$result2 = query($sql2);\n\t\t\tconfirm($result2);\n\n\t\t\tset_message(\"<p class='bg-success'>Your account has been activated please login</p>\");\n\n\t\t\tredirect(\"https://1touradventure.com/login/\");\n\n\t\t} else {\n\n\t\t\tset_message(\"<p class='bg-danger'>Sorry Your account could not be activated </p>\");\n\n\t\t\tredirect(\"https://1touradventure.com/login/\");\n\n\t\t\t}\n\t\t} \n\t}\n}", "title": "" }, { "docid": "dacbabd1c5439fad1e689ef75cb403e2", "score": "0.67643356", "text": "public static function sendActivationMail(Application_Model_Personnel $user) {\r\n $config = Zend_Registry::get('config');\r\n \r\n $bodyText = 'Thanks for verifying your account.'.\"\\r\".\"\\n\".\"\\r\".\"\\n\";\r\n $bodyText .= 'You now can use our website. ' .\"\\r\".\"\\n\";\r\n $bodyText .= \"\\r\".\"\\n\";\r\n $bodyText .= 'Your team of ' . $config->default->portalName . \"\\r\".\"\\n\";\r\n\r\n $mail = new Zend_Mail('utf-8');\r\n $mail->setBodyText($bodyText);\r\n $mail->setFrom($config->default->senderEmail, $config->default->senderName);\r\n $mail->addTo($user->getEmail());\r\n $mail->setSubject($config->default->portalName . ' Account successfully verified');\r\n $mail->send();\r\n \r\n return true;\r\n }", "title": "" }, { "docid": "db7309ec4bbecc1fc292b8e46e615ce7", "score": "0.67549634", "text": "function sendActivationEmail($emailToBeActivated)\n{\n //a userrole of 1(admin)?\n}", "title": "" }, { "docid": "80684b3ad12bf83fd7a1e4618c0e8137", "score": "0.673316", "text": "function activate() {\n $email = get_option(\"admin_email\");\n return $this->call_api(\"POST\", \"site_servers/activate\", array(\"email\" => $email));\n }", "title": "" }, { "docid": "3864906ca4113211f8f86130c746d305", "score": "0.67297983", "text": "public function sendActivationEmail($user, $set_password=false)\n {\n return Yii::$app->mailer->compose(['html' => 'activationEmail-html', 'text' => 'activationEmail-text'], ['user' => $user, 'set_password' => $set_password])\n ->setFrom([Yii::$app->params['supportEmail'] => Yii::$app->name.' (robot sent).'])\n ->setTo($this->email)\n ->setSubject('Activation for '.Yii::$app->name)\n ->send();\n }", "title": "" }, { "docid": "bc59ec0a5736dc5160067092c01a4f85", "score": "0.67192113", "text": "private function sendActivationNotificationMail()\n {\n $superAdminIds = Yii::$app->authManager->getUserIdsByRole(AuthItem::SUPER_ADMIN_ROLE);\n $dataProvider = new ActiveDataProvider([\n 'query' => AdminUser::find()\n ->active()\n ->andWhere([\n 'in',\n 'id',\n $superAdminIds,\n ]),\n 'pagination' => false,\n ]);\n $messages = [];\n foreach ($dataProvider->getModels() AS $user)\n {\n $messages[] = Yii::$app->mailer->compose([\n 'html' => 'activationNotification-html',\n 'text' => 'activationNotification-text',\n ], ['user' => $this])\n ->setFrom([Yii::$app->params['adminEmail'] => Yii::$app->name . ' robot'])\n ->setSubject(Yii::$app->name . ' ' . Yii::t('app', 'Benachrichtigung Account Aktivierung'))\n ->setTo($user->email);\n }\n if (0 < count($messages))\n {\n return Yii::$app->mailer->sendMultiple($messages);\n }\n return false;\n }", "title": "" }, { "docid": "167e9f7bf359efda789af2c82226977a", "score": "0.6711358", "text": "protected function send_activation_email($user_id)\n\t{\n\t\tswitch ($this->config['require_activation'])\n\t\t{\n\t\t\tcase USER_ACTIVATION_SELF:\n\t\t\t\t$email_template = 'user_welcome_inactive';\n\t\t\t\t$user_actkey = gen_rand_string(mt_rand(6, 10));\n\t\t\tbreak;\n\t\t\tcase USER_ACTIVATION_ADMIN:\n\t\t\t\t$email_template = 'admin_welcome_inactive';\n\t\t\t\t$user_actkey = gen_rand_string(mt_rand(6, 10));\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$email_template = 'user_welcome';\n\t\t\t\t$user_actkey = '';\n\t\t\tbreak;\n\t\t}\n\n\t\tif (!class_exists('messenger'))\n\t\t{\n\t\t\trequire($this->phpbb_root_path . 'includes/functions_messenger.' . $this->php_ext);\n\t\t}\n\n\t\t$messenger = new \\messenger(false);\n\t\t$messenger->template($email_template, $this->user->lang_name);\n\t\t$messenger->to($this->data['email'], $this->data['username']);\n\t\t$messenger->anti_abuse_headers($this->config, $this->user);\n\t\t$messenger->assign_vars(array(\n\t\t\t'WELCOME_MSG' => htmlspecialchars_decode($this->language->lang('WELCOME_SUBJECT', $this->config['sitename'])),\n\t\t\t'USERNAME' => htmlspecialchars_decode($this->data['username']),\n\t\t\t'PASSWORD' => htmlspecialchars_decode($this->data['new_password']),\n\t\t\t'U_ACTIVATE' => generate_board_url() . \"/ucp.{$this->php_ext}?mode=activate&u=$user_id&k=$user_actkey\")\n\t\t);\n\n\t\t$messenger->send(NOTIFY_EMAIL);\n\t}", "title": "" }, { "docid": "61b5d569dd77aea1f54c2065f1503b33", "score": "0.66681254", "text": "public function activatedEmail(User $user)\n {\n $this->_prepareEmail($user, Config::getActivationEmailSubject());\n $this->_email->template('Wasabi/Core.User/activated');\n $this->_email->viewVars([\n 'user' => $user,\n 'instanceName' => Config::getInstanceName()\n ]);\n }", "title": "" }, { "docid": "bac8441416aa98bf97038c32a0f7a0c6", "score": "0.66661555", "text": "public function sendActivation($to, $username, $password, $activation_key){\n\t\t// Load the MySQL Connection\n\t\t$this->db();\n\n\t\t// For highest security, and less chance of being able\n\t\t// to exploit the activation key, this has been formed\n\t\t// from the md5sum of the username, password, email and time.\n\t\t// Beat that one, bud.\n\n\t\t// User's IP Address\n\t\t$ip = $_SERVER[REMOTE_ADDR];\n\n\t \t// Set text/plain headers\n\t\t$headers = $this->headers(\"text/plain\");\n\n\t\t// Set the subject line\n\t\t$subject = \"[Account Activation]\";\n\n\t\t// Email content\n\t\t$mail = \"Someone with the IP Address of {$ip} has registered an\\n\";\n\t\t$mail .= \"account with Feedmailer. The account is currently not activated.\\n\";\n\t\t$mail .= \"To activate the account, please click the following link:\\n\";\n\t\t$mail .= \"{$this->mysql->setting(site_url)}activate.php?email={$to}&key={$activation_key}\\n\\n\";\n\t\t$mail .= \"\\n\";\n\t\t$mail .= \"Here are your login crendentials. Please store this email\\n\";\n\t\t$mail .= \"in a safe place.\\n\\n\";\n\t\t$mail .= \"Username: {$username}\\n\";\n\t\t$mail .= \"Password: {$password}\\n\";\n\t\t$mail .= \"Activation Key: {$activation_key}\\n\\n\";\n\t\t$mail .= \"Best Regards,\\n\";\n\t\t$mail .= \"Feedmailer Staff\";\n\n\t\t\n\t\t// Deliver the message.\n\t\tif (mail($to, $subject, $mail, $headers)){\n\t\t\t$this->debug->write(FF, \"mail::sendActivation() completed successfully\");\n\t\t\treturn true;\t\t\t\n\t\t} else {\n\t\t\t$this->debug->write(FF, \"mail::sendActivation() failed.\");\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "0f4aa54aeda287445459f193da54e163", "score": "0.6658798", "text": "private function generateActivationLink($user_id, $email){\r\n\t\t$domain = Config::DOMAIN;\r\n\r\n\t\t$hash = Utils::generateRandomToken($email);\r\n\t\t$link = \"http://$domain/activate/$user_id/$hash\";\r\n\r\n\t\treturn array(\r\n\t\t\t'link' => $link,\r\n\t\t\t'hash' => $hash\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "8a6be12678960f080f1dcbedfd12cb72", "score": "0.66204685", "text": "function activate()\n {\n\n\t// fetches data from database\n\t \t \t\n \t$data['query'] = $this->model->get_entry();\n \t\n \t// get array values from database\n \t \t \t\n \tforeach ($data['query'] as $row) {\n \t\n \t\t// assign results to variables\n \t\t\n \t\t$client = $row->email;\n \t\t$client_name = $row->name;\n \t\t$client_link = $row->link;\n \t\t$client_duration = $row->duration;\n\t\n\t\t// change date format to January 01, 2012\t\t\n \t\t\n \t\t$client_startdate = date(\"F d, Y\", strtotime($row->startdate));\n \t\t$client_enddate = date(\"F d, Y\", strtotime($row->enddate));\n\n\t\t// set to my own email \t\t\n \t\t\n \t\t$me = \"[email protected]\";\n \t\t \n\t}\n\t \n\t// email settings\n\t \n\t$this->email->from('[email protected]','ulyssesonline.com'); \n\n\t// set email->to to clients email\t\n\t \t\n \t$this->email->to($client);\n \t\n \t// blind copy to me\n \t\n \t$this->email->bcc($me);\n\n\t// subject \t\n \t\n \t$this->email->subject('Your ad link is now activated');\n \t\n\t// body of message \t\n \t \n \t$this->email->message(\n\n'Hi '.$client_name.',\n\nThank you for purchasing an ad link at ulyssesonline.com. Your link '.$client_link.' will be active for a period of '.strtolower($client_duration).' starting from '.$client_startdate.' until '.$client_enddate.'. I will send out a reminder prior to your link expiring in '.strtolower($client_duration).'. Once again, thank you so much for your purchase.\n \nBest regards,\nUlysses'\n\n\t);\n \n\t// finally send the message\n\t \n \t$this->email->send();\n \t\n \t// redirect after send\n \t\n\tredirect('ads/view/'.$this->uri->segment(3));\n\t \n }", "title": "" }, { "docid": "7274e89c7ffef2f1c91bc11504b6de39", "score": "0.6619697", "text": "function Trigger_ActivationEmail(&$tNG) {\n $emailObj = new tNG_Email($tNG);\n $emailObj->setFrom(\"{KT_defaultSender}\");\n $emailObj->setTo(\"{email}\");\n $emailObj->setCC(\"\");\n $emailObj->setBCC(\"\");\n $emailObj->setSubject(\"Learn Online Activation\");\n //FromFile method\n $emailObj->setContentFile(\"includes/mailtemplates/activate.html\");\n $emailObj->setEncoding(\"UTF-8\");\n $emailObj->setFormat(\"HTML/Text\");\n $emailObj->setImportance(\"Normal\");\n return $emailObj->Execute();\n}", "title": "" }, { "docid": "9c23650cd695b36357455bce34456e0d", "score": "0.6607919", "text": "private function mailUser()\n {\n $title = 'Thank You for Registering';\n $body = <<<HTML\n<p>Thank you for registering at \n <a href=\"//jakkedhardcore.com\">jakkedhardcore.com</a>. Your\n registration is complete but you will be unable to access any CMS features\n until an administrator reviews your registration and assigns appropriate\n permissions. This may take several days.\n</p>\n<p>In the mean time, you may wish to \n <a href=\"https://cms.jakkedhardcore.com/\">log in</a> to upload a user image\n and fill out your public profile by clicking the \"My Account\" link. These\n will be what site visitors see about you if you are an author or personal\n trainer.\n</p>\nHTML;\n\n $this->mail->Send($this->input['username'], $title, $body);\n }", "title": "" }, { "docid": "3c2966f911cb516f0293b1b9b7fb8c31", "score": "0.6606888", "text": "private function sendEmail(): void\n {\n if (!$this->tokenizer->validate($this->user->email_confirm_token)) {\n $this->user->setEmailConfirmToken($this->tokenizer->generate());\n $this->user->updateAttributes([\n 'email_confirm_token' => $this->user->email_confirm_token,\n 'date_confirm' => $this->user->date_confirm,\n ]);\n }\n\n $sent = Yii::$app->mailer\n ->compose('registration', ['user' => $this->user])\n ->setTo($this->email)\n ->setSubject(Yii::t('app', 'Registration'))\n ->send();\n\n if (!$sent) {\n throw new UserException(Yii::t('app', 'An error occurred while sending a message to activate account'));\n }\n }", "title": "" }, { "docid": "6c626210a040e59a6ebaf942e7abe094", "score": "0.660493", "text": "public static function activation_email($to, $full_name, $token)\r\n\t{\r\n\t\t$mail = new PHPMailer(true);\r\n\r\n\t\ttry {\r\n\t\t\t$mail->SMTPDebug = 1;\r\n\t\t\t$mail->SMTPAuth = TRUE;\r\n\t\t\t$mail->SMTPSecure = \"tls\";\r\n\t\t\t$mail->Port = 587;\r\n\t\t\t$mail->Host = EMAIL_HOST;\r\n\t\t\t$mail->Password = EMAIL_PASS;\r\n\r\n\t\t\t$mail->setFrom(EMAIL_HOST, EMAIL_NAME);\r\n\t\t\t$mail->addAddress($to, $full_name);\r\n\t\t\t$mail->addReplyTo(EMAIL_HOST, EMAIL_NAME);\r\n\r\n\t\t\t$mail->isHTML(true);\r\n\t\t\t$mail->Subject = 'Confirm your account';\r\n\t\t\t$mail->Body = 'Click this to activate your account: ' .\r\n\t\t\t\t'<a href=\"' .\r\n\t\t\t\t'https://www.blagalucianflorin.ro/controllers/users_controller.php?' .\r\n\t\t\t\t'_action=CONFIRM_REGISTER' .\r\n\t\t\t\t\"&token=$token\" .\r\n\t\t\t\t'\">Activate</a>';\r\n\r\n\t\t\t$mail->send();\r\n\t\t\treturn (true);\r\n\t\t} catch (Exception $e) {\r\n\t\t\treturn (false);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "7fad060955706ebbb4659e10d1dbfa98", "score": "0.65994704", "text": "public function activate($token)\n {\n $user = DB::TABLE('users')->where('activate', $token)->first();\n\n $pageConfigs = [\n 'bodyClass' => \"bg-full-screen-image\",\n 'blankPage' => true\n ];\n\n return view('/users/activate', [\n 'pageConfigs' => $pageConfigs,\n 'email' => $user->email\n ]);\n }", "title": "" }, { "docid": "f9e3bf34e60f482759deeb78a8d5b458", "score": "0.6579182", "text": "public function sendEmail()\n {\n $recipient = $this->_userData->email;\n $recipientFullName = trim($this->_userData->first_name) . \" \" . trim($this->_userData->middle_name) . \" \" . \n trim($this->_userData->last_name);\n $subject = \"Your account details - BizSense\";\n $mail = new Core_Service_Mail;\n $message = \"Hello $recipientFullName,\" . \"\\n\" . \"\\n\" . \n \"An administrator created an account for you. You can access the application at \" . Core_Model_Site::getUrl();\n $message .= \"\\n\" . \n \"The username for your account is \" . $recipient.\" or \". $this->_userData->username\n .\"\\n\".\n \"The password for your account is \" . $this->_password;\n $mail->setBodyText($message);\n $mail->addTo($recipient, $recipientFullName);\n $mail->setSubject($subject);\n $mail->send();\n \n }", "title": "" }, { "docid": "99aedec2c134bc155b1a74e0d62ad8d4", "score": "0.655749", "text": "public function resend_activation($email){\n\t\t$query = $this->db->prepare(\"SELECT `email_code` FROM `members` WHERE `email` =?\");\n\t\t$query->bindValue(1, $email);\n\t\ttry{\n\t\t\t$query->execute();\n\t\t\t$data = $query->fetch(PDO::FETCH_ASSOC);\n\t\t}catch(PDOException $e){\n\t\t\tdie($e->getMessage());\n\t\t}\n\t\t//email user activation link using Swift Mailer\n\t\trequire_once 'core/swift/lib/swift_required.php';\n\t\t$transport = Swift_MailTransport::newInstance();\n\t\t$mailer = Swift_Mailer::newInstance($transport);\n\t\t$message = Swift_Message::newInstance('Thankyou for Registering to Walk Kernow Alpha') ->setFrom(array('[email protected]' => 'Walk_Kernow_Alpha')) ->setTo(array('[email protected]')) ->setBody(\"Hello \" . $email. \",\\r\\nThank you for registering with us. Please visit the link below so we can activate your account:\\r\\n\\r\\nhttp://ns6577.hostgator.com/~manic/activate.php?email=\" . $email . \"&email_code=\" . $data['email_code'] . \"\\r\\n\\r\\n-- Walk Kernow (Alpha)\");\n\t\t$result = $mailer->send($message);\t}", "title": "" }, { "docid": "81f972db8837d4e63de4dabef7f0426e", "score": "0.65523577", "text": "public function ResendEmail()\n {\n $result = User::where('id', Auth::user()->id)->first();\n\n $content = [\n 'email' => $result->email,\n 'code' => $result->activate_token\n ];\n Mail::to($result->email)->send(new Resendlink($content));\n Session::flash('email_sent', 'Email Confirmation Link Sent');\n return redirect()->back();\n }", "title": "" }, { "docid": "a88c633b09fcd5f6556c5cf04c18a3c4", "score": "0.6536261", "text": "public function sendEmail(): void\n {\n if (!$this->tokenizer->validate($this->user->email_confirm_token)) {\n $this->user->setEmailConfirmToken($this->tokenizer->generate());\n $this->user->updateAttributes([\n 'email_confirm_token' => $this->user->email_confirm_token,\n 'date_confirm' => $this->user->date_confirm,\n ]);\n }\n\n $sent = Yii::$app->mailer\n ->compose('registration', ['user' => $this->user])\n ->setTo($this->email)\n ->setSubject(Yii::t('app', 'Registration'))\n ->send();\n\n if (!$sent) {\n throw new UserException(Yii::t('app', 'An error occurred while sending a message to activate account'));\n }\n }", "title": "" }, { "docid": "83edf9d93c471c386c76e03c95b8bce9", "score": "0.6519574", "text": "public function sendEmail($view, $data, $to, $from, $message) {\n\t\t// $mail_send_func = ;\n\n\t\tMail::send('emails.welcomenewuser', $data, function($message, $to, $from) {\n\t\t\t$message->from($from, 'admin');\n\t\t\t$message->to($to)->subject('Your user account is now active!');\n\t\t});\n\n\t\treturn Redirect::route('users.index')->with('user_enabled', 'User was enabled.');\n\t}", "title": "" }, { "docid": "59f66f549b7a395c2bdc5ebba63de329", "score": "0.6518591", "text": "public function sendActivationMail($name = null)\n {\n $layout = \\Acelle\\Model\\Layout::where('alias', 'registration_confirmation_email')->first();\n $token = $this->getToken();\n\n $layout->content = str_replace('{ACTIVATION_URL}', join_url(config('app.url'), action('UserController@activate', ['token' => $token], false)), $layout->content);\n $layout->content = str_replace('{CUSTOMER_NAME}', $name, $layout->content);\n\n $name = is_null($name) ? trans('messages.to_email_name') : $name;\n\n // build the message\n $message = new ExtendedSwiftMessage();\n $message->setEncoder(new \\Swift_Mime_ContentEncoder_PlainContentEncoder('8bit'));\n $message->setContentType('text/html; charset=utf-8');\n\n $message->setSubject($layout->subject);\n $message->setTo([$this->email => $name]);\n $message->setReplyTo(Setting::get('mail.reply_to'));\n $message->addPart($layout->content, 'text/html');\n\n $mailer = App::make('xmailer');\n $result = $mailer->sendWithDefaultFromAddress($message);\n\n if (array_key_exists('error', $result)) {\n throw new \\Exception($result['error']);\n }\n\n MailLog::info('Sent activation email to '.$this->email);\n }", "title": "" }, { "docid": "8ccaa5c5fd75500c97c796ad78a83952", "score": "0.6506858", "text": "public function sendIsActivated()\n\t{\n\t\t$this->app->mail($this->user->email, $this->getString('email_user_is_activated_subject'), $this->getString('email_user_is_activated_message'));\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "6dad6d74d8f5bbe8a10084fa8111200e", "score": "0.65013695", "text": "public function activateEmail($user)\n {\n /* Get token from query */\n\n if (!isset($_GET['token'])) {\n throw new ForbiddenHttpException();\n } else {\n $token = $_GET['token'];\n }\n\n try {\n\t\t\t$email_activation_return = $this->emailActivationController->activateEmail($user, $token);\n\n\t\t\tif (!$email_activation_return['err']) {\n\t\t\t\t$this->router->redirect('/');\t// @TODO: 홈에서 인증완료됨을 알리는 modal이 뜨도록 query 추가하기\n\t\t\t}\n\t\t} catch (RequestNotFoundException $e) {\n\t\t\tthrow new GoneHttpException(\n\t\t\t\t$e->getMessage(),\n\t\t\t\t$e->getCode(),\n\t\t\t\t$e\n\t\t\t);\n\t\t} catch (TokenNotMatchedException $e) {\n\t\t\tthrow new ForbiddenHttpException(\n\t\t\t\t$e->getMessage(),\n\t\t\t\t$e->getCode(),\n\t\t\t\t$e\n\t\t\t);\n\t\t} catch (RequestExpiredException $e) {\n\t\t\tthrow new GoneHttpException(\n\t\t\t\t$e->getMessage(),\n\t\t\t\t$e->getCode(),\n\t\t\t\t$e\n\t\t\t);\n\t\t}\n }", "title": "" }, { "docid": "33728db748c9bef210d0ce90aa028e5a", "score": "0.6500665", "text": "public function activateAccountAction($verificationHash = '', $email = '') {\r\n\t\tif(!empty($verificationHash) && !empty($email)) {\r\n\t\t\t$user = $this->userRepository->findOneByVerificationHashAndEmail($verificationHash, $email);\r\n\t\t}\r\n\r\n\t\tif(!is_null($user)) {\r\n\t\t\t$this->activateAccount($user);\r\n\r\n\t\t\t$this->userRepository->update($user);\r\n\t\t\t$this->userRepository->_persistAll();\r\n\r\n\t\t\t$this->notifyExchange($user, 'org.typo3.user.register');\r\n\r\n\t\t\t\t// automatically sign in the user\r\n\t\t\tTx_Ajaxlogin_Utility_FrontendUser::signin($user);\r\n\r\n\t\t\t$message = Tx_Extbase_Utility_Localization::translate('account_activated', 'ajaxlogin');\r\n\t\t\t$this->flashMessageContainer->add($message, '', t3lib_FlashMessage::OK);\r\n\t\t\t//$this->redirectToURI('/');\r\n\t\t} else {\r\n\t\t\t$message = Tx_Extbase_Utility_Localization::translate('invalid_activation_link', 'ajaxlogin');\r\n\t\t\t$this->flashMessageContainer->add($message, '', t3lib_FlashMessage::ERROR);\r\n\t\t\t//$this->response->setStatus(409);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "2267b1cc142212df71bb424d4acc8cf2", "score": "0.64993453", "text": "function send_confirmation($hash,$user_email, $firstname, $user_password){\n\t\t$config = Array(\n\t\t\t'protocol' => 'smtp',\n\t\t\t'smtp_host' => 'tls://smtp.gmail.com',\n\t\t\t'smtp_port' => 587,\n\t\t\t'smtp_user' => '[email protected]',\n\t\t\t'smtp_pass' => '*******' ,\t\n\t\t\t'mailtype' => 'html', \n\t\t\t'charset' => 'iso-8859-1'\n\t\t);\n\t\t$this->load->library('email', $config);\n\t\t$this->email->set_newline(\"\\r\\n\");\t\n\t\t$this->email->from('[email protected]', 'BookRialto.com');\n\t\t$subject = \"Welcome to BookRialto.\";\n\t\t$message = 'Thanks for signing up, '. $firstname . '! \n\t\tYour account has been created.\n\t\tHere is the login details.\n\t\t---------------------------------------\n\t\tEmail: ' . $user_email . '\n\t\tPassword: ' . $user_password . '\n\t\t---------------------------------------\n\t\tPlease click this link to activate your account: \n\t\t' . site_url('reg_user/verify/'. $hash);\n\t\t\n\t\t$this->email->to($user_email);\n\t\t$this->email->subject($subject);\n\t\t$this->email->message($message);\n\t\t//$this->email->send();\n\t\tif (!$this->email->send()) {\n // Raise error message\n show_error($this->email->print_debugger());\n } else {\n // Show success notification or other things here\n echo 'Success to send email';\n }\n\t}", "title": "" }, { "docid": "cd51ed5185b2744b66e2cd9f9bdd49fd", "score": "0.6486386", "text": "public function activateAccountAction($verificationHash = '', $email = '')\n {\n if (!empty($verificationHash) && !empty($email)) {\n $user = $this->userRepository->findOneByVerificationHashAndEmail($verificationHash, $email);\n }\n\n if (!is_null($user)) {\n $this->activateAccount($user);\n\n $this->userRepository->update($user);\n $this->userRepository->_persistAll();\n\n $this->notifyExchange($user, 'org.typo3.user.register');\n\n // automatically sign in the user\n Utility\\FrontendUserUtility::signin($user);\n\n $message = LocalizationUtility::translate('account_activated', 'zoat_ajaxlogin');\n $this->flashMessageContainer->add($message, '', FlashMessage::OK);\n //$this->redirectToURI('/');\n } else {\n $message = LocalizationUtility::translate('invalid_activation_link', 'zoat_ajaxlogin');\n $this->flashMessageContainer->add($message, '', FlashMessage::ERROR);\n //$this->response->setStatus(409);\n }\n }", "title": "" }, { "docid": "36917b9754db0863a62487f88f1c587a", "score": "0.6482853", "text": "public function adminActivated($user, $email, $config){\n $from = \"From: \".$config['EMAIL_FROM_NAME'].\" <\".$config['EMAIL_FROM_ADDR'].\">\";\n $subject = $config['SITE_NAME'].\" - Welcome!\";\n $body = $user.\",\\n\\n\"\n .\"Welcome! You've just registered at \".$config['SITE_NAME'].\" \"\n .\"with the following username:\\n\\n\"\n .\"Username: \".$user.\"\\n\\n\"\n .\"Your account has now been activated by an administrator. \"\n .\"Please click here to login - \"\n .$config['WEB_ROOT'].\"\\n\\nThank you for registering.\\n\\n\"\n .$config['SITE_NAME'];\n\n return mail($email,$subject,$body,$from);\n }", "title": "" }, { "docid": "dd06a836e803fc63620fa38bcd2ff57e", "score": "0.64751637", "text": "public function sendEmailVerification()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "44fbcb07b57501d6f7a833f6937a3a46", "score": "0.64684486", "text": "public function sendInviteMail()\n {\n $module = Yii::$app->moduleManager->getModule('user');\n $registrationUrl = Url::to(['/user/registration', 'token' => $this->token], true);\n\n // User requested registration link by its self\n if ($this->source == self::SOURCE_SELF) {\n\n $mail = Yii::$app->mailer->compose([\n 'html' => '@user/views/mails/UserInviteSelf',\n 'text' => '@user/views/mails/plaintext/UserInviteSelf'\n ], [\n 'token' => $this->token,\n 'registrationUrl' => $registrationUrl\n ]);\n $mail->setTo($this->email);\n $mail->setSubject(Yii::t('UserModule.views_mails_UserInviteSelf', 'Welcome to %appName%', ['%appName%' => Yii::$app->name]));\n $mail->send();\n } elseif ($this->source == self::SOURCE_INVITE) {\n\n if ($module->sendInviteMailsInGlobalLanguage) {\n Yii::$app->language = Yii::$app->settings->get('defaultLanguage');\n }\n\n $mail = Yii::$app->mailer->compose([\n 'html' => '@easyonline/modules/user/views/mails/UserInvite',\n 'text' => '@easyonline/modules/user/views/mails/plaintext/UserInvite'\n ], [\n 'token' => $this->token,\n 'originator' => $this->originator,\n 'originatorName' => $this->originator->displayName,\n 'registrationUrl' => $registrationUrl\n ]);\n $mail->setTo($this->email);\n $mail->setSubject(Yii::t('UserModule.views_mails_UserInviteSpace', 'You\\'ve been invited to join {space} on {appName}', ['space' => 'SPACE NAME HERE!', 'appName' => Yii::$app->name]));\n $mail->send();\n\n // Switch back to users language\n if (Yii::$app->user->language !== \"\") {\n Yii::$app->language = Yii::$app->user->language;\n }\n } elseif ($this->source == self::SOURCE_INVITE) {\n\n // Switch to systems default language\n if ($module->sendInviteMailsInGlobalLanguage) {\n Yii::$app->language = Yii::$app->settings->get('defaultLanguage');\n }\n\n $mail = Yii::$app->mailer->compose([\n 'html' => '@user/views/mails/UserInvite',\n 'text' => '@user/views/mails/plaintext/UserInvite'\n ], [\n 'originator' => $this->originator,\n 'originatorName' => $this->originator->displayName,\n 'token' => $this->token,\n 'registrationUrl' => $registrationUrl\n ]);\n $mail->setTo($this->email);\n $mail->setSubject(Yii::t('UserModule.invite', 'You\\'ve been invited to join %appName%', ['%appName%' => Yii::$app->name]));\n $mail->send();\n\n // Switch back to users language\n if (Yii::$app->user->language !== \"\") {\n Yii::$app->language = Yii::$app->user->language;\n }\n }\n }", "title": "" }, { "docid": "2450753cfea98393420d7a8a50f46b3a", "score": "0.6464947", "text": "public function email()\n {\n\n Mail::to(Auth::user()->email)->send(new NewUserWelcome());\n return redirect('/dashboard');\n\n }", "title": "" }, { "docid": "a22e64069c1881525824d0cf206ff5d7", "score": "0.6398508", "text": "private function _sendVerificationEmail($user_name, $user_id, $user_email, $user_activation_hash)\n {\n // Email kezelő osztály behívása\n include(LIBS . '/simple_mail_class.php');\n\n $subject = Config::get('email.verification.subject');\n $link = Config::get('email.verification.link');\n $html = '<html><body><h3>Kedves ' . $user_name . '!</h3><p>A ' . $user_email . ' e-mail címmel regisztráltál a ---. Regisztrációd megtörtént, de jelenleg passzív.</p><a href=\"' . BASE_URL . 'regisztracio/' . $user_id . '/' . $user_activation_hash . '\">' . $link . '</a><p>Az aktiválást követően a ----- oldalára jutsz, ahol bejelentkezhetsz a felhasználó neveddel és jelszavaddal. Annak érdekében, hogy segíthessünk a számodra leginkább megfelelő munka megtalálásában, töltsd ki a felhasználói profilodat. </p><p>Üdvözlettel:<br>A Multijob Diákszövetkezet csapata</p></body></html>';\n \n $from_email = Config::get('email.from_email');\n $from_name = Config::get('email.from_name');\n \n // Létrehozzuk a SimpleMail objektumot\n $mail = new \\System\\Libs\\SimpleMail();\n $mail->setTo($user_email, $user_name)\n ->setSubject($subject)\n ->setFrom($from_email, $from_name)\n ->addMailHeader('Reply-To', '[email protected]', 'Mail Bot')\n ->addGenericHeader('MIME-Version', '1.0')\n ->addGenericHeader('Content-Type', 'text/html; charset=\"utf-8\"')\n ->addGenericHeader('X-Mailer', 'PHP/' . phpversion())\n ->setMessage($html)\n ->setWrap(78);\n \n // final sending and check\n if($mail->send()) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "bb30c62168489f033bbff0f28cc01669", "score": "0.63984865", "text": "public function requestEmailActivation($user)\n {\n $return = array(\n 'err' => true,\n 'msg' => ''\n );\n\n /* Receive email address */\n\n # $email_inputs = $this->receiveAjaxData();\n # $email = $email_inputs['email'];\n $email = '[email protected]'; // For test\n\n /* Request email activation */\n\n $token = $this->randomStringGenerator->generateUUIDV4();\n\n $email_add_return = $this->emailAddController->addEmail($email, $user, $token);\n $return['err'] = $email_add_return['err'];\n $return['msg'] = $email_add_return['msg'];\n\n if ($return['err']) {\t//\tFailed to add new email address\n\n } else {\t\t\t\t//\tSuccessfully added new email address\n $activation_link =\n $this->router->generate('email_activation', array(), Router::URL) .\n '?' . http_build_query(array('token' => $token));\n\n //\tFailed to send activation email\n if (!$this->activationMailSender->sendEmail($email, $activation_link)) {\n $return['err'] = true;\n $return['msg'] = $this->config['msg']['activation_email_err'];\n }\n }\n\n $this->sendAjaxData($return);\n }", "title": "" }, { "docid": "be7fef21d307cdc79f1a54597d7aca04", "score": "0.6396438", "text": "private function sendSuccessEmail($email)\n {\n $user = DB::table('users')->where('email', $email)->first();\n\n $title = Setting::find(1);\n $user->web_title = $title->value;\n $user->now = now();\n\n // dd($user->email);\n try {\n //Here send the link with CURL with an external email API\n Mail::send('email.email-confirm-reset', ['user' => $user], function ($message) use ($user)\n {\n $message->subject('Request For Password Reset');\n $message->from('[email protected]', $user->web_title);\n $message->to($user->email);\n });\n return true;\n } catch (\\Exception $e) {\n return false;\n }\n }", "title": "" }, { "docid": "d815706574a1d4376646f78e6edca70c", "score": "0.6394506", "text": "public function activateAction()\n {\n\t\tif (Zend_Auth::getInstance()->hasIdentity())\n\t\t{\n\t\t\t$this->_helper->_redirector->gotoUrl($this->view->seoUrl('/gapper/my-profile'));\n\t\t}\n\t\t\n\t\t$id=base64_decode($this->_getParam('id'));\n \t$model=new Application_Model_User();\n \t$model=$model->find($id);\n \tif(false===$model)\n \t{\n \t\t$this->view->msg=\"Invalid request. Please try again\";\n \t}\n \telse\n \t{\n \t\tif($model->getStatus()==\"inactive\")\n \t\t{\n \t\t\t$model->setStatus('active');\n \t\t\t$model->save();\n \t\t\t$this->view->msg=\"Your account has been activated. Please login to access your account.\";\n \t\t}\n \t\telse\n \t\t{\n \t\t\t$this->view->msg=\"Your account is already activated. Please login to access your account.\";\n \t\t}\n \t\t\n \t}\n }", "title": "" }, { "docid": "ae6b2dd082594f1533df25254b670196", "score": "0.6352531", "text": "public function sendEmail($email)\n {\n $resetLink = Url::to(['/admin/user/signup'], true);\n return Yii::$app\n ->mailer\n ->compose(\n ['@app/modules/user/mails/emailConfirm']\n )\n ->setFrom([Yii::$app->params['supportEmail'] => Yii::$app->name . ' robot'])\n ->setTo($this->email)\n ->setHtmlBody($resetLink)\n ->setSubject('Do u want to join us? ' . Yii::$app->name)\n ->send();\n }", "title": "" }, { "docid": "c117de0161dce38bed2fed4bf0b1bcc9", "score": "0.63418525", "text": "public function getlink(){\n $usuario = User::find(Auth::user()->id);\n // dd(Auth::user()->id);\n $url = url('/').'/activar'.'?'.'usuario_id=' . Auth::user()->id . '&key=' . bcrypt($usuario->email);\n //TODO: Enviar correo con $url\n dd('Enlace de activación: ' . $url);\n }", "title": "" }, { "docid": "30ada3123239b5abd83269c83a1bcdc6", "score": "0.633321", "text": "protected function sendMail()\n {\n $userEmail = $this->getUser()->get_email();\n \n $title = Translation::getInstance()->getTranslation(\n 'SubmissionSubmitConfirmationEmailTitle', \n array('ASSIGNMENT_TITLE' => $this->getPublication()->get_content_object()->get_title()), \n Manager::context());\n \n $content = array();\n \n $content[] = '<link rel=\"stylesheet\"' .\n ' href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css\"' .\n ' integrity=\"sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7\"' .\n ' crossorigin=\"anonymous\">';\n \n $content[] = '<style>body { padding: 20px; } .assignment-success-check { display: block; font-size: 80px;' .\n ' margin: 0 auto 20px; width: 80px;}</style>';\n \n $content[] = $this->renderConfirmationMessage(\n Translation::getInstance()->getTranslation(\n 'SubmissionSubmitConfirmationEmailContent', \n array(\n 'ASSIGNMENT_TITLE' => $this->getPublication()->get_content_object()->get_title(), \n 'COURSE' => $this->get_course()->get_title()), \n Manager::context()));\n \n $content = implode(PHP_EOL, $content);\n \n $mail = new Mail($title, $content, $userEmail);\n \n $mailerFactory = new MailerFactory(Configuration::getInstance());\n $mailer = $mailerFactory->getActiveMailer();\n \n $mailer->sendMail($mail);\n }", "title": "" }, { "docid": "bd3bc69ef98a9cf682efe1c3cf0776cc", "score": "0.6331462", "text": "public function sendlink()\n\t{\n\t\t$this->load->helper(array('url', 'form'));\n\n\t\t$data = array(\n\t\t\t'title' => 'Reset password',\n\t\t\t'footer' => '&copy; 2016 Open System Consulting Co., Ltd.'\n\t\t\t);\n\n\t\t$this->load->view('header', $data);\n\t\t$this->load->view('sendlink');\n\t\t$this->load->view('footer', $data);\n\n\t}", "title": "" }, { "docid": "d23cbe00049821aaba4e209379b8b613", "score": "0.6330957", "text": "public function adminActivation($user, $email, $pass, $config){\n $from = \"From: \".$config['EMAIL_FROM_NAME'].\" <\".$config['EMAIL_FROM_ADDR'].\">\";\n $subject = $config['SITE_NAME'].\" - Welcome!\";\n $body = $user.\",\\n\\n\"\n .\"Welcome! You've just registered at \".$config['SITE_NAME'].\" \"\n .\"with the following username:\\n\\n\"\n .\"Username: \".$user.\"\\n\\n\"\n .\"Your account is currently inactive and will need to be approved by an administrator. \"\n .\"Another e-mail will be sent when this has occured.\\n\\n\"\n .\"Thank you for registering.\\n\\n\"\n .$config['SITE_NAME'];\n\n return mail($email,$subject,$body,$from);\n }", "title": "" }, { "docid": "743c5ef28f8a76b58cceeb5d5a796609", "score": "0.6320613", "text": "public function sendVerificationEmail($user_id, $user_email, $user_activation_hash)\n {\n \trequire './model/inc/mail.php';\n $link = EMAIL_VERIFICATION_URL.''.urlencode($user_id).'-'.urlencode($user_activation_hash);\n $emailmessage = EMAIL_VERIFICATION_CONTENT.' <a href=\"'.$link.'\" target=\"_blank\" >'.$link.'</a>';\n $mail = new mail_sender(encryptIt('send_'.random_string(2)) , $emailmessage ,$user_email);\n }", "title": "" }, { "docid": "fd344737421523332a88d80b61b66104", "score": "0.63142604", "text": "public function send_verification_link(Request $request)\n {\n $request->validate([\n 'id' => 'required|exists:users,id',\n ]);\n\n $user = User::find($request->id);\n\n $password = random_key(); // defined in helper\n $user->password = bcrypt($password); \n $user->save();\n\n $public_id = $user->public_id; \n\n $url = $user->email_verification_link();\n Mail::to($user)->send(new UserAdded($password, $public_id, $url));\n\n return response()->json([\n 'status' => 'success'\n ]);\n }", "title": "" }, { "docid": "e172f1fb4617057f8e36a76ed614b9b2", "score": "0.6304919", "text": "public function activateUser()\n {\n $user = $this->_changeUserActive(true);\n $this->out(__d('cake_d_c/users', 'User was activated: {0}', $user->username));\n }", "title": "" }, { "docid": "f74522c04cef1f262b40e8256cbaeafe", "score": "0.63046396", "text": "function activate_account($activate_key, $key_id) {\n\t\tif ($activate_key != \"\" && strlen($activate_key) == 32 && $key_id > 0) {\n\t\t\t$this->id = $key_id;\n\t\t\tif ($this->check_user(\"active\")) {\n\t\t\t\tif ($this->auto_activation) {\n\t\t\t\t\t$upd_sql = sprintf(\"UPDATE %s SET active = 'y' WHERE id = %d AND MD5(pw) = %s AND active = 'n'\", $this->table_name, $key_id, $this->ins_string($activate_key));\n\t\t\t\t\tif (mysql_query($upd_sql)) {\n\t\t\t\t\t\tif ($this->send_confirmation($key_id)) {\n\t\t\t\t\t\t\t$this->the_msg = $this->messages(18);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->the_msg = $this->messages(14);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->the_msg = $this->messages(19);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ($this->send_mail($this->admin_mail, 40, 39)) {\n\t\t\t\t\t\t$this->the_msg = $this->messages(36);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->the_msg = $this->messages(14);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->the_msg = $this->messages(20);\n\t\t\t}\n\t\t} else {\n\t\t\t$this->the_msg = $this->messages(21);\n\t\t}\n\t}", "title": "" }, { "docid": "1202d077911b1f3e510f13b29e971669", "score": "0.62820643", "text": "private static function sendVerificationEmail($user_name, $user_email, $user_activation_hash){\n \t\t\n\t\t$url = self::config('app.baseurl') . '/' . self::config('auth.routes.verification')\n\t\t\t. '/' . urlencode($user_activation_hash) . \"?user_name=\" . urlencode(Encryption::encrypt($user_name));\n\t\t\n\t\t$subject = self::config('email.verification.subject');\n\t\t$body = self::config('email.verification.content') . ' <a href=\"'.$url.'\">'.$url.'</a>';\n\t\t\n\t\t$mail = new EmailSender();\n\t\t$mail->setTo($user_email);\n\t\t$mail->setSubject($subject);\n\t\t$mail->setBodyHtml($body);\n\t\t$mail_sent = $mail->go(true);\n\t\t\n\t\tif ($mail_sent) {\n\t\t\tSession::add(Session::SESSION_FEEDBACK_POSITIVE, Text::get('FEEDBACK_VERIFICATION_MAIL_SENDING_SUCCESSFUL'));\n\t\t\treturn true;\n\t\t} else {\n\t\t\tSession::add(Session::SESSION_FEEDBACK_NEGATIVE, Text::get('FEEDBACK_VERIFICATION_MAIL_SENDING_ERROR'));\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "2bc1c7e8d5eaa06ed7e9e0fd0775b8d6", "score": "0.62802047", "text": "function sendEmailConfirmation($username) {\n $account = User::where('username', $username)->first();\n if($account->active == '0') {\n $_SESSION['username'] = $account->username;\n $_SESSION['code'] = rand ( 10000 , 99999 );\n User::where('username', $account->username)->update(['code' => $_SESSION['code']]);\n Mail::to($account->email)->send(new ConfirmationEmail());\n return response()->json('Email Confirmation sent');\n } else {\n return response()->json('Email already confirmed', 401);\n }\n }", "title": "" }, { "docid": "63ae2d46ca570338a637bc16b913ee3b", "score": "0.6279887", "text": "public function onActivation(&$controller) {\n $controller->Setting->write('EmailSmtp.host', 'ssl://smtp.gmail.com', array(\n 'editable' => 1, \n 'description' => __d('email_smtp', 'Smtp host'))); \n $controller->Setting->write('EmailSmtp.username', 'username', array(\n 'editable' => 1, \n 'description' => __d('email_smtp', 'Smtp user'))); \n $controller->Setting->write('EmailSmtp.password', '', array(\n 'editable' => 1, \n 'input_type' => 'password',\n 'description' => __d('email_smtp', 'Smtp password'))); \n $controller->Setting->write('EmailSmtp.port', '465', array(\n 'editable' => 1, \n 'description' => __d('email_smtp', 'Smtp port')));\n $controller->Setting->write('EmailSmtp.timeout', '30', array(\n 'editable' => 1, \n 'description' => __d('email_smtp', 'Smtp timeout'))); \n\t}", "title": "" }, { "docid": "c2bc3a2d7dfcc1856aa6c8b0d3dacf03", "score": "0.6279276", "text": "function activate_user($email, $code)\n\t{\n\t\tglobal $setting;\n\t\t\n\t\t// Gather user\n\t\t$result = select(self::$table)->where('user_email = \"'.$email.'\" ')->limit(1)->result();\n\t\t\n\t\t// User is currently active so must type password in\n\t\tif ($result['is_active'] == 1)\n\t\t{\n\t\t\techo __('Account had activated before');\n\t\t\treturn false;\t\n\t\t}\n\t\t// User is banned, stop activation\n\t\telseif ($result['is_active'] == 0)\n\t\t{\n\t\t\techo __('You are banned');\t\n\t\t\treturn false;\t\n\t\t}\n\t\t// Activate user\n\t\telseif ($result['is_active'] == $code)\n\t\t{\n\t\t\techo __('Activation is completed');\n\t\t\t\n\t\t\t// Activate\n\t\t\t$result = update(self::$table)->values(array('is_active'=>1))->where('user_name = \"'.$email.'\" AND is_active = \"'.$code.'\" ')->result();\n\t\t\t\n\t\t\t// Signin! To sign in, we must decrypt user's password which is not a cool thing\n\t\t\t$this->signin($email,decrypt($result['user_pass']));\n\t\t\treturn false;\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "115fb17336ca225293a5360ea361045d", "score": "0.6275303", "text": "function Trigger_ActivationEmail(&$tNG) {\n $emailObj = new tNG_Email($tNG);\n $emailObj->setFrom(\"[email protected]\");\n $emailObj->setTo(\"{Email}\");\n $emailObj->setCC(\"\");\n $emailObj->setBCC(\"\");\n $emailObj->setSubject(\"Mail kích hoạt tài khoản của website bán linh kiện máy tính Star computer\");\n //FromFile method\n $emailObj->setContentFile(\"includes/mailtemplates/activate.html\");\n $emailObj->setEncoding(\"ISO-8859-1\");\n $emailObj->setFormat(\"HTML/Text\");\n $emailObj->setImportance(\"Normal\");\n return $emailObj->Execute();\n}", "title": "" }, { "docid": "1a77c474de51f9a3c618045938305136", "score": "0.6274092", "text": "public function activate()\n {\n if (!$this->account->status) {\n $this->account->status = Account::STATUS_ACTIVE;\n $this->account->registration_token = null;\n $result = $this->account->save();\n if ($result && $this->send_email) {\n $mailable = new RegistrationConfirmed($this->account, $this->account->profile);\n $mail = Mail::to($this->account->email, $this->account->profile->full_name);\n if ($this->queue_name) {\n $mailable->onQueue($this->queue_name);\n $mail->later(Carbon::now()->addMinute(), $mailable);\n } else {\n $mail->send($mailable);\n }\n }\n return $result;\n }\n return false;\n }", "title": "" }, { "docid": "9fc86062cd96bbfdb231f6092d58d280", "score": "0.626498", "text": "public function sendEmail()\n {\n $mailService = new MailService;\n $mailService->sendEmailVerification();\n }", "title": "" }, { "docid": "751af2d89b63cc6946cf243a975356bb", "score": "0.6263816", "text": "public function SendEmailToConfirm($email){\r\n\t\t$id = md5(uniqid(rand(),1));\r\n\t\t\r\n\t\t$query = \"UPDATE users SET hash=? WHERE email=?\";\r\n\t\t\r\n\t\t$params[0] = $id;\r\n\t\t$params[1] = $email;\r\n\t\t\r\n\t\t$this->dbaccess->run_prepared_query($query, $params);\r\n\t\t\r\n\t\tmail($email, \"Bekreft epostadresse\", \"http://kark.hin.no/~501428/validatelink.php?email=\" . $email . \"&id=\" . $id . \"&request=1\", \"From:[email protected]\");\r\n\t}", "title": "" }, { "docid": "700cf8cbf4896aa11a1bd9607b8f632e", "score": "0.6262729", "text": "function SendVerificationEmail($token, $user) {\r\n\trequire_once(\"../data/utility.php\");\r\n\trequire_once(\"../data/config.php\");\r\n\t$link = \"http://\".SERVER_IP.\"/verify.php?token=$token\";\r\n\t$body = \"Welcome to the SharpeConcepts Project.\r\nPlease visit the following link to verify your email address.\r\n$link\";\r\n\tSendEmail(\"Welcome to the SharpeConceptsProject\",$body,$user[\"'Email'\"]);\r\n}", "title": "" }, { "docid": "81c7fed780203d7c5540fe9b52d93cfd", "score": "0.62546426", "text": "public function sendUserCompleteActivated($recipient, array $params, $subject = 'VideoCV - Activate account completely') {\r\n $iTemplateID = 17;\r\n $result = $this->sendEmailWithCustomTransport($subject, $recipient, $iTemplateID, $params);\r\n return $result;\r\n }", "title": "" }, { "docid": "6285aab0a0da6bee3e7a632958f2ca78", "score": "0.6253071", "text": "function sendConfirmation(){\n\t$mail = new Zend_Mail();\n\t$body = EMAIL_CONFIRMATION_BODY;\n\t$name = getName();\n\t$toAddr = getEmail();\n\t$mail->setFrom(EMAIL_FROM_ADDR, EMAIL_FROM_NAME);\n\t$mail->addTo($toAddr, $name);\n\t$mail->setBodyText($body);\n\t$mail->setSubject(EMAIL_CONFIRMATION_SUBJECT);\n\t$mail->send();\n\tredirectSuccess();\n}", "title": "" }, { "docid": "9749e072c57d1c3f44e4bcb9b8656f29", "score": "0.62526906", "text": "public function sendactivationEmail($name, $code, $username, $password, $email, $usersid, $arrLangData, $arrParam) {\n\n $selectedcompid = $arrParam['selectedcompid'];\n $msg = \"Dear \" . str_replace(\"\\\\\", '', $name) . \"<br><br>\n Thank you for taking the time to move your \".DBS_CERT.\" application process to the new \" . $arrLangData[\"trustHead\"] . \" secure online service.<br /> <br />\n \" . $arrLangData[\"trustHead\"] . \" now provides to you the new E-bulk technology which will dramatically improve the way we process \".DBS_CERT.\" applications.<br /> <br />\n By taking advantage of this e-service we hope you will see instant improvement to the \".DBS.\" process and overall turnaround time of applications. This is accomplished by removing most of obstacles which delay applications:<br /><br />\n <ul>\n <li>Hand writing legibility</li>\n <li>Errors on forms</li>\n <li>Missing or incomplete information</li>\n <li>Delayed or lost post</li>\n <li>Transcribing of applicant details onto \".DBS.\" system</li>\n </ul>\n <br />\n\n What does this mean:<br /><br />\n <ul>\n <li>Fully online service from start to finish</li>\n <li>Full online training</li>\n <li>Greater Data Accuracy</li>\n <li>Faster Results</li>\n <li>Completely paperless process, NO POST!</li>\n <li>Online Results</li>\n </ul>\n <br/>\n \n To access and setup your online account please visit the secure website below and enter the username and password provided, you will then be guided through the online registration process:<br /><br />\n\n <a href=\\\"\" . $arrLangData[\"urlLink\"] . \"\\\">\" . $arrLangData[\"urlLink\"] . \"</a>\n\n <br /><br />\n User name : <b>$username</b><br>Password : <b>$password</b><br><br>\n\n Kind regards<br />\"\n . $arrLangData[\"kindRegards\"] . \"\";\n\n $msg2 = \"\n Dear \" . $name . \"\n\n Thank you for taking the time to move your \".DBS_CERT.\" application process to the new \" . $arrLangData[\"trustHead\"] . \" online service.\n\n \" . $arrLangData[\"trustHead\"] . \" now provides to you the new E-bulk technology which will dramatically improve the way we process \".DBS_CERT.\" applications.\n\n By taking advantage of this new e-service we hope you will see instant improvement to the \".DBS.\" process and overall turnaround time of applications. This is accomplished by removing most of obstacles which delay applications:\n\n 1. Hand writing legibility\n 2. Errors on forms\n 3. Missing or incomplete information\n 4. Delayed or lost post\n 5. Transcribing of applicant details onto \".DBS.\" system\n\n What does this mean:\n\n 1. Fully online service from start to finish\n 2. Full online training\n 3. Greater Data Accuracy\n 4. Faster Results\n 5. Completely paperless process, NO POST!\n 6. Online Results\n\n To access and setup your online account please visit the secure website below and enter the username and password provided, you will then be guided through the online registration process:\n\n \" . $arrLangData[\"urlLink\"] . \"\n\n Username : $username\n Password : $password\n\n\n Kind regards\"\n . $arrLangData[\"kindRegards\"] . \"\";\n\n\n\n $headers = \"MIME-Version: 1.0\\r\\n\";\n $headers .= \"Content-type: text/html; charset=iso-8859-1\\r\\n\";\n /* additional headers */\n $headers .= \"From: Disclosures.co.uk\\r\\n\";\n\n $mail = new htmlMimeMail();\n\n $text = $msg2;\n $html = $msg;\n\n $mail->setHtml($html, $text);\n if($selectedcompid==3)\n {\n $returnpath = \"[email protected]\";\n $frompath = \"[email protected]\";\n }\n else\n {\n $returnpath = \"[email protected]\";\n $frompath = \"[email protected]\";\n\n }\n $mail->setReturnPath($returnpath);\n $mail->setFrom($frompath);\n //$mail->setSubject('Activation of ' . $arrLangData[\"messageHead\"] . ' online account');\n $mail->setSubject('Activation of ' . $arrLangData[\"trustHead\"] . ' online account');\n $mail->setHeader('X-Mailer', 'HTML Mime mail class');\n $result = $mail->send(array($email), 'smtp');\n \n $today = time();\n $arrUser = array();\n $arrUser['email_sentdate'] = $today;\n $condition = \" user_id='$usersid'\";\n $this->Update('users', $arrUser,$condition);\n }", "title": "" }, { "docid": "b144014498d3ef8b6b2bbe70d8ca8087", "score": "0.62523407", "text": "public function sendActivationMail(string $newMail): bool\n {\n $token = $this->getToken();\n $url = $this->router->generate('svc_profile_change_mail_activate', ['token' => $token], UrlGeneratorInterface::ABSOLUTE_URL);\n\n $html = $this->twig->render('@SvcProfile/profile/changeMail/MT_activateMail.html.twig', ['url' => $url]);\n $text = $this->twig->render('@SvcProfile/profile/changeMail/MT_activateMail.text.twig', ['url' => $url]);\n $subject = $this->translator->trans('Activate new email address', [], 'ProfileBundle');\n\n return $this->mailerHelper->send($newMail, $subject, $html, $text);\n }", "title": "" }, { "docid": "86b4f3508942b6f5e16fe7f6e5ad301a", "score": "0.62490624", "text": "public function sendAccountActivateEmail($storeId = '0')\n\t{\n\t\tif (!Mage::getStoreConfig(MageParts_ConfirmCustomer_Helper_Data::MP_CC_ENABLED, $storeId)) {\n\t\t\treturn $this;\n\t\t}\n\n\t\t// make sure approval e-mails are enabled before sending any\n\t\t$enabled = (intval(Mage::getStoreConfig(self::XML_PATH_ACTIVATE_EMAIL_ENABLED, $storeId)) == 1) ? true : false;\n\n\t\t$translate = Mage::getSingleton('core/translate');\n\n\t\t/* @var $translate Mage_Core_Model_Translate */\n\t\t$translate->setTranslateInline(false);\n\n\t\tif (!$storeId) {\n\t\t\t$storeId = $this->_getWebsiteStoreId($this->getSendemailStoreId());\n\t\t}\n\n\t\tMage::getModel('core/email_template')\n\t\t\t->setDesignConfig(array('area' => 'frontend', 'store' => $storeId))\n\t\t\t->sendTransactional(\n\t\t\t\tMage::getStoreConfig(self::XML_PATH_ACTIVATE_EMAIL_TEMPLATE, $storeId),\n\t\t\t\tMage::getStoreConfig(self::XML_PATH_ACTIVATE_EMAIL_IDENTITY, $storeId),\n\t\t\t\t$this->getEmail(),\n\t\t\t\t$this->getName(),\n\t\t\t\tarray('customer' => $this));\n\n\t\t$translate->setTranslateInline(true);\n\n\t\treturn $this;\n\t}", "title": "" } ]
43fef3e8aeb81bf821d2caca2128d3b3
Test if disable offer works.
[ { "docid": "f57b16082142ee9794fd34ea2b783e70", "score": "0.7698445", "text": "public function test_it_disable_offer() {\n\n // Generate enabled offer\n $generatedOffer = factory(App\\Offer::class)->create(['disabled' => false]);\n\n $offer = Offer::find($generatedOffer->id);\n $offer->disabled = true;\n $offer->save();\n\n // Check in database in offer is disabled\n $this->seeInDatabase('offers', [\n 'id' => $offer->id,\n 'paymill_offer_id' => $offer->paymill_offer_id,\n 'disabled' => true\n ]);\n }", "title": "" } ]
[ { "docid": "a8ada77b565d1f447a718918bde380bc", "score": "0.73411447", "text": "public function isDisabled();", "title": "" }, { "docid": "a8ada77b565d1f447a718918bde380bc", "score": "0.73411447", "text": "public function isDisabled();", "title": "" }, { "docid": "a8ada77b565d1f447a718918bde380bc", "score": "0.73411447", "text": "public function isDisabled();", "title": "" }, { "docid": "6fc4b4b2715eec0818127c22410e6518", "score": "0.7183623", "text": "public function disable(): bool {}", "title": "" }, { "docid": "ac1f0e0cdee34f65bd7578b8917838fa", "score": "0.71571624", "text": "public function isDisabled(): bool;", "title": "" }, { "docid": "7d03e78792c0cccf093a981d24592d59", "score": "0.71167725", "text": "public static function can_be_disabled() {\n return true;\n }", "title": "" }, { "docid": "935fe42afbe5887279a8afe3fd76ff7c", "score": "0.7089799", "text": "public function test_it_enable_offer() {\n\n // Generate new offer\n $generatedOffer = factory(App\\Offer::class)->create();\n\n $offer = Offer::find($generatedOffer->id);\n $offer->disabled = false;\n $offer->save();\n\n // Check in database if offer is enabled\n $this->seeInDatabase('offers', [\n 'id' => $offer->id,\n 'paymill_offer_id' => $offer->paymill_offer_id,\n 'disabled' => false\n ]);\n }", "title": "" }, { "docid": "a70c49284c6784306600cc640b024359", "score": "0.7059307", "text": "public function isDisabled()\n {\n Application::executeControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), \"isDisabled\", Application::PRIORITY_LOW);\n }", "title": "" }, { "docid": "0092743f1bb085345bb098e539cd8e5b", "score": "0.68909305", "text": "public function isDisabled() {\n\n if (!isset($this->data['degraded_backoff'])) {\n $this->data['degraded_backoff'] = WSCONFIG_DEFAULT_DEGRADED_BACKOFF;\n }\n\n if (isset($this->data['degraded']) and $this->data['degraded'] < time() - $this->data['degraded_backoff']) {\n $this->enable(TRUE);\n return FALSE;\n }\n\n return isset($this->data['disabled']) ? $this->data['disabled'] : FALSE;\n }", "title": "" }, { "docid": "ddaba82ff9a00418e6756f3de1a6357e", "score": "0.6743247", "text": "public function testIsDisabled()\n\t {\n\t\t$this->assertEquals(false, $this->object->isDisabled(\"testform\", \"field\"));\n\t\t$this->assertEquals(true, $this->object->isDisabled(\"testform\", \"extrafield\"));\n\t\t$this->assertEquals(false, $this->object->isDisabled(\"anotherform\", \"extrafield\"));\n\t }", "title": "" }, { "docid": "c839deff69ccabd9f7a0dbddb19ef751", "score": "0.67183197", "text": "private function isDisabledNegativeProfit()\n {\n\t\tif(\\Cart2Quote\\License\\Model\\License::getInstance()->isValid()) {\n\t\t\treturn $this->scopeConfig->getValue(\n 'cart2quote_advanced/negativeprofit/disable_negative_profit',\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n\t\t}\n\t}", "title": "" }, { "docid": "a81638ffaa3aa3ef3f77249b512d288f", "score": "0.66295826", "text": "private function isDisabledNegativeProfit()\n {\n return $this->_scopeConfig->getValue(\n 'cart2quote_advanced/negativeprofit/disable_negative_profit',\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n }", "title": "" }, { "docid": "8ba7220863b336b5096bf3f473014e18", "score": "0.66139364", "text": "public function disabled(): bool\n {\n return ! $this->enabled();\n }", "title": "" }, { "docid": "87270af4ed3ea4d21a095851849dfa40", "score": "0.6571975", "text": "public function onDisable();", "title": "" }, { "docid": "0913e05859977fbae864fb8cbf49ecd7", "score": "0.6477425", "text": "public function isDisabled(): bool\n {\n return $this->disabled ?? false;\n }", "title": "" }, { "docid": "c52ca4c3c94a89c59349479a6432b419", "score": "0.64736867", "text": "abstract public function is_enabled();", "title": "" }, { "docid": "3d8ae58551e5002eef09b6e6eb3ef619", "score": "0.6443315", "text": "public function disabled()\n {\n return ! $this->enabled();\n }", "title": "" }, { "docid": "f6c4b1e285e0ec2a2f626d5111689470", "score": "0.64330006", "text": "public function disabled()\n\t{\n\t\treturn !$this->enabled();\n\t}", "title": "" }, { "docid": "dddc790df1c9d188601c67a3854c7461", "score": "0.64113367", "text": "public function disable(){\n \t\treturn $this->productService->disable( $$this->id );\n \t}", "title": "" }, { "docid": "73ea42e223a9b0c741d31a14266cd63c", "score": "0.6383666", "text": "public function is_disabled() {\r\n\t\treturn $this->status == Scheduler::STATUS_DISABLED;\r\n\t}", "title": "" }, { "docid": "3bfa24bb89ba90e8256a36d0b7615d1f", "score": "0.6380843", "text": "public function getDisableFilterOffer() {\n\t\treturn $this->disableFilterOffer;\n\t}", "title": "" }, { "docid": "0f0c826fec493c44cb0211fc881043e7", "score": "0.633859", "text": "protected function _runIfDisabled()\n\t{\n\t}", "title": "" }, { "docid": "4a442a07717536798db79fbb0d4e8ad0", "score": "0.6330001", "text": "public function is_available() {\n if ($this->enabled == 'no'){\n return false;\n }\n \n return true;\n }", "title": "" }, { "docid": "9d9621f5f4fa0587dcc9e488d184ba26", "score": "0.6326127", "text": "public function disabled()\n {\n return !$this->enabled;\n }", "title": "" }, { "docid": "f69683b202d54138bff8a4775cdbae0e", "score": "0.63207656", "text": "public function isDisabled()\n {\n return $this->attributes['profile_id'] == self::DISABLED_ID;\n }", "title": "" }, { "docid": "9c766d38d0d9ba201d7b2aeb76eb3963", "score": "0.6270689", "text": "public static function isPaymentDisabled()\n {\n return (\n get_option( 'ab_settings_pay_locally' ) == 'disabled' &&\n get_option( 'ab_paypal_type' ) == 'disabled' &&\n get_option( 'ab_authorizenet_type' ) == 'disabled' &&\n get_option( 'ab_2checkout' ) == 'disabled' &&\n get_option( 'ab_stripe' ) == 'disabled' &&\n get_option( 'ab_payulatam' ) == 'disabled' &&\n get_option( 'ab_payson' ) == 'disabled' &&\n get_option( 'ab_mollie' ) == 'disabled'\n );\n }", "title": "" }, { "docid": "c9ba4d8abb323a2166bd32c3d9748276", "score": "0.6256168", "text": "public function isOptionDisabled($option);", "title": "" }, { "docid": "54ba3c83b681d18de35ae89686fb62ea", "score": "0.6255768", "text": "public function isDisabled(): bool\n\t{\n\t\treturn $this->isDisabled;\n\t}", "title": "" }, { "docid": "a8e956dbe1aa481ee2f824b4835a0cc1", "score": "0.6255523", "text": "public function onDisable() {\n\t}", "title": "" }, { "docid": "255ce6375a17e4475c181cc47fc3e044", "score": "0.62352157", "text": "public function disable();", "title": "" }, { "docid": "255ce6375a17e4475c181cc47fc3e044", "score": "0.62352157", "text": "public function disable();", "title": "" }, { "docid": "255ce6375a17e4475c181cc47fc3e044", "score": "0.62352157", "text": "public function disable();", "title": "" }, { "docid": "7e347a44da3298c6bbc961aea416750b", "score": "0.62318933", "text": "public function disabled(): bool\n {\n return $this->disabled;\n }", "title": "" }, { "docid": "981ab4e3ef6844f55dda93768b34e8f6", "score": "0.6209709", "text": "public function testWhenCurrencyWasEnabledDisabled()\n {\n /* @var ReadModelCurrency $currency */\n $this\n ->given($currencyId = $this->addCurrency())\n ->then()\n ->object($currency = $this->repository()->get($currencyId))\n ->isInstanceOf(ReadModelCurrency::class)\n ->boolean($currency->isEnabled())\n ->isTrue()\n ->and()\n ->when($this->commandBus()->dispatch(new DisableCurrencyCommand($currencyId->toNative())))\n ->then()\n ->object($currency = $this->repository()->get($currencyId))\n ->isInstanceOf(ReadModelCurrency::class)\n ->boolean($currency->isEnabled())\n ->isFalse()\n ->and()\n ->when($this->commandBus()->dispatch(new EnableCurrencyCommand($currencyId->toNative())))\n ->then()\n ->object($currency = $this->repository()->get($currencyId))\n ->isInstanceOf(ReadModelCurrency::class)\n ->boolean($currency->isEnabled())\n ->isTrue()\n ;\n }", "title": "" }, { "docid": "366ce5d75a990d927879aa79ac32adec", "score": "0.62049556", "text": "public static function allow_non_connected_sellers() {\n $settings = self::get_settings();\n\n return ! empty( $settings['allow_non_connected_sellers'] ) && 'yes' === $settings['allow_non_connected_sellers'];\n }", "title": "" }, { "docid": "b8839f66877902254dc599d830f02ee8", "score": "0.6204717", "text": "public function isDisabled()\n {\n return $this->disabled;\n }", "title": "" }, { "docid": "b8839f66877902254dc599d830f02ee8", "score": "0.6204717", "text": "public function isDisabled()\n {\n return $this->disabled;\n }", "title": "" }, { "docid": "5fbe00334eb87850facecf40594e525e", "score": "0.61768556", "text": "public function disabled()\n {\n return !$this->active;\n }", "title": "" }, { "docid": "19c42faedc2e421f080ae94c09db032b", "score": "0.6166502", "text": "public function isDisabled() {\n\t\treturn $this->disabled;\n\t}", "title": "" }, { "docid": "5e4e0b86de39a0d9eeed3ba5da022957", "score": "0.6142131", "text": "public function testDisabled() {\n\t\t$siteConfig = $this->objFromFixture('SiteConfig', 'default');\n\t\t$siteConfig->setField('MailblockEnabled', FALSE);\n\t\t$siteConfig->write();\n\t\t$email = $this->setUpEmail();\n\t\t$email->send();\n\t\t$this->assertEmailSent('[email protected]', null, null, null);\n\t}", "title": "" }, { "docid": "c3c9a1216ac0a8a142d78ad1625f0e07", "score": "0.6090629", "text": "function tst_is_disable_export() {\n return !current_user_can( 'manage_options' );\n}", "title": "" }, { "docid": "9d606efc9ec8f7d8bec2af9940a3c287", "score": "0.6076925", "text": "public function get_disabled_vols(): bool {\n\t\treturn $this->disabled_vols; }", "title": "" }, { "docid": "1e1035e4da46ff335911eab19e19f3c8", "score": "0.6047726", "text": "function is_disabled($text)\n{ \n\tif (empty($text)) {\n\t\treturn 1;\n\t}\n\t$text = trim($text);\n\t$text = strtolower($text);\n\t\n\t$words = array(\"false\", \"no\", \"off\", \"disabled\", \"disable\", \"0\");\n\tif (in_array($text, $words)) {\n\t\treturn 1;\n\t}\n\treturn NULL;\n}", "title": "" }, { "docid": "323fa3e00169b4f71aaa497e6c4ba7ec", "score": "0.60414857", "text": "public function testDisableEnable() {\n $this->assertSame($this->component, $this->component->disable());\n $this->assertSame($this->component, $this->component->enable());\n }", "title": "" }, { "docid": "2b4d2a817325e98bfd4b5fa3410d501d", "score": "0.6040764", "text": "public function getIsDisabled(){\n return Mage::getStoreConfigFlag('easylife_gridenhancer/disable/'.$this->getGridIdentifier());\n }", "title": "" }, { "docid": "8d6390bb4a5fd7045394a36fd03bd9fe", "score": "0.603148", "text": "public function disable() {\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "c42fbac0305da48078bfcdc1429fd66f", "score": "0.60280824", "text": "abstract public function isEnabled();", "title": "" }, { "docid": "74616eb3846d48f5459205eb4eb2aa24", "score": "0.60257405", "text": "public function enable(): bool {}", "title": "" }, { "docid": "18f70510b37ef0cc8cf9ef7a75a09692", "score": "0.600989", "text": "public function deny(): bool\n {\n if (!$this->isPending()) {\n return false;\n }\n\n return $this->update(['status' => 'denied']);\n }", "title": "" }, { "docid": "a61a49807312cec86dde671d6c5e47ff", "score": "0.6005919", "text": "protected function isUnavailable()\n {\n return false;\n }", "title": "" }, { "docid": "fea499aa61d8b3c5190be32ea3da1a90", "score": "0.598776", "text": "public function getIsOfferAttribute() {\n return !!$this->old_price;\n }", "title": "" }, { "docid": "d2856d0e83569e4e0017d35d70ecf1fb", "score": "0.5985852", "text": "public function isEnabled()\n\t{\n\t\treturn Mage::helper('cloudsponge')->isEnabled();\n\t}", "title": "" }, { "docid": "b0596bc9e2a6a9e2bbb10fd503137a11", "score": "0.5975542", "text": "function testEnabled()\n\t{\n\t\t$this->open(\"active-controls/index.php?page=ActiveRatingListEnabledTest\");\n\t\t$this->verifyTextPresent(\"TActiveRatingList Enabled Test Case\");\n\t\t$this->assertText(\"Status\", \"Enabled=false\");\n\t\t$this->assertCheckBoxes(\"RatingList\", array(5), 6);\n\n\t\t$this->clickTD(\"RatingList_c4\");\n\t\t$this->pause(800);\n\t\t$this->assertText(\"Status\", \"Enabled=false\");\n\t\t$this->assertCheckBoxes(\"RatingList\", array(5), 6);\n\t\t\n\t\t// Then set Enable to true, and make sure it works.\n\t\t$this->click(\"Enable\");\n\t\t$this->pause(800);\n\t\t$this->assertText(\"Status\", \"Enabled=true\");\n\t\t$this->assertCheckBoxes(\"RatingList\", array(5), 6);\n\t\t\n\t\t\n\t\t$this->clickTD(\"RatingList_c3\");\n\t\t$this->pause(800);\n\t\t$this->assertText(\"Status\", \"4 : Good\");\n\t\t$this->assertCheckBoxes(\"RatingList\", array(3), 6);\n\t\t\n\t\t// Then set Enable to false, and make sure it doesn't work anymore.\n\t\t$this->click(\"Disable\");\n\t\t$this->pause(800);\n\t\t$this->assertText(\"Status\", \"Enabled=false\");\n\t\t$this->assertCheckBoxes(\"RatingList\", array(3), 6);\n\t\t\n\t\t\n\t\t$this->clickTD(\"RatingList_c5\");\n\t\t$this->pause(800);\n\t\t$this->assertText(\"Status\", \"Enabled=false\");\n\t\t$this->assertCheckBoxes(\"RatingList\", array(3), 6);\n\t}", "title": "" }, { "docid": "78714873a5399b5c86f13a9263146c0c", "score": "0.59629947", "text": "public function isEnabled()\n {\n return false;\n }", "title": "" }, { "docid": "cb047fb10f3a18baa736c0e8c86243a6", "score": "0.5961507", "text": "public function isEnabled();", "title": "" }, { "docid": "cb047fb10f3a18baa736c0e8c86243a6", "score": "0.5961507", "text": "public function isEnabled();", "title": "" }, { "docid": "cb047fb10f3a18baa736c0e8c86243a6", "score": "0.5961507", "text": "public function isEnabled();", "title": "" }, { "docid": "cb047fb10f3a18baa736c0e8c86243a6", "score": "0.5961507", "text": "public function isEnabled();", "title": "" }, { "docid": "cb047fb10f3a18baa736c0e8c86243a6", "score": "0.5961507", "text": "public function isEnabled();", "title": "" }, { "docid": "cb047fb10f3a18baa736c0e8c86243a6", "score": "0.5961507", "text": "public function isEnabled();", "title": "" }, { "docid": "cb047fb10f3a18baa736c0e8c86243a6", "score": "0.5961507", "text": "public function isEnabled();", "title": "" }, { "docid": "cb047fb10f3a18baa736c0e8c86243a6", "score": "0.5961507", "text": "public function isEnabled();", "title": "" }, { "docid": "cb047fb10f3a18baa736c0e8c86243a6", "score": "0.5961507", "text": "public function isEnabled();", "title": "" }, { "docid": "cb047fb10f3a18baa736c0e8c86243a6", "score": "0.5961507", "text": "public function isEnabled();", "title": "" }, { "docid": "cb047fb10f3a18baa736c0e8c86243a6", "score": "0.5961507", "text": "public function isEnabled();", "title": "" }, { "docid": "339c7d9be3ae55cd83c3c0fe42dc718d", "score": "0.5957334", "text": "public function is_disabled()\n\t{\n\t\treturn $this->bit_state( 'userAccountControl', Enums\\UAC::AccountDisable );\n\t}", "title": "" }, { "docid": "2f1ad453e5181922bcd1aea20b8a6756", "score": "0.5957136", "text": "public function testDecreaseToTargetDisabled()\n {\n $pricer = $this->getFeesPricer()\n ->setNoCompetitorPolicy(Pricer::BASE_PRICE);\n\n $price = $pricer->getWinningPrice(35.00, 6.00);\n $this->assertEquals(WinningPrice::BASE, $price->type);\n }", "title": "" }, { "docid": "3466b90c6c3dd2fecba8d43e9f661058", "score": "0.5949717", "text": "public function isAvailable() {\n return false;\n }", "title": "" }, { "docid": "ed7c4e19ac5176f79471cbe740b02e9a", "score": "0.5948972", "text": "public function isEnabled()\n {\n return !Mage::helper('klarna_kco/checkout')->getShippingInIframe() && !$this->getQuote()->isVirtual();\n }", "title": "" }, { "docid": "ade02f719a70dfe93369fca559e6e8ff", "score": "0.59447265", "text": "protected function getAvailability()\r\n\t{\r\n\t\ttry \r\n\t\t{\r\n\t\t\t$message = $this->services->getCrawler()->filter('.search_noproducts')->text();\r\n\t\t\t$this->product->setAvailable(false);\r\n\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tcatch (\\Exception $e) { }\r\n\r\n\t\t// if the out of stock message isn't there then it's in stock\r\n\t\t$this->product->setAvailable(true);\r\n\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "2cae573afcbb5003a8644f9078cc2feb", "score": "0.59207976", "text": "function isEnabled();", "title": "" }, { "docid": "3689d0fbeb58464af924922c993529ae", "score": "0.5914851", "text": "public function disable()\n {\n $this->disabled = true;\n }", "title": "" }, { "docid": "3689d0fbeb58464af924922c993529ae", "score": "0.5914851", "text": "public function disable()\n {\n $this->disabled = true;\n }", "title": "" }, { "docid": "4153607f1201f02877a9a86b54893c11", "score": "0.5913627", "text": "public function disable () {\n\n $this->disabled = true;\n\n }", "title": "" }, { "docid": "75a372881856faa53df5c40a353051d0", "score": "0.5913103", "text": "public function test_disable_player_confirmations() {\n $this->get_tournament_inactive();\n $this->assertTrue($this->object->disable_player_confirmations());\n $this->assertEquals('Building', $this->object->status);\n }", "title": "" }, { "docid": "6254db639782706f566748c2e78831ce", "score": "0.58866847", "text": "public function get_disabled()\r\n\t{\r\n\t\treturn $this->get_attr('disabled') === 'disabled';\r\n\t}", "title": "" }, { "docid": "33d921279d41617c0a803693a075f73a", "score": "0.58855075", "text": "public function disabled($name) : bool\n {\n return !$this->enabled($name);\n }", "title": "" }, { "docid": "33d921279d41617c0a803693a075f73a", "score": "0.58855075", "text": "public function disabled($name) : bool\n {\n return !$this->enabled($name);\n }", "title": "" }, { "docid": "2e499ef89be83e083fc41c7e72a42db0", "score": "0.587865", "text": "public function ignoreDisabled()\n {\n return $this->getConfig('channelunityint/generalsettings/ignoredisabledproducts');\n }", "title": "" }, { "docid": "aa8f5721b72501f6acc3e6252c551440", "score": "0.5878374", "text": "protected function getAvailability()\r\n\t{\r\n\t\t// try \r\n\t\t// {\r\n\t\t// \t$message = $this->services->getCrawler()->filter('span.soldout')->text();\r\n\r\n\t\t// \tif ($message) {\r\n\t\t// \t\t$this->product->setAvailable(false);\r\n\t\t// \t\treturn false;\r\n\t\t// \t} else {\r\n\t\t// \t\t$this->product->setAvailable(true);\r\n\t\t// \t\treturn true;\r\n\t\t// \t}\r\n\t\t\t\r\n\t\t// }\r\n\t\t// catch (\\Exception $e)\r\n\t\t// {\r\n\t\t// \t// if the out of stock message isn't there then it's in stock\r\n\t\t// \t$this->product->setAvailable(true);\r\n\t\t\treturn true;\r\n\t\t// }\r\n\t}", "title": "" }, { "docid": "fc219c04391010ab97003b0cfe621cea", "score": "0.5873188", "text": "public static function isAllowDisputes()\n {\n return static::isMultivendor() && (!static::isWarehouse() || static::isVendorAllowedToCommunicate());\n }", "title": "" }, { "docid": "3ccb9ba74f051e48c25b656eb4055256", "score": "0.5870277", "text": "public function hasUnlockEquip(){\n return $this->_has(14);\n }", "title": "" }, { "docid": "6fa6d760bcb9e06dd010591ac57eec8e", "score": "0.58691865", "text": "public function hasOffer()\n {\n if(\n ($this->offer_price > 0) &&\n ($this->offer_price < $this->sale_price) &&\n ($this->offer_start < Carbon::now()) &&\n ($this->offer_end > Carbon::now())\n )\n return TRUE;\n\n return FALSE;\n }", "title": "" }, { "docid": "ff7a774b31cc0c219664e22609c06fac", "score": "0.58677197", "text": "protected function getAvailability()\r\n\t{\r\n\t\ttry \r\n\t\t{\r\n\t\t\t$message = $this->services->getCrawler()->filter('div#content > h2.heading')->text();\r\n\t\t\t$this->product->setAvailable(false);\r\n\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tcatch (\\Exception $e)\r\n\t\t{\r\n\t\t\t// if the out of stock message isn't there then it's in stock\r\n\t\t\t$this->product->setAvailable(true);\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "ff7a774b31cc0c219664e22609c06fac", "score": "0.58677197", "text": "protected function getAvailability()\r\n\t{\r\n\t\ttry \r\n\t\t{\r\n\t\t\t$message = $this->services->getCrawler()->filter('div#content > h2.heading')->text();\r\n\t\t\t$this->product->setAvailable(false);\r\n\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tcatch (\\Exception $e)\r\n\t\t{\r\n\t\t\t// if the out of stock message isn't there then it's in stock\r\n\t\t\t$this->product->setAvailable(true);\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "0eab357110b4e5633aca2c6ef87b3b5f", "score": "0.5864785", "text": "public function isEnabled() {\n return !$this->attrExists(\"disabled\");\n }", "title": "" }, { "docid": "d6f889b9fd9f25f09a1ca08e7e97b977", "score": "0.5863804", "text": "public function isDisabled()\n {\n if (!$this->PageLink) {\n return true;\n }\n \n return parent::isDisabled();\n }", "title": "" }, { "docid": "9c155d7b413a70aad753dbaa7193e567", "score": "0.583662", "text": "private function _disable()\n {\n // Allow the user to switch of the bar with the Disable phrase\n $disable = Zend_Controller_Front::getInstance()->getRequest()->getParam('CBDDISABLE');\n\n // Do not display the Bar if this is an AJAX request or disabled\n if ($this->getRequest()->isXmlHttpRequest() || $disable) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "5add263bcd92a60c9f131a2e86a141e0", "score": "0.58345723", "text": "public function getDisabled()\n {\n return isset($this->disabled) ? $this->disabled : false;\n }", "title": "" }, { "docid": "51b1b7841e590093e8a81fe1f0d0cb0c", "score": "0.5830264", "text": "public function enabled();", "title": "" }, { "docid": "00f7579d8f442e45c8a1fd1fc1efac0b", "score": "0.5824626", "text": "public function isEnabled(): bool;", "title": "" }, { "docid": "00f7579d8f442e45c8a1fd1fc1efac0b", "score": "0.5824626", "text": "public function isEnabled(): bool;", "title": "" }, { "docid": "a9eee3b09a499846f2850bc792fbeef3", "score": "0.5820191", "text": "public function disabled($which)\n\t{\n\t\treturn in_array($which, $this->_disabled);\n\t}", "title": "" }, { "docid": "0bc0c489c56a6bbaa68c7223641463f0", "score": "0.5817812", "text": "function is_disabled() {\n\t\t\treturn $_SERVER['HTTP_HOST'] === $this->server_name;\n\t\t}", "title": "" }, { "docid": "b7a43a1175a8bb320c6e37c308cbb5f1", "score": "0.5817067", "text": "public function isDisabled()\n {\n// if (!Yii::$app->user->identity->isAdmin) {\n// return true;\n// }\n return parent::isDisabled();\n }", "title": "" }, { "docid": "e17226f4b28d6ac73d81c4f139733982", "score": "0.5810238", "text": "public function disable()\n {\n $this->enabled = 'n';\n }", "title": "" }, { "docid": "6f5bc447382af689c50af64d48de2101", "score": "0.5804588", "text": "public function isEnabled()\n {\n return Mage::helper(\"luca_helloworld\")->isEnabled();\n }", "title": "" }, { "docid": "624b32853335bb9e99222aa7d884f006", "score": "0.5802425", "text": "public function getIsEnable();", "title": "" }, { "docid": "9a1d59c62061fa7862be32e2178115d5", "score": "0.5801637", "text": "public function testChangeOfferPriceAction_RejectedOffer()\n {\n $this->addFixture(new LoadChangeOfferPriceData());\n $this->loadFixtures();\n $body = array('newPrice' => '10');\n $jsonBody = json_encode($body);\n $client = static::createClient();\n $client->request('POST', '/offers/5/changePrice', array(), array(),\n array('HTTP_X_SESSION_ID' => 'sampleSession'), $jsonBody);\n $this->assertEquals(403, $client->getResponse()->getStatusCode(), \"Rejected Offer, Changing Price Is Not Permitted\");\n }", "title": "" }, { "docid": "fdbadd1deca33fb27a6c983deedd807d", "score": "0.5796817", "text": "protected function _disable()\n {\n $this->_changeModuleOptions(self::DISABLE);\n }", "title": "" } ]
c54026287a36959c7787dde25695e130
Check all article links.
[ { "docid": "b3d77590f94a8e5ed296f1aca6cb9244", "score": "0.78585017", "text": "public function checkAll()\n {\n $time = time();\n echo \"Regenerating article links\\n\";\n\n $list = oxNew('oxarticlelist');\n $view = getViewName('oxarticles');\n $list->selectString(\"SELECT * FROM {$view} WHERE oxactive = 1\");\n\n $index = 0;\n\n foreach ($list as $item) {\n $this->flushArticleLinks($item);\n echo '.';\n $index++;\n if ($index % 50 == 0 || $index == $list->count()) {\n echo round(100 * $index / $list->count()) . \"%\\n\";\n }\n }\n\n echo 'Done in ' . (time() - $time) . \" seconds \\n\";\n }", "title": "" } ]
[ { "docid": "c870b477084a1aaf94ac28023041c938", "score": "0.65174705", "text": "function testFindAllLinks()\n {\n $this->shortenerService->shorten(\"http://yahoo.fr\");\n $this->shortenerService->shorten(\"http://google.fr\");\n $this->shortenerService->shorten(\"http://msn.fr\");\n $this->shortenerService->shorten(\"http://facebook.fr\");\n $links = $this->shortenerService->findAllLinks();\n $this->assertCount(4,$links);\n }", "title": "" }, { "docid": "4011a17d8b598ef91ada2d7720dd60f0", "score": "0.62059546", "text": "public function verifyLinkedContent() {\n\t\t$db = dims::getInstance()->getDb();\n\t\tif (isset($this->fields[\"id_article_link\"]) && $this->fields[\"id_article_link\"] > 0) {\n\t\t\t$art_temp = new wce_article;\n\t\t\t$art_temp->open($this->fields[\"id_article_link\"]);\n\n\t\t\tif (isset($art_temp->fields['content1'])) {\n\t\t\t\tfor ($i = 1; $i < $this->nbelement; $i++)\n\t\t\t\t\t$this->fields['content' . $i] = $art_temp->fields['content' . $i];\n\t\t\t}\n\t\t\t// on prend aussi le model si il y a des blocs\n\t\t\t$this->fields[\"model\"] = $art_temp->fields[\"model\"];\n\t\t\t$this->fields[\"timestp_published\"] = $art_temp->fields[\"timestp_published\"];\n\t\t}\n\t}", "title": "" }, { "docid": "6a1488c4132f75f7ec731f60f24ddfba", "score": "0.6025266", "text": "public function testLinksAndPages() {\n $this->drupalLogin($this->createUser(['access content']));\n $this->drupalLogin($this->createUser(['access content']));\n $assert = $this->assertSession();\n $links = [\n '' => Url::fromRoute('testing_example.description'),\n ];\n // Go to the page and see if the link appears on it.\n foreach ($links as $page => $path) {\n $this->drupalGet($page);\n $assert->linkByHrefExists($path->getInternalPath());\n }\n // Visit all the links and make sure they return 200.\n foreach ($links as $path) {\n $this->drupalGet($path);\n $assert->statusCodeEquals(200);\n }\n }", "title": "" }, { "docid": "76ba3ba78ceac12b8e74ebf708b1df6f", "score": "0.5988172", "text": "public function testGetArticles()\n {\n $oDelivery = oxNew('oxDelivery');\n $oDelivery->load($this->_sOxId);\n\n // Main check\n $this->assertEquals(3, count($oDelivery->getArticles()));\n foreach ($oDelivery->getArticles() as $sId) {\n $this->assertTrue(in_array($sId, $this->aArticleIds));\n }\n }", "title": "" }, { "docid": "053fa62f57e498bd34d86a75b812fb75", "score": "0.59458244", "text": "public function hasHref();", "title": "" }, { "docid": "b6f6cc70db15eb5cb30907d6b02ea2fa", "score": "0.59325296", "text": "private function extractLinks(): void\n {\n collect([\n ImportCommLink::POST_SELECTOR,\n ImportCommLink::SPECIAL_PAGE_SELECTOR,\n ])->each(function (string $selector) {\n $this->commLink->filter($selector)->filterXPath('//a')->each(\n function (Crawler $crawler) {\n $href = $crawler->attr('href');\n\n if (null !== $href && null !== parse_url($href, PHP_URL_HOST)) {\n $this->links[] = [\n 'href' => $href,\n 'text' => $crawler->text(),\n ];\n }\n }\n );\n\n $this->commLink->filter($selector)->filterXPath('//iframe')->each(\n function (Crawler $crawler) {\n $src = $crawler->attr('src');\n\n if (null !== $src && null !== parse_url($src, PHP_URL_HOST)) {\n if (null === parse_url($src, PHP_URL_SCHEME)) {\n $src = 'https:' . $src;\n }\n\n $this->links[] = [\n 'href' => $src,\n 'text' => 'iframe',\n ];\n }\n }\n );\n });\n }", "title": "" }, { "docid": "e45bd3af7aa42a1816d39814a33ef6ff", "score": "0.5904316", "text": "protected function gather_links($content)\n {\n }", "title": "" }, { "docid": "245ad526f3e464f83b385c4d80d401e6", "score": "0.5901247", "text": "protected function verify_links($links) {\n foreach ($links as $link) {\n Assertions::assertTrue($this->helper_context->getSession()\n ->getPage()\n ->hasLink($link), $link . ' link not found');\n }\n }", "title": "" }, { "docid": "6e72fc0fcf172ea0b6d0dfa334102967", "score": "0.5801765", "text": "public function testMainPageLinksAvailability()\n {\n $client = static::createClient();\n $crawler = $client->request('GET', '/');\n\n $this->assertTrue($client->getResponse()->isSuccessful());\n\n // Logo and menu with word \"Weather\"\n $this->assertCount(2, $crawler->filter('a:contains(\"Weather\")'));\n $this->assertCount(1, $crawler->filter('a:contains(\"API\")'));\n $this->assertCount(1, $crawler->filter('a:contains(\"Providers\")'));\n $this->assertCount(1, $crawler->filter('a:contains(\"Login\")'));\n $this->assertCount(1, $crawler->filter('a:contains(\"Register\")'));\n }", "title": "" }, { "docid": "ffd98174df4d33ea8f1f212f1fe6a524", "score": "0.579306", "text": "public function updateSeoUrlForAllArticles(): void\n {\n $this->seoUrlUpdater->update(BlogSeoUrlRoute::ROUTE_NAME, []);\n }", "title": "" }, { "docid": "8fcb346173b8b8472b037f8029ec4449", "score": "0.57467", "text": "public function checkLinkTags(){\n\t\t//check link tags\n\t\t$links = array();\n\t\tforeach($this->parser->getTags('link') as $node){\n\t\t\tif(isset($node->attributes['rel']) && $node->attributes['rel'] === 'stylesheet'){\n\t\t\t\tif(!isset($links[$node->host]))\n\t\t\t\t\t$links[$node->host] = array();\n\t\t\t\t\n\t\t\t\tarray_push($links[$node->host], $node);\n\t\t\t}\n\t\t}\n\t\treturn $links;\n\t}", "title": "" }, { "docid": "78cf4b06e57169b5708202a02e179c52", "score": "0.5716508", "text": "function fetchlinks($URI)\n {\n }", "title": "" }, { "docid": "cd4d32de61a59d7fef76a586176ea1ad", "score": "0.5670228", "text": "public function isLink () {}", "title": "" }, { "docid": "cd4d32de61a59d7fef76a586176ea1ad", "score": "0.5670228", "text": "public function isLink () {}", "title": "" }, { "docid": "cd4d32de61a59d7fef76a586176ea1ad", "score": "0.5670228", "text": "public function isLink () {}", "title": "" }, { "docid": "cd4d32de61a59d7fef76a586176ea1ad", "score": "0.5670228", "text": "public function isLink () {}", "title": "" }, { "docid": "cd4d32de61a59d7fef76a586176ea1ad", "score": "0.5670228", "text": "public function isLink () {}", "title": "" }, { "docid": "c89646d83a543273e1a04afe4d74114e", "score": "0.56421363", "text": "public function get_links() {}", "title": "" }, { "docid": "c1ffb9517016f11fd73208ff5ff53bc4", "score": "0.5554346", "text": "function _expandlinks($links, $URI)\n {\n }", "title": "" }, { "docid": "45207c04e4e678f40b46fb726974c461", "score": "0.5540875", "text": "private function testUrls(){\n\t}", "title": "" }, { "docid": "722ec770c49a21f2929185f8c8b921ea", "score": "0.552779", "text": "private function getLinks(): array {\n $goodLinks = [];\n\n $parentNode = $this->article()->getTopNode()->parent();\n\n if ($parentNode instanceof Element) {\n $candidates = $parentNode->find('a[href]');\n\n foreach ($candidates as $el) {\n if ($el->attr('href') != '#' && trim($el->attr('href')) != '') {\n $goodLinks[] = [\n 'url' => $el->attr('href'),\n 'text' => Helper::textNormalise($el->text()),\n ];\n }\n }\n }\n\n return $goodLinks;\n }", "title": "" }, { "docid": "72f38eb0e3c39d4efac227446c960004", "score": "0.55277807", "text": "static function get_links($body) {\n\t\t$pattern = \"/((http\\:\\/\\/)?www\\.[a-z0-9\\.\\:\\-\\_\\/\\~\\@\\%]*)/i\";\n\t\t//End pattern building.\n\t\tpreg_match_all ($pattern, $body, $matches);\n\t\treturn (is_array($matches)) ? $matches:FALSE;\n\t}", "title": "" }, { "docid": "a555bca8e034fc321ac3ccf78d84bcff", "score": "0.55225915", "text": "private function display_links()\n {\n }", "title": "" }, { "docid": "c39c87933576484b9ee8326c5722957c", "score": "0.55139714", "text": "public function get_links()\n {\n }", "title": "" }, { "docid": "1fae2d562622727b657ae0601c6031eb", "score": "0.5483144", "text": "function wfWikiFeeds_Linker($a, $b) {\n\tglobal $wgWikiFeedsSettings, $wgTitle;\n \n\t// only link against each article once\n\tif (!array_key_exists('__linkerTracker', $wgWikiFeedsSettings)) {\n\t\t$wgWikiFeedsSettings['__linkerTracker'] = array();\n\t}\n \n\t// if we have already processed this title, don't do it again\n\tif (in_array($wgTitle->getFullText(), $wgWikiFeedsSettings['__linkerTracker'])) {\t\t\n\t\treturn true;\n\t} else {\n\t\t// mark as processed\n\t\t$wgWikiFeedsSettings['__linkerTracker'][] = $wgTitle->getFullText();\n\t}\n \n\tswitch ($wgTitle->getNamespace()) {\n\t\tcase NS_USER:\n\t\tcase NS_USER_TALK:\n\t\t\t{\n\t\t\t\t$username = $wgTitle->getPartialURL();\n \n\t\t\t\t//strip out subpage if we are on one\n\t\t\t\tif ($pos = strpos($username, '/')) {\n\t\t\t\t\t$username = substr($username, 0, $pos);\n\t\t\t\t}\n \n\t\t\t\t$t0 = Title::newFromText(\"WikiFeeds/atom/recentuserchanges/user/$username\", NS_SPECIAL);\n\t\t\t\t$t1 = Title::newFromText(\"WikiFeeds/rss/recentuserchanges/user/$username\", NS_SPECIAL);\n\t\t\t\t$t2 = Title::newFromText(\"WikiFeeds/atom/newestuserarticles/user/$username\", NS_SPECIAL);\n\t\t\t\t$t3 = Title::newFromText(\"WikiFeeds/rss/newestuserarticles/user/$username\", NS_SPECIAL);\n\t\t\t\t$t4 = Title::newFromText(\"WikiFeeds/atom/watchlist/user/$username\", NS_SPECIAL);\n\t\t\t\t$t5 = Title::newFromText(\"WikiFeeds/rss/watchlist/user/$username\", NS_SPECIAL);\n \n\t\t\t\twfWikiFeeds_AddLink('atom', \"Recently changed articles by $username (ATOM 1.0)\", $t0->getFullUrl());\n\t\t\t\twfWikiFeeds_AddLink('atom', \"Latest articles created by $username (ATOM 1.0)\", $t2->getFullUrl());\n\t\t\t\twfWikiFeeds_AddLink('atom', \"Watchlist for $username (ATOM 1.0)\", $t4->getFullUrl());\n\t\t\t\twfWikiFeeds_AddLink('rss', \"Recently changes articles by $username (RSS 2.0)\", $t1->getFullUrl());\n\t\t\t\twfWikiFeeds_AddLink('rss', \"Latest articles created by $username (RSS 2.0)\", $t3->getFullUrl());\n\t\t\t\twfWikiFeeds_AddLink('rss', \"Watchlist for $username (RSS 2.0)\", $t5->getFullUrl());\n \n\t\t\t}\n\t\t\tbreak;\n \n\t\tcase NS_CATEGORY:\n\t\tcase NS_CATEGORY_TALK:\n\t\t\t{\n\t\t\t\t$category = $wgTitle->getPartialURL();\n\t\t\t\t$catName = $wgTitle->getText();\n \n\t\t\t\t$atomCatNew = Title::newFromText(\"WikiFeeds/atom/newestcategoryarticles/category/$catName\", NS_SPECIAL);\n\t\t\t\t$rssCatNew = Title::newFromText(\"WikiFeeds/rss/newestcategoryarticles/category/$catName\", NS_SPECIAL);\n\t\t\t\t$atomCatRecent = Title::newFromText(\"WikiFeeds/atom/recentcategorychanges/category/$catName\", NS_SPECIAL);\n\t\t\t\t$rssCatRecent = Title::newFromText(\"WikiFeeds/rss/recentcategorychanges/category/$catName\", NS_SPECIAL);\n \n\t\t\t\twfWikiFeeds_AddLink('atom', \"Newest pages to join the $catName category (ATOM 1.0)\", $atomCatNew->getFullUrl());\n\t\t\t\twfWikiFeeds_AddLink('atom', \"Recently changed articles in the $catName category (ATOM 1.0)\", $atomCatRecent->getFullUrl());\n\t\t\t\twfWikiFeeds_AddLink('rss', \"Newest pages to join the $catName category (RSS 2.0)\", $rssCatNew->getFullUrl());\n\t\t\t\twfWikiFeeds_AddLink('rss', \"Recently changed articles in the $catName category (RSS 2.0)\", $rssCatRecent->getFullUrl());\n\t\t\t}\n\t}\n \n\t$atomRecentChanges = Title::newFromText(\"WikiFeeds/atom/recentarticlechanges\", NS_SPECIAL);\n\t$atomNewestArticles = Title::newFromText(\"WikiFeeds/atom/newestarticles\", NS_SPECIAL);\n\t$rssRecentChanges = Title::newFromText(\"WikiFeeds/rss/recentarticlechanges\", NS_SPECIAL);\n\t$rssNewestArticles = Title::newFromText(\"WikiFeeds/rss/newestarticles\", NS_SPECIAL);\n \n\twfWikiFeeds_AddLink('atom', 'Recently changed articles (ATOM 1.0)', $atomRecentChanges->getFullUrl());\n\twfWikiFeeds_AddLink('atom', 'Newest articles (ATOM 1.0)', $atomNewestArticles->getFullUrl());\n\twfWikiFeeds_AddLink('rss', 'Recently changed articles (RSS 2.0)', $rssRecentChanges->getFullUrl());\n\twfWikiFeeds_AddLink('rss', 'Newest articles (RSS 2.0)', $rssNewestArticles->getFullUrl());\n \n\treturn true;\n}", "title": "" }, { "docid": "1868061f97ae0bde15af915add6a2e23", "score": "0.5480317", "text": "protected function prepareSeeAllArticle(){\n $this->htmlWithOfflineComment($this->offlineComment());\n $this->htmlAllArticle($this->admin(), $this->allArticle());\n }", "title": "" }, { "docid": "309f3e748ce08995ab31ea45ef5dbda1", "score": "0.5462534", "text": "public function linkFinder()\n {\n\n $client = new Client();\n\n\n for ($i = 1100; $i < 1120; $i++) {\n //$url = 'https://support.ensemble-stars.jp/music/cat_2/'.$i;\n $url = 'https://support.ensemble-stars.jp/basic/cat_2/' . $i;\n echo '<a href=\"' . $url . '\">' . $url . '</a><br>';\n $crawler = $client->request('GET', $url);\n $response = $client->getInternalResponse();\n // echo $response->getStatus();\n foreach ($response->getHeaders()['Link'] as $link) {\n echo htmlentities($link) . '<br>';\n }\n echo '<hr>';\n }\n\n\n // Testing one\n // $url = 'https://support.ensemble-stars.jp/music/cat_2/71';\n // $crawler = $client->request('GET', $url);\n // $response = $client->getInternalResponse();\n\n // foreach ( $response->getHeaders()['Link'] as $link) {\n // echo htmlentities($link).'<br>';\n // }\n\n }", "title": "" }, { "docid": "a2c318886e6bedab6bc92965f49d66ed", "score": "0.5428551", "text": "public function index_post_links()\n {\n }", "title": "" }, { "docid": "0f9f1f21c5c5736470f7cc4c7e616fa1", "score": "0.5401621", "text": "private function is_external_links() {\n\n\t\treturn 'External' === $this->link_location;\n\t}", "title": "" }, { "docid": "b46ac974fb177b35ce254bc2c4b8bf74", "score": "0.53914785", "text": "public function hasContent(): bool\n {\n return count($this->getLinks()) > 0;\n }", "title": "" }, { "docid": "2e991a4eee57b46f9eeec61007748030", "score": "0.53739595", "text": "function check_link($link){\r\n\t\tglobal $wpdb;\r\n\t\t\r\n\t\t/*\r\n\t\tCheck for problematic (though not necessarily \"broken\") links.\r\n\t\tIf a link has been checked multiple times and still hasn't been marked as broken\r\n\t\tor removed from the queue then probably the checking algorithm is having problems\r\n\t\twith that link. Mark it as broken and hope the user sorts it out.\r\n\t\t*/\r\n\t\tif ($link->check_count >=5){\r\n\t\t\t$wpdb->query(\"UPDATE {$this->linkdata_name} \r\n\t\t\t\t\t\t SET broken=1, log=CONCAT(log, '\\nProblematic link, checking times out.') \r\n\t\t\t\t\t\t WHERE id={$link->id}\");\r\n\t\t\t//can afford to skip the $max_execution_time check here, the above op. should be very fast.\r\n\t\t\treturn false; \r\n\t\t}\r\n\t\t\r\n\t\t//Update the check_count & last_check fields before actually performing the check.\r\n\t\t//Useful if something goes terribly wrong in page_exists() with this particular URL.\r\n\t\t$wpdb->query(\"UPDATE $this->linkdata_name SET last_check=NOW(), check_count=check_count+1\r\n\t\t\t\t\t WHERE id=$link->id\");\r\n\t\t\r\n\t\t//Verify that the link should be checked\r\n\t\tif ( !$this->is_excluded($link->url) ){\r\n\t\t\t$rez = $this->page_exists($link->url);\r\n\t\t\t\r\n\t\t\tif ( $rez['okay'] ) {\r\n\t\t\t\t//Link is fine; remove it from the queue.\r\n\t\t\t\t$wpdb->query(\"DELETE FROM $this->linkdata_name WHERE id=$link->id\");\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\t//Link is broken.\r\n\t\t\t\t$wpdb->query(\r\n\t\t\t\t\t\"UPDATE $this->linkdata_name \r\n\t\t\t\t\tSET broken=1, http_code=$rez[http_code], log='\".$wpdb->escape($rez['log']).\"',\r\n\t\t\t\t\t\tfinal_url = '\".$wpdb->escape($rez['final_url']).\"'\r\n\t\t\t\t\tWHERE id=$link->id\"\r\n\t\t\t\t );\r\n\t\t\t\t\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t \r\n\t\t} else {\r\n\t\t\t//This link doesn't need to be checked because it is excluded.\r\n\t\t\t$wpdb->query(\"DELETE FROM $this->linkdata_name WHERE id=$link->id\");\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t}", "title": "" }, { "docid": "3f8db397560e93a759404f9c8a109692", "score": "0.5366067", "text": "function _linkchecker_owner_access_account_broken_links_report($account) {\n global $user;\n\n $ret = false;\n $allowed_roles = array('administrator', 'editor', 'content author', 'html author', 'ux member', 'usa administrator');\n if (array_intersect($allowed_roles, array_values($user->roles))) {\n $ret = true;\n }\n\n return $ret;\n}", "title": "" }, { "docid": "91d61f40e6f47a2a651db410c8c6a9cc", "score": "0.5363762", "text": "function wfAddAutoLinks(&$article,&$user,&$text) \r\n{ \r\n #file_put_contents('c:\\test.txt', $text);\r\n $content = $text;\r\n $pages = array(); \r\n #This should not work for the Page AutoLinkPages.\r\n \r\n $excludedPages = explode('|', AUTOLINK_EXCLUDED_PAGES); \r\n foreach ($excludedPages as $excludedPage) {\r\n if ($article->mTitle->mTextform == $excludedPage) { \r\n return true; \r\n } \r\n }\r\n \r\n $pages = getPages(); \r\n \r\n foreach ($pages as $page) { \r\n $pos = 0; $offset = 0; \r\n while ($pos !== false) {\r\n if ($pos != 0) {\r\n $pos = $pos + strlen($page) + $offset; \r\n }\r\n \r\n $pos = strpos($content, $page, $pos); \r\n $offset = 0;\r\n \r\n if ($pos === false) {\r\n continue; \r\n }\r\n \r\n if (preg_match('/[a-zA-Z0-9\\[\\<</span>]/', $content[$pos-1]) == 0 &&\r\n preg_match('/[a-zA-Z0-9\\]\\>]/', $content[$pos+strlen($page)]) == 0) { \r\n \r\n $content = substr($content, 0, $pos) . \r\n '[[' . substr($content, $pos, strlen($page)) . ']]' . \r\n substr($content, $pos + strlen($page));\r\n $offset = 4; \r\n if (AUTOLINK_REPLACE_FIRST_ONLY === true) {\r\n $pos = false; \r\n }\r\n }\r\n \r\n if (AUTOLINK_REPLACE_FIRST_ONLY === true &&\r\n preg_match('/[\\[]/', $content[$pos-1]) != 0 &&\r\n preg_match('/[\\]]/', $content[$pos+strlen($page)]) != 0) { \r\n $pos = false;\r\n }\r\n }\r\n }\r\n \r\n $text = $content;\r\n return true;\r\n}", "title": "" }, { "docid": "c7d304c3b9fce75f3f353ba2c109f9b7", "score": "0.5360707", "text": "public function linkToAllSiteRSSFeed()\n {\n if (!Config::inst()->get(VersionFeed::class, 'allchanges_enabled')\n || !SiteConfig::current_site_config()->AllChangesEnabled\n ) {\n return;\n }\n \n // RSS feed to all-site changes.\n $title = Convert::raw2xml($this->linkToAllSitesRSSFeedTitle());\n $url = $this->owner->getSiteRSSLink();\n\n Requirements::insertHeadTags(\n '<link rel=\"alternate\" type=\"application/rss+xml\" title=\"' . $title .\n '\" href=\"' . $url . '\" />'\n );\n }", "title": "" }, { "docid": "a74fb5184533453ab01e36621e5f1621", "score": "0.5340874", "text": "protected function addAllLinks()\n {\n if($this->user === false || $this->user === null)\n {\n if(isset($_SERVER['REQUEST_URI']) && strstr($_SERVER['REQUEST_URI'], 'logout.php') === false)\n {\n $this->addLink('Login', $this->login_url);\n }\n }\n else\n {\n $this->add_links();\n $this->addLink('Logout', $this->logout_url);\n }\n $about_menu = array(\n 'Burning Flipside'=>'https://www.burningflipside.com/about/event',\n 'AAR, LLC'=>'https://www.burningflipside.com/organization/aar',\n 'Privacy Policy'=>'https://www.burningflipside.com/about/privacy'\n );\n $this->addLink('About', 'http://www.burningflipside.com/about', $about_menu);\n }", "title": "" }, { "docid": "ed33589fc8c66d88be4b467e38b2f654", "score": "0.5328029", "text": "function malformedURLChecker($article, $table){\r\n\t//Returns false if $article and $table don't point to an article\r\n\t\r\n\tif(($table==null || $table=='') && ($article!=null || $article!='')){\r\n\t\t$table = findLatestTable($table);\r\n\t}\r\n\t$query = \"SELECT * FROM issuelist\";\r\n\t$result = mysql_query($query) or die(mysql_error());\r\n\twhile($row = mysql_fetch_array($result)){\r\n\t\tif($row['issuetable']==$table){\r\n\t\t\t$tableFound=true;\r\n\t\t}\r\n\t}\r\n\tif(!$tableFound){\r\n\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\t$query = \"SELECT * FROM $table\";\r\n\t$result = mysql_query($query) or die(mysql_error());\r\n\twhile($row = mysql_fetch_array($result)){\r\n\t\tif($row['article']==$article){\r\n\t\t\t$articleFound=true;\r\n\t\t}\r\n\t}\r\n\tif(!$articleFound){\r\n\t\treturn false;\r\n\t}\r\n\tif($articleFound && $tableFound){\r\n\t\treturn true;\r\n\t}\r\n}", "title": "" }, { "docid": "6a5ca797b4b80f4cc2a3b69a0717f301", "score": "0.53089225", "text": "private function _do_saved_link_check()\n\t{\n\t\t$url = $_SERVER['REQUEST_URI'];\n\t\tif ( strpos($url, '.') == false ) {\n\t\t\t$hash = substr($url, 1);\n\t\t\t// Shortened URL\n\t\t\tif (file_exists(\"$this->_content_dir/urls/$hash.url\")) {\n\t\t\t\t$contents = file(\"$this->_content_dir/urls/$hash.url\");\n\t\t\t\theader('HTTP/1.1 301 Moved Permanently');\n\t\t\t\theader('Location: '.$contents[0]);\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "2c4ac5d122e7c4cc3b275ee08addf62d", "score": "0.5289962", "text": "private function countLinks($text){\n preg_match_all(\n '#(http|https|ftp)://([A-Z0-9][A-Z0-9_-]*(?:.[A-Z0-9][A-Z0-9_-]*)+):?(d+)?/?#i', \n $text,\n $matches\n );\n \n return count($matches[0]);\n }", "title": "" }, { "docid": "f77e521ecccc9aa665d4bb9b9f854c09", "score": "0.5288487", "text": "public function same_url_limit_reached()\n\t{\n\n\t\t$counter = 0;\n\n\t\tforeach ($this->ail_a as $key => $value) {\n\t\t\tif ($value['url'] === $this->parsed_autolink['url']) {\n\t\t\t\t$counter++;\n\t\t\t}\n\t\t}\n\n\t\tif ($counter >= $this->same_url_limit) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}", "title": "" }, { "docid": "08eef141d56bdc89b1dfcbee3aecdf64", "score": "0.52776873", "text": "private function makeLinksIfPossible()\n {\n\n // if url pattern not set\n if ((count($this->master_url_pattern) < 1 ) || (strlen($this->master_url_pattern[0]) < 3 )) {\n return array(t('URL pattern not set in module settings.'));\n }\n\n\n\n $refind_links = array();\n for ($i = 0; $i < count($this->raw_folders); $i++) {\n foreach($this->master_url_pattern as $pattern) {\n if (stristr($this->raw_folders[$i], $pattern)) {\n $new_url = str_replace($pattern . '.', 'https://' . $pattern . '/', $this->raw_folders[$i] ) ;\n $refind_links[] = l($new_url, $new_url);\n }\n }\n }\n return $refind_links;\n }", "title": "" }, { "docid": "3e6d7e3a8f8a20b73cceadc01755d1ec", "score": "0.527592", "text": "function _generateAutolinkIndex(){\r\n global $conf;\r\n require_once (DOKU_INC.'inc/search.php');\r\n $pages = array();\r\n search($pages, $conf['datadir'], 'search_allpages', array());\r\n foreach ($pages as $page){\r\n $anchors = p_get_metadata($page['id'], 'anchors');\r\n if (!is_array($anchors)) $anchors = explode('|', $anchors);\r\n $this->_updateAutolinkIndex($page['id'], $anchors);\r\n }\r\n return true;\r\n }", "title": "" }, { "docid": "019a270264351e9da36a40403f6993dc", "score": "0.5237699", "text": "public function testGetLink()\n\t{\n\t\t$link = $this->object->getLink();\n\t\t$this->assertEquals($link, 'https://picasaweb.google.com/data/entry/api/user/12345678901234567890/albumid/0123456789012345678');\n\t\t$link = $this->object->getLink('self');\n\t\t$this->assertEquals($link, 'https://picasaweb.google.com/data/entry/api/user/12345678901234567890/albumid/0123456789012345678');\n\t\t$link = $this->object->getLink('nothing');\n\t\t$this->assertFalse($link);\n\t}", "title": "" }, { "docid": "afd66d0b2e7c0c8340552258f8a4c066", "score": "0.5214984", "text": "function checkURL($linkname)\n {\n $link = $this->runquery(\"SELECT menulink FROM menus WHERE linkname='\".$linkname.\"' OR linkalias='\".$linkname.\"'\",'single');\n \n if($this->geturl()==$link['menulink']){\n \n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }", "title": "" }, { "docid": "c480d31359b3cc919385e76304a0f088", "score": "0.5200756", "text": "public function testRedirects(){\r\n\t\t$redirs = array('Bill Gate', 'bill gates', 'BillGates');\r\n\t\t$tree = $this->retriever->getRelevancyTree('Bill Gates', \"6,2\", 2);\r\n\t\tforeach($redirs as $article)\r\n\t\t{\r\n\t\t\t$this->assertEquals(0, strcasecmp($tree, $this->retriever->getRelevancyTree($article, \"6,2\", 2)));\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "308fa6a200c7d203034efb06843e6eab", "score": "0.5185081", "text": "public function testAdminLinksPage() : void\n {\n $response = $this->actingAs(static::$user, 'web')\n ->get('/admin/links');\n\n $response->assertStatus(200)\n ->assertSee('Σύνδεσμοι');\n }", "title": "" }, { "docid": "d3af502dfe043f2e0548cadb560bd2f2", "score": "0.51757926", "text": "private function loadKnownUrls()\n {\n $this->knownUrls = new Set(\n array_map(\n function ($page) {\n return $page->url;\n },\n $this->collection->find([], ['limit' => (int) ($this->maxKnownUrls / 2)])->toArray()\n )\n );\n }", "title": "" }, { "docid": "f6f7307cff5387ed1bf85157c813c421", "score": "0.5175724", "text": "protected function have_registered_urls() {\n\t\t// @todo implement.\n\t\treturn true;\n\t}", "title": "" }, { "docid": "6974f8d10fdf2f938faa5177ebb59d33", "score": "0.5161274", "text": "public function deal_article_link() {\n\t\tadd_meta_box( 'deal_article_link', __( 'Article Link' ), array( &$this, 'article_link_content' ), 'deals', $context = 'advanced', $priority = 'default', $callback_args = null );\n\t}", "title": "" }, { "docid": "9cac1b00009f32333e72e837a6c5e0af", "score": "0.51546997", "text": "public function test_add_plugin_links()\n\t{\n\t\t$links = array();\n\t\t$instance = self::get_instance();\n $array = $instance->add_plugin_links($links);\n \t$this->assertNotEmpty($array);\t\t\n\t}", "title": "" }, { "docid": "f737e136d772d65151a0ddcae229c174", "score": "0.5152001", "text": "private function findLinks($html)\n {\n $url = \"http://www.example.net/somepage.html\";\n $input = @file_get_contents($url) or die(\"Could not access file: $url\");\n $regexp = \"<a\\s[^>]*href=(\\\"??)([^\\\" >]*?)\\\\1[^>]*>(.*)<\\/a>\";\n if(preg_match_all(\"/$regexp/siU\", $input, $matches, PREG_SET_ORDER)) {\n foreach($matches as $match) {\n // $match[2] = link address\n // $match[3] = link text\n }\n }\n }", "title": "" }, { "docid": "b204a49457257f3dd1e1856f4d0861cd", "score": "0.5135938", "text": "protected function saveMultiLinks()\n {\n\n }", "title": "" }, { "docid": "cd3e2815898013a2a128cd6cda807549", "score": "0.51336277", "text": "function _striplinks($document)\n {\n }", "title": "" }, { "docid": "50bd34f4a1893855d8d3ca60b7824fb3", "score": "0.51220423", "text": "public function testExistLinkRelationships() {\n /** @var \\Drupal\\Core\\Http\\LinkRelationTypeManager $link_relation_type_manager */\n $link_relation_type_manager = $this->container->get('plugin.manager.link_relation_type');\n $media = Media::create(['bundle' => $this->testMediaType->id()]);\n $media->save();\n foreach ($media->uriRelationships() as $relation_name) {\n $this->assertTrue($link_relation_type_manager->hasDefinition($relation_name), \"Link relationship '{$relation_name}' for a media item\");\n }\n }", "title": "" }, { "docid": "cd3c001d50fe7715c2b197bc88d350ce", "score": "0.51191896", "text": "private function haveURL($text){\n\t\t$reg_exUrl = \"/(http|https|ftp|ftps)\\:\\/\\/[a-zA-Z0-9\\-\\.]+\\.[a-zA-Z]{2,3}(\\/\\S*)?/\";\n\t\n\t\t// Check if there is a url in the text\n\t\tif(preg_match($reg_exUrl, $text, $url)) {\n\t\n\t\t\t// make the urls hyper links\n\t\t\treturn true;\n\t\n\t\t} else {\n\t\n\t\t\t// if no urls in the text just return the text\n\t\t\treturn false;\n\t\n\t\t}\n\t}", "title": "" }, { "docid": "63ed5f944e715d75d16f4e3b10b3f1b0", "score": "0.51156265", "text": "public function testGetLinks()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "a2810bb1359828fdfed24fd3bf698bd3", "score": "0.5111214", "text": "public static function contentURLS(&$html)\n\t{\n\t\tself::contentQueries($html);\n\t\tself::contentSEFRURLs($html);\n\t}", "title": "" }, { "docid": "0de9c2ad1204ce83e55fd2698982fe07", "score": "0.51053053", "text": "public function isValid(Link $link);", "title": "" }, { "docid": "677d18c87cc93c5cc856b5923d1e801e", "score": "0.51047426", "text": "public function get_allowed_urls() {}", "title": "" }, { "docid": "f03d6c37dc75fd498fbb8d918fa422ff", "score": "0.5101556", "text": "public function getAllInternalLinks($content)\n {\n preg_match_all(\"#(?<=href=(\\\"|'))[^\\\"']+(?=(\\\"|'))#iUs\", $content, $hrefs);\n\n $urls = array();\n foreach ($hrefs[0] as $url) {\n if ($this->site->isInternal($url) AND $url = $this->site->normalizeUrl($url)) {\n $urls[] = $url;\n }\n }\n\n return $urls;\n }", "title": "" }, { "docid": "2b119c7f2e176ed9592f89a6a0c7320c", "score": "0.5099664", "text": "public function run()\n {\n $urls = [\n 'https://www.google.com/',\n 'https://www.amazon.com/',\n 'https://www.digikala.com/'\n ];\n\n foreach ($urls as $url){\n $user = User::find(3);\n $this->gnarateLink($user,$url);\n }\n\n }", "title": "" }, { "docid": "9d5146a43633805db6f0e2494373851a", "score": "0.5098658", "text": "protected function initialize_seo_links() {\n\t\t$integrations = array();\n\n\t\t$link_table_compatibility_notifier = new WPSEO_Link_Compatibility_Notifier();\n\t\t$link_table_accessible_notifier = new WPSEO_Link_Table_Accessible_Notifier();\n\n\t\tif ( ! WPSEO_Options::get( 'enable_text_link_counter' ) ) {\n\t\t\t$link_table_compatibility_notifier->remove_notification();\n\n\t\t\treturn $integrations;\n\t\t}\n\n\t\t$integrations[] = new WPSEO_Link_Cleanup_Transient();\n\n\t\t// Only use the link module for PHP 5.3 and higher and show a notice when version is wrong.\n\t\tif ( version_compare( phpversion(), '5.3', '<' ) ) {\n\t\t\t$link_table_compatibility_notifier->add_notification();\n\n\t\t\treturn $integrations;\n\t\t}\n\n\t\t$link_table_compatibility_notifier->remove_notification();\n\n\t\t// When the table doesn't exists, just add the notification and return early.\n\t\tif ( ! WPSEO_Link_Table_Accessible::is_accessible() ) {\n\t\t\tWPSEO_Link_Table_Accessible::cleanup();\n\t\t}\n\n\t\tif ( ! WPSEO_Meta_Table_Accessible::is_accessible() ) {\n\t\t\tWPSEO_Meta_Table_Accessible::cleanup();\n\t\t}\n\n\t\tif ( ! WPSEO_Link_Table_Accessible::is_accessible() || ! WPSEO_Meta_Table_Accessible::is_accessible() ) {\n\t\t\t$link_table_accessible_notifier->add_notification();\n\n\t\t\treturn $integrations;\n\t\t}\n\n\t\t$link_table_accessible_notifier->remove_notification();\n\n\t\t$integrations[] = new WPSEO_Link_Columns( new WPSEO_Meta_Storage() );\n\t\t$integrations[] = new WPSEO_Link_Reindex_Dashboard();\n\t\t$integrations[] = new WPSEO_Link_Notifier();\n\n\t\t// Adds a filter to exclude the attachments from the link count.\n\t\tadd_filter( 'wpseo_link_count_post_types', array( 'WPSEO_Post_Type', 'filter_attachment_post_type' ) );\n\n\t\treturn $integrations;\n\t}", "title": "" }, { "docid": "28fb7fb33ef4c07f4262d560ca039581", "score": "0.5097547", "text": "public function testPagesAreSuccesful(){\n\n foreach ($this->providerUrls() as $url) {\n $this->client->request('GET', $url);\n $this->assertTrue($this->client->getResponse()->isSuccessful());\n }\n }", "title": "" }, { "docid": "75d72084eef9c017b50b5c2a88ac302a", "score": "0.508972", "text": "public function useGuidLinks()\n\t{\n\t\treturn trim($this->getData('rewrite/slug')) === '';\n\t}", "title": "" }, { "docid": "c62c71ffea636b0f8adf93f016b89d05", "score": "0.50762224", "text": "public static function pruneLinks()\n {\n if (! is_dir(VALET_HOME_PATH.'/Sites')) {\n return;\n }\n\n foreach (scandir(VALET_HOME_PATH.'/Sites') as $file) {\n if (in_array($file, ['.', '..'])) {\n continue;\n }\n\n if (is_link($linkPath = VALET_HOME_PATH.'/Sites/'.$file) && ! file_exists($linkPath)) {\n quietly('rm '.$linkPath);\n }\n }\n }", "title": "" }, { "docid": "3f3f1836fb7c1eb69911c9609fccc01c", "score": "0.50713205", "text": "public function testCheckingAValidFullUrlShouldReturnTrue()\n {\n // iping is mocked to return an ip out of the ip fixtures\n $result = $this->sitecheck->check('http://www.iping.nl/en/test');\n $this->assertTrue($result->isGreen());\n }", "title": "" }, { "docid": "e4ac7a207757f7bbe37b09ea07470997", "score": "0.5067147", "text": "public function updateLinkInfo( $links ) {\n\t\t$toCheck = array();\n\t\tforeach( $links as $tid => $link ) {\n\t\t\tif( ( $this->commObject->TOUCH_ARCHIVE == 1 || $link['has_archive'] === false ) && $this->commObject->VERIFY_DEAD == 1 && $this->commObject->db->dbValues[$tid]['live_state'] !== 0 && $this->commObject->db->dbValues[$tid]['live_state'] !== 5 && (time() - $this->commObject->db->dbValues[$tid]['last_deadCheck'] > 259200) ) $toCheck[$tid] = $link['url'];\n\t\t}\n\t\t$results = $this->deadCheck->checkDeadlinks( $toCheck );\n\t\t$results = $results['results'];\n\t\tforeach( $links as $tid => $link ) {\n\t\t\t$link['is_dead'] = null;\n\t\t\tif( ( $this->commObject->TOUCH_ARCHIVE == 1 || $link['has_archive'] === false ) && $this->commObject->VERIFY_DEAD == 1 ) {\n\t\t\t\tif( $this->commObject->db->dbValues[$tid]['live_state'] != 0 && $this->commObject->db->dbValues[$tid]['live_state'] != 5 && (time() - $this->commObject->db->dbValues[$tid]['last_deadCheck'] > 259200) ) {\n\t\t\t\t\t$link['is_dead'] = $results[$tid];\n\t\t\t\t\t$this->commObject->db->dbValues[$tid]['last_deadCheck'] = time(); \n\t\t\t\t\tif( $link['tagged_dead'] === false && $link['is_dead'] === true ) {\n\t\t\t\t\t\t$this->commObject->db->dbValues[$tid]['live_state']--;\n\t\t\t\t\t} elseif( $link['tagged_dead'] === false && $link['is_dead'] === false && $this->commObject->db->dbValues[$tid]['live_state'] != 3 ) {\n\t\t\t\t\t\t$this->commObject->db->dbValues[$tid]['live_state'] = 3; \n\t\t\t\t\t} elseif( $link['tagged_dead'] === true && ( $this->commObject->TAG_OVERRIDE == 1 || $link['is_dead'] === true ) ) {\n\t\t\t\t\t\t$this->commObject->db->dbValues[$tid]['live_state'] = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->commObject->db->dbValues[$tid]['live_state'] = 3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif( $this->commObject->db->dbValues[$tid]['live_state'] == 0 ) $link['is_dead'] = true;\n\t\t\t\tif( $this->commObject->db->dbValues[$tid]['live_state'] != 0 ) $link['is_dead'] = false;\n\t\t\t\tif( !isset( $this->commObject->db->dbValues[$tid]['live_state'] ) || $this->commObject->db->dbValues[$tid]['live_state'] == 4 || $this->commObject->db->dbValues[$tid]['live_state'] == 5 ) $link['is_dead'] = null;\n\t\t\t}\n\t\t\tif( $link['tagged_dead'] === true && $this->commObject->TAG_OVERRIDE == 1 && $this->commObject->db->dbValues[$tid]['live_state'] != 0 ) {\n\t\t\t\t$this->commObject->db->dbValues[$tid]['live_state'] = 0;\n\t\t\t}\n\t\t\t$links[$tid] = $link;\n\t\t}\n\t\treturn $links;\n\t}", "title": "" }, { "docid": "82056c9b5de9c35114e2a0b72f8be931", "score": "0.5064807", "text": "public function getLinks(): array;", "title": "" }, { "docid": "c5f70491ca2b1aba3cb52f570a0fea3c", "score": "0.5054419", "text": "public function testPageLinks() {\n // Navigate to 'admin/config' path.\n $this->drupalGet('admin/config');\n\n // Verify that links in this page do not have a 'fr/' prefix.\n $this->assertSession()->linkByHrefNotExists('/fr/', 'Links do not contain language prefix');\n\n // Verify that links in this page can be followed and work.\n $this->clickLink('Languages');\n $this->assertSession()->statusCodeEquals(200);\n $this->assertSession()->pageTextContains('Add language');\n }", "title": "" }, { "docid": "214c5f61ffd1f82804215226c2566bda", "score": "0.5052445", "text": "function ihacklog_pkg_match_links($content)\n{\n\t$match = array();\n\tpreg_match_all(\"'<\\s*a\\s.*?href\\s*=\\s*([\\\"\\'])?(?(1)(.*?)\\\\1|([^\\s\\>]+))[^>]*>?(.*?)</a>'isx\", $content, $links);\n\twhile (list($key, $val) = each($links[2])) {\n\t\tif (!empty($val) && !preg_match(\"@\\.(jpg|gif|png|rar|zip|gz|tgz|swf|js|txt)$@i\", $val))\n\t\t\t$match['link'][] = $val;\n\t}\n\twhile (list($key, $val) = each($links[3])) {\n\t\tif (!empty($val))\n\t\t\t$match['link'][] = $val;\n\t}\n\twhile (list($key, $val) = each($links[4])) {\n\t\tif (!empty($val))\n\t\t\t$match['content'][] = $val;\n\t}\n\twhile (list($key, $val) = each($links[0])) {\n\t\tif (!empty($val))\n\t\t\t$match['all'][] = $val;\n\t}\n\treturn $match;\n}", "title": "" }, { "docid": "13c8e0b77507c6805f18df067bf6e063", "score": "0.50521094", "text": "protected function getShouldIndexLinksConditionalService()\n {\n }", "title": "" }, { "docid": "107ad8dcb1dee796d2aaa0e929b1b466", "score": "0.50462264", "text": "function baindesign324_external_article_link() { ?>\n\t<?php if ( get_field( 'article_client') ) : ?>\n\t\t<div class=\"article-link\"><a href=\"<?php echo get_field( 'article_url'); ?>\" rel=\"external\">Go to the article</a></div>\n\t<?php endif; ?>\n<?php }", "title": "" }, { "docid": "9986d6ca8dff67c4ea35e9661b58cf70", "score": "0.50435627", "text": "public function articles() {\n\n $this->SitemapModel->output();\n }", "title": "" }, { "docid": "9986d6ca8dff67c4ea35e9661b58cf70", "score": "0.50435627", "text": "public function articles() {\n\n $this->SitemapModel->output();\n }", "title": "" }, { "docid": "dcc62cef879b20fe0347d375f7e5cb80", "score": "0.5037002", "text": "public function getLinkList();", "title": "" }, { "docid": "5c5fc5f12c8fea9e935d7b2448d3a85a", "score": "0.5024292", "text": "public function getlinks() {\n return $this->doc->getElementsByTagName(\"a\");\n }", "title": "" }, { "docid": "621f71894268dc68e730376bf378b87f", "score": "0.50168836", "text": "public function testShouldCheckData()\n\t {\n\t\t$dao = DAO::get(\"shorturls\");\n\t\t$dao->check();\n\t }", "title": "" }, { "docid": "174c7381cc6048fe14f5a5f2c85bf2bc", "score": "0.50150305", "text": "public function testAlternateURLs()\n {\n $home = $this->objFromFixture('Page', 'home');\n $about = $this->objFromFixture('Page', 'about');\n $staff = $this->objFromFixture('Page', 'staff');\n\n $this->assertEquals('/', $home->LocaleLink('fr_CA'));\n $this->assertEquals('/en_NZ/', $home->LocaleLink('en_NZ'));\n $this->assertEquals('/es_ES/', $home->LocaleLink('es_ES'));\n $this->assertEquals('/en_NZ/about-us/', $about->LocaleLink('en_NZ'));\n $this->assertEquals('/es_ES/about-us/', $about->LocaleLink('es_ES'));\n $this->assertEquals('/en_NZ/about-us/my-staff/', $staff->LocaleLink('en_NZ'));\n $this->assertEquals('/es_ES/about-us/my-staff/', $staff->LocaleLink('es_ES'));\n }", "title": "" }, { "docid": "48cca38fb46ee758527826c0eecf1848", "score": "0.50118136", "text": "private function fixAnchorsFromBody($body) {\n $changed = FALSE;\n require_once DRUPAL_ROOT . '/sites/all/vendor/querypath/querypath/src/qp.php';\n $qp = htmlqp($body);\n // Check all the links.\n foreach ($qp->find(\"a\") as $a) {\n $href = $a->attr('href');\n $fixer = NULL;\n try {\n $fixer = new LegacyUrlWithAnchorFixer($href);\n }\n catch(Exception $e) {\n // Here we can see what is being ignored.\n // drush_migration_tools_debug_output(\"URL IGNORED: {$href} \\n\");\n }\n\n $new_href = NULL;\n if (isset($fixer)) {\n try {\n $new_href = $fixer->fix();\n }\n catch(Exception $e) {\n drush_migration_tools_debug_output(\"URL WITHOUT REDIRECT: {$href}\");\n }\n }\n\n if (isset($new_href)) {\n $a->attr('href', $new_href);\n $this->debugInfo[$href] = $new_href;\n $changed = TRUE;\n }\n }\n\n if ($changed) {\n return $this->getNewBody($qp);\n }\n return FALSE;\n }", "title": "" }, { "docid": "cd758d36a53d956797791d480683bbc8", "score": "0.4996017", "text": "public function testHasArticles()\n {\n $oDelivery = oxNew('oxDelivery');\n $oDelivery->load($this->_sOxId);\n $this->assertTrue($oDelivery->hasArticles());\n }", "title": "" }, { "docid": "5ffbc6a0a670064301b10ce306d24c6c", "score": "0.4990496", "text": "public function readNewsFeeds()\n\t{\n\t\t$this->news = FeedReaderSource::getEntries(5);\n\t\tforeach ($this->news as $key => $news)\n\t\t{\n\t\t\t$this->news[$key]['description'] = preg_replace('/href=\"(.*?)\"/e', '\\'href=\"'.RELATIVE_WCF_DIR.'acp/dereferrer.php?url=\\'.rawurlencode(\\'$1\\').\\'\" class=\"externalURL\"\\'', $news['description']);\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "ffde3654430ca7887736b943f687e182", "score": "0.4987355", "text": "public function link()\n {\n// 'conditions' => array('Link.publish' => 1),\n// 'order' => array('Link.id' => 'asc')\n// ));\n// $this->set('link_lists', $link_lists);\n \n //category別に取得\n $link_friends = $this->Link->find('all', array( //友人\n 'conditions' => array(\n 'Link.publish' => 1,\n 'Link.category' => 'friends'\n )\n ));\n $this->set('link_friends', $link_friends);\n $link_develop = $this->Link->find('all', array( //開発\n 'conditions' => array(\n 'Link.publish' => 1,\n 'Link.category' => 'develop'\n )\n ));\n $this->set('link_develop', $link_develop);\n $link_others = $this->Link->find('all', array( //その他\n 'conditions' => array(\n 'Link.publish' => 1,\n 'Link.category' => 'others'\n )\n ));\n $this->set('link_others', $link_others);\n $link_myself = $this->Link->find('all', array( //自分\n 'conditions' => array(\n 'Link.publish' => 1,\n 'Link.category' => 'myself'\n )\n ));\n $this->set('link_myself', $link_myself);\n }", "title": "" }, { "docid": "8eb93a3632695ca5b4f5e506751dad28", "score": "0.4977797", "text": "function getPages()\r\n{\r\n $title = Title::newFromURL('AutoLinkPages');\r\n $article = new Article($title);\r\n $pagenames = $article->getContent();\r\n $pages = explode(AUTOLINK_LINK_DELIMITER, $pagenames);\r\n return $pages;\r\n}", "title": "" }, { "docid": "9418825b89744ac750223a9423b40f72", "score": "0.497027", "text": "protected function make_urls() {\n $this->make_urls_after();\n }", "title": "" }, { "docid": "baf23c8a1b4d151cbc663b9cdaac4250", "score": "0.49672884", "text": "function parse_urls($text) {\n\n\t$linkify = new \\Misd\\Linkify\\Linkify();\n\n\treturn $linkify->processUrls($text, ['attr' => ['rel' => 'nofollow']]);\n}", "title": "" }, { "docid": "305c84ce6b2cd36e63245b4216b1beee", "score": "0.49614388", "text": "public function find_feed_links($url, &$error){\n $url = $this->clean_url($url);\n if($url == \"\" || $url == NULL){\n $error = \"feed_link error: url is empty!\";\n return NULL;\n }\n //$links = Zend_Feed_Reader::findFeedLinks('http://www.gizmodo.com');\n try{\n $links = Zend_Feed_Reader::findFeedLinks($url);\n } catch (Zend_Exception $e) {\n $error = $e->getMessage();\n return NULL;\n }\n $feed_links = array(); \n foreach ($links as $link) {\n $feed_links[] = $link['href'];\n if($this->config->debug->verbose){\n echo \"url:\" . $link['href'] . \"<br/>\\n\";\n }\n }\n return $feed_links;\n\n }", "title": "" }, { "docid": "ee74190a340b32924716b08179324acd", "score": "0.49600396", "text": "public function add_autolinks($content, $check_query = true, $post_type = '', $post_id = false ){\n \n //verify that we are inside a post, page or cpt\n if($check_query){\n if(!is_singular() or is_attachment() or is_feed()){return $content;}\n }\n \n /*\n * If the $post_id is not set means that we are in the loop and can be\n * retrieved with get_the_ID()\n */\n if($post_id === false){ $post_id = get_the_ID(); }\n\n //get the permalink\n $post_permalink = get_permalink($post_id);\n \n /*\n * Verify with the \"Enable AIL\" post meta data or ( if the meta data is\n * not present ) verify through the \"Default Enable AIL\" option if the\n * autolinks should be applied to this post\n */\n $enable_ail = get_post_meta( $post_id, '_daim_enable_ail', true );\n if(strlen(trim($enable_ail)) == 0){\n $enable_ail = get_option( $this->get('slug') . '_default_enable_ail_on_post');\n }\n if( intval($enable_ail, 10) == 0 ){return $content;}\n \n //protect the tags and the commented HTML with protected blocks\n $content = $this->apply_protected_blocks($content);\n \n //initialize properties\n $this->ail_id = 0;\n $this->ail_a = array();\n $this->post_id = $post_id;\n \n //get the max number of autolinks allowed per post\n $this->max_number_autolinks_per_post = $this->get_max_number_autolinks_per_post($this->post_id);\n\n\t //Save the \"Same URL Limit\" as a class property\n\t $this->same_url_limit = intval(get_option($this->get('slug') . '_same_url_limit'), 10);\n \n //initialize the counter of the autolinks applied\n $total_autolink_applied = 0;\n \n //get an array with the autolinks from the db table\n global $wpdb;\n $table_name = $wpdb->prefix . $this->get('slug') . \"_autolinks\";\n $sql = \"SELECT * FROM $table_name ORDER BY priority DESC\";\n $autolinks = $wpdb->get_results($sql, ARRAY_A);\n\n\t /*\n\t\t * To avoid additional database requests for each autolink in preg_replace_callback_2() save the data of the\n\t\t * autolink in an array that uses the \"autolink_id\" as its index.\n\t\t */\n\t $this->autolinks_ca = $this->save_autolinks_in_custom_array($autolinks);\n\n\t //Apply the Random Prioritization if enabled\n\t if (intval(get_option($this->get('slug') . '_random_prioritization'), 10) === 1) {\n\t\t $autolinks = $this->apply_random_prioritization($autolinks, $post_id);\n\t }\n\n //cycle through all the defined autolinks\n foreach ($autolinks as $key => $autolink) {\n\n /*\n * Self AIL\n *\n * If the \"Ignore Self AIL\" option is set to true, do not apply the autolinks that have, as a target, the\n * post where they should be applied\n *\n * Compare $autolink['url'] with the the permalink ( with the get_home_url() removed ),\n * if the comparison returns true ( which means that the autolink url and the current url are the same ) do\n * not apply the autolink\n */\n if( intval(get_option( $this->get('slug') . '_ignore_self_ail'), 10) == 1 ){\n $home_url_length = abs( strlen( get_home_url() ) );\n if( $autolink['url'] == substr( $post_permalink, $home_url_length ) ){continue;}\n }\n\n $this->parsed_autolink = $autolink;\n \n //get the list of post types where the autolinks should be applied\n $activate_post_types = preg_replace('/\\s+/', '', $autolink['activate_post_types']);\n $post_types_a = explode(\",\", $activate_post_types);\n \n /*\n * If we are adding the autolinks through the back-end to count\n * later their number compare the allowed post type with the\n * $post_type variable. If we are in the loop get the post type with\n * the get_post_type() function\n */\n if($post_type != ''){\n if( in_array($post_type, $post_types_a) === false ){continue;}\n }else{\n if( in_array(get_post_type(), $post_types_a) === false ){continue;}\n }\n\n //get the max number of autolinks per keyword\n $max_number_autolinks_per_keyword = $autolink['max_number_autolinks'];\n \n //apply a case insensitive search if the case_insensitive_flag is selected\n if($autolink['case_insensitive_search']){\n $modifier = 'iu';//enable case sensitive and unicode modifier\n }else{\n $modifier = 'u';//enable unicode modifier\n }\n \n $ail_temp = array();\n \n //find the left boundary\n switch($autolink['string_before']){\n case 1:\n $string_before = '\\b';\n break;\n \n case 2:\n $string_before = ' ';\n break;\n \n case 3:\n $string_before = ',';\n break;\n \n case 4:\n $string_before = '\\.';\n break;\n \n case 5:\n $string_before = '';\n break;\n }\n \n //find the right boundary\n switch($autolink['string_after']){\n case 1:\n $string_after = '\\b';\n break;\n \n case 2:\n $string_after = ' ';\n break;\n \n case 3:\n $string_after = ',';\n break;\n \n case 4:\n $string_after = '\\.';\n break;\n\n case 5:\n $string_after = '';\n break;\n }\n \n //escape regex characters and the '/' regex delimiter\n $autolink_keyword = preg_quote($autolink['keyword'], '/');\n \n /*\n * Step 1: \"The creation of temporary identifiers of the sostitutions\"\n * Replace all the matches with the [ail]ID[/ail] string, where the\n * ID is the identifier of the sostitution.\n * The ID is also used as the index of the $this->ail_a temporary array\n * used to store information about all the sostutions.\n * This array will be later used in \"Step 2\" to replace the\n * [ail]ID[/ail] string with the actual links\n */\n $content = preg_replace_callback(\n '/(' . ($string_before) . ')(' . $autolink_keyword . ')(' . ($string_after) . ')/' . $modifier,\n array($this, 'preg_replace_callback_1'),\n $content,\n $max_number_autolinks_per_keyword);\n \n }\n \n /*\n * Step 2: \"The replacement of the temporary string [ail]ID[/ail]\"\n * Replaces the [ail]ID[/ail] matches found in the $content with the\n * actual links by using the $this->ail_a array to find the identifier of the\n * sostitutions and by retrieving in the db table \"autolinks\" ( with the\n * \"autolink_id\" ) additional information about the sostitution.\n */\n $content = preg_replace_callback(\n '/\\[ail\\](\\d+)\\[\\/ail\\]/',\n array($this, 'preg_replace_callback_2'),\n $content);\n \n //remove the protected blocks\n $content = $this->remove_protected_blocks($content);\n \n return $content;\n \n }", "title": "" }, { "docid": "73ec85116a80b9f67581c51568c61063", "score": "0.49559325", "text": "protected function supportsExternalLinks() {\n $link_type = $this->getFieldSetting('link_type');\n return (bool) ($link_type & LinkItemInterface::LINK_EXTERNAL);\n }", "title": "" }, { "docid": "5266fd8d1238b45c49fe18e45744f3a3", "score": "0.4953416", "text": "public function get_allowed_urls()\n {\n }", "title": "" }, { "docid": "72b5c66c64488f4e225a8e046b0e67a7", "score": "0.49495864", "text": "public function add_links($links)\n {\n }", "title": "" }, { "docid": "89cf12a1dacd182227f279b8df0a9f33", "score": "0.49468783", "text": "public function thereAreRegisteredRedirects()\n {\n return !empty($this->getRegisteredRedirects());\n }", "title": "" }, { "docid": "e0a0f36fbdc28cc0ebc9e4a9708ffd67", "score": "0.49289083", "text": "protected function addArticleValidation() {\n $this->addNormalValidation();\n $this->offsetUnset(\"external_url\");\n }", "title": "" }, { "docid": "8858d3f4f7ec2b59180234a8bd77ab5f", "score": "0.49237657", "text": "public function testDeployment() {\n foreach ($this->live_menu as $link) {\n $this->assertFileExists(__DIR__ . \"/../../static\" . $link . \"/index.html\");\n }\n\n foreach (Page::getSymlinks() as $link) {\n $this->assertTrue(is_link(__DIR__ . \"/../../static/\" . $link));\n }\n }", "title": "" }, { "docid": "531a6b5b0c19937d9f9dfe95c1b88c4b", "score": "0.49207613", "text": "function clearLinks () {\n\t\t$this->_one_to_many = array();\n\t}", "title": "" }, { "docid": "f6aed450f5118824d08c3f742b9c50e6", "score": "0.49203166", "text": "public function countArticles() {\n\n $articles = $this->findArticles();\n $size = sizeof($articles);\n\n return $size;\n }", "title": "" }, { "docid": "4ae4413ff5dad46393aaa8795a88f801", "score": "0.49197465", "text": "public function testVerifyPrivateRSSLinkExists()\n {\n list($req, $uId) = $this->getLoggedInRequest('?unittestMode=1', true, true);\n\n $user = $this->us->getUser($uId);\n $req->setUrl($this->getTestUrl('/' . $user['username']));\n $response = $req->send();\n $response_body = $response->getBody();\n $this->assertNotEquals('', $response_body, 'Response is empty');\n\n $x = simplexml_load_string($response_body);\n $ns = $x->getDocNamespaces();\n $x->registerXPathNamespace('ns', reset($ns));\n\n $elements = $x->xpath(\n '//ns:link[@rel=\"alternate\" and @type=\"application/rss+xml\"]'\n );\n $this->assertEquals(\n 2, count($elements), 'Number of Links in Head not correct'\n );\n $this->assertContains('privateKey=', (string)$elements[1]['href']);\n }", "title": "" }, { "docid": "76022129d5b70ff9f47473048182c3bb", "score": "0.49165", "text": "function get_links($file, $url, $check_domain, $base)\n\t{\n\n\t\t$chunklist = array ();\n\t\t// The base URL comes from either the meta tag or the current URL.\n\t\tif (!empty($base)) \n\t\t{\n\t\t\t$url = $base;\n\t\t}\n\n\t\t$links = array ();\n\t\t$regs = Array ();\n\t\t$checked_urls = Array();\n\n\t\t//////////finding links from the webpage//////////////////\n\t\t//preg_match_all(\"/href=\\\"([^\\\"]*)\\\"/i\", $data, $matches);\n\n\t\t\n\t\tpreg_match_all(\"/href\\s*=\\s*[\\'\\\"]?([+:%\\/\\?~=&;\\\\\\(\\),._a-zA-Z0-9-]*)(#[.a-zA-Z0-9-]*)?[\\'\\\" ]?(\\s*rel\\s*=\\s*[\\'\\\"]?(nofollow)[\\'\\\"]?)?/i\", $file, $regs, PREG_SET_ORDER);\n\t\tforeach ($regs as $val)\n\t\t{\n\t\t\tif ($checked_urls[$val[1]]!=1 && !isset ($val[4])) \n\t\t\t{ //if nofollow is not set\n\t\t\t\tif (($a = url_purify($val[1], $url, $check_domain)) != '')\n\t\t\t\t{\n\t\t\t\t\t$links[] = $a;\n\t\t\t\t}\n\t\t\t\t$checked_urls[$val[1]] = 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tpreg_match_all(\"/(http-equiv=['\\\"]refresh['\\\"] *content=['\\\"][0-9]+;url)[[:blank:]]*=[[:blank:]]*[\\'\\\"]?(([[a-z]{3,5}:\\/\\/(([.a-zA-Z0-9-])+(:[0-9]+)*))*([+:%\\/?=&;\\\\\\(\\),._ a-zA-Z0-9-]*))(#[.a-zA-Z0-9-]*)?[\\'\\\" ]?/i\", $file, $regs, PREG_SET_ORDER);\n\t\tforeach ($regs as $val)\n\t\t{\n\t\t\tif ($checked_urls[$val[1]]!=1 && !isset ($val[4]))\n\t\t\t{ //if nofollow is not set\n\t\t\t\tif (($a = url_purify($val[1], $url, $check_domain)) != '')\n\t\t\t\t{\n\t\t\t\t\t$links[] = $a;\n\t\t\t\t}\n\t\t\t\t$checked_urls[$val[1]] = 1;\n\t\t\t}\n\t\t}\n\n\n\t\treturn $links;\n\t}", "title": "" }, { "docid": "1bda66ca2f77822cec2f93acc11d62b7", "score": "0.49142697", "text": "public function getListViewLinks($linkParams)\n\t{\n\t\treturn false;\n\t}", "title": "" }, { "docid": "83760b3f35168b3da6d36396bcb9e2f5", "score": "0.4908272", "text": "function find($url){\r\n\t\tforeach ( $this->links as $link ){\r\n\t\t\tif ( $this->check_url_for_c($link, $url) ) { return true; break; }\r\n\t\t}\r\n\t\treturn false;\r\n\t\t//if($this->set) $this->save(0);\r\n\t}", "title": "" }, { "docid": "c7974b82794290e465cb9cc1650e6e67", "score": "0.48996234", "text": "function writePagesLinks()\n\t{\n\t\techo $this->getPagesLinks();\n\t}", "title": "" }, { "docid": "e108ce8b9e5a108821b2310cae000417", "score": "0.48938745", "text": "public function isArticleTypeUrl() {\n $tsc = tx_newspaper::getTSConfig();\n if ($articleType = t3lib_div::trimExplode(',', $tsc['newspaper.']['articleTypeAsUrl'])) {\n return in_array($this->getArticleType()->getAttribute('uid'), $articleType);\n }\n // no TSConfig found, so always false\n return false;\n }", "title": "" } ]
0a913a241339e7f709a24da3f60097fc
/ Update customer balance
[ { "docid": "fbac1cdc301729ee0d19b347d47d87a4", "score": "0.7718403", "text": "function update_balance($customer_id, $amount) {\n global $conn;\n $balance = 0;\n\n $query5 = \"SELECT balance FROM customer_account WHERE customer_id =\" . $customer_id;\n\n $result5 = mysqli_query($conn, $query5);\n\n if ($row5 = mysqli_fetch_array($result5)) {\n $balance = $row5['balance'];\n }\n\n $balance += $amount;\n\n //echo $balance .', ' .$customer_id;\n\n $query4 = \"UPDATE customer_account SET balance = \" . $balance . \" WHERE customer_id = \" . $customer_id;\n\n if (mysqli_query($conn, $query4)) {\n echo '<div class=\"alert alert-success\" role=\"alert\" align=\"center\">successful..</div>';\n } else {\n echo '<div class=\"alert alert-danger\" role=\"alert\" align=\"center\">Failed..</div>';\n }\n}", "title": "" } ]
[ { "docid": "65d304ba69c3d5d497b1f6e531509730", "score": "0.7528395", "text": "private function _updateBalance()\n\t{\n\t\t$id = $this->_data['id'];\n\n\t\t$sql = 'update workorder set ';\n\t\t$sql.= 'bill_amount = (';\n\t\t\t$sql.= \"select sum(a_quantity * a_rate) from workorder_item \";\n\t\t\t$sql.= \" where workorder_id=$id and status = 'Billed' ) \";\n\t\t$sql.= ',';\n\t\t$sql.= 'open_amount = (';\n\t\t\t$sql.= 'select sum(a_quantity * a_rate) from workorder_item ';\n\t\t\t$sql.= \" where workorder_id = $id and status in ('Active','Complete') \";\n\t\t$sql.= \") where id=$id\";\n\t\tSQL::query($sql);\n\n\t\t$this->bill_amount = SQL::fetch_one(\"SELECT bill_amount FROM workorder WHERE id = $id\");\n\t\t$this->open_amount = SQL::fetch_one(\"SELECT open_amount FROM workorder WHERE id = $id\");\n\t}", "title": "" }, { "docid": "5dc0bff4a8add55415f8eef09941514a", "score": "0.7440489", "text": "function updateBalance(): void {\n\t}", "title": "" }, { "docid": "56f9d2fce77893b3a6f97d5e042fb0f5", "score": "0.705212", "text": "function deduct_amount($customer_id, $amount) {\n global $conn;\n $balance = 0;\n\n $query5 = \"SELECT balance FROM customer_account WHERE customer_id =\" . $customer_id;\n\n $result5 = mysqli_query($conn, $query5);\n\n if ($row5 = mysqli_fetch_array($result5)) {\n $balance = $row5['balance'];\n }\n\n $balance -= $amount;\n\n //echo $balance .', ' .$customer_id;\n\n $query4 = \"UPDATE customer_account SET balance = \" . $balance . \" WHERE customer_id = \" . $customer_id;\n\n if (mysqli_query($conn, $query4)) {\n echo '<div class=\"alert alert-success\" role=\"alert\" align=\"center\">successful..</div>';\n } else {\n echo '<div class=\"alert alert-danger\" role=\"alert\" align=\"center\">Failed..</div>';\n }\n}", "title": "" }, { "docid": "37038fa75cd45a6e2ff0882900629d5a", "score": "0.6940754", "text": "function doTransaction($dbconn, $amount, $customer, $beneficiary){\r\n\t\t$stmt1 = $dbconn->prepare('UPDATE account SET balance= balance - :amount WHERE customer_id=:id');\r\n\t\t$stmt1->execute([\r\n\t\t\t\":amount\" => $amount,\r\n\t\t\t\":id\" => $customer\r\n\t\t]);\r\n\r\n\t\t#add to reciever's account\r\n\t\t$stmt2 = $dbconn->prepare(\"UPDATE account SET balance= balance + :amount WHERE accNo=:acct\");\r\n\t\t$stmt2->execute([\r\n\t\t\t\":amount\" =>$amount,\r\n\t\t\t\":acct\" => $beneficiary\r\n\t\t]);\r\n\t}", "title": "" }, { "docid": "5bb550a17dcf65834e438b16f2402625", "score": "0.6876159", "text": "public function testUpdateCustomerInvoicePayment()\n {\n }", "title": "" }, { "docid": "8901eb162d396675266277b63acb7c75", "score": "0.6830156", "text": "function update_data($amount, $currency)\r\n {\r\n\r\n $servername = \"localhost\";\r\n $username = \"root\";\r\n $password = \"\";\r\n $db = \"task\";\r\n\r\n// Create connection\r\n $conn = new mysqli($servername, $username, $password, $db);\r\n\r\n// Check connection\r\n if ($conn->connect_error) {\r\n die(\"Connection failed: \" . $conn->connect_error);\r\n }\r\n\r\n $x = 0;\r\n $sql = \"SELECT balance FROM account\";\r\n $res = mysqli_query($conn, $sql);\r\n\r\n while ($print = mysqli_fetch_array($res)) {\r\n $x = $print['balance']; //save last recorded balance from database in $x\r\n };\r\n\r\n $sum = $amount + $x; //update balance with new data\r\n\r\n $sql = \"UPDATE account SET balance = ' $sum ' ,updated_at = '$amount ' WHERE id = 1\";\r\n\r\n if ($conn->query($sql) === TRUE) {\r\n echo \"Successfully Updated! \";\r\n\r\n }\r\n }", "title": "" }, { "docid": "9f1d2f9915b906b2d4da3f66683bc29b", "score": "0.68029505", "text": "public function update_balance($return_credit,$user_id)\n\t{\t\t\n\t\t//get user current balance\n\t\t$this->db->select('balance');\n\t\t$query = $this->db->get_where('members', array('id'=>$user_id));\n\t\t$user_balance = $query->row();\n\t\t\n\t\t$user_total_balance = $user_balance->balance+$return_credit;\n\t\t\n\t\t//update user balance\n\t\t$data=array('balance'=>$user_total_balance);\n\t\t$this->db->where('id',$user_id);\n\t\t$this->db->update('members', $data);\n\t}", "title": "" }, { "docid": "307c6d755309bf4c458d2839c77ec729", "score": "0.6749321", "text": "public function testUpdateCustomer()\n {\n }", "title": "" }, { "docid": "eee0c4e20eac16cbbd097ad4e422873e", "score": "0.6710065", "text": "protected function _addCustomerBalance()\n {\n if ($this->getOrder()->getCustomerBalanceAmount() <= 0) {\n return;\n }\n\n $sku = $this->_getHelper()->__('customer_balance');\n\n $this->_extras[] = array(\n \"qty\" => 1,\n \"sku\" => $sku,\n \"name\" => $this->_getHelper()->__(\"Customer Balance\"),\n \"price\" => ($this->getOrder()->getCustomerBalanceAmount() * -1),\n \"total_amount\" => ($this->getOrder()->getCustomerBalanceAmount() * -1),\n \"total_tax_amount\" => 0,\n );\n }", "title": "" }, { "docid": "3e93055336bebd6c430c243c936591b7", "score": "0.67048913", "text": "public function update_user_balance($purchase_credit, $user_id)\n\t{\n\t\t$this->db->select('balance', 'id');\n\t\t$query = $this->db->get_where('members', array('id' => $user_id));\n\t\t$user_balance = $query->row();\n\t\t\n\t\t$user_total_balance = $user_balance->balance + $purchase_credit;\n\t\t\n\t\t//update user balance\n\t\t$data=array('balance' => $user_total_balance);\n\t\t$this->db->where('id', $user_id);\n\t\t$this->db->update('members', $data);\n\t\t\n\t\treturn $user_total_balance;\t\n\t}", "title": "" }, { "docid": "cfa09490c77a560ecdf1a999e4de52fb", "score": "0.66702425", "text": "public function saveAndUpdateBalance(Transaction $transaction);", "title": "" }, { "docid": "6fdfdfaa2fd450bc8fafa8e91f0f4d37", "score": "0.66470283", "text": "public function updateAccountBalance($newBalance){\n $expectedExceptions = array();\n $expectedExceptions[\"\\\\Kinikit\\\\MVC\\\\Exception\\\\RateLimitExceededException\"] = \"\\Netistrar\\ClientAPI\\Exception\\RateLimitExceededException\";\n parent::callMethod(\"updateBalance/$newBalance\", \"GET\", array(),null,null,$expectedExceptions);\n }", "title": "" }, { "docid": "8e3f3b18f04c5bfb4eed5da04639b156", "score": "0.6564817", "text": "public function testUpdateCustomerInvoice()\n {\n }", "title": "" }, { "docid": "4c8a9f21b847482fc49793fd5f000590", "score": "0.6563951", "text": "public function updateBalance($acc, $newBalance)\n {\n $sql = \"UPDATE crypto\n SET bal = '$newBalance'\n WHERE acc = '$acc'\n \";\n\n return $this->conn->query($sql);\n }", "title": "" }, { "docid": "5ce851510970c53acf982be6c47c1a75", "score": "0.6534831", "text": "public function credit_account($acc_no, $balance, $amount, $staff_user_id) {\n \n $this->db->set('account_balance', $balance)\n ->where('account_number', $acc_no)\n ->update('account');\n \n $time = date(\"Y-m-d H:i:s\");\n \n $this->update_transaction_history($acc_no, $balance, $amount, 2, $time);\n $this->update_last_transaction($time, $acc_no, $staff_user_id);\n \n return $time;\n }", "title": "" }, { "docid": "fe140b547c6c65d85d34d4218c870641", "score": "0.65049636", "text": "function donationsreceivable_update($mycon, $member_id, $amount, $balance)\n {\n $thedate = date(\"Y-m-d H:i:s\");\n $sql = \"UPDATE `donationsreceivable` SET\n `amount` = :amount\n ,`balance` = :balance\n ,`thedate` = :thedate WHERE `member_id` = :member_id\";\n $myrec = $mycon->prepare($sql);\n $myrec->bindValue(\":member_id\", $member_id, PDO::PARAM_STR);\n $myrec->bindValue(\":amount\", $amount, PDO::PARAM_STR);\n $myrec->bindValue(\":balance\", $balance, PDO::PARAM_STR);\n $myrec->bindValue(\":thedate\", $thedate, PDO::PARAM_STR);\n\n if (!$myrec->execute()) return false;\n\n return true;\n }", "title": "" }, { "docid": "221a1765f5a337e9b0f08e6ce794c268", "score": "0.65007424", "text": "public function updateCustomer($businessUnit)\n {\n \n $data = new BusinessUnitResource($businessUnit->load(['users' => function ($subQuery) {\n return $subQuery->where('role_id', 2)->first();\n }])); // end of $data\n \n $customer = \\Stripe\\Customer::update(\n $businessUnit->stripe_id,\n [ 'name' => $data->name, \n 'phone' => $data->phone_number,\n 'address' => [\n 'line1' => $data->address->address1,\n 'city' => $data->address->city,\n 'state' => $data->address->state,\n 'postal_code' => $data->address->zipcode,\n 'country' => 'US',\n ]]\n ); // end of Stripe Customer update\n\n }", "title": "" }, { "docid": "c36cb860b6f9fbb246d769d03ca81d10", "score": "0.6454166", "text": "function member_wallet_account_update($diplomaNum,$amount,$type){\n\t\t// get the db object\n\t\t$db = new db();\n\t\t$db= $db->connect();\n \t// query to make request\n \t$sql=\"SELECT current_balance FROM members WHERE professional_number=:profNum\";\n\t\t$stmt = $db->prepare($sql);\n\t\t$stmt->bindParam(\":profNum\",$diplomaNum);\n\t\tif ($stmt->execute()) {\n\t\t\t$results = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\t// if its credit then add to returned balance\n\t\t\tif ($type == \"CREDIT\") {\n\t\t\t\t$currentBalance = trim($results[\"current_balance\"])+$amount;\n\t\t\t}\n\t\t\telseif ($type == \"DEBIT\") {\n\t\t\t\t$currentBalance = trim($results[\"current_balance\"])-$amount;\n\t\t\t}\n\n\t\t\t// not update mmeber account with the new balance\n\t\t\t$updateSql =\"UPDATE members SET current_balance=:currentBal WHERE professional_number=:profNum\";\n\t\t\t$updatestmt = $db->prepare($updateSql);\n\t\t\t$updatestmt->bindParam(\":currentBal\",$currentBalance);\n\t\t\t$updatestmt->bindParam(\":profNum\",$diplomaNum);\n\t\t\t$updatestmt->execute();\n\t\t\t///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t\t\t// update user wallet account\n\t\t\t$walletSql = \"INSERT INTO wallet_history (member_id,type,purpose,reason,amount_payed,balance) VALUES (:memberId,:type,:purpose,:reason,:amountPayed,:balance)\";\n\t\t\t$walletstmt = $db->prepare($walletSql);\n\t\t\t$walletstmt->bindParam(\":memberId\",$diplomaNum);\n\t\t\t$walletstmt->bindParam(\":type\",$type);\n\t\t\t$walletstmt->bindParam(\":purpose\",$type);\n\t\t\t$walletstmt->bindParam(\":reason\",$type);\n\t\t\t$walletstmt->bindParam(\":amountPayed\",$amount);\n\t\t\t$walletstmt->bindParam(\":balance\",$currentBalance);\n\t\t\t$walletstmt->execute();\n\t\t}\n\t}", "title": "" }, { "docid": "384d86c9101f0ec86ba711f002f4d991", "score": "0.6413186", "text": "protected function updatePurseBalance()\n\t{\n\t\t$this->purse->updateBalance($this->getBalanceAfter());\n\t}", "title": "" }, { "docid": "e53cfaa7df15edb8f35d13c341bc3cf1", "score": "0.6376366", "text": "public function update_seller_balance_post()\n {\n if ($this->earnings_admin_model->update_seller_balance()) {\n $this->session->set_flashdata('success', trans(\"msg_updated\"));\n } else {\n $this->session->set_flashdata('error', trans(\"msg_error\"));\n }\n redirect($this->agent->referrer());\n }", "title": "" }, { "docid": "fbcffdbb9fad41b82e3333c2958f287b", "score": "0.6355801", "text": "public static function updateCustomer() { \n $result = lC_Customers_Admin::save($_GET['cid'], $_GET);\n if (!isset($result['rpcStatus'])) {\n $result['rpcStatus'] = RPC_STATUS_SUCCESS;\n }\n\n echo json_encode($result);\n }", "title": "" }, { "docid": "70ec02128e29bb0129bcf03f62423ad4", "score": "0.6354482", "text": "public function update(Request $request, Customer $customer)\n {\n\n // $customer = Customer::findOrFail($customer->id);\n\n // $customer->name= $request->input('name');\n // $customer->title = $request->input('title');\n // $customer->account= $request->input('account');\n $customer->update([\n 'name' => $request->input('name'),\n 'title' => $request->input('title'),\n 'account' => $request->input('account'),\n 'default_amount' => str_replace(',', '.',$request->input('default-amount')),\n\n ]);\n if($request->has('isActive')){\n $customer->update(['is_active' => '1' ]);\n // $customer->is_active = '1';\n }else{\n $customer->update(['is_active' => '0' ]);\n // $customer->is_active = '0';\n\n }\n if($request->has('reminder')){\n $customer->update(['reminder' => '1' ]);\n // $customer->reminder = '1';\n }else{\n $customer->update(['reminder' => '0' ]);\n }\n // dd ($customer);\n // $customer->save();\n return redirect()->route('customers.index');\n\n }", "title": "" }, { "docid": "0bcedd664fddcf41dc41b03cb454dc41", "score": "0.6341721", "text": "function updateBilling($input) {\n\n $oUser = UserQuery::create()->findPK($input['iUser']);\n\n if (!$oUser)\n throwSingleError('InvalidUser');\n\n $helper = new StripeHelper();\n $helper->updateCustomerBilling($oUser, $input['token']);\n\n jsonSuccess(array('url' => '/account/billing'));\n\n }", "title": "" }, { "docid": "2e821a598642952a0fe0e5ae14b9de8f", "score": "0.62396336", "text": "public function updateCustomer($param){\n $this->db->trans_begin();\n $this->db->where(\"kd_cust\",$param[\"kd_cust\"]);\n $this->db->update(\"customer\",$param);\n if($this->db->trans_status() === FALSE){\n $this->db->trans_rollback();\n return FALSE;\n }else{\n $this->db->trans_commit();\n return TRUE;\n }\n }", "title": "" }, { "docid": "35b0b066162d253443387ef70f174e64", "score": "0.6226875", "text": "function tep_gv_account_update($customer_id, $gv_id) {\n $customer_gv_query = tep_db_query(\"select amount from \" . TABLE_COUPON_GV_CUSTOMER . \" where customer_id = '\" . $customer_id . \"'\");\n $coupon_gv_query = tep_db_query(\"select coupon_amount from \" . TABLE_COUPONS . \" where coupon_id = '\" . (int)$gv_id . \"'\");\n $coupon_gv = tep_db_fetch_array($coupon_gv_query);\n if (tep_db_num_rows($customer_gv_query) > 0) {\n $customer_gv = tep_db_fetch_array($customer_gv_query);\n $new_gv_amount = $customer_gv['amount'] + $coupon_gv['coupon_amount'];\n // new code bugfix\n $gv_query = tep_db_query(\"update \" . TABLE_COUPON_GV_CUSTOMER . \" set amount = '\" . $new_gv_amount . \"' where customer_id = '\" . $customer_id . \"'\");\n // original code $gv_query = tep_db_query(\"update \" . TABLE_COUPON_GV_CUSTOMER . \" set amount = '\" . $new_gv_amount . \"'\");\n } else {\n $gv_query = tep_db_query(\"insert into \" . TABLE_COUPON_GV_CUSTOMER . \" (customer_id, amount) values ('\" . $customer_id . \"', '\" . $coupon_gv['coupon_amount'] . \"')\");\n }\n }", "title": "" }, { "docid": "e003fe160c7a7b62291d4103b4cfb9e8", "score": "0.6221577", "text": "public function credit_account() {\n \n $this->form_validation->set_rules(\"acc_no\", \"text\", \"required\");\n $this->form_validation->set_rules(\"amount\", \"password\", \"required\"); \n \n if ($this->form_validation->run() === true){\n \n $acc_no = $this->input->post(html_escape('acc_no'));\n $amount = $this->input->post(html_escape('amount'));\n \n $user_id = $this->aauth->get_user_id($this->user_id);\n $staff_vars = $this->Staffmodel->get_staff_vars($user_id);\n \n $current_balance = $this->Staffmodel->get_current_balance($acc_no); \n $customer = $this->Staffmodel->get_customer_var($acc_no);\n if ($current_balance === FALSE) {\n $this->session->set_flashdata('error', 'Invalid account number !');\n redirect(base_url('marketer/'.$staff_vars[0]['staff_surname'].$staff_vars[0]['staff_firstname']. '/'. $staff_vars[0]['staff_id']));\n return FALSE;\n }\n \n $new_balance = $current_balance + $amount;\n \n $update = $this->Staffmodel->credit_account($acc_no, $new_balance, $amount, $user_id);\n if ($update){\n \n $time = date(\"Y-m-d H:i:s\");\n $staff_name = $staff_vars[0]['staff_surname'].' '.$staff_vars[0]['staff_firstname'];\n $customer_name = $customer[0]['lastname'].' '.$customer[0]['firstname'];\n $customer_phone = $customer[0]['phone_number'];\n $messagetext = \"Your account has being credited with $amount N on $time by $staff_name current balance: $new_balance N. Thank you for banking with us, $this->sender\";\n// sends SMS to the specific user\n $this->useJSON($this->json_url, $this->user_name, $this->api_key, $this->flash, $this->sender, $messagetext, $customer_phone);\n $this->session->set_flashdata('success', \"account <strong>($customer_name)</strong> has being credited with <strong> $amount N </strong>successfully. current balance: <strong>$new_balance N</strong>\");\n redirect(base_url('marketer/'.$staff_vars[0]['staff_surname'].$staff_vars[0]['staff_firstname']. '/'. $staff_vars[0]['staff_id']));\n }else{\n $this->session->set_flashdata('error', 'account could not be credited! please contact admin');\n redirect(base_url('marketer/'.$staff_vars[0]['staff_surname'].$staff_vars[0]['staff_firstname']. '/'. $staff_vars[0]['staff_id']));\n return FALSE;\n } \n \n } else {\n $this->session->set_flashdata('error', validation_errors());\n redirect(base_url('marketer/'.$staff_vars[0]['staff_surname'].$staff_vars[0]['staff_firstname']. '/'. $staff_vars[0]['staff_id']));\n }\n }", "title": "" }, { "docid": "e22e391a8d2f31ee5c2d98c373c9844b", "score": "0.61704206", "text": "public function redeemCoins(Request $request){\n // 1) Get User details 2) find him in orders table 3) update his balance of coins :)\n $user_id = Auth::user()->id;\n $orderId = $request->input('order_id');\n //get pending order\n $pendingOrder = DB::select('SELECT (\"id\",\"priceInDollars\") FROM orders WHERE \"orderId\" = ? AND user_id = 1; ',[$orderId]);\n //get amount in dolllars\n $amountPaidByUser = $pendingOrder[1];\n //update pending order by changing user_id to current user\n DB::update('UPDATE orders SET user_id=? WHERE id= ?', [$user_id,$pendingOrder[0]]);\n //lets now update user balance\n updateUserAccountBalance($user_id,$amountPaidByUser);\n\n\n }", "title": "" }, { "docid": "2856fd569b953aa79eb01eb4844e5ca4", "score": "0.61596274", "text": "public function updated(Customer $customer)\n {\n //\n }", "title": "" }, { "docid": "345ff918873dc3dbeedb283e62c962c0", "score": "0.6144684", "text": "function update_transaction_debit($creditTransactionId){\n\t\t$amountdebited=\"YES\";\n\t\t$date = date(\"j-F-Y h:i:s A\"); \n\t\t// get the db object\n\t\t$db = new db();\n\t\t$db= $db->connect();\n \t// query to make request\n \t$sql =\"UPDATE api_request SET amount_debited=:amountDebited,date_amount_debited=:dateAmountDebited WHERE transaction_id=:transactId\";\n\t\t$stmt = $db->prepare($sql);\n\t\t$stmt->bindParam(\":amountDebited\",$amountdebited);\n\t\t$stmt->bindParam(\":dateAmountDebited\",$date);\n\t\t$stmt->bindParam(\":transactId\",$creditTransactionId);\n\t\t$stmt->execute();\n\t}", "title": "" }, { "docid": "2210812159018b168f2f526c40f72951", "score": "0.6142451", "text": "public function update_customer()\n {\n $json = '{\n \"company_name\":\"Microsoft\",\n \"ship_address\":\"1 Redmond Ave\",\n \"bill_address\":\"1 Redmond Ave\",\n \"phone\":\"(714) 475-4521\",\n \"fax\":\"(714) 475-4521\",\n \"notes\":\"These are some sample notes\"\n }';\n\n\n $request = $this->call('PUT', 'customers/1', array(), array(), array(), $json );\n $response = json_decode($request->getContent());\n\n $this->assertEquals(true, $response->success);\n }", "title": "" }, { "docid": "86beccaa87600db5adf9f40987f49d83", "score": "0.61350477", "text": "function donationsreceivable_updatezero($mycon, $member_id, $amount, $balance, $withdrawn)\n {\n $thedate = date(\"Y-m-d H:i:s\");\n $sql = \"UPDATE `donationsreceivable` SET\n `amount` = :amount\n ,`withdrawn` = :withdrawn\n ,`balance` = :balance\n ,`thedate` = :thedate WHERE `member_id` = :member_id\";\n $myrec = $mycon->prepare($sql);\n $myrec->bindValue(\":member_id\", $member_id, PDO::PARAM_STR);\n $myrec->bindValue(\":amount\", $amount, PDO::PARAM_STR);\n $myrec->bindValue(\":withdrawn\", $withdrawn, PDO::PARAM_STR);\n $myrec->bindValue(\":balance\", $balance, PDO::PARAM_STR);\n $myrec->bindValue(\":thedate\", $thedate, PDO::PARAM_STR);\n\n if (!$myrec->execute()) return false;\n\n return true;\n }", "title": "" }, { "docid": "ea6b0349ea272f2d4b8233b321426d2d", "score": "0.6132937", "text": "public function calculateBalance(): void\n {\n $this->balance = 0;\n\n foreach ($this->withdrawals as $withdrawal) {\n $this->balance = $this->balance - $withdrawal;\n }\n\n foreach ($this->deposits as $deposit) {\n $this->balance = $this->balance + $deposit;\n }\n }", "title": "" }, { "docid": "354720fd15616e51a8ead481a4c8434f", "score": "0.6118274", "text": "public function setBalance(float $balance): void\n {\n $this->_balance = $balance;\n }", "title": "" }, { "docid": "0a45514d57840d1a1f797b57a0a6efd6", "score": "0.61139476", "text": "public function add_chips_to_client($client_id,$balance)\n {\n $sql=\"UPDATE clients SET client_balance=client_balance+$balance where client_id=$client_id\";\n return $this->db->query($sql);\n }", "title": "" }, { "docid": "25433ca634282b60425ca58a25788e7a", "score": "0.6051736", "text": "public function testUpdateCustomer()\n {\n $accept_language = 'es';\n $rq = new UpdateCustomer([\n 'name' => 'test'\n ]);\n $result = self::$apiInstance->updateCustomer('id', $rq, $accept_language);\n $this->assertNotEmpty($result, 'expected not empty result');\n }", "title": "" }, { "docid": "68da926e2d2be6707783435a455f6b16", "score": "0.6049109", "text": "public function edit(Balance $balance)\n {\n //\n }", "title": "" }, { "docid": "b848e63e5261c52902a210c8569ffee4", "score": "0.6017359", "text": "public function fundAccount(Request $request){\n $amount = $request->amount;\n // find the previous balance\n $prevBal = User::findOrFail($request->id);\n $balance = $prevBal->balance + $amount;\n $funded = User::where('id', $request->id)->update(['balance'=> $balance]);\n\n if ($funded){\n return response($content = ['message' =>'User funded successfully' ], $status = 200);\n }else{\n return response($content = ['message'=>'An error occur User was not funded '], $status = 400);\n\n }\n }", "title": "" }, { "docid": "aa35fec743b0af2f8a05f890232a0fb6", "score": "0.60162103", "text": "public function updateCustomer($customer_id = '', $data = array()) {\r\n\r\n\t\t$fields = array(\r\n\t\t\t'account_balance',\r\n\t\t\t'card',\r\n\t\t\t'coupon',\r\n\t\t\t'plan',\r\n\t\t\t'quantity',\r\n\t\t\t'trial_end',\r\n\t\t\t'metadata',\r\n\t\t\t'description',\r\n\t\t\t'email',\r\n\t\t);\r\n\r\n\t\ttry {\r\n\t\t\t$customer = $this->getCustomer($customer_id);\r\n\t\t\tif (!$customer) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tforeach ($data as $key => $value) {\r\n\t\t\t\tif (in_array($key, $fields)) {\r\n\t\t\t\t\t$customer->$key = $value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $customer->save();\r\n\t\t} catch (Exception $ex) {\r\n\t\t\t$this->log($ex);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "2596fac0b53501ef33751a51ea4eabdb", "score": "0.5970738", "text": "public function addpayment(Request $request, $id){\n $payment = $request->validate([\n 'payment'=>'numeric|required'\n ]);\n $updateInvoice = Invoice::find($id);\n $total_ammount = $updateInvoice->total_ammount;\n $balance = $updateInvoice->balance;\n $balance = $total_ammount - $payment['payment'];\n $ammount_paid = $payment['payment'];\n $affecetd = DB::table('zcbm_invoices_seprate')\n ->where('id', $id)\n ->update(['balance' => $balance, 'ammount_paid'=> $ammount_paid]);\n // $updateInvoice->ammount_paid = $payment;\n // $updateInvoice->save();\n return redirect()->route('InvoiceIndex')->withSuccess('Payment added to invoice sucessfully!!');\n \n\n }", "title": "" }, { "docid": "33062c37e326474720f38f3f79ae4a24", "score": "0.5965839", "text": "public function setBalance($newBalance)\r\n {\r\n \tif (is_numeric($newBalance)){\r\n\t if ($newBalance <= 0) {\r\n\t return false;\r\n\t } \r\n\t else\r\n\t \t$newBalance = round($newBalance, 2); //round function to set the balance to 2 decimal places. means we can accept values with more than 2 decimal points\r\n\t return $this -> balance = $newBalance;;\r\n\t }\r\n }", "title": "" }, { "docid": "5abb41371f4b09dcd8c436119754c844", "score": "0.5947208", "text": "public function sendBalanceUpdateNotification() {\n\t\tif (!$this->getCustomer()->getRewardUpdateNotification()) {\n\t\t\treturn $this;\n\t\t}\n\t\t$delta = (int)$this->getPointsDelta();\n\t\tif ($delta == 0) {\n\t\t\treturn $this;\n\t\t}\n\t\t$store = Mage::app()->getStore($this->getStore());\n\t\t/* @var Df_Core_Model_Email_Template $mail */\n\t\t$mail = Df_Core_Model_Email_Template::i();\n\t\t$mail->setDesignConfig(\n\t\t\tarray(\n\t\t\t 'area' => Df_Core_Const_Design_Area::FRONTEND\n\t\t\t , 'store' => $store->getId()\n\t\t\t)\n\t\t);\n\t\t$templateVars = array(\n\t\t\t'store' => $store\n\t\t\t,'customer' => $this->getCustomer()\n\t\t\t,'unsubscription_url' => Df_Reward_Helper_Customer::s()->getUnsubscribeUrl('update')\n\t\t\t,'points_balance' => $this->getPointsBalance()\n\t\t);\n\t\t$mail->sendTransactional(\n\t\t\t$store->getConfig(\n\t\t\t\tself::XML_PATH_BALANCE_UPDATE_TEMPLATE)\n\t\t\t,$store->getConfig(self::XML_PATH_EMAIL_IDENTITY)\n\t\t\t,$this->getCustomer()->getEmail()\n\t\t\t,null,$templateVars,$store->getId()\n\t\t);\n\t\tif ($mail->getSentSuccess()) {\n\t\t\t$this->setBalanceUpdateSent(true);\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "63e047a30b68ec22c1e42da6479aba25", "score": "0.59425706", "text": "public function actionBalance()\n {\n $user = User::findOne(Yii::$app->user->id);\n $payForm = new PayForm([\n 'user_id' => $user->id,\n ]); \n\n if ($payForm->load(Yii::$app->request->post()) && $payForm->save()) {\n return $this->redirect(['pay']);\n } else {\n return $this->render('balance', [\n 'payForm' => $payForm,\n 'user' => $user,\n ]);\n }\n }", "title": "" }, { "docid": "04269ae49f1536b37f33e4e00b9120d0", "score": "0.5934574", "text": "function update_customer($data, $id)\n\t{\n\t\t$this->path = \"/api/customers/update/id/$id\";\n\t\treturn $this->_send_request($data);\n\t}", "title": "" }, { "docid": "a525e751aebd768a7e60102c97f461f5", "score": "0.59282386", "text": "public function updateAmountAllocated();", "title": "" }, { "docid": "9f55ebf20a41726953b44b8381e31957", "score": "0.5917658", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'amount'=> 'required|integer',\n ]);\n $post = Transaction::find($id);\n $amount = $request->get('amount');\n $balance = ($post->balance - $amount);\n $post->amount = $amount;\n $post->balance = $balance;\n $post->process = \"Paid\";\n $post->paymentMethod = $request->get('paymentMethod');\n/* $post->transactionId = $request->get('transactionId');\n $post->paymentMobile = $request->get('paymentMobile');*/\n $post->remark = $request->get('remark');\n $post->save();\n $this->repository->billTransactionOutstanding($post->customer,$post->month,$post->year);\n return redirect('/transaction')->with('success', 'Payment receive has been successfully');\n\n }", "title": "" }, { "docid": "7c40f6b6912270dd54e07b541af1fe4b", "score": "0.59140384", "text": "public function update(Request $request, Invoice $invoice)\n {\n //\n $invoice->update($request->all());\n $invoice->amount = $invoice->products->sum('line_total')* ((100+$invoice->client->tax_rate) / 100);\n if($request->discount_type == 'Amount') {\n $invoice->balance =\n $invoice->products->sum('line_total') * ((100+$invoice->client->tax_rate) / 100)\n - $request->discount\n - $invoice->payments->sum('payment_amount');\n }elseif($request->discount_type == 'Percent'){\n $invoice->balance =\n $invoice->products->sum('line_total') * ((100-$invoice->discount) / 100)\n + ( $invoice->products->sum('line_total')\n * (100+$invoice->client->tax_rate) / 100)\n -$invoice->products->sum('line_total')\n -$invoice->payments->sum('payment_amount');\n }\n $invoice->save();\n return redirect()->back();\n }", "title": "" }, { "docid": "eddfa9ff33fd0375c2b80b56c37ada77", "score": "0.59122425", "text": "public function testUpdateCustomerCustomFields()\n {\n }", "title": "" }, { "docid": "2460a5a46d5bf6140fa1ec96efb79278", "score": "0.5909448", "text": "public function CheckBalance($custid) {\n //Write Function To Check Balance\n echo(\"Function To Check Account Balance of the user is:\" .$custid);\n }", "title": "" }, { "docid": "e6b9c0de9c53658b962e6786f2097e60", "score": "0.5903287", "text": "public function update(Request $request, $id)\n {\n //save in finance entry\n if ($request->input('tab') == 2) {\n $obj = $this->object::findOrFail($id);\n\n\n $obj->entry_date = Carbon::parse($request->input('entry_date'));\n $diffetant = $request->input('depit') - $obj->depit;\n $obj->depit = $obj->depit + $diffetant;\n $obj->notes = $request->input('notes');\n\n $Clientdata = Financial_entry::where('client_id', $obj->client_id)->where('currency_id', '=', $obj->currency_id)->sum('credit') - Financial_entry::where('client_id', $obj->client_id)->where('currency_id', '=', $obj->currency_id)->sum('depit');\n\n $currentBalance = Financial_entry::where('bank_account_id', $obj->bank_account_id)->sum('depit') - Financial_entry::where('bank_account_id', $obj->bank_account_id)->sum('credit');\n\n // if ($obj->depit > $Clientdata || $obj->depit > $currentBalance) {\n\n // return redirect()->back()->withInput($request->input())->with('flash_danger', 'Amount Is Not Valid');\n // } else {\n $obj->update();\n\n\n\n\n return redirect()->route($this->routeName . 'show', $request->input('bank_account_id'))->with('flash_success', $this->message);\n // }\n } \n if ($request->input('tab') == 1) {\n\n $obj = $this->object::findOrFail($id);\n $obj->entry_date = Carbon::parse($request->input('entry_date'));\n $diffetant = $request->input('credit') - $obj->credit;\n $obj->credit = $obj->credit + $diffetant;\n $obj->notes = $request->input('notes');\n $currentBalance = Financial_entry::where('bank_account_id', $obj->bank_account_id)->sum('depit') - Financial_entry::where('bank_account_id', $obj->bank_account_id)->sum('credit');\n\n if ($obj->ocean_carrier_id) {\n\n $data = Financial_entry::where('ocean_carrier_id', $obj->ocean_carrier_id)->where('currency_id', '=', $obj->bank_account_id)->sum('depit') - Financial_entry::where('ocean_carrier_id', $request->input('xxselector'))->where('currency_id', '=', $obj->bank_account_id)->sum('credit');\n }\n if ($obj->air_carrier_id) {\n\n $data = Financial_entry::where('air_carrier_id', $obj->air_carrier_id)->where('currency_id', '=', $obj->bank_account_id)->sum('depit') - Financial_entry::where('air_carrier_id', $request->input('xxselector'))->where('currency_id', '=', $obj->bank_account_id)->sum('credit');\n }\n\n if ($obj->trucking_id) {\n\n $data = Financial_entry::where('trucking_id', $obj->trucking_id)->where('currency_id', '=', $obj->bank_account_id)->sum('depit') - Financial_entry::where('trucking_id', $request->input('xxselector'))->where('currency_id', '=', $obj->bank_account_id)->sum('credit');\n }\n if ($obj->clearance_id) {\n\n $data = Financial_entry::where('clearance_id', $obj->clearance_id)->where('currency_id', '=', $obj->bank_account_id)->sum('depit') - Financial_entry::where('clearance_id', $request->input('xxselector'))->where('currency_id', '=', $obj->bank_account_id)->sum('credit');\n }\n if ($obj->agent_id) {\n\n $data = Financial_entry::where('agent_id', $obj->agent_id)->where('currency_id', '=', $obj->bank_account_id)->sum('depit') - Financial_entry::where('agent_id', $obj->agent_id)->where('currency_id', '=', $obj->bank_account_id)->sum('credit');\n }\n\n\n\n\n $currentBalance = Financial_entry::where('bank_account_id', $obj->bank_account_id)->sum('depit') - Financial_entry::where('bank_account_id', $obj->bank_account_id)->sum('credit');\n\n\n // if ($diffetant > $currentBalance || $diffetant > $currentBalance) {\n\n // return redirect()->back()->withInput($request->input())->with('flash_danger', 'Amount Is Not Valid');\n // } else {\n $obj->update();\n\n\n\n\n return redirect()->route($this->routeName . 'show', $request->input('bank_account_id'))->with('flash_success', $this->message);\n // }\n }\n if ($request->input('tab') == 3) {\n $cashObj = $this->object::findOrFail($id);\n $cashObj->entry_date = Carbon::parse($request->input('entry_date'));\n $diffetant = $request->input('amountOut') - $cashObj->credit;\n $cashObj->credit = $cashObj->credit + $diffetant;\n $cashObj->notes = $request->input('notesexchanger');\n $currentBalance = Financial_entry::where('bank_account_id', $cashObj->bank_account_id)->sum('depit') - Financial_entry::where('bank_account_id', $cashObj->bank_account_id)->sum('credit');\n\n \\Log::info([$cashObj->credit, $currentBalance + $diffetant]);\n // if ($diffetant > $currentBalance) {\n\n // return redirect()->back()->withInput($request->input())->with('flash_danger', 'Amount Is Not Valid');\n // } else {\n\n $cashObj->update();\n $secondCash = Financial_entry::where('parent_id', $id)->first();\n $secondCash->entry_date = Carbon::parse($request->input('entry_date'));\n $diffetant = $request->input('amountIn') - $secondCash->depit;\n $secondCash->depit = $secondCash->depit + $diffetant;\n $secondCash->notes = $request->input('notesexchanger');\n\n $secondCash->update();\n\n return redirect()->route($this->routeName . 'show', $request->input('bank_account_id'))->with('flash_success', $this->message);\n }\n // }\n// bank exchanger\nif ($request->input('tab') == 4) {\n $cashesObjBank = $this->object::findOrFail($id);\n $cashesObjBank->entry_date = Carbon::parse($request->input('entry_date'));\n $diffetant = $request->input('amountOutBank') - $cashesObjBank->credit;\n $cashesObjBank->credit = $cashesObjBank->credit + $diffetant;\n $cashesObjBank->notes = $request->input('notesexchangerBank');\n $currentBalance = Financial_entry::where('bank_account_id', $cashesObjBank->bank_account_id)->sum('depit') - Financial_entry::where('bank_account_id', $cashesObjBank->bank_account_id)->sum('credit');\n\n \\Log::info([$cashesObjBank->credit, $currentBalance + $diffetant]);\n // if ($diffetant > $currentBalance) {\n\n // return redirect()->back()->withInput($request->input())->with('flash_danger', 'Amount Is Not Valid');\n // } else {\n\n $cashesObjBank->update();\n $secondCash = Financial_entry::where('parent_id', $id)->first();\n $secondCash->entry_date = Carbon::parse($request->input('entry_date'));\n $diffetant = $request->input('amountInBank') - $secondCash->depit;\n $secondCash->depit = $secondCash->depit + $diffetant;\n $secondCash->notes = $request->input('notesexchangerBank');\n\n $secondCash->update();\n\n return redirect()->route($this->routeName . 'show', $request->input('bank_account_id'))->with('flash_success', $this->message);\n }\n// }\n\n return redirect()->route($this->routeName . 'show', $request->input('bank_account_id'))->with('flash_success', $this->message);\n }", "title": "" }, { "docid": "eee707667bc3680dfade50669ea8a047", "score": "0.5895672", "text": "public function updateCust($cust) {\n $mcust = new Customer();\n $mcust = $cust;\n\n //\n $rs_head = $this->db->update('customer', array(\n 'company_id' => $mcust->getCompany_id(),\n 'custtype_id' => $mcust->getCusttype_id(),\n 'condtcust' => $mcust->getCondtcust(),\n 'occupation_id' => $mcust->getOccupation_id(),\n 'aliasname' => $mcust->getAliasname(),\n 'status' => $mcust->getStatus(),\n 'note' => $mcust->getNote(),\n 'date_change' => $mcust->getDate_change()), \"customer_id = {$mcust->getCustomer_id()}\");\n\n if (isset($rs_head))\n return $rs_head;\n\n $rs_comm = $this->db->update('customer_commcont', array(\n 'commercial_contact_name' => $mcust->getCommercial_contact_name(),\n 'comm_business_phone' => $mcust->getComm_business_phone(),\n 'comm_mobil_phone' => $mcust->getComm_mobil_phone(),\n 'comm_nextel_phone' => $mcust->getComm_nextel_phone(),\n 'comm_nextel_id' => $mcust->getComm_nextel_id(),\n 'comm_fax_phone' => $mcust->getComm_fax_phone(),\n 'comm_email' => $mcust->getComm_email(),\n 'comm_webpage' => $mcust->getComm_webpage(),\n 'comm_note' => $mcust->getComm_note()), \"customer_id = {$mcust->getCustomer_id()}\");\n //\n if (isset($rs_comm))\n return $rs_comm;\n\n $rs_inv = $this->db->update('customer_invcont', array(\n 'invoice_contact_name' => $mcust->getInvoice_contact_name(),\n 'inv_business_phone' => $mcust->getInv_business_phone(),\n 'inv_mobil_phone' => $mcust->getInv_mobil_phone(),\n 'inv_nextel_phone' => $mcust->getInv_nextel_phone(),\n 'inv_nextel_id' => $mcust->getInv_nextel_id(),\n 'inv_fax_phone' => $mcust->getInv_fax_phone(),\n 'inv_email' => $mcust->getInv_email(),\n 'inv_note' => $mcust->getInv_note()), \"customer_id = {$mcust->getCustomer_id()}\");\n //\n if (isset($rs_inv))\n return $rs_inv;\n\n //\n $rs_commaddr = $this->db->update('customer_commaddr', array(\n 'comm_addr_id' => $mcust->getComm_addr_id(),\n 'comm_addr_zip' => $mcust->getComm_addr_zip(),\n 'comm_address' => $mcust->getComm_address(),\n 'comm_addr_number' => $mcust->getComm_addr_number(),\n 'comm_addr_comp' => $mcust->getComm_addr_comp(),\n 'comm_addr_dist' => $mcust->getComm_addr_dist(),\n 'comm_addr_city' => $mcust->getComm_addr_city(),\n 'comm_addr_state' => $mcust->getComm_addr_state(),\n 'comm_addr_ref' => $mcust->getComm_addr_ref()), \"customer_id = {$mcust->getCustomer_id()}\");\n\n /**\n * If add details is not free\n * error, enter to return error. \n */\n if (isset($rs_commaddr))\n return $rs_commaddr;\n\n //\n $rs_invaddr = $this->db->update('customer_invaddr', array(\n 'inv_addr_id' => $mcust->getInv_addr_id(),\n 'inv_addr_zip' => $mcust->getInv_addr_zip(),\n 'inv_address' => $mcust->getInv_address(),\n 'inv_addr_number' => $mcust->getInv_addr_number(),\n 'inv_addr_comp' => $mcust->getInv_addr_comp(),\n 'inv_addr_dist' => $mcust->getInv_addr_dist(),\n 'inv_addr_city' => $mcust->getInv_addr_city(),\n 'inv_addr_state' => $mcust->getInv_addr_state(),\n 'inv_addr_ref' => $mcust->getInv_addr_ref()), \"customer_id = {$mcust->getCustomer_id()}\");\n\n /**\n * If add details is not free\n * error, enter to return error. \n */\n if (isset($rs_invaddr))\n return $rs_invaddr;\n\n\n //\n return $rs_head;\n }", "title": "" }, { "docid": "c7fbbb26f66e4bbe64875cbf57055585", "score": "0.5894142", "text": "public function update(Request $request, $id)\n {\n\n $this->validate($request, [\n 'denomination' => 'required',\n ]);\n $wallet = Wallet::find(value(auth()->user()->id));\n $denomination = $request->input('denomination');\n\n $wallet->balance = ($wallet->balance) + $denomination;\n\n $wallet->save();\n\n\n return redirect()->route('wallet')->with('success', 'Post Created');\n }", "title": "" }, { "docid": "dcca245d5f8cb95e0007bf5d2639f0f6", "score": "0.58936995", "text": "public function balance($card)\n {\n }", "title": "" }, { "docid": "1d86e4f43386086f40f07afb87e15ba5", "score": "0.58896947", "text": "public function update($customer, array $input)\n {\n Validator::make($input, [\n 'current_password' => ['required', 'string'],\n 'password' => $this->passwordRules(),\n ])->after(function ($validator) use ($customer, $input) {\n if (! isset($input['current_password']) || ! Hash::check($input['current_password'], $customer->password)) {\n $validator->errors()->add('current_password', __('The provided password does not match your current password.'));\n }\n })->validateWithBag('updatePassword');\n\n $customer->forceFill([\n 'password' => Hash::make($input['password']),\n ])->save();\n }", "title": "" }, { "docid": "116116c4b2f776cb2d215477ed3d37b2", "score": "0.58730125", "text": "function balancePayament()\n {\n \n if (isset($_REQUEST['identifyId'])) {\n $identifyId = $_REQUEST['identifyId'];\n } else {\n $identifyId= null;\n }\n if (isset($_REQUEST['paid'])) {\n $paid_amount = $_REQUEST['paid'];\n } else {\n $paid_amount= null;\n }\n if (isset($_REQUEST['totalAmount'])) {\n $total_amount = $_REQUEST['totalAmount'];\n } else {\n $total_amount= null;\n }\n \n $loginUserid = $_COOKIE[\"userid\"];\n \n // print(\"identify \"+$identifyId);\n //print(\"balance \"+$paid_amount);\n \n // $retrieveOrder_query = \"select po.identify_id,po.po_date,po.status,po.amount,sum(paid_amount) as paid from purchase_order po, payment_entity_assoc pea where po.identify_id='$orderId' and pea.entity_identify_id='$orderId'\";\n //print($retrieveOrder_query);\n $updatePayment=\"insert into payment_entity_assoc (entity_type,identify_id,total_amount,paid_amount,created_by) values(1,$identifyId,$total_amount,$paid_amount,$loginUserid)\";\n \n \n $r3 = $this->mysqli->query($updatePayment);\n/* if ($r3->num_rows > 0) {\n $result = array();\n while ($row1 = $r3->fetch_assoc()) {\n $result[] = $row1;\n }\n }\n $this->response(json_encode($result), 200);\n $this->response('', 204); */\n }", "title": "" }, { "docid": "6c9b72294593e85145567e957ff8dcba", "score": "0.58625925", "text": "public function update(Request $request, tbl_customer_purchase $tbl_customer_purchase)\n {\n \n }", "title": "" }, { "docid": "05678f0b914e24445b4788a0a7154a8f", "score": "0.58575255", "text": "public function updateUserWallet($uid,$amount){\n $con = $this->con();\n $checkUSer = $con->query(\"SELECT * FROM `wallet` WHERE `userId`='$uid'\");\n $sql \t\t = \"\"; \n if($checkUSer->num_rows>0){\n $sql.=\"UPDATE `wallet` SET `wal_balance`=`wal_balance`-'$amount',`updatedAt`=NOW() WHERE `userId`='$uid'\";\n }else{\n $sql.=\"INSERT INTO `wallet`(`userId`,`wal_balance`,`updatedAt`) VALUES('$uid','$amount',NOW())\";\n }\n\n $query = $con->query($sql);\n if($query){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "e7f3981a42c92e8faaa720517ab81282", "score": "0.5857068", "text": "public function subtract_chips_from_client($client_id,$balance)\n {\n $sql=\"UPDATE clients SET client_balance=client_balance-$balance where client_id=$client_id\";\n return $this->db->query($sql);\n\t\t}", "title": "" }, { "docid": "93274fdfd3ec1b187e9e33308f5d6ff3", "score": "0.5842739", "text": "public function update( $user, Customer $customer)\n {\n //\n }", "title": "" }, { "docid": "0a448e4348e1c7f87dee722f6a56a785", "score": "0.5830176", "text": "public function setBalance($balance) {\n if (is_null($this->oldBalance))\n $this->oldBalance = $this->getBalance();\n return parent::setBalance($balance);\n }", "title": "" }, { "docid": "418e4841c7236660034a8470600464e0", "score": "0.5826981", "text": "public function balance() {\n $params = array(\n 'api_id' => $this->api_id\n );\n $url = self::HOST . self::BALANCE . http_build_query($params);\n $res = file_get_contents($url);\n list($code,$balance) = explode(\"\\n\", $res);\n $this->_lastAction = 'balance';\n $this->_lastResponseCode = $code;\n return $balance;\n }", "title": "" }, { "docid": "bfe05e6131504346e14f4168f2cd81e9", "score": "0.5823545", "text": "public function updateTotalDeposit() {\n // foreach ($listTransaction as $transaction) {\n // if(isset($transaction['date'])) {\n // $checkExist = Report::where('date', $transaction['date'])->first();\n // if(!empty($checkExist)) {\n // $total_deposit = isset($checkExist['total_deposit']) ? $checkExist['total_deposit'] + $transaction['value'] : $transaction['value'];\n // } else {\n // $total_deposit = $transaction['value'];\n // }\n // $dataUpdate = [\n // 'total_deposit' => $total_deposit,\n // 'date' => $transaction['date']\n // ];\n // if(!empty($checkExist)) {\n // Report::where('_id', $checkExist['_id'])->update($dataUpdate);\n // } else {\n // Report::insert($dataUpdate);\n // }\n // }\n // Transaction::where('_id', $transaction['_id'])->update(['cron_check' => 2]);\n // }\n }", "title": "" }, { "docid": "875795dde08fd97fedcf471928b742db", "score": "0.5822266", "text": "public function depositfunds($BankAccount,$account, $amount ) { \t\n $Balance= $account->getBalance();\n $account->setBalance($Balance + $amount);\n \t Echo \"You deposited \\n{$amount}. Your new balance is\\n\" {$account->getBalance()}\\n;\n\n }", "title": "" }, { "docid": "3def1c5c68a9e3c6f5545529ab471974", "score": "0.58164173", "text": "function update(){\n\t\t\n\t\tif($this->getCid()===null)\n\t\t\treturn -1;\n\t\t\n\t\t$query = \"UPDATE CUSTOMERS SET \";\n\t\t$paramVals = array();\n\t\t$paramTypes = array();\n\t\t\n\t\tif($this->getVat()!==null){\n\t\t\t$query .= \"VAT = ?,\";\n\t\t\tarray_push($paramVals, $this->getVat());\n\t\t\tarray_push($paramTypes, 'i');\n\t\t}\n\t\tif($this->getCst()!==null){\n\t\t\t$query .= \"CST = ?,\";\n\t\t\tarray_push($paramVals, $this->getCst());\n\t\t\tarray_push($paramTypes, 'i');\n\t\t}\n\t\tif($this->getName()!=null){\n\t\t\t$query .= \"NAME = ?,\";\n\t\t\tarray_push($paramVals, $this->getName());\n\t\t\tarray_push($paramTypes, 's');\n\t\t}\n\t\tif($this->getAddressline1()!=null){\n\t\t\t$query .= \"ADDRESSLINE1 = ?,\";\n\t\t\tarray_push($paramVals, $this->getAddressline1());\n\t\t\tarray_push($paramTypes, 's');\n\t\t}\n\t\tif($this->getAddressline2()!=null){\n\t\t\t$query .= \"ADDRESSLINE2 = ?,\";\n\t\t\tarray_push($paramVals, $this->getAddressline2());\n\t\t\tarray_push($paramTypes, 's');\n\t\t}\n\t\tif($this->getCity()!=null){\n\t\t\t$query .= \"CITY = ?,\";\n\t\t\tarray_push($paramVals, $this->getCity());\n\t\t\tarray_push($paramTypes, 's');\n\t\t}\n\t\tif($this->getPincode()!==null){\n\t\t\t$query .= \"PINCODE = ?,\";\n\t\t\tarray_push($paramVals, $this->getPincode());\n\t\t\tarray_push($paramTypes, 'i');\n\t\t}\n\t\tif($this->getPan()!=null){\n\t\t\t$query .= \"PAN = ?,\";\n\t\t\tarray_push($paramVals, $this->getPan());\n\t\t\tarray_push($paramTypes, 's');\n\t\t}\n\t\t\n\t\t$query = rtrim($query, \",\");\n\t\t\n\t\t$query .= \" WHERE CID = ?\";\n\t\tarray_push($paramVals, $this->getCid());\n\t\tarray_push($paramTypes, 'i');\n\t\t\n\t\ttry{\n\t\t\t$db = new DBPdo();\n\t\t\t$result = $db->setData($query, $paramVals, $paramTypes);\n\t\t\treturn $result[\"RowsAffected\"];\n\t\t}catch(DLException $dle){\n\t\t\tthrow $dle;\n\t\t}\n\t}", "title": "" }, { "docid": "14c8ffd1980c584885e21e6ec1c9cb9d", "score": "0.58148634", "text": "function testSetBalance(){\n\t\tsetBalance(\"[email protected]\", 1000);\n\t\t$this->assertEquals(getBalance(\"[email protected]\"), 1000);\n\t\tsetBalance(\"[email protected]\", 10000);\n\t\t$this->assertEquals(getBalance(\"[email protected]\"), 10000);\n\t}", "title": "" }, { "docid": "8346172147bd19a90b0eed9cd6c713d9", "score": "0.5809775", "text": "public function updateCustomer($customer)\n {\n $this->_customerModel->updateCustomer($customer);\n }", "title": "" }, { "docid": "5c03834bc220b82dfffc1f5dde811401", "score": "0.57747024", "text": "function update($id, $amount) {\n \n $connect = new Tools();\n $conexion = $connect->connectDB();\n $sql = \"UPDATE wallets SET \"\n . \"amount = '$amount' \n WHERE id = '$id' ;\";\n $consulta = mysqli_query($conexion,$sql);\n if(!$consulta){\n echo \"No se ha podido modificar la base de datos<br><br>\".mysqli_error($conexion);\n }\n $connect->disconnectDB($conexion);\n return $consulta;\n \n }", "title": "" }, { "docid": "e2522249035424430581e5db65b809c6", "score": "0.57675517", "text": "private function setAmountApproved() {\n if($_SESSION['user_type']===\"Super Administrator\"){\n $query = \"SELECT `amount_appr` FROM acquisitions WHERE id = ?\";\n $result = $this->Dbase->ExecuteQuery($query,array($_POST['rowID']));\n if(sizeof($result) === 1 && is_null($result[0]['amount_appr'])) {\n $query = \"UPDATE acquisitions SET `amount_appr` = ? WHERE id = ?\";\n $this->Dbase->ExecuteQuery($query,array($_POST['amountApproved'],$_POST['rowID']));\n $this->generateInvoice($_POST['rowID']);\n }\n }\n }", "title": "" }, { "docid": "e291b0ff2bf5303c0be4ec75349cf337", "score": "0.5759301", "text": "public function update($id)\n\t{\n\t\t$balance = Balance::find($id);\n\t\t$balance->fill(Input::all());\n\t\t$balance->save();\n\t\treturn Response::json($balance);\n\t}", "title": "" }, { "docid": "717b3ef69cc48feb12a37ea7ff0ddfe7", "score": "0.5749775", "text": "public function update()\n\t{\n\t\tif (!$this->ion_auth->logged_in())\n\t\t{\n\t\t\t// redirect them to the login page\n\t\t\tredirect('auth/login', 'refresh');\n\t\t}\n\n\t\t$id = $this->input->post('id');\n\t\t/*echo $id;\n\t\texit();*/\n\t\t$acc=array(\n\t\t\t'account_name' =>$this->input->post('accname'),\t\t\t\t\n\t\t\t'account_type' =>$this->input->post('acctype'),\n\t\t\t'account_no' =>$this->input->post('accnumber'),\n\t\t\t'bank_name' =>$this->input->post('bankname'),\n\t\t\t'bank_address' =>$this->input->post('address'),\n\t\t\t'opening_balance' =>$this->input->post('balance'),\n\t\t\t'default_account' =>$this->input->post('defacc'),\n\t\t\t'user_id' =>$this->session->userdata(\"userId\")\n\t\t);\n\t\t\n\t\t/*echo \"<pre>\";\n\t\tprint_r($acc);\n\t\texit();*/\n\n\t\tif($this->Account_model->editAccount($id,$acc)){\n\t\t\t$this->session->set_flashdata('success', 'Account Updated successfully.');\n \tredirect(\"bank\",'refresh');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->session->set_flashdata('success', 'Account Updated Failed.');\n \tredirect(\"bank\",'refresh');\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "e2fd8d94ba39490f491b21eb6ca7f636", "score": "0.5749164", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n // 更新 不允许手动编辑余额,自动计算\n if ($model->load(Yii::$app->request->post())) {\n $connection = Yii::$app->db;\n $transaction = $connection->beginTransaction();\n $tb = Integral::tableName();\n try {\n $model->note = Yii::$app->user->identity->showName.'('.Yii::$app->request->getUserIP().')'.$model->note;\n $updateData = [\n 'integral' => $model->integral,\n 'user_id' => $model->user_id,\n 'pay_code' => $model->pay_code,\n 'out_trade_no' => $model->out_trade_no,\n 'note' => $model->note,\n 'created_at' => $model->created_at,\n 'updated_at' => $model->updated_at,\n 'status' => $model->status,\n ];\n Yii::trace('手动修改积分流水。'.json_encode($updateData));\n $connection->createCommand()->update($tb, $updateData, ['id' => $id])->execute();\n // 如果当前记录的状态有变化,则修正 当前可用余额(最后一条生效记录的余额)\n $userModel = Users::find()->where(['user_id' => $model->user_id])->one();\n if ($userModel) {\n $balance = Integral::getBalance($userModel->user_id);\n\n $connection->createCommand()->update(\n Users::tableName(),\n ['int_balance' => $balance],\n ['user_id' => $model->user_id]\n )->execute();\n\n if ($balance < 0) {\n Yii::$app->session->setFlash('error', '积分可用余额不能小于0');\n throw new Exception('积分可用余额不能小于0', 1);\n }\n } else {\n Yii::$app->session->setFlash('error', '指定的用户不存在');\n throw new Exception('指定的用户不存在', 2);\n }\n\n $transaction->commit();\n return $this->redirect(['view', 'id' => $model->id]);\n } catch (Exception $e) {\n Yii::$app->session->setFlash('error', '积分流水更新失败');\n $transaction->rollBack();\n }\n }\n\n $statusMap = Integral::$statusMap;\n $payCodeMap = Integral::$payCodeMap;\n\n return $this->render('update', [\n 'model' => $model,\n 'statusMap' => $statusMap,\n 'payCodeMap' => $payCodeMap,\n ]);\n }", "title": "" }, { "docid": "1747722f9c32061f3e687666ecc5b7c7", "score": "0.573956", "text": "public function update(Request $request, Balance $balance)\n {\n $balance->update($request->all());\n\n return response()->json($balance, 200);\n }", "title": "" }, { "docid": "e2c13e2b9e2244663ee1d2d9a4433a16", "score": "0.57369566", "text": "function update($gigyaAccount);", "title": "" }, { "docid": "fc18703e67d9235a8995521f47b78db8", "score": "0.57339644", "text": "function AfterEdit(&$values,$where,&$oldvalues,&$keys,$inline,&$pageObject)\n{\n\n\t\tglobal $conn;\n$amount_bill=$values['amount'];\n$student_bill_id=$keys['student_bill_id'];\n\n$sql_sum = \"SELECT SUM(amount) AS sumpay FROM student_payment WHERE student_bill_id='$student_bill_id'\";\n$q_sum = db_query($sql_sum,$conn);\n$row_sum=db_fetch_array($q_sum);\n$sumpay=$row_sum['sumpay'];\n\n$balance=$amount_bill-$sumpay;\n\nif( $balance<=0){\n$sql_update2=\"UPDATE student_billing SET status='Paid',amount_balance='$balance' WHERE student_bill_id='$student_bill_id'\";\ndb_exec($sql_update2,$conn);\n}\nelse if($balance>0){\n$sql_update=\"UPDATE student_billing SET status='Pending',amount_balance='$balance' WHERE student_bill_id='$student_bill_id'\";\ndb_exec($sql_update,$conn);\n}\n\n// Place event code here.\n// Use \"Add Action\" button to add code snippets.\n;\t\t\n}", "title": "" }, { "docid": "a460a921f0a2a0a766e89b5d9766ddca", "score": "0.5712821", "text": "function balance(): float\n {\n return $this->coin->getBalance(['account' => $this->purchase->id, 'address' => $this -> purchase -> address]);\n }", "title": "" }, { "docid": "9b687cd9c89399233cd75daabdfa98e5", "score": "0.5706222", "text": "public function changeCost(Request $request){\n $order_id = $request->order_id;\n $order = Order::findOrFail($order_id);\n $amount = $request->amount;\n $order->amount = $amount;\n $order->update();\n return redirect(\"order/$order->id\")->with('notice',['class'=>'success','message'=>'Order cost updated accordingly']);\n dd($order);\n }", "title": "" }, { "docid": "c1f0535a411c3f83dda9e21311fabb45", "score": "0.57060105", "text": "function update_sa_cust($cust_id, $first_name, $surname, $gender, $idnumber, $street_address, $street_address_line2, $street_address_line3, $city, $province, $area_code, $phone_number, $email) {\n $saved = false;\n\n $query = \"UPDATE customer SET first_name='\" . trim($first_name) . \"', surname='\" . trim($surname) . \"',gender='\" . trim($gender) . \"', idnumber='\" . trim($idnumber) . \"', street_address='\" . trim($street_address) . \"' , Street_Address_line2='\" . trim($street_address) . \"' , Street_Address_line3='\" . trim($street_address) . \"',city='\" . trim($city) . \"', province='\" . trim($province) . \"', area_code='\" . trim($area_code) . \"', phone_number='\" . trim($phone_number) . \"', email='\" . trim($email) . \"' WHERE customer_id =\" . $cust_id;\n global $conn;\n\n if (mysqli_query($conn, $query)) {\n echo '<div class=\"alert alert-success\" role=\"alert\" align=\"center\">Customer account successfully updated..</div>';\n\n echo '<script> \n\t\t\t\t\tdocument.getElementById(\"balance\").value =\"\" \n\t\t\t</script>';\n\n echo '<script> \n\t\t\t\t\tdocument.getElementById(\"idno2\").value =\"\" \n\t\t\t</script>';\n\n echo '<script> \n\t\t\t\tdocument.getElementById(\"firstname\").value =\"\" \n\t\t\t</script>';\n\n echo '<script> \n\t\t\t\tdocument.getElementById(\"surname\").value =\"\" \n\t\t\t</script>';\n\n echo '<script> \n\t\t\t\tdocument.getElementById(\"gender\").value =\"\" \n\t\t\t</script>';\n\n echo '<script> \n\t\t\t\tdocument.getElementById(\"street\").value =\"\" \n\t\t\t</script>';\n\n echo '<script> \n\t\t\t\tdocument.getElementById(\"city\").value =\"\" \n\t\t\t</script>';\n\n echo '<script> \n\t\t\t\tdocument.getElementById(\"cust-province\").value =\"\" \n\t\t\t</script>';\n\n echo '<script> \n\t\t\t\tdocument.getElementById(\"areacode\").value =\"\" \n\t\t\t</script>';\n\n echo '<script> \n\t\t\t\tdocument.getElementById(\"phone\").value =\"\" \n\t\t\t</script>';\n\n echo '<script> \n\t\t\t\tdocument.getElementById(\"email\").value =\"\" \n\t\t\t</script>';\n\n echo '<script> \n\t\t\t\tdocument.getElementById(\"btnsave\").disabled =true \n\t\t\t</script>';\n } else {\n echo \"Failed\";\n }\n\n return $saved;\n}", "title": "" }, { "docid": "0b28c7465c15675b3f9b49941753fd71", "score": "0.5683889", "text": "function Update_earning_wallet($user_auth_id,$wallet_total)\n\t{\n\t\t\tglobal $db;\n\t\t\t$sql=\"UPDATE \".MEMBER_MASTER\n\t\t\t\t.\" SET \"\n\t\t\t\t.\" earn_by_site = '\".$wallet_total.\"' \"\n\t\t\t\t.\" WHERE user_auth_id ='\".$user_auth_id.\"'\"; \n\t\t\treturn($db->query($sql));\n\t}", "title": "" }, { "docid": "989cc2185d4f92dd8bacebc0391846ad", "score": "0.5678217", "text": "public function update(Request $request, Debts $debts)\n {\n \n if($request->pay_amount>=$request->debt_amount){\n $reason = \"Paid\";\n }else{\n $reason = \"Part-Payment\";\n }\n \n\n $balance = $request->debt_amount - $request->pay_amount;\n \n $debt = Debts::where('id','=', $request->id);\n $debt->update([\n 'debt_amount'=>$balance,\n 'debt_reason'=>$reason,\n 'remarks'=>$request->remarks\n ]);\n\n $invoice = Invoices::where('invoice_no','=', $request->invoice_no);\n $invoice->update([\n 'payment_status'=>$reason\n ]);\n\n // UPDATE DEBT - DECREASE\n $invoice->decrement('balance', $request->pay_amount);\n \n\n session()->flash('message','The Debt: '.$request->invoice_no.' has been updated successfully! Click <a href=\"/invoice/'.$request->invoice_no.'/'.$request->quantity_supplied.'\" class=\"btn btn-small yellow\"> Here </a> to Print Receipt');\n \n return redirect()->back();\n }", "title": "" }, { "docid": "54e61239aa6073405b124c6c30ebd4dc", "score": "0.5673642", "text": "public function update($billable, $billingMethod);", "title": "" }, { "docid": "d532e76036fe195fb04dcd5b75a36f78", "score": "0.5671636", "text": "public function transfer_balance_to_real_users()\n\t\t{\n\t\t\t$this->load->model('user_profiles', 'up');\n\t\t\t$reinvest_users = $this->up->get_reinvest_users();\n\t\t\tforeach($reinvest_users as $reinvest_user)\n\t\t\t{\n\t\t\t\t// add the credit to the real/parent user\n\t\t\t\t$this->up->transfer_reward_balance($reinvest_user->parent_id, $reinvest_user->credit);\n\t\t\t\t// update the balance of the re-invest user to 0\n\t\t\t\t$user_data['credit'] = 0;\n\t\t\t\t$this->up->update($reinvest_user->user_id, $user_data);\n\t\t\t}// end of foreach($reinvest_users as $reinvest_user)\n\t\t}", "title": "" }, { "docid": "3faac63910a6f022b08d7aec4e6d6fae", "score": "0.5670575", "text": "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set id_cliente=\\\"$this->id_cliente\\\",id_envio=\\\"$this->id_envio\\\",id_articulo=\\\"$this->id_articulo\\\",cantidad=\\\"$this->cantidad\\\",total=\\\"$this->total\\\",nota=\\\"$this->nota\\\",is_active=\\\"$this->is_active\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "title": "" }, { "docid": "48db8578af64bc65c71ef1358723a583", "score": "0.5669033", "text": "public function updateCustomer(Mage_Customer_Model_Customer $customer)\n {\n $this->_eventType = 'Customer Update';\n $data = $this->_buildCustomerPayload($customer, \"update\");\n $response = $this->apiPost('user', $data);\n if (!$customer->getData('sailthru_id')) {\n $this->_setSid($customer, $response);\n }\n }", "title": "" }, { "docid": "eb1c3ff23ee6593d3ae698ceb68861f6", "score": "0.5660815", "text": "public function actionAdminBalance()\n {\n $model=new SaldoCabina('search');\n $model->unsetAttributes(); // clear any default values\n if(isset($_GET['SaldoCabina'])) $model->attributes=$_GET['SaldoCabina'];\n\n $this->render('adminBalance', array(\n 'model'=>$model,\n ));\n }", "title": "" }, { "docid": "9b7fe8ee78f9bc60d5ed9f687188c853", "score": "0.56603104", "text": "public function actionBilling() {\n $model = new MemberBilling();\n if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n $model->member_id = Yii::$app->user->identity->getId();\n $model->save();\n $balance = MemberHelper::GetBalance(Yii::$app->user->identity->getId());\n Yii::$app->db->createCommand()->update('members', [ 'balance' =>$balance], ' id=\"'.Yii::$app->user->identity->getId().'\"')->execute();\n\n Yii::$app->session->setFlash('success', 'Баланс поповнено на : '.number_format(Yii::$app->request->post('MemberBilling')['summa'], 2 , ',' , ' ').' грн.');\n header('Location: ' . Url::to(['/members/member/billing']));\n exit();\n }\n return $this->render('billing', ['model'=>$model]);\n }", "title": "" }, { "docid": "ea8860af6e5bd1cff8dae0a6fbdec077", "score": "0.5659533", "text": "function customer_outstanding_balance($customer_id='')\n{\n\n$f_id=$this->session->f_id;\n\n ##fetch customer name by is\n $data['customer_name']=$this->Account_model->select_id('table_crn',array('f_id'=>$f_id,'id'=>$customer_id),array('name'));\n \n$condition=array('t1.customer_id'=>$customer_id,'t1.f_id'=>$f_id,'t1.reference_type'=>1,'t2.status!='=>'paid','double_entry'=>0);\n $transaction=$this->Account_model->fetch_customer_outstanding_balance('table_account_transaction',$condition,array('t1.invoice_id','t1.created_at','t2.total','t2.paid'));\n $data['outstanding']=$this->Account_model->fetch_customer_outstanding_balance('table_account_transaction',$condition,array('t1.invoice_id','t1.created_at','t2.total','t2.paid'));\n \n## fetch if opening balance is pending\n \n$conditionOpeningBalance=array('id'=>$customer_id,'f_id'=>$f_id,'balance_status!='=>'paid','initial_balance>'=>0);\n\n $initial_balance=$this->Account_model->select_id('table_crn',$conditionOpeningBalance,array('initial_balance','paid','date(created_at) as created_at'));\n\n $data['initial']=array(\"created_at\"=>$initial_balance['created_at'],\"invoice_id\"=>'',\"total\"=>$initial_balance['initial_balance'],\"paid\"=>$initial_balance['paid']);\n \n $data['_view'] = 'outstanding_balance';\n\n $this->load->view('index.php',$data);\n\n\n}", "title": "" }, { "docid": "3290d73890dcc2b843090abca0497713", "score": "0.56591827", "text": "public function updateTotal()\n {\n $total = $this->currencyService->getZeroMoney();\n\n $countryCode = strtoupper($this->localeService->getActiveCountry()->getCountryCode());\n\n $taxable = $this->transaction->getTotalWithExclusions(\n [$this->getIdentifier()->getFull()]\n );\n\n if (isset($this->config[$countryCode])) {\n\n if (isset($this->config[$countryCode][self::RATE_CONFIG_KEY])) {\n $rate = $this->config[$countryCode][self::RATE_CONFIG_KEY];\n } else {\n $rate = 0;\n }\n\n if (isset($this->config[$countryCode][self::TYPE_CONFIG_KEY])\n && $this->config[$countryCode][self::TYPE_CONFIG_KEY] == self::EXCLUSIVE_TAX_TYPE\n ) {\n\n $total = $taxable->subtract($this->getTaxExemptTotal())->multiply($rate);\n\n } else if (isset($this->config[$countryCode][self::TYPE_CONFIG_KEY])\n && $this->config[$countryCode][self::TYPE_CONFIG_KEY] == self::INCLUSIVE_TAX_TYPE\n ) {\n // TODO: Migrate to ratios\n $total = $taxable->subtract($this->getTaxExemptTotal())->multiply($rate / ($rate + 1));\n }\n\n }\n\n $this->total = $total;\n\n $this->saveState();\n\n $this->eventService->dispatch(Events::TOTAL_UPDATED);\n }", "title": "" }, { "docid": "5673941557d6e27c2774627126283918", "score": "0.5658596", "text": "public function testUpdateCustomerInvoiceNote()\n {\n }", "title": "" }, { "docid": "e20bbec0aa897fc6a9efd3eed5032cda", "score": "0.5654587", "text": "function update_customer($id,$params)\r\n {\r\n $this->db->where('id',$id);\r\n return $this->db->update('customers',$params);\r\n }", "title": "" }, { "docid": "87aa36bfb41798729cd4fbf14f4811eb", "score": "0.56481326", "text": "public function acc1_balance() {\n\t\t\t$this->layout = \"ajax\";\n\t\t\t$userId = $this->UserAuth->getUserId();\n\t\t\t#jika tiada wallet create new\n\t\t\t$vault = $this->Vault->checkVaultAccount($userId);\n\t\t\t$balance = $this->Vault->getAccBalance($userId);\n\t\t\t#debug($balance['Vault']['acc_1']);die();\n\t\t\tif ($this->request->is('requested')) {\n\t\t\t\t$bal = $balance['Vault']['acc_1'];\n\t\t\t\treturn $bal;\n\t\t\t} else {\n\t\t\t\t$this->set('balance', $balance['Vault']['acc_1']);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "c83517ddf93e13232c05f8d98ea73fe3", "score": "0.56405985", "text": "function updateCustomer($name, $address, $email, $Phone, $CreditCard)\n{\n\t$sql = \"UPDATE customer SET name='$name', address='$address', Phone='$Phone', CreditCard='$CreditCard' WHERE email='$email'\";\n\t$result = mysql_query($sql);\n\treturn mysql_fetch_row($result);\n}", "title": "" }, { "docid": "c37a9d9f2680abd90b69b7f54d9f2592", "score": "0.56284636", "text": "public function setBalanceTransaction($balanceTransaction) {\n $this->balanceTransaction = $balanceTransaction;\n }", "title": "" }, { "docid": "c9cad4ad3b575236d823cec73c31c337", "score": "0.56255734", "text": "public function updateAccount(){\n\t\t$updates = json_decode($_POST[\"updates\"],true); \n\t\t$account_id = $_POST[\"account_id\"];\n\t\t$res = OSAccount::where(\"id\",$account_id)->update($updates);\n\t\techo json_encode([\"status\"=>\"OK\",\"msg\"=>\"ACCOUNT-UPDATED\",\"res\"=>$res]); \n\t}", "title": "" }, { "docid": "8ec9d2a4d57b2fb9918467c756eb4ead", "score": "0.562427", "text": "public function store(Request $request)\n {\n $this->validate($request, [\n 'denomination' => 'required',\n ]);\n\n\n\n $wallet = Wallet::find(value(auth()->user()->id));\n $denomination = $request->input('denomination');\n\n DB::table('wallet')->where('user_id',value(auth()->user()->id))->update([\n 'balance' => value((DB::table('wallet')\n ->select('balance')\n ->where('user_id','=',value(auth()->user()->id))->implode('balance'))+$denomination),\n ]);\n\n\n return redirect()->route('home')->with('success', 'Funds Added');\n }", "title": "" }, { "docid": "e617cabc507e5bfad01c5ab85bf01faf", "score": "0.56216836", "text": "public function update() {\n $this->bean->dailyIncome = $this->bean->income / $this->bean->incomePeriod;\n }", "title": "" }, { "docid": "259b6f1574792be8c411a63eb8d5adf2", "score": "0.5618819", "text": "function updateTotalPrepost($id = null) {\n\n $this->recursive = 2;\n\n // Client\n $this->bindModel(array('hasMany' => array('InvoicesItem'),),false);\n $this->unbindModel(array('hasMany' => array('InvoicesTimecardReminderLog', 'InvoicesPostLog', 'InvoicesTimecardReceiptLog'),),false);\n $this->ClientsContract->unbindModel(array('hasAndBelongsToMany' => array('ClientsManager','User'),),false);\n $this->InvoicesItem->unbindModel(array('belongsTo' => array('Invoice'),),false);\n\n $invoice = $this->read(null, $id);\n\n $invTotal = $this->write_commissions($invoice);\n\n $invoice['Invoice']['amount']= $invTotal;\n\n $this->save($invoice['Invoice']);\n }", "title": "" }, { "docid": "28727203e67f0cedfdb2f386846476ff", "score": "0.56086475", "text": "public function updateCustomer($email, $password, $joinDate, $firstName, $lastName, $gender, $streetAddress, $city, $country, $state, $mobile, $picture)\n {\n }", "title": "" }, { "docid": "28bf22cd4432f9e234a84c94768f36b2", "score": "0.560788", "text": "public function updated(Currency $currency);", "title": "" }, { "docid": "78c1bbcbfd910d9f3e79eabc4a20a865", "score": "0.56032556", "text": "public function getBalance();", "title": "" }, { "docid": "1ab661d181a92bed63cb7414849fbf0b", "score": "0.5600585", "text": "function action_update()\n\t{\n\t\tlog_debug(\"inc_charts\", \"Executing action_update()\");\n\n\n\t\t/*\n\t\t\tStart Transaction\n\t\t*/\n\t\t$sql_obj = New sql_query;\n\t\t$sql_obj->trans_begin();\n\n\n\n\t\t/*\n\t\t\tIf no ID exists, create a new account first\n\t\t*/\n\t\tif (!$this->id)\n\t\t{\n\t\t\t$mode = \"create\";\n\n\t\t\tif (!$this->action_create())\n\t\t\t{\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$mode = \"update\";\n\t\t}\n\n\n\t\t// update details\n\t\tif (!$this->action_update_details())\n\t\t{\n\t\t\tlog_write(\"error\", \"inc_charts\", \"An error occured when updating account details.\");\n\t\t}\n\n\n\t\t// update menu options\n\t\tif (!$this->action_update_menu())\n\t\t{\n\t\t\tlog_write(\"error\", \"inc_charts\", \"An error occured when updating account menu options.\");\n\t\t}\n\n\t\t\n\t\t/*\n\t\t\tCommit\n\t\t*/\n\n\t\tif (error_check())\n\t\t{\n\t\t\t$sql_obj->trans_rollback();\n\n\t\t\tlog_write(\"error\", \"inc_charts\", \"An error occured whilst attempting to update account. No changes have been made.\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sql_obj->trans_commit();\n\n\t\t\tif ($mode == \"update\")\n\t\t\t{\n\t\t\t\tlog_write(\"notification\", \"inc_charts\", \"Account details successfully updated.\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlog_write(\"notification\", \"inc_charts\", \"Account successfully created.\");\n\t\t\t}\n\t\t}\n\n\n\t\t// success\n\t\treturn $this->id;\n\n\t}", "title": "" }, { "docid": "3efe9b74bc9f59d44975f4b583d3cfb7", "score": "0.5593396", "text": "public function update(Request $request)\n\t{\n\t\t//\n $id = $request->input('id');\n $status = $request->input('status');\n $note = $request->input('note');\n\n if(!isset($id) || !isset($status)){\n return redirect()->back()->withErrors(array('error'=>'参数异常'));\n }\n\n if($status==-1){\n if(empty($note)){\n return redirect()->back()->withErrors(array('error'=>'请输入驳回原因'));\n }\n }\n\n $cash = Cash::find($id);\n if(empty($cash)){\n return redirect()->back()->withErrors(array('error'=>'找不到提现记录'));\n }\n $user = User::find($cash->uid);\n if(empty($user)){\n return redirect()->back()->withErrors(array('error'=>'申请者不存在'));\n }\n\n if($status == 1){\n if((int)$cash->money ==0 || $user->money < $cash->money){\n $cash->status = -1;\n $cash->note = '返现金额不足';\n $cash->save();\n return redirect()->back()->withErrors(array('error'=>'用户返现金额不足,已驳回'));\n }\n }\n\n $cash->status = $status;\n $cash->save();\n\n if( $cash->status ==1){\n $user->money -= $cash->money;\n $user->save();\n\n $record = [\n 'title'=>'账户提现',\n 'money'=>$cash->money,\n 'type'=>3,\n 'cate'=>2,\n 'note'=>$cash->uname.'提现'.$cash->money.',目前'.$user->money,\n ];\n Money::create($record);\n }\n $url = url('admin/shop/cash');\n return redirect($url);\n\n\t}", "title": "" } ]
4f28e12ccb6aa4303014b0c0d65a7389
Operation taskWorkGetTasksWithHttpInfo This call executes a task search and return taskwork active for the user and the given workflows ids (with all revisions)
[ { "docid": "f55f01b6551496ebc1ec3eb1c2153d14", "score": "0.6425253", "text": "public function taskWorkGetTasksWithHttpInfo($request)\n {\n $returnType = '\\Swagger\\Client\\Model\\RowSearchResult[]';\n $request = $this->taskWorkGetTasksRequest($request);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\RowSearchResult[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" } ]
[ { "docid": "ffa6b569cf5c8e760661e1cf4313dcca", "score": "0.6585687", "text": "public function taskWorkGetTaskWorkByIdWithHttpInfo($task_work_id)\n {\n $returnType = '\\Swagger\\Client\\Model\\TaskWorkDTO';\n $request = $this->taskWorkGetTaskWorkByIdRequest($task_work_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\TaskWorkDTO',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "3511f200af61e4d5128e6b32d807e093", "score": "0.63453907", "text": "public function taskWorkActivateTaskworkWithHttpInfo($task_work_id)\n {\n $returnType = '\\Swagger\\Client\\Model\\TaskWorkDTO';\n $request = $this->taskWorkActivateTaskworkRequest($task_work_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\TaskWorkDTO',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "2d8db7ef999c8e68910a9ec2f32e63b4", "score": "0.615771", "text": "public function taskWorkGetActiveTaskWorkWithHttpInfo($select, $docnumber)\n {\n $returnType = '\\Swagger\\Client\\Model\\RowSearchResult[]';\n $request = $this->taskWorkGetActiveTaskWorkRequest($select, $docnumber);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\RowSearchResult[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "6444de852d4b1bef64d090f328abcf22", "score": "0.6145146", "text": "public function taskWorkGetTasks($request)\n {\n list($response) = $this->taskWorkGetTasksWithHttpInfo($request);\n return $response;\n }", "title": "" }, { "docid": "5bfd43547a9c706e9b25e322e6a2826b", "score": "0.5936826", "text": "public function taskWorkGetExitCodesByTaskWorkIdsWithHttpInfo($task_work_ids)\n {\n $returnType = '\\Swagger\\Client\\Model\\TaskExitCodeDTO[]';\n $request = $this->taskWorkGetExitCodesByTaskWorkIdsRequest($task_work_ids);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\TaskExitCodeDTO[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "e9b8484c696b1bd28f2e024becfb4f8b", "score": "0.5922109", "text": "public function taskWorkGetActiveTaskWorkAsyncWithHttpInfo($select, $docnumber)\n {\n $returnType = '\\Swagger\\Client\\Model\\RowSearchResult[]';\n $request = $this->taskWorkGetActiveTaskWorkRequest($select, $docnumber);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "5aa12821e6c3cc29c999a6a8145b6e6e", "score": "0.59163094", "text": "public function taskWorkGetTaskWorkForAutoAssignWithHttpInfo($docnumber)\n {\n $returnType = '\\Swagger\\Client\\Model\\TaskWorkDTO[]';\n $request = $this->taskWorkGetTaskWorkForAutoAssignRequest($docnumber);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\TaskWorkDTO[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "cc9cea9987572edeed5131881e0cde88", "score": "0.5789695", "text": "protected function taskWorkGetTaskWorkByIdRequest($task_work_id)\n {\n // verify the required parameter 'task_work_id' is set\n if ($task_work_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $task_work_id when calling taskWorkGetTaskWorkById'\n );\n }\n\n $resourcePath = '/api/TaskWork/{taskWorkId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($task_work_id !== null) {\n $resourcePath = str_replace(\n '{' . 'taskWorkId' . '}',\n ObjectSerializer::toPathValue($task_work_id),\n $resourcePath\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']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\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 // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "5fbc9f9b9563fb17c6460ccf1d23fa04", "score": "0.5685166", "text": "public function taskWorkSetTaskReadWithHttpInfo($taskid)\n {\n $returnType = 'int';\n $request = $this->taskWorkSetTaskReadRequest($taskid);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'int',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "c7cded5e3ca6eb60e30bc396fafaa075", "score": "0.5653182", "text": "public function taskWorkActivateTaskworkAsyncWithHttpInfo($task_work_id)\n {\n $returnType = '\\Swagger\\Client\\Model\\TaskWorkDTO';\n $request = $this->taskWorkActivateTaskworkRequest($task_work_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "5328d8d1bc007d63d057048d5eec5d15", "score": "0.5631665", "text": "public function taskWorkGetActiveTaskWork($select, $docnumber)\n {\n list($response) = $this->taskWorkGetActiveTaskWorkWithHttpInfo($select, $docnumber);\n return $response;\n }", "title": "" }, { "docid": "aa68fb998ab7d3febe96359949dffbb3", "score": "0.56253046", "text": "public function taskWorkTaskWorkTakeChargeWithHttpInfo($task_work_id)\n {\n $returnType = '';\n $request = $this->taskWorkTaskWorkTakeChargeRequest($task_work_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "9c35bd1cd9ac8a367db570d4d2e994bf", "score": "0.55042", "text": "public function taskWorkSetProfileForTaskWorkBySelectionDocumentOperationWithHttpInfo($task_work_id, $task_work_document_operation_id, $docnumbers)\n {\n $returnType = '';\n $request = $this->taskWorkSetProfileForTaskWorkBySelectionDocumentOperationRequest($task_work_id, $task_work_document_operation_id, $docnumbers);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "2f7c8a894a0b7d7e806baae819183fc3", "score": "0.5489454", "text": "public function getExternalTasksWithHttpInfo($external_task_id = null, $external_task_id_in = null, $topic_name = null, $worker_id = null, $locked = null, $not_locked = null, $with_retries_left = null, $no_retries_left = null, $lock_expiration_after = null, $lock_expiration_before = null, $activity_id = null, $activity_id_in = null, $execution_id = null, $process_instance_id = null, $process_instance_id_in = null, $process_definition_id = null, $tenant_id_in = null, $active = null, $suspended = null, $priority_higher_than_or_equals = null, $priority_lower_than_or_equals = null, $sort_by = null, $sort_order = null, $first_result = null, $max_results = null)\n {\n $request = $this->getExternalTasksRequest($external_task_id, $external_task_id_in, $topic_name, $worker_id, $locked, $not_locked, $with_retries_left, $no_retries_left, $lock_expiration_after, $lock_expiration_before, $activity_id, $activity_id_in, $execution_id, $process_instance_id, $process_instance_id_in, $process_definition_id, $tenant_id_in, $active, $suspended, $priority_higher_than_or_equals, $priority_lower_than_or_equals, $sort_by, $sort_order, $first_result, $max_results);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n (string) $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n\n switch($statusCode) {\n case 200:\n if ('\\OpenAPI\\Client\\Model\\ExternalTaskDto[]' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\ExternalTaskDto[]', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n case 400:\n if ('\\OpenAPI\\Client\\Model\\ExceptionDto' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\ExceptionDto', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\ExternalTaskDto[]';\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\ExternalTaskDto[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\ExceptionDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "392f6b752fe0b4b1a12d71e6364c676e", "score": "0.5446403", "text": "public function taskWorkGetExitCodesByTaskWorkIdsAsyncWithHttpInfo($task_work_ids)\n {\n $returnType = '\\Swagger\\Client\\Model\\TaskExitCodeDTO[]';\n $request = $this->taskWorkGetExitCodesByTaskWorkIdsRequest($task_work_ids);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "3a5ddfb21980104f0101ef570059b9b8", "score": "0.54251105", "text": "public function taskWorkGetTaskWorkByIdAsyncWithHttpInfo($task_work_id)\n {\n $returnType = '\\Swagger\\Client\\Model\\TaskWorkDTO';\n $request = $this->taskWorkGetTaskWorkByIdRequest($task_work_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "9d8279d10ce3808dff5950226bc9bf0c", "score": "0.54123753", "text": "public function taskWorkAutoAssignWithHttpInfo($taskwork_id)\n {\n $returnType = '';\n $request = $this->taskWorkAutoAssignRequest($taskwork_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "fd854e4d91e14f5558e0918b8238b7b2", "score": "0.53638905", "text": "public function taskWorkGetTasksAsyncWithHttpInfo($request)\n {\n $returnType = '\\Swagger\\Client\\Model\\RowSearchResult[]';\n $request = $this->taskWorkGetTasksRequest($request);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "da07a9b9b6e13b1c6a766f23c791af08", "score": "0.5363599", "text": "public function getWorkByIdWithHttpInfo($work_id)\n {\n \n // verify the required parameter 'work_id' is set\n if ($work_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $work_id when calling getWorkById');\n }\n \n // parse inputs\n $resourcePath = \"/beta/work/{workId}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());\n \n \n \n // path params\n \n if ($work_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"workId\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($work_id),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\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 \n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('API-Key');\n if (strlen($apiKey) !== 0) {\n $headerParams['API-Key'] = $apiKey;\n }\n \n \n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath, 'GET',\n $queryParams, $httpBody,\n $headerParams, '\\Infoplus\\Model\\Work'\n );\n \n if (!$response) {\n return array(null, $statusCode, $httpHeader);\n }\n\n return array(\\Infoplus\\ObjectSerializer::deserialize($response, '\\Infoplus\\Model\\Work', $httpHeader), $statusCode, $httpHeader);\n \n } catch (ApiException $e) {\n switch ($e->getCode()) { \n case 200:\n $data = \\Infoplus\\ObjectSerializer::deserialize($e->getResponseBody(), '\\Infoplus\\Model\\Work', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n \n throw $e;\n }\n }", "title": "" }, { "docid": "b2aab548c08f0538fe41ab23ce1cf342", "score": "0.53510946", "text": "protected function taskWorkActivateTaskworkRequest($task_work_id)\n {\n // verify the required parameter 'task_work_id' is set\n if ($task_work_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $task_work_id when calling taskWorkActivateTaskwork'\n );\n }\n\n $resourcePath = '/api/TaskWork/{taskWorkId}/Activate';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($task_work_id !== null) {\n $resourcePath = str_replace(\n '{' . 'taskWorkId' . '}',\n ObjectSerializer::toPathValue($task_work_id),\n $resourcePath\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']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\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 // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "6d4b53bf3e841c380cf3932ce328ef72", "score": "0.5262234", "text": "public function taskWorkSetProfileForTaskWorkBySelectionDocumentOperationAsyncWithHttpInfo($task_work_id, $task_work_document_operation_id, $docnumbers)\n {\n $returnType = '';\n $request = $this->taskWorkSetProfileForTaskWorkBySelectionDocumentOperationRequest($task_work_id, $task_work_document_operation_id, $docnumbers);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "6f2839c197c6204246ceade6c10aed31", "score": "0.5259552", "text": "public function taskWorkCanFinalizeTaskByIdsWithHttpInfo($taskworkids)\n {\n $returnType = '\\Swagger\\Client\\Model\\CloseEligibleResult[]';\n $request = $this->taskWorkCanFinalizeTaskByIdsRequest($taskworkids);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\CloseEligibleResult[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "c045b21ee3e816c9151e9493ae824617", "score": "0.5212365", "text": "public function taskWorkGetTaskWorkForAutoAssignAsyncWithHttpInfo($docnumber)\n {\n $returnType = '\\Swagger\\Client\\Model\\TaskWorkDTO[]';\n $request = $this->taskWorkGetTaskWorkForAutoAssignRequest($docnumber);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "f00d711194e94449f3087343fad37c09", "score": "0.5186316", "text": "public function taskWorkDeleteTaskWorkByIdWithHttpInfo($task_work_id)\n {\n $returnType = '';\n $request = $this->taskWorkDeleteTaskWorkByIdRequest($task_work_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "8d5f8ddfcb51b0f78f476751dd538982", "score": "0.5181593", "text": "protected function taskWorkGetExitCodesByTaskWorkIdsRequest($task_work_ids)\n {\n // verify the required parameter 'task_work_ids' is set\n if ($task_work_ids === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $task_work_ids when calling taskWorkGetExitCodesByTaskWorkIds'\n );\n }\n\n $resourcePath = '/api/TaskWork/exitcodes';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($task_work_ids)) {\n $_tempBody = $task_work_ids;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\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 // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "c9f8a11544933a47afc7d400001163e6", "score": "0.51295877", "text": "public function taskWorkReassignUsersTaskByIdWithHttpInfo($taskworkid)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserCompleteDTO[]';\n $request = $this->taskWorkReassignUsersTaskByIdRequest($taskworkid);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\UserCompleteDTO[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "0c361e6df509d69c3f2e0cf3da308dee", "score": "0.5128585", "text": "protected function taskWorkDeleteTaskWorkByIdRequest($task_work_id)\n {\n // verify the required parameter 'task_work_id' is set\n if ($task_work_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $task_work_id when calling taskWorkDeleteTaskWorkById'\n );\n }\n\n $resourcePath = '/api/TaskWork/{taskWorkId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($task_work_id !== null) {\n $resourcePath = str_replace(\n '{' . 'taskWorkId' . '}',\n ObjectSerializer::toPathValue($task_work_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\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 // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "e6b30aa46d9d8ada9aa9639907bc7522", "score": "0.51262784", "text": "protected function taskWorkGetActiveTaskWorkRequest($select, $docnumber)\n {\n // verify the required parameter 'select' is set\n if ($select === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $select when calling taskWorkGetActiveTaskWork'\n );\n }\n // verify the required parameter 'docnumber' is set\n if ($docnumber === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $docnumber when calling taskWorkGetActiveTaskWork'\n );\n }\n\n $resourcePath = '/api/TaskWork/actives/{docnumber}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($docnumber !== null) {\n $resourcePath = str_replace(\n '{' . 'docnumber' . '}',\n ObjectSerializer::toPathValue($docnumber),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($select)) {\n $_tempBody = $select;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\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 // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "91ba7dba59070c66e61a17d403878d4f", "score": "0.49326345", "text": "protected function viewsGetViewByTaskWorkOperationIdRequest($taskwork_id, $operation_id)\n {\n // verify the required parameter 'taskwork_id' is set\n if ($taskwork_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $taskwork_id when calling viewsGetViewByTaskWorkOperationId'\n );\n }\n // verify the required parameter 'operation_id' is set\n if ($operation_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $operation_id when calling viewsGetViewByTaskWorkOperationId'\n );\n }\n\n $resourcePath = '/api/Views/task/{taskworkId}/operation/{operationId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($taskwork_id !== null) {\n $resourcePath = str_replace(\n '{' . 'taskworkId' . '}',\n ObjectSerializer::toPathValue($taskwork_id),\n $resourcePath\n );\n }\n // path params\n if ($operation_id !== null) {\n $resourcePath = str_replace(\n '{' . 'operationId' . '}',\n ObjectSerializer::toPathValue($operation_id),\n $resourcePath\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']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\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 // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "966cad02a8b38fc691f799fb1a10d472", "score": "0.4913431", "text": "protected function taskWorkSetTaskReadRequest($taskid)\n {\n // verify the required parameter 'taskid' is set\n if ($taskid === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $taskid when calling taskWorkSetTaskRead'\n );\n }\n\n $resourcePath = '/api/TaskWork/read';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($taskid)) {\n $_tempBody = $taskid;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\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 // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "6c0255884f9ae7592bff683514fe1672", "score": "0.48854676", "text": "public function taskWorkCanFinalizeTaskByIdsAsyncWithHttpInfo($taskworkids)\n {\n $returnType = '\\Swagger\\Client\\Model\\CloseEligibleResult[]';\n $request = $this->taskWorkCanFinalizeTaskByIdsRequest($taskworkids);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "e10a333c5efde7db4219e214b1fb9bba", "score": "0.48739484", "text": "public function taskInfo($taskId) {\n $result = $this->client->managementApiCall('GET', \"{$this->hashid}/tasks/{$taskId}\");\n unset($result['response']['task_name']);\n return $result['response'];\n }", "title": "" }, { "docid": "164a659851926641830a147ab8896209", "score": "0.4854543", "text": "public function taskWorkGetTaskWorkById($task_work_id)\n {\n list($response) = $this->taskWorkGetTaskWorkByIdWithHttpInfo($task_work_id);\n return $response;\n }", "title": "" }, { "docid": "de94c3f02410f571e05d59a14d16aef4", "score": "0.48396462", "text": "public function taskWorkTaskWorkTakeChargeAsyncWithHttpInfo($task_work_id)\n {\n $returnType = '';\n $request = $this->taskWorkTaskWorkTakeChargeRequest($task_work_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "b7a433b980240db94268484d8f858401", "score": "0.48285288", "text": "public function taskWorkFinalizeTaskByIdsAndExitCodeAndPasswordWithHttpInfo($close_request)\n {\n $returnType = '';\n $request = $this->taskWorkFinalizeTaskByIdsAndExitCodeAndPasswordRequest($close_request);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "d13fbba5b6ad1b89495748cfc7a424db", "score": "0.4812622", "text": "public function taskWorkSetTaskRead($taskid)\n {\n list($response) = $this->taskWorkSetTaskReadWithHttpInfo($taskid);\n return $response;\n }", "title": "" }, { "docid": "c62d4995db37489a78d70dc8ab374af8", "score": "0.4803277", "text": "public function taskWorkGetActiveTaskWorkAsync($select, $docnumber)\n {\n return $this->taskWorkGetActiveTaskWorkAsyncWithHttpInfo($select, $docnumber)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "51cfb6144ade917937797dae41da7b05", "score": "0.4801518", "text": "protected function taskWorkGetTasksRequest($request)\n {\n // verify the required parameter 'request' is set\n if ($request === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $request when calling taskWorkGetTasks'\n );\n }\n\n $resourcePath = '/api/TaskWork';\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']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\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 // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "4febfc7620964d899db2c9a98929142b", "score": "0.47950462", "text": "public function taskWorkGetProfileSchemaForTaskWorkModelDocumentOperationAsyncWithHttpInfo($task_work_id, $task_work_document_operation_id)\n {\n $returnType = '\\Swagger\\Client\\Model\\ModelProfileSchemaDTO';\n $request = $this->taskWorkGetProfileSchemaForTaskWorkModelDocumentOperationRequest($task_work_id, $task_work_document_operation_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "b5dd1dc03aa018a07d9b4fa79cfb2d84", "score": "0.47339278", "text": "public function taskWorkGetProfileSchemaForTaskWorkMaskDocumentOperationWithHttpInfo($task_work_id, $task_work_document_operation_id)\n {\n $returnType = '\\Swagger\\Client\\Model\\MaskProfileSchemaDTO';\n $request = $this->taskWorkGetProfileSchemaForTaskWorkMaskDocumentOperationRequest($task_work_id, $task_work_document_operation_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\MaskProfileSchemaDTO',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "5e09286135e99bdf674fa8e420f52b59", "score": "0.4728668", "text": "public function taskWorkGetProfileSchemaForTaskWorkMaskDocumentOperationAsyncWithHttpInfo($task_work_id, $task_work_document_operation_id)\n {\n $returnType = '\\Swagger\\Client\\Model\\MaskProfileSchemaDTO';\n $request = $this->taskWorkGetProfileSchemaForTaskWorkMaskDocumentOperationRequest($task_work_id, $task_work_document_operation_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "62b035d3900636da56f3c2c2bf46105d", "score": "0.47230142", "text": "public function taskWorkSetTaskReadAsyncWithHttpInfo($taskid)\n {\n $returnType = 'int';\n $request = $this->taskWorkSetTaskReadRequest($taskid);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "675246bc79d60a2b71f13b1896aab476", "score": "0.47187233", "text": "public function getMyTasks($params = [])\n {\n return $this->api('my/tasks', ChatworkRequest::REQUEST_METHOD_GET, $params);\n }", "title": "" }, { "docid": "b8da3b25612ad012901f7d7efabf56fb", "score": "0.46988752", "text": "public function taskWorkAutoAssignAsyncWithHttpInfo($taskwork_id)\n {\n $returnType = '';\n $request = $this->taskWorkAutoAssignRequest($taskwork_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "3702e79e3316648a55fce0611696e8ac", "score": "0.4682666", "text": "protected function taskWorkCanFinalizeTaskByIdsRequest($taskworkids)\n {\n // verify the required parameter 'taskworkids' is set\n if ($taskworkids === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $taskworkids when calling taskWorkCanFinalizeTaskByIds'\n );\n }\n\n $resourcePath = '/api/TaskWork/canfinalize';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($taskworkids)) {\n $_tempBody = $taskworkids;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\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 // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "96ff74eda6a590042f7827b45535bcd2", "score": "0.4656528", "text": "public function viewsGetViewByTaskWorkOperationIdAsyncWithHttpInfo($taskwork_id, $operation_id)\n {\n $returnType = '\\Swagger\\Client\\Model\\ViewDTO';\n $request = $this->viewsGetViewByTaskWorkOperationIdRequest($taskwork_id, $operation_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "cacdbf5fb8f018120d77957a916e429c", "score": "0.46515366", "text": "public function taskWorkGetProfileSchemaForTaskWorkModelDocumentOperationWithHttpInfo($task_work_id, $task_work_document_operation_id)\n {\n $returnType = '\\Swagger\\Client\\Model\\ModelProfileSchemaDTO';\n $request = $this->taskWorkGetProfileSchemaForTaskWorkModelDocumentOperationRequest($task_work_id, $task_work_document_operation_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\ModelProfileSchemaDTO',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "aaea6508875150bd7c9ded4028c3c876", "score": "0.46401778", "text": "protected function taskWorkReassignUsersTaskByIdRequest($taskworkid)\n {\n // verify the required parameter 'taskworkid' is set\n if ($taskworkid === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $taskworkid when calling taskWorkReassignUsersTaskById'\n );\n }\n\n $resourcePath = '/api/TaskWork/reassignusers/{taskworkid}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($taskworkid !== null) {\n $resourcePath = str_replace(\n '{' . 'taskworkid' . '}',\n ObjectSerializer::toPathValue($taskworkid),\n $resourcePath\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']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\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 // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "486b8030ba854910c982512ddcda3c6f", "score": "0.4639798", "text": "public function index(ListTaskRequest $request)\n {\n $input = $request->validated()['params'];\n\n if (auth()->user()->isAdmin()) {\n $tasks = Task::with('project.owner', 'ticket', 'responsible', 'task_status');\n } else {\n $taskModel = new Task();\n $tasks = $taskModel->ownTasks(auth()->user()->id);\n }\n\n // global search\n if (isset($input['global_search']) && $input['global_search']) {\n $input['filters'] = [];\n $tasks->where(function($query) use ($input){\n $query->whereHas('task_status', function($q) use($input) {\n $q->where('name', 'like', '%'.$input['global_search'].'%');\n });\n $query->orWhereHas('project', function($q) use($input) {\n $q->where('name', 'like', '%'.$input['global_search'].'%');\n });\n $query->orWhereHas('project.owner', function($q) use($input) {\n $q->where('name', 'like', '%'.$input['global_search'].'%');\n });\n $query->orWhere('tasks.name','LIKE','%'.$input['global_search'].'%');\n $query->orWhere('tasks.priority','LIKE','%'.$input['global_search'].'%');\n $query->orWhere('tasks.deadline','LIKE','%'.$input['global_search'].'%');\n $query->orWhere('tasks.created_at','LIKE','%'.$input['global_search'].'%');\n });\n }\n\n\n $getDone = false;\n // filter\n if (isset($input['filters']) && $input['filters']) {\n foreach ($input['filters'] as $filterObj) {\n // first type of filter\n if ($filterObj['type'] == 'simple') {\n if($filterObj['name'] == 'number'){\n $tasks->where('id', 'like', '%'.$filterObj['text'].'%');\n }\n else if($filterObj['name'] == 'name'){\n $tasks->where('name', 'like', '%'.$filterObj['text'].'%');\n }\n elseif ($filterObj['name'] == 'owner.name') {\n $tasks->whereHas('ticket.owner', function($query) use($filterObj) {\n $query->where('name', 'like', '%'.$filterObj['text'].'%');\n });\n $tasks->orwhereHas('project.owner', function($query) use($filterObj) {\n $query->where('name', 'like', '%'.$filterObj['text'].'%');\n });\n }\n elseif ($filterObj['name'] == 'project.name') {\n $tasks->orwhereHas('project', function($query) use($filterObj) {\n $query->where('name', 'like', '%'.$filterObj['text'].'%');\n });\n }\n elseif ($filterObj['name'] == 'ticket.name') {\n $tasks->orwhereHas('ticket', function($query) use($filterObj) {\n $query->where('name', 'like', '%'.$filterObj['text'].'%');\n });\n }\n elseif ($filterObj['name'] == 'assigned.name') {\n if($filterObj['text'] != 'All'){\n if($filterObj['text'] == 'Not Assigned'){\n $tasks->has('responsible', '=', 0);\n }\n else{\n $tasks->whereHas('responsible', function($query) use($filterObj) {\n $query->where('name', 'like', '%' . $filterObj['text'] . '%') ;\n });\n }\n }\n }\n else if($filterObj['name'] == 'deadline'){\n $tasks->where('deadline', 'like', '%'.$filterObj['text'].'%');\n }\n\n // second type of filter\n } elseif ($filterObj['type'] == 'select') {\n // if ($filterObj['name'] == 'status.name') {\n // $status = Status::where('name', '=', $filterObj['selected_options'][0])->first();\n // if($status) {\n // $tasks->where('tickets.status_id', '=', $status->id);\n // }\n // } \n if ($filterObj['name'] == 'status.state') {\n if (auth()->user()->isAdmin() || auth()->user()->can('ticket-management')) {\n // if($filterObj['selected_options'][0] == 'open') {\n // $tasks->where('status_id', '=', 1);\n // } elseif($filterObj['selected_options'][0] == 'pending') {\n // $tasks->orWhere('status_id', '=', 2);\n // } elseif($filterObj['selected_options'][0] == 'in-progress') {\n // $tasks->orWhere('status_id', '=', 3);\n // } elseif($filterObj['selected_options'][0] == 'done') {\n // $getDone = true;\n // $tasks->orWhere('status_id', '=', 4);\n // }\n if( $filterObj['selected_options'][0] == 'open' || \n $filterObj['selected_options'][0] == 'pending' || \n $filterObj['selected_options'][0] == 'in-progress' || \n $filterObj['selected_options'][0] == 'done'){\n $status = Status::where('name', '=', $filterObj['selected_options'][0])->first();\n if($status) {\n $tasks->where('tasks.status_id', '=', $status->id);\n }\n if($status->id == 4){\n $getDone = true;\n }\n }\n } else {\n// $ticketModel = new Ticket();\n// $tickets = $ticketModel->ownTickets(auth()->user()->id)->paginate();\n // if($filterObj['selected_options'][0] == 'open') {\n // $tasks->where('status_id', '=', 1);\n // } elseif($filterObj['selected_options'][0] == 'pending') {\n // $tasks->orWhere('status_id', '=', 2);\n // } elseif($filterObj['selected_options'][0] == 'in-progress') {\n // $tasks->orWhere('status_id', '=', 3);\n // } elseif($filterObj['selected_options'][0] == 'done') {\n // $getDone = true;\n // $tasks->orWhere('status_id', '=', 4);\n // }\n if( $filterObj['selected_options'][0] == 'open' || \n $filterObj['selected_options'][0] == 'pending' || \n $filterObj['selected_options'][0] == 'in-progress' || \n $filterObj['selected_options'][0] == 'done'){\n $status = Status::where('name', '=', $filterObj['selected_options'][0])->first();\n if($status) {\n $tasks->where('tasks.status_id', '=', $status->id);\n }\n if($status->id == 4){\n $getDone = true;\n }\n }\n }\n }\n }\n }\n }\n // sorting\n if (isset($input['sort']) && $input['sort']) {\n foreach ($input['sort'] as $sortObj) {\n if (in_array($sortObj['name'], ['deadline', 'created_at', 'name', 'id'])) {\n if ($sortObj['order'] == 'desc') {\n $tasks->latest($sortObj['name']);\n } else {\n $tasks->oldest($sortObj['name']);\n }\n }\n }\n }\n if($getDone == false) {\n $tasks->where('status_id', '!=', 4);\n }\n\n\n $tasks = $tasks->latest()->paginate(30);\n\n return $this->sendResponse(new TaskCollection($tasks), 'Tasks retrieved successfully.');\n }", "title": "" }, { "docid": "f5db123141c12fca57fd5ce7818177ff", "score": "0.4638341", "text": "public function taskWorkSetProfileForTaskWorkModelDocumentOperationWithHttpInfo($task_work_id, $task_work_document_operation_id, $profile = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\ProfileResultDTO';\n $request = $this->taskWorkSetProfileForTaskWorkModelDocumentOperationRequest($task_work_id, $task_work_document_operation_id, $profile);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\ProfileResultDTO',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "983ca2e71bfd38cfc0e515180873aedc", "score": "0.46368524", "text": "public function taskWorkReassignUsersTaskByIdAsyncWithHttpInfo($taskworkid)\n {\n $returnType = '\\Swagger\\Client\\Model\\UserCompleteDTO[]';\n $request = $this->taskWorkReassignUsersTaskByIdRequest($taskworkid);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "b95e2c6a42e4d00512e784bb9027439a", "score": "0.45792624", "text": "public function taskWorkSetProfileForTaskWorkMaskDocumentOperationWithHttpInfo($task_work_id, $task_work_document_operation_id, $profile = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\ProfileResultDTO';\n $request = $this->taskWorkSetProfileForTaskWorkMaskDocumentOperationRequest($task_work_id, $task_work_document_operation_id, $profile);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\ProfileResultDTO',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "047b70051df2ad22936d189a61c58b44", "score": "0.45776615", "text": "public function taskWorkGetProfileSchemaForTaskWorkStandardDocumentOperationAsyncWithHttpInfo($task_work_id, $task_work_document_operation_id)\n {\n $returnType = '\\Swagger\\Client\\Model\\MaskProfileSchemaDTO';\n $request = $this->taskWorkGetProfileSchemaForTaskWorkStandardDocumentOperationRequest($task_work_id, $task_work_document_operation_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "271ff6dfef6d6d4f0e15db2b602310a1", "score": "0.45611706", "text": "public function taskWorkGetProfileSchemaForTaskWorkStandardDocumentOperationWithHttpInfo($task_work_id, $task_work_document_operation_id)\n {\n $returnType = '\\Swagger\\Client\\Model\\MaskProfileSchemaDTO';\n $request = $this->taskWorkGetProfileSchemaForTaskWorkStandardDocumentOperationRequest($task_work_id, $task_work_document_operation_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\MaskProfileSchemaDTO',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "773a0e3643b8107caaaae1003decc01c", "score": "0.455678", "text": "public function taskWorkGetTaskWorkForAutoAssign($docnumber)\n {\n list($response) = $this->taskWorkGetTaskWorkForAutoAssignWithHttpInfo($docnumber);\n return $response;\n }", "title": "" }, { "docid": "11ac7618753baee5b16293220e612742", "score": "0.4551922", "text": "public function getTaskInfo()\n {global $conf;\n $Company=strpos($conf->global->TIMESHEET_HEADERS, 'Company')!==FALSE;\n $taskParent=strpos($conf->global->TIMESHEET_HEADERS, 'TaskParent')!==FALSE;\n $sql ='SELECT p.rowid,p.datee as pdatee, p.fk_statut as pstatus, p.dateo as pdateo, pt.dateo,pt.datee, pt.planned_workload, pt.duration_effective';\n if($conf->global->TIMESHEET_HIDE_REF==1){\n $sql .= ',p.title as title, pt.label as label,pt.planned_workload';\n if($taskParent)$sql .= ',pt.fk_task_parent,ptp.label as taskParentLabel';\t \t\n }else{\n $sql .= \",CONCAT(p.ref,' - ',p.title) as title\";\n $sql .= \",CONCAT(pt.ref,' - ',pt.label) as label\";\n if($taskParent)$sql .= \",pt.fk_task_parent,CONCAT(ptp.ref,' - ',ptp.label) as taskParentLabel\";\t\n }\n if($Company)$sql .= ',p.fk_soc as companyId,s.nom as companyName';\n\n $sql .=\" FROM \".MAIN_DB_PREFIX.\"projet_task AS pt\";\n $sql .=\" JOIN \".MAIN_DB_PREFIX.\"projet as p\";\n $sql .=\" ON pt.fk_projet=p.rowid\";\n if($taskParent){\n $sql .=\" LEFT JOIN \".MAIN_DB_PREFIX.\"projet_task as ptp\";\n $sql .=\" ON pt.fk_task_parent=ptp.rowid\";\n }\n if($Company){\n $sql .=\" LEFT JOIN \".MAIN_DB_PREFIX.\"societe as s\";\n $sql .=\" ON p.fk_soc=s.rowid\";\n }\n $sql .=\" WHERE pt.rowid ='\".$this->id.\"'\";\n #$sql .= \"WHERE pt.rowid ='1'\";\n dol_syslog(__METHOD__, LOG_DEBUG);\n\n $resql=$this->db->query($sql);\n if ($resql)\n {\n\n if ($this->db->num_rows($resql))\n {\n\n $obj = $this->db->fetch_object($resql);\n\n $this->description\t\t\t= $obj->label;\n $this->fk_project = $obj->rowid;\n $this->ProjectTitle\t\t\t= $obj->title;\n #$this->date_start\t\t\t= strtotime($obj->dateo.' +0 day');\n #$this->date_end\t\t\t= strtotime($obj->datee.' +0 day');\n $this->date_start\t\t\t= $this->db->jdate($obj->dateo);\n $this->date_end\t\t\t= $this->db->jdate($obj->datee);\n $this->duration_effective = $obj->duration_effective;\t\t// total of time spent on this task\n \n $this->planned_workload = $obj->planned_workload;\n $this->startDatePjct=$this->db->jdate($obj->pdateo);\n\t\t\t$this->stopDatePjct=$this->db->jdate($obj->pdatee);\n\t\t\t$this->pStatus=$obj->pstatus;\n \n\t\t\tif($taskParent){\n $this->fk_projet_task_parent = $obj->fk_projet_task_parent;\n $this->taskParentDesc =$obj->taskParentLabel;\n }\n if($Company){\n $this->companyName =$obj->companyName;\n $this->companyId =$obj->companyId;\n }\n }\n $this->db->free($resql);\n\n return 1;\n }\n else\n {\n $this->error=\"Error \".$this->db->lasterror();\n dol_syslog(__METHOD__.$this->error, LOG_ERR);\n\n return -1;\n }\t\n }", "title": "" }, { "docid": "fb06e58a6c58803bd6fe15fe4e01d847", "score": "0.4550751", "text": "public function taskWorkSetTaskPriorityWithHttpInfo($task_ids, $priority)\n {\n $returnType = 'int';\n $request = $this->taskWorkSetTaskPriorityRequest($task_ids, $priority);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'int',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "9a047b3306dc8cc78769596a5e1a7b94", "score": "0.45462772", "text": "public function taskWorkReassignTaskByIdWithHttpInfo($taskworkid, $reassign_request)\n {\n $returnType = '';\n $request = $this->taskWorkReassignTaskByIdRequest($taskworkid, $reassign_request);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "674b6c926a4a5bee2cd85630e0be6215", "score": "0.45325196", "text": "public function actionGetWorktime($from = null, $to = null, $user_id = null) {\n \\Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n if ($user_id)\n $user = User::findOne($user_id);\n else\n $user = Yii::$app->user->getIdentity();\n if ($user) {\n $logQuery = new \\yii\\db\\Query();\n $logQuery->from('log')\n ->addSelect([\"created_at\", \"count(*) as counter\"])\n ->andWhere(['name' => Log::LOG_USER_ONLINE])\n ->andWhere(['user_id' => $user->id])\n ->groupBy([\"name\", \"(created_at DIV 60)\"]);\n if($from)\n $logQuery->andWhere(['>', 'created_at', $from]);\n if($to)\n $logQuery->andWhere(['<', 'created_at', $to]);\n else\n $logQuery->andWhere('created_at > UNIX_TIMESTAMP(NOW()) - 604800');\n \n $minuteCounter = $logQuery->count();\n \n return ['result' => true, 'work_hours' => round($minuteCounter / 60), 'work_minutes' => $minuteCounter % 60];\n }\n return ['result' => false];\n }", "title": "" }, { "docid": "343b8cd82e2c266a83af830b0a8afb8b", "score": "0.45317525", "text": "public function taskWorkSetProfileForTaskWorkModelDocumentOperationAsyncWithHttpInfo($task_work_id, $task_work_document_operation_id, $profile = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\ProfileResultDTO';\n $request = $this->taskWorkSetProfileForTaskWorkModelDocumentOperationRequest($task_work_id, $task_work_document_operation_id, $profile);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "3f684ef04a7d5beea8babb7043fa5357", "score": "0.4522677", "text": "public function show(Task $task)\n {\n $listComplete = $task;\n $listComplete['user'] = $task->user;\n $i=0;\n foreach ($listComplete['user'] as $key) {\n $listComplete['user'][$i] = $key->user;\n $listComplete['user'][$i]->userProfile;\n $i++;\n }\n $listComplete['link'] = $task->link;\n $listComplete['check_list'] = $task->checkList;\n $listComplete['comment'] = $task->comment;\n foreach ($listComplete['comment'] as $key) {\n $key->user;\n $key->user->userProfile;\n }\n $listComplete['id_label'] = $listComplete->label;\n\n if($listComplete == NULL){\n $error='Project not found';\n return response()->json($error, 404);\n } else {\n return response()->json($listComplete, $this->successStatus);\n }\n }", "title": "" }, { "docid": "cebef1779e241dcdfee1fe1a9dab215c", "score": "0.4517423", "text": "public function viewsGetViewByTaskWorkOperationIdWithHttpInfo($taskwork_id, $operation_id)\n {\n $returnType = '\\Swagger\\Client\\Model\\ViewDTO';\n $request = $this->viewsGetViewByTaskWorkOperationIdRequest($taskwork_id, $operation_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\ViewDTO',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "9b390a43ba05ef89499425fbfc466aa9", "score": "0.45081872", "text": "protected function taskWorkSetProfileForTaskWorkBySelectionDocumentOperationRequest($task_work_id, $task_work_document_operation_id, $docnumbers)\n {\n // verify the required parameter 'task_work_id' is set\n if ($task_work_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $task_work_id when calling taskWorkSetProfileForTaskWorkBySelectionDocumentOperation'\n );\n }\n // verify the required parameter 'task_work_document_operation_id' is set\n if ($task_work_document_operation_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $task_work_document_operation_id when calling taskWorkSetProfileForTaskWorkBySelectionDocumentOperation'\n );\n }\n // verify the required parameter 'docnumbers' is set\n if ($docnumbers === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $docnumbers when calling taskWorkSetProfileForTaskWorkBySelectionDocumentOperation'\n );\n }\n\n $resourcePath = '/api/TaskWork/{taskWorkId}/documentsoperations/{taskWorkDocumentOperationId}/byselection';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($task_work_id !== null) {\n $resourcePath = str_replace(\n '{' . 'taskWorkId' . '}',\n ObjectSerializer::toPathValue($task_work_id),\n $resourcePath\n );\n }\n // path params\n if ($task_work_document_operation_id !== null) {\n $resourcePath = str_replace(\n '{' . 'taskWorkDocumentOperationId' . '}',\n ObjectSerializer::toPathValue($task_work_document_operation_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($docnumbers)) {\n $_tempBody = $docnumbers;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n []\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n [],\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 // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "190d97c7fccd806fb9638b1c14aa2cfe", "score": "0.44806513", "text": "function extraDataForOneTask($task, $work)\n{\n $task['deadline'] = null;\n if (rand(1, 4) == 1) {\n $task['deadline'] = getRandomDateFormated(strtotime($work['start']), strtotime($work['end']));\n }\n\n $task['urgency'] = rand(0, 5);\n\n if (rand(1, 8)) {\n $task['type'] = rand(0, 5);\n } else {\n $task['type'] = null;\n }\n\n if (rand(1, 20)) {\n $task['link'] = \"https://\" . generateRandomString(rand(6, 25)) . \".com/\" . clearAllNonAlphabeticalChars(getLoremIpsum(rand(15, 2000)));\n $task['link'] = substr($task['link'], 0, 2000); //substring to 2000 chars\n }\n\n $task['completion_date'] = null; //default value\n if ($task['state'] == TASK_STATE_TODO) {\n if (rand(1, 4) == 1) {\n $task['responsible_id'] = rand(1, 100);\n } else {\n $task['responsible_id'] = null;\n }\n } else {\n if ($task['state'] == TASK_STATE_DONE) {\n $task['completion_date'] = getRandomDateFormated(strtotime($work['start']));\n }\n $task['responsible_id'] = rand(1, 100);\n }\n\n $task['creator_id'] = rand(1, 100);\n\n return $task;\n}", "title": "" }, { "docid": "84e4916d447751d5d15752dd7301763d", "score": "0.44670203", "text": "public function processInfo() {\n $result = $this->client->managementApiCall('GET', \"{$this->hashid}/tasks/process\");\n unset($result['response']['task_name']);\n return $result['response'];\n }", "title": "" }, { "docid": "5e5750eb5bd1e790908e8697bf340f0f", "score": "0.44548458", "text": "public function taskWorkGetDocumentsByProcessIdAsyncWithHttpInfo($process_id, $select)\n {\n $returnType = '\\Swagger\\Client\\Model\\RowSearchResult[]';\n $request = $this->taskWorkGetDocumentsByProcessIdRequest($process_id, $select);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "b117dbd44acd09ae2b08af6d10e6b5d2", "score": "0.4440408", "text": "public function getExternalTasksAsyncWithHttpInfo($external_task_id = null, $external_task_id_in = null, $topic_name = null, $worker_id = null, $locked = null, $not_locked = null, $with_retries_left = null, $no_retries_left = null, $lock_expiration_after = null, $lock_expiration_before = null, $activity_id = null, $activity_id_in = null, $execution_id = null, $process_instance_id = null, $process_instance_id_in = null, $process_definition_id = null, $tenant_id_in = null, $active = null, $suspended = null, $priority_higher_than_or_equals = null, $priority_lower_than_or_equals = null, $sort_by = null, $sort_order = null, $first_result = null, $max_results = null)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\ExternalTaskDto[]';\n $request = $this->getExternalTasksRequest($external_task_id, $external_task_id_in, $topic_name, $worker_id, $locked, $not_locked, $with_retries_left, $no_retries_left, $lock_expiration_after, $lock_expiration_before, $activity_id, $activity_id_in, $execution_id, $process_instance_id, $process_instance_id_in, $process_definition_id, $tenant_id_in, $active, $suspended, $priority_higher_than_or_equals, $priority_lower_than_or_equals, $sort_by, $sort_order, $first_result, $max_results);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "e64bdc9b54e45d06dfc48ff757df57a6", "score": "0.44402075", "text": "public function getWorkByFilterWithHttpInfo($filter = null, $page = null, $limit = null, $sort = null)\n {\n \n \n // parse inputs\n $resourcePath = \"/beta/work/search\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());\n \n // query params\n \n if ($filter !== null) {\n $queryParams['filter'] = $this->apiClient->getSerializer()->toQueryValue($filter);\n }// query params\n \n if ($page !== null) {\n $queryParams['page'] = $this->apiClient->getSerializer()->toQueryValue($page);\n }// query params\n \n if ($limit !== null) {\n $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit);\n }// query params\n \n if ($sort !== null) {\n $queryParams['sort'] = $this->apiClient->getSerializer()->toQueryValue($sort);\n }\n \n \n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\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 \n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('API-Key');\n if (strlen($apiKey) !== 0) {\n $headerParams['API-Key'] = $apiKey;\n }\n \n \n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath, 'GET',\n $queryParams, $httpBody,\n $headerParams, '\\Infoplus\\Model\\Work[]'\n );\n \n if (!$response) {\n return array(null, $statusCode, $httpHeader);\n }\n\n return array(\\Infoplus\\ObjectSerializer::deserialize($response, '\\Infoplus\\Model\\Work[]', $httpHeader), $statusCode, $httpHeader);\n \n } catch (ApiException $e) {\n switch ($e->getCode()) { \n case 200:\n $data = \\Infoplus\\ObjectSerializer::deserialize($e->getResponseBody(), '\\Infoplus\\Model\\Work[]', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n \n throw $e;\n }\n }", "title": "" }, { "docid": "8eafe66e0f6277459fb159abdbeefb08", "score": "0.44202217", "text": "public function getDuplicateWorkByIdWithHttpInfo($work_id)\n {\n \n // verify the required parameter 'work_id' is set\n if ($work_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $work_id when calling getDuplicateWorkById');\n }\n \n // parse inputs\n $resourcePath = \"/beta/work/duplicate/{workId}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());\n \n \n \n // path params\n \n if ($work_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"workId\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($work_id),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\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 \n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('API-Key');\n if (strlen($apiKey) !== 0) {\n $headerParams['API-Key'] = $apiKey;\n }\n \n \n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath, 'GET',\n $queryParams, $httpBody,\n $headerParams, '\\Infoplus\\Model\\Work'\n );\n \n if (!$response) {\n return array(null, $statusCode, $httpHeader);\n }\n\n return array(\\Infoplus\\ObjectSerializer::deserialize($response, '\\Infoplus\\Model\\Work', $httpHeader), $statusCode, $httpHeader);\n \n } catch (ApiException $e) {\n switch ($e->getCode()) { \n case 200:\n $data = \\Infoplus\\ObjectSerializer::deserialize($e->getResponseBody(), '\\Infoplus\\Model\\Work', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n \n throw $e;\n }\n }", "title": "" }, { "docid": "ed3ca7e5e9dcf1daa7720c5c9211e5be", "score": "0.44197917", "text": "public function taskWorkGetDocumentsByProcessIdWithHttpInfo($process_id, $select)\n {\n $returnType = '\\Swagger\\Client\\Model\\RowSearchResult[]';\n $request = $this->taskWorkGetDocumentsByProcessIdRequest($process_id, $select);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\RowSearchResult[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "4d17f3ea0587cc47b7620c4319db6555", "score": "0.4414235", "text": "public function actionGetTasks() {\n $tasks = craft()->goLive_task->enumerateTasks();\n $this->returnJson($tasks);\n }", "title": "" }, { "docid": "a670078c9bad237b2e628d81689cf70f", "score": "0.4406182", "text": "public function getExternalTasksRequest($external_task_id = null, $external_task_id_in = null, $topic_name = null, $worker_id = null, $locked = null, $not_locked = null, $with_retries_left = null, $no_retries_left = null, $lock_expiration_after = null, $lock_expiration_before = null, $activity_id = null, $activity_id_in = null, $execution_id = null, $process_instance_id = null, $process_instance_id_in = null, $process_definition_id = null, $tenant_id_in = null, $active = null, $suspended = null, $priority_higher_than_or_equals = null, $priority_lower_than_or_equals = null, $sort_by = null, $sort_order = null, $first_result = null, $max_results = null)\n {\n\n $resourcePath = '/external-task';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($external_task_id !== null) {\n if('form' === 'form' && is_array($external_task_id)) {\n foreach($external_task_id as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['externalTaskId'] = $external_task_id;\n }\n }\n // query params\n if ($external_task_id_in !== null) {\n if('form' === 'form' && is_array($external_task_id_in)) {\n foreach($external_task_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['externalTaskIdIn'] = $external_task_id_in;\n }\n }\n // query params\n if ($topic_name !== null) {\n if('form' === 'form' && is_array($topic_name)) {\n foreach($topic_name as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['topicName'] = $topic_name;\n }\n }\n // query params\n if ($worker_id !== null) {\n if('form' === 'form' && is_array($worker_id)) {\n foreach($worker_id as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['workerId'] = $worker_id;\n }\n }\n // query params\n if ($locked !== null) {\n if('form' === 'form' && is_array($locked)) {\n foreach($locked as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['locked'] = $locked;\n }\n }\n // query params\n if ($not_locked !== null) {\n if('form' === 'form' && is_array($not_locked)) {\n foreach($not_locked as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['notLocked'] = $not_locked;\n }\n }\n // query params\n if ($with_retries_left !== null) {\n if('form' === 'form' && is_array($with_retries_left)) {\n foreach($with_retries_left as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['withRetriesLeft'] = $with_retries_left;\n }\n }\n // query params\n if ($no_retries_left !== null) {\n if('form' === 'form' && is_array($no_retries_left)) {\n foreach($no_retries_left as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['noRetriesLeft'] = $no_retries_left;\n }\n }\n // query params\n if ($lock_expiration_after !== null) {\n if('form' === 'form' && is_array($lock_expiration_after)) {\n foreach($lock_expiration_after as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['lockExpirationAfter'] = $lock_expiration_after;\n }\n }\n // query params\n if ($lock_expiration_before !== null) {\n if('form' === 'form' && is_array($lock_expiration_before)) {\n foreach($lock_expiration_before as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['lockExpirationBefore'] = $lock_expiration_before;\n }\n }\n // query params\n if ($activity_id !== null) {\n if('form' === 'form' && is_array($activity_id)) {\n foreach($activity_id as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['activityId'] = $activity_id;\n }\n }\n // query params\n if ($activity_id_in !== null) {\n if('form' === 'form' && is_array($activity_id_in)) {\n foreach($activity_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['activityIdIn'] = $activity_id_in;\n }\n }\n // query params\n if ($execution_id !== null) {\n if('form' === 'form' && is_array($execution_id)) {\n foreach($execution_id as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['executionId'] = $execution_id;\n }\n }\n // query params\n if ($process_instance_id !== null) {\n if('form' === 'form' && is_array($process_instance_id)) {\n foreach($process_instance_id as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['processInstanceId'] = $process_instance_id;\n }\n }\n // query params\n if ($process_instance_id_in !== null) {\n if('form' === 'form' && is_array($process_instance_id_in)) {\n foreach($process_instance_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['processInstanceIdIn'] = $process_instance_id_in;\n }\n }\n // query params\n if ($process_definition_id !== null) {\n if('form' === 'form' && is_array($process_definition_id)) {\n foreach($process_definition_id as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['processDefinitionId'] = $process_definition_id;\n }\n }\n // query params\n if ($tenant_id_in !== null) {\n if('form' === 'form' && is_array($tenant_id_in)) {\n foreach($tenant_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['tenantIdIn'] = $tenant_id_in;\n }\n }\n // query params\n if ($active !== null) {\n if('form' === 'form' && is_array($active)) {\n foreach($active as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['active'] = $active;\n }\n }\n // query params\n if ($suspended !== null) {\n if('form' === 'form' && is_array($suspended)) {\n foreach($suspended as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['suspended'] = $suspended;\n }\n }\n // query params\n if ($priority_higher_than_or_equals !== null) {\n if('form' === 'form' && is_array($priority_higher_than_or_equals)) {\n foreach($priority_higher_than_or_equals as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['priorityHigherThanOrEquals'] = $priority_higher_than_or_equals;\n }\n }\n // query params\n if ($priority_lower_than_or_equals !== null) {\n if('form' === 'form' && is_array($priority_lower_than_or_equals)) {\n foreach($priority_lower_than_or_equals as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['priorityLowerThanOrEquals'] = $priority_lower_than_or_equals;\n }\n }\n // query params\n if ($sort_by !== null) {\n if('form' === 'form' && is_array($sort_by)) {\n foreach($sort_by as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['sortBy'] = $sort_by;\n }\n }\n // query params\n if ($sort_order !== null) {\n if('form' === 'form' && is_array($sort_order)) {\n foreach($sort_order as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['sortOrder'] = $sort_order;\n }\n }\n // query params\n if ($first_result !== null) {\n if('form' === 'form' && is_array($first_result)) {\n foreach($first_result as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['firstResult'] = $first_result;\n }\n }\n // query params\n if ($max_results !== null) {\n if('form' === 'form' && is_array($max_results)) {\n foreach($max_results as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['maxResults'] = $max_results;\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 []\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\\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": "7477589a5c03fc8646c3dc4854b116cc", "score": "0.43880388", "text": "public function get_tasks()\n {\n $response = $this->conn->do_request($this->common_url . '/tasks', array(), 'GET');\n\n return $response;\n }", "title": "" }, { "docid": "4c99391ac6d02db929e57035b2df4fa7", "score": "0.43735474", "text": "public function taskWorkSetProfileForTaskWorkMaskDocumentOperationAsyncWithHttpInfo($task_work_id, $task_work_document_operation_id, $profile = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\ProfileResultDTO';\n $request = $this->taskWorkSetProfileForTaskWorkMaskDocumentOperationRequest($task_work_id, $task_work_document_operation_id, $profile);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "21a2157de411e862768f303adb42825f", "score": "0.43716112", "text": "public function index(Request $request, Task $task)\n {\n $user = User::isAuth($request->bearerToken());\n if ($task->worker_id == $user->id || $task->project->manager_id == $user->id) {\n return response()->json([\n 'status' => true,\n 'comments' => $task->comments\n ])->setStatusCode(200, 'Comment List');\n } else {\n return response()->json([\n 'status' => false,\n 'message' => ['permission' => 'Нет прав']\n ])->setStatusCode(403, 'Forbidden');\n }\n }", "title": "" }, { "docid": "266b7c6c173540fcc7eea3f286694cc4", "score": "0.4351644", "text": "public function taskWorkGetExitCodesByTaskWorkIds($task_work_ids)\n {\n list($response) = $this->taskWorkGetExitCodesByTaskWorkIdsWithHttpInfo($task_work_ids);\n return $response;\n }", "title": "" }, { "docid": "8dce675c5fd83e74ac95d6d0a3d11e74", "score": "0.43507522", "text": "protected function taskWorkGetTaskWorkForAutoAssignRequest($docnumber)\n {\n // verify the required parameter 'docnumber' is set\n if ($docnumber === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $docnumber when calling taskWorkGetTaskWorkForAutoAssign'\n );\n }\n\n $resourcePath = '/api/TaskWork/autoassignlist/{docnumber}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($docnumber !== null) {\n $resourcePath = str_replace(\n '{' . 'docnumber' . '}',\n ObjectSerializer::toPathValue($docnumber),\n $resourcePath\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']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\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 // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "a83bab34d631916fd5e14935e5423ba3", "score": "0.4344241", "text": "public function taskWorkFinalizeTaskByIdsAndExitCodeAndPasswordAsyncWithHttpInfo($close_request)\n {\n $returnType = '';\n $request = $this->taskWorkFinalizeTaskByIdsAndExitCodeAndPasswordRequest($close_request);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "d867637e7ed64f56b5c19be5bfc32b98", "score": "0.43129528", "text": "protected function taskWorkAutoAssignRequest($taskwork_id)\n {\n // verify the required parameter 'taskwork_id' is set\n if ($taskwork_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $taskwork_id when calling taskWorkAutoAssign'\n );\n }\n\n $resourcePath = '/api/TaskWork/autoassign/{taskworkId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($taskwork_id !== null) {\n $resourcePath = str_replace(\n '{' . 'taskworkId' . '}',\n ObjectSerializer::toPathValue($taskwork_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\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 // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "d196a7b2a710cd9e150f5b587e108a36", "score": "0.4306348", "text": "public function getSummaryTimesheet($user=null, $taskid=null, $projectid=null, $clientid=null, $timesheet=-1, $start=null, $end=null)\n\t{\n\t\t\n\t\t$select = $this->dbService->select()->\n\t\t\tfrom('task', array(new Zend_Db_Expr('task.title as title'), 'id'))->\n\t\t\tjoinLeft('crmuser', 'task.userid=crmuser.username', 'username')->\n\t\t\tjoinLeft('timesheetrecord', 'task.id=timesheetrecord.taskid', new Zend_Db_Expr('SUM(endtime - starttime) as timespent'));\n\t\t\n\t\t$select = $this->filterBaseTimesheetQuery($select, $taskid, $projectid, $clientid, $start, $end);\n\t\t// If we weren't passed a user, just load\n\t\t// one from the request\n\t\tif ($user != null) {\n\t\t\t$select->where('task.userid = ?', $user->getUsername());\n\t\t}\n\t\t\n\t\tif ($timesheet >= 0) {\n \t\t$select->where('timesheetrecord.timesheetid = ?', $timesheet);\t\t \n\t\t}\n\t\t\n\t\t$select->group(new Zend_Db_Expr('task.id'));\n\t\t$select->order('endtime DESC');\n\n\t\t$tasks = $this->dbService->fetchObjects('task', $select);\n\t\t\n\t\treturn $tasks;\n\t}", "title": "" }, { "docid": "dadc1354cc25214a13ee46588c4efc02", "score": "0.43003568", "text": "public function taskWorkSetProfileForTaskWorkStandardDocumentOperationWithHttpInfo($task_work_id, $task_work_document_operation_id, $profile = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\ProfileResultDTO';\n $request = $this->taskWorkSetProfileForTaskWorkStandardDocumentOperationRequest($task_work_id, $task_work_document_operation_id, $profile);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\ProfileResultDTO',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "2f2c4da038967a6ad78faf02141a2678", "score": "0.42999774", "text": "protected function taskWorkGetProfileSchemaForTaskWorkMaskDocumentOperationRequest($task_work_id, $task_work_document_operation_id)\n {\n // verify the required parameter 'task_work_id' is set\n if ($task_work_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $task_work_id when calling taskWorkGetProfileSchemaForTaskWorkMaskDocumentOperation'\n );\n }\n // verify the required parameter 'task_work_document_operation_id' is set\n if ($task_work_document_operation_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $task_work_document_operation_id when calling taskWorkGetProfileSchemaForTaskWorkMaskDocumentOperation'\n );\n }\n\n $resourcePath = '/api/TaskWork/{taskWorkId}/documentsoperations/{taskWorkDocumentOperationId}/maskprofileSchema';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($task_work_id !== null) {\n $resourcePath = str_replace(\n '{' . 'taskWorkId' . '}',\n ObjectSerializer::toPathValue($task_work_id),\n $resourcePath\n );\n }\n // path params\n if ($task_work_document_operation_id !== null) {\n $resourcePath = str_replace(\n '{' . 'taskWorkDocumentOperationId' . '}',\n ObjectSerializer::toPathValue($task_work_document_operation_id),\n $resourcePath\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']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\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 // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "816658f30011b40a69280b917d431559", "score": "0.4286431", "text": "public function getTaskWithHttpInfo($id)\n {\n $returnType = '\\Swagger\\Client\\Model\\Task';\n $request = $this->getTaskRequest($id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse()->getBody()->getContents()\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Task',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "ca564dc8c676bf28f039652327f5c95e", "score": "0.42860678", "text": "public function taskWorkDeleteTaskWorkByIdAsyncWithHttpInfo($task_work_id)\n {\n $returnType = '';\n $request = $this->taskWorkDeleteTaskWorkByIdRequest($task_work_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "9ee089468270c320110938c64aa6f27c", "score": "0.42847177", "text": "public function index($user_id) \n {\n $rules = array('page' => 'integer|min:1', \n 'limit' => 'integer|min:1', \n 'sort_field' => 'in:created_at,date_end',\n 'sort_order' => 'in:ASC,DESC',\n 'kind' => 'in:NORMAL,IMPORTANT',\n 'status' => 'in:OPENED,CLOSED,DELAYED',\n );\n $validator = Validator::make(Input::all(), $rules);\n if ($validator->passes()){\n $page = Input::get('page', 1);\n $limit = Input::get('limit', 100); \n $sortField = Input::get('sort_field', 'created_at');\n $sortOrder = Input::get('sort_order', 'DESC');\n $kind = !empty(Input::get('kind'))? \n array(Input::get('kind')): \n array(Task::KIND_IMPORTANT, Task::KIND_NORMAL);\n $status = !empty(Input::get('status'))? \n array(Input::get('status')): \n array(Task::STATUS_OPENED, Task::STATUS_CLOSED, Task::STATUS_DELAYED);\n } else {\n $page = 1;\n $limit = 100; \n $sortField = 'created_at';\n $sortOrder = 'DESC';\n $kind = array(Task::KIND_IMPORTANT, Task::KIND_NORMAL);\n $status = array(Task::STATUS_OPENED, Task::STATUS_CLOSED, Task::STATUS_DELAYED);\n }\n \n $query = Task::with('project')\n ->where('user_id', $user_id)\n ->whereIn('status', $status)\n ->whereIn('kind', $kind)\n ->orderBy($sortField, $sortOrder)\n ->skip($limit * ($page - 1))->take($limit);\n \n $tasks = $this->getQueryResult($query, Config::get('querycache.task.list'), 'usertask.list');\n \n return $this->buildResponse($tasks);\n }", "title": "" }, { "docid": "a8712919d34e5b898ea542de3c934bbb", "score": "0.4279532", "text": "public function taskWorkSetProfileForTaskWorkBySelectionDocumentOperation($task_work_id, $task_work_document_operation_id, $docnumbers)\n {\n $this->taskWorkSetProfileForTaskWorkBySelectionDocumentOperationWithHttpInfo($task_work_id, $task_work_document_operation_id, $docnumbers);\n }", "title": "" }, { "docid": "db7f1812ecae167e911f50cce8177a6f", "score": "0.42691478", "text": "public function addTaskWithHttpInfo($api_task)\n {\n $returnType = '\\Swagger\\Client\\Model\\Task';\n $request = $this->addTaskRequest($api_task);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse()->getBody()->getContents()\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 201:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\Task',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "457d1f6c318b2fc2859224dfb4185f3a", "score": "0.42641768", "text": "protected function taskWorkGetProfileSchemaForTaskWorkModelDocumentOperationRequest($task_work_id, $task_work_document_operation_id)\n {\n // verify the required parameter 'task_work_id' is set\n if ($task_work_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $task_work_id when calling taskWorkGetProfileSchemaForTaskWorkModelDocumentOperation'\n );\n }\n // verify the required parameter 'task_work_document_operation_id' is set\n if ($task_work_document_operation_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $task_work_document_operation_id when calling taskWorkGetProfileSchemaForTaskWorkModelDocumentOperation'\n );\n }\n\n $resourcePath = '/api/TaskWork/{taskWorkId}/documentsoperations/{taskWorkDocumentOperationId}/modelprofileSchema';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($task_work_id !== null) {\n $resourcePath = str_replace(\n '{' . 'taskWorkId' . '}',\n ObjectSerializer::toPathValue($task_work_id),\n $resourcePath\n );\n }\n // path params\n if ($task_work_document_operation_id !== null) {\n $resourcePath = str_replace(\n '{' . 'taskWorkDocumentOperationId' . '}',\n ObjectSerializer::toPathValue($task_work_document_operation_id),\n $resourcePath\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']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\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 // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "60dcc1effd6427425a0ae8d2ef643524", "score": "0.4250889", "text": "protected function get_task_info($task_id) {\n $result = $this->get_db()->query(\n \"SELECT task_title, task_description, is_completed FROM \".TASK_TABLE.\n \" WHERE task_id = \".sqlite_escape_string($task_id).\n \" LIMIT 1;\"\n );\n\n return $result->fetchArray(SQLITE3_ASSOC);\n }", "title": "" }, { "docid": "bc056573252419e807befd090e361355", "score": "0.42478585", "text": "private function _getCreateTaskContext(Task $task)\n {\n $result = new HttpCallContext();\n $result->setMethod(Resources::HTTP_POST);\n $result->setHeaders($this->_batchHeaders);\n $result->setUri($this->getUri());\n $result->setPath('/$1/Tasks');\n $result->setBody($this->wrapAtomEntry($task));\n $result->addStatusCode(Resources::STATUS_CREATED);\n\n return $result;\n }", "title": "" }, { "docid": "b2f9c443b16186c68a96be6b6b382c4d", "score": "0.42436832", "text": "public function taskWorkReassignTaskByIdAsyncWithHttpInfo($taskworkid, $reassign_request)\n {\n $returnType = '';\n $request = $this->taskWorkReassignTaskByIdRequest($taskworkid, $reassign_request);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "79f2e6f765b05962060674372814ab97", "score": "0.4236871", "text": "protected function taskWorkTaskWorkTakeChargeRequest($task_work_id)\n {\n // verify the required parameter 'task_work_id' is set\n if ($task_work_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $task_work_id when calling taskWorkTaskWorkTakeCharge'\n );\n }\n\n $resourcePath = '/api/TaskWork/{taskWorkId}/TakeCharge';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($task_work_id !== null) {\n $resourcePath = str_replace(\n '{' . 'taskWorkId' . '}',\n ObjectSerializer::toPathValue($task_work_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\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 // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "19456b1ca58b730329a07908bcb2ab12", "score": "0.4233881", "text": "public function showTomorrowTask(task $task)\n {\n foreach($task as $task){\n DB::table('tasks')->whereDate('the_date', '>', Carbon::today()->toDateString())->where('the_day', 0)->update([\n 'the_day' => 1,\n ]);\n }\n\n $task = task::where('user_id' , Auth::id())\n ->where('the_day', '=', 1)\n ->whereDate('the_date', '=', Carbon::tomorrow()->toDateString())->get();\n return $this->sendResponse(taskResource::collection($task), 'Tomorrow Tasks' );\n\n //->where('status', 0)\n }", "title": "" }, { "docid": "b63cc9f8f665125287363aa473a4bd04", "score": "0.4230389", "text": "public function getTaskById($task_id) {\n $feedback = Yii::app()->db->createCommand()->from('task')->where('task_id=:task_id', array(':task_id' => $task_id))->queryRow();\n return $feedback;\n }", "title": "" }, { "docid": "cc6ff7feb57c94e14524a2bce7570aaf", "score": "0.4229159", "text": "public function actionIndex()\n {\n $searchModel = new TaskSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams, yii::$app->user->getTasks());\n \n if(yii::$app->user->isDeveloper()) {\n $dataProvider->query->andWhere(['status' => ['wait', 'active', 'expired', 'money']]);\n } elseif(yii::$app->user->isCustomer()) {\n $dataProvider->query->andWhere(['status' => ['wait', 'active', 'expired', 'wait_customer']]);\n } else {\n $dataProvider->query->andWhere(['status' => ['wait', 'active', 'expired', 'wait_customer', 'money']]);\n }\n \n $project = false;\n \n if($taskSearch = Yii::$app->request->get('TaskSearch')) {\n if(isset($taskSearch['project_id'])) {\n $projectId = $taskSearch['project_id'];\n $project = yii::$app->task->getProject($projectId);\n }\n }\n \n if(!Yii::$app->request->get('sort')) {\n $dataProvider->query->orderBy('last_action DESC, id DESC');\n }\n \n return $this->render('index', [\n 'project' => $project,\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "51881e9aa1251f5b7ec5646da0c0894e", "score": "0.42210302", "text": "public function getTaskList(Request $request)\n {\n $page = $request->page;\n $limit = $request->limit;\n\n $posted_data = Input::all();\n\n $query = Task::query()->select('tasks.*');\n $query = $query->with('milestones.project', 'projectResource.user');\n $query = $this->searchFilterCondition($posted_data, $query);\n // $query = $this->select('tasks.id', 'tasks.title');\n\n // $query = $query->with('milestones');\n $query = $query->orderBy('tasks.updated_at', 'dec');\n\n if (($page == null || $limit == null) || ($page == -1 || $limit == -1)) {\n $tasks = $query->paginate(25);\n } else {\n $tasks = $query->paginate($limit);\n }\n\n if ($tasks !== null) {\n foreach ($tasks as $key => $value) {\n $user_name = User::where(\"id\", $value->created_by)->pluck('name');\n $value[\"created_by_name\"] = $user_name[0];\n }\n }\n\n if ($tasks->first()) {\n return $this->dispatchResponse(200, \"\", $tasks);\n } else {\n return $this->dispatchResponse(200, \"No Records Found!!\", $tasks);\n }\n }", "title": "" }, { "docid": "75ceee30bff101bde428f0cbbe8acd23", "score": "0.41979328", "text": "public function getWorkList(WorkListRequest $request) {\n return $this->work->getWorks($request);\n }", "title": "" }, { "docid": "086ed7ab22dd1eeded3c23c774b22bbd", "score": "0.4175174", "text": "public function actionGetFullTask($id){\n $fullRes = Task::find()->where(['task_id' => $id])->asArray()->one();\n\n $employer = User::findOne($fullRes['employer']);\n $fullRes['employerId'] = $fullRes['employer'];\n $owner = User::findOne($fullRes['owner']); \n $fullRes['employer'] = $employer->username; \n $fullRes['owner']= $owner->username;\n\n $worktime = Timetracking::WorkTime($id);\n if (is_null($worktime)) {\n $fullRes['worktime'] = 0;\n } else {\n $fullRes['worktime'] = $worktime;\n }\n if (is_null($fullRes['percentcomplete'])) {\n $fullRes['percentcomplete'] = \"0\";\n } else {$fullRes['percentcomplete'] = $fullRes['percentcomplete'];} \n\n $fullRes['lastactivity'] = Timetracking::lastActivity($id);\n\n echo Json::encode($fullRes);\n }", "title": "" }, { "docid": "f002cf797f1e500ba2f115eee2769a82", "score": "0.41650796", "text": "public function indexForTask($user_id, $task_id)\n {\n $this->authorize('view', [Subtask::class, $user_id, $task_id]);\n return $this->subtaskService->where('task_id', $task_id);\n }", "title": "" }, { "docid": "ab49ae992e65b8e6ab3b769ff22e350b", "score": "0.41606116", "text": "public function taskWorkSetProfileForTaskWorkStandardDocumentOperationAsyncWithHttpInfo($task_work_id, $task_work_document_operation_id, $profile = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\ProfileResultDTO';\n $request = $this->taskWorkSetProfileForTaskWorkStandardDocumentOperationRequest($task_work_id, $task_work_document_operation_id, $profile);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" } ]
bd9f1dde9d470089c378265448f20033
Get the value of _action
[ { "docid": "f28f0ef295fa533696399d96a37f3321", "score": "0.8732449", "text": "public function get_action()\n {\n return $this->_action;\n }", "title": "" } ]
[ { "docid": "96b359a696f7fde23557c8b6ae8a25a4", "score": "0.89655006", "text": "private function get_action() {\n\t\treturn $this->action;\n\t}", "title": "" }, { "docid": "713304b2085ab1affc1839480da9ad9c", "score": "0.883269", "text": "protected function get_action()\r\n {\r\n return $this->action;\r\n }", "title": "" }, { "docid": "642ed4d6264aabce3334ec28d61900c5", "score": "0.8652365", "text": "private function getAction()\n {\n return $this->_action;\n }", "title": "" }, { "docid": "ffeaaa4732dccc2fdc3a2e11adf45f98", "score": "0.85295004", "text": "public static function getAction(){\r\n\t\treturn self::$action;\r\n\t}", "title": "" }, { "docid": "dd97b869ad3f77e0f941d2ddd182d80c", "score": "0.8442966", "text": "public function getAction()\n {\n return $this->_action;\n }", "title": "" }, { "docid": "a2b34458e628f032256e042df0950f1a", "score": "0.8422267", "text": "public static function getAction() {\n\n\t \t\t return self::$action;\n\t }", "title": "" }, { "docid": "2d64a594f338beeb6dc470491c70f913", "score": "0.84190464", "text": "public function getAction() \n\t{\n\t\treturn $this->action; \n\t}", "title": "" }, { "docid": "6fed07de027ff7a59124dd6172cc36e3", "score": "0.84142447", "text": "public function getAction() {\n\t\treturn $this->action;\n\t}", "title": "" }, { "docid": "fee4b9bac4feff1fd8e0c8bbdc2af6e2", "score": "0.8397872", "text": "public function getAction()\n\t{\n\t\treturn $this->action == '' ? $this->defaultAction : $this->action;\n\t}", "title": "" }, { "docid": "0248886d0f02d218debe7c525cb787c3", "score": "0.8392786", "text": "public function getAction()\n\t{\n\t\treturn $this->action;\n\t}", "title": "" }, { "docid": "0248886d0f02d218debe7c525cb787c3", "score": "0.8392786", "text": "public function getAction()\n\t{\n\t\treturn $this->action;\n\t}", "title": "" }, { "docid": "7984775977fed6ccd15b94404589218f", "score": "0.8382325", "text": "public function action()\n {\n return $this->action;\n }", "title": "" }, { "docid": "7984775977fed6ccd15b94404589218f", "score": "0.8382325", "text": "public function action()\n {\n return $this->action;\n }", "title": "" }, { "docid": "54414bfff62f9322294653b9f0816f74", "score": "0.836582", "text": "function getAction() {\n return $this->action;\n }", "title": "" }, { "docid": "c4a3cdea83d726c2b2870f86f5d70d19", "score": "0.83504486", "text": "public function getAction()\r\n {\r\n return $this->action;\r\n }", "title": "" }, { "docid": "c4a3cdea83d726c2b2870f86f5d70d19", "score": "0.83504486", "text": "public function getAction()\r\n {\r\n return $this->action;\r\n }", "title": "" }, { "docid": "a056db9f9e80726ace5f13cdefb92655", "score": "0.83373946", "text": "public function getAction()\n {\n return $this->fields['action'];\n }", "title": "" }, { "docid": "6565a27102322b6032437b22e76f8b3f", "score": "0.8315188", "text": "public function getAction()\n\t{\n\t\treturn $this->_sAction;\n\t}", "title": "" }, { "docid": "b54df992e4444560c866a73831f65d99", "score": "0.8292418", "text": "public function getAction(): string {\n return $this->_action;\n }", "title": "" }, { "docid": "16ec469a3b48bedd213a421511266af5", "score": "0.828837", "text": "public function getAction()\n {\n return $this->action;\n }", "title": "" }, { "docid": "16ec469a3b48bedd213a421511266af5", "score": "0.828837", "text": "public function getAction()\n {\n return $this->action;\n }", "title": "" }, { "docid": "16ec469a3b48bedd213a421511266af5", "score": "0.828837", "text": "public function getAction()\n {\n return $this->action;\n }", "title": "" }, { "docid": "16ec469a3b48bedd213a421511266af5", "score": "0.828837", "text": "public function getAction()\n {\n return $this->action;\n }", "title": "" }, { "docid": "16ec469a3b48bedd213a421511266af5", "score": "0.828837", "text": "public function getAction()\n {\n return $this->action;\n }", "title": "" }, { "docid": "16ec469a3b48bedd213a421511266af5", "score": "0.828837", "text": "public function getAction()\n {\n return $this->action;\n }", "title": "" }, { "docid": "16ec469a3b48bedd213a421511266af5", "score": "0.828837", "text": "public function getAction()\n {\n return $this->action;\n }", "title": "" }, { "docid": "16ec469a3b48bedd213a421511266af5", "score": "0.828837", "text": "public function getAction()\n {\n return $this->action;\n }", "title": "" }, { "docid": "16ec469a3b48bedd213a421511266af5", "score": "0.828837", "text": "public function getAction()\n {\n return $this->action;\n }", "title": "" }, { "docid": "16ec469a3b48bedd213a421511266af5", "score": "0.828837", "text": "public function getAction()\n {\n return $this->action;\n }", "title": "" }, { "docid": "16ec469a3b48bedd213a421511266af5", "score": "0.828837", "text": "public function getAction()\n {\n return $this->action;\n }", "title": "" }, { "docid": "16ec469a3b48bedd213a421511266af5", "score": "0.828837", "text": "public function getAction()\n {\n return $this->action;\n }", "title": "" }, { "docid": "16ec469a3b48bedd213a421511266af5", "score": "0.828837", "text": "public function getAction()\n {\n return $this->action;\n }", "title": "" }, { "docid": "16ec469a3b48bedd213a421511266af5", "score": "0.828837", "text": "public function getAction()\n {\n return $this->action;\n }", "title": "" }, { "docid": "16ec469a3b48bedd213a421511266af5", "score": "0.828837", "text": "public function getAction()\n {\n return $this->action;\n }", "title": "" }, { "docid": "16ec469a3b48bedd213a421511266af5", "score": "0.828837", "text": "public function getAction()\n {\n return $this->action;\n }", "title": "" }, { "docid": "16ec469a3b48bedd213a421511266af5", "score": "0.828837", "text": "public function getAction()\n {\n return $this->action;\n }", "title": "" }, { "docid": "16ec469a3b48bedd213a421511266af5", "score": "0.828837", "text": "public function getAction()\n {\n return $this->action;\n }", "title": "" }, { "docid": "16ec469a3b48bedd213a421511266af5", "score": "0.828837", "text": "public function getAction()\n {\n return $this->action;\n }", "title": "" }, { "docid": "16ec469a3b48bedd213a421511266af5", "score": "0.828837", "text": "public function getAction()\n {\n return $this->action;\n }", "title": "" }, { "docid": "99b003aed3c119ad5efd7ba5dc4325ee", "score": "0.8280756", "text": "final public function getAction() {\n\t\treturn $this->action;\n\t}", "title": "" }, { "docid": "a644f7a64a842d2dfcfae56257719379", "score": "0.8268538", "text": "public static function getAction()\r\n\t{\r\n\t\treturn isset(self::$params[1]) ? self::$params[1]: DEFAULT_ACTION;\r\n\t}", "title": "" }, { "docid": "dcca4b8c5a840c1db11aff8dd89c66be", "score": "0.8257587", "text": "public function getAction() {\n\t\treturn $this->_params['action'];\n\t}", "title": "" }, { "docid": "45da31627f3479fbcd6a56113cbc5c0e", "score": "0.8200671", "text": "public function getAction(){\n return $this->action;\n }", "title": "" }, { "docid": "1e44067d25052097eefbc0cd3edda041", "score": "0.81911063", "text": "public function getAction() {\n return @$this->attributes['action'];\n }", "title": "" }, { "docid": "6733919df141daf3d5d86ed91646f52e", "score": "0.81830275", "text": "public function getAction()\n {\n return isset($this->action) ? $this->action : '';\n }", "title": "" }, { "docid": "f4841cfbc410ce55c92a9865c1189478", "score": "0.808316", "text": "private function getAction() {\n $action = filter_input(INPUT_POST, 'action', FILTER_SANITIZE_FULL_SPECIAL_CHARS);\n if ($action === NULL) {\n $action = filter_input(INPUT_GET, 'action', FILTER_SANITIZE_FULL_SPECIAL_CHARS);\n if ($action === NULL) {\n $action = '';\n }\n }\n return $action;\n }", "title": "" }, { "docid": "bb11b8070ce4142550a59c824540bfb6", "score": "0.79740155", "text": "static function get_action_parameter()\r\n {\r\n return self :: PARAM_EVALUATION_ACTION;\r\n }", "title": "" }, { "docid": "a2096d784d2d63c4e4fa90d9b51eb29f", "score": "0.79717046", "text": "function mf_action() {\n\t\treturn MF()->actions->action();\n\t}", "title": "" }, { "docid": "fcc403adad2514f22ac3b77aa562af35", "score": "0.79424536", "text": "public function get_action_name() {\n return $this->actionname;\n }", "title": "" }, { "docid": "50001e9f6811bdc898a96043d2057b4e", "score": "0.79032207", "text": "public function getAction() {\n\t\t\n\t\tif (\n\t\t\tisset( $_REQUEST[ '_service' ] ) && \n\t\t\tisset( $_REQUEST[ '_action' ] )\n\t\t) {\n\t\t\t// new way of doing things\n\t\t\t$sAction = $_REQUEST[ '_action' ];\n\t\t} else {\n\t\t\t// old way\n\t\t\t$sAction = $_REQUEST[ 'subaction' ];\n\t\t}\n\t\t\n\t\treturn $sAction;\n\t}", "title": "" }, { "docid": "804faf43d98fa59b762c8d5f954b28d2", "score": "0.7852892", "text": "protected\n function getAction()\n {\n\n\n if (empty($_GET['action']))\n {\n $this->action = 'main';\n } else\n {\n $this->action = $_GET['action'];\n }\n return $this->action;\n }", "title": "" }, { "docid": "4f83a485c1d66082607cdc2434565886", "score": "0.7841737", "text": "public function getActionName()\n\t{\n\t return $this->_action;\n\t}", "title": "" }, { "docid": "4946f6a4ba2683a299fab0d60a2d7f92", "score": "0.7829451", "text": "static function get_action_parameter()\r\n {\r\n return self :: PARAM_DISPLAY_ACTION;\r\n }", "title": "" }, { "docid": "b550acd251f61d48ad7dece102b68cc9", "score": "0.7829074", "text": "public function setAction()\r\n {\r\n $this->action = isset($_GET['action']) ? $_GET['action'] : \"\";\r\n return $this->action;\r\n }", "title": "" }, { "docid": "93fd6884525b801f8b35087e1470afbe", "score": "0.7824861", "text": "public static function get_url_request_action() {\n\t\t\t\n\t\t\treturn (isset(self::$url_request['action']) and is_string(self::$url_request['action'])) ? self::$url_request['action'] : null;\n\t\t\t\n\t\t}", "title": "" }, { "docid": "8328482b53e5e6bd11ff75fbe42842bc", "score": "0.782373", "text": "public function getAction()\n {\n if ($this->_action === null) {\n $this->setAction(self::getDefaultAction());\n }\n \n return $this->_action;\n }", "title": "" }, { "docid": "361e2e6351785313ea41982f659656ca", "score": "0.77701664", "text": "public function getCurrentAction()\n\t{\n\t\t$action = filter_input(INPUT_GET, 'action', FILTER_SANITIZE_STRING);\n\t\tif (!in_array($action, self::$_supportedActions))\n\t\t{\n\t\t\t$action = self::$_supportedActions[0];\n\t\t}\n\t\treturn $action;\n\t}", "title": "" }, { "docid": "6a4169c095b3345fc0b2a02126f6bd86", "score": "0.7724018", "text": "public static function getAction(): string\n {\n $action = \"nothing\";\n if (isset($_GET[\"action\"]) && strlen($_GET[\"action\"]) > 0) {\n $action = $_GET[\"action\"];\n }\n\n return $action;\n }", "title": "" }, { "docid": "15105f44c10cc2e25a537d02f34b9faf", "score": "0.77124166", "text": "function &getAction() {\n\t\t$action_status = (array) array('DISPLAY', 'EMAIL', 'AUDIO', 'PROCEDURE');\n\t\treturn (string) ((array_key_exists($this->action, $action_status)) ? $action_status[$this->action] : $action_status[0]);\n\t}", "title": "" }, { "docid": "4e266afc0beb0d0476de17746f3c20a4", "score": "0.7705315", "text": "public function get_action_name() {\n return $this->request_context->action_name;\n }", "title": "" }, { "docid": "128bd0657bb99a28ba304944c7ea695f", "score": "0.7701148", "text": "public function getTriggeredAction() {\n\t\treturn $this->action;\n\t}", "title": "" }, { "docid": "d6b90a06c6c45acd49456b074513e986", "score": "0.7700313", "text": "public static function getAction()\n\t{\n\t\tif(isset($_REQUEST[self::$actionProfile]))\n\t\t{\n\t\t\treturn self::$actionProfile;\n\t\t}\n\t\t\n\t\tif(isset($_REQUEST[self::$actionAdmin]))\n\t\t{\n\t\t\treturn self::$actionAdmin;\n\t\t}\n\n\t\tif(isset($_REQUEST[self::$actionLogout])) {\n\t\t\treturn self::$actionLogout;\n\t\t}\n\t\t\n\t\tif(isset($_REQUEST[self::$actionForum])) {\n\t\t\treturn self::$actionForum;\n\t\t}\n\t\t\n\t\treturn self::$actionLogin;\n\t}", "title": "" }, { "docid": "8dda23851be643076a51237b336bbb00", "score": "0.76090384", "text": "public function getActionName(){\n\t\treturn $this->_actionName;\n\t}", "title": "" }, { "docid": "d51763346df7694a35c7980cc5d99da6", "score": "0.75871134", "text": "public function getCurrentAction()\n {\n return $this->currActionCode;\n }", "title": "" }, { "docid": "454f6d9a09c7b6622934708c6f4a8671", "score": "0.7586631", "text": "protected function get_current_action()\n {\n if (isset_not_empty($_REQUEST, 'filter_action'))\n return false;\n\n if (isset_not_empty($_REQUEST, 'action'))\n return sanitize_text_field(get_request_var('action'));\n\n if (isset_not_empty($_REQUEST, 'action2'))\n return sanitize_text_field(get_request_var('action2'));\n\n return 'view';\n }", "title": "" }, { "docid": "bea86cca3c87323ea8c9c81cf38e6d0c", "score": "0.75862837", "text": "public function getAction(): ?string\n {\n return $this->action;\n }", "title": "" }, { "docid": "bea86cca3c87323ea8c9c81cf38e6d0c", "score": "0.75862837", "text": "public function getAction(): ?string\n {\n return $this->action;\n }", "title": "" }, { "docid": "bea86cca3c87323ea8c9c81cf38e6d0c", "score": "0.75862837", "text": "public function getAction(): ?string\n {\n return $this->action;\n }", "title": "" }, { "docid": "9f57556b80040a7b5907e194bcbdbaaa", "score": "0.7573345", "text": "public function getAction() : ?string \n {\n if ( ! $this->hasAction()) {\n $this->setAction($this->getDefaultAction());\n }\n return $this->action;\n }", "title": "" }, { "docid": "09b74755dc0e3a6ef8176376baa62233", "score": "0.7539091", "text": "public function getAction()\n\t{\n\t\tif(!isset($this->action))\n\t\t{\n\t\t\t$this->setAction(Query::getUrl());\n\t\t}\n\n\t\treturn $this->action;\n\t}", "title": "" }, { "docid": "d89820f02401767b70c60c767d5d23ba", "score": "0.75120413", "text": "public function getActionToBeTaken()\n {\n return $this->actionToBeTaken;\n }", "title": "" }, { "docid": "66ac5487d4656d58ea4096112159d8a8", "score": "0.74929935", "text": "public function getActionName(): string {\n return $this->_actionName;\n }", "title": "" }, { "docid": "cf4159a67ff315fa0e7e630325e8cf43", "score": "0.7474294", "text": "public function getAction()\n {\n if (session_id()) {\n if (isset($_SESSION['action'])) {\n $this->action = $_SESSION['action'];\n unset($_SESSION['action']);\n }\n\n if (!empty($this->action))\n return $this->action;\n }\n\n return false;\n }", "title": "" }, { "docid": "2fa21259143aed48e86a8a194d665a69", "score": "0.74710417", "text": "protected function getAction()\n {\n if ($this->app instanceof Micro) {\n $handler = $this->app->getActiveHandler();\n $action = $handler[1];\n } else {\n $action = $this->dispatcher->getActionName();\n }\n\n return $action;\n }", "title": "" }, { "docid": "6cc0fa7cf906d0a2652a9d75c478dd49", "score": "0.7435662", "text": "public function getActionFunction()\r\n {\r\n return $this->actionFunction;\r\n }", "title": "" }, { "docid": "fac47e5b64bfb2552f300f268f0123ab", "score": "0.7381595", "text": "public function getAction() {\n $offset = $this->getOffset();\n $uri = $this->getUri();\n if (count($uri) > 1 + $offset) {\n return $uri[1 + $offset];\n }\n return 'defaultAction';\n }", "title": "" }, { "docid": "0b6c9d580944394bdd3ead660e4e87ba", "score": "0.7379527", "text": "public function getActionName()\n\t{\n\t\treturn $this->actionName;\n\t}", "title": "" }, { "docid": "8eeea15b26a0aad42fe6c8c1e4322d97", "score": "0.7379078", "text": "public function getActionParam()\n {\n $paramsKeys = array_keys(array_merge($_POST, $_GET));\n $current = current($paramsKeys);\n while ($current)\n {\n if ( String::startsWith($current, \"_action_\") ) return substr($current, 8);\n $current = next($paramsKeys);\n }\n return NULL;\n }", "title": "" }, { "docid": "cb5d012b1cfc75a97276f15bb029859f", "score": "0.7378002", "text": "public function getActionName()\n\t{\n\t\treturn $this->_actionName;\n\t}", "title": "" }, { "docid": "cb5d012b1cfc75a97276f15bb029859f", "score": "0.7378002", "text": "public function getActionName()\n\t{\n\t\treturn $this->_actionName;\n\t}", "title": "" }, { "docid": "cf34b6fb24861daa44c3aeb8865662aa", "score": "0.7370905", "text": "public function getActionName() {\n return $this->actionName;\n }", "title": "" }, { "docid": "6a223bfb231e7d8c918548e7860669ad", "score": "0.7368976", "text": "public static function mla_current_bulk_action( )\t{\r\n\t\t$action = false;\r\n\r\n\t\tif ( isset( $_REQUEST['action'] ) ) {\r\n\t\t\tif ( -1 != $_REQUEST['action'] ) {\r\n\t\t\t\treturn $_REQUEST['action'];\r\n\t\t\t}\r\n\r\n\t\t\t$action = 'none';\r\n\t\t} // isset action\r\n\r\n\t\tif ( isset( $_REQUEST['action2'] ) ) {\r\n\t\t\tif ( -1 != $_REQUEST['action2'] ) {\r\n\t\t\t\treturn $_REQUEST['action2'];\r\n\t\t\t}\r\n\r\n\t\t\t$action = 'none';\r\n\t\t} // isset action2\r\n\r\n\t\treturn $action;\r\n\t}", "title": "" }, { "docid": "c9156cde77b8009547677e19b8318949", "score": "0.736642", "text": "private function get_form_action(){\n\t\treturn $this->form_action;\t\n\t}", "title": "" }, { "docid": "d8edf4485718d0aaf54f703e840f48ad", "score": "0.7344684", "text": "public static function get_current_request_action() {\n\t\t\t\n\t\t\treturn (isset(self::$current_request['action']) and is_string(self::$current_request['action'])) ? self::$current_request['action'] : null;\n\t\t\t\n\t\t}", "title": "" }, { "docid": "053f71bd1e561469d55735688ea14ab8", "score": "0.7336915", "text": "public function getActionCode()\n {\n return $this->getData('actionCode');\n }", "title": "" }, { "docid": "5d9e8cc34447c7f27d4690aa96787434", "score": "0.73278284", "text": "public function action(): ?string {\n\t\treturn $this->m_urlParams[\"action\"] ?? null;\n\t}", "title": "" }, { "docid": "6814d3d8c9716c3d943ccadc9d068147", "score": "0.7315825", "text": "public function getActionName():string\n {\n return $this->actionName;\n }", "title": "" }, { "docid": "34434f40e9023e8ce489b8fc3121f95b", "score": "0.7313004", "text": "public static function current_action() {\n\t\tif ( isset( $_REQUEST['action'] ) and -1 != $_REQUEST['action'] ) {\n\t\t\treturn $_REQUEST['action'];\n\t\t}\n\n\t\tif ( isset( $_REQUEST['action2'] ) and -1 != $_REQUEST['action2'] ) {\n\t\t\treturn $_REQUEST['action2'];\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "f6559a4bbbdcc83178079ccd3665a693", "score": "0.7310385", "text": "function get_action() {\n\t global $c; // Hack\n\t \n\t // debug\n\t//print \"<pre>Action List (Front Controller)\\n\";\n\t//print_r( $this->action_list );\n\t//print \"</pre>\";\n\t\t\n\t\t// debug\n\t\t//print \"<p>Request Module: \". $c->request->get_module() .'</p>';\n\t\t//print \"<p>Request Action: \". $c->request->get_action() .'</p>';\n\t\t//print \"<p>Request Pattern: \". $c->request->get_pattern() .'</p>';\n\t\t\t\n\t\t\t// hack, we do not support both modes, module/action and pattern\n\t\t$target_pattern = $c->request->get_module() .'/'. $c->request->get_action();\n\t\n\t\t// debug\n\t\t//print \"<p>Target Pattern: $target_pattern</p>\";\n\t\n\tif( ! is_array( $this->action_list ) ) {\n\t\tdie(\"Critical Error - action list must be an array.\");\n\t}\n\t\n\t\tforeach( $this->action_list as $action ) {\n\t\t\n\t\t// debug\n\t//print \"<pre>LIST ACTION\";\n\t//print_r( $action );\n\t//print \"END</pre>\";\n\t\t\n\t\t// debug\n\t\t//print \"Action: \". $action->pattern .\" Target: \". $target_pattern;\n\t\t\tif( $action->pattern == $target_pattern ) {\n\t\t\t\treturn $action;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t }", "title": "" }, { "docid": "6328cb021e767aa774a8477309265b20", "score": "0.7301708", "text": "public function getAction()\n {\n if (!$this->action) {\n $this->error->setError('INVALID_COMMAND', 'Invalid command');\n $this->sendOutput();\n }\n return $this->action;\n }", "title": "" }, { "docid": "0796d01d623eeba6f1c25676139c3ac0", "score": "0.7297743", "text": "public function getAction()\n {\n if (isset($this->action) && !empty($this->action)) {\n return $this->action;\n } else {\n throw new Exception('Action is not set in FormGenerator', E_RECOVERABLE_ERROR);\n }\n }", "title": "" }, { "docid": "4f3e35ceb7c8b05b3a19c28befd0aa79", "score": "0.72858757", "text": "public static function getAction() {\n\t\tif (isset($_GET[self::$action]))\n\t\t\treturn $_GET[self::$action];\n\t\t\n\t\treturn self::$actionShowAll;\n\t}", "title": "" }, { "docid": "1a4d52e00e8f9d61c48af2dc882a55fa", "score": "0.72851765", "text": "public function getAction(){\n return $this->action;\n}", "title": "" }, { "docid": "e0e1d51d9e5d01029881ac2a4f10230e", "score": "0.72598183", "text": "static function get_action_parameter()\r\n {\r\n return self :: PARAM_CAS_ACCOUNT_ACTION;\r\n }", "title": "" }, { "docid": "619e8b987d5c549d8559442d285cfba5", "score": "0.72408414", "text": "public function current_action()\n {\n if (isset($_REQUEST['action']) && - 1 != $_REQUEST['action'])\n return $_REQUEST['action'];\n\n if (isset($_REQUEST['action2']) && - 1 != $_REQUEST['action2'])\n return $_REQUEST['action2'];\n\n return false;\n }", "title": "" }, { "docid": "a6393fb864219992726eeac79f495cab", "score": "0.7217276", "text": "public function getViewAction(){\r\n \treturn $this->view_action;\r\n }", "title": "" }, { "docid": "3decbc9554209c3e9752d68aafee803a", "score": "0.7172642", "text": "public function getAction();", "title": "" }, { "docid": "3decbc9554209c3e9752d68aafee803a", "score": "0.7172642", "text": "public function getAction();", "title": "" }, { "docid": "3decbc9554209c3e9752d68aafee803a", "score": "0.7172642", "text": "public function getAction();", "title": "" }, { "docid": "7dfd676c7611cf34526902cb6f59fff8", "score": "0.7163012", "text": "function get_page_action() {\n\treturn PageAction::GetAction();\n}", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "c6af07cb2d8d19e33aeff9d7a5d770d9", "score": "0.0", "text": "public function update(Request $request, $id)\n {\n $jurnal = Jurnal::findOrFail($id);\n $jurnal->update([\n 'judul' => $request->judul,\n 'tanggal' => $jurnal->tanggal\n ]);\n\n return Response::json($jurnal, 200);\n }", "title": "" } ]
[ { "docid": "f545a797c88e6fde5b59e76b35b0e4dd", "score": "0.74549645", "text": "public function update($id, $resource);", "title": "" }, { "docid": "e3f351fcd5ab99bae755f96203d9604b", "score": "0.7443162", "text": "public function updated(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "3ec7b0acf0381980ced680019309568a", "score": "0.6744378", "text": "public function update() {\n\n // Does the Resource object have an ID?\n if ( is_null( $this->id ) ) trigger_error ( \"Resource::update(): Attempt to update an Resource object that does not have its ID property set.\", E_USER_ERROR );\n \n // Update the Resource\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $sql = \"UPDATE resource SET url=:url, themeId=:themeId, contact=:contact WHERE id = :id\";\n $st = $conn->prepare ( $sql );\n $st->bindValue( \":url\", $this->url, PDO::PARAM_STR );\n $st->bindValue( \":themeId\", $this->themeId, PDO::PARAM_INT );\n $st->bindValue( \":contact\", $this->contact, PDO::PARAM_STR );\n $st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\n $st->execute();\n $conn = null;\n }", "title": "" }, { "docid": "7eab299ac25f58662eb17a6207bbdeef", "score": "0.67144877", "text": "private function updateResource($resource): void\n\t{\n\t\timagedestroy($this->resource);\n\t\t$this->resource = $resource;\n\n\t\timagealphablending($this->resource, false);\n\t\timagesavealpha($this->resource, true);\n\n\t\t$this->updateSizeInfo();\n\t}", "title": "" }, { "docid": "337a73fafa9c60c109d0e0fb18b16428", "score": "0.6513111", "text": "public function update(Storages $request, $id)\n {\n $entry = Storage::findOrFail($id);\n\n $entry->fill($request->all());\n\n $entry->save();\n\n return redirect('/storages/'.$id.'/edit');\n }", "title": "" }, { "docid": "2a532e323886cdeee4fdc191ad2a127e", "score": "0.64721876", "text": "public function update(ResourceRequest $request, Resource $resource)\n {\n //\n\t\t\t\t$resource->name= $request->name;\n\t\t\t\t$resource->url= $request->url;\n\n\t\t\t\t\treturn response()->json([\n\t\t\t\t\t\t'updated'=>$resource->save()\n\t\t\t\t\t]);\n }", "title": "" }, { "docid": "b4a169f9a3d901a01f32f1071fdf2091", "score": "0.6462599", "text": "public function update(Request $request, Storage $storage)\n {\n \n $storage->name = $request->input('name');\n $storage->codigo = $request->input('codigo');\n $storage->active = $request->input('active');\n $storage->save();\n\n return redirect('/storages')->with('message','update');\n }", "title": "" }, { "docid": "dde275288f11a04dfd12a4da06e0b6b6", "score": "0.6404118", "text": "public function put($resource, $arOptions);", "title": "" }, { "docid": "d14f3b67a32851152c09abd22392f6ca", "score": "0.6295373", "text": "public function update(OurResourceRequest $request,OurResource $ourResource)\n {\n try {\n $file = $request->file('images');\n $inputs = $request->all();\n\n if($file) {\n $inputs['images'] = $this->uploadImages($request->file('images'));\n } else {\n $inputs['images'] = $ourResource->images;\n $inputs['images']['thumb'] = $inputs['imagesThumb'];\n\n }\n\n unset($inputs['imagesThumb']);\n $ourResource->update();\n\n return redirect(route('ourresource.index'));\n } catch (\\Exception $exception) {\n Log::error($exception);\n }\n }", "title": "" }, { "docid": "3f88464873b841b9046a2a5852122431", "score": "0.6265043", "text": "public function update(Request $request, LibResource $resource)\n {\n $this->abort_if_not_permited();\n $data = $this->validate($request, [\n 'res_title' => 'required',\n 'res_subject' => 'required',\n 'res_author' => 'required',\n 'res_department_id' => 'required',\n 'res_type_id' => 'required'\n ]);\n\n if($request->res_type_id != $resource->res_type_id) {\n $oldFolder = LibResourceType::find($resource->res_type_id)->res_type;\n $newFolder = LibResourceType::find($request->res_type_id)->res_type;\n\n Storage::disk('library')->move($oldFolder.'/'.$resource->res_files, \n $newFolder.'/'.$resource->res_files);\n\n Storage::disk('library')->move($oldFolder.'/' .'cover/'.$resource->res_cover, \n $newFolder.'/' .'cover/'.$resource->res_cover);\n }\n \n $resource->update($data);\n return $resource;\n }", "title": "" }, { "docid": "37aa707a5d1cf3d2b73c5d32bea86169", "score": "0.62426656", "text": "public function update($resource, array $data)\n {\n $this->validate($data, $resource);\n return $resource->update($data);\n }", "title": "" }, { "docid": "96f9e6fdcf8c5b9b43c1f9a96134f2bf", "score": "0.6203198", "text": "public function updateStream(string $path, $resource, array $config = []): void;", "title": "" }, { "docid": "0b9df105daf9d4dddca1b265bf150fd3", "score": "0.6093648", "text": "public function updateResource($res, Request $request) {\n $rules = array(\n 'details' => 'required|string|max:1000',\n 'image' => 'image|max:4096',\n 'link' => 'string|nullable'\n );\n\n $error = Validator::make($request->all(), $rules)->validate();\n\n $resource = SiteImage::findOrFail($res);\n\n \n\n if(!$request->hasFile('image')) {\n \n // IMAGE NOT CHANGED\n \n $data = array(\n 'image_details' => $request->details\n );\n\n } else {\n \n // IMAGE CHANGED\n \n // UPLOAD IMAGE\n $image = $request->file('image');\n $new_name = rand() . '.' . $image->getClientOriginalExtension(); // Name of new Image\n $destination_path = \"/images/static\";\n\n\n \n $resize_image = Image::make($image->getRealPath());\n\n //return response()->json(['errors' => [$destination_path . '/' . $new_name]]);\n $resize_image->save(public_path($destination_path . '/' . $new_name));\n\n\n $old_image_path = $resource->image_ref;\n\n /*if(File::exists(public_path() . $old_image_path)) {\n File::delete(public_path() . $old_image_path);\n }*/\n\n $data = array(\n 'image_ref' => '/images/static/' . $new_name,\n 'image_details' => $request->details\n ); \n\n \n }\n\n if($request->link) $data['link'] = $request->link;\n $resource->update($data);\n\n return View('backoffice.pages.edit_resource', ['resource' => $resource]);\n \n }", "title": "" }, { "docid": "0f413897f49a592f566edc4499283b2c", "score": "0.603257", "text": "public function storageUpdateAction(){\n\t\t$this->setDialogAction();\n\t\t$storage_id = $this->getParam('storage_id');\n\t\t$filename = $this->getParam('filename');\n\t\t$ext = $this->getParam('ext');\n\t\t$type = $this->getParam('type');\n\t\t\n\t\t$storage = $this->fileSources->get($storage_id);\n\t\t$sources = $this->fileSources->getList();\n\t\t$this->view->sources = $sources;\n\t\t$this->view->storage = $storage;\n\t\tif(!empty($ext)) $filename = $filename.\".\".$ext;\n\t\t$this->view->filename = $filename;\n\t\t$this->view->type = $type;\n\t}", "title": "" }, { "docid": "3c13e0ec8368dde371325db1b8b227e5", "score": "0.5949601", "text": "public function update(Request $request, $id)\n {\n //\n // si exxiste la array de recursos\n if ( $request->session()->exists('resources')){\n \n // obtenemos los valores del array de recursos\n $resources = $request->session()->get('resources');\n \n if(isset($resources[$id])){\n \n $resource = $resources[$id];\n \n // Elimina la posicion del array, y se reajusta el array\n ;\n $nameInput=$request->input('name');\n $priceInput=$request->input('price');\n \n // si no has editado nada, vuelve de nuevo\n if($nameInput==$resource['name'] && $priceInput==$resource['price']){\n // return redirect('store')->with('message', 'You have not applied any changes to the product!');\n return back()->withInput();\n }\n \n $resource['id']=$id;\n $resource['name']=$nameInput;\n $resource['price']=$priceInput;\n \n $resources[$id]=$resource; \n \n // meter ese array en tu sesion \n $request->session()->put('resources', $resources);\n \n return redirect('store')->with('message', 'The product has been edited successfully!'); // es lo mismo que resource ¿ que hace el redirect)\n }\n }\n return back()->withInput();\n }", "title": "" }, { "docid": "47f5a0f9058e305083b50269e28fc738", "score": "0.59487104", "text": "public function update(Request $request, $resource)\n {\n try { \n $resource->update($request->all());\n watch(__('update card type'), \"fa fa-card\");\n return responseJson(1, __('done'), $resource);\n } catch (\\Exception $e) {\n return responseJson(0, $e->getMessage());\n }\n }", "title": "" }, { "docid": "776da8c96f4aa34eec52175bc485cecd", "score": "0.59405017", "text": "public function update($id, UpdateResourceRequest $request)\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\n $resource = $this->service->update($request->all(), $id);\n Flash::success('Resource atualizado com sucesso.');\n return redirect(route('resources.index'));\n }", "title": "" }, { "docid": "1967dfef2308a54917abee94f5fb2fe9", "score": "0.5922663", "text": "public function updateStream($path, $resource, Config $config) {\n // TODO: Implement updateStream() method.\n }", "title": "" }, { "docid": "d3213bec1042b484f9e7c8a52c4ef16a", "score": "0.58999914", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "b5bcf23d212ba01a7fca11f3cf632111", "score": "0.5896195", "text": "public function update(ResourceRequest $request, $id)\n {\n try {\n $resource = $this->resource->find($id);\n $resource->update($request->all());\n\n flash('Recurso atualizado com sucesso!')->success();\n return redirect()->route('resources.index');\n\n } catch (\\Exception$e) {\n $message = env('APP_DEBUG') ? $e->getMessage() : 'Erro ao processar atualização...';\n\n flash($message)->error();\n return redirect()->back();\n }\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5890722", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "1b6228f28970b633590b97318fca00a2", "score": "0.5875679", "text": "function resource_update($id, $options) {\n $options['id'] = $id;\n return $this->_post_request('resource_update', $options);\n }", "title": "" }, { "docid": "f2c455344d9c8883e1e991918cdb4313", "score": "0.586725", "text": "public function update(Request $request, $id)\n {\n request()->validate([\n 'title' => ['required', 'string'],\n 'description' => ['required', 'string'],\n 'image' => 'required',\n ]);\n\n $imageName = time().'.'.request()->image->getClientOriginalExtension();\n request()->image->move(public_path('images'), $imageName);\n\n resource::find($id)->update([\n 'title' => $request->title,\n 'description' => $request->description,\n 'image' => $imageName\n ]);\n return back()->with('success','You have successfully update the resource.');\n }", "title": "" }, { "docid": "4316a587c5ca6fb49a7ce41a46a24ed8", "score": "0.5850647", "text": "public function update( $resourcePath, Array $body=[]) {\n return $this->callResource( 'put', $resourcePath, ['body'=>$body]);\n }", "title": "" }, { "docid": "59c6239c448624b3108c46073757b01e", "score": "0.58493763", "text": "public function update(StoreProductRequest $request, $id)\n {\n DB::beginTransaction();\n try {\n $product = Product::find($id);\n if ($product) {\n $data = $request->safe()->except(['image']);\n\n $imageUrl = $this->storeFile($request, $product->id);\n if (!empty($imageUrl))\n $data['image_url'] = $imageUrl;\n\n $product->update($data);\n DB::commit();\n\n return new ProductResource($product);\n }\n return response()->json(['data' => 'Product not found.'], 404);\n } catch (Exception $e) {\n DB::rollback();\n\n return response()->json($e->getMessage());\n }\n }", "title": "" }, { "docid": "500de3817809ac92f35634ac93419bfe", "score": "0.58382034", "text": "public static function update($resource, $request)\n {\n static::fillAttributes($resource, $request);\n static::fillBoolean($resource, $request);\n\n static::updateBelongsTo($resource, $request);\n\n $resource->save();\n\n static::updateBelongsToMany($resource, $request);\n\n return $resource;\n }", "title": "" }, { "docid": "e8f642c1357eaca6a51e747722c28e9a", "score": "0.58338976", "text": "protected function save($resource) {\n if (isset($resource['public_id'])) {\n $this->redis->set($resource['public_id'], $resource);\n }\n }", "title": "" }, { "docid": "2cf80d6b1d66cb9fd56bf8c18c026e8f", "score": "0.5824176", "text": "public function update(Request $request, $id)\n {\n $path = Product::find($id)->filename;\n $filename = $request->file('image');\n\n if(!($filename === null)) {\n $path = $request->file('image')->store('id/'.$request->input('user_id').'/products/images', 's3');\n }\n\n Product::find($id)->update([\n 'name' => $request->input('name'),\n 'description' => $request->input('description'),\n 'price' => $request->input('price'),\n 'amount' => $request->input('amount'),\n 'filename' => basename($path),\n 'url' => Storage::disk('s3')->url($path),\n ]);\n return redirect()->route('products.index');\n\n\n\n\n\n\n\n\n\n\n }", "title": "" }, { "docid": "07c7bceecf971da3d703020e3b86857c", "score": "0.57805496", "text": "public function update ($data) {}", "title": "" }, { "docid": "07c7bceecf971da3d703020e3b86857c", "score": "0.57805496", "text": "public function update ($data) {}", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.57525045", "text": "public function update($entity);", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.57525045", "text": "public function update($entity);", "title": "" }, { "docid": "01a05836a30a03daa266194238513ef3", "score": "0.5742325", "text": "public function update(Request $request, $id){\n $slider = Slider::find($id);\n \n if($request->hasFile('image')){\n $slider->image = $request->image->store('sliders',['disk' => 'public']); \n }\n \n $slider->link = $request->link;\n $slider->save();\n\n return new JsonResponse([\n 'status' => 'success',\n 'message' => 'Slider updated successfully'\n ]);\n }", "title": "" }, { "docid": "bb8e19272e0561c14ce70c3a793ec51a", "score": "0.57381696", "text": "public function update(Request $request, $id)\n {\n\n $data = Product::where('id', $id)->first();\n // 判斷是否上傳圖片\n if ($request->hasFile('img')) {\n\n // 刪除照片\n // 用一個變數代替要刪除的圖片名\n $old_image = $data->img;\n //public_path()指從public這個路徑開始\n File::delete(public_path() . '/storage/' . $old_image);\n // 儲存新照片\n $file_name = $request->file('img')->store('', 'public');\n // 將新照片的路徑存起來 回存\n $data->img = $file_name;\n }\n\n $data->kinds = $request->kinds;\n $data->sort = $request->sort;\n $data->save();\n return redirect('home/product');\n\n // 這筆request 含有 method 與token 這兩筆欄位資料\n // except 例外處理 將括號內的欄位去除\n // $tt = $request->except('_token','_method');\n // where(指定) id =$id 這筆 進行 更新內容($tt)\n // Product::where('id',$id)->update($tt);\n // $data = Product::where('id', $id)->first();\n // // 先做賦值得動作 在做儲存\n // $data->img = $request->img;\n // $data->kinds = $request->kinds;\n // $data->save();\n // return redirect('home/product');\n }", "title": "" }, { "docid": "30790b56c47f44ba2fcdcad444e0ebf5", "score": "0.57262063", "text": "public function update(Stock $request, $id)\n {\n $stock_cosmetic = StockCosmetic::find($id);\n\n $stock_cosmetic->product = $request->input('product');\n $stock_cosmetic->color = $request->input('color');\n $stock_cosmetic->brand = $request->input('brand');\n $stock_cosmetic->price = $request->input('price');\n $stock_cosmetic->save();\n // image\n if ($request->hasFile('image') && $request->file('image')->isValid()) {\n $path = $request->image->storePubliclyAs('/stock', $stock_cosmetic->id . '.jpg', ['disk' => 's3']);\n $stock_cosmetic->image = $path;\n $stock_cosmetic->save();\n }\n\n return redirect('stock_cosmetics/list_of_stock/{user_id}/stock_cosmetics');\n }", "title": "" }, { "docid": "68611877d8742448025a8506ebac8d13", "score": "0.5723295", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "title": "" }, { "docid": "7ed06fd4c3033e66778142b41027c241", "score": "0.57009596", "text": "public function editResource($resource, array $data)\r\n\t{\r\n\t\t$resourceType = __NAMESPACE__.'\\\\Driver\\\\'.$this->identify($resource);\r\n\t\t$cr = new $resourceType($resource);\r\n\t\t$cr->save($data);\r\n\t}", "title": "" }, { "docid": "98ed855cdf6798411cf49ba631a664ec", "score": "0.56952107", "text": "public function setResource($resource)\n {\n }", "title": "" }, { "docid": "1d541312c2378377a67b8bc814d61521", "score": "0.5689462", "text": "public function update(Request $request, $id)\n {\n $update = Project::find($id); \n\n Storage::disk('public')->delete('img/'. $update->src);\n $update->nom = $request->nom; \n $update->description = $request->description; \n $update->tag = $request->tags; \n \n $update->save();\n $request->file('src')->storePublicly('img','public');\n \n return redirect()->back(); \n }", "title": "" }, { "docid": "15c077d64c9ceb586f671a09513b8246", "score": "0.5682459", "text": "public function update(Request $request, $id)\n {\n $row = Product::find($id);\n if($row) {\n $oldimage = $row->image;\n $row->title = $request->title;\n $row->slug = str_replace(' ', '-', strtolower($request->title));\n $row->category_id = $request->category_id;\n $row->brand_id = $request->brand_id;\n $row->price = $request->price;\n $row->content = $request->content;\n $row->image = $oldimage;\n\n if($request->image){\n if($_FILES['image']['error'] == 0) {\n $filename = time() . '_' . $_FILES['image']['name'];\n\n $image = 'uploads/' . $filename;\n\n $destination = public_path($image) ;\n\n $is_uploaded = move_uploaded_file($_FILES['image']['tmp_name'], $destination);\n\n if($is_uploaded) {\n if(is_file(public_path($oldimage))) {\n unlink(public_path($oldimage));\n }\n $row->image = '/' . $image;\n }\n }\n }\n\n $row->save();\n }\n return redirect()->back();\n\n }", "title": "" }, { "docid": "359f6b66cab79746b3c9bb9ba71db220", "score": "0.56804216", "text": "public function update(ProductRequest $request, Product $product)\n {\n// $product->productsHistory()->save($product->except('image', 'vendor_id'));\n tap($product)->update([\n 'name' => $request->input('product.name'),\n 'vendor_id' => $request->input('product.vendor_id'),\n 'description' => $request->input('product.description'),\n 'price' => $request->input('product.price'),\n 'cost' => $request->input('product.cost'),\n 'image' => $request->input('product.image'),\n ]);\n dispatch(new CacheData(auth()->user()));\n return new ProductAllDataResource($product);\n }", "title": "" }, { "docid": "e08e873b4ef207afab432dfb5491c0cf", "score": "0.5677409", "text": "public function update(Request $request, $id)\n {\n $producto = Producto::findOrFail($id);\n $dataProducto=json_decode($request->producto,true);\n if($producto->foto != $dataProducto['foto']){\n Storage::delete($producto->foto);\n $file=$request->file('archivo');\n $ruta=$file->storeAs('img',time() . $file->getClientOriginalName(),'public');\n $producto->foto=$ruta;\n }\n $producto->nombre=$dataProducto['nombre'];\n $producto->detalle=$dataProducto['detalle'];\n $producto->precio=$dataProducto['precio'];\n $producto->asociado_id=$dataProducto['asociado_id'];\n if($producto->save()){\n return new ProductoResource($producto);\n }\n }", "title": "" }, { "docid": "77c5abc6b152e12d927f19d28ebfa590", "score": "0.5673537", "text": "public function updateStorageService($name, $options);", "title": "" }, { "docid": "9025ceea51e126c303a0cefd6bb34e4e", "score": "0.56732917", "text": "public function update(Request $request, Product $product)\n {\n $product->update($request->all());\n\n if($request->file('file')){\n $url = Storage::put('products', $request->file('file'));\n if($product->image){\n Storage::delete($product->image->url);\n\n $product->image()->update([\n 'url' => $url\n ]);\n }\n else{\n $product->image()->create([\n 'url' => $url\n ]);\n }\n }\n return redirect()->route('admin.products.index', $product)->with('Exito2','¡Se ha actualizado el producto con exito! ');\n}", "title": "" }, { "docid": "5b824457eb3318778d2a67f1f5dfc4ff", "score": "0.5671616", "text": "public function update(Request $request, $id)\n {\n //actualizar procducts\n\n $product =Product::findOrFail($id,);\n $product-> name=$request->input('name');\n $product-> price=$request->input('price');\n $product-> save();\n return new ProductResource($product);\n\n\n\n }", "title": "" }, { "docid": "09bd4dd53076527911b91beb82f9c3a4", "score": "0.56539524", "text": "public function update(Request $request, $id)\n {\n //\n $product_data=request()->except(['_token','_method']);\n \n if ($request->hasFile('Image_path')) {\n # code...\n $product = Products::findOrFail($id);\n Storage::delete('public/'.$product->Image_path);\n $product_data['Image_path']=$request->file('Image_path')->store('uploads', 'public');\n \n }\n Products::where('id','=',$id)->update($product_data);\n\n //$product = Products::findOrFail($id);\n //return view('products.edit', compact('product'));\n return redirect('productos')->with('Message','Producto modifiado con exito.');\n }", "title": "" }, { "docid": "d1bfc26f51571559d08876ca1ee1e3c3", "score": "0.565382", "text": "public function updateStream($path, $resource, $config = null)\n {\n return $this->uploadStream($path, $resource, WriteMode::force());\n }", "title": "" }, { "docid": "bd335a6afd825ec9c0e9d48a8ae6ad74", "score": "0.56527406", "text": "public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n\n $product->description = $request->description;\n $product->price = $request->price;\n $product->type = $request->type;\n $product->qty = $request->qty;\n\n if($request->hasFile('imglink')){\n $avatar = $request->file('imglink');\n $filename = time(). '.' . $avatar->getClientOriginalExtension();\n Image::make($avatar)->resize(300, 300)->save( public_path('/img/' . $filename ) );\n\n $product->imglink = $filename;\n }\n\n $product->update();\n\n //$product = Product::paginate(10);\n //return view('products.products', compact('products'));\n return redirect('products');\n }", "title": "" }, { "docid": "b12ae77c453a22ab164b3b8004dd9fdf", "score": "0.56446284", "text": "public function update($name, $object);", "title": "" }, { "docid": "792447dfa646026b3e9533c56a80e725", "score": "0.564", "text": "public function updateStream ($path, $resource, Config $config)\n {\n return $this->writeStream ($path, $resource, $config);\n }", "title": "" }, { "docid": "6120bba94c23aff61a9143580e98d499", "score": "0.5634615", "text": "public function update(Request $request, $id)\n {\n $resource = Resource::find($id);\n if ($resource) {\n if ($request->user()->cannot('update-resource', $resource)) {\n abort(403);\n }\n\n $this->sanitizeInput($request);\n $validator = $this->validator($request->all(), $id);\n\n if ($validator->fails()) {\n return redirect(route('resource.edit', ['id' =>$resource->id]))\n ->withInput()\n ->withErrors($validator);\n }\n\n $resource->title = $request->input('title');\n $resource->link = $request->input('url');\n $resource->cat_id = $request->input('category');\n $resource->description = $request->input('description');\n $resource->save();\n\n return redirect(route('index'))->with('status', 'Resource Updated Successfully');\n }\n abort(404);\n }", "title": "" }, { "docid": "e975cdf5e9d326eb5b73dc2a9ed53878", "score": "0.5629534", "text": "public function updateResource(string $link, array $data = null): string\n {\n $payload = ['json' => $data];\n\n $this->connectToFiken($link, 'PUT', $payload);\n\n // Fiken returns an empty body on successful updates, so we just return the link to the updated resource\n return $link;\n }", "title": "" }, { "docid": "6bbc6190ab101a78c810c8657a536fb8", "score": "0.56255704", "text": "public function update( $params = array() ) {\n\t\tif ( !is_array( $params ) ) {\n\t\t\terror_log( __METHOD__ . '() $params provided are not an array' );\n\t\t\tthrow new Exception( 'parameter type error', 1 );\n\t\t}\n\n\t\t$mode = 'a';\n\n\t\tif ( !empty( $params['mode'] ) && is_string( $params['mode'] ) ) {\n\t\t\t$mode = filter_var( $params['mode'], FILTER_SANITIZE_STRING );\n\t\t}\n\n\t\t$fp = @fopen( $params['storage_path'] . '/' . $params['filename'], $mode );\n\n\t\tif ( $fp ) {\n\t\t\t$bytes = fwrite( $fp, $params['content'] );\n\t\t} else {\n\t\t\terror_log( __METHOD__ . '(), could not update [' . $params['filename'] . ']' );\n\t\t\tthrow new Exception( 'could not update a resource', 12 );\n\t\t}\n\n\t\treturn fclose( $fp );\n\t}", "title": "" }, { "docid": "b0976d68e90a64aa5595f98c7a413119", "score": "0.5621308", "text": "public function update(QStore $request, $id)\n {\n //\n }", "title": "" }, { "docid": "1ca4d9d9f232ed11815a13afa8452939", "score": "0.56211114", "text": "public function update(Request $request, $id)\n {\n $request->validate([ \n 'title' => 'required|min:10|max:190',//specify the table name in the database for unique validation \n 'file_path'=>'required', \n 'body' => 'required|min:50' \n ]);\n $res = Ressource::findOrFail($id);\n $res->title = $request['title'];\n $res->image_path = $request['image_path'];\n $res->file_path = $request['file_path'];\n $res->body = $request['body'];\n $res->update();\n\n return redirect('manage_ressources');\n }", "title": "" }, { "docid": "1e16c5691c8e2eef352403af3df19b93", "score": "0.561985", "text": "public static function update($resources){\n\t\t$db=Db::getConnect();\n\t\t$update=$db->prepare('UPDATE resources SET name=:name, description=:description,\n\t\t\tlocation=:location, image=:image WHERE id=:id');\n\t\t$update->bindValue('name', $resources->getName());\n\t\t$update->bindValue('description',$resources->getDescription());\n\t\t$update->bindValue('location',$resources->getLocation());\n\t\t$update->bindValue('image',$resources->obtenerImagen());\n\t\t$update->bindValue('id',$resources->getId());\n\t\t$update->execute();\n\t}", "title": "" }, { "docid": "ad1ca99be415c735a2ef2f4128a1f1c0", "score": "0.56082803", "text": "public function update(StorageProductRule $request, Product $product)\n {\n $this->product->UpdateProduct($request,$product);\n return redirect()->route('product.index')->with('message','Product updated successfully!');\n }", "title": "" }, { "docid": "a2ddcd85128f60ff32a767eb3d311bd4", "score": "0.56082344", "text": "public function update(Request $request, $id)\n {\n $this->validate(request(),[\n 'title' => 'required',\n 'desc' => 'required',\n 'category_id' => 'required|integer',\n 'price' => 'required|regex:/^[0-9]+(\\.[0-9][0-9]?)?$/',\n 'image' => 'image|max:2000',\n ]);\n\n $product = Product::findOrFail($id);\n\n $s3 = Storage::disk('s3');\n $image = request()->image;\n\n $product->title = $request->get('title');\n $product->desc = $request->get('desc');\n $product->category_id = $request->get('category_id');\n $product->price = $request->get('price');\n\n if ($image != null)\n {\n $path = $s3->putFileAs('product_images/'.$product->user_id, $image, $image->getClientOriginalName() , 'public');\n $product->imageLocation = Storage::disk('s3')->url($path);\n }\n $product->save();\n return redirect(\"/userproducts/$product->user_id\");\n }", "title": "" }, { "docid": "1ceaeb30b587b555369c4247fb10e594", "score": "0.5603278", "text": "public function putAction()\n {\n $t = $this->createTable();\n $this->record = $t->load($this->getRequest()->getInt('_id'));\n $vars = $this->getRequest()->getParams();\n if (!empty($vars['nested']))\n {\n $this->_nestedInput = $vars['nested'];\n unset($vars['nested']);\n }\n $this->setForUpdate($this->record, $vars);\n $this->record->update();\n $this->updateNested($this->record, $vars);\n $this->apiOutRecords(array($this->record));\n }", "title": "" }, { "docid": "4a62a78ed2019e37a1f11273a9e45c02", "score": "0.55921906", "text": "public function putAction() {\n $token = $this->_getParam('token', 0);\n $id = $this->_getParam('id', 0);\n if (ZendX_Utilities_SecurityWSCheck::isValid($token)) {\n $id = $this->_getParam('id', 0);\n\n $this->view->id = $id;\n $this->view->params = $this->_request->getParams();\n $this->view->message = sprintf('Resource #%s was Updated', $id);\n $this->_response->ok();\n } else {\n// $this->view->message = sprintf('Forbidden', $id);\n $this->_response->forbidden();\n }\n }", "title": "" }, { "docid": "ab9ec1cab0ba86404b7b85cde684c6b8", "score": "0.558271", "text": "public function update(Request $request, $id)\n {\n $image = Image::findOrfail($id);\n $image->fill($request->all());\n\n if($request->hasFile('path'))\n {\n $path = $request->file('path')->store('public');\n $image->fill(['path' => $path]);\n \n }\n $image->save();\n\n return redirect()->route('images.index')->with('info', 'Imagen editada exitosamente');\n }", "title": "" }, { "docid": "1571f300ade8156825f5ac0eb703bea0", "score": "0.5582257", "text": "public function testResourcesCanBeUpdated(): void\n {\n $admin = User::factory()->admin()->create();\n $resource = Resource::factory()->create();\n\n $response = $this->actingAs($admin)->put('resources/'.$resource->id, [\n 'name' => 'New Resource Name',\n ]);\n\n $response->assertRedirect('/resources');\n $this->assertDatabaseHas('resources', [\n 'name' => 'New Resource Name',\n ]);\n }", "title": "" }, { "docid": "b493f0ac75566bd77b9da4733fecab90", "score": "0.5582209", "text": "public function updateResource(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'resource_id' => 'required|exists:trip_resources,id',\n 'user_id' => 'required|exists:publishers,id',\n 'type' => 'required|in:vedio,image',\n 'desc' => 'nullable',\n 'resource' => 'nullable|max:30000000',\n 'lat' => 'required',\n 'lng' => 'required',\n 'address' => 'required'\n\n ]);\n if ($validator->passes()) {\n $resource = TripResource::find($request['resource_id']);\n\n if ($resource->trip->publisher_id == $request['user_id']) {\n $resource->type = $request['type'];\n $resource->desc = $request['desc'];\n $resource->lat = $request['lat'];\n $resource->lng = $request['lng'];\n $resource->address = $request['address'];\n if ($request['resource']) {\n File::delete('uploads/tripResources/' . $resource->resource);\n if ($request['type'] == \"image\") {\n $photo = $request->resource;\n $name = date('d-m-y') . time() . rand() . '.' . $photo->getClientOriginalExtension();\n Image::make($photo)->save('uploads/tripResources/' . $name);\n } else {\n $vedio = $request->resource;\n $name = date('d-m-y') . time() . rand() . '.' . $vedio->getClientOriginalExtension();\n $vedio->move(public_path('uploads/tripResources'), $name);\n }\n $resource->resource = $name;\n }\n $resource->update();\n $msg = $request['lang'] == 'ar' ? ' تم التعديل.' : ' update sucessful.';\n return response()->json(\n [\n 'status' => true,\n 'data' => \"\",\n 'msg' => $msg\n ]\n );\n } else {\n $msg = $request['lang'] == 'ar' ? ' المستخدم لايملك هذه الرحله.' : ' user not owner the trip.';\n return response()->json(\n [\n 'status' => false,\n 'data' => \"\",\n 'msg' => $msg\n ]\n );\n }\n\n } else {\n foreach ((array)$validator->errors() as $key => $value) {\n foreach ($value as $msg) {\n return response()->json(['status' => false, 'msg' => $msg[0]]);\n }\n }\n }\n }", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.55813426", "text": "public function update($request, $id);", "title": "" }, { "docid": "9d8cba34413cd6e6b48618c3db86055c", "score": "0.55810744", "text": "public function update(Request $request, $id)\n {\n $im = Image::find($id);\n $im->product_id = $request->product_id;\n $im->img_path = $request->img_path;\n \n $im->update();\n\n return redirect(route('image.show',$im->id));\n }", "title": "" }, { "docid": "2f36f1d4154ef1a2d8557fd96028dafb", "score": "0.55801266", "text": "public function updateStream($path, $resource, Config $config)\n {\n try {\n $result = $this->client->post('update', [\n 'query' => ['path' => $path],\n 'body' => $resource\n ]);\n\n $response = json_decode($result->getBody()->getContents(), true);\n\n if ($response['response']) {\n return true;\n }\n\n throw new Exception($response['message']);\n\n } catch (RequestException $e) {\n throw new Exception($e->getMessage(), $e->getCode(), $e);\n }\n }", "title": "" }, { "docid": "b34e21aac9031dd439acaadc48395628", "score": "0.5579814", "text": "public function update(Request $request, $id)\n {\n\n $this->validate($request, [\n \"name\" => 'required',\n \"description\" => 'required',\n \"genre_id\" => 'required',\n \"category_id\" => 'required',\n \"price\" => 'required|integer',\n \"size_id\" => \"required\",\n \"stock\" => \"required|integer\",\n \"imageLoc\" => \"image|dimensions:min_width=340,max_width=366,min_height=440,max_height=466\",\n \"imageLoc2\" => \"image|dimensions:min_width=340,max_width=366,min_height=440,max_height=466\",\n ]);\n\n $product = Product::find($id);\n\n $product->name = $request->input(\"name\");\n $product->description = $request->input(\"description\");\n $product->genre_id = $request->input(\"genre_id\");\n $product->category_id = $request->input(\"category_id\");\n $product->price = $request->input(\"price\");\n $product->size_id = $request->input(\"size_id\");\n $product->stock = $request->input(\"stock\");\n\n $path = $request->file('imageLoc');\n $path2 = $request->file('imageLoc2');\n\n $extension = $request->file('imageLoc')->extension();\n $extension2 = $request->file('imageLoc2')->extension();\n\n\n if (!is_null($path)) {\n $path->storeAs('public/products', '1'.$request->user()->id.'.'.$extension);\n $product->imageLoc = 'storage/products/1'.$request->user()->id.'.'.$extension2;\n }\n if (!is_null($path2)) {\n $path2->storeAs('public/products', '2'.$request->user()->id);\n $product->imageLoc2 = 'storage/products/2'.$request->user()->id;\n }\n\n\n $product->save();\n\n\n return redirect()->route('products.show',['id' => $id]);\n }", "title": "" }, { "docid": "60b9f0eec9bbbce5da5e2b8796798a94", "score": "0.5576629", "text": "public function update(SitioUpdateRequest $request)\n { \n\n $sitio = Sitio::find(1);\n $sitio->name = $request->name;\n\n if($request->hasFile('picture')){\n\n $oldFile = $sitio->picture;\n $file = $request->file('picture');\n $destination_path = public_path().'/file/';\n $name = 'sitio_' . time() . '.' . $file->getClientOriginalName();\n \\Storage::disk('local')->put($name, \\File::get($file));\n unlink($destination_path.$oldFile);\n $sitio->picture = $name;\n }\n\n $sitio->save();\n\n \\Session::flash('success', 'Sitio actualizado exitosamente.');\n\n return redirect()->to('/admin/home'); \n }", "title": "" }, { "docid": "d6f71bb85fc7a75982a80e5421b6054e", "score": "0.55763113", "text": "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n\n $product->product_name = $request->product_name;\n $product->product_description = $request->product_description;\n $product->brand_id = $request->brand_id;\n $product->product_price = $request->product_price;\n $product->area_id = $request->area_id;\n $product->subcategory_id = $request->subcategory_id;\n $product->condition = $request->condition;\n\n // if($request->hasFile('product_image'))\n // {\n // $path = $request->product_image->store('images');\n // // $product->product_image = $request->product_image->hashName();\n // }\n // }\n\n $product->save();\n\n flash('Product successfully updated')->success();\n\n return redirect()->route('products.edit',$product->id);\n\n }", "title": "" }, { "docid": "f8cd6649bfa223d8861db5374702fc62", "score": "0.5569909", "text": "public function updateFromResource(\n $resourceResource,\n $exerciseResource\n )\n {\n parent::updateFromSharedResource($resourceResource, $exerciseResource, 'resource_storage');\n $exerciseResource = $this->computeRequirements($exerciseResource, $resourceResource);\n\n if (!is_null($resourceResource->getArchived())) {\n $exerciseResource->setArchived($resourceResource->getArchived());\n }\n\n return $exerciseResource;\n }", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55661047", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "8c6acbc80b9bce2875ae52d0218c6db7", "score": "0.5556945", "text": "public function update(Request $request, ImagesStorage $imagesStorage)\n {\n //\n }", "title": "" }, { "docid": "9c16790d9595ec15edbb9f90b1a893da", "score": "0.55535865", "text": "public function update(Request $request, Product $product)\n {\n // error_log($request);\n \n $product->category_id=$request->category_id;\n $product->user_id=$request->user()->id;\n\n $product->name=$request->name;\n $product->description=$request->description;\n $product->price= $request->price;\n\n //$product->photo= \"/storage/\".$request->file('photo')->store(\"photos\");\n\n $product->stock= $request->stock;\n\n $product->save();\n // error_log($product);\n return response()->json([\n 'status' => '201',\n 'message' => 'Product updated',\n 'product'=>$product\n ]);\n }", "title": "" }, { "docid": "4d9a8860c5c0baa27686ce3d50c1577f", "score": "0.5530968", "text": "public function update(Request $request, Product $product)\n {\n $validation = Validator::make($request->all(), [\n 'name' => 'min:3|max:100',\n 'description' => 'min:5',\n 'price' => 'integer',\n 'quantity' => 'integer',\n 'image_path' => 'image|mimes:jpg,jpeg,svg,png'\n ]);\n\n $newPath = \"\";\n if ($request->hasFile('image_path')) {\n Storage::delete('products/' . $product->image_path);\n $newPath = $request->file('image_path')->store('public/products');\n }\n\n if ($validation->fails()) {\n return response()->json($validation->errors(), 422);\n }\n\n $product->name = $request->get('name', $product->name);\n $product->description = $request->get('description', $product->description);\n $product->price = $request->get('price', $product->price);\n $product->quantity = $request->get('quantity', $product->quantity);\n $product->image_path = $request->get($newPath, $product->image_path);\n\n $product->save();\n return new ProductIndexResource($product);\n }", "title": "" }, { "docid": "416eb5614de4e6fedf65c1c8ec3c5924", "score": "0.5518426", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'name'=>'required',\n 'category_id'=>'required|integer',\n 'status'=> 'required|boolean',\n 'picture'=> 'required',\n 'gender' => 'required',\n ]);\n $pic = null;\n if ($request->hasFile('picture')) {\n\n $image = $request->file('picture');\n $name = uniqid().'.'.$image->getClientOriginalExtension();\n $destinationPath = public_path('/images');\n $image->move($destinationPath, $name);\n $pic = \"images/{$name}\";\n }\n $product = \\App\\Product::find($id);\n $product->name = $request->get('name');\n $product->category_id = $request->get('category_id');\n $product->status = $request->get('status');\n $product->picture = $pic;\n $product->gender = $request->get('gender');\n $product->save();\n\n return redirect('/products')->with('success', 'Stock has been updated');\n\n\n }", "title": "" }, { "docid": "9e68af5ab6e6fd50f6b3af43fa9adffb", "score": "0.5518285", "text": "public function update(Request $request, $id)\n {\n //\n\n $specialOffers = SpecialOffer::find($id);\n $specialOffers->product_title = $request->sliderTitle;\n $specialOffers->product_price = $request->sliderDetails;\n $specialOffers->product_available = $request->productPrice;\n $specialOffers->product_sold = $request->product_sold;\n \n \n if($request->file('image')){\n $image = $request->file('image');\n Storage::putFile('public/img/',$image);\n $specialOffers->image =\"storage/img/\".$image->hashName();\n }\n $specialOffers->save();\n \n return redirect()->route('admin.specialOffers.create')->with('success','specialOffers details updated Successfully');\n }", "title": "" }, { "docid": "7fcc3e1a5efb0809a329cb304b469001", "score": "0.55178463", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, Product::validate());\n\n if ($request->hasFile('image')) {\n\n $file = $request->file('image');\n $path = $file->store('/',\n [\n 'disk' => 'uploads'\n ]);\n $request->merge([\n 'image_path' => $path\n ]);\n }\n $data = request()->except(['_token', '_method', 'image']);\n $product = Product::where('id', $id)->update($data);\n return redirect()->route('products.index')->with([\n 'success' => 'Product Updated Successfully'\n ]);\n }", "title": "" }, { "docid": "055d9a75bb90fd4afdce24cc7ce3d70d", "score": "0.5517729", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $product->sizes()->sync($request->sizes);\n $product->update([\n 'name' => $request->input('name'),\n 'description' => $request->input('description'),\n 'price' => $request->input('price'),\n 'published' => $request->input('published'),\n 'discount' => $request->input('discount'),\n 'category_id' => $request->input('category_id'),\n 'ref' => $request->input('ref')\n ]);\n\n return redirect('/admin/products');\n }", "title": "" }, { "docid": "f5b4408354bfa9c8612fac65129c141b", "score": "0.5516778", "text": "public function update(StoreProductRequest $request, $id)\n {\n //\n $request->validated();\n\n $obj = Product::find($id);\n $obj->name = Input::get('name');\n $obj->categoryId = Input::get('categoryId');\n $obj->price = Input::get('price');\n $obj->discount = Input::get('discount');\n if(Input::hasFile('thumbnail')) {\n $image_id = time();\n Cloudder::upload(Input::file('thumbnail')->getRealPath(), $image_id);\n $obj->thumbnail = Cloudder::secureShow($image_id);\n }\n $obj->description = Input::get('description');\n $obj->save();\n return redirect('admin/product');\n }", "title": "" }, { "docid": "864750e43aa4e758ff3496700f1f1f1e", "score": "0.55164015", "text": "public function update(Request $request, Path $path)\n {\n //\n \n $data = $request->all();\n \n if($request->file('image')){\n $data['image'] = $request->file('image')->store('assets/path', 'public');\n }\n\n $path->update($data);\n \n return redirect()->route('paths.index');\n }", "title": "" }, { "docid": "7fd319ddde01606213623cf2e0b3cd4d", "score": "0.55120105", "text": "public function putAction() \n\t\t{\n\t\t\t$this->logger->log($this->tableName.\" Put (UPDATE) Action Called: \", Zend_Log::DEBUG);\n\t\t\t$id = $this->_getParam('id');\n\t\t\t$idName = $this->idName;\n\t\t\t$where = $this->restTable->getAdapter()->quoteInto(\"$idName=?\",$id);\n\t\t\t$data = Zend_Json::decode($this->getRequest()->getRawBody() );\n\t\t\t$this->boolToString($data);\n\t\t\t$this->logger->log(\"Put Data: \".print_r($data,true), Zend_Log::DEBUG);\n\t\t\t$this->restTable->update($data, $where);\n\n\t\t\t$this->getResponse()->appendBody(Zend_Json::encode($data));\n\t\t\t$this->getResponse()->setHttpResponseCode(200);\n\t\t\treturn;\n\t\t}", "title": "" }, { "docid": "d0000a29e08a3caea99d0d7a508a62b5", "score": "0.55111337", "text": "public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n $product->year = $request->year;\n $product->term = $request->term;\n $product->category = $request->category;\n $product->description = $request->description;\n $product->amount = $request->amount;\n if($product->save())\n {\n return new ProductResource($product); \n }\n }", "title": "" }, { "docid": "b9649f8d6cb9c4ee8bb3abe05e064755", "score": "0.5510288", "text": "public function setResource(string $resource): void;", "title": "" }, { "docid": "e181d2272099f0db207ddf129f5df092", "score": "0.550741", "text": "public function update(StoreBlogPost $request, $id)\n {\n $validated = $request->validated();\n $article = Article::find($id);\n\n if(array_key_exists('image',$validated)){\n $path = $validated['image']->store('public');\n $filename = str_replace(\"public/\",\"\",$path);\n $contents = Storage::get('public/'.$filename);\n Storage::disk('s3')->put($filename, $contents, 'public');\n $article->image = Storage::disk('s3')->url($filename);\n}\n $article->article = $validated['article'];\n $article->title = $validated['title'];\n $article->writer = Auth::user()->name;\n $article->save();\n return redirect('/article/');\n }", "title": "" }, { "docid": "e7cb685cc382abd24083c8b13d97a179", "score": "0.5507017", "text": "public function put() : Resource {\n try{\n \n $this->method = 'PUT';\n return $this;\n\n } catch (\\Throwable $t){\n new ErrorTracer($t);\n }\n }", "title": "" }, { "docid": "0b37c1df43abb728d7b1dd5cd037ea17", "score": "0.55022466", "text": "public function update($id)\n\t{\n $modelname = $this->modelname;\n $resource = $modelname::find($id);\n if($resource)\n {\n $resource->update(Input::json()->all());\n return $resource;\n }\n\t}", "title": "" }, { "docid": "08757cc2c81b23ca63469f255efa2060", "score": "0.5502139", "text": "protected function update() {\n $this->client->sendRequest('POST', $this->name . ($this->key ? : (string) $this->id), $this->prepareRequestData());\n }", "title": "" }, { "docid": "73d0372fbd1136bccf7139013889818a", "score": "0.5499022", "text": "public function update(SliderimageRequest $request, $id)\n {\n if (! Gate::allows('full')) {\n return redirect( url('admin') )->with('failed', 'Sorry, You are not authorized');\n }\n $update = Sliderimage::getItem($id);\n if($update){\n $uploadFile = $this->articleService->uploadFile('image','uploads/sliders/');\n if($uploadFile != ''){\n $this->articleService->delFile($update->image);\n }\n $update->title = $request->title; \n $update->key = $request->key;\n $update->content = $request->content;\n $update->html = $request->html;\n $update->image = ($uploadFile == '') ? $update->image : $uploadFile;\n $update->save();\n return redirect()->route('sliderimages.index')->with('update_succeeded',config('admin.update_succeeded') );\n }\n }", "title": "" }, { "docid": "4d6dd204fb19a2d6fc40011791b9128d", "score": "0.54963744", "text": "public function update(Request $request, $id)\n {\n //\n $promotion = Promotion::findOrFail($id);\n\n if ($request->hasFile('photo')) {\n $photo = $request->photo;\n\n $path = 'images/promotion';\n $filename = $id . '.' . $photo->extension();\n $photo->storeAs($path, $filename);\n\n $promotion->image = 'storage/app/public/' . $path . '/' . $filename;\n }\n\n $input = $request->all();\n\n $validField = $promotion->fillable;\n\n foreach ($input as $key=>$data) {\n if (in_array($key, $validField)) {\n $promotion[$key] = $data;\n }\n }\n\n $promotion->save();\n\n return new PromotionResource($promotion);\n\n }", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "7c08d21dd4b1755fd5741490a1848a10", "score": "0.5493504", "text": "public function update(Request $request, $id)\n {\n $store = Store::find($id);\n $store->name = $request->name;\n $store->phone = $request->phone;\n $store->email = $request->email;\n $store->address = $request->address;\n $store->description = $request->description;\n $store->product_id = $request->product_id;\n if($request->hasFile('image')){\n $imageFile = $request->file('image');\n $filename = microtime().'-'.$imageFile->getClientOriginalName();\n $imageFile->move(public_path('image\\store'), $filename);\n $store->image = \"image\\store\\\\\".$filename;\n }\n $store->save();\n\n return response()->json([\n 'message' => \"Update successfully store\",\n 'data' => $store\n ], 201);\n }", "title": "" }, { "docid": "f7ab1c5db894b7225c3f202ae4974bc5", "score": "0.54868174", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $requestData = $request->all();\n\n if ($request->hasFile('image_url')) {\n $old_image = $product->image_url;\n File::delete(public_path() . $old_image);\n\n $file = $request->file('image_url');\n $path = $this->fileUpload($file, 'product');\n $requestData['image_url'] = $path;\n }\n\n $product->update($requestData);\n //快閃資料\n return redirect('/admin/product')->with('update','更新成功!');\n }", "title": "" }, { "docid": "f6cc867169101865f07b0dad1605b01d", "score": "0.54849625", "text": "protected function update()\n {\n // TODO: unlink existing $image file\n $image_location = File::storeImage('image');\n\n $data = [\n ':title' => request('title'),\n ':slug' => request('slug'),\n ':has_flowers' => request('has_flowers'),\n ':introduction' => request('introduction'),\n ':description' => request('description'),\n ':colour' => request('colour'),\n ':growth_location' => request('growth_location'),\n ':ripe_season' => request('ripe_season'),\n ':average_years' => request('average_years'),\n ':average_height' => request('average_height'),\n ':average_width' => request('average_width'),\n ':user_id' => $_SESSION['user']['id']\n ];\n\n if (file_error_ok('image')) {\n $data[':image'] = $image_location;\n }\n\n try {\n Vegetable::update((int) request('vegetable_id'), $data);\n } catch (Exception $exception) {\n dd('Exception message:' . $exception->getMessage());\n }\n\n redirect('/admin/vegetables');\n }", "title": "" }, { "docid": "fc5db9e752584d0ec2d27578be79f65f", "score": "0.5470857", "text": "public function update($entity)\n {\n\n }", "title": "" }, { "docid": "cb574ee109ef0c4933aff2189613ba88", "score": "0.5467008", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (!$product) return new Response([\n 'result' => 'fail',\n 'message' => 'product not found'\n ]);\n\n $data = Input::all();\n\n foreach ($data as $key => $value) {\n if ($key === 'price') {\n $product->$key = $value*100;\n } else {\n $product->$key = $value;\n }\n }\n $product->save();\n return new Response(new ProductResource($product));\n }", "title": "" }, { "docid": "2f39a69c894818b4cdcdf93157a2f3e2", "score": "0.54660195", "text": "public static function putForResource($resource, $key, $value)\n {\n if (self::notEnoughResourceInfo($resource, $key)) {\n return;\n }\n self::$resource_registry[self::getResourceKey($resource)][$key] = $value;\n }", "title": "" }, { "docid": "e69ca8d6b4021523c67416bb5a8e3871", "score": "0.54627603", "text": "public function update($newpaht){}", "title": "" }, { "docid": "e328097d6411f857ba6a7cc2aad5a70a", "score": "0.54620916", "text": "public function update(ResourceCreator $listener, $resourceId, array $inputs);", "title": "" }, { "docid": "62614676e3e3e48351f4169c6b96fbbe", "score": "0.5461824", "text": "public function update(Request $request, $id)\n {\n //\n $datosproducto=request()->except('_token','_method');\n\n if($request->hasFile('Foto')){\n\n $producto=Productos::findOrFail($id);\n\n Storage::delete('public/'.$producto->Foto);\n\n $datosproducto['Foto']=$request->file('Foto')->store('uploads','public');\n }\n\n productos::where('id','=',$id)->update($datosproducto);\n\n //return response()->json($datosUsuario);\n\n $producto=productos::findOrFail($id);\n //return view('usuarios.edit', compact('usuario'));\n\n return redirect('productos')->with('Mensaje', 'Producto modificado con exito');\n }", "title": "" }, { "docid": "13060cd318eed312852c00ed17885787", "score": "0.5460793", "text": "public function update($object)\n {\n }", "title": "" } ]
c0eeb88f83169f4258efe1f9b5173089
Create a notification instance.
[ { "docid": "d47a06f44e76ecf66b25307332915f39", "score": "0.0", "text": "public function __construct($token,$name)\n {\n $this->token = $token;\n $this->name = $name;\n }", "title": "" } ]
[ { "docid": "8e6a15d94aa3afeb36355236224b7be0", "score": "0.8324985", "text": "public static function create($notification){\n }", "title": "" }, { "docid": "a88f31f8437608d94404c4f042d46ced", "score": "0.7229218", "text": "public static function createNotification($type, $eventid){\n\t\t$notification = new Notification; \n\t\t$notification->type = $type;\n\t\t$notification->eventid = $eventid;\n\t\t$notification->time = date('Y-m-d H:i:s');\n\t\t$notification->save();\n\t\treturn $notification;\n\t}", "title": "" }, { "docid": "2d2e6dc7e969eb7a4cfb462e78fc6816", "score": "0.71425056", "text": "public function maybe_create_notification() {\n\t\tif ( ! $this->should_show_notification() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! $this->notification_center->get_notification_by_id( self::NOTIFICATION_ID ) ) {\n\t\t\t$notification = $this->notification();\n\t\t\t$this->notification_helper->restore_notification( $notification );\n\t\t\t$this->notification_center->add_notification( $notification );\n\t\t}\n\t}", "title": "" }, { "docid": "f4681bfc4dc44effc943c1ef9c1fcb58", "score": "0.71255344", "text": "public function create($payload)\n {\n return $this->notification->create($payload);\n }", "title": "" }, { "docid": "5fab69fddac2c42f6c97236dfdd22fe0", "score": "0.7102389", "text": "public static function create( array $info ) {\n\t\t$obj = new Notification();\n\t\tstatic $validFields = [ 'event', 'user' ];\n\n\t\tforeach ( $validFields as $field ) {\n\t\t\tif ( isset( $info[$field] ) ) {\n\t\t\t\t$obj->$field = $info[$field];\n\t\t\t} else {\n\t\t\t\tthrow new InvalidArgumentException( \"Field $field is required\" );\n\t\t\t}\n\t\t}\n\n\t\tif ( !$obj->user instanceof User ) {\n\t\t\tthrow new InvalidArgumentException( 'Invalid user parameter, expected: User object' );\n\t\t}\n\n\t\tif ( !$obj->event instanceof Event ) {\n\t\t\tthrow new InvalidArgumentException( 'Invalid event parameter, expected: Event object' );\n\t\t}\n\n\t\t// Notification timestamp should be the same as event timestamp\n\t\t$obj->timestamp = $obj->event->getTimestamp();\n\t\t// Safe fallback\n\t\tif ( !$obj->timestamp ) {\n\t\t\t$obj->timestamp = wfTimestampNow();\n\t\t}\n\n\t\t// @Todo - Database insert logic should not be inside the model\n\t\t$obj->insert();\n\n\t\treturn $obj;\n\t}", "title": "" }, { "docid": "cb5e9a8e85535b72fea7263dec811c96", "score": "0.706187", "text": "private function createNotification($id, $request)\n {\n $count = Notification::max('count');\n\n $notification = Notification::create([\n 'model_id' => $id,\n 'count' => intval($count) + 1,\n 'type' => $request->get('ntype'),\n 'subject' => $request->get('subject'),\n 'message' => $request->get('message'),\n 'sent_at' => Carbon::now(),\n ]);\n }", "title": "" }, { "docid": "75b27263ba4a34e64338a747c4715ada", "score": "0.6963519", "text": "public function __construct(Notification $notification)\n {\n $this->notification = $notification;\n }", "title": "" }, { "docid": "75b27263ba4a34e64338a747c4715ada", "score": "0.6963519", "text": "public function __construct(Notification $notification)\n {\n $this->notification = $notification;\n }", "title": "" }, { "docid": "75b27263ba4a34e64338a747c4715ada", "score": "0.6963519", "text": "public function __construct(Notification $notification)\n {\n $this->notification = $notification;\n }", "title": "" }, { "docid": "d40006c7e82ab91df180f12ebfea27e6", "score": "0.69169915", "text": "public function create()\n\t{\n\t\tlog::info('inside create method of user-notifications controller');\n\t}", "title": "" }, { "docid": "df062f8bab75ec753c3a78cf188fb6fb", "score": "0.68892896", "text": "public function created(Notification $notification)\n {\n $this->sendBroadcast($notification);\n }", "title": "" }, { "docid": "99f32becf0107a5f5cb65ff67a7722af", "score": "0.68675435", "text": "protected function createNotificationInstance($data)\n {\n if ($data === false) {\n return null;\n }\n\n /** @var Notification $model */\n $model = Instance::ensure($this->dataClass, Notification::class);\n\n if (!empty($data['id'])) {\n $model->setId($data['id']);\n }\n\n $model->setType($data['type']);\n $model->setData(is_string($data['data']) ? Json::decode($data['data']) : $data['data']);\n $model->setUserId($data['user_id']);\n $model->setTimestamp($data['created_at']);\n $model->setRead((bool)$data['is_read']);\n $model->setOwner($this->owner);\n\n return $model;\n }", "title": "" }, { "docid": "7475e7d2a81bc9bf22a71a424751ec8b", "score": "0.6736239", "text": "public function newNotification($event)\n {\n return new ExampleNotification($event);\n }", "title": "" }, { "docid": "323a6a2367dc5bb263193abbdd4ec616", "score": "0.67179275", "text": "public function create()\n {\n $this->authorize('create', Notification::class);\n\n return view('rb28dett_notifications::create');\n }", "title": "" }, { "docid": "2210d00a5541ca501754e0dc4f71f6d4", "score": "0.6621502", "text": "protected function emitNotificationCreated(Notification $notification) {}", "title": "" }, { "docid": "23fb7313c305627aed63fb4d68656945", "score": "0.6619344", "text": "private function createMessageObject(string $type, string $message): Notification\n {\n $msg = new Notification();\n\n $msg->setType($type);\n $msg->setMessage($message);\n\n $this->handler->add($msg);\n\n return $msg;\n }", "title": "" }, { "docid": "e48493dd4be4c311f214d7fc744e8e56", "score": "0.6564269", "text": "protected function create_notification_email_object()\n\t{\n\t\t$category = $this->category();\n\n\t\t$email = new Charcoal_Email;\n\t\t$email->to = $this->get_notified_email_address();\n\t\t$email->reply_to = $this->get_lead_email_address();\n\n\t\tif ( $category ) {\n\t\t\t$email->subject = $category->p('confirmation_email_subject')->text();\n\t\t\t$email->from = $category->p('confirmation_email_from')->text();\n\t\t\t$email->cc = $category->v('confirmation_email_cc');\n\t\t\t$email->bcc = $category->v('confirmation_email_bcc');\n\t\t}\n\n\t\treturn $email;\n\t}", "title": "" }, { "docid": "c8754ced9427e44713355157c918e881", "score": "0.6500411", "text": "public function actionCreate()\n {\n $model = new Notification();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->notification_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "3115ac6aafb52fab00c2976cef546491", "score": "0.64576834", "text": "public function create()\n {\n return view ('notifications.create');\n }", "title": "" }, { "docid": "265f02bc3acdf6ab93b3965c90a9c089", "score": "0.645414", "text": "public function notification();", "title": "" }, { "docid": "265f02bc3acdf6ab93b3965c90a9c089", "score": "0.645414", "text": "public function notification();", "title": "" }, { "docid": "13e1536b400b0954f4e18b0d84648b30", "score": "0.6446384", "text": "public function create() {\n return View::make('notifications.create');\n }", "title": "" }, { "docid": "57579c7f565341518761f2b70230667b", "score": "0.64226574", "text": "public function notification(Notification $notification, array $parameters = []);", "title": "" }, { "docid": "c48f79d129ce93e69e64cb1d44061970", "score": "0.6416769", "text": "function notify($user_id, $message)\n{\n return (new Notification([\n 'user_id' => $user_id,\n 'message' => $message\n ]))->save();\n}", "title": "" }, { "docid": "18bd44f520219ed9368abe0768c96c82", "score": "0.6415416", "text": "public function notificationsAction()\n {\n $callback = function ($msg) {\n //check the db before running anything\n if (!$this->isDbConnected('db')) {\n return ;\n }\n\n if ($this->di->has('dblocal')) {\n if (!$this->isDbConnected('dblocal')) {\n return ;\n }\n }\n\n //we get the data from our event trigger and unserialize\n $notification = unserialize($msg->body);\n\n //overwrite the user who is running this process\n if ($notification['from'] instanceof Users) {\n $this->di->setShared('userData', $notification['from']);\n }\n\n if (!$notification['to'] instanceof Users) {\n echo 'Attribute TO has to be a User' . PHP_EOL;\n return;\n }\n\n if (!class_exists($notification['notification'])) {\n echo 'Attribute notification has to be a Notificatoin' . PHP_EOL;\n return;\n }\n $notificationClass = $notification['notification'];\n\n if (!$notification['entity'] instanceof Model) {\n echo 'Attribute entity has to be a Model' . PHP_EOL;\n return;\n }\n\n $user = $notification['to'];\n\n //instance notification and pass the entity\n $notification = new $notification['notification']($notification['entity']);\n //disable the queue so we process it now\n $notification->disableQueue();\n\n //run notify for the specifiy user\n $user->notify($notification);\n\n $this->log->info(\n \"Notification ({$notificationClass}) sent to {$user->email} - Process ID \" . $msg->delivery_info['consumer_tag']\n );\n };\n\n Queue::process(QUEUE::NOTIFICATIONS, $callback);\n }", "title": "" }, { "docid": "d81f7e004c47569bc9ec66d97d8492a3", "score": "0.6330297", "text": "public function create()\n {\n return view('admin.notifications.create');\n }", "title": "" }, { "docid": "d81f7e004c47569bc9ec66d97d8492a3", "score": "0.6330297", "text": "public function create()\n {\n return view('admin.notifications.create');\n }", "title": "" }, { "docid": "f64e8bae52c9503caacd2a1cb2b40ce5", "score": "0.6314711", "text": "public static function createFromArray($fields) \n\t{\n\t\t$notification = new Notification();\n\t\tself::populate($notification,$fields);\n\t\treturn $notification;\n\t}", "title": "" }, { "docid": "c9d7be74630a65fb0c5d3915585859a1", "score": "0.62759674", "text": "public function __construct($new_postNotification)\n {\n //\n $this->postNotification = $new_postNotification;\n\n }", "title": "" }, { "docid": "178c6b1f78031508e153b3c7b1939333", "score": "0.62756383", "text": "public function actionCreate() {\n\t\t$model = new Notification();\n\t\t$model->created_by = Yii::$app->user->identity->id;\n\n\t\tif ($model->load(Yii::$app->request->post())) {\n\n\t\t\tif ($model->send_to != '') {\n\t\t\t\t$model->send_to = implode(',', $model['send_to']);\n\t\t\t}\n\t\t\t$model->sent_time = date('Y-m-d H:i:s');\n\t\t\t$model->save();\n\t\t\t/*if ($model->save()) {\n\t\t\t\t$send_to = explode(',', $model['send_to']);\n\t\t\t\tforeach ($send_to as $key => $value) {\n\t\t\t\t\tif ($value == 'all') {\n\t\t\t\t\t\t$userId = 'allUser';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$user = User::find()->where(['id' => $value])->one();\n\t\t\t\t\t\t$userId = $user['phone'];\n\t\t\t\t\t}\n\t\t\t\t\tYii::$app->Utility->pushNotification($userId, $model['notification_name'], $model['content']);\n\t\t\t\t}\n\t\t\t}*/\n\t\t\tYii::$app->getSession()->setFlash('successStatus', 'Data saved successfully!');\n\n\t\t\treturn $this->redirect(['view', 'id' => $model->id]);\n\t\t}\n\n\t\treturn $this->render('create', [\n\t\t\t'model' => $model,\n\t\t]);\n\t}", "title": "" }, { "docid": "558a66dcf922656812fa5e46bb1a962a", "score": "0.62699586", "text": "public function __construct($notification)\n {\n parent::__construct($notification);\n }", "title": "" }, { "docid": "3f018a8a4b9cffc07a653e9922d34b59", "score": "0.6238701", "text": "public function create()\n {\n return view('notifications.create');\n }", "title": "" }, { "docid": "4bc8aa4b7c5cc62de46b89c2c7966e4b", "score": "0.6208297", "text": "public static function fake()\n {\n static::swap($fake = new NotificationFake);\n\n return $fake;\n }", "title": "" }, { "docid": "2847cb8338ead21929832e517220713e", "score": "0.61928815", "text": "public function register_notifications();", "title": "" }, { "docid": "aa3fdf39b083f3e3bc812a8a5a89b5b3", "score": "0.614002", "text": "public function create($type, $data, $userId)\n {\n $data = [\n 'type' => $type,\n 'data' => Json::encode($data),\n 'user_id' => $userId,\n 'created_at' => time(),\n 'is_read' => 0\n ];\n\n $notification = $this->createNotificationInstance($data);\n $this->saveNotification($notification);\n return $notification;\n }", "title": "" }, { "docid": "065067beb1223f63c8f404b0aefd6b9c", "score": "0.613639", "text": "public function create()\n {\n return view('Admin.Notification_Management.notifications');\n }", "title": "" }, { "docid": "d13723f5319eb802a5ef5b4ed144e403", "score": "0.6128644", "text": "public function new_notification_is_created ($notification) {\n $user = $this->get_session_user();\n $eventdata = new \\core\\message\\message();\n $eventdata->courseid = 1;\n $eventdata->name = 'fake_notification';\n $eventdata->component = 'block_culactivity_stream';\n $eventdata->userfrom = $user;\n $eventdata->subject = $notification;\n $eventdata->fullmessage = $notification;\n $eventdata->fullmessageformat = FORMAT_PLAIN;\n $eventdata->fullmessagehtml = $notification;\n $eventdata->smallmessage = $notification;\n $eventdata->notification = 1;\n $eventdata->userto = $user;\n $messageid = message_send($eventdata);\n\n if (!$messageid) {\n throw new Exception(get_string('messageerror', 'block_culactivity_stream'));\n }\n }", "title": "" }, { "docid": "26c2b0a9b1c08fccd160624456d4e993", "score": "0.6103368", "text": "protected function createNotification($responseData)\n {\n $socketMock = $this->getMock(\n 'RequestStream\\\\Stream\\\\Socket\\\\SocketClient',\n array('create', 'write', 'read', 'selectRead', 'setBlocking', 'is', 'close')\n );\n\n $socketMock->expects($this->once())\n ->method('selectRead')\n ->will($this->returnValue(true));\n\n $socketMock->expects($this->once())\n ->method('read')\n ->with(6)\n ->will($this->returnValue($responseData));\n\n $notification = new Notification;\n $payload = new PayloadFactory;\n $connection = new Connection(__FILE__);\n\n $notification->setConnection($connection);\n $notification->setPayloadFactory($payload);\n\n $ref = new \\ReflectionProperty($connection, 'socketConnection');\n $ref->setAccessible(true);\n $ref->setValue($connection, $socketMock);\n\n return $notification;\n }", "title": "" }, { "docid": "3c91c3fa29d138a9830322f4a47068e5", "score": "0.61028856", "text": "public function Create()\n {\n parent::Create();\n\n //Properties\n $this->RegisterPropertyInteger('InputTriggerID', 0);\n $this->RegisterPropertyString('NotificationLevels', '[]');\n $this->RegisterPropertyBoolean('TriggerOnChangeOnly', false);\n $this->RegisterPropertyBoolean('AdvancedResponse', false);\n $this->RegisterPropertyString('AdvancedResponseActions', '[]');\n\n //Profiles\n if (!IPS_VariableProfileExists('BN.Actions')) {\n IPS_CreateVariableProfile('BN.Actions', 1);\n IPS_SetVariableProfileIcon('BN.Actions', 'Information');\n IPS_SetVariableProfileValues('BN.Actions', 0, 0, 0);\n }\n\n //Variables\n $this->RegisterVariableInteger('NotificationLevel', $this->Translate('Notification Level'), '');\n $this->RegisterVariableBoolean('Active', $this->Translate('Notifications active'), '~Switch');\n $this->RegisterVariableInteger('ResponseAction', $this->Translate('Response Action'), 'BN.Actions');\n\n //Actions\n $this->EnableAction('ResponseAction');\n\n //Timer\n $this->RegisterTimer('IncreaseTimer', 0, 'BN_IncreaseLevel($_IPS[\\'TARGET\\']);');\n\n $this->EnableAction('Active');\n }", "title": "" }, { "docid": "f41ceb5a0f96568958bba9844c6852d2", "score": "0.6096794", "text": "protected function notification() {\n\t\t$reason = $this->indexing_helper->get_reason();\n\n\t\t$presenter = $this->get_presenter( $reason );\n\n\t\treturn new Yoast_Notification(\n\t\t\t$presenter,\n\t\t\t[\n\t\t\t\t'type' => Yoast_Notification::WARNING,\n\t\t\t\t'id' => self::NOTIFICATION_ID,\n\t\t\t\t'capabilities' => 'wpseo_manage_options',\n\t\t\t\t'priority' => 0.8,\n\t\t\t]\n\t\t);\n\t}", "title": "" }, { "docid": "8a7d3e52d1e7cb34119b190ada130c0d", "score": "0.60823244", "text": "public function __construct() {\r\n $this->setEntity('mst_notification');\r\n }", "title": "" }, { "docid": "6a757c25df74e6bc8fa3246707299494", "score": "0.6081712", "text": "public function push($notification, $notifiable);", "title": "" }, { "docid": "8ea255a1f9453dba7afe8772b7b29e36", "score": "0.6077044", "text": "function custom_node_create_notification($uid, $title, $message) {\n $creator_uid = 1; // Admin user.\n $node = custom_new_node_create($creator_uid, 'notification', $title, 1);\n \n $node->set('field_user', $uid);\n $node->set('body', $message);\n $node->save();\n \n if (!$node->id()) {\n \\Drupal::logger('custom')->error(t('Notification FAILED to store.'));\n }\n \n return $node;\n}", "title": "" }, { "docid": "d6c95d9a5779ef5ad00bcec396b96977", "score": "0.60539836", "text": "public function __construct(protected NotificationRepository $notificationRepository)\n {\n }", "title": "" }, { "docid": "478a27c54474ba776d9ea2fd4c0599ec", "score": "0.60519385", "text": "public function __construct(NotificationTrigger $notification_trigger)\n {\n $this->notification_trigger = $notification_trigger;\n }", "title": "" }, { "docid": "ea94fb6d4948de778274c60ee4d7cb1c", "score": "0.6041037", "text": "function wd_notification() {\n return WeDevs_Notification::init();\n}", "title": "" }, { "docid": "ee1cd28f99a07dbc2412f00de21b139e", "score": "0.6031088", "text": "public function create()\n {\n $notification = DB::table('notifications')\n ->get(); \n return view ('admin/assignBadgeToUser')->with('notification', $notification);\n }", "title": "" }, { "docid": "7d6f2107da06898f573a575e6311ec9e", "score": "0.60263056", "text": "#[Route('/notification/create', name: 'create_notification')]\n public function create(NotifierInterface $notifier, EntityManagerInterface $entityManager, Request $request): Response\n {\n $notification = (new Notification('Notification from Duck Tales'))\n ->content('You got some contributions to review. Please look at the Quack #' . $request->get('warned_id'))\n ->importance(Notification::IMPORTANCE_HIGH);\n\n\n $admins = [];\n $admins = array_map(fn ($duck) => $duck->hasRoleAdmin() ? $duck->getEmail() : NULL, $entityManager->getRepository(Duck::class)->findAll());\n\n // foreach ($admins as $admin) {\n // $recipient = new Recipient(\n // $admin\n // );\n // $notifier->send($notification, $recipient);\n // }\n $recipient = new Recipient(\n '[email protected]'\n );\n $notifier->send($notification, $recipient);\n\n\n // Send the notification to the recipient\n\n\n return $this->redirectToRoute('quacks');\n }", "title": "" }, { "docid": "56267a6e96a9f76d9ec147a6c9ae919e", "score": "0.60194176", "text": "public function store(Request $request)\n {\n return Notification::create($request->input());\n }", "title": "" }, { "docid": "334e02cccaeaea722b60daebb28ad457", "score": "0.60136503", "text": "public function getNotification(MessageInstanceInterface $message)\n {\n return new DefaultNotification($message, $this->formatterRegistry->get($message->getType()));\n }", "title": "" }, { "docid": "6ab2a1e1230836af5b78579e2d177669", "score": "0.6001565", "text": "public function create()\n\t{\n\t\t$searchTerm = Input::get('searchTerm');\n\n $createNotification = new CreateNotificationCommand($searchTerm);\n\n $result = $createNotification->execute();\n\n $result = $result ? \"You're Signed Up!\" : \"You're Already Signed Up for This Term!\";\n\n return $result;\n\t}", "title": "" }, { "docid": "3227c3734f2da93f715fa293e73d1e1a", "score": "0.599639", "text": "public function setResource($notification)\n {\n return new NotificationResource($notification);\n }", "title": "" }, { "docid": "8628e3f759c3d80f4db5dabcaef9ff6a", "score": "0.5986592", "text": "public static function createFromDiscriminatorValue(ParseNode $parseNode): TrainingReminderNotification {\n return new TrainingReminderNotification();\n }", "title": "" }, { "docid": "460a7cf5d160baa52a666062dd8b0a79", "score": "0.58972836", "text": "public function createNotification($type, $text, $destination)\r\n {\r\n \t$data = $this->call(array(\"notification\"=>array(\"type\"=>$type, \"text\"=>$text, \"destination\"=>$destination)), \"POST\", \"notifications.json\");\r\n \treturn $data;\r\n }", "title": "" }, { "docid": "5c4c1cbe7994bbac09ee1102e4580ccc", "score": "0.5896395", "text": "public function create()\n {\n //\n $this->message->sendMessage();\n }", "title": "" }, { "docid": "d51ae40a066e9075c3bd35af2aa6d440", "score": "0.5885411", "text": "public static function create()\n {\n list(\n $message,\n $callbackService,\n $callbackMethod,\n $callbackParams\n ) = array_pad( func_get_args(), 4, null);\n\n static::addToEventQueue( array(\n 'type' => \"alert\",\n 'properties' => array(\n 'message' => $message\n ),\n 'service' => $callbackService,\n 'method' => $callbackMethod,\n 'params' => $callbackParams ?? []\n ));\n }", "title": "" }, { "docid": "8f31a7e39afac3db5bddc26740103280", "score": "0.5885175", "text": "public function create()\n {\n return view('Notifications/create');\n }", "title": "" }, { "docid": "a155376551c29560c1c712ec27c1cf50", "score": "0.5863087", "text": "public static function notify($member) {\n $notification = Model_Notification::factory('notification');\n\n if(is_numeric($member)) {\n $notification->to = $member;\n } else if(is_object($member) && $member instanceof Model_Member) {\n $notification->to = $member->id;\n } else if(is_object($member) && $member instanceof Model_Blab) {\n\t\t\t$notification->to = $member->getCommentees();\n\t\t}\n\n\t\t$notification->from = Session::instance()->get('user_id');\n \n $notification->unread = 1;\n\n\t\t$notification->created = date('Y-m-d h:i:s');\n\n return $notification;\n }", "title": "" }, { "docid": "865054b8de3f76e90d76f2500a9df26f", "score": "0.58577245", "text": "public function createInstance()\n {\n $mock = $this->mock(static::TEST_SUBJECT_CLASSNAME)\n ->getMessage();\n\n return $mock->new();\n }", "title": "" }, { "docid": "d982a11c612c2fc1351a50ba7e8d328f", "score": "0.5857409", "text": "public function notificationsOnCreate(NotificationBuilder $builder)\n {\n $notification = new Notification();\n $notification\n ->setTitle('Nouvelle Reclamation')\n ->setDescription(' A été crée')\n ->setRoute('#')\n // ->setParameters(array('id' => $this->userToClaim))\n ;\n //$notification->setIcon($this->getUserr()->getUsername());\n $notification->setUser1($this->getUser()->getUsername());\n $notification->setUser2($this->getUserToClaim());\n $builder->addNotification($notification);\n\n return $builder;\n }", "title": "" }, { "docid": "de57e6ccfd750339815194b4dca07f43", "score": "0.5852668", "text": "public function __construct($title, $sender, $notification)\n {\n $this->title = $title;\n $this->sender = $sender;\n $this->notification = $notification;\n }", "title": "" }, { "docid": "c743aa73dd9bc5c2f500a4d3cea40ddb", "score": "0.5852548", "text": "public function __construct($notification_id)\n {\n $this->notification_id = $notification_id;\n }", "title": "" }, { "docid": "de56a00be7de0fa1b61f0703e8da4b48", "score": "0.5850608", "text": "public function sendPostCreateNewNotifications(ApiTester $I)\n {\n $data = [\n 'entityClass' => 'user',\n 'entityId' => 1,\n 'category' => 'info',\n 'message' => fake::create()->text(20),\n 'userId' => 1\n ];\n $I->saveNotifications([\n $data['entityClass'], ' ',\n $data['entityId'], ' ',\n $data['category'], ' ',\n $data['message'], ' ',\n $data['userId'], ' '\n ], 'notifications.txt');\n $I->sendPOST($this->route, $data);\n $this->userID = $I->grabDataFromResponseByJsonPath('$.id');\n $I->seeResponseCodeIs(201);\n }", "title": "" }, { "docid": "92b6a169b0f2f85426d7ffa3ba35419e", "score": "0.5848882", "text": "public function createDefaultNotificationRule();", "title": "" }, { "docid": "ad1f46c9724403cf5a2bff6b8402c7d3", "score": "0.5836173", "text": "public static function createFromArray($fields) \n\t{\n\t\t$notificationType = new NotificationType();\n\t\tself::populate($notificationType,$fields);\n\t\treturn $notificationType;\n\t}", "title": "" }, { "docid": "0f90f667e813d5e086ebe265aca5100f", "score": "0.5799151", "text": "public function addNotification($id, $message, $type = 'status');", "title": "" }, { "docid": "fb0b6ba8db3d17cf4d08c835bb347eec", "score": "0.57684124", "text": "public function create()\n {\n\n $email_id = date('Y-m-d_H-i-s') . '.' . $this->template;\n $email_data = [\n 'title' => $this->template, \n 'data' => serialize($this->data), \n 'email' => $this->to,\n 'id' => $email_id,\n 'date' => date('Y-m-d H:i:s')\n ];\n\n Storage::putYAML('statamify/emails/' . $email_id, $email_data);\n\n }", "title": "" }, { "docid": "325932b513c36bb837af640f956bbbb0", "score": "0.57670254", "text": "public function __construct($data)\n {\n \n\n $usuario_reserva = User::find($data->id_user);\n $coordinador = User::find($usuario_reserva->departamento->coordinador->id);\n\n $mensaje = new \\stdClass();\n $mensaje->user = $usuario_reserva->name.' '.$usuario_reserva->last_name;\n $mensaje->userid = $usuario_reserva->id;\n $mensaje->recipient = $coordinador->name.' '.$coordinador->last_name;\n $mensaje->recipientid = $coordinador->id;\n $mensaje->reservaid = $data->id;\n $mensaje->datereserva = date('Y-m-d H:i:s');\n $mensaje->text = 'ah generado una reserva';\n $notificacion = new Notificaciontest($mensaje);\n \n $coordinador->notify($notificacion);\n $this->notif = $mensaje;\n }", "title": "" }, { "docid": "f08b4eeed180abcce07804c845ce48c6", "score": "0.5763573", "text": "public function create() {\n\t\t\t//\n\t\t}", "title": "" }, { "docid": "89d925edef45d461446d7de08413bdcc", "score": "0.5758661", "text": "public function create() {}", "title": "" }, { "docid": "4202150514cb03c9531072d226c1646a", "score": "0.5755565", "text": "public function testPushNotification(){\n $noti=new Notification();\n $data=' {\n\t \"to\": \"/topics/important\",\n\t \"notification\": {\n\t \t\"title\": \"Hola Mundo\",\n\t\t \"body\": \"Mensaje de prueba\",\n\t\t \"icon\":\"http://www.alabamapublica.com/wp-content/uploads/sites/43/2017/06/cntx170619019-150x150.jpg\"\n\t\t \"click_action\": \"https://critica-xarkamx.c9users.io\"\n\t }\n }';\n $this->assertArrayHasKey(\"message_id\",$noti->sendPushNotification($data));\n }", "title": "" }, { "docid": "1351d1a017631af03b7c451e76141c55", "score": "0.5753127", "text": "public function create()\n {}", "title": "" }, { "docid": "b88765d50bc24eab9cfa9b39c3141280", "score": "0.5738089", "text": "static function get_notificationById($id) {\r\n global $db;\r\n \r\n $id = $db->escape_string($id);\r\n \r\n $query = \"SELECT * FROM `notification` WHERE Notification_id = ?\";\r\n \r\n $statement = $db->prepare($query);\r\n\t\t\r\n\t\tif ($statement == FALSE) {\r\n\t\t\tdisplay_db_error($db->error);\r\n\t\t}\r\n \r\n $statement->bind_param(\"i\", $id);\r\n \r\n $statement->execute();\r\n \r\n $statement->bind_result($id, $message, $objectReference, $objectId, $seen, $timeStamp);\r\n \r\n $statement->fetch();\r\n \r\n $notification = new notification($id, $message, $objectReference, $objectId, $seen, $timeStamp);\r\n \r\n $statement->close();\r\n \r\n return $notification;\r\n }", "title": "" }, { "docid": "662bf9f3c92dea744d3f61b82cf2229b", "score": "0.57371044", "text": "protected function getNotification_Type_PostService()\n {\n $instance = new \\phpbb\\notification\\type\\post(${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'}, ${($_ = isset($this->services['auth']) ? $this->services['auth'] : ($this->services['auth'] = new \\phpbb\\auth\\auth())) && false ?: '_'}, './../', 'php', 'phpbb_user_notifications');\n\n $instance->set_user_loader(${($_ = isset($this->services['user_loader']) ? $this->services['user_loader'] : $this->getUserLoaderService()) && false ?: '_'});\n $instance->set_config(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'});\n\n return $instance;\n }", "title": "" }, { "docid": "95e1bd2c7e7d861133508b83d268148f", "score": "0.5729894", "text": "public function __construct(AppNotification $notification, User $user)\n {\n $this->notification = $notification;\n $this->user = $user;\n }", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.5716555", "text": "public function create(){}", "title": "" }, { "docid": "9283cc101c431189e08f831a4135e5f8", "score": "0.5712338", "text": "public static function invalidNotificationType()\n {\n return new static('Notification Type provided is invalid.');\n }", "title": "" }, { "docid": "3dd871d371cf61baaa102b9e7e662665", "score": "0.5700766", "text": "function notification(string $command, array $args = []): Bucket\n {\n return (new Bucket())->notification((new CommandFactory())->$command($args));\n }", "title": "" }, { "docid": "46730e4215238255945dc73f21897efb", "score": "0.56955504", "text": "public function __construct($notifiable)\n {\n $this->notifiable = $notifiable;\n }", "title": "" }, { "docid": "45f4a55aaba8b5fa61026c5b32b3f1e2", "score": "0.5694583", "text": "public static function createInstance()\n {\n return new MailMessage('[email protected]');\n }", "title": "" }, { "docid": "779c8e897c4b8463bb0027e0ccb89725", "score": "0.56856924", "text": "public static function create() {}", "title": "" }, { "docid": "779c8e897c4b8463bb0027e0ccb89725", "score": "0.56856924", "text": "public static function create() {}", "title": "" }, { "docid": "779c8e897c4b8463bb0027e0ccb89725", "score": "0.56856924", "text": "public static function create() {}", "title": "" }, { "docid": "acb3205da6e1716c4abb7736925be779", "score": "0.56770414", "text": "public function create()\n {\n //\n return view('admin/notifacation/create');\n }", "title": "" }, { "docid": "2798585afe919d8f1f3725d0cb18c6f7", "score": "0.56706774", "text": "protected function initNotifications()\n {\n $this->di->setShared('notifications', function () {\n return new NotificationsChecker();\n });\n }", "title": "" }, { "docid": "a253ce4f098c4807f53a36c649fd5aba", "score": "0.5667875", "text": "public function insert(int $toUserID, string $subject, string $message, int $typeId, array $data = [])\n {\n return Notification::create([\n 'user_id' => $toUserID,\n 'subject' => $subject,\n 'message' => $message,\n 'notification_type_id' => $typeId,\n 'data' => $data,\n ]);\n }", "title": "" }, { "docid": "4618407553be42fd1ba541d7fec4dd00", "score": "0.56599534", "text": "public function create()\n {\n $actions = Action::pluck('id','id')->all();\n \n return view('usernotifications.create', compact('actions'));\n }", "title": "" }, { "docid": "19e483741b98a45a04aac171198cad85", "score": "0.5656985", "text": "public function create( $arrayNotifikasi )\n {\n // return $arrayNotifikasi;\n $notif = new Notifikasi;\n $notif->id_pembuat = $arrayNotifikasi[0];\n $notif->id_penerima = $arrayNotifikasi[1];\n $notif->jenis = $arrayNotifikasi[2];\n $notif->msg = $arrayNotifikasi[3];\n $notif->icon = $arrayNotifikasi[4];\n $notif->bg = $arrayNotifikasi[5];\n $notif->tgl_dibuat = $arrayNotifikasi[6];\n $notif->link = $arrayNotifikasi [7];\n $notif->save();\n }", "title": "" }, { "docid": "5e9ef7298d389b3badc03401a374c3d3", "score": "0.56569606", "text": "public static function create($type, $serverUrl, $isNotification = false)\n\t{\n\t\treturn new self($serverUrl, $isNotification);\n\t}", "title": "" }, { "docid": "5e9ef7298d389b3badc03401a374c3d3", "score": "0.56569606", "text": "public static function create($type, $serverUrl, $isNotification = false)\n\t{\n\t\treturn new self($serverUrl, $isNotification);\n\t}", "title": "" }, { "docid": "7d75693a07211975edaa9fdccb48cf50", "score": "0.56544983", "text": "public function created(Note $note): void\n {\n if (auth()->user()->client_id) {\n $mail = $this->mailQueue->create($note->notable, [\n 'to' => [$note->notable->user->email],\n 'cc' => [config('bt.mailDefaultCc')],\n 'bcc' => [config('bt.mailDefaultBcc')],\n 'subject' => trans('bt.note_notification'),\n 'body' => $note->formatted_note,\n 'attach_pdf' => config('bt.attachPdf'),\n ]);\n\n $this->mailQueue->send($mail->id);\n }\n }", "title": "" }, { "docid": "fe64c1fbf3e57e5c826b53dd9e2daec7", "score": "0.56541944", "text": "public function __construct()\n {\n //Database notification\n $this->title = '';\n $this->subtitle = '';\n $this->icon = '';\n $this->type = '';\n $this->actions = [\n 'link' => '#'\n ];\n }", "title": "" }, { "docid": "7377758c959c218dc50e7c226e7ec123", "score": "0.5649902", "text": "public function create() {\r\n }", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.564938", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.564938", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.564938", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.564938", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.564938", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.564938", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.564938", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.564938", "text": "public function create() {\n\t\t//\n\t}", "title": "" } ]
e12a504f9c5bdb91a8e763f412f2a689
Send a query to the database.
[ { "docid": "35530f5d55c178c547b9f8e7471a63e2", "score": "0.0", "text": "public function query($query, $useBuffer = true) {\n\t\tif ( empty($query) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( !isset($this->conn) ) { $this->connect(); }\n\t\t$res = mysqli_query( $this->conn, $query);\n\t\tif ( !$res ) {\n\t\t\t$errno = ((is_object($GLOBALS[\"___mysqli_ston\"])) ? mysqli_errno($GLOBALS[\"___mysqli_ston\"]) : (($___mysqli_res = mysqli_connect_errno()) ? $___mysqli_res : false));\n\t\t\t$error = ((is_object($GLOBALS[\"___mysqli_ston\"])) ? mysqli_error($GLOBALS[\"___mysqli_ston\"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false));\n\t\t\t$this->log(\"Error $errno: $error\\nQuery: $query\\n\".\n\t\t\t\t\"Backtrace\\n\". print_r(debug_backtrace(), true), true);\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $res;\n\t}", "title": "" } ]
[ { "docid": "3526011a7408aaf8777d6961031796eb", "score": "0.7117395", "text": "private function query() {\n $this->conn->query($this->sql);\n }", "title": "" }, { "docid": "bd7ac2b4c172b3027f39ec8bb10fa023", "score": "0.705581", "text": "function query($query) {\n global $verbose, $db;\n $query = trim($query);\n if (!empty($query)) {\n if ($verbose) echo \"=== sending query: \\n\" . $query;\n try {\n $db->sendQuery($query);\n } catch (Exception $e) {\n echo $e->getMessage();\n exit;\n }\n if ($verbose) echo \"\\n\\n\";\n }\n}", "title": "" }, { "docid": "4b0a31f3ab37e4808f23bb483cfd0173", "score": "0.7030617", "text": "function executeQuery() {}", "title": "" }, { "docid": "1b59846b83c111015ffd5388d0c7275b", "score": "0.6866956", "text": "protected function execute_single_query() {\n $this->open_connection();\n $this->conn->query($this->query);\n $this->close_connection();\n }", "title": "" }, { "docid": "e3d1215ec9ec45c099662faf4a34be0c", "score": "0.68267244", "text": "public function query(){\r\n\t\t\techo \"Running query...\";\r\n\t\t}", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.6751452", "text": "public function query();", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.6751452", "text": "public function query();", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.6751452", "text": "public function query();", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.6751452", "text": "public function query();", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.6751452", "text": "public function query();", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.6751452", "text": "public function query();", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.6751452", "text": "public function query();", "title": "" }, { "docid": "ab7c8c10b06652e032b32a99375221a7", "score": "0.67447174", "text": "function sendInsertQuery()\r\n\t{\r\n\t\t$time = time()+60;\r\n\t\t\r\n\t\t$this->msg('Sending INSERT query ...', MSG_INFO, false);\r\n\t\t\r\n\t\t# End the first row\r\n\t\t$sql = \"http://google.com/', '', '', '', '', '0'), \";\r\n\t\t\r\n\t\t# For each query, a new row\r\n\t\tforeach($this->queries as $key => $query)\r\n\t\t{\r\n\t\t\t$sql .= \"('', '', '0.0.0.0', 'attack', 'Mozilla', 'Windows', CONCAT('<!--:$key:', ($query), ':-->'), '1', '1', '\" .$this->year . \"', '1', '$time'), \";\r\n\t\t}\r\n\t\t\r\n\t\t# End this with the beginning of a row, to have a valid SQL query\r\n\t\t$sql .= \"('', '', '', '', '', '', '\";\r\n\t\t\r\n\t\t# Let's send it\r\n\t\t$this->wwwinit(0);\r\n\t\t$this->www->addheader('Referer', $sql);\r\n\t\t$this->www->get($this->url);\r\n\t\t\r\n\t\t$this->msg('Sent INSERT query ', MSG_OKAY);\r\n\t}", "title": "" }, { "docid": "a8e807cf0efebbe19021a7d0e22ca217", "score": "0.67444676", "text": "public function executeQuery();", "title": "" }, { "docid": "04e863b0c62eb6cab1c81d40dac76dcb", "score": "0.6643545", "text": "public function send_query($sql){\r\n \treturn pg_query($this->conn, $sql);\r\n }", "title": "" }, { "docid": "b04c34590961ef5334e0723224d17925", "score": "0.6633768", "text": "public function query($query) {\n\t\t$this->qHandler = $this->db->prepare($query);\n\t}", "title": "" }, { "docid": "4d793ffe59573a0b736e0f1a943342c0", "score": "0.65198576", "text": "function executeQuery($query);", "title": "" }, { "docid": "cda4f5b77c2157a880878810aa282d14", "score": "0.6475468", "text": "function executeQuery($query) {}", "title": "" }, { "docid": "c35782d440bffd863cd193c3c483def1", "score": "0.64711875", "text": "function db_query($q)\n {\n\t\t$this->db_connect();\n $this->statement_handle = null;\n \n\t\t$this->sql = $this->db_merge($q);\n\n\t\t// Do the query\n\t\t$start = microtime(true);\n\t\tpg_send_query($this->db, $this->sql);\n\t\t$this->statement_handle = pg_get_result($this->db);\n\t\t$this->duration = microtime(true) - $start;\n\n\t\tar_logger('SQL: [' . number_format($this->duration,6) . '] ' . $this->sql, $this->db_connection);\n\t\t\n\t\t$GLOBALS['db_time'] += $this->duration;\n\t\t\n\t\tif ($error = pg_result_error($this->statement_handle)) {\n\t\t\t$errorstr = 'SQL ERROR: ' . $error . \"\\nSTATEMENT: \" . $this->sql;\n\t\t\t//debug($errorstr);\n\t\t\tar_logger($errorstr, $this->db_connection);\n\t\t\tthrow_error($errorstr);\n\t\t}\n\t\t$this->sql = array();\n }", "title": "" }, { "docid": "c11ab5d5a24c687f9a51d23c4d1f28ce", "score": "0.64280075", "text": "protected function set_query()\n {\n $this->db_open();\n $this->conexion->query($this->query);\n $this->db_close();\n }", "title": "" }, { "docid": "b3f19cc4303bf8d8b2c93b8670545a52", "score": "0.64260536", "text": "function sendQuery($query, $action) {\n\t\tfwrite($this->_mbSocket, $action);\n\t\tfwrite($this->_mbSocket, \"Host: mm.musicbrainz.org\\r\\n\");\n\t\tfwrite($this->_mbSocket, \"Accept: */*\\r\\n\");\n\t\tfwrite($this->_mbSocket, \"User-Agent: phpMbQuery\\r\\n\");\n\t\tfwrite($this->_mbSocket, \"Content-type: text/plain\\r\\n\");\n\t\tfwrite($this->_mbSocket, \"Content-length: \".strlen($query).\"\\r\\n\\r\\n\");\n\n\t\tfwrite($this->_mbSocket, $query.\"\\r\\n\\r\\n\");\n\t}", "title": "" }, { "docid": "97b38e1a3388f5c31931bc3a32e46ae5", "score": "0.64244103", "text": "function query($query)\n {\n $this->debug($query);\n $this->result = pg_query($this->con, $query);\n if($this->result === false){\n throw new Exception( \"Error en el query: \" . pg_last_error($this->con));\n }\n }", "title": "" }, { "docid": "98e26971f69f0af1c31e6b0c793f4115", "score": "0.6381369", "text": "public function executeQuery() {\n if (!$this->resultSet = @mysqli_query($this->conn, $this->sql_query)) {\n $this->logDBError();\n }\n }", "title": "" }, { "docid": "2027d2ddca0657f2ca9149ca38afa3cb", "score": "0.6379887", "text": "public function execute($query);", "title": "" }, { "docid": "2027d2ddca0657f2ca9149ca38afa3cb", "score": "0.6379887", "text": "public function execute($query);", "title": "" }, { "docid": "2027d2ddca0657f2ca9149ca38afa3cb", "score": "0.6379887", "text": "public function execute($query);", "title": "" }, { "docid": "980dd0ca525c5943350f3eeb108b11f9", "score": "0.63676286", "text": "public function query( $query ) {\n\t\t$this->dbclass->query( $query );\n\t}", "title": "" }, { "docid": "712a6b65b6fdf853649190e3502ae86a", "score": "0.63439435", "text": "public function query($query)\n {\n // reset class properties\n $this->reset();\n \n // set database property\n $this->query = $query;\n \n // send a query and set query_link resource on success\n return $this->result = $this->execute($query);\n }", "title": "" }, { "docid": "adee7e9516e529a8b913f92854d076d9", "score": "0.6342209", "text": "function query() {}", "title": "" }, { "docid": "adee7e9516e529a8b913f92854d076d9", "score": "0.6342209", "text": "function query() {}", "title": "" }, { "docid": "d24374ae5789badc446ac7d3e30a42c6", "score": "0.6335575", "text": "function query() { }", "title": "" }, { "docid": "417ba1e99a7dc59988a9d804633f648d", "score": "0.6319664", "text": "public function query($query);", "title": "" }, { "docid": "51587dfdbeef578ff63ef00430d8bdc8", "score": "0.6257539", "text": "public function query()\n {\n }", "title": "" }, { "docid": "51587dfdbeef578ff63ef00430d8bdc8", "score": "0.6257539", "text": "public function query()\n {\n }", "title": "" }, { "docid": "51587dfdbeef578ff63ef00430d8bdc8", "score": "0.6257539", "text": "public function query()\n {\n }", "title": "" }, { "docid": "51587dfdbeef578ff63ef00430d8bdc8", "score": "0.6257539", "text": "public function query()\n {\n }", "title": "" }, { "docid": "51587dfdbeef578ff63ef00430d8bdc8", "score": "0.6257539", "text": "public function query()\n {\n }", "title": "" }, { "docid": "9577070661dd4f6eb0c5932efc50e3b4", "score": "0.62210375", "text": "function executeQuery( $query );", "title": "" }, { "docid": "de57d04890509fc3a17860a4ff622f27", "score": "0.62187696", "text": "private function query()\n {\n }", "title": "" }, { "docid": "8d10071f897923fe6c9d4d7d8c050f68", "score": "0.6178196", "text": "public function query($sql)\n {\n $this->conn->query($sql);\n }", "title": "" }, { "docid": "e9e7410c5856136780dd37f6316752bf", "score": "0.6162509", "text": "function dbQuery($query) {\n\t\t// check the connection and create it if necessary\n\t\tif(empty($this->rs)) {\n\t\t\t$this->dbConnect();\n\t\t}\n\t\t$tstart = $this->getMicroTime(); \n\t\tif(@!$result = mysql_query($query, $this->rs)) {\n\t\t\t$this->messageQuit(\"Execution of a query to the database failed\", $query);\n\t\t} else {\n\t\t\t$tend = $this->getMicroTime(); \n\t\t\t$totaltime = $tend-$tstart;\n\t\t\t$this->queryTime = $this->queryTime+$totaltime;\n\t\t\tif($this->dumpSQL) {\n\t\t\t\t$this->queryCode .= \"<fieldset style='text-align:left'><legend>Query \".($this->executedQueries+1).\" - \".sprintf(\"%2.4f s\", $totaltime).\"</legend>\".$query.\"</fieldset><br />\";\n\t\t\t}\n\t\t\t$this->executedQueries = $this->executedQueries+1;\n\t\t\treturn $result;\n\t\t}\n\t}", "title": "" }, { "docid": "ce3f5f148f18ab3874703d64cb8d3f4b", "score": "0.6131985", "text": "protected function insert()\r\n {\r\n // Complete the bindings\r\n $this->completeBinding();\r\n // Run the query.\r\n $result = $this->STH->execute();\r\n if (! $result) {\r\n $this->dbError();\r\n } else {\r\n $this->result = $result;\r\n $this->disconnect();\r\n }\r\n }", "title": "" }, { "docid": "fae35a7df8e0f142187331712382cd10", "score": "0.61208135", "text": "public function query($query) {\n\t\t$this->stmt = $this->dbh->prepare($query);\n\t}", "title": "" }, { "docid": "8be8bbd7416edab9563e5b03fe4fe2dd", "score": "0.61200655", "text": "public static function query (string $query) : void\n {\n self::$query = $query;\n self::$statement = self::$pdo->query(self::$query);\n }", "title": "" }, { "docid": "1a3ed75250fae7e5723ec5eb0151b63e", "score": "0.6105629", "text": "function doExecuteQuery($query){\n\t\t$this->db->query($query);\n\t}", "title": "" }, { "docid": "5d523deb37ae58dd034cf3a6707e3022", "score": "0.6095235", "text": "public function query($query) {\n $this->stmt = $this->dbh->prepare($query);\n }", "title": "" }, { "docid": "05b48964dd30222d6f84c9f4d7dfd979", "score": "0.6091604", "text": "protected function sendQuery($sql)\n {\n return mysql_query($sql);\n\n }", "title": "" }, { "docid": "c81aeab6934bdce54dac445a5c0e3d73", "score": "0.6079763", "text": "function query()\n\t{\n\t\treturn $this->db->query( $this->getSQLStatement() );\n\t}", "title": "" }, { "docid": "927048511094653f893f3063fd632afc", "score": "0.607491", "text": "public function query($query){\r\n\ttry {\r\n $this->stmt = $this->con->prepare($query);\r\n\t} catch (Exception $e) {\r\n\t}\r\n }", "title": "" }, { "docid": "b16a541bb7fcd779dada94fee8a3fe09", "score": "0.6066646", "text": "public function query($query){\n\t\t\n\t\t//design decision to keep this as one object serving muliple queries rather than a new object per query. \n\t\t$this->flush();\n\t\t\n\t\t//I store details of the query at each stage of use for ease of debugging\n\t\t$this->queries[] = \"Raw query:\\t$query\";\n\t\t\n\t\t//currently I don't use initialquery again, but keeping just in case.\n\t\t$this->initialQuery = $query;\n\t\t$this->determineQueryType($query);\n\t\tswitch (strtolower($this->queryType)){\n\t\t\tcase 'foundrows':\n\t\t\t\t//for a found rows query we really don't need to do anything other than point the query back at \n\t\t\t\t//the results stored in this object by the last query.\n\t\t\t\t$this->results = $this->foundRowsResult;\n\t\t\t\t$this->foundRowsResult = null;\n\t\t\tbreak;\n\t\t\tcase 'multiinsert':\n\t\t\t\tswitch ($this->dbType){\n\t\t\t\t\tcase \"sqlite\":\n\t\t\t\t\t\tlist($insertSQLPrefix, $values, $count) = $this->multiInsertMatches;\n\t\t\t\t\t\t$this->multiInsertMatches = array();\n\t\t\t\t\t\n\t\t\t\t\t\tif ($count > 1){\n\t\t\t\t\t\t\t$cnt = 1;\n\t\t\t\t\t\t\t$first = true;\n\t\t\t\t\t\t\t$this->reriteEngine = new pdo_sqlite_driver();\n\t\t\t\t\t\t\tforeach ($values as $value){\n\t\t\t\t\t\t\t\tif (substr($value, -1, 1) === ')'){\n\t\t\t\t\t\t\t\t\t$suffix = '';\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$suffix = ')';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$query = $insertSQLPrefix .' ' . $value . $suffix;\n\t\t\t\t\t\t\t\t$this->rewrittenQuery = $this->rewriteEngine->rewriteQuery($query, 'insert');\n\t\t\t\t\t\t\t\t//logically they should all be the same shape so we can prepare the first one.\n\t\t\t\t\t\t\t\t//and execute against subsequents\n\t\t\t\t\t\t\t\t$this->queries[] = $this->rewrittenQuery;\n\t\t\t\t\t\t\t\t//get variables\n\t\t\t\t\t\t\t\t$this->extractedVariables = array();\n\t\t\t\t\t\t\t\t$this->extractVariables();\n\t\t\t\t\t\t\t\tif ($first){\n\t\t\t\t\t\t\t\t\t$this->prepareQuery();\n\t\t\t\t\t\t\t\t\t$first = false;\n\t\t\t\t\t\t\t\t\t/*if ($this->isError){\n\t\t\t\t\t\t\t\t\t\tglobal $wpdb;\n\t\t\t\t\t\t\t\t\t\t$wpdb->bail($this->getErrorMessage());\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}\telse {\n\t\t\t\t\t\t\t\t\t$this->executeQuery($this->statement);\n\t\t\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t\t\tif ($this->isError){\n\t\t\t\t\t\t\t\t\t\tglobal $wpdb;\n\t\t\t\t\t\t\t\t\t\t$wpdb->bail($this->getErrorMessage());\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}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase \"mysql\":\n\t\t\t\t\t\t$this->rewrittenQuery = $this->initialQuery;\n\t\t\t\t\t\t$this->needsPostProcessing = false;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tswitch ($this->dbType){\n\t\t\t\t\tcase \"sqlite\":\n\t\t\t\t\t\trequire_once PDODIR.\"/driver_sqlite/pdo_sqlite_driver.php\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->rewriteEngine = new pdo_sqlite_driver();\n\t\t\t\t\t\t$this->rewrittenQuery = $this->rewriteEngine->rewriteQuery($this->initialQuery, $this->queryType);\n\t\t\t\t\t\t$this->needsPostProcessing = true;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"mysql\":\n\t\t\t\t\t\t//no rewrite engine needed\n\t\t\t\t\t\t$this->rewrittenQuery = $this->initialQuery;\n\t\t\t\t\t\t$this->needsPostProcessing = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$this->queries[]=\"Rewritten: $this->rewrittenQuery\";\n\t\t\t\t// prepare the query to use placeholders (avoids sql injection attacks)\n\t\t\t\t$this->extractVariables();\n\t\t\t\t\n\t\t\t\t//prepare the query\n\t\t\t\t//and execute it (called from prepare())\n\t\t\t\t$this->prepareQuery();\n\t\t\t\tif (!$this->isError){\n\t\t\t\t\t//postprocess, for IF statements.\n\t\t\t\t\t$this->processResults();\n\t\t\t\t\t//$wpdb expects an array of objects as a result whereas ironically we are using arrays\n\t\t\t\t\t$this->convertToObject();\n\t\t\t\t} else {\n\t\t\t\t\t/*\n\t\t\t\t\t * \n\t\t\t\t\t global $wpdb;\n\t\t\t\t\t$wpdb->bail($this->getErrorMessage());\n\t\t\t\t\t*/\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t}\n\t\t//dump some queries to a text file for testing\n\t\tif (defined('PDO_DEBUG') && PDO_DEBUG === true){\n\t\t\tfile_put_contents(ABSPATH.'wp-content/database/debug.txt', $this->getDebugInfo(), FILE_APPEND);\t\n\t\t}\t\n\t}", "title": "" }, { "docid": "0f14b3ed85bbee7a7840c4fa4c3095a4", "score": "0.6066204", "text": "public function query($query) {\n $this->stmt = $this->dbh->prepare($query);\n }", "title": "" }, { "docid": "2c8425d72177e25a69ed666b8ffbbbf4", "score": "0.6053772", "text": "function query() {\n }", "title": "" }, { "docid": "2c8425d72177e25a69ed666b8ffbbbf4", "score": "0.6053772", "text": "function query() {\n }", "title": "" }, { "docid": "b61a7992d2733429888423c8351df92c", "score": "0.6043799", "text": "function query()\n{\n\t$args = func_get_args();\n\t$sql = array_shift($args);\n\treturn System::Database()->query(vsprintf($sql, $args));\n}", "title": "" }, { "docid": "a4c64394a5de1f6049e2a7be40f1000b", "score": "0.6042082", "text": "public function query($query)\n {\n $this->stmt = $this->conn->prepare($query);\n }", "title": "" }, { "docid": "fb21c7924d71ede6f501a8e9fdd0651b", "score": "0.60346246", "text": "public function query($query) {\n $this->stmt = $this->dbh->prepare($query);\n }", "title": "" }, { "docid": "1e3fe832e55764d13506915aa91d2068", "score": "0.6030143", "text": "public function run_query($q){\n $resp = mysql_query($q, $this->db_link);\n if ($resp){\n $this->db_response = $resp;\n return true;\n }else{\n $this->set_error(mysql_error());\n }\n }", "title": "" }, { "docid": "bdfbdc56df3e14323d0f847ae46cfecb", "score": "0.60277706", "text": "public function query()\r\n {\r\n }", "title": "" }, { "docid": "b881888e258a0846fd3ebc4fed0e31f1", "score": "0.6022154", "text": "function run_query($query) {\n if (Config::get(\"log\") == \"true\") {\n $db = open_db();\n pg_query($db, $query);\n close_db($db);\n }\n}", "title": "" }, { "docid": "3c91180ccc289edc88f8682057085cbe", "score": "0.60101986", "text": "public function query ( $statement );", "title": "" }, { "docid": "75b9748bc6da11cd630e30da8b0faee5", "score": "0.60048306", "text": "public function query($sql);", "title": "" }, { "docid": "dab83da6cffb315334a1ff822ee560af", "score": "0.5999812", "text": "private function sendQuery($q, array $params){\r\n\t\t\t$query = $this->prepare($q, $params);\r\n\t\t\t$result = $this->provider->query($query);\r\n\t\t\tif($this->provider->getErrorNo()){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn $result;\r\n\t\t}", "title": "" }, { "docid": "d670e5d5192e3d00cba9d109a2a76f40", "score": "0.59976673", "text": "public function query(){\n\t\ttry{\n\t\t $query = mysql_query($this->SQL, $this->connStr) or die(\"Failed to query the database<br />\". mysql_error() .\"<br /><br /><strong>Line:</strong> \". __LINE__ .\"<br /><strong>File:</strong> \". __FILE__.\"<br /><br />SQL Command:</strong><br /><textarea name=\\\"sqlquery\\\" rows=\\\"5\\\" cols=\\\"150\\\" class=\\\"text\\\" readonly=readonly>\".$this->SQL.\"</textarea><br /><br />\");\n\n\t \treturn($query);\n \t}catch(Exception $e){\n\t $error = new notifySys($e, true, true, __FILE__, __LINE__);\n\t\t\t$error->genericError();\n \t}\n\t}", "title": "" }, { "docid": "af9032edc0a1be2314b5205b41a6ffd3", "score": "0.5994253", "text": "private function Query(){\r\n $this->fetchDB(\"\");\r\n }", "title": "" }, { "docid": "29adf9164d07e0f35165c1892af8b155", "score": "0.59899074", "text": "function query($query)\n\t{\n\t\t$args = func_get_args();\n\t\t$query = $this->obtainRawQuery($args);\n\t\t$result = $this->getDB()->rawQuery($query);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "332a6e71773aca18e50b8fb418a009d7", "score": "0.5981416", "text": "function dbQuery($query) {\n // check the connection and create it if necessary\n if(empty($this->rs)) {\n $this->dbConnect();\n }\n $tstart = $this->getMicroTime();\n if(@!$result = mysqli_query($this->rs, $query)) {\n $this->messageQuit(\"Execution of a query to the database failed\", $query);\n } else {\n $tend = $this->getMicroTime();\n $totaltime = $tend-$tstart;\n $this->queryTime = $this->queryTime+$totaltime;\n if($this->config['dumpSQL']) {\n $this->queryCode .= \"<fieldset style='text-align:left'><legend>Query \".($this->executedQueries+1).\" - \".sprintf(\"%2.4f s\", $totaltime).\"</legend>\".$query.\"</fieldset><br />\";\n }\n $this->executedQueries = $this->executedQueries+1;\n if(count($result) > 0) {\n return $result;\n } else {\n return false;\n }\n }\n }", "title": "" }, { "docid": "a99caa63686546f13d7df82189e3b030", "score": "0.597263", "text": "function query() {\n $this->ensure_my_table();\n $this->add_additional_fields();\n }", "title": "" }, { "docid": "669e964bb92f005bba297991652a565c", "score": "0.59709805", "text": "public function send_sql($sql) \n\t{\n\t\tif (!isset ($this->link))\n\t\t\t$this->connect();\n\t\ttry {\n\t\t\tif (! $succ = mysqli_select_db($this->link, $this->db))\n\t\t\t\tthrow new Exception (\"Could not select the database \". $this->db);\n\t\t\tif (! $this->res = mysqli_query($this->link,$sql))\n\t\t\t\tthrow new Exception(\"Could not send query\");\n\t\t\t}\n\t\t \n\t\tcatch (Exception $e)\n\t\t{\n\t\t\techo $e->getMessage().\"<BR>\";\n\t\t\techo mysqli_error($this->link);\n\t\t\texit;\n\t\t}\n\t\treturn $this->res;\n\t}", "title": "" }, { "docid": "7ffb932b2de9319471b8d95fbce7d55f", "score": "0.59684247", "text": "public function sendQuery($query,$errorReporting=true){\n\t\t$this->queryCount++;\n\t\t$this->result=$this->MySqli->query($query);\n\t\tif($this->result===false && $errorReporting===true){\n\t\t\tthrow new DataBaseException(\"invalid SQL: \". $query,$this);\n\t\t}\n\t\treturn $this->result;\n\t}", "title": "" }, { "docid": "8a3e8ec48122b56c8ab1e91f84b70f44", "score": "0.59617573", "text": "public function Execute($query){\n if (!$this->conn) return;\n return $this->conn->query($query);\n }", "title": "" }, { "docid": "d6e6ce1c610869bd03d2f6520df34058", "score": "0.59524626", "text": "public function query($query) {\n $this->stmt = $this->dbh->prepare($query);\n }", "title": "" }, { "docid": "9e7b14b736e70f1f882c540f0162729c", "score": "0.59477913", "text": "public function query($query){\n $connect = $this->connect();\n try{\n\t\t\t$connect->beginTransaction();\n\t\t\t$result = $connect->query($query);\n $connect->commit();\n\t\t} catch (PDOException $e) {\n $connect->rollBack();\n\t\t\t$result = NULL;\n $message = 'Erro na execução da query (%d): %s';\n die(sprintf($message, $e->errorInfo[1], $e->getMessage()));\n }\n return $result;\n }", "title": "" }, { "docid": "72c2241e463eac7d38b6dd99b80e3cac", "score": "0.5943756", "text": "function query($query) {\n\t\t\treturn $this->MDBC_query($query, true);\n\t\t}", "title": "" }, { "docid": "b8e0a880ed483b0a42e756830f81a583", "score": "0.59414095", "text": "public function query(string $query): void;", "title": "" }, { "docid": "398e0608a97eca4dc7bd29ed96ec938a", "score": "0.5939259", "text": "public function dbQuery ($query){\n \n if (isset ($query)){\n $this->res = mysql_query($query, $this->link);\n }else{\n throw new nullQuery ('Sql query cannot be null. ');\n }\n }", "title": "" }, { "docid": "e5a7909ad16bde753c72bfba7b3762b6", "score": "0.59268576", "text": "private function _hitDB() {\n $result = @mysql_query($this->active_query);\n if (!$result) {\n throw new DBException('Error performing query: \"' . $this->active_query . '\".' . mysql_error());\n }\n $this->active_result = $result;\n }", "title": "" }, { "docid": "36940e3446dba049ce0fe3c0398f2ab2", "score": "0.59204394", "text": "abstract public function execute($query);", "title": "" }, { "docid": "add925ab85f131e1961f7a6edd40d741", "score": "0.59144795", "text": "abstract protected function query();", "title": "" }, { "docid": "4fa0ce3aee639a5d0446c9f66d1e9869", "score": "0.5913288", "text": "function query($query) {\n\n global $db;\n\n $this->lastSQL = $query;\n $this->result = @pg_query($db, $query);\n if ($this->result === false) $this->error(\"\");\n $this->cursor = 0;\n if (($this->nrows = pg_numrows($this->result)) > 0) \n \t\t$this->row = pg_fetch_assoc($this->result, 0);\n }", "title": "" }, { "docid": "226cf0b059db41ebc04c7942f7363e5e", "score": "0.59108335", "text": "public function query($query)\n {\n if (!is_string($query) || empty($query)) {\n $this->_log->put(Log::$ERROR, __CLASS__, __METHOD__, 'The specified query is not valid. Error 0002');\n $this->_log->put(Log::$DEBUG, __CLASS__, __METHOD__, $query);\n throw new DbAdapterException('The specified query is not valid.','0002');\n }\n // lazy connect to MySQL\n $this->connect();\n\n //$this->_log->put(Log::$DEBUG, __CLASS__, __METHOD__, $query);\n \n if (!$this->_result = mysqli_query($this->_link, $query)) {\n $this->_log->put(Log::$ERROR, __CLASS__, __METHOD__, 'Error executing the specified query. Error 00003');\n $this->_log->put(Log::$DEBUG, __CLASS__, __METHOD__, $query . mysqli_error($this->_link));\n throw new DbAdapterException('Error executing the specified query ' . $query . mysqli_error($this->_link),'00003');\n }\n }", "title": "" }, { "docid": "d7d1e3d7764aa34614a447446db8b1e4", "score": "0.5901743", "text": "public function query($query = NULL) {\n if(!is_null($query)) {\n $this->query = $query;\n }\n $this->result = $this->_mysqli->query($this->query);\n if(!$this->result) {\n $this->error = $this->_mysqli->error;\n }\n }", "title": "" }, { "docid": "89ce283a8eb923b9be0711912dc218ee", "score": "0.5878075", "text": "function query($query = \"\") {\n\t\t// elimino qualsiasi altra query\n\t\tunset($this->query_result);\n\n\t\tif($query != \"\") {\n\n\t\t\t$this->num_queries++;\n\t\t\t$this->query_result = mysql_query($query, $this->db_connect_id);\n\t\t\tif($this->printError == 1) print(mysql_error());\n\t\t}\n\n\t}", "title": "" }, { "docid": "3076a034c9d989d3234803e1eb2b372d", "score": "0.58666766", "text": "public function sendQuery( $data=[] )\n {\n $this->setQuery( $data );\n $this->setHeader( \"Content-Type\", \"text/plain\" );\n return $this;\n }", "title": "" }, { "docid": "7aa77db48939f572fa0e276af095bdf3", "score": "0.5858125", "text": "function run_sql($query) {\n\n $sql = $this->conn->prepare($query);\n $res = $sql->execute();\n return $res;\n }", "title": "" }, { "docid": "62fdbc282ed65d4ddb189dcc4b50d190", "score": "0.5845157", "text": "public function query($query)\n {\n $this->_stmt = $this->dbhost->prepare($query);\n }", "title": "" }, { "docid": "c82c35aedc54f140f55f7cab6cf0478d", "score": "0.5839875", "text": "public function query() {\n\t\treturn $this->myModel->query($this->mySql, $this->myParams, $this->myParamTypes);\n\t}", "title": "" }, { "docid": "2b474ec9024ee8ae770cb3d2f4b24827", "score": "0.5825051", "text": "function query($query){\n\t\t\n\t\t// Try connecting if needed:\n\t\t$this->connect();\n\t\t\n\t\t// Run the query now:\n\t\t$result = @$this->link->query($query);\n\t\t\n\t\tif($result){\n\t\t\t// Got a result:\n\t\t\treturn $result;\n\t\t}\n\t\t\n\t\t// Error occured - throw an exception:\n\t\tthrow new Exception('MySQL '.$this->link->errno.': \"'.$this->link->error.'\".');\n\t\t\n\t}", "title": "" }, { "docid": "134121d4e0156d0e73325f01e302489b", "score": "0.5820123", "text": "function perform($query, array $arguments = [])\n\t{\n\t\tforeach ($arguments as $ar) {\n\t\t\t$query = str_replace('?', $ar, $query);\n\t\t}\n\t\t//$query = $this->fixQuery($query);\n\t\t$profiler = new Profiler();\n\t\t$res = mssql_query($query, $this->connection);\n\t\t$msg = mssql_get_last_message();\n\t\tif ((!$res || $msg) && !in_array($msg, $this->ignoreMessages)) {\n\t\t\tif ($this->debug) {\n\t\t\t\t$msg2 = mssql_fetch_assoc(\n\t\t\t\t\tmssql_query(\n\t\t\t\t\t\t'SELECT @@ERROR AS ErrorCode',\n\t\t\t\t\t\t$this->connection))['ErrorCode'];\n\t\t\t\tdebug([\n\t\t\t\t\t'method' => __METHOD__,\n\t\t\t\t\t'query' => $query . '',\n\t\t\t\t\t'numRows' => is_resource($res)\n\t\t\t\t\t\t? $this->numRows($res)\n\t\t\t\t\t\t: ($res ? 'TRUE' : 'FALSE'),\n\t\t\t\t\t'elapsed' => $profiler->elapsed(),\n\t\t\t\t\t'msg' => $msg,\n\t\t\t\t\t'msg2' => $msg2,\n\t\t\t\t\t'this' => typ($this) . '',\n\t\t\t\t\t'this->qb' => typ($this->qb) . '',\n\t\t\t\t\t'this->qb->db' => typ($this->qb->db) . '',\n\t\t\t\t]);\n\t\t\t}\n\t\t\t$this->close();\n\t\t\t$this->connect();\n\t\t\tthrow new DatabaseException(__METHOD__ . ': ' . $msg . BR . $query . BR . $msg2);\n\t\t}\n\t\t$this->lastQuery = $query;\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "91c926ac5ee716f84bebcbfc5646a79b", "score": "0.58194363", "text": "public function query($query) {\r\n\t\t//connecting to the database\r\n\t\t$connection = $this -> connect();\r\n\r\n\t\t//querying the database\r\n\t\t$result = $connection -> query($query);\r\n\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "c0f87f0938828c0c37f9f6d6f55586f7", "score": "0.58189416", "text": "public static function execute()\n\t{\n\t\t$argsCount = func_num_args();\n\t\t$par = array();\n\n\t\t// no query as parameter given\n\t\tif($argsCount < 1)\n\t\t\tthrow new Exception(\"No Sql-Query given\");\n\n\t\t// if there are parameters, insert in \n\t\tif($argsCount > 1)\n\t\t{\n\t\t\t// create array with parameters for pdo usage\n\t\t\tfor($i = 1; $i < $argsCount; $i++)\n\t\t\t{\n\t\t\t\t$key = \":\" . ($i - 1);\n\t\t\t\t$par[$key] = func_get_arg($i);\n\t\t\t}\n\t\t}\n\n\t\t// insert table prefix\n\t\t$query = func_get_arg(0);\n\t\t$query = str_replace(\":prefix:\", dbConn::$tablePrefix, $query);\n\n\t\t// create pdo connection\n\t\t$db = new pdo(\"mysql:\" .\n\t\t\t\"host=\" . dbConn::$host . \";\" .\n\t\t\t\"dbname=\" . dbConn::$database . \";\" . \n\t\t\t\"charset=UTF8\",\n\t\t\tdbConn::$username,\n\t\t\tdbConn::$password);\n\t\t$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n\t\ttry\n\t\t{\t\t\t\n\t\t\t// prepare and execute\n\t\t\t$sth = $db->prepare($query, array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));\n\t\t\tif(!$sth)\n\t\t\t\tthrow new Exception($db->errorInfo());\n\t\t\t$sth->execute($par);\n\t\t}\n\t\tcatch(Exception $ex)\n\t\t{\n\t\t\tthrow new Exception($ex->getMessage());\n\t\t}\n\n\t\t// close database connection\n\t\t$db = null;\n\t}", "title": "" }, { "docid": "82a914734c0b6def5d18d9bd8e3cde8c", "score": "0.5817617", "text": "public function performQuery($query)\r\n {\r\n $host = \"localhost\";\r\n $user = \"root\";\r\n $pass = \"\";\r\n $database = \"mytodo\";\r\n\r\n //Open connection and Select database.\r\n $databaseConnection = mysqli_connect($host, $user, $pass, $database) or die(mysqli_error());\r\n\r\n //execute query and close connection\r\n mysqli_query($databaseConnection, $query) or die(mysqli_error($databaseConnection));\r\n mysqli_close($databaseConnection);\r\n }", "title": "" }, { "docid": "210655785806c64480255fd65c94bf9b", "score": "0.58158946", "text": "function performQuery($queryText) {\n\t\t\tif (!$this->isOpened())\n\t\t\t\t$this->openConnection();\n\t\t\t\n\t\t\treturn $this->mysqli_conn->query($queryText);\n\t\t}", "title": "" }, { "docid": "00a056c5ae9044bee16a382e456a7389", "score": "0.5811841", "text": "protected function query()\n {\n if (isset($this->logger)){\n $time_start = microtime(true);\n $statement = $this->db->query($this->query);\n $time_end = microtime(true);\n $this->logger->log($this->query , round( ($time_end - $time_start),8) );\n\n }else{\n $statement = $this->db->query($this->query);\n }\n\n $this->cleanFields();\n\n return $statement;\n }", "title": "" }, { "docid": "e03062d2fb229beae2f6abacdbcee911", "score": "0.5808891", "text": "function query ($query)\n\t{\n\t\tif (!$result = $this->sql_query($query))\n\t\t{\n\t\t\t$this->trigger_error();\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "2da4a2291916573da91fa9697eb5e565", "score": "0.5805884", "text": "function ExecuteQuery($query = \"\") {\n try {\n Logger::Write(\"Executing query\", $GLOBALS[\"CorrelationID\"]);\n // Logger::Write($query, $GLOBALS[\"CorrelationID\"]);\n $msRes = $this->getConnection()->query($query);\n if(!$msRes) { \n if($this->Connection->error){\n throw new Exception($this->Connection->error); \n }\n Logger::Write(\"No results found\", $GLOBALS[\"CorrelationID\"]); \n }\n Logger::Write(\"Query executed successfully\", $GLOBALS[\"CorrelationID\"]);\n return $msRes;\n } \n catch (Throwable $ex) {\n $exMessage = $ex->getMessage();\n Logger::Write(\"Error while executing query -> $exMessage\", $GLOBALS[\"CorrelationID\"]);\n throw new Exception($ex);\n }\n }", "title": "" }, { "docid": "08073cc1d6b0b68e8cd9a578b6d5d230", "score": "0.5805429", "text": "private function _do_query( $query ) {\n if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES ) {\n $this->timer_start();\n }\n\n if ( ! empty( $this->dbh ) && $this->use_mysqli ) {\n//file_put_contents(\"_test1.php\",$query.\"\\r\\n\",FILE_APPEND);\n\n $this->result = mysqli_query( $this->dbh, $query );\n\n\n\n\n } elseif ( ! empty( $this->dbh ) ) {\n $this->result = mysql_query( $query, $this->dbh );\n }\n $this->num_queries++;\n\n if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES ) {\n $this->queries[] = array( $query, $this->timer_stop(), $this->get_caller() );\n }\n }", "title": "" }, { "docid": "20309ffe6ba70de403feb696389b9a7e", "score": "0.580403", "text": "function query($query) {\n return mysql_query($query, $this->connection);\n }", "title": "" }, { "docid": "b73e7fac8ef6188d211a2b4bf366b186", "score": "0.5803764", "text": "function query($query) {\n $st = $this->pdo->prepare($query);\n return $st->execute();\n }", "title": "" }, { "docid": "ce251c1c1661810715fc8bcb8f24316b", "score": "0.58028316", "text": "public abstract function query($query);", "title": "" }, { "docid": "ebf6eada273214a43e87b9ffe4b66abe", "score": "0.57858855", "text": "function query($query){\n global $connect;\n return mysqli_query($connect, $query);\n }", "title": "" }, { "docid": "d79414f8bfe61259b160d6ceec1c8f44", "score": "0.5785578", "text": "protected function _sendQuery($query, $getId = false)\r\n\t{\r\n\r\n\t\t$this->_connection = mysql_connect($this->_server, $this->_user, $this->_password);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tif (!$this->_connection){ die('Could not connect: ' . mysql_error()); }\r\n\r\n\t\tmysql_select_db($this->_database, $this->_connection);\r\n\t\t\r\n\t\tmysql_query('SET CHARACTER SET utf8');\r\n\t\t\r\n\t\tmysql_query(\"SET NAMES utf8\",$this->_connection);\r\n\t\t//print '</br> - CHIVATO: QUERY :'.$query;\r\n\t\t\r\n\t\t$result = mysql_query($query, $this->_connection);\r\n\t\t$tmpId = mysql_insert_id($this->_connection);\r\n\t\tmysql_query(\"SET NAMES utf8\",$this->_connection);\r\n\t\t\r\n\t\tmysql_close($this->_connection);\r\n\r\n\t\tif ($getId) {\r\n\t\t\t\r\n\t\t\treturn $tmpId;\r\n\t\t}\r\n\t\treturn $result;\r\n\t}", "title": "" } ]
d56f064a48f65668fae48853903b932b
Inicializa o namespace de sessao
[ { "docid": "e2d7d6c86a8272192b26228da01675d1", "score": "0.5861987", "text": "public function __construct()\n {\n $this->_namespace = new Zend_Session_Namespace($this->getName());\n if (!isset($this->_namespace->messages)) {\n $this->_namespace->messages = array();\n }\n }", "title": "" } ]
[ { "docid": "0af4ca7de4974a4cda8c34c3bd6693e6", "score": "0.67496777", "text": "private function initialize()\n {\n $this->ci->load->config('session');\n $config = array(\n 'sess_namespace' => $this->ci->config->item('sess_namespace')\n );\n\n foreach ($config as $key => $val)\n {\n if(isset($this->$key))\n {\n $this->$key = $val;\n }\n }\n\n if(!isset($_SESSION))\n {\n session_start();\n }\n\n if(isset($_SESSION[$this->sess_namespace]))\n {\n $this->store = $_SESSION[$this->sess_namespace];\n }\n\n $this->sess_create();\n }", "title": "" }, { "docid": "1a2b1aa7f8ef7d33d9c6be15a79d1af7", "score": "0.6726193", "text": "public function init()\n {\n parent::init();\n $this->authtoken = \"\";\n $this->session = new Session;\n\n }", "title": "" }, { "docid": "33d30c3f8d67a8a3d8913c92618465d3", "score": "0.6540275", "text": "function __construct() {\n\t\tparent::__construct();\n\t\tSession::init();\n\t}", "title": "" }, { "docid": "128590a4451577931d5d2c39ee1e54ab", "score": "0.6498272", "text": "public function init() {\r\n\t\t$this->session = new Zend_Session_Namespace ( 'session' );\r\n\t}", "title": "" }, { "docid": "b2f85d6ffd3fed683cb328cef42a0c8c", "score": "0.6483952", "text": "function __construct() {\n $this->_session = new Zend_Session_Namespace('session_app');\n $this->_userinfo = $this->_session->userinfo;\n }", "title": "" }, { "docid": "744072c17501e50a2be2e990b29bc6fc", "score": "0.6481081", "text": "public function init()\n {\n //start session\n session_start();\n \n //create session if one doesn't yet exist\n if (!isset($_SESSION['kodexy']))\n {\n $this->createSession();\n }\n \n //security\n $this->updateSession();\n }", "title": "" }, { "docid": "dcaf256f73f6e55b6fe34e45b363dd16", "score": "0.6479175", "text": "private function __construct() {\n\t\t$this->storage = Util_Storage_Session::singleton();\n\t\tif( !isset( $this->storage->{$this->namespace} ) ) {\n\t\t\t$this->reset();\n\t\t}\n\t}", "title": "" }, { "docid": "3944305b7e555708c8b6f346ab6976e6", "score": "0.6456016", "text": "public function __construct() {\r\n parent::__construct();\r\n @session_start(); //modelleri ilk başta almadığımızdan burada kullanıyoruz.\r\n }", "title": "" }, { "docid": "8bbe93df66ccca6cfba3829ea94de5ef", "score": "0.6440758", "text": "public function __construct() \n {\n /*\n * Una sessione inizia grazie alla funzione session_start()\n * Le variabili di sessione sono impostate nella variabile globale PHP\n * $_SESSION\n */\n session_start();\n }", "title": "" }, { "docid": "92426202ef7135146036478df3694ec6", "score": "0.6436674", "text": "public function init()\n {\n\t\t$session_usu = new Zend_Session_Namespace('login');\n\t\tif(!isset($session_usu->usuario))\n\t\t{\n\t\t\t$this->_redirect(\"/\");\n\t\t}\n\t\t\n\n }", "title": "" }, { "docid": "d5f3f6611beea878c166556c8a3f96bb", "score": "0.63978136", "text": "function __construct()\n\t{\n\t\t$this->session = new Session();\n\t}", "title": "" }, { "docid": "277092ea7f05379796fc8fbc05b32549", "score": "0.63869745", "text": "public static function init()\n {\n if (self::isLogged()) {\n $model = new Galleria_Auth_Model();\n $authObj = $model->getData(self::getObject());\n if ($authObj)\n Galleria_Session::set('auth', serialize($authObj));\n else\n self::logOut();\n }\n }", "title": "" }, { "docid": "4836d227eafc5d2293096de1554a945f", "score": "0.6379886", "text": "abstract protected function _sessionCreate();", "title": "" }, { "docid": "dfcea51e1191dca9cff4c0cb0309441f", "score": "0.63716066", "text": "private function __construct(){\n $session_factory = new \\Aura\\Session\\SessionFactory;\n $session = $session_factory->newInstance($_COOKIE);\n //keep session until browser close\n $session->setCookieParams(array('lifetime' => '0'));\n $this->segment = $session->getSegment('telegram\\Session\\telegramSession');\n }", "title": "" }, { "docid": "c5d242bc6346e1fbd51fd67521b2c4d8", "score": "0.6352281", "text": "public function __construct(){\n $this->ses = new MySession;\n }", "title": "" }, { "docid": "1b39e06962a82bd0963db5a4a8e4dbfc", "score": "0.63267124", "text": "public function __construct()\n {\n if (Session::get('user') === null) {\n Session::set('user', Configuration::load('user'));\n }\n }", "title": "" }, { "docid": "adfcc78c391adb654fc0937b4ac28e56", "score": "0.6314011", "text": "function __construct()\n\t{\n\t\t//echo 'session dibuat'.'</br>';\n\t}", "title": "" }, { "docid": "2ba75eea70bf688e36a306307b2ed6d4", "score": "0.6311113", "text": "function Session($db=null,$n=null,$p=null,$l=null,$s=null){\n\t\t\t$this->user = $n;\n\t\t\t$this->password = $p;\n\t\t\t\n\t\t\tif($db == null) $db = new Database;\n\t\t\telse $this->database = $db;\n\t\t\t\n\t\t\tif($l == null) $l = new Ldap;\n\t\t\telse $this->ldap = $l;\n\t\t\t\n\t\t\t// level 2 (required for all commands)\n\t\t\tif($s != null) $session = $s;\n\t\t\t\n\t\t\t// run on init\n\t\t\t$this->checkExpiration();\t\t\n\t\t}", "title": "" }, { "docid": "8efbdc2967e48b4e268fcba128ba9fbb", "score": "0.63106287", "text": "public static function init($namespace = null)\n\t{\n\t\t$namespace = self::getNamespace($namespace);\t\t\n\t\tZend_Registry::set($namespace,new Zend_Session_Namespace($namespace));\n\t}", "title": "" }, { "docid": "3225b630246569b26d7d7fe84de0e212", "score": "0.6301557", "text": "function SessionContainer ()\n {\n\n }", "title": "" }, { "docid": "ba14ba327372fed0b86f969fedb6103d", "score": "0.6292834", "text": "public function __construct() {\n parent::__construct();\n Session::sinAcceso();\n// echo \"hola\";\n }", "title": "" }, { "docid": "c42099243688ea767993d310b07f050f", "score": "0.6288331", "text": "public function initialize(){\n\t\t$config = CoreConfig::readAppConfig();\n\t\tif(isset($config->application->sessionSavePath)){\n\t\t\tself::$_connection = DbLoader::factoryFromDescriptor($config->application->sessionSavePath);\n\t\t\tsession_set_save_handler(\n\t\t\t\tarray('DatabaseSessionAdapter', 'open'),\n\t\t\t\tarray('DatabaseSessionAdapter', 'close'),\n\t\t\t\tarray('DatabaseSessionAdapter', 'read'),\n\t\t\t\tarray('DatabaseSessionAdapter', 'write'),\n\t\t\t\tarray('DatabaseSessionAdapter', 'destroy'),\n\t\t\t\tarray('DatabaseSessionAdapter', 'garbageCollector')\n\t\t\t);\n\t\t} else {\n\t\t\tthrow new SessionException(\"El adaptador '\".get_class($this).\"' requiere que indique el sessionSavePath en el config.ini de la aplicaci&oacute;n\");\n\t\t}\n\t}", "title": "" }, { "docid": "9292e6a41d3cb02f4eb2c16a46c6682c", "score": "0.62882555", "text": "public function __construct()\n {\n $this->session = new SessionService();\n }", "title": "" }, { "docid": "3cf181ed1a81c676ee0928f89efedb10", "score": "0.6277914", "text": "public function __construct()\n\t{\n\t\tif (session_id() === '') {\n\t\t\tsession_start();\n\t\t}\n\n\t\t// SI la session n'est pas initialisé\n\t\tif (!isset($_SESSION['auth'])) {\n\t\t\t$_SESSION['auth'] = false;\n\t\t\t$this->setAttr('id', 0);\n\t\t\t$this->setAttr('username', '');\n\t\t\t$this->setAttr('email', '');\n\t\t\t$this->setAttr('roles', array());\n\t\t}\n\t}", "title": "" }, { "docid": "136adea9fb8b18ec248ee7b961b9df44", "score": "0.6243754", "text": "public function __construct() {\r\n\t\tsession_start();\r\n\t}", "title": "" }, { "docid": "30d3233cf59067313e4b610610c1b20e", "score": "0.6233894", "text": "public static function init(){\n\t\tsession_start();\n\t}", "title": "" }, { "docid": "39bc110dbd042fae7f07b7e9f4d1a6bf", "score": "0.623271", "text": "public function setSession() {\n\t $_SESSION['username'] = $this->username;\n\t $_SESSION['empstartrow'] = (int)$this->empstartrow;\n\t $_SESSION['csrftoken'] = $this->csrftoken;\n\n\n\t $_SESSION['id'] = $this->id;\n\t $_SESSION['utilizador'] = $this->username;\n\t $_SESSION['pede_pwd'] = $this->pede_pwd;\n\n $_SESSION['manutencao'] = $this->username;\n\t $_SESSION['perfil'] = $this->username;\n\t $_SESSION['lang'] = $this->lang;\n\n\t }", "title": "" }, { "docid": "66e79c1bacf7a253de19cfbd0504b4b3", "score": "0.6231649", "text": "public function __construct() {\n session_start();\n }", "title": "" }, { "docid": "edb0022660ff1ca641cae5b4de7d7ae6", "score": "0.6229305", "text": "public function session();", "title": "" }, { "docid": "7eb542d3e8fc5c3eeb9ba1f73bbdca17", "score": "0.6222367", "text": "function __construct() {\n\t\tdefine('ROOT',getcwd().DIRECTORY_SEPARATOR);\n\t\tif (!(is_dir((ROOT.'session_folder')))){\n\t\t\tmkdir(ROOT.'session_folder', 0700);\n\t\t\tdefine('SESSIONS_FOLDER',ROOT.'session_folder'.DIRECTORY_SEPARATOR);\n\t\t}\n\t\telse {\n\t\t\tdefine('SESSIONS_FOLDER',ROOT.'session_folder'.DIRECTORY_SEPARATOR);\n\t\t}\n\t\t$this->dbconnection = new db();\n\t}", "title": "" }, { "docid": "54ca79557c0da524da892d13828f94a5", "score": "0.6219382", "text": "private function __construct()\n {\n session_start();\n }", "title": "" }, { "docid": "ce005bf30103b8c673648242ce154949", "score": "0.6215495", "text": "function __construct() {\r\n\t\tsession_start();\r\n\t}", "title": "" }, { "docid": "502bacb81d593aa232223d0bc217aa71", "score": "0.62046516", "text": "public function __construct() {\r\n $this->token = md5(session_id());\r\n $this->db = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);\r\n \r\n $this->Init();\r\n }", "title": "" }, { "docid": "51e8b9d544a3d207c8d8b2eee30b8528", "score": "0.6202049", "text": "public function getSession();", "title": "" }, { "docid": "51e8b9d544a3d207c8d8b2eee30b8528", "score": "0.6202049", "text": "public function getSession();", "title": "" }, { "docid": "51e8b9d544a3d207c8d8b2eee30b8528", "score": "0.6202049", "text": "public function getSession();", "title": "" }, { "docid": "a39237e44cffb0fb923e2598fb7cc9fd", "score": "0.6176132", "text": "protected function sec_session_start() {\n session_start(); // Avvia la sessione php.\n session_regenerate_id(); // Rigenera la sessione e cancella quella creata in precedenza.\n }", "title": "" }, { "docid": "6b15ffba6c77c2715eace0f7e1fa30f1", "score": "0.61728257", "text": "public function init()\n {\n\t\t$this->ses \t= new Zend_Session_Namespace('MyApp');\n\t\t\n\t\t//$registry\t= Zend_registry::getInstance();\n \t$this->DB\t= Zend_registry::get('front_db');\n \t\n//\t\tif (!isset($this->ses->id))\n//\t\t{\n//\t\t\t$this->_redirect('/login');\n//\t\t}\n//\t\telse\n//\t\t{\n////\t\t\t$this->gethelper('viewRenderer')->view->assign('user_id',$this->ses->id); \n////\t\t\t$response = $this->getResponse();\n////\t\t\t$response->insert('menu',$this->view->render('menu.phtml'));\t\t\n//\t\t}\n }", "title": "" }, { "docid": "e7092d3105ac6445366438221feebd7a", "score": "0.6169834", "text": "public function getSessao() {\n if (!$this->sessao) {\n $this->sessao = new Container(self::nomeAplicacao);\n }\n return $this->sessao;\n }", "title": "" }, { "docid": "77d0092dda57da861f6d5ef933e92478", "score": "0.6160034", "text": "function utopia_session()\n\t{\n\t\t$this->_session = self::_getKey($this->extKey);\n\t\t\n\t\tif (!is_array($this->_session)){\n\t\t\t\n\t\t\t$user = $this->getUser();\n\t\t\t$this->_session = array(\n\t\t\t\t'creator' => array(\n\t\t\t\t\t'type' => strtolower(TYPO3_MODE),\n\t\t\t\t\t'id' => $user->user['uid']\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t\tif (isset($this->_session['t3d']) && file_exists($this->_session['t3d']))\n\t\t{\n\t\t\t$this->_loadT3DHeader();\n\t\t\t//var_dump($this->_t3dHeader['meta']['session']);\n\t\t\t$this->_session = $this->_t3dHeader['meta']['session'];\n\t\t\tif(!is_array($this->_session['creator']))\n\t\t\t{\n\t\t\t\t$user = $this->getUser();\n\t\t\t\t$this->_session['creator']['type'] = strtolower(TYPO3_MODE);\n\t\t\t\t$this->_session['creator']['id'] = $user->user['uid'];\t\t\n\t\t\t}\n\t\t\t//var_dump($this->_session);\n\t\t}\n\t}", "title": "" }, { "docid": "cfabeaa4ae35995f24d6cc7ce3ee7c7e", "score": "0.6147712", "text": "public function __construct() {\n if(!session_id()) {\n session_start();\n }\n }", "title": "" }, { "docid": "9aa7cbedf40ea38f4dc49c2db2ae7ddf", "score": "0.61456805", "text": "private function initSession()\n {\n $_SESSION['user'] = (object)[];\n $_SESSION['user']->group = 0;\n $_SESSION['user']->id = -1;\n }", "title": "" }, { "docid": "110e9762cd4cd440b903f7f360c10f8e", "score": "0.6144254", "text": "public function __construct() {\n $this->realPath = substr(dirname((new ReflectionClass(static::class))->getFileName()), 0, -10);\n $this->session = new \\OppCoreClasses\\Session\\SessionManager();\n }", "title": "" }, { "docid": "988c4ae55412443f41458b8e2a449792", "score": "0.6142824", "text": "public function __construct(){\n $this->em = clsDB::getInstance();\n $this->objSession = clsSession::getInstance();\n }", "title": "" }, { "docid": "3be6b602826fa4b88fecbef7369a2a31", "score": "0.6141746", "text": "function __construct(){\n session_start();\n }", "title": "" }, { "docid": "5ae681840eaaef9d533d37e7ed8fc1cc", "score": "0.61361235", "text": "public function __construct(){\n ini_set('session.save_path', STORAGE_PATH.DS.'sessions');\n ini_set('session.gc_maxlifetime', 57600);\n ini_set('session.cookie_lifetime', 57600);\n ini_set('session.cache_expire', 57600);\n ini_set('session.name', APP_NAME);\n session_start();\n\n }", "title": "" }, { "docid": "389c2a00b89d22b2a12b0d23cab1607c", "score": "0.6129764", "text": "function session(){\n\t\tSession::start();\n\t\tSession::set('User','Nama User');\n\t\tprint_r(Session::get('User'));\n\t\tSession::destroy();\n\t}", "title": "" }, { "docid": "df7f93082ee8d06b2c71d98b3db5cce1", "score": "0.61277753", "text": "function __construct() {\n parent::__construct();\n session_start();\n }", "title": "" }, { "docid": "0b4a27ea5bb33caffe140607f0f3837a", "score": "0.6124606", "text": "public function __construct()\n {\n session_start();\n }", "title": "" }, { "docid": "0b4a27ea5bb33caffe140607f0f3837a", "score": "0.6124606", "text": "public function __construct()\n {\n session_start();\n }", "title": "" }, { "docid": "a38a903d8d83bae172ab1d95e5019ee6", "score": "0.61239564", "text": "function initSession( )\n\t{\n\n\t}", "title": "" }, { "docid": "773f9e80953dff306f29e8236bc23022", "score": "0.61093783", "text": "function __construct()\r\n\t{\r\n\t\tparent::__construct();\r\n\r\n\t\tsession_start();\r\n\t\tsession_regenerate_id();\r\n\t}", "title": "" }, { "docid": "dcae319ecc55f2d26ec38f43c7069ba6", "score": "0.6104211", "text": "public static function init(){\n \n if (is_null(static::pull(\"security.token\"))){\n // if no security token available -> issue one and put it into session\n $security = new SecurityModel();\n static::push(\"security.token\", $security->getToken()); \n }\n \n }", "title": "" }, { "docid": "a047e8c07d9aee17d74f41ef680b8cdc", "score": "0.6082405", "text": "public function __construct()\r\n\t{\r\n\t\tif(session_id() == '') @session_start();\r\n\t}", "title": "" }, { "docid": "9387238764a6589ae18db6c0d53a5618", "score": "0.6074564", "text": "public function initialize()\n {\n $this->session();\n }", "title": "" }, { "docid": "f86b33d34e2e2401757bffe71ba16747", "score": "0.6072598", "text": "public function __construct(){\n\t\tsession_start();\n\t}", "title": "" }, { "docid": "748fc6060b0c5c7d8f22de9b1c2834f6", "score": "0.6070388", "text": "public static function init(){\n if(!isset($_SESSION)){\n session_start();\n }\n }", "title": "" }, { "docid": "35e7b975fe697a8224f309503d7adb6c", "score": "0.6069762", "text": "protected function _initSession()\n\t{\n\t\t$sessionConfig = Zend_Registry::get('config')->session;\n \tZend_Session::setOptions($sessionConfig->toArray());\n\t\t$session = new Zend_Session_Namespace('inssetairline', true);\n\t\treturn $session;\n\t}", "title": "" }, { "docid": "2bd838aec356ee4e00dcebb73c952ebe", "score": "0.6053612", "text": "public function __construct() {\n // called at new instance of SessionHelper() level\n }", "title": "" }, { "docid": "4af1b5397fea365695c9bb0c3cf052e5", "score": "0.6049724", "text": "public function createSession()\n {\n $_SESSION['kodexy'] = array(\n 'csrf' => randomString(32),\n 'messages' => array(),\n 'errorMessages' => array(),\n 'lastActivity' => time(),\n 'created' => time(),\n 'logged' => false,\n );\n }", "title": "" }, { "docid": "98e2af9f256fd9c37405e2e1cbea2c95", "score": "0.6049609", "text": "public function setSession()\n {\n $rolName = $this->getRoleNames();\n Session::put([\n /* 'rol_id' => $rol[0]['id'],*/\n 'name' => $this->name,\n 'email' => $this->email,\n 'rolName' => $rolName[0]\n ]);\n //}\n }", "title": "" }, { "docid": "0ded57535cb58db969ba1c4a90c0d7c1", "score": "0.60303", "text": "public function __construct(){\n\t\t$this->session = new Zend_Session_Namespace('MyClientPortal');\n\t\t$this->error = new Zend_Session_Namespace('MyClientPortalerror');\n\t}", "title": "" }, { "docid": "c91fa1deafcc080d44d98e8f9c3ccdff", "score": "0.60301083", "text": "function __construct() {\n $this->db = new db;\n $this->db->table = 'users';\n\n if(array_key_exists('user', $_SESSION)){\n if(array_key_exists('token',$_SESSION)){\n $check = $this->check($_SESSION['user']['username'], $_SESSION['token']);\n if(!check) {\n $session_unset();\n $this->guest();\n }\n } else {\n $this->guest();\n } \n } else {\n $this->guest();\n }\n }", "title": "" }, { "docid": "6d174d653cc5c5841567b9afb3f56c34", "score": "0.6029912", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->KoreksoftModel->checkSession(); // dilempar ke login page kalau session habis\n\t}", "title": "" }, { "docid": "b8e6bf31bc2a5a6d7cd2fe6962920e3c", "score": "0.60208476", "text": "public function initSession() {\n $cookie = '';\n if(!empty($_COOKIE[$this->config->config['session']['cookieName']])) {\n $cookie = $_COOKIE[$this->config->config['session']['cookieName']];\n if((bool)$this->config->config['session']['encriptCookie']) {\n $cookie = Cription::decript($cookie, $this->config->config['session']['encriptKey']);\n }\n $cookie = unserialize($cookie);\n if(!is_array($cookie)) $cookie = array();\n $this->session = array_merge($this->session, $cookie);\n }\n }", "title": "" }, { "docid": "816502806dc8b3a4368a128ef96f09a9", "score": "0.6020221", "text": "private function inizializzazione()\n {\n\n $token = bin2hex(openssl_random_pseudo_bytes(16));\n $partenza = new Partenza();\n\n $_SESSION[$token] = $partenza;\n\n $this->vaiDataPiuStruttura($token);\n exit;\n\n }", "title": "" }, { "docid": "2b3f71ad7dd5dcd8ccbb18975395f4fd", "score": "0.6017058", "text": "public static function init()\n {\n if (empty(\\Tygh::$app['session']['embedded'])) {\n \\Tygh::$app['session']['embedded'] = array();\n }\n\n \\Tygh::$app['session']['embedded']['enabled'] = false;\n }", "title": "" }, { "docid": "befc6d14e8e50e74f199cb3ae6a581cc", "score": "0.6007051", "text": "public function __construct(){\n session_start();\n }", "title": "" }, { "docid": "e980666a4010cd9b6a896aa8429653c5", "score": "0.59911686", "text": "public function init() {\n $sessions = new Zend_Session_Namespace('expireAll');\n\n if ($sessions->usuari != \"admin\") {\n $this->redirect(\"Login/index\");\n }\n }", "title": "" }, { "docid": "159527bbe203d6717a9ffa419c0e8abd", "score": "0.59761196", "text": "function MyApp_Session_User_Init()\n {\n $this->GoHTTPS();\n if (!$this->MyApp_Session_User_InitBySID())\n {\n $this->MyApp_Session_User_InitByAuth();\n }\n }", "title": "" }, { "docid": "9144f522f52c2a459d71b05c8e5deed2", "score": "0.59730273", "text": "protected function config()\n\t{\n\t\t$this->setTimeout(0, LocalConfiguration::get('session.timeout.time'));\n\t\tself::setCookieParam('lifetime', 0);\n\t\t$this->setPath(Application::getCurrent()->hasPath('session') ? Application::getCurrent()->getPath('session') : Enviroment::getPath('session'));\n\t\t$this->id\t\t\t\t\t\t\t= session_id();\n\t\t$this->name\t\t\t\t\t\t\t= $this->getCustomName();\n\t\tself::$cookieParams['lifetime']\t\t= self::getCookieParam('lifetime');\n\t\tself::$cookieParams['path']\t\t\t= self::getCookieParam('path');\n\t\tself::$cookieParams['domain']\t\t= self::getCookieParam('domain');\n\t\tself::$cookieParams['secure']\t\t= self::getCookieParam('secure');\n\t\t$this->sessFile\t\t\t\t\t\t= $this->getPath() . Enviroment::DIR_SEP . 'sess_' . $this->id;\n\t}", "title": "" }, { "docid": "bc7ef59fe3caea10c7d584e05d9a5471", "score": "0.59666055", "text": "private function createSession(){\r\n // php automatically serializes the object\r\n // and will automatically unserialize it\r\n\r\n $_SESSION['usrData'] = $this;\r\n\r\n }", "title": "" }, { "docid": "8589ec6a3ecd202ce04af34ce62555be", "score": "0.5958139", "text": "public function init()\r\n {\r\n $parametrosNamespace = new Zend_Session_Namespace('parametros');\r\n $parametrosNamespace->unlock();\r\n if(!$parametrosNamespace->username){\r\n $r = Zend_Controller_Action_HelperBroker::getStaticHelper('redirector');\r\n $r->gotoUrl('/menus/menu')->redirectAndExit();\r\n }\r\n $parametrosNamespace->lock();\r\n }", "title": "" }, { "docid": "d19eaf2f5dc039a50c5a59d43d3ee03f", "score": "0.5955109", "text": "public function init()\n {\n $this->session = Yii::$app->session;\n $this->cookies = Yii::$app->response->cookies;\n }", "title": "" }, { "docid": "f7187d9994f3040aaebf64be9d1827d6", "score": "0.59538686", "text": "function __construct() {\n\t \n\tsession_start();\n\t\n\tglobal $user;\n \n global $windbloom;\n \n # Configuraci—n del Framework\n \n $this->framework = $windbloom;\n \n $this->user = $user;\n \n # Textos para la plantilla\n \n $this->username = 'Username';\n \n $this->title = \"Login\";\n\t\n\t$this->crypt = 'W1nD';\n \n }", "title": "" }, { "docid": "e28ed928e93c3a0e2129f787ee5c41c7", "score": "0.59424114", "text": "public static function init() {\n if (!isset($_SESSION)) {\n session_start();\n }\n }", "title": "" }, { "docid": "9d346bca6f4333ba1692cdd9a01f35ad", "score": "0.5941173", "text": "public function __construct($user = null) \n {\n $this->_db = DB::getInstance();\n $this->_sessionName = Config::get('session/session_name');\n $this->_cookieName = Config::get('remember/cookie_name');\n\n\n if (!$user) {\n if (Session::exists($this->_sessionName)) {\n $user = Session::get($this->_sessionName);\n \n if ($this->find($user)) {\n $this->_isLoggedIn = true;\n } else {\n // process logout\n }\n // echo \"pegou usuario da sessao\";\n } else {\n// echo 'nao tem valor nenhum na sessao e nao foi passado nada no construtor<br>';\n// echo '-- Valor da sessao:';\n// echo '<pre>';\n// print_r($_SESSION);\n// echo '</pre>';\n }\n } else {\n $this->find($user);\n }\n }", "title": "" }, { "docid": "1e616cbd282a02afbc12a2bc822be6f1", "score": "0.59160537", "text": "public function __construct()\n {\n //Se verifica si existe en la carpeta model un archivo Sessiones\n $this->crearModelo = $this->modelo(\"Aprendiz\");\n }", "title": "" }, { "docid": "50e4d3b933b72bf2c8853ca40a6b6ffa", "score": "0.5910985", "text": "private function init() {\n if (strlen($this->sessionId) == 0) {\n $params = array(\n 'user_auth' => array(\n 'user_name' => $this->getSugarLogin(),\n 'password' => md5($this->getSugarPassword()),\n ),\n );\n\n $result = $this->sendRequest('login', $params);\n\n if ($result !== false && isset($result->id)) {\n $this->sessionId = $result->id;\n }\n }\n }", "title": "" }, { "docid": "1b0aaa82e2d60ad2511cc50454133bb1", "score": "0.5909922", "text": "public function __construct() {\n \n \n\t self::$encryption=new Encryption();\n\t self::$sessionhandler2=new SecureSessionHandler();\n\t}", "title": "" }, { "docid": "50579a6a1c90086b670a20d16ffb86b2", "score": "0.58999383", "text": "public function initialize()\n {\n $this->setSchema(\"finance\");\n $this->setSource(\"user\");\n $this->session = $this->getDI()->getSession();\n }", "title": "" }, { "docid": "eda31ee4f536493a9f0087b6b2b36a2d", "score": "0.5881577", "text": "public function startSession();", "title": "" }, { "docid": "e55a75e2911deeb96226456042461fd5", "score": "0.58804166", "text": "public function _construct(){\n\t\tparent::_construct();\n\t\t$this->load->library('session');\n\t}", "title": "" }, { "docid": "8c2a55fe0a8bb46332a3f5bd65a6eb38", "score": "0.5878368", "text": "public function getSession() {\n\t $this->username = isset($_SESSION['username']) ?\n\t $_SESSION['username'] : null;\n\t $this->empstartrow = isset($_SESSION['empstartrow']) ?\n\t (int)$_SESSION['empstartrow'] : 1;\n\t $this->csrftoken = isset($_SESSION['csrftoken']) ?\n\t $_SESSION['csrftoken'] : null;\n\t $this->id = isset($_SESSION['id']) ?\n\t $_SESSION['id'] : null;\n\t $this->pede_pwd = isset($_SESSION['pede_pwd']) ?\n\t $_SESSION['pede_pwd'] : null;\n\t $this->lang = isset($_SESSION['lang']) ?\n\t $_SESSION['lang'] : 0;\n\t }", "title": "" }, { "docid": "d499091d5c76a3270ffddb9f056a8657", "score": "0.5875858", "text": "public function init() {\n// $session->open();\n// if (empty($_SESSION['userid'])) {\n// return $this->redirect('index.php?r=login');\n// }\n }", "title": "" }, { "docid": "d26f2021eda575377155326444f8a9ae", "score": "0.5873136", "text": "public function init()\n {\n //$this->_iLifeTime = get_cfg_var(\"session.gc_maxlifetime\");\n $this->_iLifeTime = 4 * 60 * 60;\n session_set_save_handler(\n array(&$this, 'open'),\n array(&$this, 'close'),\n array(&$this, 'read'),\n array(&$this, 'write'),\n array(&$this, 'destroy'),\n array(&$this, 'gc')\n );\n\n if(!isset($_SESSION)){\n session_start();\n }\n }", "title": "" }, { "docid": "858dc9a18c5a1937f020dee816e71919", "score": "0.58679193", "text": "public function getSessionHandler();", "title": "" }, { "docid": "919e937c5f7d3693f36f7b20f76f9cb7", "score": "0.58676404", "text": "public function set_session()\n {\n $this->assign_attribute('session_id', static::encrypt($this->username . microtime(true) . $this->password));\n }", "title": "" }, { "docid": "7d8ac72f9a1318794b7c7aa08bbf1f85", "score": "0.5864732", "text": "public static function load()\n {\n static::start(Config::get('session.driver'));\n static::$instance->load(Cookie::get(Config::get('session.cookie')));\n }", "title": "" }, { "docid": "fe31becfa0344b371808fcbe379c48db", "score": "0.5863276", "text": "public function create() {\n if (!isset($_SESSION)) {\n session_start();\n }\n \n }", "title": "" }, { "docid": "47f27e44bbe5a366ac7133451c355727", "score": "0.5856736", "text": "public function rvps_init_session(){\r\n\t\t\t$session_name = $this->rvps_session_name();\r\n\r\n\t\t\tif(!isset($_SESSION[$session_name])){\r\n\r\n\t\t\t\t\t$_SESSION[$session_name] = serialize(array());\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "446dc9f94e65045590af81574e518a20", "score": "0.58508855", "text": "public function __construct()\r\n {\r\n global $oDB;\r\n if($this->is_logingout())\r\n {\r\n //Destruye la sesion\r\n $this->logout();\r\n }\r\n //$_GET[\"action\"]!=\"logout\"\r\n else\r\n {\r\n $this->oDB = $oDB;\r\n $this->_login = $_POST[\"txtLogin\"];\r\n $this->_password = $_POST[\"pasPassword\"];\r\n \r\n \r\n //Si no hay usuario en sesion\r\n if(!$this->is_user_logged())\r\n //Comprueba si el acceso es válido incluye vacios\r\n if($this->is_valid_login())\r\n {\r\n $this->set_user_in_session();\r\n }\r\n else\r\n {\r\n $this->_is_correct = false;\r\n $this->_user_logged = array();\r\n $this->logout();\r\n }\r\n }\r\n }", "title": "" }, { "docid": "e88e723602f801829d45eb8935c980b7", "score": "0.5845948", "text": "function iniciarsesion($data)\n {\n session_start();\n $_SESSION['USUARIO'] = $data['USUARIO'];\n $_SESSION['ID'] = $data['ID'];\n $_SESSION['ROL'] = $data['ROL'];\n $_SESSION['URL'] = URL . $data['ROL'] . 's';\n }", "title": "" }, { "docid": "9b8825aff62177d02a680ca852c2b89d", "score": "0.58458817", "text": "public function __construct(){\n\t\tsession_start();\n\t\tparent::__construct();\n\t\tif ( !isset($_SESSION['username'])){\n\t\t\tredirect(base_url()); // Redirecciona la controlador \"admin/indrex\"\n\t\t}//var_dump(session_get_cookie_params()); //Muestra el valor de la variable\n\t}", "title": "" }, { "docid": "3a0a6952b0696155055797fa3003b48c", "score": "0.58394766", "text": "public function __construct () {\n $this->movie_model = MovieModel::getMovieModel();\n if (session_status() == PHP_SESSION_NONE) {\n session_start();\n }\n if(!isset($_SESSION['user'])) {\n $_SESSION['user'] = false;\n }\n if(!isset($_SESSION['admin'])) {\n $_SESSION['admin'] = false;\n }\n if (!isset($_SESSION['movie_genres'])) {\n $genres = $this->movie_model->getMovieGenres();\n $_SESSION['movie_genres'] = $genres;\n }\n }", "title": "" }, { "docid": "14a2cd9d3e3d6831ed84c1e7aa4d1194", "score": "0.5834454", "text": "public function __construct()\n\t\t{\n\t\t\tparent::__construct();\n\n\t\t\t//Restringuir acceso para usuarios que no estan logeados\n\t\t\t//Validacion para el login para que al momento de escribir en la url no se pueda acceder a inicio sin estar logeado\n\t\t\tsession_start();\n\t\t\tif(empty($_SESSION['login']))//si no existe la variable de sesion osea si el id no es true no accedera de lo contrario si existe continua todoe el proceso\n\t\t\t{\n\t\t\t\theader('Location: '.base_url().'/login');\n\t\t\t}\n \n\t\t}", "title": "" }, { "docid": "6bae7d2978c1b49f2dcedaa0b616e999", "score": "0.5829355", "text": "public function init()\n {\n parent::init();\n $this->_persistenceSessionTTL = self::$_defaultPersistenceSessionTTL;\n }", "title": "" }, { "docid": "3e1d9d575afcd73a78f679fb230f8e0d", "score": "0.5826504", "text": "function admin_sessao(String $email=\"\",String $senha=\"\"){\n # $this->database()->push($this->admin_sessao_object()->database, array(array(\"email\"=>\"[email protected]\",\"senha\"=>md5(\"12345\"))));\n\n if(empty($email) && $email===$senha){\n $sessid = $this->admin_sessao_object()->session();\n unset($sessid->senha);\n return $sessid;\n } else {\n return $this->admin_sessao_object()->connect($email, $senha);\n }\n }", "title": "" }, { "docid": "5f51deb582a42e6f0b37b93320b75d39", "score": "0.58261496", "text": "function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->library('session');\n\t\t$this->load->library('encrypt');\n\t\t// Si la sesion no tiene datos, redireccionarlo fuera del sistema\n \t\t/*\n \t\t* Tabla de Roles:\n \t\t* 1.- Super Administrador\n \t\t* 2.- Administrador\n \t\t* 3.- Capturista\n \t\t*/ \n\t}", "title": "" }, { "docid": "08da7aa44e422c4e4f8c7ca0a288c55f", "score": "0.58244526", "text": "function CreateSession()\n\t{\n\t\t$this->DB->Execute ( \"INSERT INTO `\" . reg(\"jf/session/table/name\") . \"` (`\" . reg(\"jf/session/table/UserID\") . \"`,`\" . reg(\"jf/session/table/SessionID\") . \"`,`\" . reg(\"jf/session/table/LoginTimestamp\") . \"`,`\" . reg(\"jf/session/table/LastAccessTimestamp\") . \"`,`\" . reg(\"jf/session/table/IP\") . \"`) VALUES (?,?,?,?,?)\", 0, session_id (), time (), time (), $this->IP );\n\t}", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "5e18808e84542bbc34fda038da1f075f", "score": "0.0", "text": "public function create()\n{\nreturn view('laravel.create');\n}", "title": "" } ]
[ { "docid": "06ec3b32b9b222f39c5dee97c3ecbb36", "score": "0.7939633", "text": "public function create()\n\t{\n\t\treturn view('admin.resource.create');\n\t}", "title": "" }, { "docid": "1e65cd3b7532e9fb4c8629f59550be03", "score": "0.7734893", "text": "public function create()\n\t{\n\t\treturn view('admin.resources.create');\n\t}", "title": "" }, { "docid": "03bfd9797acc7936efbf149267039e5d", "score": "0.77260846", "text": "public function create()\n {\n return view('resource.create');\n }", "title": "" }, { "docid": "03bfd9797acc7936efbf149267039e5d", "score": "0.77260846", "text": "public function create()\n {\n return view('resource.create');\n }", "title": "" }, { "docid": "ffef4ac93b8831ae51d698379f4d9c1b", "score": "0.76836234", "text": "public function create()\n\t{\n\t\treturn view('resources.create');\n\t}", "title": "" }, { "docid": "63ad7fad99855a56a3b8abf3768cf47e", "score": "0.76252395", "text": "public function create()\n {\n return $this->showForm(\"create\");\n }", "title": "" }, { "docid": "139c49a6b5671df4af660eea4515972f", "score": "0.7600047", "text": "public function create()\n {\n return view('resources/form');\n }", "title": "" }, { "docid": "a6c7271eaebfd5b50fc91fc80fb19496", "score": "0.7468657", "text": "public function create()\n\t{\n\t\treturn view('forms.create');\n\t}", "title": "" }, { "docid": "6839a79b61064ed2d6b3c87e3aff015a", "score": "0.7459504", "text": "public function create()\n\t\t{\n\t\t\t\t// redirect to the form for creating a new entry inside the db\n\t\t\t\treturn view('create');\n\t\t}", "title": "" }, { "docid": "c21d88e95f75db4b51a6283406449c62", "score": "0.74483985", "text": "public function create()\n {\n //\n return view('resources.create');\n }", "title": "" }, { "docid": "53d013f46afef2a72260a723badd83b2", "score": "0.7388776", "text": "public function ShowForm() {\n return view('create');\n }", "title": "" }, { "docid": "b8d67d3c176a25f495b53af4d1b3e1a3", "score": "0.7346452", "text": "public function new()\n {\n $this->addBreadcrumb($this->instance, 'new');\n $this->authorize('create', $this->resourceType);\n\n return $this->view('new')\n ->with('type', $this->resourceType)\n ->with('instance', $this->instance)\n ->with('isUpdate', false);\n }", "title": "" }, { "docid": "b02f187b18d57a59d040d78094241c78", "score": "0.73457384", "text": "public function create_new()\n\t{\n\t\treturn View::make('admin.suppliers.create_supplier_form'); \n\t}", "title": "" }, { "docid": "4b843526f491cc00abff867e0dcae2bc", "score": "0.73384815", "text": "public function create()\n {\n $this->authorize('create', $this->getResourceModel());\n\n $class = $this->getResourceModel();\n return view($this->filterCreateView('_resources.create'), $this->filterCreateViewData([\n 'record' => new $class(),\n 'resourceAlias' => $this->getResourceAlias(),\n 'resourceRoutesAlias' => $this->getResourceRoutesAlias(),\n 'resourceTitle' => $this->getResourceTitle(),\n ]));\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "a80df900a28f26c9116cae9aec9ae74b", "score": "0.7249939", "text": "public function create()\n\t{\n\t\treturn view(\"PO.form\");\n\t}", "title": "" }, { "docid": "6e54ebe7445f04b4e2540c09999df2ed", "score": "0.7249304", "text": "public function create()\n\t{\n\t\treturn view(\"retur-pembelian.form\");\n\t}", "title": "" }, { "docid": "7f97efa8cb776b86e66d91838826ac4e", "score": "0.72424", "text": "public function create()\n\t{\n\t\treturn View::make('forms.create');\n\t}", "title": "" }, { "docid": "8832246a5df8f4c7afcc8e46925833e8", "score": "0.72392076", "text": "public function create()\n {\n return view(self::VIEW_PATH_NAME . '.form');\n }", "title": "" }, { "docid": "83219f179e8e94a735c68ba031340531", "score": "0.7238169", "text": "public function create()\n {\n // TODO: return view with form\n }", "title": "" }, { "docid": "6cf89a013084a50bc3817996f9e0c883", "score": "0.72137976", "text": "public function actionCreate()\n {\n $this->renderPartial('form', array('scenario'=>'create'), false, true);\n }", "title": "" }, { "docid": "bff0d963f5957fded51be0c1b9cc5b0d", "score": "0.7155907", "text": "public function actionCreate()\r\n {\r\n $resource = new Resource();\r\n $typeResource = TypeResource::find()->all();\r\n \r\n\r\n if ($resource->load(Yii::$app->request->post()) && $resource->save()) {\r\n\r\n return $this->redirect(['view','id' => $resource->id]);\r\n\r\n }\r\n\r\n return $this->render('create',[\r\n 'resource' => $resource,\r\n 'typeResource' => $typeResource\r\n ]);\r\n }", "title": "" }, { "docid": "f94b74924ee0cca1c87e741d9a20dc31", "score": "0.7134313", "text": "public function create() {\n $viewData = $this->getDefaultViewData();\n $viewData[\"mode\"] = \"ADD\";\n $viewData[\"student\"] = new Student();\n\n return view('pages.students.form', $viewData);\n }", "title": "" }, { "docid": "9736289698140cf16452b76256ddbe3c", "score": "0.713098", "text": "public function create()\n {\n $permissions = PermissionGroup::get();\n $pageTitle = trans(config('dashboard.trans_file').'add_new');\n $submitFormRoute = route('roles.store');\n $submitFormMethod = 'post';\n return view(config('dashboard.resource_folder').$this->controllerResource.'form', compact('permissions', 'pageTitle', 'submitFormRoute', 'submitFormMethod'));\n }", "title": "" }, { "docid": "e1317794bf2d1789fb3df24f34664b93", "score": "0.7128814", "text": "public function create()\n {\n return view('admin.' . $this->obj_name . '.form');\n }", "title": "" }, { "docid": "1d24e602d0fddfe9bed3a8265b26b901", "score": "0.7128243", "text": "protected function newAction()\n {\n return $this->renderForm('new');\n }", "title": "" }, { "docid": "da898f34b0c52bea25c9b79c320b2dda", "score": "0.71265686", "text": "public function create()\n {\n return view('paperforms.create');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "750adc77c36f18c747b430100ee399b2", "score": "0.7114242", "text": "public function create()\n\t{\n\t\treturn view('supir.create');\n\t}", "title": "" }, { "docid": "21b741286121defb618cafb010ad9311", "score": "0.7101174", "text": "public function create()\n {\n return view('admin.crud.edit-new');\n }", "title": "" }, { "docid": "e9b21b0a79fd33b3521e801165da14b6", "score": "0.71004754", "text": "public function create()\n {\n // HTML FORM TO SHOW THE FORM WHERE ROLE CAN BE CREATED\n }", "title": "" }, { "docid": "653c27662115e09b10c289bcc247b0ed", "score": "0.7085364", "text": "public function create()\n {\n return view('backend.Faces.form');\n }", "title": "" }, { "docid": "f95a7ddf5c279983b88920ab48796002", "score": "0.70726883", "text": "public function create()\n {\n return view('asset::Admin/Form');\n }", "title": "" }, { "docid": "44edfc8de23a19733eb2da7dd143c6af", "score": "0.7069517", "text": "public function create()\n {\n return view('backend.pragyansubject.addform');\n }", "title": "" }, { "docid": "aaf039b41e70ea5c5580f174d0a32a5e", "score": "0.70679444", "text": "public function create()\n {\n return view('admin.addnew');\n }", "title": "" }, { "docid": "b5c63b58d384c1cc1e048d0ed39e9059", "score": "0.70607215", "text": "public function create()\n {\n //display the create form of a new item\n return view('items.create_form');\n }", "title": "" }, { "docid": "2564f7e29b410c07eef4654312bbe9bc", "score": "0.7060122", "text": "public function create()\n {\n $data['action'] = 'penjualan.store';\n return view('penjualan.form', $data);\n }", "title": "" }, { "docid": "2a113ccb1bc187d2ab6a5b9b7f32db35", "score": "0.70526356", "text": "public function newAction()\n {\n $this->view->newOrdenForm = new NewOrdenForm(null,array('required'=>''));\n $this->view->clienteForm = new ClienteNewForm(null,array('required'=>''));\n }", "title": "" }, { "docid": "2b3d89889319d795b9c5394468d0ea54", "score": "0.7052032", "text": "public function create()\n {\n return view('frontend.formulir'); \n }", "title": "" }, { "docid": "91cae3ef8fac8cbaf75c5bcaed69ef7a", "score": "0.7050331", "text": "public function create()\n {\n return view('perjadin.create');\n }", "title": "" }, { "docid": "bb6992f3db8b85054e34d06ac94efe13", "score": "0.70479286", "text": "public function create()\n {\n return view('fish-mgmt/create');\n }", "title": "" }, { "docid": "c064473eb86d48e72f7ffb601c196ae9", "score": "0.70187074", "text": "public function create()\n {\n //\n return view('Partners/Admin/form');\n }", "title": "" }, { "docid": "66b746538eaf7a550c7b3a12968b96a6", "score": "0.70147324", "text": "public function create()\n {\n return view('supplier.form');\n }", "title": "" }, { "docid": "66b746538eaf7a550c7b3a12968b96a6", "score": "0.70147324", "text": "public function create()\n {\n return view('supplier.form');\n }", "title": "" }, { "docid": "f61bf3a97df7312aaecce2030ad738da", "score": "0.700798", "text": "public function create(){\n config(['global.icon_content_title' => 'icon-bookmark']);\n config(['global.text_content_title' => 'Add Supplier']);\n config(['global.parent_text_content_title' => 'Suppliers']);\n\n //set submit route\n config(['global.submit_link' => 'store.supplier']);\n //set index route\n config(['global.index_link' => '/suppliers']);\n\n return view('supplier.create');\n }", "title": "" }, { "docid": "64c776e59f1522c2eaee823d173e2039", "score": "0.7004277", "text": "public function create()\n\t{\n\t\treturn view('product.new');\n\t}", "title": "" }, { "docid": "6d8ac76b2319312ec6d7c116d3c07dd5", "score": "0.69991225", "text": "public function create()\n {\n return view(\"admin.dokter.form\");\n }", "title": "" }, { "docid": "cd66cdfb79b8372ac27d1bcfeebf98ed", "score": "0.6994213", "text": "public function create()\n\t{\n\t\t// return View::make('avverbi.create');\n\t\treturn View::make('avverbi.edit');\n\t}", "title": "" }, { "docid": "12adf4e56f62b6fd6b2be421f733cdb4", "score": "0.698434", "text": "public function create()\n {\n return view( 'create' );\n }", "title": "" }, { "docid": "9dcc76daa4540b48df51e0c54a0f942e", "score": "0.6982116", "text": "public function create()\n {\n return view('escola.form');\n }", "title": "" }, { "docid": "b9dcd814df4a67ac3130f45aff38f1ee", "score": "0.6968916", "text": "public function create()\n {\n return view('nbform.create');\n }", "title": "" }, { "docid": "a2b4f48997315d69d4a978b07c86041b", "score": "0.696862", "text": "public function create()\n {\n return view('jamkerja.add');\n }", "title": "" }, { "docid": "3eabc09401aef2dfb0754b7c694a026f", "score": "0.6963395", "text": "public function create()\n\t{\n\t\treturn View::make('phanhois.create');\n\t}", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.6962359", "text": "public function create()\n {\n return view('new');\n }", "title": "" }, { "docid": "6e09ea0495ecf33b6615199f96a87dd9", "score": "0.6958075", "text": "public function create()\n {\n return view('inventaris.create');\n }", "title": "" }, { "docid": "12098cfc6ac9ec83d75a978a0c5abde4", "score": "0.6956841", "text": "public function showCreateForm()\n {\n return view('posts.new');\n }", "title": "" }, { "docid": "ea30089b05638deecfcdcc640118738c", "score": "0.69564354", "text": "public function create()\n {\n return view('student.add');\n }", "title": "" }, { "docid": "aaad424e12d96a3efd02522d0acdf881", "score": "0.695643", "text": "public function create()\n {\n return view('actions.create');\n }", "title": "" }, { "docid": "219163df6bc3d5b0129ff62049e525c0", "score": "0.69501215", "text": "public function create()\n {\n return view('example.form');\n }", "title": "" }, { "docid": "0224b799194fa807284fdd74a5365a99", "score": "0.6949657", "text": "public function create()\n {\n return view('anggota.form');\n }", "title": "" }, { "docid": "e9d5ae41977e28632b79e3a6a94d5e87", "score": "0.69485426", "text": "public function create()\n {\n return view('Add');\n }", "title": "" }, { "docid": "bab776a4c16cf35a4a18dc0e698ea074", "score": "0.69469535", "text": "public function create()\n {\n return view(\"users.create_form\");\n }", "title": "" }, { "docid": "1c5fb8d39758b496bbe1461e2d19ee6b", "score": "0.6941957", "text": "public function newAction()\n {\n $entity = new Rio();\n $form = $this->createCreateForm($entity);\n\n return $this->render('AppBundle:Rio:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "14ece53d5ad54ed8cdddb207f598627a", "score": "0.6938155", "text": "public function create()\n {\n //adicionar\n $professores = Professor::all();\n $action = route('disciplinas.store');\n return view('admin.disciplinas.form', compact('action', 'professores'));\n }", "title": "" }, { "docid": "4dd85a7dd2279e41326acf30c85b837f", "score": "0.6929724", "text": "public function create()\n {\n return view('QuanTriVien.form');\n }", "title": "" }, { "docid": "978bcc6315cbc834f3ebe718240ae1d3", "score": "0.6928802", "text": "public function create()\n {\n return view('actions.create');\n }", "title": "" }, { "docid": "f36ee7fce6062ca5f8a13e9136a3aa5f", "score": "0.6926847", "text": "public function create()\n {\n //\n return view('admin.cars.add');\n }", "title": "" }, { "docid": "c4416390a701ec4941a20dc3ab095a2a", "score": "0.6919174", "text": "public function create()\n\t{\n\t\treturn view('create');\n\t}", "title": "" }, { "docid": "a93a79fd5f85cdfcd02d43c4b981bd37", "score": "0.6917769", "text": "public function create()\n {\n return view('admin.rehber.create');\n\n }", "title": "" }, { "docid": "d08acefd41013b35198e14cd32167263", "score": "0.6913158", "text": "public function create()\n {\n //\n return view('hod.hod_form');\n }", "title": "" }, { "docid": "efa6db85e06a4cb8b256acb0956225d4", "score": "0.6907753", "text": "public function create()\n\t{\n\t\treturn View::make('student.create');\n\t}", "title": "" }, { "docid": "2d2afb827796ab149976949e6f7f1657", "score": "0.6902585", "text": "public function create()\n\t{\n\t\treturn View::make('penilaians.create');\n\t}", "title": "" }, { "docid": "b026faf0a320028862c1ad2d3bb9025a", "score": "0.68951064", "text": "public function create()\n {\n return view('Libro.create');\n }", "title": "" }, { "docid": "aa1b2912cd7ceea8a2b811ee2651b393", "score": "0.68948513", "text": "public function create()\n {\n return view(\"information.create\");\n }", "title": "" }, { "docid": "a097895685f56669e51313d103d810e7", "score": "0.6894119", "text": "public function create()\n {\n return view('sale-cow.form');\n }", "title": "" }, { "docid": "db3a97e80baaa42e7f0f5bbe728a3432", "score": "0.6890917", "text": "public function actionCreate()\n {\n $model = $this->findModel();\n\n $this->saveModel($model);\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "6769fe63e35d4f98abe507728065b246", "score": "0.6890337", "text": "public function create()\r\n {\r\n return view('superadmin::create');\r\n }", "title": "" }, { "docid": "732fe73681252d8413ea359a6e09f8bb", "score": "0.6889954", "text": "public function create()\n {\n //\n return view('cars.new');\n }", "title": "" }, { "docid": "862bc40da984894b74df33cb4c0d4659", "score": "0.68857306", "text": "public function create()\n {\n return view ('anggota-new');\n }", "title": "" }, { "docid": "145cf1b2c8cc73b6dcddfbab958e798f", "score": "0.68844", "text": "public function create()\n {\n return view('ovhapi::create');\n }", "title": "" }, { "docid": "bfb90be64c471e95e334f369a13f5087", "score": "0.6882399", "text": "public function create()\n {\n //\n return view('Admin.Recom.add');\n }", "title": "" }, { "docid": "61dcb96ea6324e696f199e33bd9faa7f", "score": "0.6877785", "text": "public function create()\n\t{\n\t\t//add new car\n\t\treturn View::make('cars.create');\n\t}", "title": "" }, { "docid": "de77b116e66ae6b2ef708621f63ada16", "score": "0.6877583", "text": "public function create()\n {\n return view('manager.crud.create');\n }", "title": "" }, { "docid": "14cab6c0f95bbfd3db85915cbf823b72", "score": "0.6877049", "text": "public function create()\n\t{\n\t $config = $this->getFormData();\n\n return view('client.create', $config);\n\t}", "title": "" }, { "docid": "9337b2142bbd4240614c97696097e5e6", "score": "0.6876477", "text": "public function create()\n {\n return view( 'form.product', [\n 'isCreate' => true,\n 'categorys' => Category::all(),\n 'title' => 'New Product',\n 'product' => new Product(),\n 'navActive' => 'addProduct',\n ] );\n }", "title": "" }, { "docid": "f0df442854712f9c3ad7e77a1f7f3a88", "score": "0.68750143", "text": "public function create()\n {\n return view(\"cartera.create\");\n }", "title": "" }, { "docid": "a23b6ed7018a2e2dd2c29907dfbe28e0", "score": "0.6874092", "text": "public function create() {\n\t\treturn view( 'backend.career.create' );\n\t}", "title": "" }, { "docid": "15ba46136d8015267c72f493447d645a", "score": "0.6871153", "text": "public function create()\n {\n return view('materiku::create');\n }", "title": "" }, { "docid": "19bc1da827e1cabb7b0a120ffe2b00ed", "score": "0.6870422", "text": "public function create()\n {\n return view('additive/create');\n }", "title": "" }, { "docid": "e82caa6fdd89369a0306a198d2febd53", "score": "0.6865163", "text": "public function actionCreate()\n {\n $model = new ShowWith;\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": "354e1ae6b1f6e5a63b1294b3c9b61c1c", "score": "0.6864961", "text": "public function create()\n {\n return view('turno_new');\n }", "title": "" }, { "docid": "2a71d846a803ec0f01b511570f628c2f", "score": "0.686378", "text": "public function get_create()\n\t{\n\t\t$this->layout->title = 'New Relationship';\n\t\t$this->layout->content = View::make('relationships.create');\n\t}", "title": "" }, { "docid": "46163db00cf7d58cd76418e971c834ad", "score": "0.6862573", "text": "public function create()\n\t{\n\t\treturn view('palestra.create');\n\t}", "title": "" }, { "docid": "d46a9ae5fd9725a20632fb60f3ec32f6", "score": "0.6861084", "text": "public function adminCreate()\n {\n $configuration = $this->getFormFieldData();\n $configuration ['title_name'] = trans('app.file_upload');\n $configuration ['title'] = trans('app.resources');\n $configuration ['back_to_list'] = route('app.resources.index');\n return view('admin.adminForm',$configuration);\n }", "title": "" }, { "docid": "1c0601360736a4b5109044192d5528ed", "score": "0.68608975", "text": "public function create()\n {\n $data = array();\n $data['add'] = trans('main.add');\n return view('service.form', $data);\n }", "title": "" }, { "docid": "c2f03754ef7971403714c63774c1d964", "score": "0.68597066", "text": "public function create()\n {\n return view('modules.products.form');\n }", "title": "" }, { "docid": "68eac3e9797e63312bcbb06b4b9195ef", "score": "0.6857692", "text": "public function create()\n {\n return view('mineral.create');\n }", "title": "" }, { "docid": "b6cf76e82d6be800a92287cc947f7fa7", "score": "0.68555033", "text": "public function newAction()\n {\n $entity = new Plancapacitacion();\n $form = $this->createForm(new PlancapacitacionType(), $entity);\n\n // Incluimos camino de migas\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem(\"Inicio\", $this->get(\"router\")->generate(\"hello_page\"));\n $breadcrumbs->addItem(\"Capacitaciones\", $this->get(\"router\")->generate(\"pantalla_modulo\",array('id'=>3)));\n $breadcrumbs->addItem(\"Plan de capacitaciones\", $this->get(\"router\")->generate(\"pantalla_capacitaciones\"));\n $breadcrumbs->addItem(\"Registrar plan\",\"\");\n \n return $this->render('CapacitacionBundle:Plancapacitacion:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" } ]
df1750bcf1b2b3e8537f3dd8beb0d939
Method without functionality to be used by tests.
[ { "docid": "0284384c7d882010fd703864e9a37ca5", "score": "0.0", "text": "private function setStatus($new= false) { }", "title": "" } ]
[ { "docid": "f57a70f96d60b85233e327e42c6c8bf0", "score": "0.6818577", "text": "public function testNothing()\n {\n\n }", "title": "" }, { "docid": "67ce527527ee07eec29ac82e3a7b14e6", "score": "0.6757947", "text": "protected function test(): void {\r\n\t\r\n\t}", "title": "" }, { "docid": "43f92be3429c65e3485a7292b4a44db5", "score": "0.67544025", "text": "public function noDocTest() {\n }", "title": "" }, { "docid": "9b5445223a44a5dc26a706bf19d511c8", "score": "0.66971457", "text": "function test(){\n\t\t// does nothing\n\t}", "title": "" }, { "docid": "3d1c60caad13e77194edc7cf1d8e479b", "score": "0.6494605", "text": "private function internalMethod() {}", "title": "" }, { "docid": "d5bae0c2c2ffdc2655623b3a46b6d912", "score": "0.6485652", "text": "public function testUnignore()\n {\n }", "title": "" }, { "docid": "1294a64db4fbd05830471e2e3c6f0bd8", "score": "0.6410524", "text": "public function testing()\n {\n }", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6399825", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6399825", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6399825", "text": "protected function setUp() {}", "title": "" }, { "docid": "93f723cece12d9e63f18b048631c2c35", "score": "0.6367867", "text": "public function testCase4()\n {\n\n }", "title": "" }, { "docid": "508bf5fc787a5b482a9b8d437c6e3362", "score": "0.632254", "text": "public function test_dummy() {\n }", "title": "" }, { "docid": "229049e8539c432d31ee4b44c55c9ae5", "score": "0.6295656", "text": "public function testIgnore()\n {\n }", "title": "" }, { "docid": "6a8eae956593e2c89aeb664a92059880", "score": "0.6268037", "text": "public function test_dummy()\n {\n\n }", "title": "" }, { "docid": "b1bba993278178bfbed577f770a1104a", "score": "0.61973923", "text": "private function testPrivateFunctionAreNotTested() {\n $this->assertTrue(false);\n }", "title": "" }, { "docid": "315afabb73122855fbfa48e2db5aa7a4", "score": "0.61564773", "text": "public function doNothing () {\n\t\treturn;\n\t}", "title": "" }, { "docid": "1d780c2cf6fa71ad9ef58d3195fb8539", "score": "0.61439985", "text": "public function noop() {}", "title": "" }, { "docid": "ebe881d4da7b58be0f402c8aeb9d076c", "score": "0.6137802", "text": "public function uselessFunction();", "title": "" }, { "docid": "89ca4431b7212c1043799ce76c18960a", "score": "0.6131691", "text": "public function testUnitClassGet()\r\n {\r\n\r\n }", "title": "" }, { "docid": "f53eef12cee0297b3e677af0bc24d183", "score": "0.61210585", "text": "public function testWellKnown()\n {\n }", "title": "" }, { "docid": "70b69d079b0da787fcc0366c102d9f6e", "score": "0.61131996", "text": "private function foo() {\n\t}", "title": "" }, { "docid": "fb2f51506c057acce8e115ca879d5f1b", "score": "0.6101796", "text": "final public function test() {}", "title": "" }, { "docid": "0a7e347590c40b85084addb6ed7dc3b1", "score": "0.60950834", "text": "private function __construct() \n {\n // Do nothing. \n }", "title": "" }, { "docid": "b4292b4fee3ba4e379546aab104f5943", "score": "0.60916126", "text": "private function __construct(){\r\n \r\n // do nothing -nm\r\n \r\n }", "title": "" }, { "docid": "0bc5c2790bc162fdde369cdc4aebbd95", "score": "0.60812795", "text": "function noop(){\r\n\t\t//nihil\r\n\t}", "title": "" }, { "docid": "82b2fec70d74bb46c033845355f283e5", "score": "0.6078061", "text": "private function __() {\n }", "title": "" }, { "docid": "82b2fec70d74bb46c033845355f283e5", "score": "0.6078061", "text": "private function __() {\n }", "title": "" }, { "docid": "33adc5be3a0865adcbc37ce899f0e150", "score": "0.60677093", "text": "private function __construct()\n {\n // do nothing\n }", "title": "" }, { "docid": "6c2b0b7b5d5dc9553a9561aa70d149cc", "score": "0.60634774", "text": "public function testMeGet()\n {\n }", "title": "" }, { "docid": "416227b0f6e675527634f8dc6e9d7385", "score": "0.6057168", "text": "private function foo()\n\t{\n\t}", "title": "" }, { "docid": "52c4cdc6ab067d82cdfdd72657bf8348", "score": "0.60505766", "text": "public function testOnHold()\n {\n }", "title": "" }, { "docid": "ae0e4cf035a847215576112b0b760ed0", "score": "0.6036678", "text": "public static function _before(): void {\n\t}", "title": "" }, { "docid": "93124821a42833ffc0feb95d20b3aa0f", "score": "0.6031502", "text": "protected function runTest() {\n\t\tthrow new Exception();\n\t}", "title": "" }, { "docid": "3cf2be063c069c7ca03765724f0b82c8", "score": "0.6008386", "text": "abstract public function testEmptyDefinition();", "title": "" }, { "docid": "abb09b588af0f23f967a1a75234ad917", "score": "0.60065305", "text": "public function testAdministrationRestExporterAdministrationGetDisallowedOperations()\n {\n\n }", "title": "" }, { "docid": "4ebd52c0b7876a77bdc55e29d808c122", "score": "0.5987121", "text": "public function testGetRendition()\n {\n }", "title": "" }, { "docid": "0c3d2c3c8dacce8965ffd2ef7164ee27", "score": "0.59817505", "text": "public function testEmpty() {\n }", "title": "" }, { "docid": "8cb7212bfa16c21de4494f64934df0f7", "score": "0.59539205", "text": "public function testOne()\n {\n }", "title": "" }, { "docid": "01437f4621bb370628ac21b7b8eef0e3", "score": "0.5953119", "text": "public final function __construct() {\n\t\t\t// do nothing\n\t\t}", "title": "" }, { "docid": "b81fc844c5ea28c754e5ef6447c85fa3", "score": "0.59521043", "text": "public function testCase3()\n {\n\n }", "title": "" }, { "docid": "e1216815dabcd8b79bf6c461712ddfc1", "score": "0.5941493", "text": "public function testIgnoreMe()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "6874fcb80227052b14592219fd7ef208", "score": "0.5934169", "text": "public function testOperationInfo()\n {\n }", "title": "" }, { "docid": "46b3172ab9c030e6b827856141dc43ef", "score": "0.5930822", "text": "public function testGetAuditApp()\n {\n }", "title": "" }, { "docid": "80276c0d67f7c66a404234a236f7477a", "score": "0.59251887", "text": "protected function before(){}", "title": "" }, { "docid": "d9820f801ae9ff9a4e7bfaef6bf15ef8", "score": "0.5921483", "text": "public function testUnitClassGetUnits()\r\n {\r\n\r\n }", "title": "" }, { "docid": "e0bb3ba32010be0674f93a7f57037236", "score": "0.5920034", "text": "function specified() {}", "title": "" }, { "docid": "327879126dc5d49405e05ec99e21b35b", "score": "0.59069", "text": "public function testCreateRendition()\n {\n }", "title": "" }, { "docid": "a4e06d236882c32d0f0471f0d47066e6", "score": "0.5903165", "text": "private function samplePrivate(){\n\t\t\n\t}", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.590197", "text": "final private function __construct() {}", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.590197", "text": "final private function __construct() {}", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.590197", "text": "final private function __construct() {}", "title": "" }, { "docid": "b1a19f33d9a2c0465574a2ce90dfe8b8", "score": "0.58932054", "text": "public function test_fetchBadData() {\n\n }", "title": "" }, { "docid": "e294e924100e455a44fe641132566bf1", "score": "0.5893177", "text": "protected abstract function setUp();", "title": "" }, { "docid": "e294e924100e455a44fe641132566bf1", "score": "0.5893177", "text": "protected abstract function setUp();", "title": "" }, { "docid": "03097b22415b1024947cb654de72a76d", "score": "0.5888611", "text": "public function noop() {\n\t\treturn;\n\t}", "title": "" }, { "docid": "292124b865e9b62ef99a3d8415d4ead8", "score": "0.5885344", "text": "public function testRetrieveOne12()\n {\n }", "title": "" }, { "docid": "0c608e2149c92a4748ebf1b87603fbef", "score": "0.5882093", "text": "public function setUp(){}", "title": "" }, { "docid": "020471d36ab634a80f78d29dfd6c2eb5", "score": "0.5879421", "text": "public function testGetSystem()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "781e992105ab5350d7b6803e68439e7c", "score": "0.587829", "text": "public function testExample()\n {\n }", "title": "" }, { "docid": "b121acf0fc98d2ce9aa2308a63b89c87", "score": "0.58734643", "text": "protected function before() { return; }", "title": "" }, { "docid": "bfa7322c2910b8c378180cce611918d5", "score": "0.5872571", "text": "public function smell();", "title": "" }, { "docid": "ef499155e3174d9654b238671f59ff50", "score": "0.58663094", "text": "public function testGetIntegrationConfigCurrent()\n {\n }", "title": "" }, { "docid": "f732fdcee964a5496882d7ff377f2a77", "score": "0.586046", "text": "public function testGetIntegration()\n {\n }", "title": "" }, { "docid": "d3b76527a7a9051f6a7b59a68cb442b3", "score": "0.58562905", "text": "function __construct() {\n\t\t/* do nothing */\n\t}", "title": "" }, { "docid": "7998ecb3024f9adfb928fe2100a28205", "score": "0.5855929", "text": "public function testFetchEmpty()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "7998ecb3024f9adfb928fe2100a28205", "score": "0.5855929", "text": "public function testFetchEmpty()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "3da8790d47463f08b06834b139df5f40", "score": "0.585155", "text": "public function testGetNetworkClientsApplicationUsage()\n {\n }", "title": "" }, { "docid": "8ba6fea1d0e39696768523aba8ded014", "score": "0.5850214", "text": "public function testGetSuprimentoPatrimonio()\n {\n }", "title": "" }, { "docid": "9d6ea403884f8e098072f06df1dc6533", "score": "0.58457357", "text": "public function testRetrieveAll22()\n {\n }", "title": "" }, { "docid": "eccf5004604e9b4a8036bc9641cf8f10", "score": "0.5845056", "text": "protected function setUp() {\n \n }", "title": "" }, { "docid": "eccf5004604e9b4a8036bc9641cf8f10", "score": "0.5845056", "text": "protected function setUp() {\n \n }", "title": "" }, { "docid": "eccf5004604e9b4a8036bc9641cf8f10", "score": "0.5845056", "text": "protected function setUp() {\n \n }", "title": "" }, { "docid": "f05d9bd87ccc2599a1910e63d9aa68e2", "score": "0.5842185", "text": "protected function tearDown() {}", "title": "" }, { "docid": "f05d9bd87ccc2599a1910e63d9aa68e2", "score": "0.5842185", "text": "protected function tearDown() {}", "title": "" }, { "docid": "f05d9bd87ccc2599a1910e63d9aa68e2", "score": "0.5842185", "text": "protected function tearDown() {}", "title": "" }, { "docid": "f05d9bd87ccc2599a1910e63d9aa68e2", "score": "0.5842185", "text": "protected function tearDown() {}", "title": "" }, { "docid": "9331bacb7232b06562d0a8f1d6c92f37", "score": "0.58369863", "text": "public function testGetPaymentDispute()\n {\n }", "title": "" }, { "docid": "91f795821f2c21ae17f365d4efeb1882", "score": "0.5827752", "text": "public function test_likeUnlike()\n\t{\n\t\t// Method tested via requesting classes\n\t\t$this->markTestSkipped('This method is tested via requesting classes.');\n\t}", "title": "" }, { "docid": "8e8437c67df3df580265180b826bad22", "score": "0.5823177", "text": "public function test014(){\n\t}", "title": "" }, { "docid": "4a77f3415074eb03e38fc6ddb1ba9627", "score": "0.58169425", "text": "public function before() {}", "title": "" }, { "docid": "56b748465696fd584cd40277cc15b61a", "score": "0.5814232", "text": "private function __construct()\n {\n // Do not instantiate.\n }", "title": "" }, { "docid": "57b6c593492ab34a9dbfb6453d360fc5", "score": "0.581373", "text": "public function testCase1()\n {\n\n }", "title": "" }, { "docid": "869ed7ddd708da0d12feeafd0b9fc85c", "score": "0.58109444", "text": "public function testUnitClassUpdate()\r\n {\r\n\r\n }", "title": "" }, { "docid": "69f4b63d65ca4caf2da5fd897b594c9b", "score": "0.58017397", "text": "abstract protected function setUpTest(): void;", "title": "" }, { "docid": "ed89259154d126b6c33d20b6b267de56", "score": "0.57964283", "text": "protected function _before()\n {\n }", "title": "" }, { "docid": "95ec5f4562f77d02680d4789ff46f0bb", "score": "0.57958263", "text": "final protected function __construct() {}", "title": "" }, { "docid": "9522c2107443e597b5ea1e52c9896562", "score": "0.57943547", "text": "public function testCase2()\n {\n\n }", "title": "" }, { "docid": "3a56ffc77bb170ff4aa5264e7a83b9b9", "score": "0.57896835", "text": "public function given() {}", "title": "" }, { "docid": "aa2c64a3c92b6b21d4d35d5ece12dc4b", "score": "0.578637", "text": "public function testGetCurrentUser()\n {\n }", "title": "" }, { "docid": "ef13bcf3b851b63541ec2c90a48b8b66", "score": "0.5786064", "text": "public function testCallNoMethodException()\n {\n $db = new Database();\n $db->connect($this->connection('sqlite'));\n $db->hack('users');\n }", "title": "" }, { "docid": "4d3ec4d120da4f4ba73783b84248d6ac", "score": "0.57819444", "text": "private final function __construct() {}", "title": "" }, { "docid": "87eded20838d1d5784e8f0c6155ac7b7", "score": "0.57816607", "text": "public function testElementGet()\r\n {\r\n\r\n }", "title": "" }, { "docid": "b3cc531e63bfde15b7cc43e653465e18", "score": "0.577985", "text": "public function testApplicationOnboardingDocUpload()\n {\n }", "title": "" }, { "docid": "2ea9c928278e1b70e35c562ed9e694ef", "score": "0.57784116", "text": "public function setup()\n {\n // noop\n }", "title": "" }, { "docid": "b3a776418e46e8bb89714e062d3e2b76", "score": "0.57727194", "text": "public function testGetRenditionContent()\n {\n }", "title": "" }, { "docid": "bcaac733c71db10695f4316c6f893037", "score": "0.5765294", "text": "public function dummyMethodToEnsureInstanceExists() {\n\t\t// intentionally empty\n\t}", "title": "" }, { "docid": "370f4c5664f161bcc31ad6273c8c499a", "score": "0.576411", "text": "abstract protected function setup();", "title": "" }, { "docid": "dc9bd87c2c29921c07ebbbec07562fe1", "score": "0.57629347", "text": "protected function tearDown()\n {\n // Do nothing here\n }", "title": "" }, { "docid": "7e87bb3b9f975e30c0a93647d3ed16ef", "score": "0.5750416", "text": "public function testGetSettings()\n {\n }", "title": "" }, { "docid": "b1602feeb493789825caae809b27a5ad", "score": "0.5750284", "text": "protected function __construct()\n {\n // do nothing\n }", "title": "" }, { "docid": "8d73025ec35fb907cd0669b7d81a29f2", "score": "0.57494766", "text": "public static function spy()\n {\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "ff2a6fa705342e78601dd5f0ebc6c31a", "score": "0.0", "text": "public function index()\n {\n $rekam_medis = DB::table('h_rekam_medis')->select('h_rekam_medis.id_rm', 'h_rekam_medis.id_pasien')->join('d_pasien', 'h_rekam_medis.id_pasien', '=', 'd_pasien.id_pasien')->get();\n return view('rekam_medis.rekamedis', [\n 'list_rekam_medis' => $rekam_medis\n ]);\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": "" } ]
cd0339385dbaa399849024073a041fd4
Serializes the given data into a format that can be easily turned into other formats. This method mainly converts the objects of recognized types into array representation. It will not do conversion for unknown object types or nonobject data. The default implementation will handle [[Model]] and [[DataProviderInterface]]. You may override this method to support more object types.
[ { "docid": "cae450d2ac8fe4058e8cb2b82df5947c", "score": "0.69460213", "text": "public function serialize($data)\n {\n if ($data instanceof Model && $data->hasErrors()) {\n return $this->serializeModelErrors($data);\n } elseif ($data instanceof Arrayable) {\n return $this->serializeModel($data);\n } elseif ($data instanceof DataProviderInterface) {\n return $this->serializeDataProvider($data);\n } elseif ($data instanceof ApiViewInterface) {\n return $this->serializeApiView($data);\n }\n\n return $data;\n }", "title": "" } ]
[ { "docid": "5bacf6a880366deea922659f6c54dd0d", "score": "0.6764179", "text": "public static function objectToArray($data);", "title": "" }, { "docid": "248c58f60ec365e88770ef42eb0504ed", "score": "0.65189797", "text": "public static function toArray($data);", "title": "" }, { "docid": "8a6a5321b67b1eb58e4a08e7e2917560", "score": "0.64857304", "text": "public function __toArray($data = null);", "title": "" }, { "docid": "b4b3f957289307e1babb365d1d7df6d6", "score": "0.643655", "text": "public static function convert($data)\n {\n // Is it an object with a __toArray() method?\n if (is_object($data) and method_exists($data, '__toArray')) {\n // Hell yeah, we don't need to do anything.\n return $data->__toArray();\n }\n // Just an object, take its variables!\n elseif (is_object($data)) {\n // Create an array\n $array = array();\n\n // Loop over the classes variables\n foreach (get_class_vars($data) as $var => $val) {\n // And steal them! MY PRECIOUS!\n $array[$var] = $val;\n }\n\n // And return the array.\n return $array;\n }\n // Array containing other things?\n elseif (is_array($data)) {\n foreach ($data as $k => $v) {\n $data[$k] = static::convert($v);\n }\n }\n\n return $data;\n }", "title": "" }, { "docid": "bee1e8cae384d0a8350a508e1752c13c", "score": "0.6275042", "text": "public function serialize($data, $format);", "title": "" }, { "docid": "ad4607eef878a7351907ad7f6a67df1a", "score": "0.6271906", "text": "public function toMongoTypes(array $data)\n {\n array_walk_recursive($data, function (&$value) {\n if ($value instanceof SerializableTypeInterface) {\n $value = $value->convert();\n }\n });\n\n return $data;\n }", "title": "" }, { "docid": "6d32f17ee89afaedd12f063d421fc33c", "score": "0.62633055", "text": "public static function arrayToObject($data);", "title": "" }, { "docid": "f3aa11780ff0964c7de539b03c978127", "score": "0.62439644", "text": "public function serialize($data)\n {\n if ($data instanceof ValidationErrorHttpException) {\n return $this->serializeModelErrors($data);\n } elseif ($data instanceof NoteException) {\n return $this->serializeNoteException($data);\n } elseif ($data instanceof BadRequestHttpException) {\n return $this->serializeBadRequestHttpException($data);\n } elseif ($data instanceof \\Exception) {\n return $this->serializeException($data);\n } elseif ($data instanceof Arrayable) {\n return $this->serializeModel($data);\n } elseif ($data instanceof DataProviderInterface) {\n return $this->serializeDataProvider($data);\n } elseif ($data instanceof Response) {\n return $this->serializeZendHttpResponse($data);\n } else {\n return $data;\n }\n }", "title": "" }, { "docid": "72b0942f9a11dbd351c9d40b7bb3e5a5", "score": "0.6150837", "text": "public static function toObject($data);", "title": "" }, { "docid": "fddccf698c728b50faac5332b38afae4", "score": "0.6042879", "text": "public static function format(Celsus_Data_Interface $object) {\r\n\t\treturn Zend_Json::encode($object->toArray());\r\n\t}", "title": "" }, { "docid": "957f9cd2aa04feeb44b1033c81971213", "score": "0.60242575", "text": "private function serializeData($data)\n {\n return Yii::createObject($this->serializer)->serialize($data);\n }", "title": "" }, { "docid": "c8b5a73344bfebbe551b768e3eef998f", "score": "0.5967999", "text": "public function serializeData();", "title": "" }, { "docid": "91fd62883c6ecefd88485a3119c23a51", "score": "0.5953446", "text": "public function format(array $data): array;", "title": "" }, { "docid": "3df6395194ae5a53966f4aa5c8d28f9d", "score": "0.5932142", "text": "protected function mapObjectToArray($data)\n {\n if (is_object($data)) {\n $data = (array) $data;\n }\n\n if (is_array($data)) {\n foreach ($data as $index => $value) {\n $data[$index] = $this->mapObjectToArray($value);\n }\n }\n\n return $data;\n }", "title": "" }, { "docid": "5246b7dc081e00f9667c1dc104cd0007", "score": "0.5913771", "text": "protected function format(array $data): array\n {\n return array_map(function ($field) {\n if (is_array($field)) {\n return json_encode($this->castField($field));\n }\n\n return $this->castField($field);\n }, $data);\n }", "title": "" }, { "docid": "c1affbec596f24525570c52785dcbd11", "score": "0.5901053", "text": "public function serialize($data) : string;", "title": "" }, { "docid": "cff4fadb3d6c4eb6f97023314b8c4db1", "score": "0.5882199", "text": "private static function jsonPrepare( $data ) {\n if ( is_object( $data ) ) {\n if (!$data instanceof stdClass ) {\n $className = get_class( $data );\n $data = MyFusesDataUtil::objectToArray( $data );\n \n $data[ 'data_type' ] = \"class\";\n \n $data[ 'data_class_name' ] = $className;\n }\n }\n \n if ( is_array( $data ) ) { // objects will also fall here\n foreach ( $data as &$item ) {\n $item = self::jsonPrepare( $item );\n }\n return $data;\n }\n\n if ( is_string( $data ) ) {\n return utf8_encode( $data );\n }\n\n // for all other cases (number, boolean, null), no change\n\n return $data;\n }", "title": "" }, { "docid": "cd128befded36ce29618f763ed64da8b", "score": "0.5870123", "text": "public function __toArray()\n {\n // defaults\n $collection = array(\n 'version' => $this->getVersion(),\n 'href' => $this->getHref()\n );\n\n // we have an error object\n if ($this->error) {\n $collection['error'] = $this->error->__toArray();\n }\n\n // we have a template object\n if ($this->template) {\n $collection = array_merge($collection, $this->template->__toArray());\n }\n\n // we have some other objects\n foreach (array('items', 'queries', 'links') as $type) {\n if (count($this->{$type})) {\n foreach ($this->{$type} as $item) {\n $collection[$type][] = $item->__toArray();\n }\n }\n }\n\n // encoding data\n return array('collection' => $collection);\n }", "title": "" }, { "docid": "ae90ce784637342223c40735697ecfcc", "score": "0.58575994", "text": "protected function _object2array ($data)\n {\n\n if ( ! is_object($data) && ! is_array($data) ) return $data;\n\n if ( is_object($data) ) $data = get_object_vars($data);\n\n return array_map(array($this, '_object2array'), $data);\n\n }", "title": "" }, { "docid": "001b6eb707a1cf37e7410b68d9ca6983", "score": "0.585447", "text": "protected function convertToFormat($data)\n {\n if (!isset($data[0]) && null !== $data[0]) {\n return false;\n }\n\n // No valid data slot; can't process this.\n if (isset($data[2]) && !is_array($data[2])) {\n return false;\n }\n\n return [\n 'parent' => $data[0],\n 'data' => isset($data[2]) ? $data[2] : [],\n ];\n }", "title": "" }, { "docid": "12ade82e8793f521339a0804030fa3e4", "score": "0.5846862", "text": "protected function _process_casting($data)\n\t{\n\t\tif (is_array(current($data)))\n\t\t{\n\t\t\t$return = array();\n\t\t\tforeach ($data as $val)\n\t\t\t{\n\t\t\t\tif (is_object($data))\n\t\t\t\t{\n\t\t\t\t\t$value = $val->value;\n\t\t\t\t\t$type = $val->type;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$value = $val['value'];\n\t\t\t\t\t$type = $val['type'];\n\t\t\t\t}\n\t\t\t\t$return[$val['name']] = $this->cast($value, $type);\n\t\t\t}\n\t\t\treturn $return;\n\t\t}\n\t\telse if (!empty($data))\n\t\t{\n\t\t\tif (is_object($data))\n\t\t\t{\n\t\t\t\t$value = $data->value;\n\t\t\t\t$type = $data->type;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$value = $data['value'];\n\t\t\t\t$type = $data['type'];\n\t\t\t}\n\t\t\treturn $this->cast($value, $type);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t}", "title": "" }, { "docid": "f4cf73753c5ca45a3fd1978b933787f9", "score": "0.5808074", "text": "function maybe_serialize($data)\n\t{\n\t\tif ( is_array( $data ) || is_object( $data ) )\n\t\t\treturn serialize( $data );\n\t\n\t\tif ( $this->is_serialized( $data ) )\n\t\t\treturn serialize( $data );\n\t\n\t\treturn $data;\t\t\n\t}", "title": "" }, { "docid": "c64f223c443e3613c28711f3559cacc5", "score": "0.5803674", "text": "protected function asArray($data = [])\n {\n if ($data instanceof Collection) {\n $data = $data->all();\n } elseif ($data instanceof Arrayable) {\n $data = $data->toArray();\n }\n\n return $data;\n }", "title": "" }, { "docid": "0806d0bdf12d4e8f54fde418032e2876", "score": "0.57998216", "text": "public function toArray()\n {\n $data = parent::toArray();\n if (isset($this->type)) {\n $data['type'] = $this->type;\n }\n return $data;\n }", "title": "" }, { "docid": "abbf32b43dfa16a6bee568b506e1c4e8", "score": "0.579103", "text": "protected function asArray($data)\n\t{\n\t\t$array = array();\n\n\t\tforeach (get_object_vars((object) $data) as $k => $v)\n\t\t{\n\t\t\tif (is_object($v))\n\t\t\t{\n\t\t\t\t$array[$k] = $this->asArray($v);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$array[$k] = $v;\n\t\t\t}\n\t\t}\n\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "d1e11361c754ebd761eff8ab25619c66", "score": "0.5784755", "text": "public static function objectToArrayRecursive($data);", "title": "" }, { "docid": "87e5463bd97401b6baa4875916a25a12", "score": "0.57646596", "text": "protected function serialize($data) {\n return json_encode($data);\n }", "title": "" }, { "docid": "3028b1a70f62fe7605c274a68ab4e365", "score": "0.57639086", "text": "function yourls_maybe_serialize( $data ) {\n\t\tif ( is_array( $data ) || is_object( $data ) )\n\t\t\treturn serialize( $data );\n\n\t\tif ( self::yourls_is_serialized( $data ) )\n\t\t\treturn serialize( $data );\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "8f99d4de8c6c7a9df3ca5cc16364c99b", "score": "0.5754822", "text": "function format_data(&$data) {\n\t\tglobal $rtype;\n\n\t\tif(is_object($data)) return;\n\n\t\tif(is_array($data)) {\n\t\t\tforeach($data as $key => $val) {\n\t\t\t\tformat_data($data[$key]);\n\t\t\t}\n\t\t/* plists get a special date format as their output,\n\t\t * due to spec restrictions.\n\t\t */\n\t\t} else if(strtotime($data) > 0 && !is_numeric($data) && $rtype == \"plist\") {\n\t\t\t$data = gmdate('c', strtotime($data));\n\t\t} else if(is_numeric($data)) {\n\t\t\tif(is_intger($data)) {\n\t\t\t\t$data = (int)$data;\n\t\t\t} else {\n\t\t\t\t$data = (double)$data;\n\t\t\t}\n\t\t} else if($data === \"true\") {\n\t\t\t$data = true;\n\t\t} else if($data === \"false\") {\n\t\t\t$data = false;\n\t\t}\n\t\tif(is_string($data) && $rtype == \"xml\") {\n\t\t\t$data = str_replace(array(\"&\", \"<\", \">\"), array(\"&amp;\", \"&lt;\", \"&gt;\"), $data);\n\t\t}\n\t}", "title": "" }, { "docid": "60acebfa5a2791abe58a5258c044605a", "score": "0.575184", "text": "public function toArray($data, ContextInterface $context = null): array\n {\n $context = $this->convertSerializationContext($context);\n\n return $this->serializer->toArray($data, $context);\n }", "title": "" }, { "docid": "311ce30d237fcb20e8e94b37c320fc31", "score": "0.5747978", "text": "function object_to_array($data) {\n\t\treturn json_decode(json_encode($data), true);\n\t}", "title": "" }, { "docid": "b50f601b7ef4e2b6fb789bce545407e4", "score": "0.57387173", "text": "protected function _toArray($data, array $options = array()) {\n\t\tif (isset($data['raw'])) {\n\t\t\treturn json_decode($data['raw'], true) ;\n\t\t}\n\t\treturn $data ;\n\t}", "title": "" }, { "docid": "9a2b482c380349de0f671d0c13634224", "score": "0.5730316", "text": "public function toArrayWithData(){\n $array = parent::toArray();\n\n return $array;\n }", "title": "" }, { "docid": "98b21432d5c4e83606832beecb20f26d", "score": "0.57004", "text": "private function arrayObjectsToArray(&$data)\n {\n foreach ($data as &$datum) {\n if (is_object($datum)) {\n $datum = (array) $datum;\n }\n if (is_array($datum)) {\n $this->arrayObjectsToArray($datum);\n }\n }\n }", "title": "" }, { "docid": "509f2f280942f9962d75e67256c1f49e", "score": "0.56993836", "text": "public function format(array $data);", "title": "" }, { "docid": "3ad60e39df619d50c6e12f408d8a2092", "score": "0.56942517", "text": "public function toArray($obj);", "title": "" }, { "docid": "c9c1fd9192e74a04d4b3bfed0524c7cb", "score": "0.5684121", "text": "public function serialize($data)\n {\n if (!is_array($data)) {\n $data = array();\n }\n // Data array could contain IDs or DChild instances.\n foreach ($data as $position => $child) {\n // If no changes were made, just store the ID.\n if (is_object($child)\n && !$child->hasUnsavedChanges()\n ) {\n $data[ $position ] = $child->getId();\n }\n }\n\n return $data;\n }", "title": "" }, { "docid": "3320c73a034ca83c970584ecdaf309bd", "score": "0.568113", "text": "public function data_covariant() {\n\t\t\t$data = array(\n\t\t\t\tarray(array(1), array(1)),\n\t\t\t\tarray(array(null), array(null)),\n\t\t\t\tarray(array(''), array('')),\n\t\t\t\tarray(array(new \\stdClass()), array(new \\stdClass())),\n\t\t\t);\n\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "5293edf88b5de447ddeecc6608bd1f29", "score": "0.5662445", "text": "function objectToArray($data)\n{\n\tif(is_object($data))\n\t{\n\t\t// Gets the properties of the given object\n\t\t// with get_object_vars function\n\t\t$data = get_object_vars($data);\n\t}\n\n\tif(is_array($data))\n\t{\n\t\t/*\n * Return array converted to object\n * Using __FUNCTION__ (Magic constant)\n * for recursive call\n */\n\t\treturn array_map(__FUNCTION__, $data);\n\t}\n\telse\n\t{\n\t\t// Return array\n\t\treturn $data;\n\t}\n}", "title": "" }, { "docid": "74d5d1b3bfedd91825ef8cb747744f95", "score": "0.56338", "text": "abstract public function toJsonData();", "title": "" }, { "docid": "7d9dec2a9de2559e09239d4c996104f5", "score": "0.56296206", "text": "function object_to_array($data)\n {\n if (is_object($data)) {\n $data = get_object_vars($data);\n }\n\n if (is_array($data)) {\n return array_map(__FUNCTION__, $data);\n } else {\n return $data;\n }\n }", "title": "" }, { "docid": "521a001ca70aaadc0d1cfb05c3f23e99", "score": "0.56097674", "text": "public function serialize($data, $format, array $context = array());", "title": "" }, { "docid": "d98f6776fe6a8c04d854cd5d8010121e", "score": "0.5607471", "text": "public function to_array($data = null)\n {\n // If no data is passed as a parameter, then use the data passed\n // via the constructor\n if ($data === null && func_num_args() === 0) {\n $data = $this->_data;\n }\n\n // Cast as an array if not already\n if (is_array($data) === false) {\n $data = (array) $data;\n }\n\n $array = [];\n foreach ((array) $data as $key => $value) {\n if (is_object($value) === true || is_array($value) === true) {\n $array[$key] = $this->to_array($value);\n } else {\n $array[$key] = $value;\n }\n }\n\n return $array;\n }", "title": "" }, { "docid": "a91f567d7231489c12430f5abb9b522c", "score": "0.56036574", "text": "public function toArray()\n {\n $data = parent::toArray();\n if (isset($this->type)) {\n $data['type'] = $this->type;\n }\n if (isset($this->maximumHeight)) {\n $data['maximumHeight'] =\n $this->maximumHeight instanceof Arrayable\n ? $this->maximumHeight->toArray()\n : $this->maximumHeight;\n }\n if (isset($this->maximumWidth)) {\n $data['maximumWidth'] =\n $this->maximumWidth instanceof Arrayable\n ? $this->maximumWidth->toArray()\n : $this->maximumWidth;\n }\n if (isset($this->minimumHeight)) {\n $data['minimumHeight'] =\n $this->minimumHeight instanceof Arrayable\n ? $this->minimumHeight->toArray()\n : $this->minimumHeight;\n }\n if (isset($this->minimumWidth)) {\n $data['minimumWidth'] =\n $this->minimumWidth instanceof Arrayable\n ? $this->minimumWidth->toArray()\n : $this->minimumWidth;\n }\n return $data;\n }", "title": "" }, { "docid": "67a6739609c364917ab34a9312d3a688", "score": "0.559844", "text": "public function maybe_serialize( $data ) {\n\tif ( is_string( $data ) )\n\t\treturn $data;\n\telseif ( is_array( $data ) || is_object( $data ) )\n\t\treturn serialize( $data );\n\tif ( $this->is_serialized( $data ) )\n\t\treturn serialize( $data );\n\treturn $data;\n }", "title": "" }, { "docid": "868a197da750c14503abaa3505d21282", "score": "0.5598408", "text": "private static function convertStdClassesToArrays($data)\n {\n if ($data instanceof \\stdClass) {\n $data = (array) $data;\n }\n\n if (\\is_array($data)) {\n foreach ($data as $k => $v) {\n $data[$k] = self::convertStdClassesToArrays($v);\n }\n }\n\n return $data;\n }", "title": "" }, { "docid": "5472990947a33d7a6717d615e2db27ee", "score": "0.55970776", "text": "protected function _toArray(){\n\t\t$return = null;\n\t\t\n\t\tif(\n\t\t\tis_array($this->_data)\n\t\t){\n\t\t\treturn $this->_data;\n\t\t}\n\t\t\n\t\tif(\n\t\t\t!is_null($this->_arrayMethod)\n\t\t){\n\t\t\tif(\n\t\t\t\t!method_exists($this->_data, $this->_arrayMethod)\n\t\t\t){\n\t\t\t\tthrow new Dkplus_Model_Exception('The given array-method is not available.');\n\t\t\t}\n\t\t\t$return = call_user_func_array(array($this->_data, $this->_arrayMethod));\n\t\t}\n\t\t\n\t\tif(\n\t\t\tempty($return)\n\t\t){\n\t\t\t$arrMethods = array('toArray', 'asArray', 'makeArray', 'getArray');\n\t\t\tforeach($arrMethods AS $method){\n\t\t\t\tif(\n\t\t\t\t\tmethod_exists($this->_data, $method)\n\t\t\t\t){\n\t\t\t\t\t$return = call_user_func_array(array($this->_data, $method));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif(\n\t\t\t$this->_data instanceof Traversable\n\t\t){\n\t\t\t$return = array();\n\t\t\tforeach($this->_data AS $data){\n\t\t\t\t$return[] = $data;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(\n\t\t\t!is_null($return)\n\t\t\t&& is_array($return)\n\t\t){\n\t\t\treturn $return;\n\t\t}\n\t\telseif(\n\t\t\t!is_array($return)\n\t\t){\n\t\t\tthrow new Dkplus_Model_Exception('Row cannot be saved because there is no valid array-method available.');\n\t\t}\n\n\t\tthrow new Dkplus_Model_Exception('Row cannot be saved because there is no array-method available.');\n\t\t\t\t\n\t}", "title": "" }, { "docid": "a4f124fd24ad1803156bab4417d10a39", "score": "0.55964404", "text": "public function convert()\n {\n return json_encode(\n array_merge(\n self::DATA,\n $this->data\n )\n );\n }", "title": "" }, { "docid": "71c03dd3f6d8d8156e7e8b1f481ce3cf", "score": "0.55851835", "text": "protected function serialize( $data ) {\n return json_encode($data);\n #return serialize($data);\n }", "title": "" }, { "docid": "25c7d1df361316f2c9e02f38185e57af", "score": "0.55812913", "text": "public static function toArrayRecursive($data);", "title": "" }, { "docid": "f954b529701bc98df9430cce8394503c", "score": "0.5577756", "text": "function objectify($data) {\n\t\t$object = (object)$data;\n\t\tforeach ($object as $property) {\n\t\t\tif (is_array($property))\n\t\t\t\t$this -> objectify($property);\n\t\t}\n\t\treturn $object;\n\t}", "title": "" }, { "docid": "375fd46bfb19d68a198d137bf1ac9039", "score": "0.5576347", "text": "public static function toJson($data)\n {\n if (! is_array($data) && ! is_object($data)) {\n throw new \\InvalidArgumentException('Data argument must be an array or object.');\n }\n\n return json_encode($data);\n }", "title": "" }, { "docid": "fff34c46a8bdf2705a56357f762cab6b", "score": "0.5562954", "text": "public function jsonSerialize() {\n return array(\"type\" => $this->getClassType(), \"data\" => $this->getData());\n }", "title": "" }, { "docid": "869372a4298854fc016aa74c60b1b89b", "score": "0.5561145", "text": "private function maybe_serialize( $data ) {\r\n\t\tif ( is_array( $data ) || is_object( $data ) ) {\r\n\t\t\treturn serialize( $data );\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Double serialization is required for backward compatibility.\r\n\t\t * See https://core.trac.wordpress.org/ticket/12930\r\n\t\t */\r\n\t\tif ( $this->is_serialized( $data, false ) ) {\r\n\t\t\treturn serialize( $data );\r\n\t\t}\r\n\r\n\t\treturn $data;\r\n\t}", "title": "" }, { "docid": "195fed767ec6c069c5b5ac8350d16eea", "score": "0.55533355", "text": "public function serialize($data, string $format, ?SerializationContext $context = null, ?string $type = null): string;", "title": "" }, { "docid": "470b34a6bfe6ba1763bc1e3eb6b46e00", "score": "0.55455387", "text": "public function serialize($data, bool $traverse = false) : array {\n\t\t$card_type_id = $data->type_id();\n\n\t\tif($traverse) {\n\t\t\tif(CardType::USER == $card_type_id) {\n\t\t\t\t$user_transformer = new UserTransformer();\n\t\t\t\treturn [\n\t\t\t\t\t'id' => $data->id(),\n\t\t\t\t\t'card_type_id' => $card_type_id,\n\t\t\t\t\t'card_type' => CardType::name_for_type($card_type_id),\n\t\t\t\t\t'user' => is_null($data->user()) ? NULL : $user_transformer->serialize($data->user(), $traverse),\n\t\t\t\t\t'equipment_type' => NULL\n\t\t\t\t];\n\t\t\t} else if (CardType::TRAINING == $card_type_id) {\n\t\t\t\t$equipment_type_transformer = new EquipmentTypeTransformer();\n\t\t\t\treturn [\n\t\t\t\t\t'id' => $data->id(),\n\t\t\t\t\t'card_type_id' => $card_type_id,\n\t\t\t\t\t'card_type' => CardType::name_for_type($card_type_id),\n\t\t\t\t\t'user' => NULL,\n\t\t\t\t\t'equipment_type' => is_null($data->equipment_type()) ? NULL : $equipment_type_transformer->serialize($data->equipment_type(), $traverse)\n\t\t\t\t];\n\t\t\t} else if (CardType::PROXY == $card_type_id) {\n\t\t\t\treturn [\n\t\t\t\t\t'id' => $data->id(),\n\t\t\t\t\t'card_type_id' => $card_type_id,\n\t\t\t\t\t'card_type' => CardType::name_for_type($card_type_id),\n\t\t\t\t\t'user' => NULL,\n\t\t\t\t\t'equipment_type' => NULL\n\t\t\t\t];\n\t\t\t} else if (CardType::SHUTDOWN == $card_type_id) {\n\t\t\t\treturn [\n\t\t\t\t\t'id' => $data->id(),\n\t\t\t\t\t'card_type_id' => $card_type_id,\n\t\t\t\t\t'card_type' => CardType::name_for_type($card_type_id),\n\t\t\t\t\t'user' => NULL,\n\t\t\t\t\t'equipment_type' => NULL\n\t\t\t\t];\n\t\t\t}\n\t\t} else {\n\t\t\tif(CardType::USER == $card_type_id) {\n\t\t\t\treturn [\n\t\t\t\t\t'id' => $data->id(),\n\t\t\t\t\t'card_type_id' => $card_type_id,\n\t\t\t\t\t'card_type' => CardType::name_for_type($card_type_id),\n\t\t\t\t\t'user_id' => $data->user_id(),\n\t\t\t\t\t'user' => is_null($data->user) ? '' : $data->user->name(),\n\t\t\t\t\t'equipment_type_id' => '',\n\t\t\t\t\t'equipment_type' => ''\n\t\t\t\t];\n\t\t\t} else if (CardType::TRAINING == $card_type_id) {\n\t\t\t\treturn [\n\t\t\t\t\t'id' => $data->id(),\n\t\t\t\t\t'card_type_id' => $card_type_id,\n\t\t\t\t\t'card_type' => CardType::name_for_type($card_type_id),\n\t\t\t\t\t'user_id' => '',\n\t\t\t\t\t'user' => '',\n\t\t\t\t\t'equipment_type_id' => $data->equipment_type_id(),\n\t\t\t\t\t'equipment_type' => is_null($data->equipment_type) ? '' : $data->equipment_type->name()\n\t\t\t\t];\n\t\t\t} else if (CardType::PROXY == $card_type_id) {\n\t\t\t\treturn [\n\t\t\t\t\t'id' => $data->id(),\n\t\t\t\t\t'card_type_id' => $card_type_id,\n\t\t\t\t\t'card_type' => CardType::name_for_type($card_type_id),\n\t\t\t\t\t'user_id' => '',\n\t\t\t\t\t'user' => '',\n\t\t\t\t\t'equipment_type_id' => '',\n\t\t\t\t\t'equipment_type' => ''\n\t\t\t\t];\n\t\t\t} else if (CardType::SHUTDOWN == $card_type_id) {\n\t\t\t\treturn [\n\t\t\t\t\t'id' => $data->id(),\n\t\t\t\t\t'card_type_id' => $card_type_id,\n\t\t\t\t\t'card_type' => CardType::name_for_type($card_type_id),\n\t\t\t\t\t'user_id' => '',\n\t\t\t\t\t'user' => '',\n\t\t\t\t\t'equipment_type_id' => '',\n\t\t\t\t\t'equipment_type' => ''\n\t\t\t\t];\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8f76e40abf604878af0cac00ad2ed2b4", "score": "0.55329025", "text": "public function toArray()\n {\n $this->runSerializeTransforms();\n\n return parent::toArray();\n }", "title": "" }, { "docid": "f72a5857ee4bbfc01c373f9b132c155b", "score": "0.55290693", "text": "protected function toArray($data)\n\t{\n\t if (is_array($data)) {\n\t return $data;\n\t }\n\t \n\t if (is_object($data)) {\n\t if (method_exists($data, 'toArray')) {\n\t return $data->toArray();\n\t }\n\t if ($data instanceof \\Traversable) {\n\t return iterator_to_array($data);\n\t }\n\t }\n\t \n\t return (array) $data;\n\t}", "title": "" }, { "docid": "5e77c501b0f39a7ae93eaed8551561f9", "score": "0.55268127", "text": "function convertArrayObjToArray($data) {\n\t$result = array();\n\n\tforeach($data as $key => $value) {\n\t\t$result[$key] = (array) $value;\n\t}\n\n\treturn $result ? $result : $data;\n}", "title": "" }, { "docid": "0e5fd0ddea419c0ae0b454f324a47952", "score": "0.5523625", "text": "function normalize($data) {\n $iterator = null;\n if ($data instanceof \\IteratorAggregate) {\n $iterator = $data->getIterator();\n } elseif ($data instanceof \\Iterator) {\n $iterator = $data;\n } elseif (is_array($data)) {\n $iterator = new \\ArrayIterator($data);\n }\n\n if ($iterator) {\n return normalize_iterator($iterator);\n }\n\n if (is_object($data)) {\n return serialize($data);\n }\n\n return $data;\n}", "title": "" }, { "docid": "b6be41752857b3343dc39a9685145349", "score": "0.5521599", "text": "public function toArray()\n\t{\n\t\treturn json_decode($this->data);\n\t}", "title": "" }, { "docid": "7c0cad5691b755932060a73ee355f459", "score": "0.552108", "text": "public function toArray()\n {\n if (empty($this->_data)) {\n $this->process();\n }\n\n return $this->_data;\n }", "title": "" }, { "docid": "cbc9494b44603af2d9c08b9d790bd3b7", "score": "0.55159855", "text": "private function toArray($data)\n\t\t{\n\t\t\t\t$resultArray = json_decode(json_encode($data), true);\n\n\t\t\t\treturn $resultArray;\n\t\t}", "title": "" }, { "docid": "2d360777944db165ed4d619911fea9de", "score": "0.5511067", "text": "protected function converting($data)\n\t{\n\t\tswitch ($this->contentType)\n\t\t{\n\t\t\tcase 'application/json':\n\t\t\t\t$data = Convert::toJson($data);\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'text/xml':\n\t\t\t\t$data = Convert::toXml($data);\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'text/plain':\n\t\t\t\t$data = Convert::toText($data);\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'text/html':\n\t\t\t\t$data = Convert::toHtml($data);\n\t\t\tbreak;\n\t\t}\n \n return $data;\n\t}", "title": "" }, { "docid": "309a834ef1b94ec67063b1d643ece8aa", "score": "0.54958224", "text": "private function json($data) {\n if (is_array($data)) {\n return json_encode($data, JSON_FORCE_OBJECT);\n }\n }", "title": "" }, { "docid": "05569efa05649db74513178e89602221", "score": "0.54932666", "text": "public function toArray()\n {\n $a = parent::toArray();\n if ($this->type) {\n $a[\"type\"] = $this->type;\n }\n if ($this->values) {\n $ab = array();\n foreach ($this->values as $i => $x) {\n $ab[$i] = $x->toArray();\n }\n $a['values'] = $ab;\n }\n\n return $a;\n }", "title": "" }, { "docid": "b24ca2a6f31f73e7631e33fd456e610b", "score": "0.54853284", "text": "protected function arrayToObject($data)\n\t{\n\t\tif (is_array($data)) {\n\t\t\treturn json_decode(json_encode($data));\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "114c738262e2ab0c3058392a90b2a130", "score": "0.54826534", "text": "public function toArray() {\r\n\t\t\r\n\t\t$data = array(\r\n\t\t\t'id'\t\t\t\t\t=> $this->id,\r\n 'devicenr'\t \t\t=> $this->devicenr,\r\n\t\t\t'description'\t \t=> $this->description,\r\n\t\t\t'type'\t \t\t => $this->type,\r\n\t\t);\r\n\t\t\r\n\t\t$this->data = $data;\r\n\t\t\r\n\t\treturn $data;\r\n\t}", "title": "" }, { "docid": "b9e00af474ec63aa185f82c433cc9f7b", "score": "0.54794466", "text": "public function toArray($object);", "title": "" }, { "docid": "b4110996e9f35b31cb70e375e2d192e8", "score": "0.5476041", "text": "public function toArray($data)\n\t\t{\n\t\t\t\t$resultArray = json_decode(json_encode($data), true);\n\n\t\t\t\treturn $resultArray;\n\t\t}", "title": "" }, { "docid": "a383bdd319cd8cf45c66115761a4ca87", "score": "0.5470704", "text": "public function data_toString() {\n\t\t\t$data = array(\n\t\t\t\tarray(array(1), array('1')),\n\t\t\t\tarray(array(null), array('null')),\n\t\t\t\tarray(array(''), array('')),\n\t\t\t);\n\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "5f4b408c8d0658c454e058bc5f16584d", "score": "0.5470558", "text": "public function serialize($data)\n {\n if (true === is_string($data)) {\n return $data;\n }\n\n $this->prepareData($data);\n\n $flags = JSON_PRESERVE_ZERO_FRACTION;\n\n if (version_compare($this->phpVersion, '5.6.6', '<') || !defined('JSON_PRESERVE_ZERO_FRACTION')) {\n $flags = null;\n }\n\n $data = json_encode($data, $flags);\n\n if ('[]' === $data) {\n return '{}';\n }\n\n return $data;\n }", "title": "" }, { "docid": "d122e8b4ac923b3e3ab6bbd38427fbdc", "score": "0.5454652", "text": "public function to_array($data = null)\n {\n if ($data === null) {\n $data = $this->_data;\n }\n\n $array = array();\n\n if (is_object($data) AND !$data instanceof Iterator) {\n $data = get_object_vars($data);\n }\n\n if (empty($data)) {\n return array();\n }\n\n foreach ($data as $key => $value) {\n if (is_object($value) or is_array($value)) {\n $array[$key] = $this->to_array($value);\n } else {\n $array[$key] = $value;\n }\n }\n\n return $array;\n }", "title": "" }, { "docid": "dd8ddb1992708db483b0dcc95e4dc10b", "score": "0.5447391", "text": "protected function format($data, array $context = [])\n {\n if (is_string($data)) {\n return $this->interpolate($data, $context);\n }\n\n $object = is_object($data);\n\n if ($object && method_exists($data, '__toString')) {\n return (string)$data;\n }\n\n if ($object && $data instanceof JsonSerializable) {\n return json_encode($data);\n }\n\n return print_r($data, true);\n }", "title": "" }, { "docid": "5db4e2d030356db18a41c0ff7d6ca9c1", "score": "0.54420114", "text": "protected function parseData( $data )\n\t{\n\t\treturn $data instanceof Arrayable ? $data->toArray() : $data;\n\t}", "title": "" }, { "docid": "3fb4e3b33f0cbabfee20de1f1ece1e7b", "score": "0.54348165", "text": "private function json($data) {\n if (is_array($data)) {\n return json_encode($data);\n }\n }", "title": "" }, { "docid": "3fb4e3b33f0cbabfee20de1f1ece1e7b", "score": "0.54348165", "text": "private function json($data) {\n if (is_array($data)) {\n return json_encode($data);\n }\n }", "title": "" }, { "docid": "a55c68d11bffe90462c0fea043b5740d", "score": "0.5430015", "text": "public function testBasicToArray()\n {\n $this->assertInternalType('array', $this->instance->toArray());\n $this->assertInternalType('string', $this->instance->toJson());\n }", "title": "" }, { "docid": "9c947c1ee13ed6993d9d43d861275c43", "score": "0.54264057", "text": "public function toArray()\n {\n $output = get_object_vars($this);\n $contacts = array();\n $network = array();\n\n // lookup all contact handles and convert to array\n foreach ($this->contacts as $type => $handle) {\n foreach ($handle as $number => $object) {\n $contacts[$type][$number] = $object->toArray();\n }\n }\n $output['contacts'] = $contacts;\n\n if (! empty($this->registrar)) {\n $output['registrar'] = $this->registrar->toArray();\n }\n\n if (! empty($this->network)) {\n // lookup network for all properties\n foreach ($this->network as $type => $value) {\n // if there is an object we need to convert it to array\n if (is_object($value)) {\n $value = (array) $value;\n // if converted array is empty there is no need to add it\n if (! empty($value)) {\n $network[$type] = $value;\n }\n } else {\n $network[$type] = $value;\n }\n }\n $output['network'] = $network;\n }\n\n return $output;\n }", "title": "" }, { "docid": "f7754acf5efafb631074ef66a99aed8b", "score": "0.5426173", "text": "public function data_toString() {\n\t\t\t$data = array(\n\t\t\t\tarray(array(0), array('0')),\n\t\t\t\tarray(array(1), array('1')),\n\t\t\t);\n\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "0b8ce41663526d58678232e0516162d5", "score": "0.54260755", "text": "protected function maybeEncode($data)\n {\n if (is_array($data) || is_object($data)) {\n return json_encode($data);\n }\n\n return $data;\n }", "title": "" }, { "docid": "9fedc026ddd9a04d1238ba76ea8599a6", "score": "0.5424434", "text": "public static function encodePlugin( $data )\n {\n /*if (is_array($data))reset($data);\n if (gettype($data) !== 'object' && !(is_array($data) && (current($data)===false || gettype(current($data)) === 'object'))){\n $e = new Exception();\n error_log(__FILE__.':'.__LINE__.' no object, '.gettype($data).\" given\\n\".$e->getTraceAsString()); \n ///return null;\n }\n if ((is_array($data) && (is_array(current($data)) || (current($data)!==false && get_class(current($data)) !== get_called_class()))) || (!is_array($data) && get_class($data) !== get_called_class())){\n $e = new Exception();\n $class = (is_array($data) && is_array(current($data)) ? 'array' : (is_array($data) ? (current($data)!==false ? get_class(current($data)) : 'array') : get_class($data)));\n error_log(__FILE__.':'.__LINE__.' wrong type, '.$class.' given, '.get_called_class().\" expected\\n\".$e->getTraceAsString());\n ///return null;\n }*/\n return json_encode( $data );\n }", "title": "" }, { "docid": "b0783fc8d29962a3f3100e31b3d04030", "score": "0.54125446", "text": "public static function getValidatedFormattedArrayData(array $data)\r\n {\r\n if (!isset($data['type'])) {\r\n $data['type'] = get_called_class();\r\n }\r\n return $data;\r\n }", "title": "" }, { "docid": "a2fec5c274db2a1f63311d80ac766ae3", "score": "0.541154", "text": "public function to_serialized($data = null)\n {\n // If no data is passed as a parameter, then use the data passed\n // via the constructor\n if ($data === null && func_num_args() === 0) {\n $data = $this->_data;\n }\n\n return serialize($data);\n }", "title": "" }, { "docid": "c9d131af5683f3f632fdc08d02bda1e6", "score": "0.5411235", "text": "public function exchangeArray($data)\n {\n return $this->getHydrator()->hydrate($data, $this);\n }", "title": "" }, { "docid": "4012b22c6e7bd755e95a3026cc94d4eb", "score": "0.5402714", "text": "protected function serialize($data)\n {\n return $this->getSerializer()->serialize($data, 'json');\n }", "title": "" }, { "docid": "ef738353e4c1dc2bcd621b59aaad1c53", "score": "0.5400814", "text": "public function testEncodePolymorphicArray()\n {\n $author = Author::instance(7, 'First', 'Last', []);\n $site = Site::instance(9, 'Main Site', []);\n $encoder = Encoder::instance([\n Author::class => AuthorSchema::class,\n Site::class => SiteSchema::class,\n ], $this->encoderOptions);\n\n $actual = $encoder->encodeData([$author, $site]);\n\n $expected = <<<EOL\n {\n \"data\" : [\n {\n \"type\" : \"people\",\n \"id\" : \"7\",\n \"attributes\" : {\n \"first_name\" : \"First\",\n \"last_name\" : \"Last\"\n },\n \"relationships\" : {\n \"comments\" : {\n \"data\" : []\n }\n },\n \"links\" : {\n \"self\":\"http://example.com/people/7\"\n }\n }, {\n \"type\" : \"sites\",\n \"id\" : \"9\",\n \"attributes\" : {\n \"name\" : \"Main Site\"\n },\n \"relationships\" : {\n \"posts\" : {\n \"data\" : []\n }\n },\n \"links\" : {\n \"self\":\"http://example.com/sites/9\"\n }\n }\n ]\n }\nEOL;\n // remove formatting from 'expected'\n $expected = json_encode(json_decode($expected));\n\n $this->assertEquals($expected, $actual);\n }", "title": "" }, { "docid": "011a902c641bf888411d478ddb29c859", "score": "0.5397728", "text": "public function format($data);", "title": "" }, { "docid": "11c93d167b88fe11bff623c2f1239ff9", "score": "0.5387855", "text": "public function toJSON()\n\t{\n\t\treturn json_encode($this->getData());\n\t}", "title": "" }, { "docid": "6912959f48a703904fcc47e4055cb0ef", "score": "0.53840685", "text": "public function toArray()\n {\n $a = parent::toArray();\n if ($this->lang) {\n $a[\"lang\"] = $this->lang;\n }\n if ($this->citationTemplate) {\n $a[\"citationTemplate\"] = $this->citationTemplate->toArray();\n }\n if ($this->fields) {\n $ab = array();\n foreach ($this->fields as $i => $x) {\n $ab[$i] = $x->toArray();\n }\n $a['fields'] = $ab;\n }\n if ($this->value) {\n $a[\"value\"] = $this->value;\n }\n return $a;\n }", "title": "" }, { "docid": "7a85e607579e67320ca5e654e3e17a02", "score": "0.53840613", "text": "public function jsonSerialize()\n {\n return (object) $this->data;\n }", "title": "" }, { "docid": "2fb71ffa1a0380c1166abb6b56818f97", "score": "0.53831464", "text": "public static function isArrayOrObject ($data)\n {\n IllegalArgumentException::throwsExceptionIfParamIsNull(\n (is_array($data) || is_object($data)), self::UNSUPPORTED_TYPE\n );\n\n return TRUE;\n }", "title": "" }, { "docid": "ae549361e806f6d99fe6444003f773a9", "score": "0.5381868", "text": "public function save($data)\n {\n if (is_array($data)) {\n $data = new ArrayObject($data);\n }\n \n /* make sure that we are traversable... */\n if ($data instanceof Traversable == false) {\n $data = new ArrayObject([$data]);\n }\n \n /* save the data */\n return $this->save_many($data);\n }", "title": "" }, { "docid": "dab4909fa5ce8084d896699ab82c7192", "score": "0.5377234", "text": "public function toArray(array $data, RenderInterface $render)\n\t{\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "c2d73a4244a8bf54c9800e2d7b5f3f21", "score": "0.537221", "text": "#[Pure]\n function toa(mixed $data, bool $keepEmpty = true): array {\n if (is_array($data)) return $data;\n if (!is_object($data) && $keepEmpty && (string)$data == '') return [];\n\n return [$data];\n }", "title": "" }, { "docid": "27a756fbf3ad8e2cb6c98483a4194db0", "score": "0.5360873", "text": "private function json($data)\r\n {\r\n if(is_array($data))\r\n {\r\n return json_encode($data);\r\n }\r\n }", "title": "" }, { "docid": "2dc89033eda066d05c7346df6c9de01b", "score": "0.5356348", "text": "public function formatFieldData($data)\n {\n $this->data = $data;\n\n return Helper::array(Arr::get($data, $this->normalizeColumn(), $this->value));\n }", "title": "" }, { "docid": "fc11c92500461974f52a425358d99d99", "score": "0.5352891", "text": "public function getTransformed(array $data);", "title": "" }, { "docid": "7eeb55a92821a6840e3029b0f82614a1", "score": "0.5348518", "text": "public function toArray() {\n $output = $this->output;\n\n if ( $this->object ) {\n $output = array_replace( $output, $this->object->toArray() );\n }\n \n return $output;\n }", "title": "" }, { "docid": "d61c33644c4364e3b1fc89e59f746061", "score": "0.53482527", "text": "private function json($data){\r\n\t\t\tif(is_array($data)){\r\n\t\t\t\treturn json_encode($data);\r\n\t\t\t}\r\n\t\t}", "title": "" } ]
3cbe4b49120056fdc76b026c06cd0675
Create a new command instance.
[ { "docid": "beeda352e37e57573722143269c99118", "score": "0.0", "text": "public function __construct()\n {\n parent::__construct();\n }", "title": "" } ]
[ { "docid": "7ccc4aaada08db3d14c5c1a4c9e59d6d", "score": "0.7267292", "text": "public function createCommand($config = [])\n {\n $config['db'] = $this;\n $command = new Command($config);\n\n return $command;\n }", "title": "" }, { "docid": "a8d8b74fc8f7991818b3ee770a7fa57d", "score": "0.7199843", "text": "public static function create($commandID /* [ $arg, ... */)\n {\n $arguments = func_get_args();\n $command = new self($arguments);\n\n return $command;\n }", "title": "" }, { "docid": "1a0ad6d512b44e09b762aec871506a60", "score": "0.71137923", "text": "public static function factory($command,$path = null) {\n $commandclass = 'Command_'.$command;\n class_exists($commandclass) || self::_load_command($command, $path);\n return new $commandclass;\n }", "title": "" }, { "docid": "af1247001a001c6d0cd3bfaf031dfb23", "score": "0.7101548", "text": "public function __construct(NewCommand $command)\n {\n $this->command = $command;\n }", "title": "" }, { "docid": "2837e374649a0d809cacd29020281d66", "score": "0.7051079", "text": "public function buildCommand();", "title": "" }, { "docid": "ed9dff0e1c313d0cab9ca67a55a12587", "score": "0.6979424", "text": "function create_command() {\r\n\r\n\t\tif( ! $this->flag_is_sanitized ){\r\n\t\t\t$this->sanitize();\r\n\t\t}\r\n\r\n\t\t$this->set_flags();\r\n\r\n\t\t$path_mpsyt = $this->path_mpsyt;\r\n\t\t$flag_has_api_key = $this->flag_has_api_key;\r\n\t\t$api_key = $this->api_key;\r\n\t\t$player = $this->player;\r\n\t\t$search_keyword = $this->search_keyword;\r\n\t\t$flag_is_debug_mode = $this->flag_is_debug_mode;\r\n\t\t$search_key = $this->get_search_key( $this->search_mode );\r\n\t\t$play_command = $this->get_play_command( $this->search_mode );\r\n\r\n\t\t/* Creating command */\r\n\t\t$command = \"sudo {$path_mpsyt}\";\r\n\t\t$command .= ( $flag_has_api_key ) ? \" set api_key {$api_key},\" : \"\";\r\n\t\t$command .= \" set player {$player},\";\r\n\t\t$command .= \"{$search_key} {$search_keyword},\";\r\n\t\t$command .= \"{$play_command}\";\r\n\t\t$command .= \"q\";\r\n\t\t$command .= ( $flag_is_debug_mode ) ? \"\" : ' > /dev/null &';\r\n\t\t$command = trim( $command );\r\n\r\n\t\treturn $command;\r\n\r\n\t}", "title": "" }, { "docid": "29ed9dfb57563b741d3378e9291e9d06", "score": "0.69522667", "text": "public function create()\n {\n $this->addCommand('create');\n\n return $this;\n }", "title": "" }, { "docid": "5aa34ebfd94197d395c6350ec934b7af", "score": "0.69432575", "text": "public function createCommand($className)\n {\n // todo move class creation from here\n $className = self::COMMAND_NAMESPACE.$className;\n\n return new $className($this->getContainer());\n }", "title": "" }, { "docid": "b4e5d906c1009131a1d679a6afe04c53", "score": "0.67934746", "text": "public static function fromCommand(Command $command): self\n {\n return new static(array_merge($command->arguments(), $command->options()));\n }", "title": "" }, { "docid": "aba1fb8f4a2e48c40894454da6f19504", "score": "0.6705834", "text": "public function create($type, array $data = [], string $magic = CommandInterface::MAGIC_REQUEST): CommandInterface;", "title": "" }, { "docid": "0a291888a74988d91621a88e96b30eac", "score": "0.6692408", "text": "public function createCommand($commandID, array $arguments = array());", "title": "" }, { "docid": "066615405ffed1003413a6902a5ef5a2", "score": "0.66518736", "text": "public static function factory($type)\n {\n $className = 'Amasty_Oaction_Model_Command_' . ucfirst($type);\n return new $className($type);\n }", "title": "" }, { "docid": "f19be15620f5da43fd946178db25dc2e", "score": "0.6619381", "text": "public function createCommand($method, $arguments = array());", "title": "" }, { "docid": "e207e9deae75d07e8b3c6770112ac9b1", "score": "0.65621066", "text": "public function init(): AbstractCommand;", "title": "" }, { "docid": "a166e35068280f238cebf02dafea8cbd", "score": "0.6552639", "text": "public function newCommand($globals)\n {\n return new Command(\n $this->getCliFactory()->newContext($globals),\n $this->getLogger(),\n $this->newService()\n );\n }", "title": "" }, { "docid": "2abd7098a8dade064eb14d102360c0b3", "score": "0.65100056", "text": "public function createCommand(CommandRequest $commandRequest) {\n\t\treturn new LogoutCommand();\n\t}", "title": "" }, { "docid": "333d5f38fdc1ebb03f1ea73333abb16e", "score": "0.65003085", "text": "public function __construct()\n {\n // you *must* call the parent constructor\n Command::__construct();\n }", "title": "" }, { "docid": "e53da0f63ac6ab558e02d29e0feeb163", "score": "0.6485441", "text": "public static function cmd($name=null)\n {\n return new static($name);\n }", "title": "" }, { "docid": "93423a918d9a1f6a1007ab8161fde990", "score": "0.6455533", "text": "protected function command($command)\r\n {\r\n $this->command = $command;\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "fe3d8e478fc91608aefd0c7884eb09c2", "score": "0.64499396", "text": "public function reRun(): Command\n {\n $command = static::create([\n 'command' => $this->command,\n 'user_id' => $this->user_id,\n 'environment_id' => $this->environment_id,\n ]);\n\n $command->dispatch();\n\n return $command;\n }", "title": "" }, { "docid": "943a262b6c60820989335f3771f26843", "score": "0.6418108", "text": "public static function factory(array $config = array())\n {\n if (!isset($config['cmd'])) {\n throw new Exception\\InvalidArgumentException(\"No shell command specified in config\");\n }\n\n if (!isset($config['cwd'])) {\n throw new Exception\\InvalidArgumentException(\"No cwd specified in config\");\n }\n\n if (!is_readable($config['cwd']) || !is_dir($config['cwd'])) {\n throw new Exception\\InvalidArgumentException(\"The cwd needs to be a readable directory\");\n }\n\n if (!isset($config['name'])) {\n throw new Exception\\InvalidArgumentException(\"No friendly name specified for this command\");\n }\n\n //generate an id to use\n $id = isset($config['id']) ? $config['id'] : uniqid();\n\n return new self(\n $config['cmd'],\n $config['cwd'],\n $config['name'],\n isset($config['args']) ? $config['args'] : array(),\n $id\n );\n }", "title": "" }, { "docid": "7a303563cfc597314a060ddf9614b600", "score": "0.64039403", "text": "public static function fromCommandArguments(Command $command): self\n {\n return new static($command->arguments());\n }", "title": "" }, { "docid": "b089b3eea70b11576d6f8938543dcbe0", "score": "0.63773245", "text": "private function __construct($command = null)\n {\n $this->command = $command;\n }", "title": "" }, { "docid": "ff72bccf26aef4522a92912c9422f273", "score": "0.63548887", "text": "abstract public function newCommand($command, $dockerOptions = [], ...$options);", "title": "" }, { "docid": "bacfdac39455007bd3c783082be53262", "score": "0.6353447", "text": "public function __invoke(Command $command): Command;", "title": "" }, { "docid": "5a56abf310a93021f9538e9c04876691", "score": "0.6316655", "text": "function Command($cmd = ''){\n\t\t$this->cmd = $cmd;\n\t}", "title": "" }, { "docid": "5393d87a74d5bd5339f5b454430db173", "score": "0.6300577", "text": "private function createCommand(string $command) {\n if (!isset($this->executers[$command])) {\n switch ($command) {\n case \"PLACE\" :\n $this->executers[$command] = new PlaceCommand();\n break;\n case \"MOVE\" :\n $this->executers[$command] = new MoveCommand();\n break;\n case \"REPORT\" :\n $this->executers[$command] = new ReportCommand();\n break;\n case \"LEFT\" :\n $this->executers[$command] = new LeftCommand();\n break;\n case \"RIGHT\" :\n $this->executers[$command] = new RightCommand();\n break;\n }\n }\n }", "title": "" }, { "docid": "2cc2c97da222d8e4fa4170dcdf151863", "score": "0.6291667", "text": "public static function fromCommandOptions(Command $command): self\n {\n return new static($command->options());\n }", "title": "" }, { "docid": "93ab0c52b7a29dcdbca29c903de9c703", "score": "0.6280719", "text": "public function with(Command $command);", "title": "" }, { "docid": "bf17a68e12c96dfcb9138588673f92ac", "score": "0.6225206", "text": "private function _command() {\n\t\t// Create <command/>\n\t\t$this->command = $this->epp->appendChild($this->document->createElement('command'));\n\t}", "title": "" }, { "docid": "a52cc16ce1cafe48fa1d300d21c3175a", "score": "0.6199689", "text": "public function command($name)\n {\n switch (trim($name)) {\n case 'branch':\n $command = new Command\\GitBranchCommand($this);\n break;\n case 'tag':\n $command = new Command\\GitTagCommand($this);\n break;\n case 'commit':\n $command = new Command\\GitCommitCommand($this);\n break;\n case 'diff':\n $command = new Command\\GitDiffCommand($this);\n break;\n case 'files':\n $command = new Command\\GitFilesCommand($this);\n break;\n case 'init':\n $command = new Command\\GitInitCommand($this);\n break;\n case 'log':\n $command = new Command\\GitLogCommand($this);\n break;\n case 'status':\n $command = new Command\\GitStatusCommand($this);\n break;\n case 'sync':\n $command = new Command\\GitSyncCommand($this);\n break;\n case 'undo':\n $command = new Command\\GitUndoCommand($this);\n break;\n default:\n throw new InvalidArgumentException(sprintf('Unknown command instance called: \"%s\"', $name));\n }\n\n return $command;\n }", "title": "" }, { "docid": "3a8264b59d424c3ee12d454278f8f559", "score": "0.6174266", "text": "protected function createCommand($name, array $parameters = [])\n {\n return new Fluent(array_merge(compact('name'), $parameters));\n }", "title": "" }, { "docid": "22711975ada2432010da83c53b8742e9", "score": "0.6170755", "text": "public function makeCommandInstanceByType(...$args): CommandInterface\n {\n $commandType = array_shift($args);\n\n switch ($commandType) {\n case self::FETCH_ONE_COMMAND:\n return $this->makeFetchOneCommand(...$args);\n\n case self::FIND_COMMAND:\n return $this->makeFindCommand(...$args);\n\n case self::FIND_LITE_COMMAND:\n return $this->makeFindLiteCommand(...$args);\n\n case self::SIGN_IN_COMMAND:\n return $this->makeSignInCommand(...$args);\n\n case self::REGISTER_TASK_COMMAND:\n return $this->makeUserRegisterTaskCommand(...$args);\n\n case self::REGISTER_COMMAND:\n return $this->makeUserRegisterCommand(...$args);\n\n case self::UPDATE_TASK_COMMAND:\n return $this->makeUserUpdateTaskCommand(...$args);\n\n case self::UPDATE_COMMAND:\n return $this->makeUserUpdateCommand(...$args);\n\n case self::DELETE_TASK_COMMAND:\n return $this->makeUserDeleteTaskCommand(...$args);\n\n case self::DELETE_COMMAND:\n return $this->makeUserDeleteCommand(...$args);\n\n case self::ADD_ID_COMMAND:\n return $this->makeUserAddIdCommand(...$args);\n\n default:\n throw new FactoryException(sprintf('Command bus for type `%s` not found!', (string)$commandType));\n }\n }", "title": "" }, { "docid": "5d1246c32c8109a66b9b8b3f3d5ee548", "score": "0.6168274", "text": "public function setCommand(Command $command);", "title": "" }, { "docid": "03ce9426f8238b3eac31bc5ce8e7b3e1", "score": "0.61504775", "text": "public function testInstantiation()\n {\n $command = new InstallCommand('contao:install');\n\n $this->assertInstanceOf('Contao\\\\CoreBundle\\\\Command\\\\InstallCommand', $command);\n }", "title": "" }, { "docid": "1d6c0ef751c3b8429e7e98da1aa518ba", "score": "0.61350244", "text": "public function createCommandTester(string $name, Command $command): CommandTester\n {\n $application = new Application();\n $application->add($command);\n\n return new CommandTester($application->find($name));\n }", "title": "" }, { "docid": "657c8fdd160c3f0835e8542e8fa9e598", "score": "0.61123586", "text": "protected function command($command)\n {\n // Fetch command from Container if necessary\n if (!$command instanceof AbstractCommand) {\n $command = $command ? $command : null;\n $command = $this->console->get($command);\n } elseif (!$command->getContainer()) {\n $command->setContainer($this->container);\n $command->setHelperSet(new HelperSet(['question' => new QuestionHelper()]));\n }\n\n return $command;\n }", "title": "" }, { "docid": "c8545b96b6a34b340fa8b2271a1a45f2", "score": "0.60902005", "text": "public static function create() {\n $executor = new ProcessExecutor();\n $finder = new ExecutableFinder();\n return new self($executor, $finder);\n }", "title": "" }, { "docid": "a9b2d0e11c1ccdd9b788af29e0254e54", "score": "0.6081284", "text": "public function getCommand();", "title": "" }, { "docid": "a9b2d0e11c1ccdd9b788af29e0254e54", "score": "0.6081284", "text": "public function getCommand();", "title": "" }, { "docid": "a9b2d0e11c1ccdd9b788af29e0254e54", "score": "0.6081284", "text": "public function getCommand();", "title": "" }, { "docid": "0b6dc5e5ff6a527a850562084beb7bba", "score": "0.6080432", "text": "public function __construct($command)\n {\n $this->command = $command;\n $this->template = static::$base.$this->command.'.php';\n }", "title": "" }, { "docid": "682c24366a3ee39c911bdfece4719593", "score": "0.60084116", "text": "public function command();", "title": "" }, { "docid": "7b080ce83f1043594cf8f74ca980d05b", "score": "0.59691626", "text": "public function __construct(DepositAdminCommand $command)\n\t{\n\t\t$this->command = $command;\n\t}", "title": "" }, { "docid": "4ef421ca00ec1e582e1d955aa955a1ba", "score": "0.5960031", "text": "private function createCommand($command): ?Command\r\n {\r\n $operators = [];\r\n\r\n // operators first\r\n while(\\is_array($command)) {\r\n $operators[] = \\key($command);\r\n $command = \\current($command);\r\n }\r\n\r\n // last one must be the value\r\n $value = $command;\r\n\r\n // only create commands when there's a value found\r\n if(null === $value) {\r\n return null;\r\n }\r\n\r\n $command = new Command($value);\r\n\r\n foreach($operators as $operator) {\r\n $command->setOperator($operator);\r\n }\r\n\r\n return $command;\r\n }", "title": "" }, { "docid": "794b25e8c2853ee387d1389058f4a09e", "score": "0.59379697", "text": "public static final function create ($messageType)\n {\n $messageClassName = null;\n $commandText = false;\n \n if (ctype_digit ($messageType))\n {\n if (isset (self :: $messageTypeMap [$messageType]))\n {\n $messageClassName = self :: $messageTypeMap [$messageType] [0];\n }\n }\n else if (is_string ($messageType))\n {\n $commandText = $messageType;\n $commandName = strtolower ($messageType);\n \n if (substr ($commandName, 0, 1) == ':')\n {\n $commandName = ltrim (strstr ($commandName, ' '));\n }\n \n if (strpos ($commandName, ' ') !== false)\n {\n $commandName = strstr ($commandName, ' ', true);\n }\n \n foreach (self :: $messageTypeMap as $messageId => $messageInfo)\n {\n if ($messageInfo [1] === $commandName)\n {\n $messageClassName = $messageInfo [0];\n break;\n }\n }\n }\n \n if ($messageClassName === null || !class_exists ($messageClassName, false))\n {\n $messageClassName = self :: $messageTypeMap [self :: MESSAGE_TYPE_UNKNOWN] [0];\n }\n \n $instance = new $messageClassName ();\n if ($commandText !== false)\n {\n $instance -> parse ($commandText);\n }\n \n return $instance;\n }", "title": "" }, { "docid": "eb3cacf3009c8671895dec1c4c870a9a", "score": "0.59224266", "text": "protected function __construct()\n {\n /*\n $this->command_name = \"some-command\";\n $this->commands = [\n 'cmd_name' => [\n 'usage' => \"cmd_name <required-arg> [optional-arg] [named=arg]\",\n 'help' => \"briefly what the command does\",\n 'proc' => \"procedure to call\",\n ],\n 'cmd2' => [\n 'usage' => \"cmd2 <reqarg>\",\n 'help' => \"this arg does something\",\n 'proc' => \"proc2\"\n ],\n ];\n */\n }", "title": "" }, { "docid": "c8d39681a6b02b901cfdec68affe0a8d", "score": "0.5920736", "text": "public function command(array $command): Builder\n {\n $this->command = $command;\n return $this;\n }", "title": "" }, { "docid": "40351d5e3a7322fc813731f509ee800d", "score": "0.5902167", "text": "public function __construct()\n {\n parent::__construct('Dumpling', static::VERSION);\n\n $this->add(new Command\\DumplingCommand);\n }", "title": "" }, { "docid": "5e1705dbb599e7f18292d91ecc57f696", "score": "0.58981764", "text": "public function setCommand($command);", "title": "" }, { "docid": "5e1705dbb599e7f18292d91ecc57f696", "score": "0.58981764", "text": "public function setCommand($command);", "title": "" }, { "docid": "74e5856b0f25a6d2e474b840c5d3f8cb", "score": "0.5896427", "text": "protected function instantiateCommand(Request $request, $args)\n {\n $command = new AddBookingCommand($args);\n\n $requestBody = $request->getParsedBody();\n\n $this->setCommandFields($command, $requestBody);\n\n $params = (array)$request->getQueryParams();\n\n if (isset($params['source'])) {\n $command->setPage($params['source']);\n unset($params['source']);\n }\n\n $command->setToken($request);\n\n return $command;\n }", "title": "" }, { "docid": "3285af99c4dbe10130b602c55470154c", "score": "0.58932316", "text": "public function commandRecord()\n {\n if (isset($this->record)) {\n return $this->record;\n }\n\n if ($id = $this->option('command-record-id')) {\n $this->record = CommandRecord::find($id);\n\n return $this->record;\n }\n\n $this->record = CommandRecord::create([\n 'name' => $this->getName(),\n 'arguments' => $this->arguments(),\n 'options' => $this->options(),\n 'result' => '',\n ]);\n\n return $this->record;\n }", "title": "" }, { "docid": "d89430905b26c14302360d29915e6996", "score": "0.5892332", "text": "public function createCommand(Connection $db = null)\n {\n if ($db === null) {\n $db = Yii::$app->get('dynamodb');\n }\n list($name, $argument) = $db->getQueryBuilder()->build($this);\n\n return $db->createCommand([\n 'name' => $name,\n 'argument' => $argument,\n ]);\n }", "title": "" }, { "docid": "bf1b4ac7267a770527ce84a1adfeb8f6", "score": "0.5891608", "text": "protected function setUpCommand() {\n $this->command = $this->client->getCommand('websend', array(\n 'cost' => 20,\n 'service' => 'TEST',\n 'receiver' => '+41790000000',\n 'text' => 'Test message',\n ));\n $this->command->prepare();\n }", "title": "" }, { "docid": "672f94a9f1bc3767116c734d0345a0dd", "score": "0.58869195", "text": "public function createCommand($query)\n {\n return $this->_lovdDatabaseConnection->createCommand($query);\n }", "title": "" }, { "docid": "eb03d0ef223eabebb3728cf6f8ef2580", "score": "0.5886665", "text": "public function setCommand($var)\n {\n GPBUtil::checkString($var, True);\n $this->command = $var;\n\n return $this;\n }", "title": "" }, { "docid": "81b69bfd5e3bad1f8fbbfa0ea7da1987", "score": "0.58733964", "text": "public function inputCommand(Input $input): Command;", "title": "" }, { "docid": "83b92fadf68ca7a7bb81aac62d1a638d", "score": "0.5867511", "text": "private function getCommand($command)\n {\n return ShellCommand::create($command);\n }", "title": "" }, { "docid": "4131bdeafe907eedcef42a06fcb27652", "score": "0.5860293", "text": "public static function build(array $argValues): CommandInterface;", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.58442044", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.58442044", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.58442044", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.58442044", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.58442044", "text": "public function create(){}", "title": "" }, { "docid": "4eae5ec5314226b0a4d84934c4812232", "score": "0.5837246", "text": "public function getFFmpegCommand()\n {\n return new $this->_ffmpegCommand;\n }", "title": "" }, { "docid": "097cce46fe9f20e63336e1deff4dcb90", "score": "0.58182347", "text": "public function create() { }", "title": "" }, { "docid": "f3135180580b5882d2ba5d28215fa78b", "score": "0.58178467", "text": "public function __construct($commandData)\n {\n $this->commandData = $commandData;\n }", "title": "" }, { "docid": "fe6a71e0e69a13cf39d457eb6adcf545", "score": "0.58096904", "text": "public static function create() : self;", "title": "" }, { "docid": "e83f81b6a42a9602ef395651a9e89f12", "score": "0.580711", "text": "public function init(string $name, string $command): string;", "title": "" }, { "docid": "93f11cec28c11bb103ce8a888d1dabfc", "score": "0.5805968", "text": "public function createCommand($type, $options = null): AbstractSchemaModification {\n\t\t$type = strtolower($type);\n\n\t\tif(!isset($this->commandTypes[$type])) {\n\t\t\tthrow new InvalidArgumentException(\"Update commandtype unknown: \" . $type);\n\t\t}\n\n\t\t$class = $this->commandTypes[$type];\n\n\t\treturn new $class($options);\n\t}", "title": "" }, { "docid": "d78141fa924eee856d5c0fd8546fcab8", "score": "0.5768265", "text": "public function run()\n {\n CommandType::create([\n 'name' => 'MESAS'\n ]);\n CommandType::create([\n 'name' => 'LLEVAR'\n ]);\n CommandType::create([\n 'name' => 'DELIVERY'\n ]);\n }", "title": "" }, { "docid": "d5e041cf81e295dcb993d3d763fcce2f", "score": "0.57646686", "text": "public function setCommand($var)\n {\n GPBUtil::checkEnum($var, \\Foliv\\Command::class);\n $this->command = $var;\n\n return $this;\n }", "title": "" }, { "docid": "86d07c14cccd01bf7bc92bbf0574447a", "score": "0.5752443", "text": "public function setCommand(?string $command): self\n {\n $this->command = $command;\n return $this;\n }", "title": "" }, { "docid": "e4deef52337a0283641550ed3186cd4e", "score": "0.5742806", "text": "private function generateCommand($name, \\ReflectionMethod $method, $token = null)\n {\n $methodName = $this->transformer->transform($method->getName());\n\n $command = new Command(strtolower($name . ':' . $methodName));\n $docBlock = DocBlockFactory::createInstance()->create($method->getDocComment());\n\n $command->setDefinition($this->buildDefinition($method, $token));\n $command->setDescription($docBlock->getSummary());\n $command->setCode($this->createCode($name, $method));\n\n return $command;\n }", "title": "" }, { "docid": "84a3275414b5a85f22c4f28b5a449ca3", "score": "0.57150066", "text": "public function buildCommand()\n {\n if (!isset($this->ansi) && $this->getConfig()->get(\\Robo\\Config\\Config::DECORATED)) {\n $this->ansi();\n }\n if (!isset($this->nointeraction) && !$this->getConfig()->get(\\Robo\\Config\\Config::INTERACTIVE)) {\n $this->noInteraction();\n }\n $this->option($this->prefer)\n ->option($this->dev)\n ->option($this->nointeraction)\n ->option($this->ansi);\n }", "title": "" }, { "docid": "963569ce46c52ecade2cabc3bc131206", "score": "0.5675685", "text": "public function createCommand(CDbConnection $dbConnection, $query=null)\n\t{\n\t\t$dbConnection->setActive(true);\n\n\t\t$dbCommand = new CBDbEventedCommand($dbConnection,$query);\n\t\t$dbCommand->onBeforeExecute = array($this, 'onExecuteCommand');\n\t\t$dbCommand->doActuallyExecute = $this->doActuallyExecute;\n\n\t\treturn $dbCommand;\n\t}", "title": "" }, { "docid": "216796f6d1f387f04d7b8b05196571e0", "score": "0.56712925", "text": "public static function add($command){\r\n return \\Illuminate\\Console\\Application::add($command);\r\n }", "title": "" }, { "docid": "1b17768123b2408151a8a3d5c83ce04b", "score": "0.5658113", "text": "public function __construct(Command $command)\n {\n /** @var Command|WithoutOverlapping $command */\n $this->command = $command;\n\n $mutexName = $command->getMutexName();\n $this->ninjaMutexLock = $this->getNinjaMutexLock();\n $this->ninjaMutex = new NinjaMutex($mutexName, $this->ninjaMutexLock);\n }", "title": "" }, { "docid": "8a24c6298e61b3c49ba23150db8c5af4", "score": "0.5631567", "text": "public function addCommand(Command $command): void;", "title": "" }, { "docid": "38f750c94a16c70918610974d806daf3", "score": "0.5616139", "text": "public function command(string $name, $handler = null, $option = null)\n {\n if (!$handler && class_exists($name)) {\n /** @var Command $name */\n $handler = $name;\n $name = $name::getName();\n }\n\n if (!$name || !$handler) {\n throw new \\InvalidArgumentException(\"Command 'name' and 'handler' not allowed to is empty! name: $name\");\n }\n\n $this->validateName($name);\n\n if (isset($this->commands[$name])) {\n throw new \\InvalidArgumentException(\"Command '$name' have been registered!\");\n }\n\n if (\\is_string($handler)) {\n if (!class_exists($handler)) {\n throw new \\InvalidArgumentException(\"The console command class [$handler] not exists!\");\n }\n\n if (!is_subclass_of($handler, Command::class)) {\n throw new \\InvalidArgumentException('The console command class must is subclass of the: ' . Command::class);\n }\n\n // not enable\n /** @var Command $handler */\n if (!$handler::isEnabled()) {\n return $this;\n }\n\n // allow define aliases in Command class by Command::aliases()\n if ($aliases = $handler::aliases()) {\n $option['aliases'] = isset($option['aliases']) ? array_merge($option['aliases'], $aliases) : $aliases;\n }\n } elseif (!\\is_object($handler) || !method_exists($handler, '__invoke')) {\n throw new \\InvalidArgumentException(sprintf(\n 'The console command handler must is an subclass of %s OR a Closure OR a object have method __invoke()',\n Command::class\n ));\n }\n\n // is an class name string\n $this->commands[$name] = $handler;\n\n if (!$option) {\n return $this;\n }\n\n // have option information\n if (\\is_string($option)) {\n $this->setCommandMetaValue($name, 'description', $option);\n } elseif (\\is_array($option)) {\n $this->addCommandAliases($name, $option['aliases'] ?? null);\n $this->setCommandMeta($name, $option);\n }\n\n return $this;\n }", "title": "" }, { "docid": "250c0caa68980fa80eaa301e18422d91", "score": "0.5615263", "text": "public function getCommand( $args );", "title": "" }, { "docid": "f640e6a6a6715e99e03a31c58264111e", "score": "0.56133074", "text": "protected function validate(): Command\n {\n return $this;\n }", "title": "" }, { "docid": "9bc2de60414bf5f1fde5f43dbfce0aa0", "score": "0.5612496", "text": "public function create($command)\n {\n return $this->cache->store($this->store)->add(\n $this->commandMutexName($command),\n true,\n method_exists($command, 'isolationLockExpiresAt')\n ? $command->isolationLockExpiresAt()\n : CarbonInterval::hour(),\n );\n }", "title": "" }, { "docid": "214f208fe685033bb2726b18f25b1d6c", "score": "0.56106615", "text": "public function __construct()\n {\n parent::__construct();\n\n // $this->commandData = new CommandData($this, CommandData::$COMMAND_TYPE_SCAFFOLD);\n }", "title": "" }, { "docid": "705a7e637ed86d5dfbec2b82d53f40af", "score": "0.5607357", "text": "public function getCommandCreator(Logger $logger = null)\n {\n return new CommandCreator(\n $this->getLogger($logger)\n );\n }", "title": "" }, { "docid": "ccd44d7229847bd580813da88f4172a4", "score": "0.5606029", "text": "public function create()\n {\n // NOT USED\n }", "title": "" }, { "docid": "d85bb1cd66aca5481cc7b6611bd433b1", "score": "0.5602325", "text": "protected function registerCommands()\n {\n $this->app->singleton('cms.commands.api.oauth-client-create', CreateOAuthClient::class);\n\n $this->commands([\n 'cms.commands.api.oauth-client-create',\n ]);\n\n return $this;\n }", "title": "" }, { "docid": "12971e39125096f43b32931cd0c9fd28", "score": "0.55936456", "text": "public function create() {\n\t\t// Not needed currently\n\t}", "title": "" }, { "docid": "bffa3f691c5f21c68b04ba87554f2333", "score": "0.5586595", "text": "public function createDefaultCommand($a_command)\n\t{\n\t\treturn $a_command;\n\t}", "title": "" }, { "docid": "323a6229db4567cb6f04801e83c55018", "score": "0.5567679", "text": "public function __construct()\n {\n parent::__construct();\n $this->commandModel = new CommandConfigOther();\n $this->maidOldModel = new JdMaidOldOut();\n $this->managerMaidService = new Maid();\n $this->otherMaidOldModel = new JdMaidOldOther();\n $this->managerModel = new ManagerPretendMaid();\n $this->commandModel->setCommandName($this->signature);\n }", "title": "" }, { "docid": "a7af95812586e8fe7f606fe4fb7e9d78", "score": "0.55640906", "text": "public function create() {\n }", "title": "" }, { "docid": "a7af95812586e8fe7f606fe4fb7e9d78", "score": "0.55640906", "text": "public function create() {\n }", "title": "" }, { "docid": "a7af95812586e8fe7f606fe4fb7e9d78", "score": "0.55640906", "text": "public function create() {\n }", "title": "" }, { "docid": "00b5c817e2e92221f7cccb8df1dda227", "score": "0.5563401", "text": "public function __construct()\n {\n parent::__construct();\n\n $this->commandData = new CommandData($this, CommandData::$COMMAND_TYPE_VUEJS);\n }", "title": "" }, { "docid": "2c64c5908326739f71fcb032935ba4cf", "score": "0.55546445", "text": "protected function getCommand(): Command\n {\n $this->application->add(new UpdateValueCommand());\n return $this->application->find('update:value');\n }", "title": "" }, { "docid": "1d4467cb578cbb99f9fa7a880a673bb9", "score": "0.5553599", "text": "public function addCommand(string $command): self\n {\n $this->commands[] = $command;\n\n return $this;\n }", "title": "" }, { "docid": "0a84cf3d3493aac5f8459d392680d80d", "score": "0.5538966", "text": "public function __construct()\n {\n parent::__construct('Climb', self::VERSION);\n\n $this->add(new OutdatedCommand());\n $this->add(new GlobalCommand());\n\n $this->setDefaultCommand('outdated');\n }", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.552908", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.552908", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.552908", "text": "public function create();", "title": "" } ]
cac19762c50a46fd9db05e0a6760f790
Get the CreateTask command
[ { "docid": "50eafc96669a62bfc54100a46c4abc59", "score": "0.0", "text": "protected function getCreateTaskCommand(\n \\Dvsa\\Olcs\\Api\\Entity\\PrintScan\\Scan $scan\n ) {\n $params = [\n 'category' => $scan->getCategory()->getId(),\n 'subCategory' => $scan->getSubCategory()->getId(),\n 'description' => $scan->getDescription(),\n ];\n\n if ($scan->getLicence()) {\n $params['licence'] = $scan->getLicence()->getId();\n }\n if ($scan->getBusReg()) {\n $params['busReg'] = $scan->getBusReg()->getId();\n }\n if ($scan->getCase()) {\n $params['case'] = $scan->getCase()->getId();\n }\n if ($scan->getTransportManager()) {\n $params['transportManager'] = $scan->getTransportManager()->getId();\n }\n if ($scan->getIrfoOrganisation()) {\n $params['irfoOrganisation'] = $scan->getIrfoOrganisation()->getId();\n }\n if ($scan->getIrhpApplication()) {\n $params['irhpApplication'] = $scan->getIrhpApplication()->getId();\n }\n\n return \\Dvsa\\Olcs\\Api\\Domain\\Command\\Task\\CreateTask::create($params);\n }", "title": "" } ]
[ { "docid": "c237de09f0753014cefded3ecfe5f702", "score": "0.71928877", "text": "public function createTask()\n {\n return factory($this->model)->create();\n }", "title": "" }, { "docid": "fffb1cffa802c0f9b1da45df03e31b2c", "score": "0.69957346", "text": "public function getTaskCmd()\n {\n return $this->get(self::TASK_CMD);\n }", "title": "" }, { "docid": "d0f8c9bc5e3ae31345fceba33c752248", "score": "0.6553026", "text": "public function getTask() {\n return $this->call->getTask();\n }", "title": "" }, { "docid": "b2ba9a867aff4d112cdf3dbe74837eb1", "score": "0.6548119", "text": "public function getTask()\n {\n return new Task($this->get('taskID'));\n }", "title": "" }, { "docid": "0524e4a8d1bab4bb72783d6e4e599c7a", "score": "0.6459259", "text": "public function getTask() {}", "title": "" }, { "docid": "0524e4a8d1bab4bb72783d6e4e599c7a", "score": "0.64588755", "text": "public function getTask() {}", "title": "" }, { "docid": "0524e4a8d1bab4bb72783d6e4e599c7a", "score": "0.64588755", "text": "public function getTask() {}", "title": "" }, { "docid": "3032fbcf31c73d9e84bdf1f265aff948", "score": "0.64300364", "text": "public function getTask(): string\n {\n return $this->task;\n }", "title": "" }, { "docid": "38e796dffb22fac236a960d2f10102f1", "score": "0.6412705", "text": "function getTask() ;", "title": "" }, { "docid": "f3de0ead7c899ccd04dd0d67201fa723", "score": "0.64034545", "text": "public function getTask();", "title": "" }, { "docid": "f3de0ead7c899ccd04dd0d67201fa723", "score": "0.64034545", "text": "public function getTask();", "title": "" }, { "docid": "84230ff8600942847c940c2888dfde61", "score": "0.63989484", "text": "public function getTask()\n {\n return $this->task;\n }", "title": "" }, { "docid": "84230ff8600942847c940c2888dfde61", "score": "0.63989484", "text": "public function getTask()\n {\n return $this->task;\n }", "title": "" }, { "docid": "0fd71834d05cdb9da1736b6ffd5158bf", "score": "0.6387938", "text": "private function createTask() {\n $query = $this->createQuery();\n\n\t\techo $query;\n\n $task = $this->database->prepare($query);\n $task->execute($this->queryProperty->getWhereArgs());\n return $task;\n }", "title": "" }, { "docid": "d2ee1555a7c706d6180a7b698321b0b8", "score": "0.6386558", "text": "public function getName()\n {\n return 'task_create_short';\n }", "title": "" }, { "docid": "f13f240d6aefc617f361ead53dd6e1e2", "score": "0.62728167", "text": "function getTask() {\n\t\treturn $this->_task;\n\t}", "title": "" }, { "docid": "28b2e1f80b7f626ff0dbfff15f2317c0", "score": "0.624861", "text": "public function CreateTask()\n {\n\n $data = $this->GetParamsFromRequestBody('create');\n\n if (!isset($data['status'])) {\n $data['status'] = \"open\";\n }\n\n $data['createdby'] = $this->loggedUser->getId();\n\n $this->insertArrayIntoDatabase('todo_task', $data);\n $id = mysql_insert_id();\n\n $this->response = array(\n \"status\" => 0,\n \"id\" => $id\n );\n $this->responseStatus = 201;\n }", "title": "" }, { "docid": "4d80b05b6db91fd2e779bb1e4a852651", "score": "0.62149304", "text": "public function getCommand() {}", "title": "" }, { "docid": "be6512dac42a03b8e887d1ec1d3ff5f7", "score": "0.6198073", "text": "public function getCreate()\n {\n return $this->get(self::_CREATE);\n }", "title": "" }, { "docid": "9e3410bcaf136d146adece64789b1063", "score": "0.61587787", "text": "public function createTask(Request $request)\n : TaskInterface\n {\n // validate the base rules.\n $this\n ->getCreateTaskValidator()\n ->validate($request);\n\n // Create resource\n $resource = $this->createResource(\n $request->input('storage.channel'),\n $this->makePath($request->input('filename'))\n );\n\n // Create task\n $channel = $this->getChannel($resource);\n $channel->setRequest($request);\n\n return $channel->createTask();\n }", "title": "" }, { "docid": "a9b2d0e11c1ccdd9b788af29e0254e54", "score": "0.6100215", "text": "public function getCommand();", "title": "" }, { "docid": "82d8131b1ecc06664db47e36f9fc01b1", "score": "0.6081902", "text": "protected function createTask($name)\n {\n if (null === $this->commandApplication)\n {\n throw new LogicException('Unable to create a task as no command application is associated with this task yet.');\n }\n\n $task = $this->commandApplication->getTaskToExecute($name);\n\n if ($task instanceof sfCommandApplicationTask)\n {\n $task->setCommandApplication($this->commandApplication);\n }\n\n return $task;\n }", "title": "" }, { "docid": "5c3ef434011c32d859ed22950d617147", "score": "0.607108", "text": "public function createTask(TaskInterface $task) {\n\n return $this->request('tasks', 'POST', [], json_encode($task->getProperties()));\n }", "title": "" }, { "docid": "030a30122f82fae68f7ab36ae4d8ec47", "score": "0.6070365", "text": "protected function Create() {\n // Assignment: Generate unique id for the new task\n $this->TaskId = $this->getUniqueId();\n $this->TaskName = 'New Task';\n $this->TaskDescription = 'New Description';\n }", "title": "" }, { "docid": "3f32a85442e9fd85dbac05d6c899fd0f", "score": "0.60673547", "text": "public function createTask()\n\t{\n\t\tif ( $this->taskValidate() ) {\n\t\t\tTask::create([\n\t\t\t\t\t'name' => htmlspecialchars($_POST['inputTaskName']),\n\t\t\t\t\t'email' => htmlspecialchars($_POST['inputTaskMail']),\n\t\t\t\t\t'text' => htmlspecialchars($_POST['inputTaskText'])\n\t\t\t\t]);\n\t\t}\n\t\t// to index\n\t\t\theader('Location: /');\n\t}", "title": "" }, { "docid": "a11631b84fc29a0fba8fa6f36aca9e28", "score": "0.60507756", "text": "public function create()\n {\n $this->getUser()->hasPermission(['insert'], 'auto_tasks');\n\n return view('autotasks.create');\n }", "title": "" }, { "docid": "cf65e19bb1196d9ed922c8f7c62e27cd", "score": "0.6034835", "text": "public function getCommand()\n {\n }", "title": "" }, { "docid": "0d418aabcd1733769697068ed30e7f00", "score": "0.6032051", "text": "public function testCreateTask()\n {\n }", "title": "" }, { "docid": "2edeec9b9bd4e59d25c18d5f2a2a1f6d", "score": "0.6016661", "text": "public function create()\n {\n return view('projectmanager::admin.tasks.create');\n }", "title": "" }, { "docid": "da9d71e5adcaa229598bea870d8dbfde", "score": "0.59930044", "text": "public function actionCreateTask() {\n // Check settings, show errors if there are any\n try {\n craft()->goLive_settings->verifySettings();\n }\n catch (Exception $e) {\n header('HTTP/1.1 ' . 500);\n\n $errorMessage = $e->getMessage();\n $this->returnErrorJson($errorMessage);\n }\n catch (HttpException $e) {\n header('HTTP/1.1 ' . $e->statusCode);\n\n $errorMessage = $e->getMessage();\n $this->returnErrorJson($errorMessage);\n }\n\n // Settings look good, create and run the task.\n // Also, set a random-ish backup file name to be referenced within the task steps\n $deployTask = craft()->tasks->createTask(\n 'GoLive_Deploy',\n 'GoLive_Deploy',\n array(\n 'backupFileName' => uniqid('goLive_') . '.sql'\n )\n );\n\n // Tries to end the HTTP session, and definitely starts running the pending tasks.\n // Our task may or may not be first in that queue.\n craft()->tasks->closeAndRun();\n }", "title": "" }, { "docid": "25f7183b60c9d266d14d2f37c4dce883", "score": "0.59498745", "text": "public function makeCommand() \n {\n if($this->CrontabCommandObject === NULL)\n {\n $this->CrontabCommandObject = new \\root\\library\\Crontab\\CrontabCommand\\CrontabCommand();\n }\n \n return $this->CrontabCommandObject;\n }", "title": "" }, { "docid": "1a8fb98679fb83c7aba8bd7e9608f672", "score": "0.5947221", "text": "public function getTodoTask(): string {\n\t\treturn $this->todoTask;\n\t}", "title": "" }, { "docid": "8f7a56a81b9ef071ead4ee30af736c1a", "score": "0.5878576", "text": "public function getTaskIdentifier() {}", "title": "" }, { "docid": "9826e565f41df9f7396982267bf165a0", "score": "0.5873019", "text": "public function newTask(){\n if (!$this->validate()) {\n return null;\n }\n \n if( $activity = $this->saveTask() ){\n if($this->type == 'technique'){\n if(!$this->saveDevs()){ \n return null;\n }\n } \n return $activity; \n }\n return null; \n }", "title": "" }, { "docid": "df5b098dc74d65bc6174e6e24cd1ce30", "score": "0.5824", "text": "private function CreateCustomTask() {\n\t\t$lRecipientsData = $this->m_taskModel->GetCustomTaskRecipientsData($this->m_customRecipients, $this->m_customReplaceSql);\n\t\t$lCnt = 0;\n\t\tforeach ($lRecipientsData as $key => $value) {\n\t\t\t$lTempl = $this->ReplaceEmailTaskTemplate($this->m_customTemplate, $value[0]);\n\t\t\t$lSubj = $this->ReplaceEmailTaskTemplate($this->m_customSubject, $value[0]);\n\t\t\t\n\t\t\t\n\t\t\t$lUsersArr[] = (int)$value[0]['id'];\n\t\t\t$lUserTemplArr[] = '\\'' . q($lTempl) . '\\'';\n\t\t\t$lUserSubjArr[] = '\\'' . q($lSubj) . '\\'';\n\t\t\t$lUsersRoleArr[] = 0;\n\t\t\t\n\t\t\t$lCnt++;\n\t\t}\n\t\t$lUsersArrString = 'ARRAY[' . implode(\",\", $lUsersArr) . ']';\n\t\t$lUsersRoleArrString = 'ARRAY[' . implode(\",\", $lUsersRoleArr) . ']';\n\t\t$lUserTemplArrString = 'ARRAY[' . implode(\",\", $lUserTemplArr) . ']';\n\t\t$lUserSubjArrString = 'ARRAY[' . implode(\",\", $lUserSubjArr) . ']';\n\t\t\n\t\t$lTaskData = $this->m_taskModel->CreateTask(\n\t\t\t(int)$this->m_eventId, \n\t\t\t(int)SEND_EMAIL_TASK_DEFINITION_ID, \n\t\t\t$lUsersArrString, \n\t\t\t$lUserTemplArrString, \n\t\t\t$lUsersRoleArrString, \n\t\t\t'false', \n\t\t\t$lUserSubjArrString,\n\t\t\t''\n\t\t);\n\t}", "title": "" }, { "docid": "a63ebb179db75cdc3df2bb3966163237", "score": "0.5818929", "text": "public function getTaskType();", "title": "" }, { "docid": "46f7d63bb28c2371e690861d2cb438d3", "score": "0.5817508", "text": "public function create()\n {\n return view('task::create');\n }", "title": "" }, { "docid": "23c20625d73061e7cb1d683a87fafc5b", "score": "0.5810758", "text": "public function create()\n {\n return view('task-create');\n }", "title": "" }, { "docid": "e992c28e0fb79d2f0a1493f92d7f3f72", "score": "0.5806283", "text": "public function create()\n\t{\n\t\treturn View::make('roletasks.create');\n\t}", "title": "" }, { "docid": "7ae7b42b7d3abae4ba734bc7f2e6362e", "score": "0.58060044", "text": "abstract protected function getCommand();", "title": "" }, { "docid": "536d614141d160bc5ea470057be535e5", "score": "0.58047116", "text": "public function create()\n {\n return view('task.add-task');\n }", "title": "" }, { "docid": "07b6e90f5a4f87042ac3251da8e96f12", "score": "0.57999825", "text": "protected function createAdminsEntity()\n {\n $adminUser = $this->em->getRepository('APICoreBundle:User')->findOneBy([\n 'username' => 'admin'\n ]);\n\n $webSolCompany = $this->em->getRepository('APICoreBundle:Company')->findOneBy([\n 'title' => 'Web-Solutions'\n ]);\n\n $adminProject = $this->em->getRepository('APITaskBundle:Project')->findOneBy([\n 'title' => 'Project of admin'\n ]);\n\n $task = new Task();\n $task->setTitle('Task TEST - admin is creator, admin is requested 3');\n $task->setDescription('Description of Task TEST');\n $task->setImportant(false);\n $task->setCreatedBy($adminUser);\n $task->setRequestedBy($adminUser);\n $task->setCompany($webSolCompany);\n $task->setProject($adminProject);\n\n $this->em->persist($task);\n $this->em->flush();\n\n return $task;\n }", "title": "" }, { "docid": "7c09cf54072bdf5c0dee7b6902ff37a4", "score": "0.5797574", "text": "public function create()\n {\n return view(('tasks.create'));\n }", "title": "" }, { "docid": "f037ebd5c9cce3ea303fbbb324047da7", "score": "0.5793666", "text": "public static function getTaskId()\n {\n return self::$TASK_ID;\n }", "title": "" }, { "docid": "f803b598a320a42305503a55db22e747", "score": "0.57873344", "text": "public function makeItemCreateTaskCommand(ItemDto $itemDto): ItemCreateTaskCommand\n {\n $uuid = ProcessUuid::fromNative(null);\n $item = Item::fromNative($itemDto->normalize());\n\n return new ItemCreateTaskCommand($uuid, $item);\n }", "title": "" }, { "docid": "b6a004e1e89b4fe514f6e18006013bc8", "score": "0.57867134", "text": "public function create()\n {\n return \"create\";\n }", "title": "" }, { "docid": "1ecaa1fd57730b21b22a1cf6cd63dd81", "score": "0.57771367", "text": "public function command()\n {\n return $this->command;\n }", "title": "" }, { "docid": "a9cbcf6badf9ed5d40fb17d5a48e4364", "score": "0.5769357", "text": "public static function blankTask() {\n $task = new Task();\n $task->setPriority(1);\n return $task;\n }", "title": "" }, { "docid": "4033df56668f391431b94c9b9ade55db", "score": "0.5766497", "text": "public function createCommand()\r\n\t{\r\n\t\t$obj = new DbCommand($this,$this->dbms);\r\n\t\treturn $obj;\r\n\t}", "title": "" }, { "docid": "01d4b1ce57d36db559eea79e7d61e50f", "score": "0.5751237", "text": "public function getCreateTaskUrl()\n\t{\n\t\t$calendarModuleModel = Vtiger_Module_Model::getInstance('Calendar');\n\t\treturn $calendarModuleModel->getCreateTaskRecordUrl() . '&link=' . $this->getId();\n\t}", "title": "" }, { "docid": "ad4b78e5523c6f23264c4cc820e6f236", "score": "0.57409596", "text": "public function create(array $task)\n {\n $attributes = array_intersect_key($task, array_flip(self::$keysToPersist));\n \n list($code, $createdTask) = $this->httpClient->post(\"/tasks\", $attributes);\n return $createdTask; \n }", "title": "" }, { "docid": "20e88305ca10e2466cae18b77a3a507b", "score": "0.57195956", "text": "public function getTaskId()\n {\n return $this->get(self::TASK_ID);\n }", "title": "" }, { "docid": "20e88305ca10e2466cae18b77a3a507b", "score": "0.57195956", "text": "public function getTaskId()\n {\n return $this->get(self::TASK_ID);\n }", "title": "" }, { "docid": "e6accc808b6218f4163c0fb197a609c9", "score": "0.5691543", "text": "public function create()\n {\n return view('createTasks');\n }", "title": "" }, { "docid": "28cc1e2b3292955b1af8427a53d4f2c3", "score": "0.5667052", "text": "public function create(): void {\n\t\t$rawdata = array(\n\t\t\t'datetime' => $this->request->request->get('datetime', null),\n\t\t\t'priority' => $this->request->request->getInt('priority', 1),\n\t\t\t'description' => $this->request->request->get('description'),\n\t\t);\n\n\t\t$rawdata['datetime'] ??= new DateTime();\n\n\t\tif ($rawdata['description'] !== '') {\n\t\t\tpreg_match('/^(.+?) ?(?:\\\\[(\\\\d+)\\\\]|)$/', strip_tags($rawdata['description'] ?? ''), $matches);\n\t\t\t$rawdata['description'] = $matches[1];\n\t\t}\n\n\t\t$data = array(\n\t\t\t'name' => $rawdata['description'],\n\t\t\t'donereward' => $matches[2] ?? 0,\n\t\t\t'priority' => $rawdata['priority'],\n\t\t\t'duedate' => $rawdata['datetime'],\n\t\t\t'user' => $this->user\n\t\t);\n\n\t\t$task = $this->di_repo->new(TaskModel::class, $data);\n\n\t\tif (($validResult = $task->valid()) === true) {\n\t\t\tif (!$task->save()) {\n\t\t\t\tthrow new RuntimeException('Could not save new task valid?:'.var_export($task->valid(), true));\n\t\t\t}\n\n\t\t\t$this->view->set('errors', false);\n\t\t} else {\n\t\t\t$this->view->set('errors', $validResult->getAll());\n\t\t}\n\n\t\t$this->respondTo('json');\n\t}", "title": "" }, { "docid": "466d8898a5a66c289bec9b77fda80536", "score": "0.5664276", "text": "public function getCreationFormTemplate()\n {\n return 'GithubFrontend:task/creation';\n }", "title": "" }, { "docid": "acabd7c93b368e1025f659f14ff8e7a7", "score": "0.5651778", "text": "public function command()\n\t{\n\t\treturn $this->command;\n\t}", "title": "" }, { "docid": "acabd7c93b368e1025f659f14ff8e7a7", "score": "0.5651778", "text": "public function command()\n\t{\n\t\treturn $this->command;\n\t}", "title": "" }, { "docid": "0543eb91050bb7dbf3b7426fb08518d9", "score": "0.564782", "text": "public function getTaskTarget()\n {\n return $this->get(self::_TASK_TARGET);\n }", "title": "" }, { "docid": "0543eb91050bb7dbf3b7426fb08518d9", "score": "0.564782", "text": "public function getTaskTarget()\n {\n return $this->get(self::_TASK_TARGET);\n }", "title": "" }, { "docid": "cebcf8ceb7a8c10e125826694311f6b5", "score": "0.5642723", "text": "public function getTaskId(): ?string;", "title": "" }, { "docid": "caab0b3df70d5ceb5f30e245ed91d983", "score": "0.56385636", "text": "public function getTaskClassName() {}", "title": "" }, { "docid": "d241c14ec4687daafff12c2ec19e1694", "score": "0.5638154", "text": "public function getTaskId()\n {\n return $this->taskId;\n }", "title": "" }, { "docid": "5bcd16e4b9af4eb217c59297d4af0235", "score": "0.56373847", "text": "public function getCommand()\n {\n return $this->command;\n }", "title": "" }, { "docid": "5bcd16e4b9af4eb217c59297d4af0235", "score": "0.56373847", "text": "public function getCommand()\n {\n return $this->command;\n }", "title": "" }, { "docid": "5bcd16e4b9af4eb217c59297d4af0235", "score": "0.56373847", "text": "public function getCommand()\n {\n return $this->command;\n }", "title": "" }, { "docid": "5bcd16e4b9af4eb217c59297d4af0235", "score": "0.56373847", "text": "public function getCommand()\n {\n return $this->command;\n }", "title": "" }, { "docid": "c5692a4e24f3ca4792bd0e612430e07a", "score": "0.56371176", "text": "public function getToolCommand(): string;", "title": "" }, { "docid": "280bc003f48421f0fb4c0e3b7bea602a", "score": "0.563675", "text": "public function getTaskDescription() {}", "title": "" }, { "docid": "a3233709fa18034f17a9e70cbeea96f4", "score": "0.5628509", "text": "public function get()\n\t\t{\n\t\t\treturn $this->command;\n\t\t}", "title": "" }, { "docid": "02a8436ce1e58fb3fe1743a4bf43a67b", "score": "0.5623758", "text": "public function createCommand($type) {\r\n $command = $this->xml->createElement('command');\r\n $command->setAttribute('xsi:type', $type);\r\n $command->setAttribute('xmlns', '');\r\n $this->xmlSchema($command);\r\n return $command;\r\n }", "title": "" }, { "docid": "85ad9d0c514bcfa8c31afc6a673e2ba7", "score": "0.561523", "text": "public function create()\n {\n return view('task');\n }", "title": "" }, { "docid": "04ac7810c108f000a4288823541c9780", "score": "0.5613804", "text": "public function getCommandParentName(): string\n\t{\n\t\treturn CliCreate::COMMAND_NAME;\n\t}", "title": "" }, { "docid": "c6bd873015405da91c95271ab57dc937", "score": "0.5606226", "text": "public function getIdTask()\n {\n return $this->id_task;\n }", "title": "" }, { "docid": "c4f996972e268bcad3c87506e9ff1463", "score": "0.5598312", "text": "public function getCommand() {\n return $this->command;\n }", "title": "" }, { "docid": "d1f8b9b9e7ebb28fc059803273a2baa8", "score": "0.55974734", "text": "public function createCommand() {\n\t\treturn new UnboxedCommand( $this );\n\t}", "title": "" }, { "docid": "41b3bf93c80ecf6a07a60ae8c1a36485", "score": "0.5596957", "text": "public function getCommand() {\n\t\t$command = $this->extractCommand() .'Action';\n\n\t\tif( $this->_verbose )\n\t\t\t$this->set( '_command', $command );\n\n\t\treturn $command;\n\t}", "title": "" }, { "docid": "208435e776e9ef41fadd36542709333f", "score": "0.5591717", "text": "public function getCreate()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "901e030299dae7dcf8e4fc9ffdbf8062", "score": "0.55889446", "text": "public function getCommand() {\n\t\t$spec = self::$specs[$this->id];\n\t\treturn array_value($spec, \"command\", NULL);\n\t}", "title": "" }, { "docid": "b13855724da41f8fe3b7f954cb77c593", "score": "0.55807114", "text": "public function create()\n {\n return $this->work->srvCreate();\n }", "title": "" }, { "docid": "02113ab3e48ffc64d6313969d129824b", "score": "0.55656123", "text": "function Get_CreateScript()\r\n\t{\r\n\t\treturn $this->_createScript;\r\n\t}", "title": "" }, { "docid": "59925caeef62366fe0a900996a794543", "score": "0.55640954", "text": "public function getCommand()\n {\n return $this->_command;\n }", "title": "" }, { "docid": "2cc999887373bb38efd9e72e97927ef6", "score": "0.55587864", "text": "public function getCommand() {\n\t\treturn $this->command;\n\t}", "title": "" }, { "docid": "5fcadd17516c42a86c989e0e205f1341", "score": "0.5549904", "text": "public function getCommand(): string\n {\n return $this->command;\n }", "title": "" }, { "docid": "5fcadd17516c42a86c989e0e205f1341", "score": "0.5549904", "text": "public function getCommand(): string\n {\n return $this->command;\n }", "title": "" }, { "docid": "f63178523ea1af244b4005a1deb47b18", "score": "0.5546951", "text": "public function create()\n {\n return view('WorkFlow.WorkTask.add');\n }", "title": "" }, { "docid": "23d16e7b15c5469a9b9bbb2455d2eb67", "score": "0.5545963", "text": "public function createTaskRequest($task_dto = null)\n {\n\n $resourcePath = '/task/create';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\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']\n );\n }\n\n // for model (json/xml)\n if (isset($task_dto)) {\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($task_dto));\n } else {\n $httpBody = $task_dto;\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\\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": "0f3892b77d757938cdf590cd757ce0c3", "score": "0.55441374", "text": "public function create()\n {\n return view('tasks.create');\n }", "title": "" }, { "docid": "0f3892b77d757938cdf590cd757ce0c3", "score": "0.55441374", "text": "public function create()\n {\n return view('tasks.create');\n }", "title": "" }, { "docid": "2bc54f6eb19bc428f36edfb7ad11c96c", "score": "0.5540029", "text": "public static function name()\n {\n return 'create';\n }", "title": "" }, { "docid": "aa750c645d7b628b24babc32ced9fd94", "score": "0.552955", "text": "public function getCommand()\n {\n return $this->getPath() . \" -\" . $this->getFlags();\n }", "title": "" }, { "docid": "ef4ff4185962db1dbddecd2045ac8716", "score": "0.55214804", "text": "protected function getCreateCommand()\n {\n $command = new IndexCreateCommand();\n $command->setContainer($this->getContainer());\n\n return $command;\n }", "title": "" }, { "docid": "1487fe4a4347fd98b1660327ab687da8", "score": "0.55153835", "text": "public function getTask()\n {\n return $this->hasOne(Task::className(), ['task_id' => 'task_id']);\n }", "title": "" }, { "docid": "f236580f6fd5414a56a9736eca4c6d43", "score": "0.5504946", "text": "public function getCommand() {\n return $this->getValue(self::FIELD_COMMAND);\n }", "title": "" }, { "docid": "4d96837ed9563dc0e6757d28f17343b3", "score": "0.550155", "text": "public function getTaskType()\n {\n return $this->get('type');\n }", "title": "" }, { "docid": "448e9ca911c2b18ff74f0eb20e4a52c6", "score": "0.5497432", "text": "private function add_task()\n {\n \t$helperPluginManager = $this->getServiceLocator();\n \t$serviceManager = $helperPluginManager->getServiceLocator(); \t \n \t$task = $serviceManager->get('PM/Model/Tasks');\n \t$result = $task->getTaskById($this->pk);\n \tif($result)\n \t{\n \t\t$company_url = $this->view->url('companies/view', array('company_id' => $result['company_id']));\n \t\t$project_url = $this->view->url('projects/view', array('project_id' => $result['project_id']));\n \t\t$task_url = $this->view->url('tasks/view', array('task_id' => $result['id']));\n \t\t\n \t\t$this->add_breadcrumb($company_url, $result['company_name']);\n \t\t$this->add_breadcrumb($project_url, $result['project_name']);\n \t\t$this->add_breadcrumb($task_url, $result['name'], TRUE);\n \t}\n }", "title": "" }, { "docid": "49c9ade063141abac8507e01847755ad", "score": "0.5494322", "text": "public function getCommand()\n {\n return $this->oCommand;\n }", "title": "" }, { "docid": "fcac543d8807a5defafecf0b4b3d9a4a", "score": "0.5493975", "text": "public function getCommand() {\n\t\treturn $this->_command;\n\t}", "title": "" }, { "docid": "d1e52211a38b6156922927b5de3c45ad", "score": "0.5482438", "text": "public function create()\n {\n return view('tasks.create');\n }", "title": "" }, { "docid": "cf7e4e97afba13cc6befc673559c03b5", "score": "0.5480201", "text": "public function createCommand($string = '')\n {\n return $this->createStringable($string);\n }", "title": "" }, { "docid": "c0ed480db1f9b0fd1405a83885351afd", "score": "0.54799855", "text": "public function getNameTask()\n {\n return $this->name_task;\n }", "title": "" } ]
1b6b8cec24c27ab9dff21b94d8fb189b
Test if the value is of a certain type
[ { "docid": "44d962d97bdf3e2850e35589c3ab5e6e", "score": "0.60952854", "text": "public function assert_type_of($value, $expectation)\n\t{\n\t\tTests::$results['assertions']++;\n\n\t\t$type_aliasses = array('bool' => 'boolean', 'int' => 'integer', 'float' => 'double');\n\t\tarray_key_exists($expectation, $type_aliasses) and $expectation = $type_aliasses[$expectation];\n\n\t\tif (gettype($value) == $expectation)\n\t\t{\n\t\t\t$this->pass();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->fail('assert_type_of - Value is not of type \"'.$expectation.'\", but instead \"'.gettype($value).'\".');\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "4849a4c130af755577af6599be8be4e6", "score": "0.77641404", "text": "function checkType ($value, $type) {\n\tswitch ($type) {\n\t\tcase STRING : $r = is_string ($value); break;\n\t\tcase BOOL : $r = is_bool ($value); break;\n\t\tcase NUMERIC : $r = is_int ($value); break;\n\t\tcase REAL : $r = (is_real ($value) or is_int ($value)); break;\n\t\tdefault : return new Error ('TYPE_NOT_RECOGNIZED'); \n\t}\n\t\n\tif ($r === true) {\n\t\treturn true;\n\t} else {\n\t\treturn new Error ('TYPE_MISMATCH_VALUE', $type, $value);\n\t}\n}", "title": "" }, { "docid": "2a4a9bed6b58c3cbd07c751ae0eaf918", "score": "0.7637114", "text": "public static function typeMatches ($value, $type) {\n $types = array(\"string\", \"number\", \"array\", \"object\", \"date\", \"boolean\", \"null\");\n $phpType = gettype($value);\n //....?\n }", "title": "" }, { "docid": "cef7b23ea5f9b612b2413b3e06af064e", "score": "0.7471761", "text": "function is($type);", "title": "" }, { "docid": "7cf7fbed5571c9dbbddfd6f58d047ec3", "score": "0.7294164", "text": "final public function isType(string $value):bool\n {\n return $this->type() === $value;\n }", "title": "" }, { "docid": "7f29eb5a07e867aebaa88a505c06eba4", "score": "0.72188586", "text": "function check( $value, $type='text' )\n {\n return Pgg_Validate::is( $value, $type );\n }", "title": "" }, { "docid": "43b3a06b5fc94ea41029c6d93855ebe2", "score": "0.71934956", "text": "public function isValue()\n {\n return\n $this->type === 'string' ||\n $this->type === 'number' ||\n $this->type === 'null' ||\n $this->type === 'boolTrue' ||\n $this->type === 'boolFalse';\n }", "title": "" }, { "docid": "f02743a155a03a4695d3cc45c3982ac1", "score": "0.707995", "text": "protected function validateType($value)\n {\n }", "title": "" }, { "docid": "35757d45a95235ca52d4caba72af82db", "score": "0.7077963", "text": "public function isType($type){\n \n // canary...\n if(!$this->hasType()){ return false; }//if\n \n return ($this->field_map['type'] === $type);\n \n }", "title": "" }, { "docid": "41c7a2166e2f44a9d22656075fd90988", "score": "0.6917688", "text": "private function validate($value,$type) {\n\t\tswitch($type) {\n\t\t\tcase \"varchar\":\n\t\t\t\treturn self::is_alphanum($value);\n\t\t\t\tbreak;\n\t\t\tcase \"int\":\n\t\t\t\treturn self::is_num($value);\n\t\t\t\tbreak;\n\t\t\tcase \"binary\":\n\t\t\t\treturn self::is_binary($value);\n\t\t\t\tbreak;\n\t\t\tcase \"alpha\":\n\t\t\t\treturn self::is_alpha($value);\n\t\t\t\tbreak;\n\t\t\tcase \"signed\":\n\t\t\t\treturn self::is_signed($value);\n\t\t\t\tbreak;\n\t\t\tcase \"file\":\n\t\t\t\treturn true;\n\t\t\t\tbreak;\n\t\t\tcase \"alpha\":\n\t\t\t\treturn self::is_alpha($value);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "9e773f85cb8a4dd66a8af80e9e448377", "score": "0.6905474", "text": "public static function is_allow_type($key, $value)\n {\n $classes = Information::get_class_of($key);\n $check = false;\n\n if (in_array(Information::array, $classes)) $check = ($check or is_array($value));\n if (in_array(Information::string, $classes)) $check = ($check or is_string($value));\n if (in_array(Information::int, $classes)) $check = ($check or is_numeric($value));\n if (in_array(Information::encrypt, $classes)) $check = ($check or is_string($value)); // maybe something else\n if (in_array(Information::unknown, $classes)) $check = false;\n return $check;\n }", "title": "" }, { "docid": "d6f0d531b283468054f40197e20c4b9b", "score": "0.68762326", "text": "static function is( $value, $type='text' )\n {\n $method = 'is' . ucwords( $type );\n if( method_exists( 'Pgg_Validate', $method ) ) {\n return self::$method( $value );\n }\n return $value;\n }", "title": "" }, { "docid": "9a0ab8e49e88dcce225489b35b1814fd", "score": "0.6871248", "text": "private static function _isValidValue($type, $value){\n $value = self::_sanitizeValue($type, $value);\n if ($value != null){\n $nativeType = self::_getNativeType($type);\n if ($nativeType == 'ascii'){\n if (isset(self::$_extendedTypes[$type]['validate'])){\n if (!preg_match(self::$_extendedTypes[$type]['validate'], $value)){\n return false;\n }\n }\n }\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "8ac948994f101a3e70a29b528dca5ebb", "score": "0.6856116", "text": "public function testIsValidType()\n {\n $this->assertFalse(\n Method::invoke($this->type, 'isValidType', $this, 'test'),\n 'The value should not be valid.'\n );\n\n $this->assertTrue(\n Method::invoke($this->type, 'isValidType', $this, 1.23),\n 'The value should be valid.'\n );\n }", "title": "" }, { "docid": "26e6080574b4ddf8cf827e0b37dfd80a", "score": "0.6803804", "text": "function validate ($type, $value)\n {\n \n if($type == \"link\") {\n return filter_var($value, FILTER_VALIDATE_URL);\n }\n if($type == \"picture\") {\n $ext = substr($value, strlen($value) - 4, 4);\n if($ext != \".png\" && $ext != \".jpg\" && $ext != \".gif\") return false;\n else return true;\n }\n if($type == \"int\") {\n return is_numeric($value);\n }\n if($type == \"string\") {\n return true;\n }\n if($type == \"date\") {\n if($value instanceof DateTime) return true;\n else return false;\n }\n }", "title": "" }, { "docid": "0de68db9755a516384807940627f6919", "score": "0.6766731", "text": "abstract public function checkValueType($arg_value);", "title": "" }, { "docid": "8def2b0bbf452021a64d2c6ef0cd4824", "score": "0.6757969", "text": "public static function isValid($value, string $type): bool\n\t{\n\t\t$valid = false;\n\t\tif($type == 'mixed') {\n\t\t\t$valid = true;\n\t\t} else if(is_string($value) || $value instanceof DataTypes\\TypeString) {\n\t\t\tif($type == 'string') $valid = true;\n\t\t} else if(is_int($value) || $value instanceof DataTypes\\TypeInt) {\n\t\t\tif($type == 'int') $valid = true;\n\t\t} else if(is_float($value) || $value instanceof DataTypes\\TypeFloat) {\n\t\t\tif($type == 'float') $valid = true;\n\t\t} else if(is_array($value) || $value instanceof DataTypes\\TypeArray) {\n\t\t\tif($type == 'array') $valid = true;\n\t\t} else if(is_bool($value) || $value instanceof DataTypes\\TypeBool) {\n\t\t\tif($type == 'boolean') $valid = true;\n\t\t} else if(is_object($value)) {\n\t\t\tif($value instanceof $type) $valid = true;\n\t\t}\n\t\treturn $valid;\t\n\t}", "title": "" }, { "docid": "23bfd0d737cca8dd88fd26621b382b95", "score": "0.671491", "text": "public function canHandle(TypedValueInterface $value): bool;", "title": "" }, { "docid": "b110a07316741554fe6c1aa263de6214", "score": "0.67058384", "text": "private static function _isPropertyType($type, $value){\n $nativeType = self::_getNativeType($type);\n if ($nativeType != null){\n switch($nativeType){\n case 'boolean':\n if (is_bool($value)){\n return true;\n } else if (is_numeric($value) && ($value == 0 || $value == 1)){\n return true;\n } else if (is_string($value)){\n if ($value == 'true' || $value == 'false'){\n return true;\n } else if ($value == '1' || $value == '0'){\n return true;\n }\n }\n break;\n case 'integer':\n if (is_int($value)){\n return true;\n } else if (preg_match('/^[0-9]+$/', $value)){\n return true;\n }\n break;\n case 'double':\n if (is_float($value) || is_numeric($value)){\n return true;\n }\n break;\n case 'datetime':\n if (is_int($value) || strtotime($value)){\n return true;\n }\n break;\n case 'binary':\n if (is_binary($value)){\n return true;\n }\n break;\n case 'ascii':\n if (is_string($value)){\n return true;\n }\n break;\n case 'instance':\n $uuid = null;\n if (is_object($value) && isset($value->uuid) && is_mysql_uuid($value->uuid)){\n $uuid = $value->uuid;\n } else if (is_mysql_uuid($value)){\n $uuid = $value;\n }\n if ($uuid != null){\n $id = Mysql::query(\"SELECT MAX(id) FROM t_instance where uuid = '{$uuid}'\");\n if ($id && is_int($id)){\n return true;\n }\n }\n break;\n }\n }\n\n // all else failed\n return false;\n }", "title": "" }, { "docid": "2b55e0ebce9b77981c353c6e3997e0ae", "score": "0.67021936", "text": "public static function isType($type, $value) {\n if (null !== ($validator = static::getTypeValidator($type))) {\n return call_user_func($validator, $value);\n }\n return true;\n }", "title": "" }, { "docid": "e98ec24a1914acadf504d2a03a21d268", "score": "0.6695442", "text": "public function matchDataType($value, $type) {\n $match = FALSE;\n\n // Type is an array, then a list of acceptable value must be checked.\n if (is_array($type)) {\n $options = $type;\n $type = 'options';\n }\n\n switch($type) {\n case 'int':\n // Single value, of type integer. Including 0.\n if (is_numeric($value) && $value >= 0) {\n // Paging starts at 0, include 0.\n $match = TRUE;\n }\n\n break;\n\n case 'text':\n // Single value, text value.\n if (is_string($value)) {\n $match = TRUE;\n\n if ($match && !empty($value)) {\n // See if text is longer than 15 chars.\n $match = FALSE;\n\n if (strlen($value) <= 150) {\n $match = TRUE;\n }\n }\n }\n\n break;\n\n case 'year':\n // Four digit year YYYY.\n if (preg_match('/^[0-9]{4}$/', $value)) {\n // ie: 1979, 2000\n $match = TRUE;\n }\n\n break;\n\n case 'boolean':\n // Boolean true or false only.\n if (id_bool($value)) {\n // TRUE or FALSE.\n $match = TRUE;\n }\n\n break;\n\n case 'hash-code':\n // Single value, alphanumeric value matching a pattern.\n if (preg_match('/^\\w{5}-{1}\\w{5}-{1}\\w{5}-{1}\\w{5}-{1}\\w{5}$/', $value)) {\n // ie: ZovDs-BCDB9-P5QSP-6DSDx-Myisv\n $match = TRUE;\n }\n\n break;\n\n case 'array-text':\n // Array of string, where each element is of type text.\n if (is_array($value)) {\n $match = TRUE;\n foreach($value as $i => $item) {\n if (is_array($item)) {\n foreach($item as $item_value) {\n // Use the text condition of this method.\n $is_valid = $this->matchDataType($item_value, 'text');\n if ($is_valid) {\n $match = FALSE;\n break 2;\n }\n }\n }\n }\n }\n\n break;\n\n case 'array-int':\n // Array of string, where each element is of type integer.\n if (is_array($value)) {\n $match = TRUE;\n foreach($value as $i => $item) {\n if (is_array($item)) {\n foreach($item as $item_value) {\n // Use the int condition of this method.\n $is_valid = $this->matchDataType($item_value, 'int');\n if ($is_valid) {\n $match = FALSE;\n break 2;\n }\n }\n }\n }\n }\n\n break;\n\n case 'asc/desc':\n // Sort order asc for ascending order and desc for descending order.\n if ($value == 'asc' || $value == 'desc') {\n $match = TRUE;\n }\n\n break;\n\n case 'options':\n // Value must be one of the enumerated values.\n if (in_array($value, $options)) {\n $match = TRUE;\n }\n\n break;\n\n case 'datetime':\n // Value must be a date and time YYYY-MM-DD 00:00\n if (preg_match('/^([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2})$/', $value, $x)) {\n $match = TRUE;\n }\n\n break;\n }\n\n return $match;\n }", "title": "" }, { "docid": "6bbc5ce842cbfcf5125ae511ff2fed49", "score": "0.6693633", "text": "function is_type_of(mixed $var, string ...$types): bool\n{\n $var_type = strtolower(get_debug_type($var));\n\n // Multiple at once.\n if ($types && str_contains($types[0], '|')) {\n $types = explode('|', $types[0]);\n\n // A little bit faster than foreach().\n if (in_array($var_type, $types, true)) {\n return true;\n }\n }\n\n foreach ($types as $type) {\n $type = strtolower($type);\n if (match ($type) {\n // Any/mixed.\n 'any', 'mixed' => 1,\n\n // Sugar stuff.\n 'list', 'number', 'image', 'stream', 'iterator', 'enum'\n => ('is_' . $type)($var),\n\n // Primitive & internal stuff.\n 'int', 'float', 'string', 'bool', 'array', 'object', 'null',\n 'numeric', 'scalar', 'resource', 'iterable', 'callable', 'countable',\n => ('is_' . $type)($var),\n\n // All others.\n default => ($var_type === $type) || ($var instanceof $type)\n }) {\n return true;\n }\n }\n return false;\n}", "title": "" }, { "docid": "c4a3173f3c38a793fafd55db2f610572", "score": "0.66595143", "text": "protected function check_type()\n {\n $regex = \"/^int$|^bool$|^string$/\";\n\n $result = preg_match($regex, $this->token);\n\n if($result == 0 or $result == FALSE)\n {\n fwrite(STDERR, \"Error, expecting <type> function parameter! Line: \");\n fwrite(STDERR, $this->lineCount);\n fwrite(STDERR, \"\\n\");\n exit(23);\n } \n }", "title": "" }, { "docid": "98f7f7c578deca6fc1e01cf478adc6c1", "score": "0.6642884", "text": "function is($type)\n {\n return $this->factory->is($type);\n }", "title": "" }, { "docid": "c3cfae3c4368ba4633103bd6e13cf1db", "score": "0.65997297", "text": "public function isValueValid($value) {\n\t\treturn $value instanceof Type\\DataDownloadType;\n\t}", "title": "" }, { "docid": "b87d4b160e6943c0c20b828a469228e0", "score": "0.65498286", "text": "public function hasValueType() {\n return $this->_has(7);\n }", "title": "" }, { "docid": "74035b8ae452cc74681bb6727a195163", "score": "0.65051675", "text": "public function isValueValid($value) {\n\t\treturn $value instanceof Type\\PersonType;\n\t}", "title": "" }, { "docid": "cc8271dcd9c9503ca1ab5de8eaf1d852", "score": "0.64479035", "text": "static function validate ($type, $v)\n {\n if (is_null ($v) || $v === '')\n return true;\n\n switch ($type) {\n\n case type::binding:\n return is_string ($v);\n\n case type::any:\n case type::bool: // Any value can be typecast to boolean.\n return true;\n\n case type::data:\n return is_array ($v) || is_object ($v)\n || $v instanceof \\Traversable\n || (is_string ($v) && strpos ($v, '{') !== false);\n\n case type::id:\n return !!preg_match ('#^[\\w\\-]+$#', $v);\n\n case type::content:\n return $v instanceof Metadata || is_string ($v); // Note: content props can be specified in attribute syntax.\n\n case type::metadata:\n return $v instanceof Metadata;\n\n case type::collection:\n return is_array ($v);\n\n case type::number:\n return is_numeric ($v);\n\n case type::string:\n return is_scalar ($v) || (is_object ($v) && method_exists ($v, '__toString'));\n }\n return false;\n }", "title": "" }, { "docid": "9a7c41d23cf657876fac42f2533fa50b", "score": "0.6445554", "text": "function isTimeType($type)\n{\n return($type == \"datetime\" or $type == \"time\" or $type == \"timestamp\");\n}", "title": "" }, { "docid": "42518437b0105c80dc5b2991cdc6b8b2", "score": "0.64363503", "text": "private function filter_type( $value ) {\n\t\tif ( empty( $this->type ) ) {\n\t\t\treturn $value;\n\t\t}\n\n\t\tswitch ( $this->type->case() ) {\n\t\t\tcase Schema_Type::NUMBER:\n\t\t\t\treturn (int) $value;\n\n\t\t\tcase Schema_Type::BOOL:\n\t\t\t\treturn (bool) $value;\n\n\t\t\tcase Schema_Type::STRING:\n\t\t\t\treturn (string) $value;\n\n\t\t\tcase Schema_Type::ARRAY:\n\t\t\t\treturn (array) $value;\n\t\t}\n\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "7c24c887c141526b03f4486c648219dd", "score": "0.64357525", "text": "function is_valid_type($type){\n\t\treturn in_array($type, $this->valid_types);\n\t}", "title": "" }, { "docid": "d9be43073e32dd370e2a0054bec6ddb0", "score": "0.6433308", "text": "public function isValueValid($value) {\n\t\treturn $value instanceof Type\\InteractionCounter;\n\t}", "title": "" }, { "docid": "551e24a0d7b9aa9bd189ff0811f0c903", "score": "0.6424699", "text": "function isType($input) {\n\treturn ((strcmp($input, 'dynamic') == 0) || (strcmp($input, 'static') == 0));\n}", "title": "" }, { "docid": "eee7783cf623d9898780d9e01388b205", "score": "0.6367538", "text": "public function hasType($name);", "title": "" }, { "docid": "e9b3df6d7c043b8c7e7b52cf2cbec976", "score": "0.6362343", "text": "function isTextType($type)\n{\n return($type == \"string\" or $type == \"varchar\" or $type == \"tinytext\" or $type == \"password\" or\n $type == \"set\" or $type == \"enum\" or $type == \"char\" or $type == \"file\" or isTextAreaType($type));\n}", "title": "" }, { "docid": "b03e936707cbc19effbb37812c07ecba", "score": "0.63515955", "text": "public function match(mixed $value);", "title": "" }, { "docid": "2e0a69086373490af29909de29e8d45a", "score": "0.634702", "text": "public function type($type);", "title": "" }, { "docid": "8d31bfebd9024127df56a7f052e8c73f", "score": "0.634571", "text": "public static function isValueType($value)\n {\n if (is_scalar($value) || $value === null) {\n return true;\n } elseif (is_array($value)) {\n $isScalar = true;\n array_walk_recursive($value,\n function ($value) use (&$isScalar) {\n if ($isScalar && !(is_scalar($value) || $value === null)) {\n $isScalar = false;\n }\n });\n\n return $isScalar;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "af16a5a480089fe20aebc6f93612b439", "score": "0.63045955", "text": "public function isValueValid($value) {\n\t\treturn $value instanceof Type\\PropertyValueType || $value instanceof DataType\\TextType || $value instanceof DataType\\URLType;\n\t}", "title": "" }, { "docid": "745a380913abe6fc99aea9e5f60765b8", "score": "0.6284606", "text": "function isDateType($type)\n{\n return($type == \"date\" or $type == \"year\" or isTimeType($type));\n}", "title": "" }, { "docid": "a105ccb90af60dbe33330720afcef3a3", "score": "0.62807906", "text": "public function isValueValid($value) {\n\t\treturn $value instanceof DataType\\TextType;\n\t}", "title": "" }, { "docid": "496c1790020656b2996461238e3579f0", "score": "0.6279798", "text": "public function hasType(){\n return $this->_has(5);\n }", "title": "" }, { "docid": "496c1790020656b2996461238e3579f0", "score": "0.6279798", "text": "public function hasType(){\n return $this->_has(5);\n }", "title": "" }, { "docid": "2544f042e9308ca3feebea7f4966b9c5", "score": "0.6275762", "text": "public function is_type( $type ) {\n\t\tif ( 'variable' == $type || ( is_array( $type ) && in_array( 'variable', $type ) ) ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn parent::is_type( $type );\n\t\t}\n\t}", "title": "" }, { "docid": "67c775ba16ea4062b7dfe50ad4f6cec5", "score": "0.6268896", "text": "public function isTypeOf($type)\n {\n return $this->getType() == $type;\n }", "title": "" }, { "docid": "4cbac34cdc4e17bd3b5b166b3b73bfcb", "score": "0.62640774", "text": "public function hasType(){\n return $this->_has(9);\n }", "title": "" }, { "docid": "6359637b540509cef409556107ab2921", "score": "0.62543756", "text": "public function isType($type)\r\n\t{\r\n\t\treturn ($this->type == $type);\r\n\t}", "title": "" }, { "docid": "712efc83a5f160cba0a4605dc639e4f7", "score": "0.624776", "text": "public function isValueValid($value) {\n\t\treturn $value instanceof Type\\VideoGame;\n\t}", "title": "" }, { "docid": "baadb22230a9040e7d37e8d694ca4613", "score": "0.6232023", "text": "function isString ($value)\r\n{\r\n\treturn is_string ($value);\r\n}", "title": "" }, { "docid": "84267d5de05e19af96a0755c6469c224", "score": "0.6230241", "text": "public function isOfType( int $type ): bool\n\t{\n\t\treturn $this->getType() === $type;\n\t}", "title": "" }, { "docid": "d2bf8f8dfa3fe341b6e61d1f89fa44e0", "score": "0.62275624", "text": "public function isinstanceof($class,$instance=null);", "title": "" }, { "docid": "e511e0f5306898c253f82e855b207cf8", "score": "0.62201685", "text": "static function is_dict_key_castable_type(?IType $type)\n\t{\n\t\t// false to string in javascript is 'false', and in python is 'False', in PHP is '' ...\n\n\t\treturn $type === self::$_int\n\t\t\t|| $type === self::$_uint\n\t\t\t|| $type === self::$_float\n\t\t\t|| $type === self::$_bool\n\t\t\t|| $type === self::$_any;\n\t}", "title": "" }, { "docid": "e4440f60943572c4b0bb0fa5d52b135e", "score": "0.62114704", "text": "public function hasType(){\n return $this->_has(4);\n }", "title": "" }, { "docid": "8698fea5eb2c1cf01c6e59fae7bdbd35", "score": "0.6207475", "text": "public function is_type($type)\n\t{\n\t\treturn $this->get('object_type') == $type;\n\t}", "title": "" }, { "docid": "7de0c7197435683ecf55b21f29020043", "score": "0.61976266", "text": "private static function isType($arg, $type) {\n\t\tswitch ($type) {\n\t\t\tcase self::TYPE_INTEGER: return is_int($arg);\n\t\t\tcase self::TYPE_BOOLEAN: return is_bool($arg);\n\t\t\tcase self::TYPE_FLOAT: return is_float($arg);\n\t\t\tcase self::TYPE_STRING: return is_string($arg);\n\t\t\tdefault:\n\t\t\t\tif (is_object($arg) && get_class($arg) === $type) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t}\n\t\tthrow new \\Scrivo\\SystemException(\"No such argument type\");\n\t}", "title": "" }, { "docid": "1e83c48da41718368e502612cd4ce032", "score": "0.6175544", "text": "public function matches($type);", "title": "" }, { "docid": "1e83c48da41718368e502612cd4ce032", "score": "0.6175544", "text": "public function matches($type);", "title": "" }, { "docid": "3058c4aef61c5a590f0bd9da4a3925fc", "score": "0.6165625", "text": "public static function is($type, $val)\n\t{\n\t\t//Make sure the type is formatted properly\n\t\t$type = RegExp::getType($type);\t\t\n\t\t\n\t\t$pattern = self::$pattern[$type];\n\t\t\n\t\treturn preg_match(\"/^\". $pattern . \"$/\",$val);\n\t}", "title": "" }, { "docid": "ecd686dffeacdc4ee7340e1d87e93b2d", "score": "0.61651284", "text": "public function testNonStrings($type)\n {\n $reflection = $this->createMock(\"\\Loom\\Settable\");\n $method = new \\ReflectionMethod($reflection, \"checkType\");\n $method->setAccessible(true);\n \n $result = $method->invoke($reflection, \"myvalue\", $type);\n $this->assertFalse($result);\n }", "title": "" }, { "docid": "703d24ae5c21513fcf8f5ebdbe6e2921", "score": "0.6154232", "text": "protected function _set_type(& $value, $type) {\n // \"integer\" (or, since PHP 4.2.0, \"int\")\n // \"float\" (only possible since PHP 4.2.0, for older versions use the deprecated variant \"double\")\n // \"string\"\n // \"array\"\n // \"object\"\n // \"null\" (since PHP 4.2.0)\n $type = isset($type) ? (trim(strtolower(@ (string) $type))) : null;\n\n if ($type === null) {\n return true;\n }\n\n switch ($type) {\n\n case 'bool':\n\n $type = 'boolean';\n break;\n\n case 'int':\n\n $type = 'integer';\n break;\n\n case 'double':\n\n $type = 'float';\n break;\n }\n\n return @ settype($value, $type);\n }", "title": "" }, { "docid": "950a5f88d778a3ce315b70a368d7000f", "score": "0.6136584", "text": "protected function _introspectType($value)\n\t{\n\t\tswitch (true) {\n\t\t\tcase (is_bool($value)):\n\t\t\t\treturn 'boolean';\n\t\t\tcase (is_float($value) || preg_match('/^\\d+\\.\\d+$/', $value)):\n\t\t\t\treturn 'float';\n\t\t\tcase (is_int($value) || preg_match('/^\\d+$/', $value)):\n\t\t\t\treturn 'integer';\n\t\t\tcase (is_string($value) && strlen($value) <= $this->_columns['string']['length']):\n\t\t\t\treturn 'string';\n\t\t\tdefault:\n\t\t\t\treturn 'text';\n\t\t}\n\t}", "title": "" }, { "docid": "f8c48e8cab5b8f178c5de79e19eac157", "score": "0.6130683", "text": "public static function typeOfValue($value)\n {\n if (is_null($value)) {\n return self::TYPE_NULL;\n }\n if (is_int($value)) {\n return self::TYPE_INT;\n }\n if (is_bool($value)) {\n return self::TYPE_BOOL;\n }\n return self::TYPE_STR;\n }", "title": "" }, { "docid": "1fab4e8630af6d9a50eb99d81b8a76aa", "score": "0.6127974", "text": "public function match(/*int */$type, /*string */$value = null) //: bool\n {\n return $this->getCurrent()->match($type, $value);\n }", "title": "" }, { "docid": "b721fdc2a7680b2944cb21c1120a43a4", "score": "0.6115222", "text": "abstract public function isValid(mixed $value): bool;", "title": "" }, { "docid": "fba17cb0fc45b9e98bb2b357fbd0ce36", "score": "0.6114969", "text": "public function hasType() {\n return $this->_has(2);\n }", "title": "" }, { "docid": "a5bb1e2fd8d7b1a59044f3e1e85f6097", "score": "0.6110773", "text": "public function hasType() {\n return $this->_has(3);\n }", "title": "" }, { "docid": "538439c5372360cb89eefe5ba78bbbda", "score": "0.6104349", "text": "public function hasType(){\r\n return $this->_has(1);\r\n }", "title": "" }, { "docid": "63c5fc9f11364699ca5dacf0ce6e3a2f", "score": "0.60979956", "text": "function is_type_int($typ)\n{\n\t$ints = @array(\"int\",\"serial\",\"bigserial\",\"oid\",\"float\",\"numeric\",\"real\",\"double\",\"smallint\");//\"date\",\"time\"\n\t$typ = @strtolower($typ);\n\tforeach ($ints as $v){\n\t\t$pos = @strpos($typ,$v);\n\t\tif ($pos!==false && !$pos) return 1;\n\t}\n}", "title": "" }, { "docid": "036f227b98a8e3c04fee863c72cc96f3", "score": "0.60954636", "text": "public function isType(int $type): bool\n {\n return ($this->getType() & $type) !== 0;\n }", "title": "" }, { "docid": "463635f3cb7735ee067c5a6ad76c7b60", "score": "0.6094247", "text": "function isPrimitiveType($type){\r\n global $G__primitiveTypes;\r\n foreach ($G__primitiveTypes as $primitiveType){\r\n if ($primitiveType==$type){\r\n return (true);\r\n }\r\n }\r\n return (false);\r\n}", "title": "" }, { "docid": "f60fd1f3a7469fe4833e9ddf9646a90a", "score": "0.60903096", "text": "private function GetType($value){\n\t\tswitch (true) {\n\t\t\tcase is_int($value):\n\t\t\t\t$type = PDO::PARAM_INT;\n\t\t\t\tbreak;\n\t\t\tcase is_bool($value):\n\t\t\t\t$type = PDO::PARAM_BOOL;\n\t\t\t\tbreak;\n\t\t\tcase is_null($value):\n\t\t\t\t$type = PDO::PARAM_NULL;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$type = PDO::PARAM_STR;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $type;\n\t}", "title": "" }, { "docid": "bd03a3a61a9e670377bf172b2d976bf9", "score": "0.6090245", "text": "public function checkHasType($value, $type)\n {\n Val::mustBe($type, 'string|string[]');\n\n $types = Val::explodeAndTrim('|', $type);\n\n return new AssertionResult(\n Val::is($value, $types),\n '{name} must have the {0:raw} {1:imploded}',\n [\n count($types) < 2 ? 'type' : 'types',\n $types,\n ]\n );\n }", "title": "" }, { "docid": "69f217cdbd5ad56fc4cec1e49335175c", "score": "0.60870755", "text": "public function hasType(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "69f217cdbd5ad56fc4cec1e49335175c", "score": "0.60870755", "text": "public function hasType(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "69f217cdbd5ad56fc4cec1e49335175c", "score": "0.60870755", "text": "public function hasType(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "9a5038138a8eefd81f668219da2501b2", "score": "0.60849416", "text": "public static function isResource($value, $type): bool\n\t{\n\t\treturn ($value instanceof $type);\n\t}", "title": "" }, { "docid": "81f4d05c9b8b2598d72079ce3d7aee53", "score": "0.6074008", "text": "public function hasType(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "5416e030eb7b721a05d1087fb1c01474", "score": "0.60737777", "text": "function isNumericType($type)\n{\n return(eregi('int',$type) or $type==\"real\" or $type==\"float\" or $type==\"double\" or $type==\"decimal\");\n}", "title": "" }, { "docid": "27ea8637f343674ca098b956898243e5", "score": "0.6062125", "text": "public function test($type, $value = null)\n {\n return $this->tokens[$this->current]->test($type, $value);\n }", "title": "" }, { "docid": "1226d9f15a4849b338969da696d5e07d", "score": "0.6054417", "text": "protected abstract function primitiveTypeTested(): Type;", "title": "" }, { "docid": "327e28d27d7c4c798b867e366e82431f", "score": "0.6052602", "text": "protected function validateType($type) {\n switch (strtolower($type)) {\n case 'string':\n return 'string';\n break;\n\n case 'url':\n return 'url';\n break;\n\n case 'file':\n return 'file';\n break;\n\n default:\n return FALSE;\n break;\n }\n }", "title": "" }, { "docid": "9dec4d0d6a670b424cb3443e6ee58275", "score": "0.60418135", "text": "public function containsValue(mixed $value): bool;", "title": "" }, { "docid": "d7cf075c04f0fceb16939e420810812e", "score": "0.60286075", "text": "public function validateParameterValue($value) {\n switch ($this->getType()) {\n case self::TYPE_TEXT:\n return is_string($value) || is_numeric($value) || is_bool($value);\n case self::TYPE_NUMERIC:\n return is_numeric($value);\n case self::TYPE_BOOLEAN:\n return is_bool($value) || $value === 0 || $value === 1;\n case self::TYPE_DATE:\n return date_create_from_format(\"Y-m-d\", $value) ? true : false;\n case self::TYPE_DATE_TIME:\n return date_create_from_format(\"Y-m-d H:i:s\", $value) ? true : false;\n }\n }", "title": "" }, { "docid": "4e5f2ac2b7beffdcb22acb1be3c0b752", "score": "0.6020442", "text": "public static function isValid(array $types, & $value)\n\t{\n\t\t$_value = $value;\n\t\t$_e = NULL;\n\n\t\tif (isset($types['mixed']) OR !$types) return true;\n\n\t\tforeach ($types as $type)\n\t\t{\n\t\t\tif ($type === 'null')\n\t\t\t{\n\t\t\t\tif ($value === NULL) return true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if ($type === 'id')\n\t\t\t{\n\t\t\t\tif ($value !== TRUE AND !empty($value) AND is_scalar($value) AND ctype_digit((string) $value))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if (!in_array($type, array('string', 'float', 'int', 'bool', 'array', 'object', 'mixed', 'scalar')))\n\t\t\t{\n\t\t\t\tif ($value instanceof $type) return true;\n\t\t\t\telse if ($type === 'datetime' AND $value !== '' AND (is_string($value) OR is_int($value) OR is_float($value)))\n\t\t\t\t{\n\t\t\t\t\ttry {\n\t\t\t\t\t\t$_value = static::createDateTime($value);\n\t\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t\t$_e = $e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ($type === 'arrayobject' AND is_string($value) AND in_array(substr($value, 0, 1), array('O','C')) AND substr($value, 1, 18) === ':11:\"ArrayObject\":' AND ($tmp = @unserialize($value)) instanceof ArrayObject) // intentionally @\n\t\t\t\t{\n\t\t\t\t\t$_value = $tmp;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if ($type === 'mixed') return true;\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (call_user_func(\"is_$type\", $value)) return true;\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (in_array($type, array('float', 'int')) AND (is_numeric($value)))\n\t\t\t\t\t{\n\t\t\t\t\t\t$_value = $value;\n\t\t\t\t\t\tsettype($_value, $type);\n\t\t\t\t\t}\n\t\t\t\t\telse if (in_array($type, array('array', 'object')) AND (is_array($value) OR is_object($value)))\n\t\t\t\t\t{\n\t\t\t\t\t\t$_value = $value;\n\t\t\t\t\t\tsettype($_value, $type);\n\t\t\t\t\t}\n\t\t\t\t\telse if ($type === 'string' AND (is_int($value) OR is_float($value) OR (is_object($value) AND method_exists($value, '__toString'))))\n\t\t\t\t\t{\n\t\t\t\t\t\t$_value = (string) $value;\n\t\t\t\t\t}\n\t\t\t\t\telse if ($type === 'array' AND is_string($value) AND substr($value, 0, 2) === 'a:' AND is_array($tmp = @unserialize($value))) // intentionally @\n\t\t\t\t\t{\n\t\t\t\t\t\t$_value = $tmp;\n\t\t\t\t\t}\n\t\t\t\t\telse if ($type === 'bool' AND in_array($value, array(0, 0.0, '0', 1, 1.0, '1'), true))\n\t\t\t\t\t{\n\t\t\t\t\t\t$_value = (bool) $value;\n\t\t\t\t\t}\n\t\t\t\t\telse if (is_string($value) AND in_array($type, array('float', 'int')))\n\t\t\t\t\t{\n\t\t\t\t\t\t// todo anglickej zpusob zadavani dat 100,000.00 tady uplne zkolabuje\n\t\t\t\t\t\tif (!isset($intValue)) $intValue = str_replace(array(',', ' '), array('.', ''), $value);\n\t\t\t\t\t\tif (is_numeric($intValue))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$_value = $intValue;\n\t\t\t\t\t\t\tsettype($_value, $type);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif ($_value === $value)\n\t\t{\n\t\t\tif ($_e)\n\t\t\t{\n\t\t\t\tthrow $_e;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$value = $_value;\n\t\t\treturn true;\n\t\t}\n\n\t}", "title": "" }, { "docid": "360b3e4181ea3afb114883fcc85388fa", "score": "0.6013326", "text": "public function hasType(){\r\n return $this->_has(7);\r\n }", "title": "" }, { "docid": "dba5ea255d6883cf157c128b1bdd87df", "score": "0.6010948", "text": "public function is_type( $type ) {\n\t\treturn ( $this->discount_type == $type || ( is_array( $type ) && in_array( $this->discount_type, $type ) ) ) ? true : false;\n\t}", "title": "" }, { "docid": "33e4829831174089e5af541bab802740", "score": "0.6009905", "text": "protected function isValidValue($value)\n {\n return ($value instanceof ClassConstant);\n }", "title": "" }, { "docid": "7fb1b6e631e94eba0ec306e5745ab828", "score": "0.6005806", "text": "public function consume(/*int */$type, /*string */$value = null) //: bool\n {\n if ($this->match($type, $value)) {\n $this->next();\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "7f493e272618d7897936ec8e2c904474", "score": "0.599895", "text": "public function isType(string $type)\n {\n return $this->getType() === $type;\n }", "title": "" }, { "docid": "5ec17e2b6a3053b4d381a1a9a190a8b4", "score": "0.5995305", "text": "public function isValueValid($value) {\n\t\treturn $value instanceof Type\\PublicationEventType;\n\t}", "title": "" }, { "docid": "0ad9fb3f4446fc98e9b7269b86a73860", "score": "0.59915566", "text": "function is_field_type($name)\n {\n }", "title": "" }, { "docid": "f0359639baf4f3859c301ace621e6175", "score": "0.59896773", "text": "protected function checkType(&$inMessage = '') {\n\t\t$isValid = true;\n\t\tif ( !is_string($this->_Type) && $this->_Type !== '' ) {\n\t\t\t$inMessage .= \"{$this->_Type} is not a valid value for Type\";\n\t\t\t$isValid = false;\n\t\t}\t\t\n\t\tif ( $isValid && $this->_Type != '' && !in_array($this->_Type, array(self::TYPE_SOURCE, self::TYPE_THUMBNAIL, self::TYPE_FILE, self::TYPE_CCA)) ) {\n\t\t\t$inMessage .= \"Type must be one of TYPE_SOURCE, TYPE_THUMBNAIL, TYPE_FILE\";\n\t\t\t$isValid = false;\n\t\t}\t\t\n\t\treturn $isValid;\n\t}", "title": "" }, { "docid": "bb4a617726d15407aab7fb6e94517ae3", "score": "0.5984813", "text": "public static function is($value, $type_value, $strict = false)\r\n\t{\r\n\t\t// First, check that the type we're trying to check against is indeed a valid type\r\n\t\tif (!self::isValidValue($type_value, $strict)) {\r\n\t\t\treturn new \\InvalidArgumentException(\"Asking if [$value] is a [$type_value], while [$type_value] is not of current type [TODO]\");\r\n\t\t}\r\n\r\n\t\tif ($strict)\r\n\t\t{\treturn $value == $type_value;\r\n\t\t}\r\n\t\telse\r\n\t\t{\treturn strtolower($value) == strtolower($type_value);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "bc749ee6cc09fa42c6dc8e763179970e", "score": "0.5984214", "text": "abstract protected function isValidValue($value);", "title": "" }, { "docid": "fe867e4cacbd2c917ccdb1295c98ab65", "score": "0.59831977", "text": "function o_isString($value) {\n\t\t\treturn Obj::singleton()->isString($value);\n\t\t}", "title": "" }, { "docid": "604121e27b85c743d2ff2335c844d60b", "score": "0.5982988", "text": "protected function isValueObject($value)\n {\n return is_object($value) && is_subclass_of($value, ValueObject::class);\n }", "title": "" }, { "docid": "8e8f0131e5c8b340208af224296b33b0", "score": "0.59788036", "text": "private function checkTypeOfValue($value, $type)\n {\n $message = 'Setting type does not match the type of value stored in database.';\n if (!is_numeric($value) && $type === SettingTypeEnum::INTEGER) {\n throw new \\InvalidArgumentException($message);\n }\n if ($type === SettingTypeEnum::INTEGER && intval($value) < 0) {\n throw new \\InvalidArgumentException('Settings must have non-negative values.');\n }\n if (!is_string($value) && $type === SettingTypeEnum::STRING) {\n throw new \\InvalidArgumentException($message);\n }\n }", "title": "" }, { "docid": "2ab3b382eea94e7694bedd833b29583c", "score": "0.59737426", "text": "private static function isBuiltinType($value)\n {\n return in_array($value, self::$BUILTIN_TYPES)\n || isset(self::$BUILTIN_TYPES[$value]);\n }", "title": "" }, { "docid": "b70705aaa15f873cf941f6be11b27746", "score": "0.59736896", "text": "abstract protected function getValidType(): string;", "title": "" }, { "docid": "cd874882b1d13a8908126ed094350f8f", "score": "0.5973278", "text": "public function set_type($type) {\n if (!is_string($type)) { return false; }\n $this->_type = $type;\n return true;\n }", "title": "" }, { "docid": "bce4bbe5ab1f1b27e1b4f38ba8623dae", "score": "0.5962486", "text": "protected function isValidValue($value)\r\n {\r\n return ($value instanceof Entity\\PluginValue);\r\n }", "title": "" } ]
9f68dbba280f12e658cf3f3b9a27486d
Executes the configured cURL call.
[ { "docid": "11787940a6def6aad1a4676cceb87348", "score": "0.0", "text": "public function execute(){\n\t\t//cache filename\n\t\t$this->fn = $this->cacheDir . sha1(str_replace($this->rep, \"\", $this->url.json_encode($this->header).json_encode($this->requestParameters))) . \"-\".$this->cacheTime.\".txt\";\n\t\tswitch($this->method){\n\t\t\tcase \"POST\":\n\t\t\tcase \"PUT\":\n\t\t\tcase \"DELETE\":\n\t\t\t\t$this->clearCache();\n\t\t}\n\t\tif($this->forceClearCache){ $this->clearCache(); }\n\t\tif($this->noOp){\n\t\t\treturn;\n\t\t}\n\t\tif($this->cacheResult){\n\t\t\t$this->clearCacheByTime();\n\t\t\t$cache = $this->getCache();\n\t\t\tif($cache !== false){\n\t\t\t\treturn $cache;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tcurl_setopt($this->ch, CURLOPT_URL, $this->url);\n\t\t\n\t\t//special method for dealing with username:password logins\n\t\tif($this->authenticate){\n\t\t\tcurl_setopt($this->ch, CURLOPT_HTTPAUTH, $this->authtype);\t\t\t\t\n\t\t\tcurl_setopt($this->ch, CURLOPT_USERPWD, $this->username.\":\".$this->password); \n\t\t}\n\t\t\n\t\tcurl_setopt($this->ch, CURLOPT_HTTPHEADER, $this->header);\n\t\t\n\t\tcurl_setopt($this->ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($this->ch, CURLOPT_VERBOSE, true); //include the full header in the response\n\t\tcurl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, true);\n\t\tcurl_setopt($this->ch, CURLINFO_HEADER_OUT, true); //get full info parameters\n\t\tcurl_setopt($this->ch, CURLOPT_HEADER, true); //used to get the header information\n\t\t\n\t\t//check for SSL use\n\t\tif(substr($this->url,0,5) == \"https\" || (substr($this->url,0,2) == \"//\" && isset($_SERVER['HTTPS']))){\n\t\t\tif($this->secureSSL === false){\n\t\t\t\tcurl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, 0); //ignore all certificate problems\n\t\t\t\tcurl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, false);\n\t\t\t}\n\t\t\tcurl_setopt($this->ch, CURLOPT_SSLVERSION, 3);\n\t\t}\n\n\t\t$response = curl_exec($this->ch);\n\t\t\n\t\t//get the header size\n\t\t$header_size = curl_getinfo($this->ch, CURLINFO_HEADER_SIZE);\n\t\t//get the header\n\t\t$headerOut = substr($response, 0, $header_size);\n\t\t$headerOut = array_filter(explode(\"\\n\",str_replace(\"\\r\\n\",\"\\n\",$headerOut)));\n\t\t$headerOut = array_splice($headerOut, 1);\n\t\t$header = array();\n\t\tforeach($headerOut as $headerItem){\n\t\t\t$headerItem = explode(\":\",$headerItem,2);\n\t\t\tif(isset($headerItem[1])){\n\t\t\t\t$header[$headerItem[0]] = ltrim($headerItem[1]);\n\t\t\t}\n\t\t}\n\t\t//get the body\n\t\t$result = substr($response, $header_size);\n\t\t\n\t\t$info = curl_getinfo($this->ch);\n\t\t$info = array_merge($info,array(\"error\"=>curl_error($this->ch)));\n\n\t\tif($info['http_code']==401){ // Attempt NTLM Auth only, CURLAUTH_ANY does not work with NTML\n\t\t\tif($this->authtype!=CURLAUTH_BASIC && $this->authtype!=CURLAUTH_NTLM){\n\t\t\t\t$origAuthType = $this->authtype;\n\t\t\t\t$this->authtype = CURLAUTH_BASIC;\n\t\t\t\t$res = $this->execute();\n\t\t\t\t$info = $res[\"info\"];\n\t\t\t\t$result = $res[\"result\"];\n\t\t\t\t$this->authtype = $origAuthType;\n\t\t\t}else if($this->authtype!=CURLAUTH_NTLM){\n\t\t\t\t$origAuthType = $this->authtype;\n\t\t\t\t$this->authtype = CURLAUTH_NTLM;\n\t\t\t\t$res = $this->execute();\n\t\t\t\t$info = $res[\"info\"];\n\t\t\t\t$result = $res[\"result\"];\n\t\t\t\t$this->authtype = $origAuthType;\n\t\t\t}\n\t\t}\n\t\t//try to decode json, fall back to text if it fails\n\t\t$origResult = $result;\n\t\t$result = @json_decode($result);\n\t\tif(is_null($result)){\n\t\t\t$result = $origResult;\n\t\t}\n\t\t\n\t\t//write the data to the cache\n\t\tif($this->cacheResult){\n\t\t\t$this->writeCache($result);\n\t\t}\n\t\t\n\t\t$returnArray = array('result'=>$result,\n\t\t\t'requestParameters'=>($this->returnRequestParams?$this->requestParameters:array()),\n\t\t\t'info'=>$info,\n\t\t\t'header'=>$header\n\t\t);\n\t\treturn $returnArray;\n\t}", "title": "" } ]
[ { "docid": "155757d2db1d8c635cec38479a773d08", "score": "0.71288073", "text": "public function execute()\n {\n // Set two default options, and merge any extra ones in\n if (!isset($this->options[CURLOPT_TIMEOUT])) $this->options[CURLOPT_TIMEOUT] = 30;\n if (!isset($this->options[CURLOPT_RETURNTRANSFER])) $this->options[CURLOPT_RETURNTRANSFER] = TRUE;\n if (!isset($this->options[CURLOPT_FAILONERROR])) $this->options[CURLOPT_FAILONERROR] = TRUE;\n\n\t\t// Only set follow location if not running securely\n\t\tif ( ! ini_get('safe_mode') && ! ini_get('open_basedir'))\n\t\t{\n\t\t\t// Ok, follow location is not set already so lets set it to true\n\t\t\tif (!isset($this->options[CURLOPT_FOLLOWLOCATION]))\n\t\t\t{\n\t\t\t\t$this->options[CURLOPT_FOLLOWLOCATION] = TRUE;\n\t\t\t}\n }\n\n\t\tif ( ! empty($this->headers))\n\t\t{\n\t\t\t$this->option(CURLOPT_HTTPHEADER, $this->headers);\n\t\t}\n\n $this->options();\n\n // Execute the request & and hide all output\n $this->response = curl_exec($this->session);\n\n // Request failed\n if ($this->response === FALSE)\n {\n $this->error_code = curl_errno($this->session);\n $this->error_string = curl_error($this->session);\n\n curl_close($this->session);\n $this->session = NULL;\n return FALSE;\n }\n\n // Request successful\n else\n {\n $this->info = curl_getinfo($this->session);\n\n curl_close($this->session);\n $this->session = NULL;\n return $this->response;\n }\n }", "title": "" }, { "docid": "4922033a19154bcc14262808d92db531", "score": "0.69844866", "text": "private function execute()\n {\n // Set two default options, and merge any extra ones in\n if ( ! isset($this->options[CURLOPT_TIMEOUT]))\n {\n $this->options[CURLOPT_TIMEOUT] = 30;\n }\n if ( ! isset($this->options[CURLOPT_RETURNTRANSFER]))\n {\n $this->options[CURLOPT_RETURNTRANSFER] = TRUE;\n }\n if ( ! isset($this->options[CURLOPT_FAILONERROR]))\n {\n $this->options[CURLOPT_FAILONERROR] = TRUE;\n }\n // Only set follow location if not running securely\n if ( ! ini_get('safe_mode') && ! ini_get('open_basedir'))\n {\n // Ok, follow location is not set already so lets set it to true\n if ( ! isset($this->options[CURLOPT_FOLLOWLOCATION]))\n {\n $this->options[CURLOPT_FOLLOWLOCATION] = TRUE;\n }\n }\n if ( ! empty($this->headers))\n {\n $this->option(CURLOPT_HTTPHEADER, $this->headers);\n }\n $this->options();\n // Execute the request & and hide all output\n $this->response = curl_exec($this->session);\n $this->info = curl_getinfo($this->session);\n // Request failed\n if ($this->response === FALSE)\n {\n $errno = curl_errno($this->session);\n $error = curl_error($this->session);\n curl_close($this->session);\n $this->set_defaults();\n $this->error_code = $errno;\n $this->error_string = $error;\n return FALSE;\n }\n // Request successful\n else\n {\n curl_close($this->session);\n $this->last_response = $this->response;\n $this->set_defaults();\n return $this->last_response;\n }\n }", "title": "" }, { "docid": "dbb87f1cd8e809505a80fb550119d1b3", "score": "0.6737303", "text": "public function call() {\n\t\tif($this->debug) {\n\t\t\t# Do nothing, this stuff is annoying\n\t\t\t/* curl_setopt_array($this->curl, array(\n\t\t\t\tCURLOPT_HEADER => TRUE,\n\t\t\t\tCURLINFO_HEADER_OUT => TRUE,\n\t\t\t\tCURLOPT_VERBOSE => TRUE\n\t\t\t)); */\n\n\t\t\t#print_r(curl_getinfo($this->curl));\n\t\t}\n\n\t\treturn curl_exec($this->curl);\n\t}", "title": "" }, { "docid": "3a5b66e5d613999e4786bea39fde277f", "score": "0.6703218", "text": "function run_curl($url, $method = 'GET', $headers = null, $postvals = null){\n $ch = curl_init($url);\n\n if ($method === 'GET'){\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n } else {\n $options = array(\n CURLOPT_HEADER => false,\n CURLINFO_HEADER_OUT => false,\n CURLOPT_VERBOSE => true,\n CURLOPT_HTTPHEADER => $headers,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_POSTFIELDS => $postvals,\n CURLOPT_CUSTOMREQUEST => $method,\n CURLOPT_TIMEOUT => 3\n );\n curl_setopt_array($ch, $options);\n }\n $response = curl_exec($ch);\n curl_close($ch);\n\n return $response;\n}", "title": "" }, { "docid": "1655242e0fe425e16ff11bbabdd08675", "score": "0.6649889", "text": "protected function execute() {\n $this->_http_response = curl_exec($this->session);\n $this->_http_status = curl_getinfo($this->session, CURLINFO_HTTP_CODE);\n $this->_request_headers = curl_getinfo($this->session, CURLINFO_HEADER_OUT);\n $this->_last_url = curl_getinfo($this->session, CURLINFO_EFFECTIVE_URL);\n\n curl_close($this->session);\n\n return $this->response();\n }", "title": "" }, { "docid": "6d6868fc07eafc233707a604c71ba0af", "score": "0.66458243", "text": "public function curlExecute() {\n\t\t\t$this -> makeOptionArray() ;\n\t\t\t$ch = curl_init() ;\n\t\t\tcurl_setopt_array($ch, $this -> curlOption) ;\n\t\t\t$response = curl_exec($ch) ; \n\t\t\t$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE) ;\n\t\t\t$body = substr($response, curl_getinfo($ch, CURLINFO_HEADER_SIZE) ) ;\n\t\t\tcurl_close($ch) ;\n\t\t\tif($httpCode == 200) {\n\t\t\t\treturn $body;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn json_encode(Array(\"notOK\" => True) ) ;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b28be29bbdb01449514b14dc93746b75", "score": "0.65372616", "text": "function run_curl($url)\n\t{\n\t\tlog_message('debug', '_location/run_curl');\n\t\t\n\t\t$curl = curl_init();\n\t\tcurl_setopt($curl, CURLOPT_URL, $url);\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);\n\t\tcurl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);\n\t\tcurl_setopt($curl, CURLOPT_REFERER, $url);\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);\n\t\t$result = curl_exec($curl);\n\t\tcurl_close($curl);\n\t\t#Return the result from the cURL execution\n\t\treturn json_decode($result, TRUE);\n\t}", "title": "" }, { "docid": "590129274463d908a93d309c6e79a6a8", "score": "0.652941", "text": "private function curl() {\r\n\t\t\t$c = curl_init($this->url);\r\n\r\n\t\t\tcurl_setopt($c, CURLOPT_RETURNTRANSFER, true);\r\n\t\t\tcurl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);\r\n\t\t\tcurl_setopt($c,CURLOPT_HEADER,0);\r\n\r\n\t\t\t$this->html = curl_exec($c);\r\n\r\n\t\t\tif (curl_error($c))\r\n\t\t\t\tdie(curl_error($c));\r\n\r\n\t\t\t// Get the status code\r\n\t\t\t$status = curl_getinfo($c, CURLINFO_HTTP_CODE);\r\n\r\n\t\t\tcurl_close($c);\r\n\t\t}", "title": "" }, { "docid": "9a3f28415317dc8e0aaad1cdbfa3f9f7", "score": "0.6524843", "text": "function do_curl($curlopts, $opts=array(), &$stats=array()) {\n\n\t\t# prepare our own option defaults\n\t\t$opts['die_on_error'] = isset($opts['die_on_error']) ? $opts['die_on_error'] : true;\t# we default to dying on error\n\n\t\t# warm up cURL\n\t\t$ch = curl_init();\n\n\t\t# make a POST setup\n\t\tcurl_setopt_array($ch, $curlopts);\n\n\t\t# run it\n\t\t$result = curl_exec($ch);\n\n\t\t# put errors into the stats array\n\t\t$stats['error'] = curl_error($ch);\n\t\t$stats['errno'] = curl_errno($ch);\n\n\t\t# if curl failed then end here\n\t\tif (curl_errno($ch) != CURLE_OK) {\n\t\t\tcurl_close($ch);\n\t\t\t# should we die on error?\n\t\t\tif ($opts['die_on_error']) {\n\t\t\t\tdie($stats['error'].' ('.$stats['errno'].')');\n\t\t\t} else {\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t}\n\n\t\t# close connection\n\t\tcurl_close($ch);\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "9ed882a473031d7abcc9b6bfbeed3688", "score": "0.65126735", "text": "public function exec($url) {\r\n\t\t// Set the options\r\n\t\tcurl_setopt ($this->ch, CURLOPT_URL,$url);\r\n\t\tcurl_setopt ($this->ch, CURLOPT_USERAGENT, $this->headers['agent']);\r\n\t\tcurl_setopt ($this->ch, CURLOPT_SSL_VERIFYPEER, FALSE);\r\n\t\tcurl_setopt ($this->ch, CURLOPT_TIMEOUT, 0);\r\n\t\tcurl_setopt ($this->ch, CURLOPT_FOLLOWLOCATION,1);\r\n\t\tcurl_setopt ($this->ch, CURLOPT_RETURNTRANSFER, 1);\r\n\t\t\r\n\t\tcurl_setopt ($this->ch, CURLOPT_COOKIEJAR, $this->headers['cookie']);\r\n\t\tcurl_setopt ($this->ch, CURLOPT_COOKIEFILE, $this->headers['cookie']);\r\n\t\t\r\n\t\tcurl_setopt ($this->ch, CURLINFO_HEADER_OUT, true);\r\n\t\t//curl_setopt ($this->ch, CURLOPT_HEADER, true);\r\n\t\t\r\n\t\t// Send the POST vars\r\n\t\tif (sizeof($this->postVars) > 0) {\r\n\t\t\t$postVars = '';\r\n\t\t\tforeach($this->postVars as $name => $value) {\r\n\t\t\t\t$postVars .= $name.'='.$value.'&';\r\n\t\t\t}\r\n\t\t\t$postVars = substr($postVars,0,strlen($postVars)-1);\r\n\t\t\t\r\n\t\t\tcurl_setopt ($this->ch, CURLOPT_POSTFIELDS, $postVars);\r\n\t\t\tcurl_setopt ($this->ch, CURLOPT_POST, 1);\r\n\t\t}\r\n\t\t\r\n\t\t// Execute and retrieve the result\r\n\t\t$t = ''; $i =0;\r\n\t\twhile ($t == '') { $i++;\r\n\t\t\t$t = curl_exec($this->ch);\r\n\t\t\tif($i > 2) break;\r\n\t\t}\r\n\t\t\r\n\t\t$this->r_text\t\t= $t;\r\n\t\t$this->r_headers\t= curl_getinfo($this->ch,CURLINFO_HEADER_OUT);\r\n\t\t\r\n\t\treturn $this->r_text;\r\n\t}", "title": "" }, { "docid": "cdef5dbb0fa84f039551d90937d2c3d8", "score": "0.64960265", "text": "function curl_execute($url)\n {\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); \n curl_setopt($ch, CURLOPT_HEADER, false);\n curl_exec($ch);\n curl_close($ch);\n }", "title": "" }, { "docid": "f74e3211c9e1e1847e4059218f154101", "score": "0.64948106", "text": "public function execute()\n {\n return curl_exec($this->curl);\n }", "title": "" }, { "docid": "07289bfa453ae91296e99d25d7d52ee2", "score": "0.64716274", "text": "private function curl()\n {\n $request = curl_init();\n\n if ($this->requestType == 'GET')\n {\n $this->buildUrl();\n }\n\n curl_setopt($request, CURLOPT_HTTPHEADER, $this->header);\n curl_setopt($request, CURLOPT_HEADER, false);\n curl_setopt($request, CURLOPT_URL, $this->requestUrl);\n curl_setopt($request, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($request, CURLOPT_SSL_VERIFYPEER, false);\n\n if ($this->requestType == 'POST')\n {\n curl_setopt($request, CURLOPT_POST, count($this->requestParams));\n curl_setopt($request, CURLOPT_POSTFIELDS, $this->requestParams);\n }\n \n $response = curl_exec($request);\n curl_close($request);\n\n return $response;\n }", "title": "" }, { "docid": "6df2778b49c10c93a91161c1ac5d5539", "score": "0.6439497", "text": "function exec() {\r\n return curl_exec($this->curl);\r\n }", "title": "" }, { "docid": "b8cd52618a9792e1205f53b45747eb25", "score": "0.6430568", "text": "private function exec_curl($url, $data = '') {\n $this->ch = $this->get_curl_obj();\n curl_setopt($this->ch, CURLOPT_URL, $url);\n\n if (trim($data) != '') {\n curl_setopt($this->ch, CURLOPT_POSTFIELDS, $data);\n if ($this->request_type === 'PUT') {\n curl_setopt($this->ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json', 'Content-Length: ' . strlen($data)]);\n curl_setopt($this->ch, CURLOPT_CUSTOMREQUEST, 'PUT');\n } else {\n curl_setopt($this->ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n }\n } else {\n curl_setopt($this->ch, CURLOPT_POST, false);\n if ($this->request_type === 'DELETE') {\n curl_setopt($this->ch, CURLOPT_CUSTOMREQUEST, 'DELETE');\n }\n }\n\n if (($content = curl_exec($this->ch)) === false) {\n error_log('cURL error: ' . curl_error($this->ch));\n }\n\n if ($this->debug) {\n print '<pre>';\n print PHP_EOL . '---------cURL INFO-----------' . PHP_EOL;\n print_r(curl_getinfo($this->ch));\n print PHP_EOL . '-------URL & PAYLOAD---------' . PHP_EOL;\n print $url . PHP_EOL;\n print $data;\n print PHP_EOL . '----------RESPONSE-----------' . PHP_EOL;\n print $content;\n print PHP_EOL . '-----------------------------' . PHP_EOL;\n print '</pre>';\n }\n\n curl_close($this->ch);\n return $content;\n }", "title": "" }, { "docid": "b4611dc9617ecc58038547b60dfba8ce", "score": "0.6410496", "text": "public function exec() {\n\t\t$this->prepareRequest();\n\t\treturn $this->initResponse(curl_exec($this->_handle));\n\t}", "title": "" }, { "docid": "726393495a682b9bfa61ccc44ca8a567", "score": "0.6372802", "text": "protected function _runCall( ) {\n if (!function_exists('curl_init')) $this->markTestSkipped(\"curl not available, cannot test\");\n $echo = $this->_echoProc;\n //$tempfile = new Quick_Test_Tempfile();\n // use nc if available... @FIXME: can`t get nc to work\n //if (file_exists(\"/bin/nc\")) $echo = new Quick_Proc_Process(\"exec nc -l 12345 > $tempfile 2>&1 ; cat $tempfile\");\n //if (file_exists(\"/bin/nc\")) $echo = new Quick_Proc_Process(\"exec nc -l 12345 > /tmp/ar.out 2>&1 ; cat /tmp/ar.out\");\n //usleep(150000);\n $this->_cut->call();\n $output = $echo->getOutput(1);\n return $output;\n }", "title": "" }, { "docid": "93285ea3ab29151df4cd0a5f9d6d5e41", "score": "0.6340437", "text": "private function _performCurlSession()\n {\n $this->_curl_result = curl_exec($this->_curl_handle);\n $this->_curl_error = curl_error($this->_curl_handle);\n $this->_curl_info = curl_getinfo($this->_curl_handle);\n\n curl_close($this->_curl_handle);\n\n if (preg_match('/^[3|4|5][0-9]{2}$/', $this->_curl_info['http_code'])) {\n throw new Exception(sprintf(\n 'An error occurs calling %s : %s (http_code %s) : %s',\n $this->_curl_info['url'],\n $this->_curl_error,\n $this->_curl_info['http_code'],\n (string) $this->_curl_result));\n }\n }", "title": "" }, { "docid": "447e48347049e0a718bf3196d1b0100d", "score": "0.6294803", "text": "public function sendRequest()\n {\n if ($this->debug) {\n $this->curl->setopt(CURLOPT_VERBOSE, true);\n $verbose = fopen('php://temp', 'w+');\n $this->curl->setopt(CURLOPT_STDERR, $verbose);\n }\n\n $this->rawResponse = $this->curl->exec();\n\n if ($this->debug) {\n rewind($verbose);\n $verboseLog = stream_get_contents($verbose);\n echo \"Verbose information:\\n<pre>\", htmlspecialchars($verboseLog), \"</pre>\\n\";\n }\n }", "title": "" }, { "docid": "6583c8bdd5ea56e9ef04e775465fdb14", "score": "0.6292941", "text": "function runCurl($url, $method = 'GET', $postvals = null) {\n $ch = curl_init($url);\n //GET request: send headers and return data transfer\n if ($method == 'GET'){\n $options = array(\n CURLOPT_URL => $url,\n CURLOPT_RETURNTRANSFER => 1,\n \tCURLOPT_SSL_VERIFYPEER => false\n );\n $result = curl_setopt_array($ch, $options);\n //POST / PUT request: send post object and return data transfer\n } else {\n $options = array(\n CURLOPT_URL => $url,\n CURLOPT_POST => 1,\n CURLOPT_POSTFIELDS => $postvals,\n CURLOPT_RETURNTRANSFER => 1,\n \tCURLOPT_SSL_VERIFYPEER => false\n );\n $result = curl_setopt_array($ch, $options);\n }\n\n $response = curl_exec($ch); \n \n curl_close($ch);\n\n return $response;\n}", "title": "" }, { "docid": "cd05d0fdf31303f58bce8011456dcc1a", "score": "0.62423795", "text": "static function callCurl($url, $request, $params = null, $file_option = null){\n\n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $request);\n\n if(!isset($params)){\n $params = 'no data';\n }\n\n $configEntity = FacturaConfig::configEntity();\n\n if($request == 'POST'){\n $dataString = json_encode($params);\n\n curl_setopt($ch, CURLOPT_POSTFIELDS, $dataString);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json',\n 'Content-Length:' . strlen($dataString),\n 'F-PLUGIN: b2b0f61828f85dedb83c08e6d07cf71ce964a99c',\n 'F-API-KEY:' . $configEntity['apikey'],\n 'F-SECRET-KEY:' . $configEntity['apisecret']\n ));\n }else{\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json',\n 'F-PLUGIN: b2b0f61828f85dedb83c08e6d07cf71ce964a99c',\n 'F-API-KEY:' . $configEntity['apikey'],\n 'F-SECRET-KEY:' . $configEntity['apisecret']\n ));\n }\n\n //Curl Logs\n $fp = fopen(dirname(__FILE__) . '/logs/errorlog.txt', 'a')\n or die('can not open log file');\n curl_setopt($ch, CURLOPT_VERBOSE, 1);\n curl_setopt($ch, CURLOPT_STDERR, $fp);\n\n try{\n $data = curl_exec($ch);\n curl_close($ch);\n }catch(Exception $e){\n print('Exception occured: ' . $e->getMessage());\n }\n\n //Api Logs\n $apiLogFile = dirname(__FILE__) . '/logs/apilog.txt';\n $fh = fopen($apiLogFile, 'a')\n or die('can not open log file');\n $logRow = '[' . date('d-m-Y h:s:i') . '] api_url: ' . $url\n . ' | api_request: ' . $request\n . ' | api_params: ' . json_encode($params)\n . ' | config_vars: ' . json_encode($configEntity)\n . ' | api_response: ' . $data . \"\\n\";\n fwrite($fh, $logRow);\n fclose($fh);\n\n //return array\n if($file_option != null)\n return $data;\n \n return json_decode($data);\n }", "title": "" }, { "docid": "d97c75472472bec1afa2bdfcc28f5a16", "score": "0.62323815", "text": "function call() {\n $ch = curl_init();\n\n $headers = [\n 'Content-Type: application/json'\n ];\n if ( array_key_exists('HTTP_AUTHORIZATION', $_SERVER) ) {\n $headers[] = sprintf('Authorization: %s', $_SERVER['HTTP_AUTHORIZATION']);\n }\n\n $curlopts = [\n CURLOPT_HTTPHEADER => $headers,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_VERBOSE => true\n ];\n\n if ( $_SERVER['REQUEST_METHOD'] == \"POST\" ) {\n $curlopts[CURLOPT_POST] = true;\n $curlopts[CURLOPT_POSTFIELDS] = $_POST['payload'];\n $url = $_POST['api_url'];\n } else {\n $url = $_GET['api_url'];\n }\n\n $curlopts[CURLOPT_URL] = $url;\n\n curl_setopt_array($ch, $curlopts);\n\n return curl_exec($ch);\n}", "title": "" }, { "docid": "e8bc992e30328649e441fbf7e2796251", "score": "0.6213782", "text": "public static function exec_get()\n {\n\n $full_url = self::$url . '?' . self::$query;\n\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $full_url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_HTTPHEADER, self::$headers);\n self::$responses = curl_exec($curl);\n self::$error = curl_errno($curl);\n self::$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n curl_close($curl);\n }", "title": "" }, { "docid": "62bd8ce7fd31d4d659f03322172ff8d3", "score": "0.62096816", "text": "private function _curlCall($url)\n {\n // print($url);\n // Get cURL resource\n $curl = curl_init();\n // Set some options - we are passing in a useragent too here\n curl_setopt_array($curl, array(\n CURLOPT_RETURNTRANSFER => 1,\n CURLOPT_FOLLOWLOCATION => true,\n CURLOPT_URL => $url\n ));\n\n $response = curl_exec($curl);\n\n if (curl_errno($curl) > 0) {\n echo 'Curl error ' . curl_errno($curl) . \": \" . curl_error($curl);\n }\n\n // Close request to clear up some resources\n curl_close($curl);\n\n // Check the response to see if a surl validation is thrown\n $response = $this->_checkResponse($response);\n\n return $response;\n }", "title": "" }, { "docid": "36db64a19c3ec3fc97bca511295d5717", "score": "0.619642", "text": "public static function exec_post()\n {\n\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, self::$url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_HTTPHEADER, self::$headers);\n curl_setopt($curl, CURLOPT_POST, 1);\n curl_setopt($curl, CURLOPT_POSTFIELDS, self::$query);\n self::$responses = curl_exec($curl);\n self::$error = curl_errno($curl);\n self::$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n curl_close($curl);\n }", "title": "" }, { "docid": "e83f0dfa921242f1365901153ae3a92e", "score": "0.6196388", "text": "public function doCurlCSO($url,$curlPostData=false,$cSetOpt=false) {\r\n if (!function_exists('curl_init')){\r\n die('Sorry cURL is not installed!');\r\n }\r\n $tcurl = curl_init();\r\n $curlPostOut=\"\";\r\n foreach($curlPostData as $key=>$value) {$curlPostOut .= $key.'='.$value.'&';}\r\n rtrim($curlPostOut,'&');\r\n foreach($cSetOpt as $key=>$value) {\r\n if(key!=\"CURLOPT_URL\")\r\n curl_setopt($tcurl,$key,$value);\r\n }\r\n curl_setopt($tcurl,CURLOPT_URL,$url);\r\n curl_setopt($tcurl,CURLOPT_POST,count($curlPostData));\r\n curl_setopt($tcurl,CURLOPT_POSTFIELDS,$curlPostOut);\r\n $rData = curl_exec($tcurl);\r\n curl_close($tcurl);\r\n return $rData;\r\n }", "title": "" }, { "docid": "2c476ad99dc76cecfdaae5650ad07113", "score": "0.6195941", "text": "function runCurl($api_endpoint, $nvp) {\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_VERBOSE, 1);\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($curl, CURLOPT_TIMEOUT, 30);\n curl_setopt($curl, CURLOPT_URL, $api_endpoint);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $nvp);\n $result = curl_exec($curl);\n return $result;\n}", "title": "" }, { "docid": "c85529ead2ac1921a214359012bc7a40", "score": "0.6179136", "text": "function submit_cURL($data, $api_url) {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $api_url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_TIMEOUT, 500);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n // turn off verification of SSL for testing:\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n // Send query to server:\n $result = curl_exec($ch);\n curl_close($ch);\n return $result;\n }", "title": "" }, { "docid": "3d2fdd00260844f17a4f06ed0c4edd03", "score": "0.61743516", "text": "protected function callCurl()\r\n {\r\n curl_setopt($this->curlHandle, CURLOPT_POSTFIELDS, $this->lastRequest);\r\n\r\n if ($cookies = $this->getCookieAsString()) {\r\n curl_setopt($this->curlHandle, CURLOPT_COOKIE, $cookies);\r\n }\r\n\r\n $this->lastResponse = curl_exec($this->curlHandle);\r\n\t\t\r\n $httpCode = curl_getinfo($this->curlHandle, CURLINFO_HTTP_CODE);\r\n if ($httpCode >= 400) {\r\n $xml = simplexml_load_string($this->lastResponse, 'SimpleXMLElement', 0, 'soapenv', true);\r\n if ($xml)\r\n {\r\n $fault = $xml->Body->Fault->children('');\r\n throw new \\SoapFault((string)$fault->faultcode, (string)$fault->faultstring);\r\n }\r\n else\r\n {\r\n throw new \\SoapFault(\"Error code $httpCode\", $this->lastResponse);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "ccf0bc00814676ae38f66dbd38ddbdf6", "score": "0.61740017", "text": "public function execute() {\n\n //Execute curl\n $data = curl_exec( $this->ch );\n\n //Close\n curl_close( $this->ch );\n\n //Return data\n return $data;\n }", "title": "" }, { "docid": "d8548751e5d36528e34e3a848b4b91fd", "score": "0.61734605", "text": "public function execute()\n {\n // $options = array(\n // 'http' => array(\n // 'header' => \"Content-type: application/json\\r\\n\",\n // 'method' => 'POST',\n // 'content' => json_encode( $this->requestData, JSON_UNESCAPED_SLASHES )\n // )\n // );\n\n // $context = stream_context_create($options);\n //$result = file_get_contents($this->url, false, $context);\n\n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_AUTOREFERER, true);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($this->requestData, JSON_UNESCAPED_SLASHES));\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_URL, $this->url);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n\n $result = curl_exec($ch);\n\n curl_close($ch);\n\n if ($result === false) {\n return false;\n } else {\n return json_decode($result);\n }\n }", "title": "" }, { "docid": "ee25d12b0684ec1ef7fa96c4bb1276d4", "score": "0.6152892", "text": "public function executeRequest(Google_Http_Request $request)\n {\n $curl = curl_init();\n\n if ($request->getPostBody()) {\n curl_setopt($curl, CURLOPT_POSTFIELDS, $request->getPostBody());\n }\n\n $requestHeaders = $request->getRequestHeaders();\n if ($requestHeaders && is_array($requestHeaders)) {\n $curlHeaders = array();\n foreach ($requestHeaders as $k => $v) {\n $curlHeaders[] = \"$k: $v\";\n }\n curl_setopt($curl, CURLOPT_HTTPHEADER, $curlHeaders);\n }\n curl_setopt($curl, CURLOPT_URL, $request->getUrl());\n\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $request->getRequestMethod());\n curl_setopt($curl, CURLOPT_USERAGENT, $request->getUserAgent());\n\n curl_setopt($curl, CURLOPT_FOLLOWLOCATION, false);\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);\n // 1 is CURL_SSLVERSION_TLSv1, which is not always defined in PHP.\n curl_setopt($curl, CURLOPT_SSLVERSION, 1);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_HEADER, true);\n\n if ($request->canGzip()) {\n curl_setopt($curl, CURLOPT_ENCODING, 'gzip,deflate');\n }\n \n $options = $this->client->getClassConfig('Google_IO_Curl', 'options');\n if (is_array($options)) {\n $this->setOptions($options);\n }\n \n foreach ($this->options as $key => $var) {\n curl_setopt($curl, $key, $var);\n }\n\n if (!isset($this->options[CURLOPT_CAINFO])) {\n curl_setopt($curl, CURLOPT_CAINFO, dirname(__FILE__) . '/cacerts.pem');\n }\n\n $this->client->getLogger()->debug(\n 'cURL request',\n array(\n 'url' => $request->getUrl(),\n 'method' => $request->getRequestMethod(),\n 'headers' => $requestHeaders,\n 'body' => $request->getPostBody()\n )\n );\n\n $response = curl_exec($curl);\n if ($response === false) {\n $error = curl_error($curl);\n $code = curl_errno($curl);\n $map = $this->client->getClassConfig('Google_IO_Exception', 'retry_map');\n\n $this->client->getLogger()->error('cURL ' . $error);\n throw new Google_IO_Exception($error, $code, null, $map);\n }\n $headerSize = curl_getinfo($curl, CURLINFO_HEADER_SIZE);\n\n list($responseHeaders, $responseBody) = $this->parseHttpResponse($response, $headerSize);\n $responseCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n\n $this->client->getLogger()->debug(\n 'cURL response',\n array(\n 'code' => $responseCode,\n 'headers' => $responseHeaders,\n 'body' => $responseBody,\n )\n );\n\n return array($responseBody, $responseHeaders, $responseCode);\n }", "title": "" }, { "docid": "957db3b4e0c54c360e9e1ff32de33a3d", "score": "0.61437565", "text": "function runCurl($api_endpoint, $nvp) {\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_VERBOSE, 1);\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($curl, CURLOPT_TIMEOUT, 30);\n curl_setopt($curl, CURLOPT_URL, $api_endpoint);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $nvp);\n $result = curl_exec($curl);\n\n return $result;\n}", "title": "" }, { "docid": "68cc8aa085980472582244be548fe480", "score": "0.61356366", "text": "function executeCurlBasic($url, $parameters, $method='GET'){\n $ch = curl_init($url); \n \t \tcurl_setopt($ch, CURLOPT_HEADER, 0); \n \t \tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n \t curl_setopt($ch, CURLOPT_TIMEOUT, 60);\n \t curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);\n \t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $parameters); \n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n echo $response = curl_exec($ch);\n curl_close($ch);\n \tif(!$response) return false;\n \t\t return $response;\n }", "title": "" }, { "docid": "f50670992745fb3e7582705871943e31", "score": "0.6078006", "text": "function doCurl ($url, $options) {\n\tglobal $adminName, $adminPass;\n\t$options = $options + array(CURLOPT_RETURNTRANSFER => true,CURLOPT_USERPWD => $adminName . \":\" . $adminPass, CURLOPT_HTTPHEADER => array('OCS-APIRequest:true'),);\n \t$options = $options + array(CURLOPT_VERBOSE => FALSE, CURLOPT_HEADER => FALSE);\n\t$ch = curl_init($url);\n \tcurl_setopt_array( $ch, $options);\n\t$response = curl_exec($ch);\n\tif($response === false) {echo 'Curl error: ' . curl_error($ch) . \"\\n\";exit(1);}\n\tcurl_close($ch);\n\t// An error causes an exit\n\tif (preg_match(\"~<statuscode>(\\d+)</statuscode>~\", $response, $matches)) {$responseCode = $matches[1]; }\n if ($responseCode != '100' ) {echo \"Error response code; exiting<pre>\\n$response\\n\";}\n\telse {echo \"<xmp>$response\\n</xmp><br><br><br>\";\t}\n // // show user information\n // preg_match(\"~<email>(.+?)</email>~\", $response, $email);\n // echo \"\\n Email: \".$email[1];\n // $xml = simplexml_load_string($response);\n // echo \"\\nGruppen: \".$xml->data->groups->element[0];\n // // echo $xml->data->groups->element[0];\n\techo \"<pre>\";\n\tprint_r($options);\n\techo \"</pre>\";\n\treturn;\n}", "title": "" }, { "docid": "8a4fa6252c7f412aae842f0107c59c97", "score": "0.6068023", "text": "public function execute(): void\n {\n //- POST \n if (!empty($this->post_data)) {\n curl_setopt($this->ch, CURLOPT_POST, TRUE);\n\n $post_data = ($this->mime === $this->mime_type['MIME_JSON']) ? json_encode($this->post_data) : $this->post_data;\n\n curl_setopt($this->ch, CURLOPT_POSTFIELDS, $post_data);\n $this->headers['Content-Type'] = $this->parseMimeType();\n }\n\n //- POST RAW \n elseif (isset($this->post_raw)) {\n curl_setopt($this->ch, CURLOPT_POST, TRUE);\n curl_setopt($this->ch, CURLOPT_POSTFIELDS, $this->post_raw);\n $this->headers['Content-Type'] = $this->parseMimeType();\n $this->headers['Content-Length'] = strlen($this->post_raw);\n }\n\n // - PUT\n elseif (!empty($this->put_data)) {\n curl_setopt($this->ch, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($this->ch, CURLOPT_POSTFIELDS, http_build_query($this->put_data));\n $this->headers['Content-Type'] = $this->parseMimeType();\n }\n\n // - DELETE\n elseif (!empty($this->delete_data)) {\n curl_setopt($this->ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n curl_setopt($this->ch, CURLOPT_POSTFIELDS, http_build_query($this->delete_data));\n $this->headers['Content-Type'] = $this->parseMimeType();\n }\n\n // - GET\n elseif (!empty($this->get_data)) {\n curl_setopt($this->ch, CURLOPT_CUSTOMREQUEST, \"GET\");\n $this->url = sprintf(\"%s?%s\", $this->url, http_build_query($this->get_data));\n } else {\n curl_setopt($this->ch, CURLOPT_CUSTOMREQUEST, \"GET\");;\n }\n\n $url = $this->generateUrl();\n\n curl_setopt($this->ch, CURLOPT_URL, $url);\n\n curl_setopt($this->ch, CURLOPT_USERAGENT, $this->user_agent);\n\n if (!empty($this->headers)) {\n $data = [];\n foreach ($this->headers as $k => $v) {\n if (is_array($v)) {\n foreach ($v as $val) {\n $data[] = \"$k: $val\";\n }\n } else {\n $data[] = \"$k: $v\";\n }\n }\n curl_setopt($this->ch, CURLOPT_HTTPHEADER, $data);\n }\n\n curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, TRUE);\n\n $this->response = curl_exec($this->ch);\n\n $this->http_code = curl_getinfo($this->ch, CURLINFO_HTTP_CODE);\n $this->header_size = curl_getinfo($this->ch, CURLINFO_HEADER_SIZE);\n $this->sent = curl_getinfo($this->ch, CURLINFO_HEADER_OUT);\n $this->error = curl_error($this->ch);\n $this->errno = curl_errno($this->ch);\n\n if ($this->is_debug) {\n $this->debug = curl_getinfo($this->ch);\n }\n\n curl_close($this->ch);\n }", "title": "" }, { "docid": "1ab3976c555b2185a1fa54519d923576", "score": "0.6066862", "text": "public function testCurlExecutes()\n {\n $call = function () {\n $curl = new Curl;\n $curl->execute();\n };\n\n // We'll expect an \"INIT\" from the init call and a \"1\" from setting the CURLOPT_RETURNTRANSFER option\n $this->assertRegExp('/EXEC/', $this->intercept($call), 'Executing the curl object did not call curl_exec');\n }", "title": "" }, { "docid": "a2241d3f3531e7789256f6fa51e52c86", "score": "0.6062269", "text": "private static function execute_curl($url, $options, $timeout, $err, &$info = false) {\r\n\t\t$address = $url;\r\n\t\tif ($url instanceof Url) {\r\n\t\t\t$address = $url->build();\r\n\t\t}\r\n\t\t$options[CURLOPT_URL] = $address;\r\n\t\tif ($timeout > 0) {\r\n\t\t\t$options[CURLOPT_TIMEOUT] = $timeout;\r\n\t\t}\r\n\t\t\r\n\t\t$ret = false;\r\n\t\t$ch = NULL;\r\n\t\t\r\n\t\t$status = ($err) ? $err : new Status();\r\n\t\t$err_no = 0;\r\n\t\ttry {\r\n\t\t\t$ch = curl_init();\r\n\t\t\tif (curl_setopt_array($ch, $options)) {\r\n\t\t\t\t$ret = curl_exec ($ch);\r\n\t\t\t\t$info = curl_getinfo($ch);\r\n\t\t\t\tif ($ret === false) {\r\n\t\t\t\t\t$status->append($address . ': ' . curl_error($ch));\r\n\t\t\t\t\t$err_no = curl_errno($ch);\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception $e) {\r\n\t\t\t// Do nothing special here\r\n\t\t\tif ($ch) {\r\n\t\t\t\t$status->append($address . ': ' . curl_error($ch));\r\n\t\t\t\t$err_no = curl_errno($ch);\r\n\t\t\t\t$info = curl_getinfo($ch);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$status->append($address . ': ' . $e->getMessage());\r\n\t\t\t\t$err_no = 999;\r\n\t\t\t}\r\n\t\t\t$ret = false;\r\n\t\t}\r\n\t\tif ($ch) {\r\n\t\t\t@curl_close ($ch);\r\n\t\t}\r\n\t\tif (Config::has_feature(Config::LOG_HTTPREQUESTS)) {\r\n\t\t\t$log = array($address, $err_no, $status->to_string(Status::OUTPUT_PLAIN));\r\n\t\t\tLoad::components('logger');\r\n\t\t\tLogger::log('httprequests', $log);\r\n\t\t}\r\n\t\treturn $ret;\r\n\t}", "title": "" }, { "docid": "a5c0933dfe93f816a3c5d9eb9e774983", "score": "0.60549945", "text": "private static function execute_curl($url, $options, $timeout, $err, &$info = false) {\n\t\t$address = $url;\n\t\tif ($url instanceof Url) {\n\t\t\t$address = $url->build();\n\t\t}\n\t\t$options[CURLOPT_URL] = $address;\n\t\tif ($timeout > 0) {\n\t\t\t$options[CURLOPT_TIMEOUT] = $timeout;\n\t\t}\n\t\t\n\t\t$ret = false;\n\t\t$ch = NULL;\n\t\t\n\t\t$status = ($err) ? $err : new Status();\n\t\t$err_no = 0;\n\t\ttry {\n\t\t\t$ch = curl_init();\n\t\t\tif (curl_setopt_array($ch, $options)) {\n\t\t\t\t$ret = curl_exec ($ch);\n\t\t\t\t$info = curl_getinfo($ch);\n\t\t\t\tif ($ret === false) {\n\t\t\t\t\t$status->append($address . ': ' . curl_error($ch));\n\t\t\t\t\t$err_no = curl_errno($ch);\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\t// Do nothing special here\n\t\t\tif ($ch) {\n\t\t\t\t$status->append($address . ': ' . curl_error($ch));\n\t\t\t\t$err_no = curl_errno($ch);\n\t\t\t\t$info = curl_getinfo($ch);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$status->append($address . ': ' . $e->getMessage());\n\t\t\t\t$err_no = 999;\n\t\t\t}\n\t\t\t$ret = false;\n\t\t}\n\t\tif ($ch) {\n\t\t\t@curl_close ($ch);\n\t\t}\n\t\tif (Config::has_feature(Config::LOG_HTTPREQUESTS)) {\n\t\t\t$log = array($address, $err_no, $status->to_string(Status::OUTPUT_PLAIN));\n\t\t\tLoad::components('logger');\n\t\t\tLogger::log('httprequests', $log);\n\t\t}\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "a9f0d96b8f87464dcef04714c717f443", "score": "0.60546774", "text": "function _curl_exec($arg)\n\t{\n\t\t$arg['API'] = '4.0';\n\t\tif ( ! empty($this->_cfg['session'])) {\n\t\t\t$arg['sessionid'] = $this->_cfg['session'];\n\t\t}\n\n\t\tif (!empty($this->_training)) {\n\t\t\t$arg['training'] = 1;\n\t\t}\n\n\t\tif (empty($arg['nonce'])) {\n\t\t\t$arg['nonce'] = sha1(serialize($arg).microtime(true));\n\t\t}\n\n\t\t$t0 = microtime(true);\n\n\t\t$ch = $this->_curl_init($this->_api_base);\n\n\t\t$this->_arg = $arg;\n\t\t$this->_req = json_encode($this->_arg);\n\t\tcurl_setopt($ch, CURLOPT_POST, true);\n\t\t// curl_setopt($ch, CURLOPT_HEADER, true); // Get Headers in Response?\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $this->_req);\n\n\t\t$this->_raw = curl_exec($ch);\n\t\t$this->_inf = curl_getinfo($ch);\n\n\t\t// this is a workaround for a biotrack bug where headers leak into the response body /djb 20170723\n\t\t$this->_raw = str_replace('Content-Type: text/plain', null, $this->_raw);\n\t\t$this->_raw = trim($this->_raw);\n\n\t\t$this->_ret = json_decode($this->_raw, true);\n\t\t$this->_err = json_last_error_msg();\n\n\t\t$t1 = microtime(true);\n\n\t\t// Handle Response\n\t\t$this->_ret['code'] = $this->_inf['http_code'];\n\t\tswitch ($this->_inf['http_code']) {\n\t\tcase 200:\n\t\t\t// OK\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t//throw new \\Exception(sprintf('Invalid HTTP Response Code: %d See Log: %s', $inf['http_code'], basename($log_file)));\n\t\t\tif (empty($this->_raw)) {\n\t\t\t\t$this->_ret = array(\n\t\t\t\t\t'success' => 0,\n\t\t\t\t\t'errorcode' => $this->_inf['http_code'],\n\t\t\t\t\t'error' => 'BioTrack System Error: Empty Response: Please try your request again.',\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$this->_ret = array(\n\t\t\t\t\t'success' => 0,\n\t\t\t\t\t'errorcode' => $this->_inf['http_code'],\n\t\t\t\t\t'error' => sprintf('BioTrack System Error; Code #%03d: Please try your request again.', $this->_inf['http_code']), //Invalid Response from WSLCB',\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// @todo Plugin::notify_run('rbe-error-handler');\n\t\tif (!empty($this->_ret['error'])) {\n\t\t\tif (preg_match('/session.+expired/', $this->_ret['error'])) {\n\t\t\t\tunset($this->_cfg['session']);\n\t\t\t}\n\t\t}\n\n\t\treturn $this->_ret;\n\t}", "title": "" }, { "docid": "83f74630223eda0e4edcc7f3b696f673", "score": "0.6048171", "text": "private function single_curl() {\n $ch = curl_init();\t\t\n $options = $this->get_options(array_shift($this->requests));\n curl_setopt_array($ch,$options);\n $output = curl_exec($ch);\n $info = curl_getinfo($ch);\n\n // it's not neccesary to set a callback for one-off requests\n if ($this->callback) {\n $callback = $this->callback;\n if (is_callable($this->callback)){\n call_user_func($callback, $output, $info);\n }\n }\n\t\telse\n return $output;\n }", "title": "" }, { "docid": "6420b1b6cc956d4298c937e3e1fc75d0", "score": "0.6045494", "text": "private static function curl($options=[]){\n\t\tif (!isset($options['url']))\n\t\t\tthrow new NCException('CURL options need URL parameter.');\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $options['url']);\n\t\tif (isset($options['header']) && $options['header'])\n\t\t\tcurl_setopt($ch, CURLOPT_HEADER, 1);\n\t\tif (isset($options['headers']) && is_array($options['headers']))\n\t\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $options['headers']);\n\t\tcurl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n\t\tcurl_setopt($ch, CURLOPT_COOKIESESSION, false);\n\t\tcurl_setopt($ch, CURLOPT_COOKIEJAR, getcwd().'/nc_cookie.txt');\n\t\tcurl_setopt($ch, CURLOPT_COOKIEFILE, getcwd().'/nc_cookie.txt');\n\t\tif (isset($options['referrer']))\n\t\t\tcurl_setopt($ch, CURLOPT_REFERER, $options['referrer']);\n\t\tcurl_setopt($ch, CURLOPT_VERBOSE, 1);\n\t\tif (isset($options['method'],$options['data']) && $options['method'] == 'POST'){\n\t\t\tcurl_setopt($ch, CURLOPT_POST, 1);\t\t\t\t \n\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, is_array($options['data']) ? http_build_query($options['data']) : $options['data']);\n\t\t}\n\t\t$data = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\tif (isset($options['type']) && $options['type'] == 'json'){\n\t\t\treturn json_decode($data,true);\n\t\t}else{\n\t\t\treturn $data;\n\t\t}\n\t}", "title": "" }, { "docid": "d1c829eab68d5b0e625c612cb9c2dac1", "score": "0.6018347", "text": "protected function _execute($url=null)\n {\n if (is_null($url)) {\n throw new CalEvans_Klout_Exception('No URL provided',-2);\n }\n\n $output = '';\n $ch = curl_init($url);\n\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n $output = curl_exec($ch);\n\n // Check if any error occured\n if(curl_errno($ch))\n {\n // curl error\n $message = curl_error($ch);\n $errno = curl_errno($ch);\n\n curl_close($ch);\n\n throw new CalEvans_Klout_Exception($message,$errno);\n } else if(curl_getinfo($ch,CURLINFO_HTTP_CODE)!==200) {\n // http error\n $message = 'There was an error retrieving the api call.';\n $errno = curl_getinfo($ch,CURLINFO_HTTP_CODE);\n curl_close($ch);\n\n throw new CalEvans_Klout_Exception($message,$errno);\n } else {\n // everything went fine\n curl_close($ch);\n } // if(curl_errno($ch))\n\n\n return $output;\n }", "title": "" }, { "docid": "d7ba6a78f8ccf7b0eeefdcdbfae30205", "score": "0.6011026", "text": "public function fetch()\n {\n // curl options\n $this->curlopt = [\n CURLOPT_URL => $this->options['url'],\n CURLOPT_ENCODING => $this->options['encoding'],\n CURLOPT_CONNECTTIMEOUT => $this->options['timeout'],\n CURLOPT_TIMEOUT => $this->options['timeout'],\n CURLOPT_AUTOREFERER => true,\n CURLOPT_RETURNTRANSFER => $this->options['body'],\n CURLOPT_FOLLOWLOCATION => true,\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_HEADER => false,\n CURLOPT_HEADERFUNCTION => function ($curl, $header) {\n $parts = Str::split($header, ':');\n\n if (empty($parts[0]) === false && empty($parts[1]) === false) {\n $key = array_shift($parts);\n $this->headers[$key] = implode(':', $parts);\n }\n\n return strlen($header);\n }\n ];\n\n // determine the TLS CA to use\n if ($this->options['ca'] === self::CA_INTERNAL) {\n $this->curlopt[CURLOPT_SSL_VERIFYPEER] = true;\n $this->curlopt[CURLOPT_CAINFO] = dirname(__DIR__, 2) . '/cacert.pem';\n } elseif ($this->options['ca'] === self::CA_SYSTEM) {\n $this->curlopt[CURLOPT_SSL_VERIFYPEER] = true;\n } elseif ($this->options['ca'] === false) {\n $this->curlopt[CURLOPT_SSL_VERIFYPEER] = false;\n } elseif (\n is_string($this->options['ca']) === true &&\n is_file($this->options['ca']) === true\n ) {\n $this->curlopt[CURLOPT_SSL_VERIFYPEER] = true;\n $this->curlopt[CURLOPT_CAINFO] = $this->options['ca'];\n } elseif (\n is_string($this->options['ca']) === true &&\n is_dir($this->options['ca']) === true\n ) {\n $this->curlopt[CURLOPT_SSL_VERIFYPEER] = true;\n $this->curlopt[CURLOPT_CAPATH] = $this->options['ca'];\n } else {\n throw new InvalidArgumentException('Invalid \"ca\" option for the Remote class');\n }\n\n // add the progress\n if (is_callable($this->options['progress']) === true) {\n $this->curlopt[CURLOPT_NOPROGRESS] = false;\n $this->curlopt[CURLOPT_PROGRESSFUNCTION] = $this->options['progress'];\n }\n\n // add all headers\n if (empty($this->options['headers']) === false) {\n // convert associative arrays to strings\n $headers = [];\n foreach ($this->options['headers'] as $key => $value) {\n if (is_string($key) === true) {\n $headers[] = $key . ': ' . $value;\n } else {\n $headers[] = $value;\n }\n }\n\n $this->curlopt[CURLOPT_HTTPHEADER] = $headers;\n }\n\n // add HTTP Basic authentication\n if (empty($this->options['basicAuth']) === false) {\n $this->curlopt[CURLOPT_USERPWD] = $this->options['basicAuth'];\n }\n\n // add the user agent\n if (empty($this->options['agent']) === false) {\n $this->curlopt[CURLOPT_USERAGENT] = $this->options['agent'];\n }\n\n // do some request specific stuff\n switch (strtoupper($this->options['method'])) {\n case 'POST':\n $this->curlopt[CURLOPT_POST] = true;\n $this->curlopt[CURLOPT_CUSTOMREQUEST] = 'POST';\n $this->curlopt[CURLOPT_POSTFIELDS] = $this->postfields($this->options['data']);\n break;\n case 'PUT':\n $this->curlopt[CURLOPT_CUSTOMREQUEST] = 'PUT';\n $this->curlopt[CURLOPT_POSTFIELDS] = $this->postfields($this->options['data']);\n\n // put a file\n if ($this->options['file']) {\n $this->curlopt[CURLOPT_INFILE] = fopen($this->options['file'], 'r');\n $this->curlopt[CURLOPT_INFILESIZE] = F::size($this->options['file']);\n }\n break;\n case 'PATCH':\n $this->curlopt[CURLOPT_CUSTOMREQUEST] = 'PATCH';\n $this->curlopt[CURLOPT_POSTFIELDS] = $this->postfields($this->options['data']);\n break;\n case 'DELETE':\n $this->curlopt[CURLOPT_CUSTOMREQUEST] = 'DELETE';\n $this->curlopt[CURLOPT_POSTFIELDS] = $this->postfields($this->options['data']);\n break;\n case 'HEAD':\n $this->curlopt[CURLOPT_CUSTOMREQUEST] = 'HEAD';\n $this->curlopt[CURLOPT_POSTFIELDS] = $this->postfields($this->options['data']);\n $this->curlopt[CURLOPT_NOBODY] = true;\n break;\n }\n\n if ($this->options['test'] === true) {\n return $this;\n }\n\n // start a curl request\n $this->curl = curl_init();\n\n curl_setopt_array($this->curl, $this->curlopt);\n\n $this->content = curl_exec($this->curl);\n $this->info = curl_getinfo($this->curl);\n $this->errorCode = curl_errno($this->curl);\n $this->errorMessage = curl_error($this->curl);\n\n if ($this->errorCode) {\n throw new Exception($this->errorMessage, $this->errorCode);\n }\n\n curl_close($this->curl);\n\n return $this;\n }", "title": "" }, { "docid": "4295322414e6cdafb768f2b0754cdbca", "score": "0.6007313", "text": "function submit_cURL_Get($api_url) {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $api_url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_TIMEOUT, 500);\n // turn off verification of SSL for testing:\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n // Send query to server:\n $result = curl_exec($ch);\n curl_close($ch);\n return $result;\n }", "title": "" }, { "docid": "6579a4d043a579c7f50bcfdd6e3e7520", "score": "0.59740293", "text": "private function configureCurl()\n {\n curl_setopt(\n $this->curl,\n CURLOPT_HTTPHEADER,\n ['Content-type: application/json']\n );\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, $this->body);\n\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_POST, true);\n }", "title": "" }, { "docid": "647f665cabf2a56842d0e09134e9f752", "score": "0.59641725", "text": "static function curl_exec(&$ch, callable $callback): void\n\t{\n\t\t$mh = curl_multi_init();\n\t\tcurl_multi_add_handle($mh, $ch);\n\t\t$loop = self::add(function() use (&$loop, &$mh, &$ch, &$callback)\n\t\t{\n\t\t\t$active = 0;\n\t\t\tcurl_multi_exec($mh, $active);\n\t\t\tif($active == 0)\n\t\t\t{\n\t\t\t\t$loop->remove();\n\t\t\t\tcurl_multi_remove_handle($mh, $ch);\n\t\t\t\tcurl_multi_close($mh);\n\t\t\t\t$callback(curl_multi_getcontent($ch));\n\t\t\t}\n\t\t}, 0.001, true);\n\t}", "title": "" }, { "docid": "51a7b091a02d4bb7384a99c383489a41", "score": "0.5957646", "text": "function curl($url) {\n // Assigning cURL options to an array\n $options = Array(\n CURLOPT_RETURNTRANSFER => TRUE, // Setting cURL's option to return the webpage data\n CURLOPT_FOLLOWLOCATION => TRUE, // Setting cURL to follow 'location' HTTP headers\n CURLOPT_AUTOREFERER => TRUE, // Automatically set the referer where following 'location' HTTP headers\n CURLOPT_CONNECTTIMEOUT => 120, // Setting the amount of time (in seconds) before the request times out\n CURLOPT_TIMEOUT => 120, // Setting the maximum amount of time for cURL to execute queries\n CURLOPT_MAXREDIRS => 10, // Setting the maximum number of redirections to follow\n CURLOPT_USERAGENT => \"Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1a2pre) Gecko/2008073000 Shredder/3.0a2pre ThunderBrowse/3.2.1.8\", // Setting the useragent\n CURLOPT_URL => $url, // Setting cURL's URL option with the $url variable passed into the function\n );\n\n $ch = curl_init(); // Initialising cURL\n curl_setopt_array($ch, $options); // Setting cURL's options using the previously assigned array data in $options\n $data = curl_exec($ch); // Executing the cURL request and assigning the returned data to the $data variable\n curl_close($ch); // Closing cURL\n return $data; // Returning the data from the function\n }", "title": "" }, { "docid": "bb1e520cb9a775c2bc31c5668f11ba67", "score": "0.59300476", "text": "public function execCurl($curl)\n {\n $response = curl_exec($curl);\n\n if (empty($response))\n {\n $number = curl_errno($curl);\n\n // Was there an error?\n if ($number)\n {\n $message = curl_error($curl);\n\n if (stripos($message, 'ssl') !== false)\n {\n $message.= \"\\n\\nFor some SSL issues, try downloading the latest CA bundle and pointing your PHP.ini to that (https://curl.haxx.se/docs/caextract.html)\";\n $message.= \"\\n\\nAlthough risky and not recommended, you can also consider re-running your command with the --no-ssl-check flag\";\n }\n\n $this->warn($message, true);\n }\n }\n\n return $response;\n }", "title": "" }, { "docid": "9247531b8293aacc53c8aee930970fcb", "score": "0.59289926", "text": "protected function performRequest()\n {\n $response = [];\n $curl = curl_init($this->url);\n curl_setopt_array($curl, $this->curlOptions);\n $body = curl_exec($curl);\n $header = curl_getinfo($curl);\n if ($body !== false) {\n $responseCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n curl_close($curl);\n if ($responseCode >= 200 && $responseCode < 300) {\n $response['content'] = $body;\n $response['url'] = $header['url'];\n return $response;\n }\n }\n return null;\n }", "title": "" }, { "docid": "86510f9a2f1e62948114389ce2ea8000", "score": "0.5905755", "text": "public function executeRequest(Request $request)\n\t{\n\t\t$curl = curl_init();\n\t\tif ($request->getData() && $request->getRequestMethod()=='POST') {\n\t\t\tcurl_setopt($curl, CURLOPT_POSTFIELDS, $request->getData());\n\t\t}\n\t\t$requestHeaders = $request->getRequestHeaders();\n\t\tif ($requestHeaders && is_array($requestHeaders)) {\n\t\t\t$curlHeaders = array();\n\t\t\tforeach ($requestHeaders as $k => $v) {\n\t\t\t\t$curlHeaders[] = \"$k: $v\";\n\t\t\t}\n\t\t\tcurl_setopt($curl, CURLOPT_HTTPHEADER, $curlHeaders);\n\t\t}\n\t\tcurl_setopt($curl, CURLOPT_URL, $request->getServiceUrl());\t\t\n\t\tcurl_setopt($curl, CURLOPT_CUSTOMREQUEST, $request->getRequestMethod());\n\t\tcurl_setopt($curl, CURLOPT_USERAGENT, $request->getUserAgent());\n\t\tcurl_setopt($curl, CURLOPT_USERPWD, $request->getAuth());\t\t\n\t\tcurl_setopt($curl, CURLOPT_FOLLOWLOCATION, false);\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);\t\t\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($curl, CURLOPT_HEADER, true);\n\t\tif(function_exists('curl_setopt_array')){\n\t\t\tcurl_setopt_array($curl, $request->getOptions());\n\t\t}else{\n\t\t\t//throws Warning\n\t\t\tforeach ($request->getOptions() as $key => $var) {\n\t\t\t\tcurl_setopt($curl, $key, $var);\n\t\t\t}\n\t\t}\n\t\t$response = curl_exec($curl);\n\t\tif ($response === false) {\n\t\t\t$error = curl_error($curl);\n\t\t\t$code = curl_errno($curl);\n\t\t\tif ($code == 60 || $code == 77) {\n\t\t\t\tcurl_setopt($curl, CURLOPT_CAINFO, __DIR__ . '/cacerts.pem');\n\t\t\t\t$response = curl_exec($curl);\n\t\t\t}\n\t\t\tif($response==false){\n\t\t\t\t$error = curl_error($curl);\n\t\t\t\t$code = curl_errno($curl);\n\t\t\t\tthrow new Exception($error, $code);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$headerSize = curl_getinfo($curl, CURLINFO_HEADER_SIZE);\n\t\tlist($responseHeaders, $responseBody) = $this->parseHttpResponse($response, $headerSize);\n\t\t$responseCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n\t\t\n\t\treturn array(\n\t\t\t\t'responseBody'=>$responseBody, \n\t\t\t\t'responseHeaders'=>$responseHeaders, \n\t\t\t\t'responseCode'=>$responseCode\t\t\t\t\n\t\t);\n\t}", "title": "" }, { "docid": "c7af1a4e3425e67939c3b2f877f7570c", "score": "0.5897705", "text": "protected function send_curl($url, $data)\n {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLINFO_HEADER_OUT, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-type: application/json']);\n curl_setopt($ch, CURLOPT_USERPWD, \"$this->username:$this->password\");\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n $response = curl_exec($ch);\n \n $curl_info = curl_getinfo($ch);\n curl_close($ch);\n \n // Checking for Curl error\n if ($response !== false && !empty($response)) {\n $result = json_decode($response, true);\n if (json_last_error() === JSON_ERROR_NONE) {\n return $result;\n } else {\n throw new Exception('Error while parsing the json response');\n }\n } else {\n throw new Exception('Error in curl ('.($curl_info['http_code']).')');\n }\n }", "title": "" }, { "docid": "329ff4f908edf6e4c2a80d4956c5e16d", "score": "0.58826673", "text": "final public function callHTTP($url, $header, $postData) {\n Callcurl::getCallCurlIns()\n ->setURL($url)\n ->setPostData($postData)\n ->setHeaders($header)\n ->callCurl();\n// echo Callcurl::getCallCurlIns()->getCurlRsesponse();\n $this->insertResponseToDB();\n }", "title": "" }, { "docid": "ab0acce226cd930ec1459015386ae19c", "score": "0.58824545", "text": "function executeRequest($target, $data, $contentType, $user, $password, &$http_status) {\n\t//try to send request to remote\n\t$i = 0;\n\t$max_tries = 3;\n\t$output = null;\n\t\n\tdo {\n\t\t//log retries\n\t\tif($i > 0) {\n\t\t\tsyslog(LOG_NOTICE, \"Last try timed out. Retrying Request to \" . $target);\n\t\t}\n\n\t\t//setup curl with url\n\t\t$ch = curl_init($target);\n\n\t\t//set options\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);\n\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 30); //timeout in seconds\n\t\tcurl_setopt($ch, CURLOPT_CONNECTTIMEOUT ,10); \n\n\t\t//forward content type header\n\t\tif($contentType) {\n\t\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\"Content-Type: $contentType\" ));\n\t\t}\n\n\t\t//POST data\n\t\tif($data!=false) {\n\t\t\tcurl_setopt($ch, CURLOPT_POST, true );\n\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n\t\t}\n\n\t\t//user auth\n\t\tif($user && $password) {\t\t\t\n\t\t\tcurl_setopt($ch, CURLOPT_USERPWD, $user.':'.$password);\n\t\t}\n\n\t\t//GO!\n\t\t$output = curl_exec($ch);\n\t\t$http_status = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\t\t$curl_errno = curl_errno($ch);\n\t\t$curl_error = curl_error($ch);\n\t\t$curl_info = curl_getinfo($ch);\n\t\tif ($curl_errno == 0) {\n\t\t\tbreak;\n\t\t}\n\t\tcurl_close($ch);\n\t\t\n\t\t//on error, repeat\n\t\tsyslog(LOG_NOTICE, \"cURL Error ($curl_errno): $curl_error\");\n\t\t$i++;\n\t} while($i < $max_tries);\n\n\treturn $output;\n}", "title": "" }, { "docid": "2954ac1b827d4e69531560ed33843024", "score": "0.5866127", "text": "function curl($url) {\n // Assigning cURL options to an array\n $options = Array(\n CURLOPT_RETURNTRANSFER => TRUE, // Setting cURL's option to return the webpage data\n CURLOPT_FOLLOWLOCATION => TRUE, // Setting cURL to follow 'location' HTTP headers\n CURLOPT_AUTOREFERER => TRUE, // Automatically set the referer where following 'location' HTTP headers\n CURLOPT_CONNECTTIMEOUT => 120, // Setting the amount of time (in seconds) before the request times out\n CURLOPT_TIMEOUT => 120, // Setting the maximum amount of time for cURL to execute queries\n CURLOPT_MAXREDIRS => 10, // Setting the maximum number of redirections to follow\n CURLOPT_USERAGENT => \"Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1a2pre) Gecko/2008073000 Shredder/3.0a2pre ThunderBrowse/3.2.1.8\", // Setting the useragent\n CURLOPT_URL => $url, // Setting cURL's URL option with the $url variable passed into the function\n );\n \n $ch = curl_init(); // Initialising cURL \n curl_setopt_array($ch, $options); // Setting cURL's options using the previously assigned array data in $options\n $data = curl_exec($ch); // Executing the cURL request and assigning the returned data to the $data variable\n curl_close($ch); // Closing cURL \n return $data; // Returning the data from the function \n }", "title": "" }, { "docid": "2a754dd375996881e46b360ed0c4fc57", "score": "0.58582085", "text": "protected function curlRequest($url) {\n // Config and start cURL.\n $c = curl_init();\n curl_setopt($c, CURLOPT_URL, $url);\n curl_setopt($c, CURLOPT_HEADER, FALSE);\n curl_setopt($c, CURLOPT_HTTPGET, TRUE);\n curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);\n\n // Add proxy if configured.\n if ($this->proxyEnable === 'true') {\n curl_setopt($c, CURLOPT_PROXY, $this->proxyServer . ':' . $this->proxyPort);\n }\n\n // cURL result.\n $result = curl_exec($c);\n\n // Add debug XML response to returned array.\n if (is_string($this->dt['xml_response'])) {\n $this->r['debug_xml_response'] = $result;\n }\n\n // Get cURL info array.\n $cr = curl_getinfo($c);\n\n // Add debug cURL Response to returned array.\n if (is_string($this->dt['curl_response'])) {\n $this->r['debug_curl_response'] = $cr;\n }\n\n // Check cURL http_code status for error.\n // If error exists, add to error array then return method.\n if ($cr['http_code'] != '200') {\n $this->r['error'] = TRUE;\n $this->r['curl_failed'] = TRUE;\n curl_close($c);\n return $this->r;\n }\n // Return an XML response string.\n curl_close($c);\n return $result;\n }", "title": "" }, { "docid": "1716710795494674e9a72630e742c0d5", "score": "0.5846681", "text": "private function init_curl() {\n $this->client = new Curl($this->url, $this->default_params);\n }", "title": "" }, { "docid": "96a01c973a5467f1b0c090e7d50a115d", "score": "0.5836177", "text": "private function sendCurl($data, $sequenceNo, $correlationId, $settings, $targetUrl) \n {\n $apiKey = $settings['api'];\n $cmd = \"curl -u $apiKey: -X POST -H 'Content-Type: application/json'\";\n $cmd .= \" -d '$data' \" . \" -L --post301 --post302 --post303 '$targetUrl'\";\n if ( ! $settings['test']) { // Async when in normal mode (not test)\n $cmd .= \" > /dev/null 2>&1 &\"; \n }\n exec($cmd, $output, $exit);\n \n Mage::getSingleton('core/session')->setLastEventTime(time());\n \n $this->logger->log(\n 'AsyncLocalSender->sendCurl', ' Correlation ID: '. $correlationId \n . ' PHP Session ID: '. session_id() \n . ' Sequence No: ' . $sequenceNo\n . ' Executed curl request. '\n . ' Command:' . $cmd\n . ' Exec output: ' . print_r($output,true)\n . ' Return Var: ' . $exit\n );\n }", "title": "" }, { "docid": "29c02dabd0166d4023bc57b21bc65b30", "score": "0.58335394", "text": "private function basicCURL($url,$headers=array(),$data=null,$additionalOptions=null) {\n\n // setup handler\n $ch = curl_init($url);\n\n // Set options\n curl_setopt_array($ch,array(\n CURLOPT_HTTPHEADER => $headers,\n CURLOPT_RETURNTRANSFER => 1\n ));\n\n // if there is data, attach it to the request\n if ($data) {\n curl_setopt_array($ch,array(\n CURLOPT_POST => 1,\n CURLOPT_POSTFIELDS => $data,\n ));\n }\n\n // add additional options if sent\n if ($additionalOptions) {\n curl_setopt_array($ch,$additionalOptions);\n }\n\n // execute request\n $response = curl_exec($ch);\n\n // close connection\n curl_close($ch);\n\n // return reponse\n return $response;\n\n }", "title": "" }, { "docid": "1ed11e60c26d885a0ac3f6ffe471d0c1", "score": "0.5824584", "text": "public function exec()\n {\n $exec = @curl_exec($this->_hCurl);\n if ($exec === false) {\n throw new Exception($this->getErrorDescription('curl_setopt'));\n }\n $info = @curl_getinfo($this->_hCurl);\n if (!is_array($info)) {\n throw new Exception($this->getErrorDescription('curl_getinfo'));\n }\n if (!isset($info['http_code'])) {\n throw new Exception('http_code missing in curl info');\n }\n if (is_string($info['http_code']) && is_numeric($info['http_code'])) {\n $info['http_code'] = (int) $info['http_code'];\n }\n if (!is_int($info['http_code'])) {\n throw new Exception('http_code is invalid in curl info');\n }\n $result = array();\n $result['info'] = $info;\n if ($exec !== true) {\n if (!is_string($exec)) {\n throw new Exception('curl_exec returned an unknown variable type: '.gettype($exec));\n }\n if ($this->_headersInResponse) {\n $parts = self::splitHeaders($exec);\n if (preg_match('/^HTTP\\/\\d+(\\.\\d+)* 100 Continue$/', $parts['headers']) && preg_match('/^HTTP\\/\\d+(\\.\\d+)* \\d+ \\w+/', $parts['body'])) {\n $parts = self::splitHeaders($parts['body']);\n }\n $result['headers'] = new ResponseHeaders($parts['headers']);\n $result['body'] = $parts['body'];\n } else {\n $result['body'] = $exec;\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "5032849aa1c8bccc5d12df40543718fc", "score": "0.58173937", "text": "public static function CurlRequest($url)\n\t\t{\n\t\t\t$ch = curl_init($url);\n\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t\tcurl_setopt($ch, CURLOPT_USERPWD, JiraManager::$_curlJiraUserInfo);\n\n\t\t\t// Execute\n\t\t\t$response = curl_exec($ch);\n\n\t\t\tif(curl_errno($ch))\n\t\t\t\techo 'Curl error: ' . curl_error($ch);\n\t\t\t\n\t\t\treturn $response;\n\t\t}", "title": "" }, { "docid": "92d8ed0eceb2709682510ed94cc4bf37", "score": "0.5814606", "text": "function send_curl($url, $method = 'GET', $post_data = false, $username = false, $password = false){ if (!function_exists('curl_init')){\n die('Sorry cURL is not installed!');\n }\n // OK cool - then let's create a new cURL resource handle\n $ch = curl_init();\n // Now set some options (most are optional)\n if($post_data){\n\t //post data string\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);\n\t\t//set HTTP header\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array( \n\t\t 'Content-Type: application/json', \n\t\t 'Content-Length: ' . strlen($post_data)) \n\t\t); \n }\n // Include header in result? (0 = yes, 1 = no)\n curl_setopt($ch, CURLOPT_HEADER, 0);\n // POST or GET?\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);\n // Set URL to download\n curl_setopt($ch, CURLOPT_URL, $url);\n // Set a referer\n curl_setopt($ch, CURLOPT_REFERER, $_SERVER['PHP_SELF']);\n // User agent\n curl_setopt($ch, CURLOPT_USERAGENT, \"MozillaXYZ/1.0\");\n if ($username && $password) {\n\t // Set name and password\n\t curl_setopt($ch, CURLOPT_USERPWD, $username . \":\" . $password);\n\t}\n // Should cURL return or print out the data? (true = return, false = print)\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n // Timeout in seconds\n curl_setopt($ch, CURLOPT_TIMEOUT, 10);\n // Download the given URL, and return output\n $output = curl_exec($ch);\n // Close the cURL resource, and free system resources\n curl_close($ch);\n \n return $output;\n}", "title": "" }, { "docid": "bdeb81e39f599a9661f375a15a0aaacb", "score": "0.5803427", "text": "public function request()\n {\n $this->requestFired = true;\n \n $this->multi_curl_handle = curl_multi_init();\n $this->curl_references = array();\n \n // Instantiate cURL requests\n foreach ($this->urlList as $index => $url) {\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_HEADER, false);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_multi_add_handle($this->multi_curl_handle, $curl);\n $this->curl_references[$index] = $curl;\n }\n }", "title": "" }, { "docid": "9cf4d857068c6afe464a8c6f793b6e2c", "score": "0.57997966", "text": "protected function call($url, $method=\"GET\", $payload=false)\n\t{\n\t\t$conn = $this->ch;\n\t\t$protocol = \"http\";\n\t\t$requestURL = $protocol . \"://\" . $this->host . $url;\n\n\t\tcurl_setopt($conn, CURLOPT_URL, $requestURL);\n\t\tcurl_setopt($conn, CURLOPT_TIMEOUT, $this->timeout);\n\t\tcurl_setopt($conn, CURLOPT_PORT, $this->port);\n\t\tcurl_setopt($conn, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($conn, CURLOPT_CUSTOMREQUEST, strtoupper($method));\n\t\tcurl_setopt($conn, CURLOPT_FORBID_REUSE , 0);\n\n if (is_array($payload) && count($payload) > 0) {\n curl_setopt($conn, CURLOPT_POSTFIELDS, json_encode($payload));\n } else if (is_string($payload)) {\n curl_setopt($conn, CURLOPT_POSTFIELDS, $payload);\n }\n\n\t\t$data = curl_exec($conn);\n\n\t\tif ($data !== false) {\n\t\t\t$data = json_decode($data, true);\n\t\t} else {\n\t\t\t/**\n\t\t\t * cUrl error code reference can be found here:\n\t\t\t * http://curl.haxx.se/libcurl/c/libcurl-errors.html\n\t\t\t */\n\t\t\t$errno = curl_errno($conn);\n\t\t\tswitch ($errno)\n\t\t\t{\n\t\t\t\tcase CURLE_UNSUPPORTED_PROTOCOL:\n\t\t\t\t\t$error = \"Unsupported protocol [$protocol]\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase CURLE_FAILED_INIT:\n\t\t\t\t\t$error = \"Internal cUrl error?\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase CURLE_URL_MALFORMAT:\n\t\t\t\t\t$error = \"Malformed URL [$requestURL] -d \";\n\t\t\t\t\t$error .= json_encode($payload);\n\t\t\t\t\tbreak;\n\t\t\t\tcase CURLE_COULDNT_RESOLVE_PROXY:\n\t\t\t\t\t$error = \"Couldnt resolve proxy\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase CURLE_COULDNT_RESOLVE_HOST:\n\t\t\t\t\t$error = \"Couldnt resolve host\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase CURLE_COULDNT_CONNECT:\n\t\t\t\t\t$error = 'Couldnt connect to host [';\n\t\t\t\t\t$error .= $this->host;\n\t\t\t\t\t$error .= '], ElasticSearch down?';\n\t\t\t\t\tbreak;\n\t\t\t\tcase CURLE_OPERATION_TIMEDOUT:\n\t\t\t\t\t$error = \"Operation timed out on [$requestURL]\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$error = \"Unknown error\";\n\t\t\t\t\tif ($errno == 0) {\n\t\t\t\t\t\t$error .= \". Non-cUrl error\";\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tthrow new ElasticSearchTransportHTTPException(\n\t\t\t\t\t$requestURL,\n\t\t\t\t\t$method,\n\t\t\t\t\t$payload,\n\t\t\t\t\tnull,\n\t\t\t\t\t$this->host,\n\t\t\t\t\t$this->port,\n\t\t\t\t\t$protocol,\n\t\t\t\t\t$error);\n\t\t}\n\n\t\tif (array_key_exists('error', $data)) {\n\t\t\t$this->handleError($url, $method, $payload, $data);\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "0ee5e7637db36cca5544c3d55ec6cc81", "score": "0.57981575", "text": "public function execute()\r\n {\r\n\r\n $master = curl_multi_init();\r\n foreach ($this->multicurlOptions AS $multiOption => $multiValue) {\r\n curl_multi_setopt($master, $multiOption, $multiValue);\r\n }\r\n\r\n // start the first batch of requests\r\n $firstBatch = $this->getNextPendingRequests($this->getSimultaneousLimit());\r\n\r\n // what a silly \"error\"\r\n if (count($firstBatch) == 0) {\r\n return;\r\n }\r\n\r\n foreach ($firstBatch as $request) {\r\n // setup the curl request, queue it up, and put it in the active array\r\n $ch = curl_init();\r\n $options = $this->prepareRequestOptions($request);\r\n curl_setopt_array($ch, $options);\r\n curl_multi_add_handle($master, $ch);\r\n $this->activeRequests[(int) $ch] = $request;\r\n }\r\n\r\n $active = null;\r\n\r\n do {\r\n\r\n // ensure we're running\r\n $status = curl_multi_exec($master, $active);\r\n // see if there is anything to read\r\n while ($transfer = curl_multi_info_read($master)) {\r\n\r\n // get the request object back and put the curl response into it\r\n $key = (int) $transfer['handle'];\r\n $request = $this->activeRequests[$key];\r\n $request->setResponseText(curl_multi_getcontent($transfer['handle']));\r\n $request->setResponseErrno(curl_errno($transfer['handle']));\r\n $request->setResponseError(curl_error($transfer['handle']));\r\n $request->setResponseInfo(curl_getinfo($transfer['handle']));\r\n\r\n // remove the request from the list of active requests\r\n unset($this->activeRequests[$key]);\r\n\r\n // move the request to the completed set\r\n $this->completedRequests[] = $request;\r\n $this->completedRequestCount++;\r\n\r\n // start a new request (it's important to do this before removing the old one)\r\n if ($nextRequest = $this->getNextPendingRequest()) {\r\n // setup the curl request, queue it up, and put it in the active array\r\n $ch = curl_init();\r\n $options = $this->prepareRequestOptions($nextRequest);\r\n curl_setopt_array($ch, $options);\r\n curl_multi_add_handle($master, $ch);\r\n $this->activeRequests[(int) $ch] = $nextRequest;\r\n }\r\n\r\n // remove the curl handle that just completed\r\n curl_multi_remove_handle($master, $transfer['handle']);\r\n\r\n // if there is a callback, run it\r\n if (is_callable($this->callback)) {\r\n $callback = $this->callback;\r\n $callback($request, $this);\r\n }\r\n\r\n // if something was requeued, this will get it running/update our loop check values\r\n $status = curl_multi_exec($master, $active);\r\n\r\n }\r\n\r\n // Error detection -- this is very, very rare\r\n $err = null;\r\n switch ($status) {\r\n case CURLM_BAD_EASY_HANDLE:\r\n $err = 'CURLM_BAD_EASY_HANDLE';\r\n break;\r\n case CURLM_OUT_OF_MEMORY:\r\n $err = 'CURLM_OUT_OF_MEMORY';\r\n break;\r\n case CURLM_INTERNAL_ERROR:\r\n $err = 'CURLM_INTERNAL_ERROR';\r\n break;\r\n case CURLM_BAD_HANDLE:\r\n $err = 'CURLM_BAD_HANDLE';\r\n break;\r\n }\r\n if ($err) {\r\n throw new \\Exception(\"curl_multi_exec failed with error code ($status) const ($err)\");\r\n }\r\n\r\n // Block until *something* has happened to avoid burning CPU cycles for naught\r\n curl_multi_select($master);\r\n\r\n // see if we're done yet or not\r\n } while ($status === CURLM_CALL_MULTI_PERFORM || $active);\r\n\r\n curl_multi_close($master);\r\n\r\n }", "title": "" }, { "docid": "17a5077f2d116356d224d7f9c22f5de9", "score": "0.57940644", "text": "public function execute($url)\n {\n curl_setopt($this->ch, CURLOPT_USERAGENT, $this->userAgent);\n curl_setopt($this->ch, CURLOPT_URL, $url);\n curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->ch,CURLOPT_FOLLOWLOCATION,TRUE);\n curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, 0);\n\n //$cookieFile = dirname(__FILE__).self::COOKIE_PATH;\n //curl_setopt ($this->ch, CURLOPT_COOKIEJAR, $cookieFile);\n //curl_setopt ($this->ch, CURLOPT_COOKIEFILE, $cookieFile);\n\n $response = curl_exec ($this->ch);\n if ($response === FALSE)\n {\n curl_close($this->ch);\n throw new \\Exception(\"Opps, An error has occurred while trying scrape data!\",500);\n }\n return $response;\n }", "title": "" }, { "docid": "a37039e146c42078b94c7f68beb67ddc", "score": "0.57797563", "text": "function Curl($url, $header)\n{\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3);\n\tcurl_setopt($ch, CURLOPT_TIMEOUT, 1);\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $header);\n\t$response = curl_exec($ch);\n\tcurl_close ($ch);\n\treturn $response;\n}", "title": "" }, { "docid": "c97a043ca6a0d3d132a9187fcbd10e8f", "score": "0.5779104", "text": "private static function c($url, $post = array()) {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_USERAGENT, \"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6\");\n curl_setopt($ch, CURLOPT_TIMEOUT, 60);\n if (!empty($post)) {\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post);\n }\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n $result = curl_exec($ch);\n curl_close($ch);\n return $result;\n }", "title": "" }, { "docid": "d43dab113682f1a4e361be34270034a2", "score": "0.57569075", "text": "protected static function curlRequest()\n {\n $result = curl_init();\n\n if(substr(Vuzit_Service::getServiceUrl(), 0, 8) == \"https://\") {\n curl_setopt($result, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($result, CURLOPT_SSL_VERIFYHOST, false);\n }\n curl_setopt($result, CURLOPT_USERAGENT, Vuzit_Service::getUserAgent()); \n // 60 second timeout to prevent timeouts with large requests,\n // a busy server or IIS delays\n curl_setopt($result, CURLOPT_CONNECTTIMEOUT, 60); \n\n return $result;\n }", "title": "" }, { "docid": "1ad8cbdbe7117c461c90d7d436e68d6a", "score": "0.5747164", "text": "public function send() {\n\t\t$this->httpResponse = curl_exec( $this->ch );\n\t}", "title": "" }, { "docid": "732b1c3f5a317ff3bf9295ab670e6150", "score": "0.5744893", "text": "public function sendRequest()\n {\n $this->rawResponse = $this->adventureResCurl->exec();\n }", "title": "" }, { "docid": "acd447044fa222dffd1de1342b7b16ef", "score": "0.5740539", "text": "public function call($url, array $options)\n {\n $session = curl_init();\n\n curl_setopt($session, CURLOPT_URL, $url);\n curl_setopt($session, CURLOPT_RETURNTRANSFER, true);\n if (!empty($options)) {\n curl_setopt_array($session, $options);\n }\n $this->response = curl_exec($session);\n $this->status = curl_getinfo($session, CURLINFO_HTTP_CODE);\n if (curl_errno($session)) {\n $this->error = curl_error($session);\n }\n curl_close($session);\n return $this->response;\n }", "title": "" }, { "docid": "f5e459b64c56f2ee6dc5477a920a031d", "score": "0.57352966", "text": "function curl($url = null, $content= null, $headers = null) {\n $ch = curl_init($url); \n \n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($ch);\n curl_close($ch);\n\n return $response;\n\n }", "title": "" }, { "docid": "a7ea90134139b43f66e8d72eba339441", "score": "0.5735285", "text": "private function curl_call($url){\n\t\t$ch = curl_init(); \n\t\tcurl_setopt($ch, CURLOPT_URL, $url); \n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true); \t\t\t\n\t\t$output = curl_exec($ch);\n\t\t$response = json_decode($output, true);\n\t\treturn $response;\n curl_close($ch); \t\t\t\t\n\t}", "title": "" }, { "docid": "a39d1f37fa9fd2a2629661f02516c748", "score": "0.5722645", "text": "function doCurl($url)\n{\n $curl = curl_init();\n\n curl_setopt_array($curl, array(\n CURLOPT_URL => $url,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => '',\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 0,\n CURLOPT_FOLLOWLOCATION => true,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => 'GET',\n ));\n \n $response = curl_exec($curl);\n \n curl_close($curl);\n return $response;\n}", "title": "" }, { "docid": "93a1186f4d66ea05f1e7888e11e7d270", "score": "0.5707877", "text": "public function execute(): string\n {\n $this->initialiseHandle();\n\n $this->applyOptionsToHandle();\n\n $content = curl_exec($this->handle);\n\n $this->info = $this->getInfoFromHandle();\n $this->errorCode = $this->getErrorCodeFromHandle();\n $this->errorMessage = $this->getErrorMessageFromHandle();\n\n $this->closeHandle();\n\n return $content;\n }", "title": "" }, { "docid": "6637d816c6a65bd67df966b23dcbea4a", "score": "0.57004935", "text": "public function _curl_request($api_url, $data) {\n\t\t$data['api_key'] = $this->api_key;\n\t\t$ch = curl_init();\n\t\t$fields_string = '';\n\t\tforeach($data as $key => $value) {\n\t\t\t$fields_string .= $key .'='.urlencode($value).'&';\n\t\t}\n\t\trtrim($fields_string, '&');\n\t\tcurl_setopt($ch, CURLOPT_URL, $api_url);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n\t\tcurl_setopt($ch, CURLOPT_POST, count($data));\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);\n\t\t$curl = curl_exec($ch);\n\t\treturn $curl;\n\t}", "title": "" }, { "docid": "341331dcfd26a1d9262648b49c0646c4", "score": "0.5691708", "text": "function _curl ($url, $ua = '') {\r\n\r\n\t\t$ch = curl_init();\r\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\r\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\r\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n\t\tcurl_setopt($ch, CURLOPT_USERAGENT, $this->_ua($ua));\r\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\r\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 10);\r\n\t\t$data = curl_exec($ch);\r\n\t\t$this->info = curl_getinfo($ch);\r\n\t\tcurl_close($ch);\r\n\t\treturn $data;\r\n\r\n\t}", "title": "" }, { "docid": "bc6328ffe09d9f58ce650a85fc37ed9b", "score": "0.56868505", "text": "function curl_exec($curlHandle)\n{\n if (SystemFunctions::$curlExecResponse !== '') {\n $response = SystemFunctions::$curlExecResponse;\n } else {\n $response = \\curl_exec($curlHandle);\n }\n return $response;\n}", "title": "" }, { "docid": "52ad95f5a41cb8a937ad067840b761d0", "score": "0.5671345", "text": "private function execute()\n {\n // Max exec time of 1 minute.\n set_time_limit(60);\n // Open cURL request\n $curlSession = curl_init();\n\n // Set the url to post request to\n curl_setopt ($curlSession, CURLOPT_URL, $this->url);\n // cURL params\n curl_setopt ($curlSession, CURLOPT_HEADER, 0);\n curl_setopt ($curlSession, CURLOPT_POST, 1);\n // Pass it the query string we created from $this->data earlier\n curl_setopt ($curlSession, CURLOPT_POSTFIELDS, $this->curl_str);\n // Return the result instead of print\n curl_setopt($curlSession, CURLOPT_RETURNTRANSFER,1); \n // Set a cURL timeout of 30 seconds\n curl_setopt($curlSession, CURLOPT_TIMEOUT,30); \n curl_setopt($curlSession, CURLOPT_SSL_VERIFYPEER, FALSE);\n \n // Send the request and convert the return value to an array\n $response = preg_split('/$\\R?^/m',curl_exec($curlSession));\n \n // Check that it actually reached the SagePay server\n // If it didn't, set the status as FAIL and the error as the cURL error\n if (curl_error($curlSession)){\n $this->status = 'FAIL';\n $this->error = curl_error($curlSession);\n }\n\n // Close the cURL session\n curl_close ($curlSession);\n \n // Turn the response into an associative array\n for ($i=0; $i < count($response); $i++) {\n // Find position of first \"=\" character\n $splitAt = strpos($response[$i], '=');\n // Create an associative array\n $this->response[trim(substr($response[$i], 0, $splitAt))] = trim(substr($response[$i], ($splitAt+1)));\n }\n \n // Return values. Assign stuff based on the return 'Status' value from SagePay\n switch($this->response['Status']) {\n case 'OK':\n // Transactino made succssfully\n $this->status = 'success';\n $_SESSION['transaction']['VPSTxId'] = $this->response['VPSTxId']; // assign the VPSTxId to a session variable for storing if need be\n $_SESSION['transaction']['TxAuthNo'] = $this->response['TxAuthNo']; // assign the TxAuthNo to a session variable for storing if need be\n break;\n case '3DAUTH':\n // Transaction required 3D Secure authentication\n // The request will return two parameters that need to be passed with the 3D Secure\n $this->acsurl = $this->response['ACSURL']; // the url to request for 3D Secure\n $this->pareq = $this->response['PAReq']; // param to pass to 3D Secure\n $this->md = $this->response['MD']; // param to pass to 3D Secure\n $this->status = '3dAuth'; // set $this->status to '3dAuth' so your controller knows how to handle it\n break;\n case 'REJECTED':\n // errors for if the card is declined\n $this->status = 'declined';\n $this->error = 'Your payment was not authorised by your bank or your card details where incorrect.';\n break;\n case 'NOTAUTHED':\n // errors for if their card doesn't authenticate\n $this->status = 'notauthed';\n $this->error = 'Your payment was not authorised by your bank or your card details where incorrect.';\n break;\n case 'INVALID':\n // errors for if the user provides incorrect card data\n $this->status = 'invalid';\n $this->error = 'One or more of your card details where invalid. Please try again.';\n break;\n case 'FAIL':\n // errors for if the transaction fails for any reason\n $this->status = 'fail';\n $this->error = 'An unexpected error has occurred. Please try again.';\n break;\n default:\n // default error if none of the above conditions are met\n $this->status = 'error';\n $this->error = 'An error has occurred. Please try again.';\n break;\n }\n \n // set error sessions if the request failed or was declined to be handled by controller\n if($this->status != 'success') {\n $_SESSION['error']['status'] = $this->status;\n $_SESSION['error']['description'] = $this->error;\n }\n }", "title": "" }, { "docid": "702739b8ff4b325996d676417ac2bcb9", "score": "0.56696963", "text": "private function common_curl_call($url, $param, $header, $method) {\r\n $ch = curl_init();\r\n curl_setopt($ch, CURLOPT_URL, $url);//here we have to give our url\r\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\r\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\r\n if ($param != \"\") {\r\n curl_setopt($ch, CURLOPT_POSTFIELDS, $param);//checking parameters empty or not empty\r\n }\r\n if ($method == \"post\") {\r\n curl_setopt($ch, CURLOPT_POST, true);//if method is post\r\n }\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($ch, CURLOPT_HTTPHEADER, $header);//here setting header\r\n $resultcurl = curl_exec($ch);//from API call , result is getting and storing in this variable\r\n // print_r($resultcurl);\r\n curl_close($ch);//closing curl\r\n return $resultcurl;//returning the data\r\n }", "title": "" }, { "docid": "02ad02722d2819cf8f0cb725fdd6b5fa", "score": "0.566879", "text": "private function initCurl(object|array|string|null $data): void\n {\n $this->ch = curl_init();\n\n if ($this->ch === false) {\n throw new Exceptions\\HTTPException(\"Could not init data channel\");\n }\n\n $this->initCurlHTTPVersion();\n\n $this->initCurlAuthenticationMethod();\n\n $this->initCurlProxy();\n\n $this->initCurlMethod($data);\n\n $headers = [];\n if (count($this->headers) !== 0) {\n foreach ($this->getHeaders() as $header => $value) {\n if (is_null($value)) {\n $headers[] = $header;\n } else {\n $headers[] = $header . ': ' . $value;\n }\n }\n }\n\n if (!$this->ch) {\n return;\n }\n\n curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($this->ch, CURLOPT_TIMEOUT, $this->timeout);\n curl_setopt($this->ch, CURLOPT_PORT, $this->port);\n curl_setopt($this->ch, CURLOPT_USERAGENT, $this->userAgent);\n curl_setopt($this->ch, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($this->ch, CURLOPT_HEADER, 1);\n curl_setopt($this->ch, CURLOPT_ENCODING, \"\");\n\n if ($this->verbose) {\n curl_setopt($this->ch, CURLOPT_VERBOSE, true);\n }\n\n if ($this->skipSSLVerify) {\n /** @noinspection CurlSslServerSpoofingInspection */\n curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, 0);\n /** @noinspection CurlSslServerSpoofingInspection */\n curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, 0);\n }\n }", "title": "" }, { "docid": "a988c92aa4c9c812d0da95884b21433a", "score": "0.5650754", "text": "public static function remoteCall($url, $apikey, $username, $data_hash, $post = true)\n {\n $ch = curl_init();\n\n $curl_options = array(\n CURLOPT_URL => $url,\n CURLOPT_HTTPHEADER => array(\n 'Content-Type: application/json',\n 'Accept: application/json',\n 'x-oy-username: ' . $username,\n 'x-api-key: ' . $apikey,\n ),\n CURLOPT_RETURNTRANSFER => 1\n );\n\n // merging with Config::$curlOptions\n if (count(Config::$curlOptions)) {\n // We need to combine headers manually, because it's array and it will no be merged\n if (Config::$curlOptions[CURLOPT_HTTPHEADER]) {\n $mergedHeders = array_merge($curl_options[CURLOPT_HTTPHEADER], Config::$curlOptions[CURLOPT_HTTPHEADER]);\n $headerOptions = array(CURLOPT_HTTPHEADER => $mergedHeders);\n } else {\n $mergedHeders = array();\n }\n\n $curl_options = array_replace_recursive($curl_options, Config::$curlOptions, $headerOptions);\n }\n\n if ($post) {\n $curl_options[CURLOPT_POST] = 1;\n if ($data_hash) {\n $body = json_encode($data_hash);\n $curl_options[CURLOPT_POSTFIELDS] = $body;\n } else {\n $curl_options[CURLOPT_POSTFIELDS] = '';\n }\n }\n\n if ($data_hash) {\n $body = json_encode($data_hash);\n $curl_options[CURLOPT_POSTFIELDS] = $body;\n }\n\n\n\n curl_setopt_array($ch, $curl_options);\n\n\n $result = curl_exec($ch);\n $info = curl_getinfo($ch);\n // curl_close($ch);\n\n // var_dump($result);\n // die;\n if ($result === false) {\n throw new \\Exception('CURL Error: ' . curl_error($ch), curl_errno($ch));\n } else {\n try {\n $result_array = json_decode($result);\n } catch (\\Exception $e) {\n throw new \\Exception(\"API Request Error unable to json_decode API response: \" . $result . ' | Request url: ' . $url);\n }\n\n if ($info['http_code'] == 403) {\n $data = [\n 'status' => 403,\n 'message' => 'Access Denied Check Username and API Access',\n ];\n echo json_encode($data, true);\n die;\n }\n\n if (!empty($result_array->status->code) && !in_array($result_array->status->code, array(000))) {\n\n $data = [\n \"status\" => $result_array->status->code,\n \"message\" => $result_array->status->message,\n ];\n\n $message = json_encode($data, true);\n echo $message;\n die;\n } else {\n return $result_array;\n }\n }\n }", "title": "" }, { "docid": "de6496009c88c2fc13673c5d523c883a", "score": "0.5643859", "text": "public function DoRequest($url = null)\n {\n if (is_null($url)) {\n $url = $this->full_url;\n }\n\n $this->request_url = $url;\n\n curl_setopt($this->ch, CURLOPT_URL, $url);\n\n // Request method\n curl_setopt($this->ch, CURLOPT_CUSTOMREQUEST, $this->requestMethod);\n\n // Empty body. If not used, cURL will spend ~5s on this request\n if ($this->requestMethod == 'HEAD' || empty($this->body)) {\n curl_setopt($this->ch, CURLOPT_NOBODY, true);\n } else {\n curl_setopt($this->ch, CURLOPT_NOBODY, false);\n }\n\n // Headers\n if (!isset($this->headers['content-type'])) {\n $this->headers['content-type'] = \"Content-type: text/plain\";\n }\n\n // Remove cURL generated 'Expect: 100-continue'\n $this->headers['disable_expect'] = 'Expect:';\n curl_setopt(\n $this->ch,\n CURLOPT_HTTPHEADER,\n array_values($this->headers)\n );\n\n curl_setopt(\n $this->ch,\n CURLOPT_USERPWD,\n $this->user . ':' .\n $this->pass\n );\n\n // Request body\n curl_setopt($this->ch, CURLOPT_POSTFIELDS, $this->body);\n\n // Save Request\n curl_setopt($this->ch, CURLINFO_HEADER_OUT, true);\n\n $response = curl_exec($this->ch);\n\n if (false === $response) {\n // TODO better error handling\n\n log_message(\n 'ERROR',\n 'Error requesting ' . $url . ': '\n . curl_error($this->ch)\n );\n\n return false;\n }\n\n\n $info = curl_getinfo($this->ch);\n\n // Save request\n $this->httpRequest = $info['request_header'];\n\n // Get headers (idea from SabreDAV WebDAV client)\n $this->httpResponseHeaders = substr($response, 0, $info['header_size']);\n $this->httpResponseBody = substr($response, $info['header_size']);\n\n // Get only last headers (needed when using unspecific HTTP auth\n // method or request got redirected)\n $this->httpResponseHeaders = preg_replace(\n '/^.+\\r\\n\\r\\n(.+)/sU',\n '$1',\n $this->httpResponseHeaders\n );\n\n // Parse response\n $this->ParseResponseHeaders($this->httpResponseHeaders);\n $this->ParseResponse($this->httpResponseBody);\n\n //TODO debug\n\n /*\n log_message('INTERNALS', 'REQh: ' . var_export($info['request_header'], TRUE));\n log_message('INTERNALS', 'REQb: ' . var_export($this->body, TRUE));\n log_message('INTERNALS', 'RPLh: ' . var_export($this->httpResponseHeaders, TRUE));\n log_message('INTERNALS', 'RPLb: ' . var_export($this->httpResponseBody, TRUE));\n */\n\n// récommenter pour afficher request/response\n if ($this->dev == true)\n {\n echo'<div>\n <input type=\"button\" value=\"';\n echo $this->requestMethod;\n echo '\" onclick=\n \"if (this.parentNode.getElementsByTagName(\\'div\\')[0].style.display != \\'block\\') {\n this.parentNode.getElementsByTagName(\\'div\\')[0].style.display = \\'block\\';\n } else {\n this.parentNode.getElementsByTagName(\\'div\\')[0].style.display = \\'none\\';\n }\"/>\n <div style=\"display: none;\">';\n echo 'Req : <pre>HEAD:'.$this->httpRequest.'BODY:';\n var_dump($this->body);\n echo '</pre><br/>Resp : <pre>';\n var_dump($response);\n echo '</pre></div></div>';\n }\n\n\n return $response;\n }", "title": "" }, { "docid": "6c78cdb07677d7a3c5d55ea6aa93f726", "score": "0.5642876", "text": "public function bat()\n {\n $headers = Common::get_all_headers();\n $token = isset($headers['Token']) ? $headers['Token'] : '';\n $a = json_decode(htmlspecialchars_decode(request()->post('request_urls')), true);\n foreach ($a as $key => $val) {\n if (!isset($val['data']) || !$val['data']) {\n $val['data'] = 'token=' . $token;\n } else {\n $val['data'] .= '&token=' . $token;\n }\n\n $data[$key] = json_decode(Common::curl($val['url'], $val['data'], $val['type']), true);\n }\n\n return $this->response($data);\n }", "title": "" }, { "docid": "6b80d35e4432e42a535acefcc17d2938", "score": "0.563995", "text": "function Curl($url) {\n\t\t$curl = curl_init();\n\t\tif ($curl===false) {\n\t\t\techo 'Failed to initialise curl';\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tcurl_setopt_array($curl, array(\n\t\t CURLOPT_RETURNTRANSFER => 1,\n\t\t CURLOPT_URL => $url\n\t\t));\n\n\t\t$response = curl_exec($curl);\n\t\tcurl_close($curl);\n\n\t\t//var_dump($response);\n\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "b15929aa13b05efca86cea63dceb0d5b", "score": "0.5639384", "text": "protected function _runCallHttp( ) {\n $this->_cut->call();\n return $this->_cut->getReply();\n }", "title": "" }, { "docid": "977c5986b6bd03023347b8cb6f18f90e", "score": "0.5636305", "text": "public function execute() {\n\t\tGeneralUtility::devLog('Curl HTTP Purge service clearing cache', 'moc_varnish');\n\t\t$active = NULL;\n\n\t\t// Handle differently depending on version of libCURL. Only one of the methods below will actually be called.\n\t\tdo {\n\t\t\t$mrc = curl_multi_exec($this->curlMultiHandle, $active);\n\t\t} while ($mrc == CURLM_CALL_MULTI_PERFORM);\n\n\t\twhile ($active && $mrc == CURLM_OK) {\n\t\t\tif (curl_multi_select($this->curlMultiHandle) !== -1) {\n\t\t\t\tdo {\n\t\t\t\t\t$mrc = curl_multi_exec($this->curlMultiHandle, $active);\n\t\t\t\t} while ($mrc == CURLM_CALL_MULTI_PERFORM);\n\t\t\t}\n\t\t}\n\t\tcurl_multi_close($this->curlMultiHandle);\n\n\t\t\t// Re-init the curlHandle\n\t\t$this->curlMultiHandle = curl_multi_init();\n\t}", "title": "" }, { "docid": "214d09041f5df2ef909f29f859875d7e", "score": "0.5631181", "text": "protected function call($url, $method=\"GET\", $payload=null) {\n $conn = $this->ch;\n $protocol = \"http\";\n $requestURL = $protocol . \"://\" . $this->host . $url;\n curl_setopt($conn, CURLOPT_URL, $requestURL);\n curl_setopt($conn, CURLOPT_TIMEOUT, $this->timeout);\n curl_setopt($conn, CURLOPT_PORT, $this->port);\n curl_setopt($conn, CURLOPT_RETURNTRANSFER, 1) ;\n curl_setopt($conn, CURLOPT_CUSTOMREQUEST, strtoupper($method));\n curl_setopt($conn, CURLOPT_FORBID_REUSE , 0) ;\n\n if (is_array($payload) && count($payload) > 0)\n curl_setopt($conn, CURLOPT_POSTFIELDS, json_encode($payload)) ;\n else\n\t \tcurl_setopt($conn, CURLOPT_POSTFIELDS, $payload);\n\n $response = curl_exec($conn);\n if ($response !== false) {\n $data = json_decode($response, true);\n if (!$data) {\n $data = array('error' => $response, \"code\" => curl_getinfo($conn, CURLINFO_HTTP_CODE));\n }\n }\n else {\n /**\n * cUrl error code reference can be found here:\n * http://curl.haxx.se/libcurl/c/libcurl-errors.html\n */\n $errno = curl_errno($conn);\n switch ($errno)\n {\n case CURLE_UNSUPPORTED_PROTOCOL:\n $error = \"Unsupported protocol [$protocol]\";\n break;\n case CURLE_FAILED_INIT:\n $error = \"Internal cUrl error?\";\n break;\n case CURLE_URL_MALFORMAT:\n $error = \"Malformed URL [$requestURL] -d \" . json_encode($payload);\n break;\n case CURLE_COULDNT_RESOLVE_PROXY:\n $error = \"Couldnt resolve proxy\";\n break;\n case CURLE_COULDNT_RESOLVE_HOST:\n $error = \"Couldnt resolve host\";\n break;\n case CURLE_COULDNT_CONNECT:\n $error = \"Couldnt connect to host [{$this->host}], ElasticSearch down?\";\n break;\n case CURLE_OPERATION_TIMEDOUT:\n $error = \"Operation timed out on [$requestURL]\";\n break;\n default:\n $error = \"Unknown error\";\n if ($errno == 0)\n $error .= \". Non-cUrl error\";\n break;\n }\n $exception = new HTTPException($error);\n $exception->payload = $payload;\n $exception->port = $this->port;\n $exception->protocol = $protocol;\n $exception->host = $this->host;\n $exception->method = $method;\n throw $exception;\n }\n\n return $data;\n }", "title": "" }, { "docid": "c622fa4f1f85facdde94764dc978f1b3", "score": "0.56302154", "text": "public function curlExec( $options = array() )\n {\n if ( ! is_array( $options ) ) {\n require_once 'Morgenshtern/Bot/Exception.php';\n throw new Morgenshtern_Bot_Exception( 'cUrl exec error: 1 parameter must be an array.' );\n }\n if ( null === $this->_handler ) {\n $this->curlInit();\n }\n $defaults = array(\n CURLOPT_HEADER => false,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_FOLLOWLOCATION => false,\n CURLOPT_USERAGENT => self::IE,\n CURLOPT_REFERER => self::REFERER,\n CURLOPT_TIMEOUT => 5\n );\n foreach ( $defaults as $constant => $value ) {\n if ( ! array_key_exists( $constant, $options ) ) {\n $options[ $constant ] = $value;\n }\n }\n curl_setopt_array( $this->_handler, $options );\n\n $page = curl_exec( $this->_handler );\n $page = $this->validate( $page, $options );\n\n $this->curlDestruct();\n\n return $page;\n }", "title": "" }, { "docid": "bdfe4a225b938e2d5e3f3de4efadb7e6", "score": "0.5628043", "text": "private function makeRequest()\n {\n return curl_exec($this->curl);\n }", "title": "" }, { "docid": "b515533ee2a686ee2784c0bedcb31408", "score": "0.5625299", "text": "function doCurlRequest($url)\n{\n\t$curlSession = curl_init($url);\r\n\tcurl_setopt($curlSession, CURLOPT_NOBODY, 1);\r\n\t$curlResponse = curl_exec($curlSession);\r\n\t$ret = curl_getinfo($curlSession);\r\n\tcurl_close($curlSession);\r\n\t\r\n\treturn $ret;\n}", "title": "" }, { "docid": "e56524f2b52c4ba5beadede20bf93364", "score": "0.5624871", "text": "public function executeCurl($rest_domain, $rest_function, $postArgs, $pardotArray) \n {\n $url = $rest_domain.'/api/'.$rest_function.'/?'.$postArgs; \n\n// Initiate the curl session\n $curl = curl_init($url); \n\n// Use an HTTP POST \n curl_setopt($curl, CURLOPT_POST, true); \n\n// We don't want to return the headers, just the response \n curl_setopt($curl, CURLOPT_HEADER, false);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); \n curl_setopt($curl, CURLOPT_POSTFIELDS, $postArgs); \n\n// Make the REST call and close connection\n $response = curl_exec($curl); \n curl_close($curl);\n return $response;\n }", "title": "" }, { "docid": "271617e3e02aed0b0046c87ddf1f8169", "score": "0.56203985", "text": "function curl_request($url, $method, $postdata = null, $data_type = null,\n $auth_header = null) \n{\n $curl_info = null;\n return curl_request_internal($url, $method, $postdata, $data_type,\n $auth_header, false, $curl_info);\n}", "title": "" }, { "docid": "54b474f6b850ed1f25781543760bd623", "score": "0.56161135", "text": "protected function sendRequest($url)\n\t{\n\t\tcurl_setopt($this->curl, CURLOPT_URL, $url);\n\t\tcurl_setopt($this->curl, CURLOPT_CONNECTTIMEOUT, $this->connectionTimeout);\n\t\tcurl_setopt($this->curl, CURLOPT_TIMEOUT, $this->timeout);\n\t\tcurl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($this->curl, CURLOPT_FOLLOWLOCATION, true);\n\n\t\t$rs = curl_exec($this->curl);\n\t\t$curl_error = curl_error($this->curl);\n\t\tcurl_close($this->curl);\n\n\t\tif ($curl_error) {\n\t\t\tthrow new \\Exception($curl_error);\n\t\t}\n\n\t\treturn $rs;\n\t}", "title": "" }, { "docid": "d899e7b2a473210fe536797a80f66abe", "score": "0.5590001", "text": "public function curlRequest($url, $post_data = null) {\n if (is_array($post_data)) {\n $post_data = array_map(array($this, 'sanitize_curl_parameter'), $post_data);\n }\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_TIMEOUT, 15);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $this->verify_ssl);\n if (isset($this->proxy)) {\n curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);\n curl_setopt($ch, CURLOPT_PROXY, $this->proxy);\n }\n if (is_array($post_data)) {\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($post_data));\n }\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json',\n 'Content-Length: ' . strlen(json_encode($post_data)))\n );\n $response = curl_exec($ch);\n\n curl_close($ch);\n return $response;\n }", "title": "" }, { "docid": "79d8fcc72a07f1474fdce00a7dab2ca7", "score": "0.5582845", "text": "public function send(){\n\t\t$logFile = null;\n\t\t$this->_resetOptions();\n\t\tif ( !is_null($this->logFile)){\n $logFile = @fopen( $this->logFile, 'a+' );\n\t\t\tcurl_setopt( $this->curl, CURLOPT_STDERR, $logFile );\n }\n\t\t\n\tif ($this->proxy_server != null){\n\t\tcurl_setopt($this->curl, CURLOPT_PROXY, $this->proxy_server);\n\t\tif ($this->proxy_server_user != null && $this->proxy_server_pass != null){\n\t\t\tcurl_setopt($this->curl, CURLOPT_PROXYUSERPWD, \"{$this->proxy_server_user}:{$this->proxy_server_pass}\");\n\t\t}\n\t} \n\t$content = curl_exec( $this->curl );\n\t\t$error = curl_errno( $this->curl );\n\t\t$this->last_error = curl_strerror($error);\n\t\tif ( $logFile )\n\t\t\tfclose( $logFile );\n\t\treturn (!$error)? $content : false;\n\t}", "title": "" }, { "docid": "295cb2d0e753cfff71123aa827f7a977", "score": "0.5581999", "text": "private function _execCurl()\n {\n $result = curl_exec($this->_curl);\n if (!$result) {\n return false;\n }\n $this->_state = curl_getinfo($this->_curl);\n list($header, $content) = preg_split('/([\\r\\n][\\r\\n])\\\\1/', $result, 2);\n $this->_header = preg_split('/[\\r\\n]+/', $header);;\n $this->_content = $content;\n\n return true;\n }", "title": "" }, { "docid": "7f93931e0dbd92f8e059098085d93466", "score": "0.55777615", "text": "private function _fetchCloudContent($url) {\n\n // is cURL installed yet?\n // if ( ! function_exists('curl_init')){\n // return '<!-- curl library is not installed -->';\n // }\n // create a new cURL resource handle\n $ch = curl_init();\n\n // Set URL to download\n curl_setopt($ch, CURLOPT_URL, $url);\n // Set a referer as coming from the current page url\n curl_setopt($ch, CURLOPT_REFERER, $this->config['page_url']);\n // Include header in result? (0 = yes, 1 = no)\n curl_setopt($ch, CURLOPT_HEADER, 0);\n // Should cURL return or print out the data? (true = return, false = print)\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n // Timeout in seconds\n curl_setopt($ch, CURLOPT_TIMEOUT_MS, $this->config['latency_timeout']);\n // Enable decoding of the response\n curl_setopt($ch, CURLOPT_ENCODING, 'gzip,deflate');\n // Enable following of redirects\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n // set user agent if needed\n if ($this->config['user_agent'] != '') {\n curl_setopt($ch, CURLOPT_USERAGENT, $this->config['user_agent']);\n }\n\n if ($this->config['proxy_host'] != '') {\n curl_setopt($ch, CURLOPT_PROXY, $this->config['proxy_host']);\n curl_setopt($ch, CURLOPT_PROXYPORT, $this->config['proxy_port']);\n }\n\n // make the request to the given URL and then store the response,\n // request info, and error number\n // so we can use them later\n $request = array(\n 'response' => $this->curlExecute($ch),\n 'info' => $this->curlInfo($ch),\n 'error_number' => $this->curlErrorNo($ch),\n 'error_message' => $this->curlError($ch)\n );\n\n // Close the cURL resource, and free system resources\n curl_close($ch);\n\n // see if we got any errors with the connection\n if ($request['error_number'] != 0) {\n $this->_setBuildMessage('Error - ' . $request['error_message']);\n }\n\n // see if we got a status code of something other than 200\n if ($request['info']['http_code'] != 200) {\n $this->_setBuildMessage('HTTP status code of '\n . $request['info']['http_code'] . ' was returned');\n return '';\n }\n\n // if we are here we got a response so let's return it\n $this->response_time = round($request['info']['total_time'] * 1000);\n return $request['response'];\n }", "title": "" }, { "docid": "4a33acde32984e55c4b7a865967ce4d2", "score": "0.5577509", "text": "public function analyze()\n {\n if ($this->parallel) {\n $this->analyzeParallel();\n } else {\n foreach ($this->requests as $request) {\n $handle = $request->getCurlHandle();\n $this->processCurlResult($request, curl_exec($handle));\n }\n }\n $this->close();\n }", "title": "" }, { "docid": "1cdb518c7490224ae0e75269293bd010", "score": "0.5577234", "text": "public function access_curl()\n\t{\n\t\t$type = $this->_type;\n\n\t\tif($type == false)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\tswitch($type) {\n\t\t\t\tcase 'domain':\n\t\t\t\t\treturn $this->_checkDomainCURL();\n\t\t\t\tbreak;\n\t\t\t\tcase 'data':\n\t\t\t\t\treturn $this->_ProcessDataCurl();\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\treturn $this->_ProcessDataCurl();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
c8d738396ff796f14f1339c6b2bdfe9b
/ Register method to process register controller
[ { "docid": "78c76153c3857074af7ba03cde45f103", "score": "0.0", "text": "public function onRegister(Request $request)\n {\n AchieveLogger::info(\"Entering RegisterController.ongRegister()\");\n try{\n $this->validateForm($request);\n // Grab form data\n $username = $request->input('username');\n $password = $request->input('password');\n $email = $request->input('email');\n $firstname = $request->input('firstname');\n $lastname = $request->input('lastname');\n $role = null; \n \n // Create a new User object\n $user = new UserModel($firstname, $lastname, $username, $password, $email); \n // Create a new security service object\n $sc = new UserService();\n // Check to see if the user is registered\n $credentals = new CredentialModel($username, $password, -1, $role);\n \n $registered = $sc->isRegistered($credentals);\n \n\n \n if($registered)\n {\n return view(\"register\")->withErrors(['', 'User already exists!']);\n }\n \n // Pass data into Security service object method.\n $status = $sc->register($user);\n \n //Render a failed or success response view and pass the user Model\n AchieveLogger::info(\"Exiting RegisterController.onRegister()\");\n if($status)\n {\n // return login view on success\n return view('login');\n }\n else\n {\n // return register view on success\n return view('register');\n }\n } catch(ValidationException $e1){\n throw $e1;\n } catch(PDOException $e)\n {\n \n // Log the pdo exception\n AchieveLogger::error(\"Exception: \", array(\"message\" => $e->getMessage()));\n // // Log the database exception\n throw new DatabaseException(($e->getMessage()) . \"Database Exception\" . $e->getMessage(), 0, $e);\n // return false;\n return false;\n}\n }", "title": "" } ]
[ { "docid": "932caa520f9bdee596a5a39be90e7c21", "score": "0.7950883", "text": "public function register(){}", "title": "" }, { "docid": "932caa520f9bdee596a5a39be90e7c21", "score": "0.7950883", "text": "public function register(){}", "title": "" }, { "docid": "aeb50a2c58e9343495170823be8f7ab8", "score": "0.7872938", "text": "public function register() {}", "title": "" }, { "docid": "aeb50a2c58e9343495170823be8f7ab8", "score": "0.7872938", "text": "public function register() {}", "title": "" }, { "docid": "aeb50a2c58e9343495170823be8f7ab8", "score": "0.7872938", "text": "public function register() {}", "title": "" }, { "docid": "aeb50a2c58e9343495170823be8f7ab8", "score": "0.7872938", "text": "public function register() {}", "title": "" }, { "docid": "aeb50a2c58e9343495170823be8f7ab8", "score": "0.7872938", "text": "public function register() {}", "title": "" }, { "docid": "aeb50a2c58e9343495170823be8f7ab8", "score": "0.7872938", "text": "public function register() {}", "title": "" }, { "docid": "60e8b42ae36b54359f49e5fb40f35840", "score": "0.7831793", "text": "private function register(){\n \n require_once FRAMEWORK_PATH . 'controllers/admin_controllers/registrationcontroller.inc';\n require_once( FRAMEWORK_PATH . 'models/controller.inc');\n $controller = new Controller( $this->registry );\n if ($controller->canSave($_POST['controller_name']))\n {\n $rc = new Registrationcontroller( $this->registry,$this->registry->getObject('authenticate')->getUser()->getUserID());\n\t header('Location: search'); \n }else\n {\n $this->registry->getObject('template')->buildFromTemplates(\n \t$this->registry->getSetting($this->registry->getObject('constants')->getConstant('pages_admin_base') ).$this->registry->getObject('constants')->getHeaderTpl(), \n \t$this->registry->getSetting($this->registry->getObject('constants')->getConstant('pages_admin_base') ).'controllers/'.$this->registry->getObject('constants')->getAddTpl(),\n \t$this->registry->getSetting($this->registry->getObject('constants')->getConstant('pages_admin_base') ).$this->registry->getObject('constants')->getFooterTpl()\n \t);\n $this->registry->getObject('template')->getPage()->addTag('error_msg',' ');\t\n\t $this->registry->getObject('template')->getPage()->addTag('error_text','El controlador ya existe');\n\t $this->registry->getObject('template')->getPage()->addTag('controller_name',$_POST['controller_name']);\t\n\t $this->registry->getObject('template')->getPage()->addTag('controller_description',$_POST['controller_description']);\n }\n\t \t\n }", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.77674407", "text": "public function register();", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.77674407", "text": "public function register();", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.77674407", "text": "public function register();", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.77674407", "text": "public function register();", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.77674407", "text": "public function register();", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.77674407", "text": "public function register();", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.77674407", "text": "public function register();", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.77674407", "text": "public function register();", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.77674407", "text": "public function register();", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.77674407", "text": "public function register();", "title": "" }, { "docid": "f3a2bd7bfa867881666a6fb51c3dc160", "score": "0.7726767", "text": "abstract public function register();", "title": "" }, { "docid": "f3a2bd7bfa867881666a6fb51c3dc160", "score": "0.7726767", "text": "abstract public function register();", "title": "" }, { "docid": "f3a2bd7bfa867881666a6fb51c3dc160", "score": "0.7726767", "text": "abstract public function register();", "title": "" }, { "docid": "ad336d9e30e70a2a85cd52351c02e494", "score": "0.7701801", "text": "public function registerControllers();", "title": "" }, { "docid": "5eec260a203b5d565017ee9b518a4690", "score": "0.76735663", "text": "public function register()\n {}", "title": "" }, { "docid": "5eec260a203b5d565017ee9b518a4690", "score": "0.76735663", "text": "public function register()\n {}", "title": "" }, { "docid": "5eec260a203b5d565017ee9b518a4690", "score": "0.76735663", "text": "public function register()\n {}", "title": "" }, { "docid": "930f0783695bb9695b0b53023f6138cc", "score": "0.76546425", "text": "public function register(): void;", "title": "" }, { "docid": "2e8685739c4da0093e2948218e620f54", "score": "0.7627828", "text": "public function register()\n {\n // Void\n }", "title": "" }, { "docid": "0b1dfb52f1ebe16d749a35bc462cfa66", "score": "0.76151115", "text": "public function register(){\n //\n }", "title": "" }, { "docid": "a9d4db8882b4002bed6b4bb942230709", "score": "0.75620353", "text": "abstract protected function register();", "title": "" }, { "docid": "a3eb7268cabb2ef823df4da7799684a2", "score": "0.75512403", "text": "public function register()\n {\n # code ...\n }", "title": "" }, { "docid": "76840ce9e6bf2aaf07b6cf2bdd39bd7b", "score": "0.74959445", "text": "public function register(): void\n {\n //\n }", "title": "" }, { "docid": "76840ce9e6bf2aaf07b6cf2bdd39bd7b", "score": "0.74959445", "text": "public function register(): void\n {\n //\n }", "title": "" }, { "docid": "76840ce9e6bf2aaf07b6cf2bdd39bd7b", "score": "0.74959445", "text": "public function register(): void\n {\n //\n }", "title": "" }, { "docid": "76840ce9e6bf2aaf07b6cf2bdd39bd7b", "score": "0.74959445", "text": "public function register(): void\n {\n //\n }", "title": "" }, { "docid": "76840ce9e6bf2aaf07b6cf2bdd39bd7b", "score": "0.74959445", "text": "public function register(): void\n {\n //\n }", "title": "" }, { "docid": "76840ce9e6bf2aaf07b6cf2bdd39bd7b", "score": "0.74959445", "text": "public function register(): void\n {\n //\n }", "title": "" }, { "docid": "436eb60819450d92db4975c584f652b9", "score": "0.7491376", "text": "public function register() \n {\n //\n }", "title": "" }, { "docid": "965a4de28272e56bd9f1cc779990207d", "score": "0.74831647", "text": "public function register(): void\n {\n }", "title": "" }, { "docid": "965a4de28272e56bd9f1cc779990207d", "score": "0.74831647", "text": "public function register(): void\n {\n }", "title": "" }, { "docid": "9e71c46f386e18494f9e512146294219", "score": "0.7432032", "text": "public function register()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "9e71c46f386e18494f9e512146294219", "score": "0.7432032", "text": "public function register()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "9e71c46f386e18494f9e512146294219", "score": "0.7432032", "text": "public function register()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "9e71c46f386e18494f9e512146294219", "score": "0.7432032", "text": "public function register()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "9e71c46f386e18494f9e512146294219", "score": "0.7432032", "text": "public function register()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "15d80d94ae4ca4cd5a058d9ac638b7bb", "score": "0.7430157", "text": "public function register()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "0570a2675645f4080568941fee13455b", "score": "0.7425594", "text": "public function register()\n\t{\n //\n\t}", "title": "" }, { "docid": "5b1dcf8f4887fffbc65219e124a126a2", "score": "0.74121535", "text": "public function register()\n {\n // ..\n }", "title": "" }, { "docid": "532efdd9425a13219bcea615c64177f6", "score": "0.7408762", "text": "public function register()\n {\n }", "title": "" }, { "docid": "754e55364d728803e72cee2fbc6ee773", "score": "0.7389974", "text": "public function register()\n {\n // Nothing here to register\n }", "title": "" }, { "docid": "e8533b28e27218154e8b5bf9cbc865b5", "score": "0.7369677", "text": "public function registration() {\n }", "title": "" }, { "docid": "69d3f167e184a4c4449b045cd6a3eea6", "score": "0.73582226", "text": "public function register()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "69d3f167e184a4c4449b045cd6a3eea6", "score": "0.73582226", "text": "public function register()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "6b0d71fa47602924a27d72091acc119a", "score": "0.73523974", "text": "function register(){\n\t\t\n\t\n\t}", "title": "" }, { "docid": "deaf1add580a6a821a3346424a1b65a6", "score": "0.7328819", "text": "public function register()\n {\n //..\n }", "title": "" }, { "docid": "b0d2efb6fe71d2d0377f0f9693aa929c", "score": "0.73065025", "text": "public function register()\n {\n // code\n }", "title": "" }, { "docid": "46a30b62f5f3b96b07e391134726491f", "score": "0.7297462", "text": "public function register()\n\t{\n\t //\n\t}", "title": "" }, { "docid": "be40f48d0223fb5f1992efc870871bd9", "score": "0.7284356", "text": "public function register()\n {\n //\n //\n }", "title": "" }, { "docid": "87e25761cb6349adcbf9aa35effea42c", "score": "0.7279214", "text": "public function register() {\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "1324666e3c06ebb019154f10e8f4f1f6", "score": "0.72777176", "text": "public function register()\n\n {\n\n //\n\n }", "title": "" }, { "docid": "a6fa49f7bb43bd901a9605a1a586b16b", "score": "0.7272226", "text": "public function register()\n {\n // ...\n }", "title": "" }, { "docid": "a6fa49f7bb43bd901a9605a1a586b16b", "score": "0.7272226", "text": "public function register()\n {\n // ...\n }", "title": "" }, { "docid": "107c017e0b9397b7cbff21df2c1570c9", "score": "0.7253931", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "b2744784736df0bc817d5a35bb5c2366", "score": "0.72538096", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "e1baa3cdb013cc658e15021b5f63d894", "score": "0.72533166", "text": "public function register()\n\t{\n \n\t}", "title": "" }, { "docid": "ac031da8393f885d8422fa986a3aaef9", "score": "0.7251646", "text": "public function register()\n\t{\n\t}", "title": "" }, { "docid": "ac031da8393f885d8422fa986a3aaef9", "score": "0.7251646", "text": "public function register()\n\t{\n\t}", "title": "" }, { "docid": "ac031da8393f885d8422fa986a3aaef9", "score": "0.7251646", "text": "public function register()\n\t{\n\t}", "title": "" }, { "docid": "ac031da8393f885d8422fa986a3aaef9", "score": "0.7251646", "text": "public function register()\n\t{\n\t}", "title": "" }, { "docid": "c2ae31ff41d3e511bb8b3433e0303536", "score": "0.7250134", "text": "public function register()\r\n {\r\n }", "title": "" }, { "docid": "c2ae31ff41d3e511bb8b3433e0303536", "score": "0.7250134", "text": "public function register()\r\n {\r\n }", "title": "" }, { "docid": "342ed15bb891b6eba0a9393674eaa4c0", "score": "0.7239906", "text": "public function register()\n { }", "title": "" }, { "docid": "342ed15bb891b6eba0a9393674eaa4c0", "score": "0.7239906", "text": "public function register()\n { }", "title": "" }, { "docid": "b43ae77f5a11779a2f6c9641821ba8f1", "score": "0.7237659", "text": "public\n function register()\n {\n \n }", "title": "" }, { "docid": "49cd1d3f6a9c5de207335a7df6c85744", "score": "0.7217447", "text": "public function register()\n {\n \t//\n }", "title": "" }, { "docid": "d2d579f91fe88ae9505882ad381d5ded", "score": "0.7207734", "text": "public static function register(): void\n {\n }", "title": "" }, { "docid": "71dc355ea2fd7efa85a49fe1a7e4927c", "score": "0.7196653", "text": "public function register()\n\t{\n\n\t}", "title": "" }, { "docid": "71dc355ea2fd7efa85a49fe1a7e4927c", "score": "0.7196653", "text": "public function register()\n\t{\n\n\t}", "title": "" }, { "docid": "71dc355ea2fd7efa85a49fe1a7e4927c", "score": "0.7196653", "text": "public function register()\n\t{\n\n\t}", "title": "" }, { "docid": "0ab22e86549bd3740885cccd619e44b4", "score": "0.71941555", "text": "public function registerMe() : void ;", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.71775144", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.71775144", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.71775144", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.71775144", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.71775144", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.71775144", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.71775144", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.71775144", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.71775144", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.71775144", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.71775144", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.71775144", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.71775144", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.71775144", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.71775144", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.71775144", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.71775144", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.71775144", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.71775144", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.71775144", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.71775144", "text": "public function register()\n {\n //\n }", "title": "" } ]
8578d2470349ad1a3bd1c5892a9efdf9
Log a message object with the INFO Level.
[ { "docid": "46db7c4429e92149c5eb24388860a5f1", "score": "0.6391747", "text": "public function info($message, $throwable = null) {\n $this->log->info($message, $throwable);\n }", "title": "" } ]
[ { "docid": "40e4166aace79f665d98465c394f8057", "score": "0.79054236", "text": "public function info($message)\n {\n if ($this->level & self::LEVELS['INFO']) {\n $this->writeLog($message, 'INFO');\n }\n\n }", "title": "" }, { "docid": "af42dcb2f665bfc100b4dfd960a1a561", "score": "0.7846772", "text": "public function info($message)\n {\n $this->log($message, self::INFO);\n }", "title": "" }, { "docid": "47821feaada3d8f9e79ab32e2a3d727e", "score": "0.7721554", "text": "public function info($message){\n $this->log($message, self::INFO);\n }", "title": "" }, { "docid": "924ac2a4fa22e4fdb0b649a13d178b67", "score": "0.76874536", "text": "public function info($oMessage) {\n $this->log(self::INFO, $oMessage);\n }", "title": "" }, { "docid": "c30b5dd282519ed8fd7e6be2a607c7d8", "score": "0.763995", "text": "public function logInfo($message) {\n\n $this->log($message, static::INFO);\n }", "title": "" }, { "docid": "98d2772f645d40b836a025415099ffa2", "score": "0.76362765", "text": "function info($message) {\n if ($this->_loglevel <= LOGGER_INFO);\n $this->_logNotify($message, LOGGER_INFO);\n }", "title": "" }, { "docid": "0911c353a74a674c7b6a79f859e0247d", "score": "0.76107913", "text": "public function info($message) \n\t{\n\t\t$this->logMessage('INFO', $message);\n\t}", "title": "" }, { "docid": "b33e88f24ced673f6c7d3fb2a6c10573", "score": "0.7525776", "text": "public static function info($message = '')\n {\n self::log('info', $message);\n }", "title": "" }, { "docid": "e92f1b0cb962fce1a96d86262a09f917", "score": "0.7411497", "text": "public function logInfo($message)\n {\n $this->writeLog($message, 'info');\n }", "title": "" }, { "docid": "e6c2c8feed62348ee59aaa6121003652", "score": "0.74076253", "text": "public function info($message, array $context = array())\n {\n $this->log(Logger_Level::INFO, $message, $context);\n }", "title": "" }, { "docid": "e473462be0b08be6d3e734f7a8545c78", "score": "0.740529", "text": "protected function logInfo($message)\n {\n if($this->logger) {\n $this->logger->info($message);\n }\n }", "title": "" }, { "docid": "a0313d2dd93315d3c4d62c356860f3cc", "score": "0.7368374", "text": "public static function info($message, $context = []) {\n static::log(Logger::INFO, $message, $context);\n }", "title": "" }, { "docid": "9475a0c789437833f4cc135614428732", "score": "0.7340182", "text": "public static function info($message, $context = null)\n {\n self::log(Logger::INFO, $message, $context);\n }", "title": "" }, { "docid": "ab003af03eaa5b7ae8904e8e33fdf1ff", "score": "0.73371726", "text": "public static function info($message)\n {\n \\RFM\\logger()->info($message);\n }", "title": "" }, { "docid": "250c249ba74e92fd8d064645f8906212", "score": "0.73264873", "text": "public function info($message)\n {\n if ($this->checkCanWriteLog(\"INFO\")) {\n $msg = Ultilities::jsonJapan($message);\n $this->loggers->addInfo(is_array($message) ? $msg : $message);\n }\n }", "title": "" }, { "docid": "a5723dad5f962afd8678a1e5eb2fb019", "score": "0.7313201", "text": "public function info ($message, array $context = [])\n {\n $this->log(LogLevels::INFO, $message, $context);\n }", "title": "" }, { "docid": "b6b4cfd542e0b9dfcdb6dbb3efdc52c3", "score": "0.72657275", "text": "public static function info($message, array $context = [])\n {\n self::log(Level::INFO, $message, $context);\n }", "title": "" }, { "docid": "75547855c092232600dd92610e3141ad", "score": "0.724635", "text": "public static function info(string $message): void {\n self::log('info', $message);\n }", "title": "" }, { "docid": "75ffa69eb6cccf703ee6640885aa77b8", "score": "0.7217175", "text": "public function info($message, array $context = array())\n {\n $this->log(LogLevel::INFO, $message, $context);\n }", "title": "" }, { "docid": "75ffa69eb6cccf703ee6640885aa77b8", "score": "0.7217175", "text": "public function info($message, array $context = array())\n {\n $this->log(LogLevel::INFO, $message, $context);\n }", "title": "" }, { "docid": "da298dc12616994b7122bb97af27f445", "score": "0.7192488", "text": "public function info($message, array $context = [])\n\t{\n\t\t$this->log(LogLevel::INFO, $message, $context);\n\t}", "title": "" }, { "docid": "0e67fd309272005265ccfc6a9249d028", "score": "0.7120323", "text": "public function logInfo($message)\n {\n \\log::add(\"mystrom\", \"info\", $message);\n }", "title": "" }, { "docid": "827f53a7307eff4ca88a8ca2de72b36e", "score": "0.7100239", "text": "public static function info($message, array $context = array())\n {\n if (empty(self::$logger)) {\n return;\n }\n self::$logger->info($message, $context);\n }", "title": "" }, { "docid": "3cfc9cf1c73ec9f654c51ca69d18c87b", "score": "0.7096531", "text": "public static function info($msg) {\n self::log(self::INFO, $msg);\n }", "title": "" }, { "docid": "7444160b459ad448e665a797d5c39f24", "score": "0.7061604", "text": "public function info($message)\n {\n return $this->log($message, 'info');\n }", "title": "" }, { "docid": "46123293187a135461cfbd6d8b28a34e", "score": "0.7056744", "text": "public function info($message, array $context = array())\r\n {\r\n $this->log(\"info\", $message, $context);\r\n }", "title": "" }, { "docid": "93a0e3d297314c77b5bf230c35e8be7f", "score": "0.7029802", "text": "public function info ($message = '') {\n\n\t\t$this->out(\"\\033[0;36mINFO\\033[0;37m:\\t\" . $message);\n\n\t\t$this->log('info', $message);\n\n\t}", "title": "" }, { "docid": "dd9b0e80cc6a94ff2e8e643e3a50c134", "score": "0.702236", "text": "public function info($message, array $data = [])\n {\n $this->logger->info($message, $data);\n }", "title": "" }, { "docid": "2ceff30f985ebbd8a3e39b2d96d50ff8", "score": "0.69717586", "text": "public function info($message, array $context = [])\n {\n $this->write('INFO', $this->interpolate($message, $context));\n }", "title": "" }, { "docid": "a4f750611049f3c4d997991631a9488c", "score": "0.69199544", "text": "public function info($message, array $context = array())\n {\n return $this->log(self::INFO, $message, $context);\n }", "title": "" }, { "docid": "2c0a4d564034820c7cddc951034e7bf7", "score": "0.69027823", "text": "public static function info(string $msg)\n {\n self::log(array(\"type\" => self::LOG_INFO, \"msg\" => $msg));\n }", "title": "" }, { "docid": "6e23fc649c41bedaaf0b5b2d2e468481", "score": "0.68906057", "text": "public function LogInfo($Message) {\n\n $this->Log($Message, static::INFO);\n }", "title": "" }, { "docid": "2b8a85eccc3335affe49fb4c7fff8448", "score": "0.687979", "text": "public function info($message, array $context = [])\n {\n $this->writeLog(__FUNCTION__, $message, $context);\n }", "title": "" }, { "docid": "f34ab8ae814c427542464c54b54bb027", "score": "0.6875948", "text": "public function info($message, array $context = array())\n {\n $this->log($message, $context);\n }", "title": "" }, { "docid": "ba51b078cbd96566e80a412272f5eb1c", "score": "0.6875132", "text": "public function info($message, array $context = [])\r\n {\r\n $this->writeLog(__FUNCTION__, $message, $context);\r\n }", "title": "" }, { "docid": "27ac8196771495a7447e07344774a0d1", "score": "0.68599373", "text": "public function info($message, $caller = null) {\n\t\t$this->log(LoggerLevel::getLevelInfo(), $message, $caller);\n\t}", "title": "" }, { "docid": "d1463beb955891be40caefe1b3c95997", "score": "0.6765945", "text": "public static function info($message, $category = 'app')\n {\n self::getLogger()->log($message, Logger::LEVEL_INFO, $category);\n }", "title": "" }, { "docid": "721dd28dc5672b98f9ddcbe2e9461d4c", "score": "0.67587805", "text": "public function info($message);", "title": "" }, { "docid": "a32abd1ae2d739cea3a9910ed2a53c1a", "score": "0.6713595", "text": "public static function info($message, array $context = [], $exception = null) : void\n {\n static::log(LogLevel::INFO, $message, $context, $exception);\n }", "title": "" }, { "docid": "bbf808d16b6c696c70d743112815a984", "score": "0.66926104", "text": "public static function i($message)\n\t\t{\n\t\t\tself::logMessage($message, self::INFO);\n\t\t}", "title": "" }, { "docid": "841ee8ce72ce352374de92e85f8cafea", "score": "0.6681887", "text": "public function info($msg = '') {\r\n\t\t\treturn $this->log($msg, LOGGER_INFO);\r\n\t\t}", "title": "" }, { "docid": "66133356f1ebcdf6c5004d4a13471cac", "score": "0.6669338", "text": "public function info($msg, $category = null)\n {\n $this->log($msg, self::INFO, $category);\n }", "title": "" }, { "docid": "b6c3e255d4da5ba39abf5f75e09eee33", "score": "0.66178834", "text": "public function info($message){ }", "title": "" }, { "docid": "fba9d86b92c09b35c95d9511a0829f7c", "score": "0.66169447", "text": "public static function info($message, $methodName = '', $lineNumber = '')\n {\n self::assignMethodInfo($methodName, $lineNumber);\n self::$_loggerInstance->log($message, Zend_Log::INFO);\n }", "title": "" }, { "docid": "1600265f52525fd3d931a76f14a3b12e", "score": "0.66161025", "text": "public function info( $message = null ) {\n\t\t\t$this->add_message( $message, 'info' );\n\t\t}", "title": "" }, { "docid": "db1713930047db04c91c2d2b578387e7", "score": "0.6595094", "text": "public function testLogInfoMessage()\n {\n $message = 'Test info message';\n\n Logger::logInfo($message);\n\n $this->assertEquals($message, $this->logger1->message);\n $this->assertEquals('Info', $this->logger1->level);\n }", "title": "" }, { "docid": "6f7903c320442802062cd03571989d2f", "score": "0.6594384", "text": "public static function info($msg) {\n if (func_num_args() > 1) {\n $args = func_get_args();\n $msg = array_shift($args);\n $msg = vsprintf($msg, $args);\n }\n\n return self::log($msg, self::LEVEL_INFO);\n }", "title": "" }, { "docid": "5f0732b16daf06e30fbebb713d7fd80d", "score": "0.6547691", "text": "public static function addInfo($message)\n {\n if (self::$_enableLogging) {\n self::getInstance()->addInfo($message);\n }\n }", "title": "" }, { "docid": "1c4b9222e651be13a911f76c1f873bfc", "score": "0.65265155", "text": "public static function info($message) {\n $replacements = func_get_args();\n array_shift($replacements);\n\n if (!empty($replacements)) {\n RemoteServerLogger::writeLogMessage(Logger::INFO, vsprintf($message, $replacements));\n }\n else {\n RemoteServerLogger::writeLogMessage(Logger::INFO, $message);\n }\n }", "title": "" }, { "docid": "81e8cd3fa8308bd9d566d72c5b99b86e", "score": "0.6511977", "text": "public function addInfo(string $message): void\n {\n $this->addMessage($message, self::INFO);\n }", "title": "" }, { "docid": "99b7ed4bc618c0f2210d43b81b5e7eda", "score": "0.6479694", "text": "public final function info($message, array $context = [])\n {\n }", "title": "" }, { "docid": "3d3795e180f170a62065fcbeee22f08b", "score": "0.64707917", "text": "public function info($message, array $context = array(), $traceShift = 0)\n {\n $this->log(LogLevel::INFO, $message, $context, $traceShift);\n }", "title": "" }, { "docid": "cd5b299f3589928ace5dd62e8fc756d4", "score": "0.64642197", "text": "public function info($message = null, $force = false)\n {\n return craft()->logger_log->createLog($message, 'info', $force);\n }", "title": "" }, { "docid": "85bc85ab41bf0718f136efe2b8e822ef", "score": "0.64386916", "text": "public static function info(string $message, array $context = []): void\n {\n self::fmt($message, $context, 'info');\n }", "title": "" }, { "docid": "47532f05da875ad2271b80f5486c8af5", "score": "0.6415682", "text": "public function info( $message, $indentation = 0 ) {\n\t\t$this->logger->info( $this->indent_text( $message, $indentation ) );\n\t}", "title": "" }, { "docid": "4ec3c9e7eb8c09c1d298add58ee3c94d", "score": "0.6407475", "text": "public static function info($msg, $filename = null) {\n\n\t\tif(self::$level >= self::LEVEL_INFO) {\n\n\t\t\tself::log($msg, 'INFO', $filename);\n\t\t}\n\t}", "title": "" }, { "docid": "4d0fa54e6f0e572cbad9640ad0e370d3", "score": "0.63851315", "text": "function logInfo($message) \n{\n logMessage(\"INFO\", $message);\n}", "title": "" }, { "docid": "47231451237710069337e2ab6cb7fde9", "score": "0.6375052", "text": "static public function Info($msg, $logging = 1) {\r\n if ($logging <= $GLOBALS[\"LOGGING\"]) {\r\n @fwrite($GLOBALS[\"LOG_FILE_HANDLE\"], \"{$msg}\\n\");\r\n }\r\n }", "title": "" }, { "docid": "b5482768b1f5800757898b7c626a3b32", "score": "0.6371566", "text": "public function info($message, array $context = []): void\n {\n $message = $this->interpolate($message, $context);\n $message = $this->addTags('info', $message);\n $this->io->out($message, $context);\n }", "title": "" }, { "docid": "eb83354ebe250450d167d4869856df0b", "score": "0.6342726", "text": "public function info($message, array $context = array());", "title": "" }, { "docid": "cf4d3086853de7ad3a51a9173ca9de20", "score": "0.62940127", "text": "public function info($sMessage, array $aContext = array(), array $aExtra = array())\n {\n return $this->writeEntry(self::LEVEL_INFO, $sMessage, $aContext, $aExtra);\n }", "title": "" }, { "docid": "67ec739e50df0cf0156b93a5def3684a", "score": "0.6289826", "text": "public function info($channel, $message, array $context = [])\n {\n return $this->log($channel, Logger::INFO, $message, $context);\n }", "title": "" }, { "docid": "dd4b6cceefb0346c596a1dfdb2e102b8", "score": "0.6287319", "text": "static function info( $message, $label = NULL )\n {\n if ( !self::isEnabled() ) return;\n\n if ( empty( $label ) ) $label = self::getCallingFunctionName();\n \\FirePHP::getInstance( AUTO_INIT )->info( $message, $label );\n }", "title": "" }, { "docid": "93151150d2a6627b14335f00757e43c4", "score": "0.62849724", "text": "public static function info($message, array $context = array()){\r\n return static::getLeveled()->info($message, $context);\r\n }", "title": "" }, { "docid": "36aa073390642ba6e401281893494c26", "score": "0.6282412", "text": "protected function info($message)\n {\n $this->output->writeln(\"<info>{$message}</info>\");\n }", "title": "" }, { "docid": "4e9c3488f1240fb077b3fff427f6b9cc", "score": "0.62788963", "text": "public function info($message, $extraData = null)\n {\n $this->addRecord(self::INFO, $message, $extraData);\n }", "title": "" }, { "docid": "9d71f5e8c857e284695d3274b18681f8", "score": "0.62752175", "text": "public function info( $message )\n\t\t{\n\t\t\t$this->data[ 'highlight' ] = trans('alert.info.highlight');\n\t\t\t$this->data[ 'message' ] = $message;\n\t\t\t$this->data[ 'type' ] = 'info';\n\t\t\t$this->data[ 'icon' ] = 'info';\n\n\t\t\t$this->fire();\n\t\t}", "title": "" }, { "docid": "a0eb26133e59959b4b43dbdc4eff428b", "score": "0.6258192", "text": "public function info($message, array $context = []): bool\n {\n return $this->log('info', $message, $context);\n }", "title": "" }, { "docid": "0f36e796442bfc7b6645f3a3d3d83e9a", "score": "0.6251271", "text": "public function info($message, array $context = []);", "title": "" }, { "docid": "0f36e796442bfc7b6645f3a3d3d83e9a", "score": "0.6251271", "text": "public function info($message, array $context = []);", "title": "" }, { "docid": "da589ca0f0ec02308f21ed46f8f0c721", "score": "0.62451327", "text": "protected function info($message)\n\t{\n\t\t$this->notify($message);\n\t}", "title": "" }, { "docid": "b40f2b08961132876c7d43ac713e1e59", "score": "0.6223114", "text": "public function logInfo($text)\n {\n $this->saveToLogFile(Logger::getPrefix(\"info\") . $text);\n }", "title": "" }, { "docid": "058ae09f7314e4badec2d26cfea756b1", "score": "0.6215279", "text": "function info($message, $context = [])\n {\n app('log')->info($message, $context);\n }", "title": "" }, { "docid": "6d059c1db2d906c5a58ed91b91bb8214", "score": "0.620114", "text": "public function info($message = '', $newlines = 1, $level = ConsoleIo::NORMAL) {\n\t\t$messages = (array)$message;\n\t\tforeach ($messages as $key => $message) {\n\t\t\t$messages[$key] = '<info>' . $message . '</info>';\n\t\t}\n\n\t\treturn $this->out($messages, $newlines, $level);\n\t}", "title": "" }, { "docid": "e5a200b04a4d05c12c9c0dc3e9ad238a", "score": "0.6200198", "text": "public function info($message, $context=null){ }", "title": "" }, { "docid": "11191d62df2cd19961709c183f7e0618", "score": "0.6186824", "text": "function info($message, $context = [])\n {\n return app('log')->info($message, $context);\n }", "title": "" }, { "docid": "d58c69c68cc9e2d5858586c1a3b2f8bd", "score": "0.6184848", "text": "public function info($message = null)\n {\n return $this->message($message, 'info');\n }", "title": "" }, { "docid": "0982a831ff3df0a56848b89001026550", "score": "0.6179685", "text": "public function info(string $message, array $context = []);", "title": "" }, { "docid": "711ea767f47d5d02bb651483c8ad7529", "score": "0.61618197", "text": "public static function info($name, $message)\n {\n return self::setup($name)->info($message);\n }", "title": "" }, { "docid": "8060fc9816103e742433202f4550fc9c", "score": "0.61362916", "text": "public function info($message = NULL, array $variables = array())\n {\n return $this->add(self::INFO, $message);\n }", "title": "" }, { "docid": "b454d0ca3cbfc0feb309feb513d77c64", "score": "0.6133739", "text": "public function info($message, $options = [])\n {\n $this->add($message, array_merge($options, ['status' => 'info']));\n }", "title": "" }, { "docid": "c10a22bd0403f593ae9fffb442c3537a", "score": "0.61319214", "text": "public function info(string|\\Stringable $message, array $context = []):void {\n\n }", "title": "" }, { "docid": "7273749e7ab6a5b4b801dfa23d5eae60", "score": "0.6107426", "text": "public function writeInfo(string $message): void {\n $this->writeln(\n sprintf(\" <info>%s</info>\", $message)\n );\n }", "title": "" }, { "docid": "0bd1f6f8c3d7c1d3dd59eb5afd055964", "score": "0.6086691", "text": "public static function log_info($entry, $second_entry = null, $override_logging_option = false) { self::add_log($entry, $second_entry, 'INFO', $override_logging_option); }", "title": "" }, { "docid": "bbc74517c33ef05658a63d3179be48ed", "score": "0.6000427", "text": "public function info($msg) {\n $str = getmypid() . \" \" . $msg . \"\\n\";\n \n if($this->lconfig['method'] == 'file') {\n $str = date('d M Y h:i:s') . \": \" . $str;\n error_log($str, 3, $this->lconfig['logfile']);\n } elseif($this->lconfig['method'] == 'syslog') {\n openlog('ormatch', LOG_PID, LOG_DAEMON);\n syslog(LOG_INFO, $str);\n closelog();\n } else {\n throw new InvalidArgumentException(\"Unknown logging method: \" . $this->lconfig['method']);\n }\n }", "title": "" }, { "docid": "243c81d0878963e287da044747265264", "score": "0.5988866", "text": "public function info($data)\n\t{\n\t\t$this->_log($data);\n\t}", "title": "" }, { "docid": "82078014b28aae543ea0d38bed458f45", "score": "0.593172", "text": "public static function info($message, array $context = [])\n {\n return self::getInstance()->{__FUNCTION__}($message, $context);\n }", "title": "" }, { "docid": "4e1c3067ebab62c601aa2a0bb501a66d", "score": "0.59286016", "text": "public function info($message = null)\n {\n $this->output->outln(\"<<green>>\" . lang($message) . \"<<reset>>\");\n }", "title": "" }, { "docid": "0527d4b78e7f0d7a87fa16990fbac79a", "score": "0.59099436", "text": "public function addInfoMessage($message)\n {\n $this->session->getFlashBag()->add\n (\n 'info',\n [\n 'message' => $message\n ]\n );\n }", "title": "" }, { "docid": "a4481347c478e0425748dcce8c33e9dd", "score": "0.590576", "text": "public function info($text, $depth = 1, array $context = array()) {\n\t\treturn $this->log(self::LEVEL_INFO, $text, $depth + 1, $context);\n\t}", "title": "" }, { "docid": "131811020684e3f0427f79202030e046", "score": "0.59021586", "text": "function logging($message, $severity = SeverityLevel::INFORMATIONAL, $module = null, $info = null)\n{\n\tif (!is_string($info) && is_array($info)){\n\t\t$json = new Services_JSON;\n\t\t$info = $json->encode($info);\n\t} \n IzLogger::getInstance()->log($message, $severity, $module, $info);\n}", "title": "" }, { "docid": "5b58694d5a04e5eaf188763b27c6aebd", "score": "0.59013563", "text": "public function log($message)\n {\n $this->logInfo($message);\n }", "title": "" }, { "docid": "5f1b347f2034e1c3fbef8106b10489f0", "score": "0.5874137", "text": "public static function info($message, $title = '') {\n\t\tself::alert($message, $title, self::TYPE_INFO);\n\t}", "title": "" }, { "docid": "b4d68735765180cf2fbce39f0ecfd6b8", "score": "0.5845798", "text": "public function info($message)\n {\n $this->test()->info($message);\n\n return $this;\n }", "title": "" }, { "docid": "f649031b5446794a3c2cbab5f32c1397", "score": "0.584289", "text": "function logInfo($messagio){\n writeOnFile(\"INFO\", $messagio);\n}", "title": "" }, { "docid": "83db672bc2a73b30166d5370e3f82248", "score": "0.57899666", "text": "public static function info(string $name, string $message, array $args = []): void\n {\n // The default type is already 'info'.\n self::add($name, $message, $args);\n }", "title": "" }, { "docid": "af84d08c7c2974f1258290dc26e9bd15", "score": "0.5785486", "text": "public static function Notice($message) {\n\t\t$this->Info($message);\n\t}", "title": "" }, { "docid": "e8499ea6f1e88e4b9e76faca618700e6", "score": "0.57761705", "text": "public function info($content) {\n if ($this->level > self::INFO) {\n return;\n }\n $string = $this->formatOutput('INFO: ' . $content);\n $this->writeLog($string);\n }", "title": "" }, { "docid": "b2e39876273a23b36d327bebb3596c25", "score": "0.5772766", "text": "function info($message) {\n global $info;\n if ($info) {\n print 'Info: ' . $message . \"\\n\";\n }\n}", "title": "" }, { "docid": "fd5ceaa51e9742d971c348f7ec95c5f5", "score": "0.5772606", "text": "protected function infoNow($message)\n {\n $now = TimeUtil::now()->toDateTimeString();\n $this->info(\"{$now}: {$message}\");\n }", "title": "" } ]
167636704f2d73dbf87022c57dd92930
$queue = new Module_Queue(); $receivers = array( '13812345678' ); $content = 'This is sms content'; $queue>pushSMS($receivers, $content);
[ { "docid": "ee166a5659189322209d6118fed5f9dc", "score": "0.0", "text": "public function pushMail($receivers, $subject, $content)\r\n {\r\n $data = compact('receivers', 'subject', 'content');\r\n $validator = $this->pushMailValidator();\r\n if (!$validator->check($data)) {\r\n Netap_Logger::info(__METHOD__ . ':邮件队列格式不正确。RawData:' . json_encode($data) . ';errors:' . json_encode($validator->errors()));\r\n\r\n return false;\r\n }\r\n\r\n $key = Helper_Arr::path($this->options, 'queue_keys.mail');\r\n\r\n $value = array(\r\n 'mail_recv' => $receivers,\r\n 'subject' => $subject,\r\n 'content' => $content\r\n );\r\n\r\n try {\r\n return (bool)$this->pushQueue($key, json_encode($value));\r\n } catch (Exception $e) {\r\n Netap_Logger::info(__METHOD__ . ':邮件队列插入失败。RawData:' . json_encode($data) . ';errors:' . $e->getMessage());\r\n\r\n return false;\r\n }\r\n }", "title": "" } ]
[ { "docid": "c04fe42637d4ea8f2b65260fdd95d8a7", "score": "0.7118554", "text": "function schedulesms() {\n \t\t\n \t\tConfigure::write('debug', 0);\n \t\t\n \t\t$this->send(true, $_REQUEST['message'], $_REQUEST['mobile'], $_REQUEST['skey'], $_REQUEST['senderid'], \n \t\t\t\t\t\t\t$_REQUEST['group'], $_REQUEST['tag'], $_REQUEST['date'], $_REQUEST['response']);\n \t\t\n \t}", "title": "" }, { "docid": "3bfd1ac27f22e3b3e40730d53f46c416", "score": "0.6979303", "text": "function taqnyatSms($msgBody , $reciver)\n{\n $setting = \\App\\Setting::find(1);\n $bearer = $setting->bearer_token;\n $sender = $setting->sender_name;\n $taqnyt = new TaqnyatSms($bearer);\n\n $body = $msgBody;\n $recipients = $reciver;\n $message =$taqnyt->sendMsg($body, $recipients, $sender);\n// print $message;\n}", "title": "" }, { "docid": "3b704a724d1bf8d721e27007c0e9a9fd", "score": "0.68843526", "text": "public function sms()\n {\n require_once '/path/to/vendor/autoload.php'; // Loads the library\n\n use Twilio\\Rest\\Client;\n\n $account_sid = 'AC4ddb34f50fdca1d740d28b1a5d77dee0';\n $auth_token = '9c9ab3a3005fd7641683265b682bde80';\n $client = new Client($account_sid, $auth_token);\n\n $messages = $client->accounts(\"AC4ddb34f50fdca1d740d28b1a5d77dee0\")\n ->messages->create(\"+59165343087\", array(\n 'From' => \"+17378885804\",\n 'Body' => \"Hey there alex ;)\",\n ));\n }", "title": "" }, { "docid": "d87c94939fa61166f67261080a7cae6b", "score": "0.681777", "text": "function easysms_sendsms($smsmessage,$to=null) {\n\t\n\t $mySMS = new EasySMS('balexiou', '92527');\n\t //get the account balance\n\t echo 'BALANCE:' . $mySMS->getbalance();\n\t //get the delivery reports\n\t echo 'REPORT:' . $mySMS->getDeliveryReports();\n\t //send sms\n\t $ret = $mySMS->sendSMS($to,\t\t //the target mobile number\n\t\t\t\t\t\t $smsmessage,\t\t\t//the message\n\t\t\t\t\t\t true, \t \t\t //request delivery report\n\t\t\t\t\t\t false,\t\t\t\t//not as flash sms\n\t\t\t\t\t\t $this->sender\t\t//set the originator\n\t\t\t\t\t );\n\t\t\t\t\t\t \n\t echo 'SMS:' . $ret;\t\t\t\t\t \n\t \n\t return $ret;\n\t}", "title": "" }, { "docid": "da709dd786e5126df21c5acc887f53f7", "score": "0.6790484", "text": "function send_sms()\n\t{\n\t\t$config['functions']['send_sms'] = array('function' => 'Xmlrpc.rpc_send_sms');\n\t\t$this->xmlrpcs->initialize($config);\n\t\t$this->xmlrpcs->serve();\n\t}", "title": "" }, { "docid": "62ad45014f5544f845741cd95256dda6", "score": "0.6750422", "text": "function smsSending($mobile, $sign, $args = array(), $templateId = 'SMS_585014') {\n $smssettings = unserialize(variable_get('smssettings'));\n $c = new TopClient;\n $c->format = 'json';\n $c->appkey = $smssettings['appkey'];//$appkey;\n $c->secretKey = $smssettings['secret'];//$secret;\n $req = new AlibabaAliqinFcSmsNumSendRequest;\n $req->setExtend(\"\");\n $req->setSmsType(\"normal\");\n $req->setSmsFreeSignName($sign);\n $param = json_encode($args);\n $req->setSmsParam($param);\n $req->setRecNum($mobile);\n $req->setSmsTemplateCode($templateId);//\n $resp = $c->execute($req);\n return $resp;\n}", "title": "" }, { "docid": "af77c92ff135a34af6f7b21437ad4d05", "score": "0.6640053", "text": "public function run($sms,$title)\n { \n\n }", "title": "" }, { "docid": "0abaa2dfd77aa6051a3255ce0268f650", "score": "0.66206384", "text": "function smsmediafailed(){\n $getsender=rawurlencode(\"256703744226\");\n $getsms=rawurlencode(\"No sms recieved, check usesmsmedia.php\");\n\n \n $url='http://lambda.smsmedia.ug/api/capi/send.php?sender='.$getsender.'&dest=8198&user=alimulondo&pass=alimulondo&code=alimulondo&content='.$getsms.''; \n\n $ch = curl_init();\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_URL, $url);\n $content = curl_exec($ch);\n exec(GET);\n \n }", "title": "" }, { "docid": "cd5c27596d90ffa018dcec3877639815", "score": "0.65771794", "text": "function sendSMS($client, $number, $message) {\r\n $client->messages->create(\r\n $number,\r\n array(\r\n \"from\" => \"+16474901643\",\r\n \"body\" => \"Reminder: \".$message\r\n )\r\n );\r\n}", "title": "" }, { "docid": "832f071c6fd24cb33c0a299bac508d45", "score": "0.65252566", "text": "function _sms($alarm)\n {\n }", "title": "" }, { "docid": "f9f443ce8bcf7400a2d3940aedbaa5bf", "score": "0.6490623", "text": "function send($schedulesms=false, $message=false, $number=false, $secret_key=false, $senderid=false, $group=false, $tag=false, $date=false, $response_format=false) {\n \t\t\n \t\tset_time_limit(0);\n \t\tini_set('memory_limit', '256M');\n \t\t\n \t\t$message = !$message ? isset($_REQUEST['message']) ? $_REQUEST['message'] : '' : $message;\n \t\t$message = urldecode(trim($message));\n \t\t\n \t\t/*\tCorrect Encoding\t*/\n \t\t$message = iconv('UTF-8', 'ASCII//TRANSLIT', $message);\n \t\t\n \t\t$number = !$number ? isset($_REQUEST['mobile']) ? $_REQUEST['mobile'] : '' : $number;\n \t\t$number = filter_var(urldecode(trim($number)), FILTER_SANITIZE_STRING);\n \t\t\n \t\t$secret_key = !$secret_key ? isset($_REQUEST['skey']) ? $_REQUEST['skey'] : '' : $secret_key;\n \t\t$secret_key = filter_var(urldecode(trim($secret_key)), FILTER_SANITIZE_STRING);\n\t\t \t\t\n \t\t$senderid = !$senderid ? isset($_REQUEST['senderid']) ? $_REQUEST['senderid'] : '' : $senderid;\n \t\t$senderid = filter_var(urldecode(trim($senderid)), FILTER_SANITIZE_STRING);\n \t\t\n \t\t$group = !$group ? isset($_REQUEST['group']) ? $_REQUEST['group'] : '' : $group;\n \t\t$group = filter_var(urldecode(trim($group)), FILTER_SANITIZE_STRING);\n \t\t\n \t\t$tag = !$tag ? isset($_REQUEST['tag']) ? $_REQUEST['tag'] : '' : $tag;\n \t\t$tag = filter_var(urldecode(trim($tag)), FILTER_SANITIZE_STRING);\n \t\t\n \t\t$date = !$date ? isset($_REQUEST['date']) ? $_REQUEST['date'] : '' : $date;\n \t\t$date = filter_var(urldecode(trim($date)), FILTER_SANITIZE_STRING);\n \t\t\n \t\t$response_format = !$response_format ? isset($_REQUEST['response']) ? $_REQUEST['response'] : '' : $response_format;\n \t\t$response_format = filter_var(urldecode(trim($response_format)), FILTER_SANITIZE_STRING);\n \t\t\n \t\tif(BULK_SMS_SERVER_DOWN) {\n\t\t\t$this->_throwError('<error><message>'.UNAVAILABLE_MESSAGE.'</message></error>', $response_format);\n \t\t}\n\n\t\tif(!$schedulesms && NINE_TO_NINE_ACTIVATED) {\n \t\t\t$this->_throwError('<error><message>'.NINE_TO_NINE_ACTIVATED_MESSAGE.'</message></error>', $response_format);\n \t\t}\n\t\t\n \t\t$error = false;\n \t\t$output = '';\n \t\t\n \t\t// User ID\n \t\t$rs = $this->checkBulkSecretKey($secret_key);\n\t \t$user_id = $rs['user_id'];\n\t \t$validity = $rs['validity'];\n\t \t\n \t\tif(!$user_id) {\n \t\t\t$this->_throwError('<error><message>Invalid Secret Key</message></error>', $response_format);\n \t\t}\n \t\t\n \t\tunset($cond);\n\t \t$cond['conditions']['BulkAccount.status'] = '0';\n\t \t$cond['conditions']['BulkAccount.bulk_user_id'] = $user_id;\n\t \t$quantity = $this->BulkAccount->field('BulkAccount.quantity', $cond['conditions']);\n\t \t\n \t\tif(!$this->checkBulkValidity($validity) || $quantity == '0') {\n \t\t\t$this->_throwError('<error><message>'.BULK_ACCOUNT_EXPIRED.'</message></error>', $response_format);\n \t\t}\n\t\t \t\t\n \t\t$n = $bulk_group_id = 0;\n \t\tif(empty($number) && empty($group)) {\n \t\t\t$output .= '<error><message>Please provide mobile numbers or a group name</message></error>';\n \t\t\t$error = true;\n\t\t\n \t\t} else {\n \t\t\t\n \t\t\tif(!empty($number)) {\n \t\t\t\t$n = explode(',', $number);\n \t\t\t\tarray_walk($n, 'AppController::sanitize');\n \t\t\t\t$n = array_filter($n);\n \t\t\t\t\n \t\t\t\tforeach($n as $k => $v) {\n \t\t\t\t\tif(!$this->checkNumber($v)) $inv_num[] = $v;\n \t\t\t\t\t$new_n[] = $v;\n \t\t\t\t}\n\t\t\t\t\n \t\t\t\t$n = $new_n;\n \t\t\t\tif(isset($inv_num)) {\n \t\t\t\t\t$output .= '<error><message>Invalid Mobile Number(s)</message><number>'.implode('</number><number>', $inv_num).'</number></error>';\n \t\t\t\t\t$error = true;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t/*\tLimit API call\t*/\n\t\t \t\tif(count($n) > NUMBER_LIMIT_IN_API) $n = array_slice($n, 0, NUMBER_LIMIT_IN_API);\n \t\t\t\t\n \t\t\t\tif(count($n) > 0 && $group == 'GROUP_NAME') {\n \t\t\t\t\t$group = '';\n \t\t\t\t}\n \t\t\t\t\n \t\t\t} \n \t\t\t\n \t\t\t// Group\n \t\t\tif($user_id && !empty($group)) {\n \t\t\t\t$bulk_group_id = $this->checkBulkGroupName($group, $user_id);\n \t\t\t\tif(!$bulk_group_id) {\n \t\t\t\t\t$output .= '<error><message>Please provide a valid group</message></error>';\n \t\t\t\t\t$error = true;\n \t\t\t\t} else {\n \t\t\t\t\t// get mobile numbers\n \t\t\t\t\t$mc['conditions']['BulkAddressbook.bulk_group_id'] = $bulk_group_id;\n \t\t\t\t\t$mc['conditions']['BulkAddressbook.status'] = '0';\n \t\t\t\t\t$mc['fields'] = array('BulkAddressbook.mobile');\n \t\t\t\t\t$mobile_list = $this->BulkAddressbook->find('list', $mc);\n \t\t\t\t\t\n \t\t\t\t\tunset($new_n);\n \t\t\t\t\tforeach($mobile_list as $k => $v) {\n \t\t\t\t\t\t$new_n[] = $v; \n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\tif(!$schedulesms) $n = !empty($n) ? array_merge($n, $new_n) : $new_n;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t\n \t\t// Tag\n\t \tif(!empty($tag) && $tag != 'TAG_NAME') {\n \t\t\t$bulk_tag_id = $this->checkBulkTagName($tag, $user_id);\n \t\t\tif($user_id && !$bulk_tag_id) {\n \t\t\t\t$output .= '<error><message>Please provide a valid tag</message></error>';\n \t\t\t\t$error = true;\n \t\t\t}\n\n\t \t} else {\n\t \t\t$tag_general = $this->BulkSmsTag->find('all', array('conditions'=>array('bulk_user_id'=>$user_id, 'status'=>'0'), 'limit' =>'1'));\n\t \t\t$bulk_tag_id = $tag_general['0']['BulkSmsTag']['id'];\n\t \t\t//$output .= '<error><message>Please provide a valid tag</message></error>';\n \t\t\t//$error = true;\n\t \t}\n\n \t\t// Sender ID (optional)\n \t\tif(!empty($senderid) && $senderid != 'YOUR_SENDERID') {\n \t\t\t$bulk_senderid_id = $this->checkBulkSenderidName($senderid, $user_id);\n \t\t\tif($user_id && !$bulk_senderid_id) {\n \t\t\t\t$output .= '<error><message>Please provide a valid Sender ID</message></error>';\n \t\t\t\t$error = true;\n \t\t\t}\n\n \t\t} else {\n \t\t\t$senderid = BULK_SMS_SENDER_ID;\n \t\t\t$bulk_senderid_id = 0;\n \t\t}\n\n \t\t//message\n \t\tif(strlen($message) > 0) { \n \t\t\tif(strlen($message) > MAX_CHARS) \n \t\t\t\t$message = substr($message, 0, MAX_CHARS);\n \t\t\t\t\n \t\t} else {\n \t\t\t$output .= '<error><message>Please provide a message</message></error>';\n \t\t\t$error = true;\n \t\t}\n \t\t\n \t\t\n \t\t//schedule date\n \t\tif($schedulesms) {\n\t \t\tif(!empty($date) && $date != 'FUTURE_DATE') {\n\t \t\t\t$date = explode('_', $date);\n\t \t\t\tlist($year, $month, $day) = explode('-', $date['0']);\n\t \t\t\tlist($hours, $minutes) = explode(':', $date['1']);\n\t \t\t\t\n\t \t\t\tif(!in_array($minutes, array('00', '15', '30', '45'))) {\n\t \t\t\t\t$output .= '<error><message>Please provide minutes as multiple of 15. Eg: 00, 15, 30, 45, and Date should be of the format (Year-Month-Day_Hour:Minute)</message></error>';\n\t \t\t\t\t$error = true;\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\t$date = date('Y-m-d H:i:s', mktime($hours, $minutes, '0', $month, $day, $year));\n\t \t\t\tif($date < date('Y-m-d H:i:s')) {\n\t \t\t\t\t$output .= '<error><message>Please provide a future date</message></error>';\n\t \t\t\t\t$error = true;\n\t \t\t\t}\n\n\t\t\t\tif(!($hours > '08' && $hours < '21')) {\n\t\t \t\t\t$this->_throwError('<error><message>'.NINE_TO_NINE_ACTIVATED_MESSAGE.'</message></error>', $response_format);\n\t\t \t\t}\n\n\t \t\t} else {\n\t \t\t\t$output .= '<error><message>Please provide date</message></error>';\n\t \t\t\t$error = true;\n\t \t\t}\n \t\t}\n \t\t//echo date('Y-m-d H:i:s', mktime($hours, $minutes, '0', $month, $day, $year)); exit;\n \t\t//pr($error);exit;\n \t\t\n \t\t// Save\n \t\tif(!$error) {\n \t\t\t\n \t\t\t//get sms vendor details\n \t\t\t$this->getBulkSmsVendor($user_id);\n \t\t\t//pr($this->sms_vendor_details);\n\t\t \t\t\t\n \t\t\tunset($v);\n\t \t\t$v['message'] = $message;\n\t\t \t$v['bulk_user_id'] = $user_id;\n\t\t \t$v['sms_count'] = $this->sms_count($message);\n\t\t \t$v['numbers'] = !empty($n) ? implode(', ', $n) : '0';\n\t\t \t$v['bulk_senderid_id'] = $bulk_senderid_id;\n\t\t \t$v['bulk_group_id'] = $bulk_group_id;\n\t\t \t$v['bulk_tag_id'] = $bulk_tag_id;\n\t\t \t$v['ip'] = ip2long($_SERVER['REMOTE_ADDR']);\n\t\t\t \t\n \t\t\t//schedule sms\n \t\t\tif($schedulesms) {\n \t\t\t\t$udate = date('jS M, Y g:i a', strtotime($date));\n \t\t\t\t\n \t\t\t\t$v['not_included'] = '0';\n \t\t\t\t$v['scheduledate'] = $date;\n \t\t\t\t$this->BulkSmsSchedule->save($v);\n \t\t\t\t\n \t\t\t\t$this->_throwError('<success><message>Message Successfully Scheduled on '.$udate.'</message></success>', $response_format);\n \t\t\t\t\n \t\t\t} else {\n\t\t \t\t\n \t\t\t\t$v['sms_vendor_id'] = $this->sms_vendor_id;\n\t\t\t \t$this->BulkSmsLog->save($v);\n\t\t\t \t\n\t\t\t \t//SEND SMS\n\t\t\t \t$response_data = $this->_sendBulkMessage($bulk_group_id, $bulk_senderid_id, $message, $this->BulkSmsLog->getLastInsertId(), $user_id, $n, true, $this->sms_vendor_id);\n\t\t \t\t$response_output = array();\n\t\t\t \tforeach($response_data as $value) $response_output = array_merge($response_output, $value); \n\t\t\t \t\n\t\t\t \tif(!empty($group)) {\n\t\t \t\t\t$group = '<group>'. $group . ' Group</group>';\n\t\t \t\t}\n\t\t \t\t\n\t\t \t\tif(!empty($n)) {\n\t\t \t\t\t$number = '<contacts>'.implode('</contacts><contacts>', $response_output).'</contacts>';\n\t\t \t\t}\n\t\t \t\t\n\t\t \t\t$this->_throwError('<success><message>Message Sent Successfully</message>'.$group.$number.'</success>', $response_format);\n \t\t\t}\n \t\t\t\n \t\t} else {\n\n \t\t\t$this->_throwError($output, $response_format);\n \t\t\t\n \t\t}\n \t\t\n \t\texit;\n \t\t\n \t}", "title": "" }, { "docid": "4122942dc8b5af04b3309b5d712ba68e", "score": "0.6461634", "text": "public function actionSms() {\n// $model->sendSms(13760671419, 112,ApiMember::SMS_TYPE_ONLINE_ORDER,0,ApiMember::SKU_SEND_SMS);\n }", "title": "" }, { "docid": "a465249a2154b45a7808cd7d92b9899c", "score": "0.6417311", "text": "public function sms($phone,$message)\n\t{\n\t\t// max of 160 characters\n\t\t// to get a unique name make payment of 8700 to Africastalking/SMSLeopard\n\t\t// unique name should have a maximum of 11 characters\n\t\t\n\t\tif (substr($phone, 0, 1) === '0') \n\t\t{\n\t\t\t$phone = ltrim($phone, '0');\n\t\t}\n\t\t\n\t\t$phone_number = '+254'.$phone;\n\t\t//$phone_number = $phone;\n\t\t// get items \n\n\t\t$configuration = $this->admin_model->get_configuration();\n\n\t\t$mandrill = '';\n\t\t$configuration_id = 0;\n\t\t\n\t\tif($configuration->num_rows() > 0)\n\t\t{\n\t\t\t$res = $configuration->row();\n\t\t\t$configuration_id = $res->configuration_id;\n\t\t\t$mandrill = $res->mandrill;\n\t\t\t$sms_key = $res->sms_key;\n\t\t\t$sms_user = $res->sms_user;\n\n\t\t\t$actual_message = $message;\n\t\t\t// var_dump($actual_message); die();\n\t\t\t// get the current branch code\n\t\t\t$params = array('username' => $sms_user, 'apiKey' => $sms_key); \n\t\n\t\t\t$this->load->library('africastalkinggateway', $params);\n\t\t\t// var_dump($params)or die();\n\t\t\t// Send the message\n\t\t\ttry \n\t\t\t{\n\t\t\t\t//$results = $this->africastalkinggateway->sendMessage($phone_number, $actual_message, $sms_from=22384);\n\t\t\t\t$results = $this->africastalkinggateway->sendMessage($phone_number, $actual_message);\n\t\t\t\t\n\t\t\t\t//var_dump($results);die();\n\t\t\t\t$number = $phone_number;\n\t\t\t\t$status = 'unsent';\n\t\t\t\t\n\t\t\t\tforeach($results as $result) \n\t\t\t\t{\n\t\t\t\t\t$number = $result->number;\n\t\t\t\t\t$status = $result->status;\n\t\t\t\t\t$messageId = $result->messageId;\n\t\t\t\t\t$cost = $result->cost;\n\t\t\t\t\t// status is either \"Success\" or \"error message\"\n\t\t\t\t\t// echo \" Number: \" .$result->number;\n\t\t\t\t\t// echo \" Status: \" .$result->status;\n\t\t\t\t\t// echo \" MessageId: \" .$result->messageId;\n\t\t\t\t\t// echo \" Cost: \" .$result->cost.\"\\n\";\n\t\t\t\t}\n\t\t\t\t$save_data = array(\n\t\t\t\t\t\"sms_result_message\" => $actual_message,\n\t\t\t\t\t\"sms_result_phone\" => $phone_number,\n\t\t\t\t\t\"message_id\" => $messageId,\n\t\t\t\t\t\"sms_result_cost\" => $cost,\n\t\t\t\t\t\"created\" => date('Y-m-d H:i:s')\n\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\tif($this->db->insert('sms_result', $save_data))\n\t\t\t\t{\n\t\t\t\t\treturn $status.' sent to '.$number;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn $status.' sent to '.$number.'. Response not saved';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tcatch(AfricasTalkingGatewayException $e)\n\t\t\t{\n\t\t\t\t// echo \"Encountered an error while sending: \".$e->getMessage();\n\t\t\t\treturn $e->getMessage();\n\t\t\t}\n\t \n\t\t}\n\t else\n\t {\n\t return 'Configuration not set';\n\t }\n }", "title": "" }, { "docid": "608c9ba77b7fa94744977268289ea1e7", "score": "0.6400037", "text": "function send_sms($fromNumber){\n global $platform, $RECIPIENT;\n try {\n $requestBody = array(\n 'from' => array ('phoneNumber' => $fromNumber),\n 'to' => array( array('phoneNumber' => $RECIPIENT) ),\n // To send group messaging, add more (max 10 recipients) 'phoneNumber' object. E.g.\n /*\n 'to' => array(\n array('phoneNumber' => $RECIPIENT),\n array('phoneNumber' => 'Recipient-Phone-Number')\n ),\n */\n 'text' => 'Hello World!'\n );\n $endpoint = \"/account/~/extension/~/sms\";\n $resp = $platform->post($endpoint, $requestBody);\n $jsonObj = $resp->json();\n print(\"SMS sent. Message id: \" . $jsonObj->id . PHP_EOL);\n check_message_status($jsonObj->id);\n } catch (\\RingCentral\\SDK\\Http\\ApiException $e) {\n exit(\"Error message: \" . $e->message . PHP_EOL);\n }\n}", "title": "" }, { "docid": "c5f647f7b26e6ef07597658081ce0adf", "score": "0.6363828", "text": "public function sms(){\n//\t$this->coreApp();\n}", "title": "" }, { "docid": "4b9d939bbad948edca00d9c33bfa265e", "score": "0.6316463", "text": "public function Queues();", "title": "" }, { "docid": "02c503cfd1c7626e57210c98518ede20", "score": "0.6315374", "text": "public function _DO_push()\n {\n// $res = $this->tim->group_send_group_msg('admin', 'L5900888378d29-T', 'hello');\n// $res = servTIM::sole(null)->systemMessage('L591a745be656f-T', 'hint', '老师暂时离开');\n $res = servTIM::sole(null)->systemMessage('L598bfa8b8da85-D', 'hint', '老师暂时离开');\n print_r($res);\n// $res = servTIM::sole(null)->systemMessage('L598bfa8b8da85-T', 'hint', '老师暂时离开');\n// print_r($res);\n }", "title": "" }, { "docid": "00534ac1534dbd0c05fbb80224cc64fc", "score": "0.6306719", "text": "public function actionSingle() {\n// $conn = $amqp->Connection();\n// $channel = $amqp->Channel($conn);\n// $amqp->Exchange($conn, $channel);\n// $amqp->Queue($channel);\n }", "title": "" }, { "docid": "21ee42afcec2658389e2ff4347eb8a8b", "score": "0.62886745", "text": "function send_message ($message)\t\t\t\t\n\t{\n\t\t$con = new Stomp('tcp://'.ACTIVEMQ_SERVER.':61613');\n\t\t$con->connect();\n\t\t$con->send(\"/queue/s3backup\", $message);\n\t\n\t}", "title": "" }, { "docid": "92257e5edc7fcbeef906a98eab8a3df9", "score": "0.62668234", "text": "public function index()\n {\n// $sms= $AT->sms();\n// $sms->send([\n// 'to' => '0704522671',\n// 'message' => 'It worked'\n//\n// ]);\n\n $smsJob = (new SendSmsJob())->delay(Carbon::now()->addSeconds(3));\n dispatch($smsJob);\n\n echo 'message sent';\n\n }", "title": "" }, { "docid": "f9126a1c555c6941474b02a311504bdf", "score": "0.62584394", "text": "public function SendSms($smsInfo=array()){ \n\n \t$smsTO=$smsInfo['Sms']['to'];\n\n $smsMSG=$smsInfo['Sms']['msg'];\n\n $smsta='pv'; \n \n $outputformat = 'json'; \n\n $smsstr='&ta='.urlencode($smsta).'&to='.urlencode($smsTO).'&msg='.urlencode($smsMSG).'&from=E-TICKETING&format='.urlencode($outputformat); \n\n $resArray=$this->sms_call(\"SendSms\",$smsstr); \n return $resArray; \n \t}", "title": "" }, { "docid": "609d2abf9ff4edade70484f11ccb511d", "score": "0.6216418", "text": "function sen_sms($to,$text)///ส่ง sms\n{ //create client with api key and secret\n $rest = substr($to, 1);\n $client = new Nexmo\\Client(new Nexmo\\Client\\Credentials\\Basic('c21feb7d', 'yrxEwwXERXj8yv7L'));\n $message = $client->message()->send([\n 'to' => '66'.$rest,\n 'from' => 'RFLpang',\n 'text' => $text,\n 'type' => 'unicode'\n ]);\n //array access provides response data\n //echo \"Sent message to \" . $message['to'] . \". Balance is now \" . $message['remaining-balance'] . PHP_EOL;\n\n return \"Sent message to \" . $message['to'] . \". Balance is now \" . $message['remaining-balance'] . PHP_EOL;\n}", "title": "" }, { "docid": "0428087c2982e5cca02b0424f4a54442", "score": "0.6203913", "text": "function send($mobile, $message);", "title": "" }, { "docid": "26b919bc876da1b62fc8cbdcb0b77c27", "score": "0.6158842", "text": "function send_sms($phone, $msg,$acct) {\n $message = urlencode($msg);\n $user=\"borngreat\";\n $password=\"3635\";\n\n \n$sender2=\"+2348084733894\";\n\n$url2 = \"https://netbulksms.com/index.php?option=com_spc&comm=spc_api&username=borngreat&password=3635&sender=IBNK&recipient=$sender2&message=$message\";\n\t//get request\n $response2 = @fopen ($url2, \"rb\");\nif (!$response2) {\n echo \"Error: \" . $http_response_header[0];\n}\n\n $sender3=\"+2348034311177\";\n$url2 = \"https://netbulksms.com/index.php?option=com_spc&comm=spc_api&username=borngreat&password=3635&sender=IBNK&recipient=$sender3&message=$message\";\n\t//get request\n $response2 = @fopen ($url2, \"rb\");\nif (!$response2) {\n echo \"Error: \" . $http_response_header[0];\n}\n\n $sender4=\"+2348033954892\";\n$url2 = \"https://netbulksms.com/index.php?option=com_spc&comm=spc_api&username=borngreat&password=3635&sender=IBNK&recipient=$sender4&message=$message\";\n\t//get request\n $response2 = @fopen ($url2, \"rb\");\nif (!$response2) {\n echo \"Error: \" . $http_response_header[0];\n}\n}", "title": "" }, { "docid": "b45f9fd19d177905101dbaf78e7e1d26", "score": "0.61579543", "text": "function send_sms($phoneNo=\"\",$messageText)\r\n\t{\r\n\t\t\t \r\n\t\t\t//Your authentication key\r\n\t\t\t$authKey = \"37734AfiN59oTS557ae3d9\";\r\n\t\t\t \r\n\t\t\t//Multiple mobiles numbers separated by comma\r\n\t\t\t$mobileNumber = $phoneNo;\r\n\t\t\t \r\n\t\t\t//Sender ID,While using route4 sender id should be 6 characters long.\r\n\t\t\t$senderId = \"EOKLER\";\r\n\t\t\t \r\n\t\t\t//Your message to send, Add URL encoding here.\r\n\t\t\t$message = urlencode($messageText);\r\n\t\t\t \r\n\t\t\t//Define route\r\n\t\t\t$route = \"2\";\r\n\t\t\t//Prepare you post parameters\r\n\t\t\t$postData = array(\r\n\t\t\t\t\t'authkey' => $authKey,\r\n\t\t\t\t\t'mobiles' => $mobileNumber,\r\n\t\t\t\t\t'message' => $message,\r\n\t\t\t\t\t'sender' => $senderId,\r\n\t\t\t\t\t'route' => $route\r\n\t\t\t);\r\n\t\t\t \r\n\t\t\t//API URL\r\n\t\t\t$url=\"https://control.msg91.com/sendhttp.php\";\r\n\t\t\t \r\n\t\t\t// init the resource\r\n\t\t\t$ch = curl_init();\r\n\t\t\tcurl_setopt_array($ch, array(\r\n\t\t\tCURLOPT_URL => $url,\r\n\t\t\tCURLOPT_RETURNTRANSFER => true,\r\n\t\t\tCURLOPT_POST => true,\r\n\t\t\tCURLOPT_POSTFIELDS => $postData\r\n\t\t\t//,CURLOPT_FOLLOWLOCATION => true\r\n\t\t\t));\r\n\t\t\t \r\n\t\t\t//Ignore SSL certificate verification\r\n\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\r\n\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\r\n\t\t\t//get response\r\n\t\t\t$output = curl_exec($ch);\r\n\t\t\t \r\n\t\t\t//Print error if any\r\n\t\t\tif(curl_errno($ch))\r\n\t\t\t{\r\n\t\t\t\techo 'error:' . curl_error($ch);\r\n\t\t\t}\r\n\t\t\t \r\n\t\t\tcurl_close($ch);\r\n\t\t\treturn $output;\r\n\t\t}", "title": "" }, { "docid": "6d97180cc125528faf264970b1c4d1a7", "score": "0.6146887", "text": "function send_sms($message,$to,$from=null){\n if($from && strlen($from)>11){\n $from = substr($from,0,11);\n }\n $url = $this->api_base_url.\"/messages?app_id=\".$this->app_id.\"&app_secret=\".base64_encode($this->app_secret);\n $data['to'] = $to; \n $data['from']= $from;\n $data['message'] = $message;\n\n $this->result = $this->send_request($url, \"POST\", [],$data, true);\n return ($this->result->success && $this->result->message==\"MESSAGE SENT.\");\n }", "title": "" }, { "docid": "f7f8d94c4136c98c92d1c251440bf74f", "score": "0.6123983", "text": "function send_sms($to, $message) {\n\n\tLOG_MSG('INFO',\"send_sms(): START to=[$to]\");\n\n\t// Retrieve SMS Gateway Details\n\t$smsgateway_resp=db_lib_smsgateway_select();\n\tif ( $smsgateway_resp[0]['STATUS'] != 'OK' ) {\n\t\tLOG_MSG('ERROR',\"send_sms(): Error loading sms gateway\");\n\t}\n\n\t// Send SMS only if Gateway is found\n\tif ( $smsgateway_resp[0]['NROWS'] == 1 ) {\n\t\t$plain_message=$message;\n\t\t$smsgateway_id=$smsgateway_resp[0]['smsgateway_id'];\n\n\t\t$status='FAILED';\n\t\t$username=$smsgateway_resp[0]['username'];\n\t\t$password=$smsgateway_resp[0]['password'];\n\t\t$api_key=$smsgateway_resp[0]['api_key'];\n\t\t$default_sender_id=$smsgateway_resp[0]['default_sender_id'];\n\t\t$to=urlencode($to);\n\t\t$message=urlencode($message);\n\t\t$gateway_url=$smsgateway_resp[0]['gateway_url'];\n\n\t\t// Generate the URL base on the provider\n\t\tif ( $smsgateway_resp[0]['name'] == 'SolutionsInfini' ) {\n\t\t\t// http://alerts.sinfini.com/api/web2sms.php?workingkey=##API_KEY##&sender=##DEFAULT_SENDER_ID##&to=##MOBILE_TO##&message=##MESSAGE##\n\t\t\t$search=array('##API_KEY##', '##DEFAULT_SENDER_ID##', '##MOBILE_TO##', '##MESSAGE##');\n\t\t\t$replace=array($api_key, $default_sender_id, $to, $message);\n\t\t\t$url=str_replace($search,$replace,$gateway_url);\n\t\t} elseif ( $smsgateway_resp[0]['name'] == 'SMSGupshup' ) {\n\t\t\t// http://enterprise.smsgupshup.com/GatewayAPI/rest?method=SendMessage&send_to=##MOBILE_TO##&msg=##MESSAGE##&msg_type=TEXT&userid=##USERNAME##&auth_scheme=plain&password=##PASSWORD##&v=1.1&format=text\t\n\t\t\t$search=array('##USERNAME##', '##PASSWORD##', '##MOBILE_TO##', '##MESSAGE##');\n\t\t\t$replace=array($username, $password, $to, $message);\n\t\t\t$url=str_replace($search,$replace,$gateway_url);\n\t\t}\n\n\t\t// Send SMS\n\t\t$ch=curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t$response=curl_exec($ch);\n\t\tcurl_close($ch); \n\t\tif ( strpos($response,'GID') ) $status='SUCCESS';\n\t\tLOG_MSG('INFO',\"send_sms(): $response\");\n\n\t\t// Add SMS Sent Details\n\t\t$smssent_resp=db_smssent_insert(\n\t\t\t\t\t\t\t$smsgateway_id,\n\t\t\t\t\t\t\t$default_sender_id,\n\t\t\t\t\t\t\t$to,\n\t\t\t\t\t\t\t$plain_message,\n\t\t\t\t\t\t\t$url,\n\t\t\t\t\t\t\t$response,\n\t\t\t\t\t\t\t$status);\n\t\tif ( $smssent_resp['STATUS'] != 'OK' ) {\n\t\t\tLOG_MSG('ERROR',\"send_sms(): Error while inserting in SMSSent talble from=[$from] to=[$to]\");\n\t\t}\n\t}\n\n\tLOG_MSG('INFO',\"send_sms(): END\");\n\treturn true;\n}", "title": "" }, { "docid": "e5796071e011766924881c155c0b8038", "score": "0.6116125", "text": "function isms_component_send_sms($args, &$outargs)\n{\n\n $number = grab_array_var($args, \"number\");\n $message = grab_array_var($args, \"message\");\n\n // bail if empty number or message\n if ($number == \"\" || $message == \"\")\n return 1;\n\n // load settings\n $settings_raw = get_option(\"isms_component_options\");\n if ($settings_raw == \"\")\n $settings = array();\n else\n $settings = unserialize($settings_raw);\n\n $address = grab_array_var($settings, \"address\");\n $http_port = grab_array_var($settings, \"http_port\");\n $username = grab_array_var($settings, \"username\");\n $password = grab_array_var($settings, \"password\");\n\n // bail out if we don't have the required info\n if ($address == \"\" || $http_port == \"\" || $username == \"\" || $password == \"\")\n return 1;\n\n // construct the URL for the send API\n $url = \"http://\" . $address . \":\" . $http_port . \"/sendmsg?user=\" . $username . \"&passwd=\" . $password . \"&cat=1&to=\\\"\" . urlencode($number) . \"\\\"&text=\" . rawurlencode($message);\n\n // send the request\n $urloutput = load_url($url, array('method' => 'get', 'return_info' => false));\n\n // check output for indication of success\n $res = strpos($urloutput, \"ID:\");\n if ($res === FALSE)\n return 1;\n\n $outargs = array();\n $outargs[\"url\"] = $url;\n $outargs[\"result\"] = $urloutput;\n\n return 0;\n}", "title": "" }, { "docid": "1f7091b369084ebaa64544690b8abd7e", "score": "0.6088619", "text": "public function gw_send_sms($user,$pass,$sms_from,$sms_to,$sms_msg) \n { \n $query_string = \"api.aspx?apiusername=\".$user.\"&apipassword=\".$pass;\n $query_string .= \"&senderid=\".rawurlencode($sms_from).\"&mobileno=\".rawurlencode($sms_to);\n $query_string .= \"&message=\".rawurlencode(stripslashes($sms_msg)) . \"&languagetype=1\"; \n $url = \"http://gateway.onewaysms.com.au:10001/\".$query_string; \n $fd = @implode ('', file ($url)); \n if ($fd) \n { \n if ($fd > 0) {\n Print(\"MT ID : \" . $fd);\n $ok = \"success\";\n } \n else {\n print(\"Please refer to API on Error : \" . $fd);\n $ok = \"fail\";\n }\n } \n else \n { \n // no contact with gateway \n $ok = \"fail\"; \n } \n return $ok; \n }", "title": "" }, { "docid": "b15b105af0f47f4565afa060030c8017", "score": "0.6051066", "text": "public function queue($numbers = null, $message = null, $type = null, $queue = null);", "title": "" }, { "docid": "7257011287def18d5bfdf52d6ab0f70b", "score": "0.60373086", "text": "function send_sms_client()\n\t{\n\t\t$this->load->helper('url');\n\t\t$server_url = site_url('plugin/xmlrpc/send_sms');\n\n\t\t$this->xmlrpc->server($server_url, 80);\n\t\t$this->xmlrpc->method('send_sms');\n\t\t//$this->xmlrpc->set_debug(TRUE);\n\n\t\t$request = array('1234', 'Testing XMLRPC');\n\t\t$this->xmlrpc->request($request);\n\n\t\tif ( ! $this->xmlrpc->send_request())\n\t\t{\n\t\t\techo $this->xmlrpc->display_error();\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo '<pre>';\n\t\t\tprint_r($this->xmlrpc->display_response());\n\t\t\techo '</pre>';\n\t\t}\n\t}", "title": "" }, { "docid": "32d34cbfd87a2c1e8cedda3caffaa939", "score": "0.60334635", "text": "public function send($message, $to_phone);", "title": "" }, { "docid": "eabafce3f2cc72942334c95cbfd3e70a", "score": "0.6027533", "text": "function sms_messenger($sms){\n\n//username from SMSAPI\n $username = 'bsgh-iquipe';\n//or 'password' => md5('open-text-password'),\n $password = 'passwd82';\n//destination number\n $to = $sms['to'];\n//sender name has to be active\n $from = 'smartpay';\n//message content\n $message = $sms['msg'];\n//API http\n\n $url = 'http://sms.bernsergsolutions.com:8080/bulksms/bulksms?';\n\n $c = curl_init();\n curl_setopt($c,CURLOPT_URL,$url);\n curl_setopt($c,CURLOPT_POST,true);\n curl_setopt($c,CURLOPT_POSTFIELDS, 'username='.$username.\n '&password='.$password.\n '&type=0&dlr=1&destination='.$to.\n '&source='.$from.\n '&message='.$message);\n curl_setopt($c,CURLOPT_RETURNTRANSFER,true);\n $content = curl_exec($c);\n curl_close($c);\n//echo $content;\n\n $str_total = strlen($content);\n $text = 4 - $str_total;\n\n $msg = substr($content,0,$text);\n\n if ($msg == 1701){\n\n return true;\n }else{\n return false;\n }\n}", "title": "" }, { "docid": "9eba44b7611f7701a83c0fb8f34ca062", "score": "0.600736", "text": "public function sendSMS($param){\n $type = $param[0];\n $state = $param[1];\n $messageID = $param[2];\n $from = $param[3];\n $to = $param[4];\n $message = $param[5];\n $count = 0;\n\n return $this->deliverySms($type,$state,$messageID,$from,$to,$message,$count);\n }", "title": "" }, { "docid": "887de93e0a53083293fd282d3fd66a0d", "score": "0.60072345", "text": "public function main()\n {\n $sms = $this->SmsService->smsList();\n $sendId= [];\n $cnt = count($sms);\n $this->log(\"Send Message count \".$cnt,'debug');\n if($cnt>0){\n $refKey = \"FCCTV\".time();\n $api = new gabiaSmsApi('brickcommerce','6caf388099c1c8f8a782dfa57534b1dc');\n\n foreach($sms as $key => $info){\n try{\n //$sendId[]=$info->id;\n $r = $api->sms_send($info->recv_phone_number, \"070-5015-6383\",$info->message,$refKey);\n\n if ($r == gabiaSmsApi::$RESULT_OK)\n {\n $this->log(\"Send Message \".$info->id.\" : number : \".$info->recv_phone_number. \" : \" . $api->getResultMessage() . \"이전 : \" . $api->getBefore() . \" : 이후 : \" . $api->getAfter(),'debug');\n $this->SmsService->smsSendUpdate($info->id);\n }\n\n //$this->log(\"Send Message \".$info->id.\" : number : \".$info->recv_phone_number,'debug');\n }catch (Exception $e){\n $this->log($e->getMessage(),'error');\n }\n\n }\n\n $result = $api->get_status_by_ref($refKey);\n $this->log(\"CODE : \".$result[\"CODE\"].\"::::::MESG : \".$result[\"MESG\"],'debug');\n\n }\n }", "title": "" }, { "docid": "fbea0b446a0326e88057a4dc9eb98ea4", "score": "0.60006756", "text": "public function sendSMS($data)\n {\n Mobily::send($data['mobile'], $data['message']);\n }", "title": "" }, { "docid": "759cdbdca15d9ccb05f0599f906c297f", "score": "0.5974438", "text": "public function send(){\n\t\t\n\t\t$database = new Database();\n\t\t$query = $database->selectOne('message_queues', array('id',\n\t\t\t\t\t\t\t\t\t 'is_executed','executed_at','message','cellphone'), \n\t\t\t\t\t\t\t\t\t ' is_executed=0 ');\n\t\t$exec = $database->query($query);\n\t\tif ($exec) {\n\t\t\t$record = $database->fetchArray($exec);\n\t\t\t$response = $this->sendMessage($database, $record);\n\n\t\t\treturn json_encode(array('status' => $response['status'], 'message' => $response['message']));\n\t\t}\n\n\t}", "title": "" }, { "docid": "d9ff569c8ceb6ba6d8dd1d781dcaa74f", "score": "0.5954397", "text": "function clickatell_sendsms($smsmessage,$to=null,$echoing=0) {\n\t\n\t if ($to)\n\t $sendto = substr_replace($to,'+',0,0); //add + at the beggining of the to\n\t else \n\t $sendto = $this->tolist;//+ included\t\n\t\t\n // your user ID on clickatell\n $userid = $this->user;\n $password = $this->pwd;\n\t $api = $this->httpapi;\n // comma-separated list of group names, and/or mobile numbers in international format\n $to = $sendto;\n // message to send\n $message = rawurlencode($smsmessage);\n // if you want to send a message Unicode-encoded in UCS2, you first need to convert\n // the message from UTF-8 (assuming you have UTF-8 encoding in the HTML page, or whatever source)\n //$message = bin2hex( iconv(\"UTF-8\",\"UTF-16BE\",\"YOUR_MESSAGE\") ); // UTF-16BE = UCS-2\n $lang = 'ucs2';\n \n $url = 'http://api.clickatell.com/http/sendmsg';//?user=balexiou&password=PASSWORD&api_id=3239691&to=306936550848&text=Message';\n $fullUrl = \"$url?user=$userid&password=password&api=$api&to=$to&text=$message\";//&lang=$lang\";\n\t //echo $fullUrl;\n // try to send the parameters to smsgui.com\n // if the connection is successful, the result is received in the $contents array\n $this->contents = @file( $fullUrl );\n if( !$contents ) {\n\t //echo \"<br>Error accessing URL: $fullUrl\";\n\t\tif ($echoing) echo \"Error: sending SMS!\";\n\t }\t\n else {\n $code = $contents[0][0]; // read just the very first character from the result\n\t\tif ($echoing) {\n switch( $code ){\n\t\t\tcase '0': echo \"Error: \" . $this->contents[0]; break;\n\t\t\tcase '1': echo \"Warning: \" . $this->contents[0]; break;\n\t\t\tcase '2': echo \"OK: \" . $this->contents[0]; break;\n\t\t\tdefault : echo \"$code - Read failed, or unrecognized code!\";\n }\n\t\t}\n }\n\t \n\t return ($code . $this->contents[0]);\n\t}", "title": "" }, { "docid": "3290e5b55718d637cc2c75469101cdf4", "score": "0.5953844", "text": "function sendSMS($sender, $text, $phone, $datetime, $sms_lifetime){\n\t\treturn $this->gateway->execCommad('sendSMS',array('sender' => $sender, 'text' => $text, 'phone' => $phone, 'datetime' => $datetime, 'sms_lifetime' => $sms_lifetime, 'type' => 2));\n\t}", "title": "" }, { "docid": "04683977e578b173e1fc317cc254af2f", "score": "0.59464407", "text": "function send_sms($msg,$phone_number){\r\n /**\r\n * This is for Twilo\r\n */\r\n if(config('sms-gateway',1) == 1){\r\n //require_once path('plugins/sms/pages/Twilio.php');\r\n $sid = config('twilio-account-id',''); // Your Account SID from www.twilio.com/user/account\r\n $token = config('twilio-token-id',''); // Your Auth Token from www.twilio.com/user/account\r\n\r\n // Get the PHP helper library from twilio.com/docs/php/install\r\n //$client = new Services_Twilio($sid, $token);\r\n //$sms = $client->account->sms_messages->create(config('from-twilio-number',''),$phone_number, $msg, array());\r\n\r\n //using curl\r\n $ch = curl_init('https://api.twilio.com/2010-04-01/Accounts/'.$sid.'/Messages.json');\r\n $data = array(\r\n 'To' => $phone_number,\r\n 'From' => config('from-twilio-number',''),\r\n 'Body' => $msg,\r\n );\r\n $auth = $sid .\":\". $token;\r\n curl_setopt($ch, CURLOPT_POST, 1);\r\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($ch, CURLOPT_USERPWD, $auth);\r\n curl_setopt($ch, CURLOPT_USERAGENT , 'Mozilla 5.0');\r\n $response = curl_exec($ch);\r\n curl_close($ch);\r\n }\r\n elseif(config('sms-gateway',1) == 2){\r\n //46elks\r\n $url = 'https://api.46elks.com/a1/SMS';\r\n $username = config('46elks_app_id');\r\n $password = config('46elks_api_password');\r\n $sms = array('from' => config('sms-from','Lightedphp'),\r\n 'to' => $phone_number,\r\n 'message' => $msg);\r\n\r\n $context = stream_context_create(array(\r\n 'http' => array(\r\n 'method' => 'POST',\r\n 'header' => \"Authorization: Basic \".\r\n base64_encode($username.':'.$password). \"\\r\\n\".\r\n \"Content-type: application/x-www-form-urlencoded\\r\\n\",\r\n 'content' => http_build_query($sms),\r\n 'timeout' => 10\r\n )\r\n ));\r\n $response = file_get_contents($url, false, $context);\r\n }\r\n elseif(config('sms-gateway',1) == 3){\r\n $url = 'http://api.clickatell.com/http/sendmsg';\r\n $user = config('clickatell-username','');\r\n $password = config('clickatell-password','');\r\n $api_id = config('clickatell-app_id');\r\n $to = $phone_number;\r\n $text = $msg;\r\n $data = array(\r\n 'user' => $user,\r\n 'password'=>$password,\r\n 'api_id'=>$api_id,\r\n 'to'=>$to,\r\n 'text' => $text\r\n );\r\n\r\n // use key 'http' even if you send the request to https://...\r\n $options = array(\r\n 'http' => array(\r\n 'header' => \"Content-type: application/x-www-form-urlencoded\\r\\n\",\r\n 'method' => 'POST',\r\n 'content' => http_build_query($data)\r\n )\r\n );\r\n $context = stream_context_create($options);\r\n $result = file_get_contents($url, false, $context);\r\n if ($result === FALSE) { /* Handle error */ }\r\n return $result;\r\n // return var_dump($result);\r\n }\r\n elseif(config('sms-gateway',4) == 4){\r\n //echo \"Quick sms\";\r\n $url = 'http://www.quicksms1.com/api/sendsms.php';\r\n $user = config('quicksms_username','');\r\n $password = config('quicksms_password','');\r\n $to = $phone_number;\r\n $text = $msg;\r\n $data = array(\r\n 'username' => $user,\r\n 'password'=>$password,\r\n 'sender'=>config('sms-from','Betayan'),\r\n 'message'=>$text,\r\n 'recipient'=>$to,\r\n 'convert'=> 1\r\n );\r\n\r\n // use key 'http' even if you send the request to https://...\r\n $options = array(\r\n 'http' => array(\r\n 'header' => \"Content-type: application/x-www-form-urlencoded\\r\\n\",\r\n 'method' => 'POST',\r\n 'content' => http_build_query($data)\r\n )\r\n );\r\n $context = stream_context_create($options);\r\n $result = file_get_contents($url, false, $context);\r\n\r\n return $result;\r\n // print_r($result);\r\n // exit;\r\n }elseif(config('sms-gateway',1) == 10){\r\n //Text local\r\n $apiKey = config('text-local-api-key','');\r\n $apiKey = urlencode($apiKey);\r\n\r\n // Message details\r\n $numbers = array($phone_number);\r\n $sender = urlencode(config('sms-from','LightedPHP'));\r\n $message = rawurlencode($msg);\r\n\r\n $numbers = implode(',', $numbers);\r\n\r\n // Prepare data for POST request\r\n $data = array('apikey' => $apiKey, 'numbers' => $numbers, \"sender\" => $sender, \"message\" => $message);\r\n\r\n // Send the POST request with cURL\r\n $ch = curl_init('https://api.textlocal.in/send/');\r\n curl_setopt($ch, CURLOPT_POST, true);\r\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n $response = curl_exec($ch);\r\n curl_close($ch);\r\n\r\n // Process your response here\r\n print_r($response);die();\r\n\r\n }\r\n return true;\r\n}", "title": "" }, { "docid": "55de201d1483525741a1542a4b27bbd7", "score": "0.5940483", "text": "public function testShouldAllowToSendSms()\n\t {\n\t\tdefine(\"GNOKII_COMMAND\", \"sh \" . __DIR__ . \"/mock/mock.sh\");\n\t\tdefine(\"SMSC_NUMBER\", \"+79043490000\");\n\n\t\t$sender = new PhpGnokii();\n\t\t$this->assertTrue($sender->send(\"+79526191914\", \"test\"));\n\t }", "title": "" }, { "docid": "33220918390cf511c0ea392b026762f5", "score": "0.5924155", "text": "function sendMessage($msg) {\n // Your Account SID and Auth Token from twilio.com/console\n $sid = '<YOUR OWN TWILIO ACCOUNTSID>';\n $token = '<YOUR OWN TWILIO TOKEN>>';\n $client = new Client($sid, $token);\n try {\n $client->messages->create(\n // the number you'd like to send the message to\n '<TWILIIO RECEIPIENT>',\n array(\n // A Twilio phone number you purchased at twilio.com/console\n 'from' => '<TWILIO NUMBER THAT YOU HAVE BEEN GIVEN>',\n // the body of the text message you'd like to send\n 'body' => $msg\n )\n );\n echo \"Sms sent with msg :\\n\".$msg;\n } catch (TwilioException $e){\n echo \"Could not send. Twilio replied with: \" . $e;\n } \n}", "title": "" }, { "docid": "71625068f21f1cb45a104de20024a44c", "score": "0.591725", "text": "function send_sms($sms_data, $agent_phone) {\n\n $url = \"http://esms.dianahost.com/smsapi\";\n $data = [\n \"api_key\" => \"C20075015fcfa6e18ab532.04423004\",\n \"type\" => \"text\",\n \"contacts\" => $agent_phone,\n \"senderid\" => \"8809612446331\",\n \"msg\" => $sms_data,\n ];\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n $response = curl_exec($ch);\n curl_close($ch);\n return $response;\n }", "title": "" }, { "docid": "d60c2b43309fdad9d5dc59f143045708", "score": "0.58963305", "text": "function sendMessageToQueue($messageObj){\n\tglobal $LAS_CFG;\n\t\n\t$daemon_host = $LAS_CFG->las_daemon_server['host'];\n\t$daemon_port = $LAS_CFG->las_daemon_server['port'];\n\t$daemon_url = 'tcp://'.$daemon_host.':'.$daemon_port;\n\t\n\t$client_timeout = $LAS_CFG->las_daemon_server['timeout'];\n\t\n\t$exchange_name = $LAS_CFG->message_server['taskQueue'];\n\t$new_routing_key = $exchange_name . $messageObj->routing_key;\n\t$messageObj->routing_key = $new_routing_key;\n\t\n\t// Convert JSON message to String\n\t$message = json_encode($messageObj);\n\t\n\t$server = new LasManager($daemon_url);\n\treturn $server->clientSendMessage($message, $client_timeout);\n}", "title": "" }, { "docid": "5732227a7c6fc70b13fd9bdfde468ac8", "score": "0.58878905", "text": "public function send_sms($phone, $message)\n {\n $phone = '254731090832';\n $sms = 'Test messange';\n $senderID = 'SPEEDBALL';\n\n $login = 'SPEEDBALL';\n $password = 's12345';\n\n $clientsmsID = rand(1000, 9999);\n\n $xml_data = '<?xml version=\"1.0\"?><smslist><sms><user>' . $login . '</user><password>' . $password . '</password><message>' . $sms . '</message><mobiles>' . $phone . '</mobiles><senderid>' . $senderID . '</senderid><clientsmsid>' . $clientsmsID . '</clientsmsid></sms></smslist>';\n\n $URL = \"http://messaging.advantasms.com/bulksms/sendsms.jsp?\";\n\n $ch = curl_init($URL);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_ENCODING, 'UTF-8');\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/xml'));\n curl_setopt($ch, CURLOPT_POSTFIELDS, \"$xml_data\");\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n $output = curl_exec($ch);\n curl_close($ch);\n\n // return $output;\n }", "title": "" }, { "docid": "8ebe476e0748077e8f070d945df4db5b", "score": "0.5883624", "text": "private function deliverySms($type,$state,$messageID,$from,$to,$message,$count){\n $datum = Date(\"Y-m-d\");\n $count = $count + 1;\n\n if (isset($this->_stateIDs[$state])){\n $stateId = $this->_stateIDs[$state]; \n } else {\n $stateId = 0;\n }\n \n /*\n * Uncomment if is needed to disable sending at specific time\n */\n // $sleep_time = date('H');\n // $sleep = array('21', '22','23','00','01','02','03','04','05','06');\n\n // if not between 21:00 - 07:00\n // if(!in_array($sleep_time, $sleep)){\n\n if ($type !== \"bulk\") { \n $to = $this->cleanMob($to, $state);\n if ($to == false) { \n return \"wrong number\";\n }\n }\n //ucitavanje liste odjava \n if ($type == \"reorder\") { \n $suppression = $this->getSuppressionList($state);\n $supArr = array();\n\n foreach ($suppression as $sNumber){\n array_push($supArr, $sNumber['number']);\n }\n\n if (in_array($to, $supArr) == true) {\n return \"number unsubscribed\";\n }\n } \n\n // konacno filtriranje samo brojeva \n $to = preg_replace('/[^0-9]/', '', $to);\n\n $firstTwo = substr($to, 0, 2);\n\n if ($state == \"XK\" && $firstTwo == \"49\") {\n $responsePhone = \"+386\".$to; \n $to = \"00386\".$to;\n } else {\n $responsePhone = \"+\".$this->_areaCodes[$state].$to; \n $to = \"00\".$this->_areaCodes[$state].$to;\n }\n\n \n $message = strip_tags($message);\n\n $msg = $this->cleanUTF($message, $state);\n $ch = curl_init('http://bulk.mobile-gw.com:9000/?');\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, \"username=*******&password=*********&allow_adaption=1&messageid={$messageID}&status_report=3&origin={$from}&call-number={$to}&text=\".urlencode($msg));\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_VERBOSE, 1);\n curl_setopt($ch, CURLOPT_HEADER, 1);\n $send_response = curl_exec ($ch);\n curl_close ($ch);\n\n $getRow = explode(\"\\n\", $send_response);\n //******** Hvatanje SMSID broja\n // $getId = explode(\":\", $getRow[2]);\n // $smsId = trim($getId[1]);\n\n\n $getId = explode(\":\", $getRow[2]);\n $smsIdRaw = trim($getId[1]);\n\n $countSeparator = substr_count($smsIdRaw,\";\");\n $messageNumber = $countSeparator + 1;\n $smsIdExploaded = explode(\";\", $smsIdRaw);\n\n $smsId = $smsIdExploaded[0];\n //******** Hvatanje Statusa slanja\n $getSecond = explode(\":\", $getRow[6]); \n $getCode = explode(\",\", $getSecond[1]);\n $statusCode = trim($getCode[0]);\n\n $statusNum = 0;\n if ($statusCode == \"00\"){\n $statusNum = 1;\n } else {\n $statusNum = 3;\n }\n\n $this->insertMessage($smsId,$from,$to,$messageID,$msg,$statusNum,$messageNumber,$stateId); \n if($type == \"bulk\"){\n //echo json_encode(array(\"count\"=>$count, \"number\"=>$to, \"response\"=>$send_response));\n $writeFile ='{\"MessageId\":\"'.$messageID.'\",\"SenderId\":\"'.$from.'\",\"Recipient\":\"'.$to.'\",\"Response\":\"'.$send_response.'\",\"Message\":\"'.$msg.'\"},\\n';\n $file = fopen($this->_logRoot.\"reports/bulk/\".$messageID.\".txt\", \"a\");\n file_put_contents($this->_logRoot.\"reports/bulk/\".$messageID.\".txt\", $writeFile, FILE_APPEND);\n fclose($file);\n } else if ($type == \"reorder\"){\n //echo json_encode(array(\"count\"=>$count, \"number\"=>$to, \"response\"=>$send_response));\n $writeFile ='{\"MessageId\":\"'.$messageID.'\",\"SenderId\":\"'.$from.'\",\"Recipient\":\"'.$to.'\",\"Response\":\"'.$send_response.'\",\"Message\":\"'.$msg.'\"},\\n';\n $file = fopen($this->_logRoot.\"reports/reorder/\".$messageID.\".txt\", \"a\");\n file_put_contents($this->_logRoot.\"reports/reorder/\".$messageID.\".txt\", $writeFile, FILE_APPEND);\n fclose($file);\n } else {\n $writeFile ='{\"MessageId\":\"'.$messageID.'\",\"SenderId\":\"'.$from.'\",\"Recipient\":\"'.$to.'\",\"Response\":\"'.$send_response.'\",\"Message\":\"'.$msg.'\",\"Quantity\":\"'.$messageNumber.'\"},\\n';\n $existCount2 = 0;\n if (file_exists($this->_logRoot.\"reports/orders/\".$datum.\".txt\")){\n $existCount2 = 1;\n }\n\n $file = fopen($this->_logRoot.\"reports/orders/\".$datum.\".txt\", \"a\");\n file_put_contents($this->_logRoot.\"reports/orders/\".$datum.\".txt\", $writeFile, FILE_APPEND);\n fclose($file);\n\n if ($existCount2 == 0){\n chmod($this->_logRoot.\"reports/orders/\".$datum.\".txt\", 0777);\n }\n }\n $responseJson = '{\"status\":\"'.$statusNum.'\",\"msisdn\":\"'.$responsePhone.'\"}';\n return $responseJson;\n // }else{\n // return 'sleep time';\n // }\n }", "title": "" }, { "docid": "81dd0cee9fef00641366e4b81eee4bef", "score": "0.58694166", "text": "abstract public function send($message, $msisdn);", "title": "" }, { "docid": "c9c519b528c81ee3b6d99ef5ea4d52e4", "score": "0.58627737", "text": "function send_sms($gsm, $txt) {\n $CI = & get_instance();\n $CI->load->model(\"action\");\n $total_sms = config_item(\"total_sms\");\n $sent_sms_data = $CI->action->read_sum(\"sms_record\",\"total_messages\",array(\"delivery_report\"=>\"1\"));\n $sent_sms = $sent_sms_data[0]->total_messages;\n //Getting SMS report End here\n\n\n\n\n // application key\n $user = '01839973100'; // merchant account username\n $pass = 'im0aJ1Kh'; // merchant account password\n $sender = 'ndcm'; // characters\n $message = str_replace(' ', '%20', $txt);\n $mobile = '88' . trim($gsm);\n\n if ($sent_sms < $total_sms) {\n\n // for long text\n $url = \"http://api.zaman-it.com/api/sendsms/plain?user=$user&password=$pass&sender=$sender&SMSText=$message&GSM=$mobile\";\n\n $c = curl_init();\n\n curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($c, CURLOPT_URL, $url);\n // set the json header\n curl_setopt($c, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json',\n 'Accept: application/json'\n ));\n\n $contents = curl_exec($c);\n curl_close($c);\n\n if ($contents){\n // json to php array\n // $json = json_decode($contents, true);\n // return $contents;\n\n // without header xml data format\n // $fileContents = str_replace(array(\"\\n\", \"\\r\", \"\\t\"), '', $contents);\n // $fileContents = trim(str_replace('\"', \"'\", $fileContents));\n // $simpleXml = simplexml_load_string($fileContents);\n // $json = json_encode($simpleXml);\n // return $json;\n\n return true;\n } else {\n return false;\n }\n }else{\n return false;\n }\n\n // return file_get_contents( $url );\n}", "title": "" }, { "docid": "cd21f4c69fe89acb58e192c1365eaf74", "score": "0.58485126", "text": "public function sendPaymentNotification(){\n\n $sms_recipients=\"0712345648\";//empty string\n $username = Constants::$username;\n $apiKey = Constants::$apiKey;\n $from = Constants::$from;\n // dd($apiKey);\n\n $AT = new AfricasTalking($username, $apiKey);\n // // Get one of the services\n $recipients=\"\";\n $sms = $AT->sms();\n //user has a valid mobile number\n $phone = substr($sms_recipients,1);\n $recipients='+254'.$phone;//$data['phone'];//'+254712345678'\n // dd($recipients);\n\n // // Set the numbers you want to send to in international format\n \n // // Set your message\n $message = \"Testing SMS.\";\n\n // // Set your shortCode or senderId\n \n // Get one of the services\n try {\n // Thats it, hit send and we'll take care of the rest\n $result = $sms->send([\n 'to' => $recipients,\n 'message' => $message,\n 'from' => $from\n ]);\n\n print_r($result);\n \n } catch (Exception $e) {\n //echo \"Error: \".$e->getMessage();\n $result=$e->getMessage();\n print_r($result);\n }\n\n \n }", "title": "" }, { "docid": "21abd546cacfd6cd8001afd66f735a77", "score": "0.5844997", "text": "public function SendActiveSms($data,$smsContent,$id=null){\n if($id!=null){\n $add=public_users::find($id);\n $add->num_of_sends+=1;\n $add->save();\n }\n Curl::to('http://bulksms.expressad.in/httpapi/otpapi')\n ->withData( array( 'token' => '05958824f5d6439ee91a2db00fdd475b', 'number'=>$data['phone'], 'sms'=> $smsContent ) )\n ->post();\n }", "title": "" }, { "docid": "488e48568e825b73a70ba627779336f6", "score": "0.584053", "text": "public function sendsms(){\n\n if($this->IS_DEMO){\n $this->session->set_flashdata('error', $this->config->item('app_demo_edit_err'));\n redirect($this->LIB_CONT_ROOT.'settings', 'refresh'); \n }\n set_time_limit(3600);\n $redir=$this->CONT_ROOT.'?tab=sms';\n $form=$this->input->safe_post();\n $required=array('message');\n foreach ($required as $key) {\n if(!isset($form[$key]) || empty($form[$key])){\n $this->session->set_flashdata('error', 'Please enter message');\n redirect($redir);\n }\n }\n $mobile=$this->SETTINGS[$this->system_setting_m->_SMS_API_USERNAME];\n $apikey=$this->SETTINGS[$this->system_setting_m->_SMS_API_KEY];\n $mask=$this->SETTINGS[$this->system_setting_m->_SMS_MASK];\n if(!$this->is_valid_params($mobile,$apikey,$mask)){\n $this->session->set_flashdata('error', 'Invalid api details. Please update vendor api details first!!!');\n redirect($redir);\n }\n //////////////////////////////////////////////////////////////////\n $classes=$this->class_m->get_values_array('','name',array());\n $filter=array();\n\n if(isset($form['class_id']) && !empty($form['class_id'])){$filter['class_id']=$form['class_id'];}\n if(isset($form['group_id']) && !empty($form['group_id'])){$filter['group_id']=$form['group_id'];}\n if(isset($form['section_id']) && !empty($form['section_id'])){$filter['section_id']=$form['section_id'];}\n if(isset($form['student_id']) && !empty($form['student_id'])){$filter['student_id']=$form['student_id'];}\n $students=$this->student_m->get_rows($filter,array('select'=>'mid,student_id,name,mobile,father_name,roll_number,class_id,date'));\n\n if(count($students)<1){\n $this->session->set_flashdata('error', 'There are no students for selected criteria!!!');\n redirect($redir);\n }\n $message=htmlspecialchars_decode($form['message']);\n $i=0;\n $failed=0;\n $new_pass='';\n $ch=$this->open_curl();\n foreach ($students as $row) { \n $to=$row['mobile'];\n if(strlen($row['mobile'])>8){\n $i++; \n ///////////////////////////////////////\n if(strpos($message, \"{NEWPASSWORD}\") !== false){\n $new_pass=mt_rand(11111,99999);\n $this->student_m->save(array('password'=>$this->student_m->hash($new_pass)),$row['mid']);\n }\n ///////////////////////////////////////\n //conversion keys\n $key_vars=array(\n '{NAME}'=>$row['name'],\n '{ID}'=>$row['student_id'],\n '{ROLLNO}'=>$row['roll_number'],\n '{CLASS}'=>$classes[$row['class_id']],\n '{NEWPASSWORD}'=>$new_pass\n );\n ////////////////////////////////////////\n $sms=strtr($message, $key_vars);\n $this->send_message($ch,$mobile,$apikey,$mask,$to,$sms);\n }else{\n $failed++;\n } \n }\n $this->close_curl($ch);\n ////////////////////////////////////////////////////////////////////////////////\n $this->session->set_flashdata('success', 'Message sent to '.$i.' students and failed for '.$failed.' students.');\n redirect($redir);\n }", "title": "" }, { "docid": "d38c412886dce7075d1f26ef26da968b", "score": "0.5820714", "text": "function sms()\n {\n return app('azima-sms');\n }", "title": "" }, { "docid": "a831f8aa21d84af072b0cd703fb915d5", "score": "0.5819729", "text": "public function rewardsSmsQueue()\n {\n $sms_queue = RewardSms::where(\"sent\", 0)->get()->take(5);\n \n foreach ($sms_queue as $key => $queue) {\n \n $this->sendSms($queue->phone, $queue->text);\n \n $sms_obj = RewardSms::where(\"rewards_sms_id\", $queue->rewards_sms_id)->get()->first();\n $sms_obj->sent = 1;\n $sms_obj->save();\n }\n }", "title": "" }, { "docid": "fb4718cb6011149fed9ff83de476b0f1", "score": "0.58195007", "text": "function sendnow() {\n \t\t\n \t\tset_time_limit(0);\n \t\tini_set('memory_limit', '256M');\n \t\t\n \t\t$this->checkAccess('bulksms');\n \t\t\n \t\tif(isset($this->data)) {\n \t\t\t\n \t\t\tif(BULK_SMS_SERVER_DOWN) {\n \t\t\t\t$error[] = UNAVAILABLE_MESSAGE;\n \t\t\t}\n\n\t\t\tif($this->data['type'] && NINE_TO_NINE_ACTIVATED) {\n\t \t\t\t$error[] = NINE_TO_NINE_ACTIVATED_MESSAGE;\n\t \t\t}\t\t\t\n \t\t\t\n \t\t\t// Sender ID is optional\n \t\t\tif(isset($this->data['bulk_senderid_id'])) $bulk_senderid_id = filter_var(trim($this->data['bulk_senderid_id']), FILTER_VALIDATE_INT);\n \t\t\telse $bulk_senderid_id = 0;\n \t\t\t\n \t\t\t$bulk_group_id = filter_var(trim($this->data['bulk_group_id']), FILTER_VALIDATE_INT);\n \t\t\t$bulk_tag_id = filter_var(trim($this->data['bulk_tag_id']), FILTER_VALIDATE_INT);\n \t\t\t$message = urldecode(trim($this->data['message']));\n \t\t\t$number = filter_var(trim($this->data['number']), FILTER_SANITIZE_STRING);\n \t\t\t$day = filter_var(trim($this->data['day']), FILTER_VALIDATE_INT);\n \t\t\t$month = filter_var(trim($this->data['month']), FILTER_VALIDATE_INT);\n \t\t\t$year = filter_var(trim($this->data['year']), FILTER_VALIDATE_INT);\n \t\t\t$hours = filter_var(trim($this->data['hours']), FILTER_VALIDATE_INT);\n \t\t\t$minutes = filter_var(trim($this->data['minutes']), FILTER_VALIDATE_INT);\n \t\t\t\n \t\t\t/*\tCorrect Encoding\t*/\n \t\t\t$message = iconv('UTF-8', 'ASCII//TRANSLIT', $message);\n \t\t\t\n \t\t\tif(empty($message)) $error[] = 'Message Cannot Be Empty';\n \t\t\t//if(empty($bulk_group_id)) $error[] = 'Invalid Group';\n \t\t\t//if(empty($bulk_tag_id)) $error[] = 'Invalid Tag';\n \t\t\t\n \t\t\t$n = 0;\n \t\t\tif(empty($number) && empty($bulk_group_id)) $error[] = 'Enter Mobile Numbers or select a Group';\n \t\t\telse {\n \t\t\t\tif(!empty($number)) {\n \t\t\t\t\t$n = explode(',', $number);\n \t\t\t\t\t$n = array_filter($n);\n \t\t\t\t\tforeach($n as $k => $v) {\n \t\t\t\t\t\t$v = trim($v);\n \t\t\t\t\t\tif(!$this->checkNumber($v)) $inv_num[] = $v;\n \t\t\t\t\t\t$new_n[] = $v; \n \t\t\t\t\t}\n \t\t\t\t\t$n = $new_n;\n \t\t\t\t\tif(isset($inv_num)) $error[] = 'Invalid Mobile Number(s) '.implode(',', $inv_num);\n \t\t\t\t\t\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tif(!empty($bulk_group_id) && !$this->checkBulkGroupId($bulk_group_id)) $error[] = 'Invalid Group ID';\n\n \t\t\t}\n \t\t\t\n \t\t\tif(!empty($bulk_senderid_id) && !$this->checkBulkSenderId($bulk_senderid_id)) $error[] = 'Invalid Sender ID';\n \t\t\t//if(!$this->checkBulkGroupId($bulk_group_id)) $error[] = 'Invalid Group ID';\n \t\t\tif(!$this->checkBulkTagId($bulk_tag_id)) $error[] = 'Invalid Tag ID';\n \t\t\t\n \t\t\t//check if the group empty or not\n \t\t\tif(!empty($bulk_group_id)) {\n\t \t\t\t$c['BulkAddressbook.bulk_group_id'] = $bulk_group_id;\n\t \t\t\t$c['BulkAddressbook.status'] = '0';\n\t \t\t\tif($this->BulkAddressbook->find('count', array('conditions'=>$c)) == '0') {\n\t \t\t\t\t$error[] = 'Group is empty';\n\t \t\t\t} else {\n \t\t\t\t\t\n\t \t\t\t\t// Get mobile numbers\n\t \t\t\t\tif(isset($this->data['mobile_list'])) $mobile_list = $this->data['mobile_list'];\n\t \t\t\t\telse {\n\t \t\t\t\t\t$mc['conditions']['BulkAddressbook.bulk_group_id'] = $bulk_group_id;\n\t \t\t\t\t\t$mc['conditions']['BulkAddressbook.status'] = '0';\n\t \t\t\t\t\t$mc['fields'] = array('BulkAddressbook.id');\n\t \t\t\t\t\t$mobile_list = $this->BulkAddressbook->find('list', $mc);\n\t \t\t\t\t}\n\t \t\t\t\t\n\t \t\t\t\t//SEND NOW\n \t\t\t\t\tif($this->data['type']) {\n\t \t\t\t\t\t$mc['conditions']['BulkAddressbook.id'] = $mobile_list;\n\t \t\t\t\t\t$mc['conditions']['BulkAddressbook.bulk_group_id'] = $bulk_group_id;\n\t \t\t\t\t\t$mc['conditions']['BulkAddressbook.status'] = '0';\n\t \t\t\t\t\t$mc['fields'] = array('BulkAddressbook.mobile');\n\t \t\t\t\t\t$mobile_list = $this->BulkAddressbook->find('list', $mc);\n\t \t\t\t\t\t\n\t \t\t\t\t\tunset($new_n);\n\t \t\t\t\t\tforeach($mobile_list as $k => $v) {\n\t \t\t\t\t\t\t$new_n[] = $v; \n\t \t\t\t\t\t}\n\t \t\t\t\t\t$n = !empty($n) ? array_merge($n, $new_n) : $new_n;\n \t\t\t\t\t\n \t\t\t\t\t} else {\n \t\t\t\t\t\t\n \t\t\t\t\t}\n\t \t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t//SEND NOW\n \t\t\tif($this->data['type']) {\n \t\t\t\t\n \t\t\t\tif(!isset($error)) {\n \t\t\t\t\t\n \t\t\t\t\tif(strlen($message) > MAX_CHARS)\n \t\t\t\t\t\t$message = substr($message, 0, MAX_CHARS);\n \t\t\t\t\t\n \t\t\t\t\t//get sms vendor details\n\t\t \t\t\t$this->getBulkSmsVendor($this->Session->read('user_id'));\n\t\t \t\t\t//pr($this->sms_vendor_details);\n \t\t\t\t\t\n \t\t\t\t\tunset($v);\n \t\t\t\t\t$v['message'] = $message;\n \t\t\t\t\t$v['bulk_user_id'] = $this->Session->read('user_id');\n \t\t\t\t\t$v['sms_count'] = $this->sms_count($message);\n \t\t\t\t\t$v['numbers'] = !empty($n) ? implode(', ', $n) : '0';\n \t\t\t\t\t$v['bulk_senderid_id'] = $bulk_senderid_id;\n \t\t\t\t\t$v['bulk_group_id'] = empty($bulk_group_id) ? '0' : $bulk_group_id;\n \t\t\t\t\t$v['bulk_tag_id'] = $bulk_tag_id;\n \t\t\t\t\t$v['ip'] = ip2long($_SERVER['REMOTE_ADDR']);\n \t\t\t\t\t$v['sms_vendor_id'] = $this->sms_vendor_id;\n \t\t\t\t\t$this->BulkSmsLog->save($v);\n \t\t\t\t\t$bulk_sms_log_lid = $this->BulkSmsLog->getLastInsertId();\n \t\t\t\t\t\n \t\t\t\t\tif(count($n) < BULK_SMS_CLI_DECIDER) {\n \t\t\t\t\t\t\n\t\t\t\t\t\t//SEND SMS\n \t\t\t\t\t\t$this->_sendBulkMessage($bulk_group_id, $bulk_senderid_id, $message, $bulk_sms_log_lid, $this->Session->read('user_id'), $n, false, $this->sms_vendor_id);\n \t\t\t\t\t\n \t\t\t\t\t} else {\n\n \t\t\t\t\t\t//SAVE SMS IN TEMP TABLE\n\t \t\t\t\t\tunset($v);\n\t \t\t\t\t\t$v['message'] = $message;\n\t \t\t\t\t\t$v['numbers'] = !empty($n) ? implode(', ', $n) : '0';\n\t \t\t\t\t\t$v['bulk_user_id'] = $this->Session->read('user_id');\n\t\t\t\t\t\t$v['bulk_senderid_id'] = $bulk_senderid_id;\n \t\t\t\t\t\t$v['bulk_group_id'] = empty($bulk_group_id) ? '0' : $bulk_group_id;\n \t\t\t\t\t\t$v['bulk_sms_log_id'] = $bulk_sms_log_lid;\n \t\t\t\t\t\t$v['sms_vendor_id'] = $this->sms_vendor_id;\n \t\t\t\t\t\t$this->BulkSmsCli->save($v);\n\t \t\t\t\t\t$lastinsertid = $this->BulkSmsCli->getLastInsertId();\n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t\t//CALL CLI TO SEND SMS\n \t\t\t\t\t\t$path = \"php \" . WWW_ROOT . \"cron_dispatcher.php /bulksms/send_using_cli/\".$lastinsertid;\n \t\t\t\t\t\t$outputfile = \"/tmp/output.cli.\".$lastinsertid;\n \t\t\t\t\t\t$pidfile = \"/tmp/pid.cli.\".$lastinsertid;\n \t\t\t\t\t\texec(sprintf(\"%s > %s 2>&1 & echo $! >> %s\", $path, $outputfile, $pidfile));\n \t\t\t\t\t\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t//GET GROUP NAME\n \t\t\t\t\t$groupname = $number = '';\n \t\t\t\t\tif(!empty($bulk_group_id)) {\n\t \t\t\t\t\t$this->BulkGroup->id = $bulk_group_id;\n\t \t\t\t\t\t$groupname = '<br/>Contact(s) from '.$this->BulkGroup->field('name') . ' Group';\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\tif(!empty($n)) {\n \t\t\t\t\t\t$number = '<br/>Mobile Numbers(s) '.implode(', ', $n);\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t$return_data = 'Message Successfully Send To:'.$groupname.$number;\n\t\t\t \t\tif(strlen($return_data) > 250) $return_data = substr($return_data, 0, 200).'..';\n\t\t\t \t\t\n\t\t\t \t\t$return_data .= '<br/><a href=\"/bulksms/showdetailedreport/'.$bulk_sms_log_lid.'\">View Detailed Delivery Report</a>';\n\t\t\t \t\t\n \t\t\t\t\t$this->Session->write('success', $return_data);\n \t\t\t\t\t$this->redirect('/bulksms/sendnow');\n \t\t\t\t\texit;\n \t\t\t\t\t\n \t\t\t\t} else {\n \t\t\t\t\t$this->set('error', $error);\n \t\t\t\t\t$this->set('message', $message);\n \t\t\t\t\t$this->set('number', $number);\n \t\t\t\t\t$this->set('day', $day);\n \t\t\t\t\t$this->set('month', $month);\n \t\t\t\t\t$this->set('year', $year);\n \t\t\t\t\t$this->set('hour', $hours);\n \t\t\t\t\t$this->set('minutes', $minutes);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t//SCHEDULE\t\n \t\t\t} else {\n \t\t\t\t\n \t\t\t\t/*if($day == '' || $month == '' || $year == '' || $hours == '' || $minutes == '') { \n \t\t\t\t\t$error[] = 'Invalid Date Entered';\n \t\t\t\t} else {*/\n \t\t\t\t\t$date = date('Y-m-d H:i:s', mktime($hours, $minutes, '0', $month, $day, $year));\n \t\t\t\t\tif($date < date('Y-m-d H:i:s')) $error[] = 'Please select a future date';\n \t\t\t\t//}\n \t\t\t\t\n\t\t\t\tif(!($hours > '08' && $hours < '21')) {\n \t\t\t\t\t$error[] = NINE_TO_NINE_ACTIVATED_MESSAGE;\n \t\t\t\t}\n\n \t\t\t\tif(isset($mobile_list) && !empty($mobile_list)) {\n\t \t\t\t\tunset($c);\n\t \t\t\t\tif(count($mobile_list) == 1) $mobile_list = $mobile_list['0'];\n\t \t\t\t\t$c['conditions']['BulkAddressbook.bulk_group_id'] = $bulk_group_id;\n\t \t\t\t\t$c['conditions']['BulkAddressbook.id NOT'] = $mobile_list;\n\t \t\t\t\t$c['conditions']['BulkAddressbook.status'] = '0';\n\t \t\t\t\t$c['fields'] = array('BulkAddressbook.id');\n\t \t\t\t\t$not_included = $this->BulkAddressbook->find('list', $c);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tif(!isset($error)) {\n \t\t\t\t\t\n \t\t\t\t\t$date = date('Y-m-d H:i:s', mktime($hours, $minutes, '0', $month, $day, $year));\n \t\t\t\t\t$udate = date('jS M, Y g:i a', strtotime($date));\n \t\t\t\t\t\n \t\t\t\t\tunset($v);\n \t\t\t\t\t$v['message'] = $message;\n \t\t\t\t\t$v['bulk_user_id'] = $this->Session->read('user_id');\n \t\t\t\t\t$v['numbers'] = !empty($n) ? implode(',', $n) : '0';\n \t\t\t\t\t$v['not_included'] = !empty($not_included) ? implode(',', $not_included) : '0';\n \t\t\t\t\t$v['scheduledate'] = $date;\n \t\t\t\t\t$v['bulk_senderid_id'] = $bulk_senderid_id;\n \t\t\t\t\t$v['bulk_group_id'] = empty($bulk_group_id) ? '0' : $bulk_group_id;\n \t\t\t\t\t$v['bulk_tag_id'] = $bulk_tag_id;\n \t\t\t\t\t$v['ip'] = ip2long($_SERVER['REMOTE_ADDR']);\n \t\t\t\t\t$this->BulkSmsSchedule->save($v);\n \t\t\t\t\t\n \t\t\t\t\t$this->Session->write('success', 'Message Successfully Scheduled on '.$udate);\n \t\t\t\t\t$this->redirect('/bulksms/sendnow');\n \t\t\t\t\texit;\n \t\t\t\t\t\n \t\t\t\t} else {\n \t\t\t\t\t$this->set('error', $error);\n \t\t\t\t\t$this->set('message', $message);\n \t\t\t\t\t$this->set('number', $number);\n \t\t\t\t\t$this->set('day', $day);\n \t\t\t\t\t$this->set('month', $month);\n \t\t\t\t\t$this->set('year', $year);\n \t\t\t\t\t$this->set('hour', $hours);\n \t\t\t\t\t$this->set('minutes', $minutes);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t}\n \t\t\t\n \t\t}\n \t\t\n \t\tunset($cond);\n \t\t$cond['conditions']['status'] = '0';\n\t \t$cond['conditions']['bulk_user_id'] = $this->Session->read('user_id');\n\t \t$group = $this->BulkGroup->find('list', $cond);\n\t \t$groupname = '<option value=\"0\">Select Group</option>';\n\t \t\n\t \tforeach($group as $key => $value) {\n\t \t\t$groupname .= '<option value=\"'.$key.'\">'.$value.'</option>';\n\t \t}\n\t \t$this->set('groupname', $groupname);\n\t \t\n\t \tunset($cond);\n\t \t$cond['conditions']['status'] = '0';\n\t \t$cond['conditions']['publish'] = '1';\n\t \t$cond['conditions']['bulk_user_id'] = $this->Session->read('user_id');\n\t \t$sender = $this->BulkSenderid->find('list', $cond);\n\t \t$senderid = '';\n\t \t\n\t \tforeach($sender as $key => $value) {\n\t \t\t$senderid .= '<option value=\"'.$key.'\">'.$value.'</option>';\n\t \t}\n\t \t$this->set('senderid', $senderid);\n\t \t\n\t \tunset($cond);\n\t \t$cond['conditions']['status'] = '0';\n\t \t$cond['conditions']['bulk_user_id'] = $this->Session->read('user_id');\n\t \t$data = $this->BulkSmsTag->find('list', $cond);\n\t \t$tag = '';\n\t \t\n\t \tforeach($data as $key => $value) {\n\t \t\t$tag .= '<option value=\"'.$key.'\">'.$value.'</option>';\n\t \t}\n\t \t$this->set('tag', $tag);\n\t \t\n\t \tunset($cond);\n\t \t$cond['conditions']['BulkAccount.status'] = '0';\n\t \t$cond['conditions']['BulkAccount.bulk_user_id'] = $this->Session->read('user_id');\n\t \t$quantity = $this->BulkAccount->field('BulkAccount.quantity', $cond['conditions']);\n\t \t$this->set('quantity', $quantity);\n\t \t\n \t\t$this->layout = 'bulksms';\n \t\t$this->set('tab', array('2'));\n\t\t//$this->getFeedback();\n\t\t\n \t\tif($this->Session->check('success')) {\n \t\t\t$this->set('success', $this->Session->read('success'));\n \t\t\t$this->Session->delete('success');\n \t\t}\n \n \t}", "title": "" }, { "docid": "895e46e2a22a7db8b4e5ee30c269df95", "score": "0.5816103", "text": "public function sendSMS($message_content,$mobileNumber){\n\t\n\t\t// Code Start Here Send SMS\n\t\t//Your authentication key\n\t\t$authKey = \"181687AllIYkeF5ff8166dP1\";\n\n\t\t//Multiple mobiles numbers separated by comma\n\t\t//$mobileNumber = $mobileno;\n\n\t\t//Sender ID,While using route4 sender id should be 6 characters long.\n\t\t$senderId = \"ZOBOXX\";\n\n\t\t//Your message to send, Add URL encoding here.\n\t\t$message = urlencode($message_content);\n\n\t\t//Define route \n\t\t$route = \"default\";\n\t\t//Prepare you post parameters\n\t\t$postData = array(\n\t\t\t'authkey' => $authKey,\n\t\t\t'mobiles' => $mobileNumber,\n\t\t\t'message' => $message,\n\t\t\t'sender' => $senderId,\n\t\t\t'route' => $route\n\t\t);\n\n\t\t//API URL\n\t\t$url=\"http://api.msg91.com/api/sendhttp.php\";\n\n\t\t// init the resource\n\t\t$ch = curl_init();\n\t\tcurl_setopt_array($ch, array(\n\t\t\tCURLOPT_URL => $url,\n\t\t\tCURLOPT_RETURNTRANSFER => true,\n\t\t\tCURLOPT_POST => true,\n\t\t\tCURLOPT_POSTFIELDS => $postData\n\t\t\t//,CURLOPT_FOLLOWLOCATION => true\n\t\t));\n\n\n\t\t//Ignore SSL certificate verification\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n\n\n\t\t//get response\n\t\t$output = curl_exec($ch);\n\n\t\t//Print error if any\n\t\tif(curl_errno($ch))\n\t\t{\n\t\t\t$msg_response = 'error:' . curl_error($ch);\n\t\t}else{\n\t\t\t$msg_response = 'sucess:' . $output;\n\t\t}\n\n\t\tcurl_close($ch);\n\t\t\n\t\treturn $msg_response;\n\t\t//echo $output;\n\t}", "title": "" }, { "docid": "8dec9b15037a04c4e985c57fc617532f", "score": "0.5806141", "text": "public function actionIndex()\n {\n $t = \\Yii::$app->sms->send(['xxx'=> [1]], 'XXT');\n var_dump($t);\n }", "title": "" }, { "docid": "3b52441a3c67265020353ecb32852e43", "score": "0.5799487", "text": "public function queueManagement(int $mid){\n\t\t// \n\t\t// A queue number is added in mailbox table for getting the last queue number of the user, the queue number should not be used for sent folder because they are the emails which are send by us not came from them.\n\t\t// \n\t\t// Initially the folder should take the emails in send but when the project starts the send emails are not necessarily be taken from the email box of gmail etc or it can be taken into consideration but they will create a confustion as, to whom the reply will be associated.\n\t}", "title": "" }, { "docid": "53deb4aa491526690086d4278a2debde", "score": "0.5793523", "text": "function sendMessage($mobile,$message){\n $postData = '';\n $params=array('Token' =>Way2Sms::$token,'mobile'=>$mobile,'name'=>\"Sender\",'ssaction'=>\"qs\",'message'=>$message,'msgLen'=>4 );\n //create name value pairs seperated by &\n foreach($params as $k => $v) \n { \n $postData .= $k . '='.$v.'&'; \n }\n $postData = rtrim($postData, '&');\n $url = \"http://site24.way2sms.com/smstoss.action\";\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL,$url);\n curl_setopt($ch, CURLOPT_HEADER,true); \n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_POST, count($postData));\n curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); \n $tmpfname = dirname(__FILE__).\"/cookies/cookiefile\";\n curl_setopt($ch, CURLOPT_COOKIEFILE, $tmpfname);\n $result = curl_exec($ch); \n unlink(\"cookies/cookiefile\");\n curl_close($ch);\n\t}", "title": "" }, { "docid": "ccfa3eb072f88727d0b577af47c09cd3", "score": "0.5792836", "text": "function send($to,$subject,$text) {\n try{\n $conn = new AMQPConnection($this->rabbitMQConf['host'], \n $this->rabbitMQConf['port'],\n $this->rabbitMQConf['user'],\n $this->rabbitMQConf['pass']);\n\n $channel = $conn->channel();\n\n $channel->access_request($this->rabbitMQConf['virtualHost'], false, false, true, true);\n\n $mailData = array(\"to\"=>$to,\n \"subject\"=>$subject,\n \"text\"=>$text);\n\n $mailDataToJson = json_encode($mailData);\n \n $msg = new AMQPMessage($mailDataToJson, array('content_type' => 'text/plain'));\n $channel->basic_publish($msg, $this->queueConf['exchange']);\n\n $channel->close();\n $conn->close();\n \n return true;\n }\n catch(Exception $e) {\n echo \"Something went wrong \".$e->getMessage();\n }\n\n }", "title": "" }, { "docid": "0c09c76c5e665e5290ae6ad012dc2233", "score": "0.57854325", "text": "function sendSMS($recipient, $message){\r\n \t$ch = curl_init();\r\n\t\tcurl_setopt($ch, CURLOPT_URL, \"SMS STRING GIVEN BY SMS SERVICE PROVIDER\");\r\n\t\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER,1);\r\n\t\t$result = curl_exec($ch);\r\n\t\tcurl_close($ch);\r\n\t\treturn $result;\r\n }", "title": "" }, { "docid": "739547acf3e93bb3a4641ca11f334f98", "score": "0.5782922", "text": "public function queueOn($queue, $numbers = null, $message = null, $type = null);", "title": "" }, { "docid": "5d2772a98dbbdb24e27704b35cda7afb", "score": "0.57727826", "text": "public function send_sms($order_no=null,$customer_id=null,$type=null){\n\n $CI =& get_instance();\n $CI->load->model('dashboard/Sms_model','sms_model');\n $gateway = $CI->sms_model->retrieve_active_getway();\n $sms_template = $CI->db->select('*')->from('sms_template')->where('type',$type)->get()->row();\n $sms = $CI->db->select('*')->from('sms_configuration')->get()->row();\n\t\t$customer_info=$CI->db->select('customer_phone')->from('customer_info')->where('customer_id',$customer_id)->get()->row();\n\t\t$recipients = $customer_info->customer_phone;\n\t\t\n\t\t $sms_type= strtolower($sms_template->type);\n if($sms_type == \"neworder\" || $sms_type == \"completeorder\" || $sms_type == \"processing\" || $sms_type == \"cancel\"){ \n $message= str_replace('{id}', $order_no, $sms_template->message);\n }\n if(1 == $gateway->id ){\n\n\n /****************************\n * SMSRank Gateway Setup\n ****************************/\n $CI =& get_instance();\n $url = \"http://api.smsrank.com/sms/1/text/singles\"; \n $username = $gateway->user_name;\n $password=base64_encode($gateway->password); \n $message=base64_encode($message);\n $curl = curl_init();\n\n curl_setopt($curl, CURLOPT_URL, \"$url?username=$username&password=$password&to=$recipients&text=$message\");\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n $agent = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)';\n curl_setopt($curl, CURLOPT_USERAGENT, $agent);\n $output = json_decode(curl_exec($curl), true);\n return true;\n curl_close($curl);\n }\n if( 2 == $gateway->id ){\n /****************************\n * nexmo Gateway Setup\n ****************************/\n $api = $gateway->user_name;\n $secret_key = $gateway->password;\n $message = $message;\n $from = $gateway->sms_from; \n\n $data = array(\n 'from' => $from,\n 'text' => $message,\n 'to' => $recipients\n );\n require_once APPPATH.'libraries/nexmo/vendor/autoload.php';\n $basic = new \\Nexmo\\Client\\Credentials\\Basic($api, $secret_key);\n $client = new \\Nexmo\\Client($basic);\n $message = $client->message()->send($data);\n if(!$message) \n { \n return json_encode(array(\n 'status' => false,\n 'message' => 'Curl error: '\n ));\n } else { \n return json_encode(array(\n 'status' => true,\n 'message' => \"success: \"\n )); \n }\n }\n\n if( 3 == $gateway->id ){\n /****************************\n * budgetsms Gateway Setup\n ****************************/\n $message = $message;\n $from = $gateway->sms_from; \n $userid = $gateway->userid; \n $username = $gateway->user_name; \n $handle = $gateway->password; \n\n $data = array(\n 'handle' => $handle,\n 'username' => $username,\n 'userid' => $userid,\n 'from' => $from,\n 'msg' => $message,\n 'to' => $recipients\n );\n\t\t\t\t\n\t\t$url = \"https://api.budgetsms.net/sendsms/?\"; \n\n $curl = curl_init($url);\n curl_setopt($curl, CURLOPT_POST, 1);\n curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n $response = curl_exec($curl); \n\t\t \n if(curl_errno($curl)) \n { \n return json_encode(array(\n 'status' => false,\n 'message' => 'Curl error: ' . curl_error($curl)\n ));\n } else { \n return json_encode(array(\n 'status' => true,\n 'message' => \"success: \". $response\n )); \n } \n\n curl_close($curl);\n\n\n }\n\n}", "title": "" }, { "docid": "cd2a42fbba8307e5e7502ffb8140b99f", "score": "0.57727194", "text": "function sendSmsDynamic1($con,$caid, $msg, $mobile, $schedule=\"\", $sentid=\"\", $action=1)\n{\n $sttSms = \"select * from sms_info where caid='$caid'\";\n\t$sqlSms = mysqli_query($con,$sttSms);\n\t$cntsms = mysqli_num_rows($sqlSms);\n\tif($cntsms==0)\n\t{\n\t $caid=1;\n\t}\n\t$sttSms = \"select * from sms_info where caid='$caid'\";\n\t$sqlSms = mysqli_query($con,$sttSms);\n\t$rowSms = mysqli_fetch_assoc($sqlSms);\n\t//die;\n\t\n\t$smsuname = $rowSms['smsuname']; // sms user name \n\t$smspass = $rowSms['smspass']; // sms password \n\t$smssender = $rowSms['smssender']; // sms sender id\n\t$veruname = $rowSms['veruname']; // variable name of user name\n\t$verpass = $rowSms['verpass']; // variable name of password\n\t$versender = $rowSms['versender']; // variable name of sender id\n\t$vermessage = $rowSms['vermessage']; // variable name of message\n\t$vermob = $rowSms['vermob']; // variable name of to (mobile no)\n\t\n\t$verdate = $rowSms['verdate']; // variable of date field for schedule sms\n\t$verpatter = $rowSms['verpatter']; // pattern of date field e.g. ddmmyyyy\n\t$working_key = $rowSms['working_key'];// working key\n\t$verkey = $rowSms['verkey']; // variable name of working key\n\t\n\t$api_url = $rowSms['api_url']; // API URL\n\t$send_api = $rowSms['send_api']; // sending page name \n\t\n\t$chk_bal_api = $rowSms['chk_bal_api'];// balance check api\n\t$sch_api = $rowSms['sch_api']; // schedule api\n\t$status_api = $rowSms['status_api']; // status api\n\t\n\t\n\t//echo \"Called\";\n\t$request = \"\"; //initialize the request variable\n\t\n\tif($working_key == \"\")\n\t{\n\t\t$param[$veruname] = $smsuname; //this is the username of our TM4B account\n\t\t$param[$verpass] = $smspass; //this is the password of our TM4B account\n\t\t\n\t\tif($action==1)\n\t\t$param[$vermob] = $mobile; //these are the recipients of the message\n\t}\n\telse\n\t{\n\t\t$param[$verkey] = $working_key; //this is the key of our TM4B account\n\t\t\n\t\tif($action==1)\n\t\t$param[$vermob] = \"91\".$mobile; //these are the recipients of the message\n\t}\n\t\n\tif($action==1)\n\t{\n\t\t$param[$versender] = $smssender;//this is our sender \n\t\t$param[$vermessage] = $msg; //this is the message that we want to send\n\t}\n\telse if($action==2)\n\t{\n\t\t$param['messageid'] = $sentid;//this is our sender \n\t}\n\t\n\t// for schedule //\n\tif($schedule!=\"\")\n\t{\n\t\t$timearr = explode(\" \",$schedule);\n\t\t\n\t\t$dateoftime = $timearr[0];\n\t\t$timeoftime = $timearr[1];\n\t\t\n\t\t$datearr = explode(\"-\",$dateoftime); // explode Date //\n\t\t$yyyy = $datearr[0]; // year\n\t\t$mm = $datearr[1]; // month\n\t\t$dd = $datearr[2]; // day\n\t\t\n\t\t$datearr = explode(\":\",$timeoftime);\n\t\t$hh = $datearr[0];\n\t\t$mmt = $datearr[1];\n\t\t$ss = $datearr[2];\n\t\t\n\t\t$scdltime = strtolower($verpatter);\n\t\t$scdltime = str_replace(\"yyyy\",$yyyy,$scdltime);\n\t\t$scdltime = str_replace(\"dd\",$dd,$scdltime);\n\t\t$scdltime = str_replace(\"hh\",$hh,$scdltime);\n\t\t$scdltime = str_replace(\"ss\",$ss,$scdltime);\n\t\t$scdltime = preg_replace('/mm/i', $mm, $scdltime, 1);\n\t\t$scdltime = str_replace(\"mm\",$mmt,$scdltime);\n\t\t\n\t\t\n\t\t $param[$verdate] = $scdltime; //this is the schedule datetime //\n\t\t\n\t}\n\t//print_r($param);\t\n\tforeach($param as $key=>$val) //traverse through each member of the param array\n\t{ \n\t\t$request.= $key.\"=\".urlencode($val); //we have to urlencode the values\n\t\t$request.= \"&\"; //append the ampersand (&) sign after each paramter/value pair\n\t}\n\t$request = substr($request, 0, strlen($request)-1); //remove the final ampersand sign from the request\n\t//echo $request;\n\n\tif($action==\"1\") // 1 for send sms //\n\t$process_api = trim($send_api,\"/\");\n\telse if($action==\"2\") // 2 for Delivery report //\n\t$process_api = trim($status_api,\"/\");\n\telse if($action==\"3\") // 3 for check balance //\n\t$process_api = trim($chk_bal_api,\"/\");\n\t\n\t\n\t//First prepare the info that relates to the connection\n\t$host = $api_url;\n\t$script = \"/$process_api\";\n\t$request_length = strlen($request);\n\t$method = \"POST\"; // must be POST if sending multiple messages\n\tif ($method == \"GET\") \n\t{\n\t $script .= \"?$request\";\n\t}\n\t\n\t//Now comes the header which we are going to post. \n\t$header = \"$method $script HTTP/1.1\\r\\n\";\n\t$header .= \"Host: $host\\r\\n\";\n\t$header .= \"Content-Type: application/x-www-form-urlencoded\\r\\n\";\n\t$header .= \"Content-Length: $request_length\\r\\n\";\n\t$header .= \"Connection: close\\r\\n\\r\\n\";\n\t$header .= \"$request\\r\\n\";\n\t\n\t//echo $header;\n\t//Now we open up the connection\n\t$socket = @fsockopen($host, 80, $errno, $errstr); \n\tif ($socket) //if its open, then...\n\t{ \n\t fputs($socket, $header); // send the details over\n\t while(!feof($socket))\n\t {\n\t\t $output[] = fgets($socket); //get the results \n\t\t\t\t\n\t }\n\t fclose($socket); \n\t}\n\t\n\tif($action==1)\n\t{ \n\t\t$cntOutput = count($output);\n\t\t$lastValue = $output[$cntOutput-1];\n\t\t$expLastValue = explode(\"=\",$lastValue);\n\t\t$cntLastValue = count($expLastValue);\n\t\t$messageid = $expLastValue[$cntLastValue-1];\n\t\t\n\t\treturn $messageid;\n\t}\n\telse if($action==2 || $action==3)\n\t{\n\t\treturn $output;\n\t}\n}", "title": "" }, { "docid": "a2a2c67b4ff8cb4a9bc0ed40e8ee11bc", "score": "0.57671994", "text": "function sendSingleSMS($username, $encryp_password, $senderid, $message, $mobileno, $deptSecureKey) {\n $key = hash('sha512', trim($username) . trim($senderid) . trim($message) . trim($deptSecureKey));\n $data = array(\n \"username\" => trim($username),\n \"password\" => trim($encryp_password),\n \"senderid\" => trim($senderid),\n \"content\" => trim($message),\n \"smsservicetype\" => \"singlemsg\",\n \"mobileno\" => trim($mobileno),\n \"key\" => trim($key)\n );\n return post_to_url(\"https://msdgweb.mgov.gov.in/esms/sendsmsrequest\", $data); //calling post_to_url to send sms \n}", "title": "" }, { "docid": "d7bec83a549542cb13e6faabd6104ca7", "score": "0.5759677", "text": "function ext_sms($rec_sms) {\n\n $array=explode(\" \",$rec_sms); \n if($array[0]==\"+\") \n {\n require('functions/fget_huawei.php'); \n return ext_huawei($rec_sms);\n }\n\n else {\n require('functions/fget_ZTE.php');\n return ext_ZTE($rec_sms);\n }\n \n }", "title": "" }, { "docid": "6ed9bb3358383a25ddb68d18bdafce22", "score": "0.57591945", "text": "public function send_sms($to, $message)\n\t{\n\t\t// Are there multiple receivers?\n\t\tif(is_array($to)) $to = implode(',', $to);\n\t\t\n\t\t// Prepare the message\n\t\t//$message = urlencode($message);\n\t\t\n\t\t// Build the request\n\t\t/*$request_old = array(\n\t\t\t\t\t'sender_id'\t=> $this->sms['sender_id'],\n\t\t\t\t\t'token' => $this->sms['token'],\n\t\t\t\t\t'msisdn'\t=> $to,\n\t\t\t\t\t'text'\t\t=> $message,\n 'route' => 'TRANS',\n 'unicode' =>'false',\n 'flash' =>'false'\n //'time' => 200812110950,//date('YmdHi'),\n //'senderid' => 'testSenderID'\n\t\t\t\t);\n */\n \n $request = array(\t\n\t\t\t\t\t'username' => $this->sms['username'],\n 'password' => $this->sms['password'],\n\t\t\t\t\t'type'\t => '0',\n\t\t\t\t\t'dlr'\t => '1',\n\t\t\t\t\t'destination'\t=> $to,\n 'source'\t=> $this->sms['sender_id'],\n\t\t\t\t\t'message'\t=> $message\n );\n \n \n\t\t\n\t\t// cUrl is the preferred method to send the request\n\t\tif($this->curl){\n\t\t\t$ch = curl_init($this->url . '?' . http_build_query($request));\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\t\t//curl_setopt($ch, CURLOPT_TIMEOUT, '5');\n\t\t\t//curl_setopt($ch, CURLOPT_POST, 1);\n\t\t\t//curl_setopt($ch, CURLOPT_POSTFIELDS, $request);\n\t\t\t$result = trim(curl_exec($ch));\n \n\t\t} else {\n\t\t\t$request = $this->url . '?' . http_build_query($request);\n\t\t\t$result = file_get_contents($request);\n\t\t}\n\t\t\n\t\t$this->last_reply = $result;\n\t\t\n\t\t// If the reply wasn't empty, it shouldn't contain errors\n\t\tif(!empty($this->last_reply)){\n\t\t\treturn !preg_match(\"/ERR/\", $this->last_reply);\n\t\t}\n\t\t\n\t\t// The reply was empty\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "9865afeef6aeb4ec991e3d2550dddda9", "score": "0.5757834", "text": "function sendSms( $text, $from, $to, &$errMsg )\n {\n $user \t\t= &$this->_params['smsuser'];\n $pw \t\t= &$this->_params['smspassword'];\n $gw \t\t= &$this->_params['smsgateway'];\n $type\t \t= &$this->_params['smstype'];\n\n \n $host = 'post.agiletelecom.com';\n $fp = fsockopen( $host, 80 );\n \n if( $fp == false )\n {\n \t$errMsg = JText::_( 'MYSMS_ERROR' ) . ': Network'; \t\n \treturn false;\n }\n \n // we cannot use the buildQuery method because the server side does not understand &amp; :/\n $payload = \"smsTEXT=$text&smsNUMBER=$to&smsSENDER=$from&smsTYPE$type&smsGATEWAY&$gw&smsUSER=$user&smsPASSWORD=$pw\";\n\n //do it the old way because the server send 2 http status codes\n \n /*\n * Array\n(\n [0] => HTTP/1.1 100 Continue\n [1] => Server: SMSDriver POST/1.0\n [2] => Date: mar, 31 mar 2009 18:52:30 GMT\n [3] => \n [4] => HTTP/1.1 200 OK\n [5] => Server: SMSDriver POST/1.0\n [6] => Date: mar, 31 mar 2009 18:52:30 GMT\n [7] => Content-Length: 130\n [8] => Content-Type: text/html\n [9] => Set-Cookie: ASPSESSIONIDACCSTDCT=MDKLNEGAJIIHAMFJIDBLNBIM; path=/\n [10] => Cache-control: private\n [11] => \n [12] => \n [13] => \n [14] => \n [15] => \n [16] => [17] => \n [18] => -Err 007 Message not enabled\n [19] => [20] => [21] => \n)\n */\n fputs($fp, \"POST /smshurricane3.0.asp HTTP/1.1\\n\");\n fputs($fp, \"Host: $host\\n\");\n fputs($fp, \"Content-type: application/x-www-form-urlencoded\\n\");\n fputs($fp, \"Content-length: \".strlen($payload).\"\\n\");\n fputs($fp, \"Connection: close\\n\\n\");\n fputs($fp, \"$payload\\n\");\n \n while( !feof( $fp ) ) \n {\n \t$res .= fgets($fp, 128);\n }\n \n fclose($fp);\n \n $data = strip_tags( $res );\n\n if( eregi( '-Err', $data ) )\n {\n \t$data = explode( \"\\r\\n\", $data );\n \t\n \tforeach ( $data as $line )\n \t{\n \t\t\n \t\tif( eregi( '-Err', $line ) )\n \t\t{\n \t\t\t$errMsg = JText::_( 'MYSMS_ERROR' ) . $line;\n \t\t\treturn false;\n \t\t}\n \t}\n \t\n \t $errMsg = _JText::_( 'MYSMS_ERROR' ) . ': Provider';\n \t return false;\n }\n \n\t\treturn true;\n }", "title": "" }, { "docid": "1fd32b6702585ba2fbaf7d8b517dcda8", "score": "0.57562727", "text": "public function sms(): SMS\n {\n return self::instance()->runner->sms();\n }", "title": "" }, { "docid": "2dc0d850a9cdd65f500049559b924c8c", "score": "0.5749159", "text": "public function popQueueMessagesExtern($params = null);", "title": "" }, { "docid": "5a01d933e4194e9c262c490040a9f56b", "score": "0.5748923", "text": "public function sendSMS($Phoneno,$Message)\n\t{\n //Your authentication key\n $authKey = \"191431AStibz285a4f14b4\";\n\n //Multiple mobiles numbers separated by comma\n $mobileNumber = \"$Phoneno\";\n\n //Sender ID,While using route4 sender id should be 6 characters long.\n $senderId = \"TTNULM\";\n\n //Your message to send, Add URL encoding here.\n $message = urlencode($Message);\n\n //Define route\n $route = \"transactional\";\n\n //Prepare you post parameters\n $postData = array(\n 'authkey' => $authKey,\n 'mobiles' => $mobileNumber,\n 'message' => $message,\n 'sender' => $senderId,\n 'route' => $route\n );\n\n //API URL\n $url=\"https://control.msg91.com/api/sendhttp.php\";\n\n // init the resource\n $ch = curl_init();\n curl_setopt_array($ch, array(\n CURLOPT_URL => $url,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_POST => true,\n CURLOPT_POSTFIELDS => $postData\n //,CURLOPT_FOLLOWLOCATION => true\n ));\n\n\n //Ignore SSL certificate verification\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n\n\n //get response\n $output = curl_exec($ch);\n\n //Print error if any\n if(curl_errno($ch))\n {\n echo 'error:' . curl_error($ch);\n }\n\n curl_close($ch);\n\t}", "title": "" }, { "docid": "29d209916c3e2db552af3e25ee6143e7", "score": "0.5734341", "text": "function recive_sms(){\n // 'originalsenderid' => '+19179354988',\n // 'body' => 'Chat with you started 5157248',\n // 'message' => 'Chat with you started 5157248',\n // 'sms' => '+16102231415',\n // 'custom_string' => '',\n // 'to' =>'+16102231415',\n // 'original_message_id' => '',\n // 'originalmessageid' => '',\n // 'customstring' => '',\n // 'from' => '+918591041420',\n // 'originalmessage' => '',\n // 'user_id' => '73872',\n // 'subaccount_id' => '86325',\n // 'original_body' => '',\n // 'timestamp' => '1556179523',\n // 'message_id' => 'FBF799B1-2BDC-4D29-86EE-4F9EC69931D7',\n // );\n App::save_data('log_data',array('log_type'=>'sms_receive','log_data'=> json_encode($_POST) ) );\n if(isset($_POST['to'] ) ){\n $to_sms = $_POST['to'];\n $from_sms = $_POST['message'];\n $raw = json_encode($_POST);\n $timestamp = $_POST['timestamp'];\n $datetime = date('Y:m:d H:i:s');\n \n // $from_sms_api = (array) App::get_by_where('leads_sms', array('sms_to'=>$to_sms) );\n \n $newstring = substr($to_sms, -10);\n $this->db->select('*');\n $this->db->from('leads');\n $this->db->like(\"phone\",\"$newstring\");\n $query=$this->db->get();\n $from_sms_api = $query->row();\n \n $leadData = array(\n 'lead_id' =>$from_sms_api->id,\n 'sms_text' => $from_sms,\n 'sms_to' => $to_sms,\n 'sms_type' => 'in',\n 'sms_time' => $datetime,\n );\n App::save_data( 'leads_sms',$leadData);\n App::create_activity('lead_activity',$from_sms_api->id,'SMS Received',json_encode($_POST));\n }\n }", "title": "" }, { "docid": "7db963e62dd6289a94953a6d307656d3", "score": "0.57295597", "text": "function sendSmsMessage($in_phoneNumber, $in_msg)\n\t{\n\t\t//http://api.clickatell.com/http/sendmsg?user=sadasow&password=cogb0e25&api_id=3376817&to=221775312740&text=Message\n\n\t\t//en local via frontlinesms\n\t\t//$url = '/send/sms/'.urlencode(utf8_encode($in_phoneNumber)).'/'.urlencode(utf8_encode($in_msg));\n\t\t//$results = file('http://localhost:8011'.$url);\n\n\t\t//via clickatell\n\t\t$url = urlencode(utf8_encode($in_phoneNumber)).'&text='.urlencode(utf8_encode($in_msg));\n\t\t$results = file('http://api.clickatell.com/http/sendmsg?user=sadasow&password=cogb0e25&api_id=3376817&to='.$url);\n\n\n\t}", "title": "" }, { "docid": "e5a2ed511515911062d447773c550f96", "score": "0.57260317", "text": "function se_sms($user_id = 0) {\n\n\t $this->user_id = $user_id;\n\n\t}", "title": "" }, { "docid": "a6304285b44ab0f2c97aba4731c6c419", "score": "0.5720575", "text": "public function test_sms(){\n // $data = file_get_contents($URL);\n $ch = curl_init();// init curl\n curl_setopt($ch, CURLOPT_URL,\"http://bulksms.alayada.com/vendorsms/pushsms.aspx\");\n curl_setopt($ch, CURLOPT_POST, 1);// set post data to true\n /*transactional*/\n //curl_setopt($ch, CURLOPT_POSTFIELDS,\"user=chetanjsheth&password=C123123H1212&msisdn=9979584783&sid=ALAIPL&msg=Dear Parents , Your Child Chirag janjmera has come to school at 9:30am 23 March 2017.&fl=0&gwid=2\");// post data\n /*\n Promotional*/\n\n curl_setopt($ch, CURLOPT_POSTFIELDS,\"user=chetanjsheth&password=C123123H1212&msisdn=9979584783&sid=WEBSMS&msg=Dear Parents , Your Child Chirag janjmera has come to school at 9:30am 23 March 2017.&fl=0\");// post data\n\n // receive server response ...\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);// gives you a response from the server \n\n $response = curl_exec ($ch);// response it ouputed in the response var\n\n curl_close ($ch);// close curl connection\n return $response;\n }", "title": "" }, { "docid": "2bfde9e30ed2b782d2a3435b62a32619", "score": "0.5718876", "text": "public function processQueue()\n {\n $gate_arr = config('gates');\n foreach ($gate_arr as $gate_item) {\n $this->sendSmsOne($gate_item['name']);\n }\n }", "title": "" }, { "docid": "85f8ceaf683f8ce7001f1befab16224d", "score": "0.5711007", "text": "function sendSMS($mobile,$smsurl,$smsusername,$smspassword,$smssenderid,$text1)\n{\n \n \n $text=str_replace(\" \",\"%20\",$text1);\n $qry_str = $smsurl.$smsusername.\"&password=\".$smspassword.\"&to=\".$mobile.\"&from=\".$smssenderid.\"&message=\".$text;\n echo \"Server returns: \" .$qry_str;\n $qrystr = $qry_str;\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL,$qry_str);\n //echo $ch.\"<br>\"; \n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_TIMEOUT, '5');\n $content = trim(curl_exec($ch));\n curl_close($ch);\n $status=true;\n \n // SMS REQUEST SENT END //\n}", "title": "" }, { "docid": "036bc17fb8ac0368621eccf90469da4d", "score": "0.57098675", "text": "public function sendMessage(){\n\n\n }", "title": "" }, { "docid": "bd8def21ece6c893aaf7df8a326cf205", "score": "0.5706159", "text": "public function send_sms($message, $msisdn){\n\t\t$url = \"http://smgw1.yo.co.ug:9100/sendsms\";\n\t\t$url .= \"?ybsacctno=\".$this->username;\n\t\t$url .= \"&password=\".$this->password;\n\t\t$url .= \"&origin=\".$this->origin;\n\t\t$url .= \"&sms_content=\".urlencode($message);\n\t\t$url .= \"&destinations=\".$msisdn;\n\n\t\t$curl = curl_init();\n\t\tcurl_setopt_array($curl, array(\n\t\t CURLOPT_RETURNTRANSFER => 1,\n\t\t CURLOPT_VERBOSE=>false,\n\t\t CURLOPT_URL => $url,\n\t\t));\n\t\t$response = curl_exec($curl);\n\t\tcurl_close($curl);\n\n\t\tparse_str($response, $result);\n\t\tif(isset($result['ybs_autocreate_status']) && ($result['ybs_autocreate_status']=='OK')){\n\t\t\treturn array('status'=>'OK');\n\t\t}\n\t\treturn array('status'=>'ERROR', 'message'=>$result['ybs_autocreate_message']);\n\t}", "title": "" }, { "docid": "90cec25077f240a55691c35229c49976", "score": "0.57055396", "text": "function sendsmsPOST($mobileNumber, $senderId, $routeId, $message, $serverUrl, $authKey)\n {\n $postData = array(\n 'mobileNumbers' => $mobileNumber,\n 'smsContent' => $message,\n 'senderId' => $senderId,\n 'routeId' => $routeId,\n \"smsContentType\" => 'english'\n );\n\n $data_json = json_encode($postData);\n\n $url = \"http://\" . $serverUrl . \"/rest/services/sendSMS/sendGroupSms?AUTH_KEY=\" . $authKey;\n //$url=\"http://\".$serverUrl.\"/rest/services/sendSMS/sendCustomGroupSms?AUTH_KEY=\".$authKey;\n\n // init the resource\n $ch = curl_init();\n\n curl_setopt_array($ch, array(\n CURLOPT_URL => $url,\n CURLOPT_HTTPHEADER => array('Content-Type: application/json', 'Content-Length: ' . strlen($data_json)),\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_POST => true,\n CURLOPT_POSTFIELDS => $data_json,\n CURLOPT_SSL_VERIFYHOST => 0,\n CURLOPT_SSL_VERIFYPEER => 0\n ));\n\n //get response\n $output = curl_exec($ch);\n\n\n //Print error if any\n if (curl_errno($ch)) {\n echo 'error:' . curl_error($ch);\n }\n curl_close($ch);\n return $output;\n }", "title": "" }, { "docid": "6e608beacdd091bb09241c96647c1c6f", "score": "0.57009137", "text": "function process_message($sender,$message){\n $date_time = date(\"Y/m/d H:i:s\"); \n\n //insert details to message into recsms table\n $query = \"INSERT INTO recsms (date_time,msg,sender_num) VALUES ('$date_time','$message','$sender') \";\n $result_set= mysqli_query($connection,$query);\n if($result_set) {\n \n //echo \"Record has been saved successfully!\";\n \n } \n else {\n // echo \"Record Entry Failed !\";\n }\n\n //getting the id of the entered sms(or last entered row)\n $query= \"SELECT * FROM recsms ORDER BY id DESC LIMIT 1\";\n $result_set= mysqli_query($connection,$query);\n $row=mysqli_fetch_assoc($result_set);\n $rec_id=$row[\"id\"]; //this is the same id for corresponding send message allowing user to crosscheck based on id\n\n //function to seperate based on vendors and output the extracted parts accordingly\n function ext_sms($rec_sms) {\n\n $array=explode(\" \",$rec_sms); \n if($array[0]==\"+\") \n {\n require('functions/fget_huawei.php'); \n return ext_huawei($rec_sms);\n }\n\n else {\n require('functions/fget_ZTE.php');\n return ext_ZTE($rec_sms);\n }\n \n }\n \n $array= ext_sms($message);\n\n //entering region code,alarm name and date-time from received sms into variables\n $region_code=$array['region_code'];\n $alarm=$array['alarm_name'];\n $date_time=$array['date_time'];\n\n //checking weather filtering is enabled for the particular alarm\n $query=\"SELECT* FROM filtersms WHERE alarm_name='$alarm' LIMIT 1\";\n $result_set= mysqli_query($connection,$query);\n\n if (isset($result_set)) { //isset in case alarm name becomes unavailable\n $row = mysqli_fetch_assoc($result_set);\n $filter_alarm = $row['filter_op']; \n \n //code to store sending sms to a single string variable\n $send_message=\"Region : \".$region.\" ; \".\"Alarm : \".$alarm.\" ; \".\"Occurrence : \".$date_time;\n\n if ($filter_alarm == \"1\") { \n\n //taking corresponding region name from regions table\n $query=\"SELECT* FROM regions WHERE region_code='$region_code' LIMIT 1\";\n $result_set= mysqli_query($connection,$query);\n \n if (isset($result_set)) { //isset in case a region_code becomes unavailable\n $row = mysqli_fetch_assoc($result_set);\n $region = $row['region_name'];\n \n //CODE TO SEND SMS\n \n //calling smppclass to send sms\n include ('smppclass.php');\n \n //setting SMPP parameters for sending sms\n $smpphost = \"172.22.88.150\"; //******SPECIFY SMSC IP TO SEND SMS HERE*******\n $smppport = 5020; //******SPECIFY SMSC PORT NUMBER TO SEND SMS HERE*******\n $systemid = \"NOCAlert\"; //******SPECIFY ID TO BIND TRANSMITTER NUMBER HERE*******\n $password = \"noc123\"; //******SPECIFY PASSWORD TO BIND TRANSMITTER NUMBER HERE*******\n $system_type = \"INOC\";\n $from = \"INOC\";\n $smpp = new SMPPClass();\n \n \n $messagefinalstat = \"Ok\";\n $message_sts = \"\";\n \n \n \n //selecting mobile numbers for the respective region\n $query = \" SELECT * FROM regions WHERE region_code = '$region_code'\";\n $result_set= mysqli_query($connection,$query);\n \n $numbersarray = array();\n\n //entering region mobile numbers to an array\n while ($row = mysqli_fetch_assoc($result_set)) {\n \n array_push($numbersarray, $row['mobile_num']);\n \n }\n \n $numberten = \"\";\n for ($ii = 0; $ii < count($numbersarray); $ii++) {\n \n $numbersarray .= $numbersarray[$ii] . \",\";\n }\n\n $numbersarray = rtrim($numbersarray, \",\");\n \n $smpp->SetSender($from);\n $smpp->Start($smpphost, $smppport, $systemid, $password, $system_type);\n $smpp->TestLink();\n \n $smpp->SendMulti($numbersarray, $send_message);\n $smpp->End();\n\n // $msg_status = \"Sent\";\n //Following part addded according to smpp protocol to see success\n \n $message_sts = \"Send Failed\";\n if ($smpp->get_last_message_status() != 0) {\n $message_sts = \"Send Failed\";\n // echo 'Error';\n } else {\n $message_sts = \"Send Success\";\n }\n\n\n } //end isset region_code\n \n } //end if filter alarm\n\n else { $msg_status = \"Not Sent\"; } //not sent when not filtered\n\n //entering data to the sentsms table\n $query= \"INSERT INTO sentsms (id,date_time,region_name,alarm_name,ack) VALUES ($rec_id,'$date_time','$region','$alarm','$msg_status')\";\n $result_set= mysqli_query($connection,$query);\n\n } //end isset alarm_name\n\n }", "title": "" }, { "docid": "cf5d83c4a7dac2a4af9ea9fdfb9b6bb5", "score": "0.56870776", "text": "function sendSmsdynamic($link,$msg, $mobile, $schedule=\"\", $sentid=\"\", $action=1,$lang=0)\n{\n\t//$smspass = \"Right@12\";//$rowSms['smspass']; // sms password \n\t//$smssender = \"PROSYS\"; //$rowSms['smssender']; // sms sender id\t\n\t\n\t$smsuname = \"opencompas\"; //$rowSms['smsuname']; // sms user name \n\t$smspass = \"welcome@123\";//$rowSms['smspass']; // sms password \n\t$smssender = \"COMPAS\"; //$rowSms['smssender']; // sms sender id\n\t$veruname = \"username\"; //$rowSms['veruname']; // variable name of user name\n\t$verpass = \"pass\";//$rowSms['verpass']; // variable name of password\n\t$versender = \"senderid\";//$rowSms['versender']; // variable name of sender id\n\t$vermessage = \"message\";//$rowSms['vermessage']; // variable name of message\n\t$vermob = \"dest_mobileno\";//$rowSms['vermob']; // variable name of to (mobile no)\n\t\n\t$verdate = \"dt\";//$rowSms['verdate']; // variable of date field for schedule sms\n\t$verpatter = \"yyyy-mm-dd hh:mm:ss\";//$rowSms['verpatter']; // pattern of date field e.g. ddmmyyyy\n\t$working_key = \"\"; //$rowSms['working_key'];// working key\n\t$verkey = \"workingkey\";// $rowSms['verkey']; // variable name of working key\n\t\n\t$api_url = \"smsjust.com\";//\"dndsms.reliableindya.info\";//$rowSms['api_url']; // API URL\n\t$send_api = \"/sms/user/urlsms.php\";//$rowSms['send_api']; // sending page name \n\t\n\t$chk_bal_api = \"/sms/user/balance_check.php\";//$rowSms['chk_bal_api'];// balance check api\n\t$sch_api = \"/sms/user/urlsms.php\";// $rowSms['sch_api']; // schedule api\n\t$status_api = \"/sms/user/response.php\";//$rowSms['status_api']; // status api\n\t\n\t\n\t//echo \"Called\";\n\t$request = \"\"; //initialize the request variable\n\tif($api_url==\"smsjust.com\" )\n\t{\n\t\t$api_url='smsjust.com';\n\t\t$host='smsjust.com';\n\t\t$ch = curl_init();\n\t}\n\t\n\tif($working_key == \"\")\n\t{\n\t\tif(($action==2 && ($api_url == \"smsjust.com\" )))\n\t\t{\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$param[$veruname] = $smsuname; //this is the username of our TM4B account\n\t\t\t$param[$verpass] = $smspass; //this is the password of our TM4B account\n\t\t\t\n\t\t\tif($action==1)\n\t\t\t$param[$vermob] = $mobile; //these are the recipients of the message\n\t\t}\n\t}\n\telse\n\t{\n\t\tif(($action==2 && ($api_url == \"smsjust.com\")))\n\t\t{\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$param[$verkey] = $working_key; //this is the key of our TM4B account\n\t\t\t\n\t\t\tif($action==1)\n\t\t\t$param[$vermob] = \"91\".$mobile; //these are the recipients of the message\n\t\t}\n\t}\n\t\n\tif($action==1)\n\t{\n\t\t$param[$versender] = $smssender;//this is our sender \n\t\t$param[$vermessage] = $msg; //this is the message that we want to send\n\t}\n\telse if($action==2)\n\t{\n\t\tif($api_url == \"smsjust.com\" )\n\t\t{\n\t\t\t$param['Scheduleid'] =$sentid;\n\n\t\t}\n\t\telse\n\t\t{\n\t\t$param['messageid'] = $sentid;//this is our sender \n\t\t}\n\t}\n\tif(( $api_url==\"smsjust.com\") && $action!=2)\n\t{\n\t\t$param['response'] = 'Y';// variable name of responce for websms\n\t}\n\t// for schedule //\n\tif($schedule!=\"\")\n\t{\n\t\t$timearr = explode(\" \",$schedule);\n\t\t\n\t\t$dateoftime = $timearr[0];\n\t\t$timeoftime = $timearr[1];\n\t\t\n\t\t$datearr = explode(\"-\",$dateoftime); // explode Date //\n\t\t$yyyy = $datearr[0]; // year\n\t\t$mm = $datearr[1]; // month\n\t\t$dd = $datearr[2]; // day\n\t\t\n\t\t$datearr = explode(\":\",$timeoftime);\n\t\t$hh = $datearr[0];\n\t\t$mmt = $datearr[1];\n\t\t$ss = $datearr[2];\n\t\t\n\t\t$scdltime = strtolower($verpatter);\n\t\t$scdltime = str_replace(\"yyyy\",$yyyy,$scdltime);\n\t\t$scdltime = str_replace(\"dd\",$dd,$scdltime);\n\t\t$scdltime = str_replace(\"hh\",$hh,$scdltime);\n\t\t$scdltime = str_replace(\"ss\",$ss,$scdltime);\n\t\t$scdltime = preg_replace('/mm/i', $mm, $scdltime, 1);\n\t\t$scdltime = str_replace(\"mm\",$mmt,$scdltime);\n\t\tif(($api_url==\"smsjust.com\"))\n\t\t{\n\t\t\t$param['dt'] = \"$yyyy-$mm-$dd\";\n\t\t\t$param['tm'] = \"$hh-$mmt-$ss\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$param[$verdate] = $scdltime; //this is the schedule datetime //\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}\n\t//print_r($param);\t\n\tforeach($param as $key=>$val) //traverse through each member of the param array\n\t{ \n\t\t$request.= $key.\"=\".urlencode($val); //we have to urlencode the values\n\t\t$request.= \"&\"; //append the ampersand (&) sign after each paramter/value pair\n\t}\n\tif($lang!=0 && $api_url!=\"smsjust.com\")\n\t{\n\t\t$request.=\"unicode=1&\";\n\t}\n\telseif($lang!=0 && ($api_url==\"smsjust.com\"))\n\t{\n\t\t$request.=\"msgtype=UNI&\";\n\t}\n\t\n\t\n\t$request = substr($request, 0, strlen($request)-1); //remove the final ampersand sign from the request\n\t//echo $request;\n\n\tif($action==\"1\") // 1 for send sms //\n\t$process_api = trim($send_api,\"/\");\n\telse if($action==\"2\") // 2 for Delivery report //\n\t$process_api = trim($status_api,\"/\");\n\telse if($action==\"3\") // 3 for check balance //\n\t$process_api = trim($chk_bal_api,\"/\");\n\t\n\t\n\t//First prepare the info that relates to the connection\n\t$host = $api_url;\n\t$script = \"/$process_api\";\n\t$request_length = strlen($request);\n\t$method = \"POST\"; // must be POST if sending multiple messages\n\tif ($method == \"GET\") \n\t{\n\t $script .= \"?$request\";\n\t}\n\tif($api_url == \"smsjust.com\" )\n\t{\n\t\t $url=\"http://$host$script?$request\";\n\t\t curl_setopt($ch,CURLOPT_URL, $url);\n\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n\t\t$output= curl_exec($ch);\n\t\t\n\t\tcurl_close($ch);\n\t\t\n\t\t//if($action == 1)die;\n\t}\n\telse\n\t{\n\t\t//Now comes the header which we are going to post. \n\t\t$header = \"$method $script HTTP/1.1\\r\\n\";\n\t\t$header .= \"Host: $host\\r\\n\";\n\t\t$header .= \"Content-Type: application/x-www-form-urlencoded\\r\\n\";\n\t\t$header .= \"Content-Length: $request_length\\r\\n\";\n\t\t$header .= \"Connection: close\\r\\n\\r\\n\";\n\t\t$header .= \"$request\\r\\n\";\n\t\t\n\t\t//echo $header;\n\t\t//Now we open up the connection\n\t\t$socket = @fsockopen($host, 80, $errno, $errstr); \n\t\tif ($socket) //if its open, then...\n\t\t{ \n\t\t fputs($socket, $header); // send the details over\n\t\t while(!feof($socket))\n\t\t {\n\t\t\t $output[] = fgets($socket); //get the results \n\t\t\t\t\t\n\t\t }\n\t\t fclose($socket); \n\t\t}\n\t}\n\t\t\n\tif($action==1) // sent sms //\n\t{\n\t\tif($api_url==\"alerts.reliableindya.info\")\n\t\t{\n\t\t\t$cntOutput = count($output);\n\t\t\t$lastValue = $output[$cntOutput-1];\n\t\t\t\n\t\t\t$expLastValue = explode(\"=\",$lastValue);\n\t\t\t$cntLastValue = count($expLastValue);\n\t\t\t$messageid = $expLastValue[$cntLastValue-1];\n\t\t\t\n\t\t\treturn $messageid;\n\t\t}\n\t\telse if($api_url==\"dndsms.reliableindya.info\" || $api_url==\"bulk.reliableindya.info\" || $api_url==\"dndsms.reliableservices.org\")\n\t\t{\n\t\t\t//$messageid = trim($output[22]).\"||\".trim($output[21]);\n\t\t\t$messageid = trim($output[22]);\n\t\t\treturn $messageid; //substr($lastBal,4);\n\t\t}\n\t\tif($api_url==\"smsjust.com\")\n\t\t{\n\t\t\treturn $output;\n\t\t}\n\t\t\n\t}\n\telse if($action==2) // delivery report //\n\t{\n\t\treturn $output;\n\t}\n\telse if($action==3) // check balance //\n\t{\n\t\tif($api_url==\"alerts.reliableindya.info\")\n\t\t{\n\t\t\t$balamount = \"\";\n\t\t\t//print_r($output);\n\t\t\tforeach($output as $op)\n\t\t\t{\n\t\t\t\tif(strpos($op,'credits')!==false)\n\t\t\t\t$balamount = $op;\n\t\t\t}\n\t\t\t//return preg_replace(\"/[^0-9]/\",\"\",$output[9]);\n\t\t\treturn preg_replace(\"/[^0-9.]/\",\"\",$balamount);\n\t\t}\n\t\telse if($api_url==\"smsjust.com\")\n\t\t{\n\t\t\t$outArr = explode(\":\",$output);\n\t\t\t$output = trim($outArr[1]);\n\t\t\treturn $output;\n\t\t}\n\t}\n\t\n}", "title": "" }, { "docid": "8254fb1dfc6c96215cb7443f979fadba", "score": "0.5682592", "text": "function refund_sms_notification_send($tourwise_id)\n{\n $sq_personal_info = mysql_fetch_assoc(mysql_query(\"select mobile_no from traveler_personal_info where tourwise_traveler_id='$tourwise_id'\"));\n $mobile_no = $sq_personal_info['mobile_no'];\n\n $message = \"We are providing the refunds considering your cancellation request of the genuine reason. Pls, contact us for the future journey.\";\n global $model;\n $model->send_message($mobile_no, $message);\n}", "title": "" }, { "docid": "66aa62d3b4858d25ad6a2f4047f982ae", "score": "0.5679358", "text": "public function action_sendmails(){\r\n\t\techo 'Send mails from queue'.\"\\n\";\n\t\t$mails = Model_Mail::getQueuedToSend();\n\t\t$swiftMail = email::connect();\r\n\t\t\t\t\n\t\tforeach ($mails as $mail)\n\t\t{\n\t\t\t$message = new Swift_Message();\n\t\t\t$message->setFrom(array($mail->from));\n\t\t\t$message->setBody($mail->content,'text/html');\n\t\t\t$message->setTo(array($mail->to));\n\t\t\t$message->setSubject($mail->title);\n\t\t\t\n\t\t\t$result = $swiftMail->send($message);\n\t\t\tif ($result)\n\t\t\t{\n\t\t\t\tModel_Mail::setSent($mail->id);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\techo 'Sended '.count($mails).' e-mail'.\"\\n\";\r\n\t}", "title": "" }, { "docid": "77bcdb31346f76e50dd5ab65563172e6", "score": "0.5662591", "text": "function sendBulkSMS($username, $encryp_password, $senderid, $message, $mobileNos, $deptSecureKey) {\n $key = hash('sha512', trim($username) . trim($senderid) . trim($message) . trim($deptSecureKey));\n $data = array(\n \"username\" => trim($username),\n \"password\" => trim($encryp_password),\n \"senderid\" => trim($senderid),\n \"content\" => trim($message),\n \"smsservicetype\" => \"bulkmsg\",\n \"bulkmobno\" => trim($mobileNos),\n \"key\" => trim($key)\n );\n post_to_url(\"https://msdgweb.mgov.gov.in/esms/sendsmsrequest\", $data); //calling post_to_url to send bulk sms \n}", "title": "" }, { "docid": "1c210349f1cf34920b3232e849f7bee6", "score": "0.56564486", "text": "public function run()\n {\n $sms = Setting::sms();\n $curl = curl_init();\n curl_setopt_array($curl, array(\n CURLOPT_URL => config('sms.api'),\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => 'POST',\n CURLOPT_POSTFIELDS => \"[ \" . json_encode([\n 'phone_number'=>'085322778935',\n 'message'=>'Hai anam, apa kabar? sehat kan? semoga apa yang kamu inginkan tercapai. Amiin',\n 'device_id'=>95703\n ]) . \"]\",\n CURLOPT_HTTPHEADER => array(\n \"authorization: \".config('sms.token'),\n \"cache-control: no-cache\"\n ),\n ));\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n $response = json_decode(curl_exec($curl),true);\n curl_close($curl);\n }", "title": "" }, { "docid": "d0b0afc2c222f8f8129cc7a5f81755c4", "score": "0.56545126", "text": "function sendSMS($to, $message){\n $username = \"rajnish90\";\n $password = \"redhat123\";\n $senderid = \"BLUETM\";\n\n $url = \"http://www.smsjust.com/blank/sms/user/urlsms.php?\".\n \"username=\".$username.\n \"&pass=\".$password.\n \"&senderid=\".$senderid.\n \"&dest_mobileno=\".$to.\n \"&msgtype=TXT\".\n \"&message=\".urlencode($message).\n \"&response=Y\"\n ;\n //echo $url;\n return httpGet($url);\n}", "title": "" }, { "docid": "3b4f02bdd129b82cfe390ddfcc844e8b", "score": "0.56395066", "text": "function rpc_send_sms($request)\n\t{\n\t\t$this->load->model(array('Kalkun_model', 'Message_model'));\n\t\t$parameters = $request->output_parameters();\n\n\t\t$data['coding'] = 'default';\n\t\t$data['class'] = '1';\n\t\t$data['dest'] = $parameters[0];\n\t\t$data['date'] = date('Y-m-d H:i:s');\n\t\t$data['message'] = $parameters[1];\n\t\t$data['delivery_report'] = 'default';\n\t\t$data['uid'] = 1;\n\t\t$sms = $this->Message_model->send_messages($data);\n\n\t\treturn $this->xmlrpc->send_response($sms);\n\t}", "title": "" }, { "docid": "e406279ece6326bebc16a2dec72fadbf", "score": "0.56174284", "text": "public function sendSms($messages)\n {\n $MessageBird = new Client(self::KEY);\n foreach ($messages as $message) {\n $result = $MessageBird->messages->create($message);\n sleep(1);\n }\n return $result;\n }", "title": "" }, { "docid": "bd3aa2c8f406c3c93d3486de83584ab7", "score": "0.5613448", "text": "function send_sms_to_list($list_id, $message, $from=null){\n if($from && strlen($from)>11){\n $from = substr($from,0,11);\n }\n $url = $this->api_base_url.\"/lists/$list_id/send?app_id=\".$this->app_id.\"&app_secret=\".base64_encode($this->app_secret);\n $data['from']= $from;\n $data['message'] = $message;\n $this->result = $this->send_request($url, \"POST\", [],$data, true);\n return ($this->result->success && $this->result->message==\"MESSAGE SENT TO LIST.\");\n }", "title": "" }, { "docid": "f823b464a52bb127d2c0e640c485e185", "score": "0.56048584", "text": "function reply($id, $mobile, $message, $cost = 0);", "title": "" }, { "docid": "9d272915ad6a1a9ed564a8dc85969818", "score": "0.56040275", "text": "function create_sms($cust_id,$msg){\n\tglobal $connection; \n\t$get_cust= mysqli_query($connection,\"SELECT * FROM kp_customers WHERE cust_id='$cust_id'\");\n\t$row = mysqli_fetch_assoc($get_cust);\n\t$phone= strtoupper($row['phone']);\n\t//$msg=\"Thank You For choosing Diamond Lighting As Your Lighting and Interior Patner\";\n\t$create_sms= mysqli_query($connection,\"INSERT INTO kp_sms(phone,msg) VALUES('$phone','$msg')\") or die(mysqli_error($connection));\n return true;\n}", "title": "" }, { "docid": "14aaad5cc9a178b46717e3eee93e0d3e", "score": "0.5602655", "text": "private function send_msg() {\r\n }", "title": "" }, { "docid": "4526fe81dcc017c1f5f7b41404b4c41c", "score": "0.5600253", "text": "function sms($recipient, $sender, $message, $flash = false, $statusUrl = null, $returnData = null)\n {\n $sms = new \\Findforsikring\\Support\\SMS();\n return $sms->recipient($recipient)\n ->sender($sender)\n ->message($message)\n ->flash($flash)\n ->statusUrl($statusUrl)\n ->returnData($returnData)\n ->send();\n }", "title": "" }, { "docid": "c9fbe830fcd1bf0f0f1bb6c69fd13b74", "score": "0.5593344", "text": "public function sendMessage($msgdata)\n\t{\n\t\ttry {\n\t\t\t$this->channel->queue_declare(MQ::MAILQUEUE, MQ::PASSIVE, MQ::DURABLE, MQ::EXCLUSIVE, MQ::AUTO_DELETE);\n\t\t\t$this->channel->queue_declare(MQ::SMSQUEUE, MQ::PASSIVE, MQ::DURABLE, MQ::EXCLUSIVE, MQ::AUTO_DELETE);\n\t\t\t$this->channel->queue_declare(MQ::CONTACTCACHEINITIATE, MQ::PASSIVE, MQ::DURABLE, MQ::EXCLUSIVE, MQ::AUTO_DELETE);\n\t\t\t$this->channel->queue_declare(MQ::INVALIDATECACHE, MQ::PASSIVE, MQ::DURABLE, MQ::EXCLUSIVE, MQ::AUTO_DELETE);\n\t\t\t$this->channel->queue_declare(MQ::AGENT_NOTIFICATIONSQUEUE, MQ::PASSIVE, MQ::DURABLE, MQ::EXCLUSIVE, MQ::AUTO_DELETE);\n\t\t\t$this->channel->queue_declare(MQ::BUFFER_INSTANT_NOTIFICATION_QUEUE, MQ::PASSIVE, MQ::DURABLE, MQ::EXCLUSIVE, MQ::AUTO_DELETE);\n\t\t\t$this->channel->queue_declare(MQ::DELETE_RETRIEVE_QUEUE, MQ::PASSIVE, MQ::DURABLE, MQ::EXCLUSIVE, MQ::AUTO_DELETE);\n\t\t\t$this->channel->queue_declare(MQ::UPDATE_SEEN_QUEUE, MQ::PASSIVE, MQ::DURABLE, MQ::EXCLUSIVE, MQ::AUTO_DELETE);\n\t\t\t$this->channel->queue_declare(MQ::UPDATE_FEATURED_PROFILE_QUEUE, MQ::PASSIVE, MQ::DURABLE, MQ::EXCLUSIVE, MQ::AUTO_DELETE);\n\n\t\t\t$this->channel->queue_declare(MQ::CHAT_MESSAGE, MQ::PASSIVE, MQ::DURABLE, MQ::EXCLUSIVE, MQ::AUTO_DELETE);\n\n\t\t\t$this->channel->queue_declare(MQ::DUPLICATE_LOG_QUEUE, MQ::PASSIVE, MQ::DURABLE, MQ::EXCLUSIVE, MQ::AUTO_DELETE);\n\t\t\t$this->channel->queue_declare(MQ::PROFILE_CACHE_Q_DELETE, MQ::PASSIVE, MQ::DURABLE, MQ::EXCLUSIVE, MQ::AUTO_DELETE);\n $this->channel->queue_declare(MQ::VIEW_LOG, MQ::PASSIVE, MQ::DURABLE, MQ::EXCLUSIVE, MQ::AUTO_DELETE);\n\t\t\t$this->channel->queue_declare(MQ::SCREENING_QUEUE, MQ::PASSIVE, MQ::DURABLE, MQ::EXCLUSIVE, MQ::AUTO_DELETE);\n\t\t\t$this->channel->queue_declare(MQ::LOGGING_QUEUE, MQ::PASSIVE, MQ::DURABLE, MQ::EXCLUSIVE, MQ::AUTO_DELETE);\n $this->channel->queue_declare(MQ::DISC_HISTORY_QUEUE, MQ::PASSIVE, MQ::DURABLE, MQ::EXCLUSIVE, MQ::AUTO_DELETE);\n\n $this->channel->queue_declare(MQ::SCRIPT_PROFILER_Q, MQ::PASSIVE, MQ::DURABLE, MQ::EXCLUSIVE, MQ::AUTO_DELETE); \n\t\t\t$this->channel->queue_declare(MQ::WRITE_MSG_queueRightNow);\n\t\t\t$this->channel->exchange_declare(MQ::WRITE_MSG_exchangeRightNow, 'direct');\n\t\t\t$this->channel->queue_bind(MQ::WRITE_MSG_queueRightNow, MQ::WRITE_MSG_exchangeRightNow);\n\t\t\t$this->channel->queue_declare(MQ::WRITE_MSG_queueDelayed5min, MQ::PASSIVE, MQ::DURABLE, MQ::EXCLUSIVE, MQ::AUTO_DELETE, true, \n\t\t\t\t\tarray(\n\t\t\t\t\t\t\"x-dead-letter-exchange\" => array(\"S\", MQ::WRITE_MSG_exchangeRightNow),\n\t\t\t\t\t\t\"x-message-ttl\" => array(\"I\", MQ::DELAY_WRITEMSG*1000))\n\t\t\t\t\t);\n\t\t\t$this->channel->exchange_declare(MQ::WRITE_MSG_exchangeDelayed5min, 'direct');\n\t\t\t$this->channel->queue_bind(MQ::WRITE_MSG_queueDelayed5min, MQ::WRITE_MSG_exchangeDelayed5min);\n\n\t\t} catch (Exception $exception) {\n\t\t\t$str = \"\\nRabbitMQ Error in producer, Unable to\" . \" declare queues : \" . $exception->getMessage() . \"\\tLine:\" . __LINE__;\n\t\t\tRabbitmqHelper::sendAlert($str, \"default\");\n\t\t\treturn;\n\t\t}\n\t\t$data = json_encode($msgdata);\n\t\t$msg = new AMQPMessage($data, array('delivery_mode' => MQ::DELIVERYMODE));\n\t\t$process = $msgdata['process'];\n\t\ttry {\n\t\t\tswitch ($process) {\n\t\t\t\tcase \"MAIL\":\n\t\t\t\t\t$this->channel->basic_publish($msg, MQ::EXCHANGE, MQ::MAILQUEUE, MQ::MANDATORY, MQ::IMMEDIATE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"SMS\":\n\t\t\t\t\t$this->channel->basic_publish($msg, MQ::EXCHANGE, MQ::SMSQUEUE, MQ::MANDATORY, MQ::IMMEDIATE);\n\t\t\t\t\tbreak;\n\t\t\t\t\t$this->channel->basic_publish($msg, MQ::EXCHANGE, MQ::SMSQUEUE, MQ::MANDATORY, MQ::IMMEDIATE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"GCM\":\n\t\t\t\t\t$this->channel->basic_publish($msg, MQ::EXCHANGE, MQ::GCMQUEUE, MQ::MANDATORY, MQ::IMMEDIATE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"AGENT_NOTIFICATIONS\":\n\t\t\t\t\t$this->channel->basic_publish($msg, MQ::EXCHANGE, MQ::AGENT_NOTIFICATIONSQUEUE, MQ::MANDATORY, MQ::IMMEDIATE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"CACHE\":\n\t\t\t\t\t$data = $msgdata['data'];\n\t\t\t\t\t$msg = new AMQPMessage($data, array('delivery_mode' => MQ::DELIVERYMODE));\n\t\t\t\t\t$this->channel->basic_publish($msg, MQ::EXCHANGE, MQ::CONTACTCACHEINITIATE, MQ::MANDATORY, MQ::IMMEDIATE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"INVALIDATE\":\n\t\t\t\t\t$data = $msgdata['data'];\n\t\t\t\t\t$msg = new AMQPMessage($data, array('delivery_mode' => MQ::DELIVERYMODE));\n\t\t\t\t\t$this->channel->basic_publish($msg, MQ::EXCHANGE, MQ::INVALIDATECACHE, MQ::MANDATORY, MQ::IMMEDIATE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"BUFFER_INSTANT_NOTIFICATIONS\" :\n\t\t\t\t\t$this->channel->basic_publish($msg, MQ::EXCHANGE, MQ::BUFFER_INSTANT_NOTIFICATION_QUEUE, MQ::MANDATORY, MQ::IMMEDIATE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"DELETE_RETRIEVE\":\n\t\t\t\t\t$this->channel->basic_publish($msg, MQ::EXCHANGE, MQ::DELETE_RETRIEVE_QUEUE, MQ::MANDATORY, MQ::IMMEDIATE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"CHATROSTERS\":\n\t\t\t\t\tif (JsConstants::$jsChatFlag >= 1) {\n\t\t\t\t\t\t$data = $msgdata['data'];\n\t\t\t\t\t\t$msg = new AMQPMessage(json_encode($data), array('delivery_mode' => MQ::DELIVERYMODE));\n\t\t\t\t\t\t$this->channel->basic_publish($msg, MQ::CHATEXCHANGE, \"roster\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"UPDATE_SEEN\":\n\t\t\t\t\t$this->channel->basic_publish($msg, MQ::EXCHANGE, MQ::UPDATE_SEEN_QUEUE, MQ::MANDATORY, MQ::IMMEDIATE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"UPDATE_FEATURED_PROFILE\":\n\t\t\t\t\t$this->channel->basic_publish($msg, MQ::EXCHANGE, MQ::UPDATE_FEATURED_PROFILE_QUEUE, MQ::MANDATORY, MQ::IMMEDIATE);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"USERCREATION\":\n\t\t\t\t\tif (JsConstants::$jsChatFlag >= 1) {\n\t\t\t\t\t\t$data = $msgdata['data'];\n\t\t\t\t\t\t$msg = new AMQPMessage($data, array('delivery_mode' => MQ::DELIVERYMODE));\n\t\t\t\t\t\t$this->channel->basic_publish($msg, MQ::CHATEXCHANGE, \"profile_created\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"USERLOGIN\":\n\t\t\t\t\tif (JsConstants::$jsChatFlag >= 1) {\n\t\t\t\t\t\t$data = $msgdata['data'];\n\t\t\t\t\t\t$msg = new AMQPMessage($data, array('delivery_mode' => MQ::DELIVERYMODE));\n\t\t\t\t\t\t$this->channel->basic_publish($msg, MQ::CHATEXCHANGE, \"profile_created\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"DUPLICATE_LOG\":\n\t\t\t\t\t $this->channel->basic_publish($msg, MQ::EXCHANGE, MQ::DUPLICATE_LOG_QUEUE,MQ::MANDATORY,MQ::IMMEDIATE);\n\t\t\t\t\t break;\n\t\t\t\tcase \"USER_DELETE\":\n\t\t\t\t\tif (JsConstants::$jsChatFlag >= 1) {\n\t\t\t\t\t\t$data = $msgdata['data'];\n\t\t\t\t\t\t$msg = new AMQPMessage($data, array('delivery_mode' => MQ::DELIVERYMODE));\n\t\t\t\t\t\t$this->channel->basic_publish($msg, MQ::CHATEXCHANGE, \"profile_deleted\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\t\t\t\t\n\t\t\t\tcase \"CHATMESSAGE\":\n\t\t\t\t\t$this->channel->basic_publish($msg, MQ::EXCHANGE, MQ::CHAT_MESSAGE, MQ::MANDATORY, MQ::IMMEDIATE);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"ROSTERCREATION\":\n\t\t\t\t\t$data = $msgdata['data'];\n\t\t\t\t\t$msg = new AMQPMessage($data, array('delivery_mode' => MQ::DELIVERYMODE));\n\t\t\t\t\t$this->channel->basic_publish($msg, MQ::CHATEXCHANGE,\"roster_created\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"DUPLICATE_LOG\":\n $this->channel->basic_publish($msg, MQ::EXCHANGE, MQ::DUPLICATE_LOG_QUEUE,MQ::MANDATORY,MQ::IMMEDIATE);\n break;\n\n\t\t\t\tcase MQ::PROCESS_PROFILE_CACHE_DELETE:\n $this->channel->basic_publish($msg, MQ::EXCHANGE, MQ::PROFILE_CACHE_Q_DELETE,MQ::MANDATORY,MQ::IMMEDIATE);\n\t\t\t\t\tbreak;\n case \"ViewLogQueue\":\n $this->channel->basic_publish($msg, MQ::EXCHANGE, MQ::VIEW_LOG,MQ::MANDATORY,MQ::IMMEDIATE);\n break;\n case MQ::SCREENING_Q_EOI:\n \t$this->channel->basic_publish($msg, MQ::EXCHANGE, MQ::SCREENING_QUEUE, MQ::MANDATORY, MQ::IMMEDIATE);\n \tbreak;\n\t\t\t\tcase MQ::WRITE_MSG_Q:\n\t\t\t\t\t$this->channel->basic_publish($msg, MQ::WRITE_MSG_exchangeDelayed5min);\n\t\t\t\t\tbreak;\n case 'LOGGING_TRACKING':\n \t$this->channel->basic_publish($msg, MQ::EXCHANGE, MQ::LOGGING_QUEUE, MQ::MANDATORY, MQ::IMMEDIATE);\n \tbreak;\n\n case 'DISCOUNT_HISTORY':\n $this->channel->basic_publish($msg, MQ::EXCHANGE, MQ::DISC_HISTORY_QUEUE, MQ::MANDATORY, MQ::IMMEDIATE);\n break;\n case MQ::SCRIPT_PROFILER_PROCESS:\n $this->channel->basic_publish($msg, MQ::EXCHANGE, MQ::SCRIPT_PROFILER_Q,MQ::MANDATORY,MQ::IMMEDIATE);\n break;\n\n\t\t\t}\n\t\t} catch (Exception $exception) {\n\t\t\t$str = \"\\nRabbitMQ Error in producer, Unable to publish message : \" . $exception->getMessage() . \"\\tLine:\" . __LINE__;\n\t\t\tRabbitmqHelper::sendAlert($str, \"default\");\n\t\t\treturn;\n\t\t}\n\t}", "title": "" }, { "docid": "af9c3b3e117005e919fd78e32c3e86fe", "score": "0.55924755", "text": "function L_sendSms ($msg, $id, $numberto) {\n\t\t\n\t\t$result = false;\n\t\t\n\t\t$ch = curl_init(\"http://sms.ru/sms/send\");\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 30);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, array(\n\n\t\t\t\"api_id\"\t\t=>\t$id,\n\t\t\t\"to\"\t\t\t=>\t$numberto,\n\t\t\t\"text\"\t\t=>\ticonv(\"windows-1251\",\"utf-8\",$msg)\n\n\t\t));\n\t\t\n\t\t$body = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\t\n\t\t($body != false) ? $result = true : $result = false;\n\t\t\n\t\treturn $result;\n\t\t\n\t}", "title": "" }, { "docid": "54242bfbdbb2e627471a58320e2fe1b3", "score": "0.5591183", "text": "public function sendSMSWithApplyLink(){\n\t}", "title": "" }, { "docid": "4de3de8688a14902e3b9df2dd4b90700", "score": "0.5590073", "text": "function sendMessage($to, $message) {\n\trequire 'lib/Services/Twilio.php';\n\n\t// Twilio REST API version\n\t$version = \"2010-04-01\";\n\n\t// Set our Account SID and AuthToken\n\t$sid = 'ACf8a0a193958a8a46f2dbb700d73efa13';\n\t$token = '0e5008a58d3d5d02cb188c41706e95a0';\n\n\t// A phone number you have previously validated with Twilio\n\t$phonenumber = '12345423138';\n\n\t//to number\n \t$tonum = \"+1\" . $to;\n\n\t// Instantiate a new Twilio Rest Client\n\t$client = new Services_Twilio($sid, $token, $version);\n\n\ttry {\n\t\t// Initiate a new outbound call\n\t\t$call = $client->account->messages->sendMessage(\n\t\t\t$phonenumber, // The number of the phone initiating the call\n\t\t\t$tonum, // The number of the phone receiving call\n\t\t\t$message\n\t\t);\n\t\techo 'Sent message: ';\n\n\n\t} catch (Exception $e) {\n\t\techo 'Error: ' . $e->getMessage();\n\t}\n\n}", "title": "" }, { "docid": "f9bbaf2fb008b08fc35211af10e9da12", "score": "0.5579227", "text": "public function __construct()\n {\n $this->queue = 'mail';\n }", "title": "" }, { "docid": "f72f3d60a499abd141cfcd0e0480a4ce", "score": "0.55659264", "text": "public function send(string $phone)\n {\n }", "title": "" }, { "docid": "bef474ea46e738bc4e930a0381b3e64e", "score": "0.5559472", "text": "function exec_queue()\n\t{\n\t\t$vbulletin =& $this->registry;\n\n\t\tif ($vbulletin->options['usemailqueue'] == 2)\n\t\t{\n\t\t\t// Lock mailqueue table so that only one process can\n\t\t\t// send a batch of emails and then delete them\n\t\t\t$vbulletin->db->lock_tables(array('mailqueue' => 'WRITE'));\n\t\t}\n\n\t\t$emails = $vbulletin->db->query_read(\"\n\t\t\tSELECT *\n\t\t\tFROM \" . TABLE_PREFIX . \"mailqueue\n\t\t\tORDER BY mailqueueid\n\t\t\tLIMIT \" . intval($vbulletin->options['emailsendnum'])\n\t\t);\n\n\t\t$mailqueueids = '';\n\t\t$newmail = 0;\n\t\t$emailarray = array();\n\t\twhile ($email = $vbulletin->db->fetch_array($emails))\n\t\t{\n\t\t\t// count up number of mails about to send\n\t\t\t$mailqueueids .= ',' . $email['mailqueueid'];\n\t\t\t$newmail++;\n\t\t\t$emailarray[] = $email;\n\t\t}\n\t\tif (!empty($mailqueueids))\n\t\t{\n\t\t\t// remove mails from queue - to stop duplicates being sent\n\t\t\t$vbulletin->db->query_write(\"\n\t\t\t\tDELETE FROM \" . TABLE_PREFIX . \"mailqueue\n\t\t\t\tWHERE mailqueueid IN (0 $mailqueueids)\n\t\t\t\");\n\n\t\t\tif ($vbulletin->options['usemailqueue'] == 2)\n\t\t\t{\n\t\t\t\t$vbulletin->db->unlock_tables();\n\t\t\t}\n\n\t\t\tif ($vbulletin->options['use_smtp'])\n\t\t\t{\n\t\t\t\t$prototype =& new vB_SmtpMail($vbulletin);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$prototype =& new vB_Mail($vbulletin);\n\t\t\t}\n\n\t\t\tforeach ($emailarray AS $index => $email)\n\t\t\t{\n\t\t\t\t// send those mails\n\t\t\t\t$mail = (phpversion() < '5' ? $prototype : clone($prototype)); // avoid ctor overhead\n\t\t\t\t$mail->quick_set($email['toemail'], $email['subject'], $email['message'], $email['header'], $email['fromemail']);\n\t\t\t\t$mail->send();\n\t\t\t}\n\n\t\t\t$newmail = 'data - ' . intval($newmail);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($vbulletin->options['usemailqueue'] == 2)\n\t\t\t{\n\t\t\t\t$vbulletin->db->unlock_tables();\n\t\t\t}\n\n\t\t\t$newmail = 0;\n\t\t}\n\n\t\t// update number of mails remaining\n\t\t$vbulletin->db->query_write(\"\n\t\t\tUPDATE \" . TABLE_PREFIX . \"datastore SET\n\t\t\t\tdata = \" . $newmail . \",\n\t\t\t\tdata = IF(data < 0, 0, data)\n\t\t\tWHERE title = 'mailqueue'\n\t\t\");\n\n\t\t// if we're using a alternate datastore, we need to give it an integer value\n\t\t// this may not be atomic\n\t\tif (method_exists($vbulletin->datastore, 'build'))\n\t\t{\n\t\t\t$mailqueue_db = $vbulletin->db->query_first(\"\n\t\t\t\tSELECT data\n\t\t\t\tFROM \" . TABLE_PREFIX . \"datastore\n\t\t\t\tWHERE title = 'mailqueue'\n\t\t\t\");\n\t\t\t$vbulletin->datastore->build('mailqueue', intval($mailqueue_db['data']));\n\t\t}\n\t}", "title": "" }, { "docid": "f677daa783b53d2fa64e779b1dec02fc", "score": "0.5559179", "text": "public function test_createQueue() {\n\n }", "title": "" } ]
8dabed4111eb0c9b9ca67d1406d0835b
/ / Method Function /
[ { "docid": "75b9229552b27d10550fed64ef56ca8d", "score": "0.0", "text": "function method() {\n if ($this->uri->rsegment(3) == 'add_patient') {\n self::_method_add_patient();\n } else if ($this->uri->rsegment(3) == 'edit_patient') {\n self::_method_edit_patient();\n } else if ($this->uri->rsegment(3) == 'delete_patient') {\n self::_method_delete_patient();\n }\n }", "title": "" } ]
[ { "docid": "1853728b436f84403cfe34555854dc3a", "score": "0.7010334", "text": "public function _method() {\r\n \r\n }", "title": "" }, { "docid": "9b4cc2777f30adf86eb28280a92c437c", "score": "0.7008091", "text": "public function method()\n\t{\n\t}", "title": "" }, { "docid": "950223e8d645445047e9fd6952ccbc9c", "score": "0.68377984", "text": "public function method();", "title": "" }, { "docid": "950223e8d645445047e9fd6952ccbc9c", "score": "0.68377984", "text": "public function method();", "title": "" }, { "docid": "950223e8d645445047e9fd6952ccbc9c", "score": "0.68377984", "text": "public function method();", "title": "" }, { "docid": "b0cc34a9048833a17d8373fb6440d33b", "score": "0.6456696", "text": "public function abonar2()\n\n {\n\n }", "title": "" }, { "docid": "e777921d56d8c90625df1fea707e8894", "score": "0.6374085", "text": "public static function method();", "title": "" }, { "docid": "3d1c60caad13e77194edc7cf1d8e479b", "score": "0.6355643", "text": "private function internalMethod() {}", "title": "" }, { "docid": "ad2d48949b5b6907564aa378b06a581e", "score": "0.6348203", "text": "function method04()\n {\n }", "title": "" }, { "docid": "965da376f63eee63b94d0334bf2d6e6a", "score": "0.61598337", "text": "public function abonar3()\n\n {\n\n\n\n }", "title": "" }, { "docid": "bfa7322c2910b8c378180cce611918d5", "score": "0.61438215", "text": "public function smell();", "title": "" }, { "docid": "a00453a1d3044c896debd4017c876a60", "score": "0.6142614", "text": "public function soul();", "title": "" }, { "docid": "dd3fe74fe4c68fbbeae3c17531389844", "score": "0.61385393", "text": "function method02()\n {\n }", "title": "" }, { "docid": "f760534a4052634dd9d33913f5e74ad4", "score": "0.61101115", "text": "function method01()\n {\n }", "title": "" }, { "docid": "69bc0ef972f9742faddfe3b86f4f923e", "score": "0.6076608", "text": "public function annonces()\n {\n \n }", "title": "" }, { "docid": "dcc7394b11db5814d40aab6abd2f1dea", "score": "0.60495096", "text": "public function _constract(){\n\n }", "title": "" }, { "docid": "50d713471a4a459e68b17f79ddcc93b4", "score": "0.6037406", "text": "public function MEleve()\n {\n }", "title": "" }, { "docid": "348b406a0bcc6a7dcf7665eae3ffce98", "score": "0.6010722", "text": "function method03()\n {\n }", "title": "" }, { "docid": "9b94b279b9bdd2b1db9a975940c52ed2", "score": "0.59794694", "text": "public function yourMethodCall()\n {\n // @todo: Implement method\n }", "title": "" }, { "docid": "416227b0f6e675527634f8dc6e9d7385", "score": "0.5970941", "text": "private function foo()\n\t{\n\t}", "title": "" }, { "docid": "82b2fec70d74bb46c033845355f283e5", "score": "0.5958564", "text": "private function __() {\n }", "title": "" }, { "docid": "82b2fec70d74bb46c033845355f283e5", "score": "0.5958564", "text": "private function __() {\n }", "title": "" }, { "docid": "d76e5eb7bcec3d69263a38d69b3e070d", "score": "0.5917861", "text": "function method05()\n {\n }", "title": "" }, { "docid": "1073542a0fa8c965ceae2b066d5907b8", "score": "0.59054804", "text": "public function ogs()\n\t{\n\t}", "title": "" }, { "docid": "713c912b4c55853a4fb92c754986f6b6", "score": "0.5891793", "text": "public function example_method()\n {\n \n }", "title": "" }, { "docid": "eac1fdfee6c19e6f2309540d06fbd0e6", "score": "0.5881777", "text": "public function support()\n {\n\n }", "title": "" }, { "docid": "22f884e1b1b384b9cc9ada6798e55989", "score": "0.58754146", "text": "public function graficafecha()\n {\n}", "title": "" }, { "docid": "35f8ff218e4c2a5ffd6533829018fd5f", "score": "0.585444", "text": "abstract protected function _get();", "title": "" }, { "docid": "77de0d6b0cd5111ca19942cce252f910", "score": "0.58499193", "text": "abstract function getInformation();", "title": "" }, { "docid": "83a1a8f87f22576b3b30eb4e7827a406", "score": "0.58315396", "text": "public function Modify()\r\n {\r\n }", "title": "" }, { "docid": "94ba78b1f6567282bf2ca9e69aedd717", "score": "0.5818297", "text": "public function method1Updated()\n {\n }", "title": "" }, { "docid": "3b86eecdff92a1cd2673e8fa3dc0f439", "score": "0.5806336", "text": "public function access();", "title": "" }, { "docid": "3b86eecdff92a1cd2673e8fa3dc0f439", "score": "0.5806336", "text": "public function access();", "title": "" }, { "docid": "612d25dcec364aaa814bba0ca57a5647", "score": "0.57844895", "text": "public function sava(){\n\n }", "title": "" }, { "docid": "86acb3185e038f79ce06f0023d8b3683", "score": "0.57768834", "text": "public function general()\n {\n\n }", "title": "" }, { "docid": "77847f3d94ea699d004e2295335fb89f", "score": "0.5766982", "text": "public function getMethod(){ }", "title": "" }, { "docid": "8fee6c2accb7f6d221279da5bbd31676", "score": "0.5747719", "text": "abstract public function _getResult();", "title": "" }, { "docid": "d0be24956767743a76b405685ff4ed67", "score": "0.5738018", "text": "abstract protected function core();", "title": "" }, { "docid": "3bb26355f90d47f35bb96eaf1f9fd7cd", "score": "0.57169515", "text": "public function sso()\n {\n\n }", "title": "" }, { "docid": "c70f9b06f0d45b5b47660dac73af1792", "score": "0.5701048", "text": "abstract public function spit();", "title": "" }, { "docid": "694b744c3d533e982fb86f6bff2a1f6e", "score": "0.5693265", "text": "abstract protected function perform();", "title": "" }, { "docid": "e692e6e8010d6ea96d990d9f2d0cbbc3", "score": "0.56585324", "text": "function _get() {\r\n\r\n\t\t// To-do\r\n\r\n }", "title": "" }, { "docid": "36a717e1c49d7120545573f07847a750", "score": "0.5649328", "text": "public function publicMethod() {}", "title": "" }, { "docid": "73c12024cb8d6afe8c9606579120a2c1", "score": "0.5642947", "text": "static function Retrieve()\n\t{\n\t}", "title": "" }, { "docid": "6df2bddeff202a2e6680bb5b18c49a85", "score": "0.5641342", "text": "public function get_data()\n {\n }", "title": "" }, { "docid": "23c02409c4c93b2d30b835f2f0557d7d", "score": "0.5640338", "text": "public function algorithm();", "title": "" }, { "docid": "28a99dd405acc6a52849d287f3f9c0e4", "score": "0.563933", "text": "public function do_method();", "title": "" }, { "docid": "c0d8e942bd69528f81f597cfd863c608", "score": "0.5638381", "text": "abstract protected function get ();", "title": "" }, { "docid": "93f723cece12d9e63f18b048631c2c35", "score": "0.5620632", "text": "public function testCase4()\n {\n\n }", "title": "" }, { "docid": "70b69d079b0da787fcc0366c102d9f6e", "score": "0.56206244", "text": "private function foo() {\n\t}", "title": "" }, { "docid": "b35c83debb05d6d2e55e26584a184709", "score": "0.56164306", "text": "public static function returnInfo() {\n #\n }", "title": "" }, { "docid": "4419f02e254033431e5dea8773800c8e", "score": "0.5594861", "text": "abstract protected function data();", "title": "" }, { "docid": "329a91f5cfd60f7fd4aa919e073d09a7", "score": "0.5572082", "text": "public function __invoke()\n {\n }", "title": "" }, { "docid": "e6f2270979560aa2c43ab25400e00dd2", "score": "0.557167", "text": "public function getMethod() {}", "title": "" }, { "docid": "579184b0c5a0b3149437e914e00d0301", "score": "0.55709416", "text": "public function call ();", "title": "" }, { "docid": "f0c745120524dd61c52815f56137ce7d", "score": "0.5567573", "text": "function getReturn();", "title": "" }, { "docid": "8db2dfb4b4cc3f29fbf6437e92b73b65", "score": "0.55661", "text": "public function funcI()\n {\n }", "title": "" }, { "docid": "bbbe5de8320b9d06ddc0cdbc5a7976e2", "score": "0.5542403", "text": "public function Instgram()\n {\n\n }", "title": "" }, { "docid": "201433bb2af3b93189c57497737f4f15", "score": "0.5541554", "text": "function __construct (){\n\t\t\n\t}", "title": "" }, { "docid": "e8b595081cc9b61550c5f6e6567a6529", "score": "0.55403686", "text": "function pocitajtb() {\n}", "title": "" }, { "docid": "52925d0872111e5894fd83800e1f07fe", "score": "0.55356026", "text": "protected function _update()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "fd9bfa763bd8bcbc90f33139074714e9", "score": "0.5534856", "text": "function getResult();", "title": "" }, { "docid": "fd9bfa763bd8bcbc90f33139074714e9", "score": "0.5534856", "text": "function getResult();", "title": "" }, { "docid": "c7f8b10cfdf23cb3f35b6e2ee351b852", "score": "0.5532272", "text": "public function darOpinion(){\r\n }", "title": "" }, { "docid": "02609f1c05f58264bafc0323815be7b4", "score": "0.552307", "text": "public function testPointGet()\r\n {\r\n\r\n }", "title": "" }, { "docid": "95158b27e6e82baf303e24656c36dd6f", "score": "0.5521436", "text": "abstract protected function apply();", "title": "" }, { "docid": "f4e0d876a193c34458406de758c4c122", "score": "0.5516025", "text": "public function pee()\n {\n\n }", "title": "" }, { "docid": "3fc9e144542e370871d3e98b6f51346c", "score": "0.55131704", "text": "public function calculate()\n {\n }", "title": "" }, { "docid": "3fc9e144542e370871d3e98b6f51346c", "score": "0.55131704", "text": "public function calculate()\n {\n }", "title": "" }, { "docid": "3a73ca3bc61ec172a425301e1bf30b74", "score": "0.5511186", "text": "public function a()\n {\n\n\n }", "title": "" }, { "docid": "d07ec52f1a63ad91621dc535b5da1491", "score": "0.5507204", "text": "public function api_methods();", "title": "" }, { "docid": "1b9b1162eae7958e6c1f5763a24e07d0", "score": "0.55065674", "text": "public function calificar(){\r\n }", "title": "" }, { "docid": "a20e4c717d444ecd2f5584f66c083224", "score": "0.5501523", "text": "public function handel():mixed;", "title": "" }, { "docid": "3e146dcbb0612ba82af90fa3692aba2f", "score": "0.5496733", "text": "public function Method()\n{\n$ele['type']='MethodType';\nreturn $ele;\n}", "title": "" }, { "docid": "b63cb72420638818870867ece3a464de", "score": "0.54732335", "text": "abstract protected function action();", "title": "" }, { "docid": "79e3c5e56e5b370f2a4b31fb46384c5d", "score": "0.54732215", "text": "public function calc()\n {\n\n }", "title": "" }, { "docid": "d06e24b11b3542ee42e334f2070049de", "score": "0.5466321", "text": "abstract protected function params();", "title": "" }, { "docid": "f10a8ac67e5bf2c402fb577497a7bc15", "score": "0.5446049", "text": "public function implement(): void {\r\n }", "title": "" }, { "docid": "58e2f19a73bbe931fd5684be16861ee1", "score": "0.54431975", "text": "public function & GetData ();", "title": "" }, { "docid": "a5b21a03d6ce41c4827cc8d97b5b6275", "score": "0.5438181", "text": "abstract public function call();", "title": "" }, { "docid": "a5b21a03d6ce41c4827cc8d97b5b6275", "score": "0.5438181", "text": "abstract public function call();", "title": "" }, { "docid": "6d426d8c183ca62dbe6625ca80b53d4f", "score": "0.54330444", "text": "public function call();", "title": "" }, { "docid": "e802366590f1cbe09fd8090ae3d33e58", "score": "0.5431497", "text": "abstract public function get();", "title": "" }, { "docid": "e802366590f1cbe09fd8090ae3d33e58", "score": "0.5431497", "text": "abstract public function get();", "title": "" }, { "docid": "e802366590f1cbe09fd8090ae3d33e58", "score": "0.5431497", "text": "abstract public function get();", "title": "" }, { "docid": "e802366590f1cbe09fd8090ae3d33e58", "score": "0.5431497", "text": "abstract public function get();", "title": "" }, { "docid": "5b3f278da4aae79c524e1947b4a99556", "score": "0.5426631", "text": "abstract protected function returnType();", "title": "" }, { "docid": "63812a0fef5e69b4931cf133c8a849df", "score": "0.5425108", "text": "public function opciones() {\r\n \r\n }", "title": "" }, { "docid": "63812a0fef5e69b4931cf133c8a849df", "score": "0.5425108", "text": "public function opciones() {\r\n \r\n }", "title": "" }, { "docid": "dcc6304b3ba48fdbd72751a52be28b44", "score": "0.5423554", "text": "abstract protected function get_data();", "title": "" }, { "docid": "43d0dc9110188d09a1185cd301e8252d", "score": "0.5417756", "text": "public function swim()\n {\n }", "title": "" }, { "docid": "79f03ea7947094aff9f8fdc1ab2f1eae", "score": "0.54153514", "text": "function tractament () {\n\t\t\n\t}", "title": "" }, { "docid": "30ef41e141b5d999573f869a6220c41f", "score": "0.5411627", "text": "private function trail1()\r\n\t{\r\n\t}", "title": "" }, { "docid": "3c47a97cde70aac3e84159f4c0915773", "score": "0.5400401", "text": "public function objectAccess();", "title": "" }, { "docid": "928e402be54f9e1fc08723148fd050f4", "score": "0.5394766", "text": "public function apply();", "title": "" }, { "docid": "b536b645a03f98da7d6a75c9f9d16b7d", "score": "0.53918093", "text": "public function process()\n\t{\n\t}", "title": "" }, { "docid": "930a9531e5a382e252d9ec2757e5f412", "score": "0.5391543", "text": "public function get() : void{}", "title": "" }, { "docid": "22c4844cfb9a80d36953f3222adb419e", "score": "0.53894985", "text": "protected function getData()\n\t{\n\t}", "title": "" }, { "docid": "bec294f027331ca15dd3abfff8097f59", "score": "0.53893524", "text": "public function get_data()\n {\n }", "title": "" }, { "docid": "bec294f027331ca15dd3abfff8097f59", "score": "0.5389", "text": "public function get_data()\n {\n }", "title": "" }, { "docid": "bec294f027331ca15dd3abfff8097f59", "score": "0.5389", "text": "public function get_data()\n {\n }", "title": "" } ]
af4eaadf08871b2a347811109e3650a2
If we're about to add a new download to the cart and the Download ID already exists in the cart we remove the existing item so that it will be replaced by the upcoming.
[ { "docid": "eae1bb4b023be81f99b5ef114e214bd7", "score": "0.6036711", "text": "public function onPreAddToCart( $nDownloadId ) {\n\n\t\tif ( $this->isEnabledLimitToOne( $nDownloadId ) ) {\n\t\t\tforeach ( edd_get_cart_contents() as $nKey => $aItem ) {\n\t\t\t\tif ( isset( $aItem[ 'id' ] ) && $nDownloadId === $aItem[ 'id' ] ) {\n\t\t\t\t\tEDD()->cart->remove( $nKey );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "e50278ed2adf5a1a0c7f5295993ea88f", "score": "0.63191247", "text": "public function remove_cart()\n\t{\t\n\t\t$rowid = $this->input->post('rowid');\n\n\t\t$data = array(\n 'rowid' => $rowid,\n 'qty' => 0\n );\n\t \n\t\t$update = $this->cart->update($data);\n\n\t\tif($update){\n\t\t\techo '1';\n\t\t}else{\n\t\t\techo \"0\";\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "62b700b78406191009cb2969a453c5fe", "score": "0.6267657", "text": "public function removeCartItem()\n {\n $bookId = $_GET['bookId'];\n // get the cart from the session\n $userCart = $this->session->userdata('bookCart');\n $foundArrayKeyForItem = $this->getBookKeyInCart($userCart, $bookId);\n unset($userCart[$foundArrayKeyForItem]);\n $this->session->set_userdata('bookCart', $userCart);\n $this->view_cart();\n }", "title": "" }, { "docid": "e1a36d38675668c1551a1b0ecdcb8240", "score": "0.61807865", "text": "function removeItem($rowid){\n $remove = $this->cart->remove($rowid);\n // Redirect to the cart page\n redirect(base_url());\n \n }", "title": "" }, { "docid": "bf5a4d1b024ee8368ae09024415b4736", "score": "0.61199075", "text": "public function onAddToCart( $nDownloadId ) {\n\n\t\tif ( $this->isEnabledLimitToOne( $nDownloadId ) ) {\n\n\t\t\t$bFoundAlready = false;\n\t\t\t$bRemoved = false;\n\t\t\tforeach ( EDD()->cart->contents as $nPos => $aItem ) {\n\t\t\t\tif ( $aItem[ 'id' ] == $nDownloadId ) {\n\t\t\t\t\tif ( !$bFoundAlready ) {\n\t\t\t\t\t\t$bFoundAlready = true;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tunset( EDD()->cart->contents[ $nPos ] );\n\t\t\t\t\t\t$bRemoved = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( $bRemoved ) {\n\t\t\t\tEDD()->cart->update_cart();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "efb919741e4788ad37d3d49617789c21", "score": "0.6112499", "text": "protected function _removeQuoteCart()\n {\n $productId = $this->_getParamFromUrl(\n $this->getRequest()->getParam('url'),\n 'id'\n );\n\n $this->_getQuote()->removeItem($productId);\n\n $result = $this->_saveQuoteUpdates();\n\n if ($this->_getQuote()->getItemsCount() >= 1) {\n $this->_addCartBlockToResponse();\n $this->_addTotalsBlockToResponse();\n $this->_addShippingBlockToResponse();\n $this->_addSveaBlockToResponse();\n\n if (!$this->_getQuote()->validateMinimumAmount()) {\n $this->_addResponseMessage(\n self::SVEA_CHECKOUT_RESPONSE_REDIRECT,\n 'Minimum amount',\n Mage::getUrl('checkout/cart')\n );\n $code = 303;\n } elseif ($result) {\n $this->_addResponseMessage(\n self::SVEA_CHECKOUT_RESPONSE_SUCCESS,\n \"Cart updated\",\n \"Successful cart update\"\n );\n $code = 200;\n } else {\n $this->_addResponseMessage(\n self::SVEA_CHECKOUT_RESPONSE_ERROR,\n \"Cart updated unsuccessful\",\n $this->_getQuoteErrors()\n );\n $this->_addAlertBlockToResponse();\n $code = 422;\n }\n } else {\n $this->_addResponseMessage(\n self::SVEA_CHECKOUT_RESPONSE_REDIRECT,\n 'Cart empty',\n Mage::getUrl('checkout/cart')\n );\n $code = 303;\n }\n\n $this->_sendResponse($code);\n }", "title": "" }, { "docid": "aa0b0b59e68e2d7508e5ab3e72b7220a", "score": "0.61009955", "text": "function remove_from_cart() {\n\t\ttry {\n\t\t\techo $this->api_model->delete_data(\"cart\" , ['package_id' => $this->jsonvalue['package_id'], 'user_id' => $this->user_data['id']]);\n\t\t} catch(Exception $e) {\n echo json_encode(array( \n \"status\" => $this->lang->line('json_error_status'), \n \"error\" => $e->getMessage()));\n exit;\n }\n\t}", "title": "" }, { "docid": "9764cf75e447d71198737797ca9f7e4b", "score": "0.60963756", "text": "public function delete_Cart_item(){\n\t\tif(isset($_POST['product_id'])){\n\t\t\t$product_id=strip_tags(trim($_POST['product_id']));\t\t\t\t\t\t\t\n\t\t\t$product_exist=0;\t\t\t\n\t\t\tforeach ($this->cart as $key => $product) {\n\t\t\t\tforeach ($product as $k => $value) {\t\t\t\t\t\n\t\t\t\t\tif($product_id==$k){\n\t\t\t\t\t\tunset($this->cart[$key]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\t\t\t\t\n\t\t\tsetcookie(\"lms_cart\", serialize($this->cart), time()+3600*24, '/');\n\t\t\t$this->total_cart_items=count($this->cart);\n\t\t\tif($this->total_cart_items>0)\n\t\t\t\t$this->total_price=number_format($this->the_cart_total(), 2, '.', '');\n\t\t\telse\n\t\t\t\t$this->total_price=number_format(0, 2, '.', '');;\n\t\t\techo json_encode(array(\"success\"=>$this->total_price, \"items\"=>$this->total_cart_items));\n\t\t}else{\n\t\t\techo json_encode(array(\"error\"=>\"Undefined item ID\"));\n\t\t}\n\t\twp_die();\n\t}", "title": "" }, { "docid": "3d3d3629896da3ff2793e774b1bda3b3", "score": "0.6033574", "text": "public function removeItem($id){\n foreach ($this->items as $item){\n if($item->getId() == $id){\n $product = DAO::getById(Product::class, $item->getProduct());\n $product->setQteStock($product->getQteStock()+$item->getQuantity());//increment stock quantity\n DAO::update($product);\n DAO::delete(Item::class,$id);\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "39e20084036950fbc8e32ff6ab129f7f", "score": "0.59696823", "text": "public function deleteCartItem () {\r\n\t\t$cart = new MCart();\r\n\t\t$id = $this->input->post(\"id\"); //cart id here\r\n\t\t\r\n\t\t$affectedFields = array ('status'=>\"deleted\");\r\n\t\t$where = array ('cart_id'=>$id);\r\n\r\n\t\tif ($cart->update1($where, $affectedFields) > 0) {\r\n\t\t\tredirect(\"finance/cCart/viewCart\");\r\n\t\t} else {\r\n\t\t\techo 'Failed!';\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "8a9edb58e868dcf07f509be8ad5d8b4d", "score": "0.59503776", "text": "public function removeCartItem($cartItemId);", "title": "" }, { "docid": "db7490d849e91dcb344fea260d210982", "score": "0.59227794", "text": "function addItem() {\n\t\tif($this->getSkuQty() > 0) {\n\t\t\t// Check for item first:\n\t\t\t$query_rsCWSkuExists = sprintf(\"SELECT cart_Line_ID, cart_sku_qty \n\t\t\tFROM tbl_cart\n\t\t\tWHERE cart_custcart_ID = '%s' \n\t\t\tAND\tcart_sku_ID = %d\",$this->getCartId(),$this->sku_id);\n\t\t\t$rsCWSkuExists = $this->db->executeQuery($query_rsCWSkuExists);\n\t\t\t// Item already exists in cart, update it\n\t\t\tif($this->db->recordCount > 0) {\n\t\t\t\t$this->updateItem($this->getSkuId(), $this->getSkuQty());\n\t\t\t}else{\n\t\t\t\t/* Insert sku into cart */\n\t\t\t\t$query_rsCWAdd = sprintf(\"INSERT INTO tbl_cart \n\t\t\t\t(cart_custcart_ID, cart_sku_ID, cart_sku_qty, cart_dateadded)\n\t\t\t\tVALUES ('%s', %d, %d, now())\",$this->CartId,$this->sku_id,$this->getSkuQty());\n\t\t\t\t$rsCWAdd = $this->db->executeQuery($query_rsCWAdd);\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "title": "" }, { "docid": "1c942561e1494d5aab6742c162770dd1", "score": "0.59174293", "text": "public function track_remove_from_cart( $cart_key ) {\n\n\t\t$cart_contents = edd_get_cart_contents();\n\n\t\t// Bail if cart key doesn't exist\n\t\tif ( ! isset( $cart_contents[ $cart_key ] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$download = new EDD_Download( $cart_contents[ $cart_key ]['id'] );\n\t\t$price_options = $download->get_prices();\n\t\t$price_id = isset( $cart_contents[ $cart_key ]['options']['price_id'] ) ? $cart_contents[ $cart_key ]['options']['price_id'] : null;\n\t\t$variation = isset( $price_id ) && isset( $price_options[ $price_id ] ) ? $price_options[ $price_id ]['name'] : '';\n\t\t$price = isset( $price_id ) && isset( $price_options[ $price_id ] ) ? $price_options[ $price_id ]['amount'] : '';\n\t\t$price = empty( $price ) ? $download->get_price() : $price;\n\t\t$quantity = isset( $cart_contents[ $cart_key ]['quantity'] ) ? $cart_contents[ $cart_key ]['quantity'] : 1;\n\t\t$categories = (array) get_the_terms( $download->ID, 'download_category' );\n\t\t$category_names = wp_list_pluck( $categories, 'name' );\n\t\t$first_category = reset( $category_names );\n\t\t$list = $this->get_the_list();\n\n\t\t$this->add_track_data( array(\n\t\t\t'type' => 'remove_from_cart',\n\t\t\t'body' => array(\n\t\t\t\t'items' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => $download->ID,\n\t\t\t\t\t\t'name' => $download->get_name(),\n\t\t\t\t\t\t'variant' => $variation,\n\t\t\t\t\t\t'quantity' => $quantity,\n\t\t\t\t\t\t'category' => $first_category,\n\t\t\t\t\t\t'price' => $price,\n\t\t\t\t\t\t'list_name' => $list,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t) );\n\t}", "title": "" }, { "docid": "f2d35e1eba6458601c2768383299e764", "score": "0.5907586", "text": "public function track_update_cart_quantity() {\n\n\t\t// Bail if quantity/id is not set\n\t\tif ( ! isset( $_POST['quantity'] ) || ! isset( $_POST['download_id'] ) || empty( $_POST['quantity'] ) || empty( $_POST['download_id'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$origin_qty = 1;\n\t\t$updated_qty = $_POST['quantity'];\n\t\t$cart_contents = edd_get_cart_contents();\n\t\t$download = new EDD_Download( $_POST['download_id'] );\n\t\t$price_options = $download->get_prices();\n\t\t$options = isset( $_POST['options'] ) ? maybe_unserialize( stripslashes( $_POST['options'] ) ) : null;\n\t\t$price_id = isset( $options['price_id'] ) ? $options['price_id'] : null;\n\t\t$variation = ! empty( $price_id ) && isset( $price_options[ $price_id ] ) ? $price_options[ $price_id ]['name'] : '';\n\t\t$price = isset( $price_id ) && isset( $price_options[ $price_id ] ) ? $price_options[ $price_id ]['amount'] : '';\n\t\t$price = empty( $price ) ? $download->get_price() : $price;\n\t\t$categories = (array) get_the_terms( $download->ID, 'download_category' );\n\t\t$category_names = wp_list_pluck( $categories, 'name' );\n\t\t$first_category = reset( $category_names );\n\n\n\t\t// Get the original quantity\n\t\tforeach ( $cart_contents as $key => $item ) {\n\t\t\tif ( $_POST['download_id'] == $item['id'] ) {\n\t\t\t\t$origin_qty = $item['quantity'];\n\t\t\t}\n\t\t}\n\n\n\t\t// New qty is bigger, added products\n\t\tif ( $updated_qty > $origin_qty ) {\n\n\t\t\t$this->add_track_data( array(\n\t\t\t\t'type' => 'add_to_cart',\n\t\t\t\t'body' => array(\n\t\t\t\t\t'items' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => $download->ID,\n\t\t\t\t\t\t\t'name' => $download->get_name(),\n\t\t\t\t\t\t\t'variant' => $variation,\n\t\t\t\t\t\t\t'quantity' => absint( $updated_qty - $origin_qty ),\n\t\t\t\t\t\t\t'category' => $first_category,\n\t\t\t\t\t\t\t'price' => $price,\n\t\t\t\t\t\t\t'list_name' => '',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t) );\n\n\t\t\t// New qty is lower, removed products\n\t\t} elseif ( $updated_qty < $origin_qty ) {\n\n\t\t\t$this->add_track_data( array(\n\t\t\t\t'type' => 'remove_from_cart',\n\t\t\t\t'body' => array(\n\t\t\t\t\t'items' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => $download->ID,\n\t\t\t\t\t\t\t'name' => $download->get_name(),\n\t\t\t\t\t\t\t'variant' => $variation,\n\t\t\t\t\t\t\t'quantity' => absint( $origin_qty - $updated_qty ),\n\t\t\t\t\t\t\t'category' => $first_category,\n\t\t\t\t\t\t\t'price' => $price,\n\t\t\t\t\t\t\t'list_name' => '',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t) );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "11139021fdee62bdd606b517c8ef6e5e", "score": "0.5864597", "text": "function remove($rowid) {\n\n $this ->cart-> update(array('rowid' => $rowid, 'qty' => 0));\n\n redirect('Carrito');\n\n}", "title": "" }, { "docid": "75e300af0cc771dd906d9e7b5412bc3d", "score": "0.58618337", "text": "public function remove($itemId) {\n $item = $this->dbcart->get_cart_item($itemId);\n if (!empty($item)) {\n if ($item['qty'] > 1) {\n $this->dbcart->update_item(array('id' => $itemId, 'qty' => $item['qty'] - 1));\n } else {\n $this->dbcart->remove_item(array('id' => $itemId));\n }\n }\n set_flash_notice('Товар удалён из корзины');\n redirect_to_referral();\n }", "title": "" }, { "docid": "ee24bf8de618815e8232c3065dad59cf", "score": "0.5837325", "text": "function hook_update_cart_item($nid, $data = array(), $qty, $cid = NULL) {\n if (!$nid) return NULL;\n $cid = !(is_null($cid) || empty($cid)) ? $cid : uc_cart_get_id();\n if ($qty < 1) {\n uc_cart_remove_item($nid, $cid, $data);\n }\n else {\n db_query(\"UPDATE {uc_cart_products} SET qty = %d, changed = %d WHERE nid = %d AND cart_id = '%s' AND data = '%s'\", $qty, time(), $nid, $cid, serialize($data));\n }\n\n // Rebuild the items hash\n uc_cart_get_contents(NULL, 'rebuild');\n if (!strpos(request_uri(), 'cart', -4)) {\n drupal_set_message(t('Your item(s) have been updated.'));\n }\n}", "title": "" }, { "docid": "0a2969da9c0d6e0afec7f6fdc2c42558", "score": "0.5836543", "text": "public function removeItem($id = null)\n {\n if ($id === null) {\n return redirect()->route('cart');\n }\n\n if (array_key_exists($id, Cart::content()->toArray())) {\n Cart::remove($id);\n }\n return redirect()->route('cart');\n }", "title": "" }, { "docid": "5f3178216fb6f5b5907e3766a71cd3db", "score": "0.58210796", "text": "public function removeCartItem($id)\r\n {\r\n\t$db = JFactory::getDbo();\r\n \r\n\t// Create a new query object.\r\n\t$query = $db->getQuery(true);\r\n\t\r\n\t// delete all custom keys for user 1001.\r\n\t$conditions = array(\r\n\t\t\t$db->quoteName('ddc_shoppingcart_detail_id') . ' = '.$id\t\t\t\r\n\t);\r\n\t\r\n\t$query->delete($db->quoteName('#__ddc_shoppingcart_details'));\r\n\t$query->where($conditions);\r\n\t\r\n\t$db->setQuery($query);\r\n\t\r\n\t$result = $db->execute();\r\n\t\r\n\treturn $result;\r\n }", "title": "" }, { "docid": "fe9228727097299685366de3d9fc2fda", "score": "0.5802125", "text": "function removeFromCart()\n{\n\n\tif(isset($_GET['ID']))\n\t{\n\t\n\t\t$productID = $_GET['ID'];\n\n\t\t//Check if the product exists within the cart if so follow on\n\t\tif(array_key_exists($productID, $_SESSION['paypalCart']))\n\t\t{\n\t\t\n\t\t\t//Remove one from the total quantity of products set in the cart\n\t\t\t$newQty = $_SESSION['paypalCart'][$productID]['qty'] - 1;\n\t\t\t\n\t\t\t//Update the cart quantity\n\t\t\t$_SESSION['paypalCart'][$productID]['qty'] = $newQty;\n\t\t\t\n\t\t\t//If there are less than 1 in the qty subkey then remove the product from the cart\n\t\t\tif($newQty < 1)\n\t\t\t{\n\t\t\t\t\n\t\t\t\t//Remove the product from the cart\n\t\t\t\tunset($_SESSION['paypalCart'][$productID]);\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//No Product with that ID redirect and display message\n\t\t\tnotify('Removed 1 item from the cart.', 1);\n\t\t\theader('Location: cart.php');\n\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\n\t\t\t//No Product with that ID redirect and display message\n\t\t\tnotify('Sorry but there is no product with that ID.', 0);\n\t\t\theader('Location: tutorial-4.php');\n\t\t\n\t\t}\n\t\n\t}\n\telse\n\t{\n\t\t\n\t\t//No Product with that ID redirect and display message\n\t\tnotify('Sorry but there is no product with that ID.', 0);\n\t\theader('Location: tutorial-4.php');\n\t\n\t}\n\n}", "title": "" }, { "docid": "68f899ffb3649da9f48edfd65e71baab", "score": "0.57905775", "text": "public function removeCartItemAction()\n {\n if (($data = \\System\\Helper::getJSONParameters()) !== false && $_SESSION['order_payment_status'] == 0) {\n $product = new \\Models\\Product();\n echo (int)$product->cartItemRemove($data['cart_item_id']); // ok\n } else {\n echo 0; // error\n }\n }", "title": "" }, { "docid": "ad990646d466b646ac9c76e269cd51ad", "score": "0.57536787", "text": "public function remove_item_from_basket($id){\n $current_basket_items = [];\n if(Cookie::get('basket_items') && !empty(Cookie::get('basket_items'))){\n $current_basket_items = json_decode(Cookie::get('basket_items'),true);\n }\n if (($key = array_search($id, $current_basket_items)) !== false) {\n unset($current_basket_items[$key]);\n }\n Cookie::queue('basket_items',json_encode($current_basket_items));\n return redirect()->route('home');\n }", "title": "" }, { "docid": "25fa60d72b68345cfeaa533b54386946", "score": "0.5747242", "text": "private function _removeQuoteItem()\n {\n\t\tif(\\Cart2Quote\\License\\Model\\License::getInstance()->isValid()) {\n\t\t\t$removeItemId = (int)$this->getRequest()->getPost('remove_item');\n $removeFrom = (string)$this->getRequest()->getPost('from');\n if ($removeItemId && $removeFrom) {\n $this->getCurrentQuote()->removeQuotationItem($removeItemId);\n }\n\t\t}\n\t}", "title": "" }, { "docid": "574023c55433700523311dec224e4cfe", "score": "0.57370144", "text": "public function switchToSaveForLater($id)\n {\n $item = Cart::get($id);\n\n Cart::remove($id);\n\n $duplicates = Cart::instance('saveForLater')->search(function ($cartItem, $rowId) use ($id) {\n return $rowId === $id;\n });\n\n if ($duplicates->isNotEmpty()) {\n return redirect()->route('cart.index')->with('success_message', 'Item is already Saved For Later!');\n }\n\n Cart::instance('saveForLater')->add($item->id, $item->name, 1, $item->price)\n ->associate('App\\Product');\n\n return redirect()->route('cart.index')->with('success_message', 'Item has been Saved For Later!');\n }", "title": "" }, { "docid": "5803961380d6c07055ebe7f3c2f307c8", "score": "0.5732358", "text": "public function getDelItemCart($id){\n $oldCart = Session::has('cart')?Session::get('cart'):null;\n $cart = new Cart($oldCart);\n $cart->removeItem($id);\n if(count($cart->items) >= 0){\n Session::put('cart', $cart);\n }\n else{\n Session::forget('get');\n }\n return redirect()->back();\n }", "title": "" }, { "docid": "70eaba639b090cf2d08a6d25ee48bbf7", "score": "0.5716866", "text": "public function remove_detail_from_cart()\n {\n $cartDetail = new CartDetail($this->input);\n $jsonAlert = new JSONAlert();\n\n try {\n $jsonAlert->append_batch(array(\n 'model'=>$cartDetail,\n 'check_empty'=>array(\n 'id'=>'Id Needed!',\n 'cart_id'=>'Cart Id Needed!'\n )\n ));\n } catch(Exception $e) {\n echo 'Message: ' .$e->getMessage();\n }\n\n if( ! $jsonAlert->hasErrors )\n {\n $this->db->delete('t_remarketing_cart_detail', array(\n 'id'=>$cartDetail->id\n ));\n\n $cartDetailModelQuery = $this->db->get_where('t_remarketing_cart_detail', array(\n 'cart_id'=>$cartDetail->cart_id\n ));\n\n if($cartDetailModelQuery->num_rows() < 1)\n {\n $this->db->delete('t_remarketing_cart', array(\n 'id'=>$cartDetail->cart_id\n ));\n }\n else\n {\n // Get all cart details price\n $totalAmount = 0;\n\n foreach ($cartDetailModelQuery->result_object() as $cartDetail)\n {\n $totalAmount += $cartDetail->price;\n }\n $totalGST = $totalAmount*0.15;\n $totalAmountGST = $totalAmount*1.15;\n\n $this->db->update('t_remarketing_cart', array(\n 'total_amount'=>$totalAmount,\n 'gst'=>$totalGST,\n 'total_amount_gst'=>$totalAmountGST\n ), array(\n 'id'=>$cartDetail->cart_id\n ));\n }\n $jsonAlert->append(array(\n 'successMsg'=>'Product removed from cart!'\n ), FALSE);\n\n if( $cartDetailModelQuery->num_rows() > 0 )\n {\n $jsonAlert->model = array(\n 'is_cart_empty'=>$cartDetailModelQuery->num_rows() < 1 ? true : false\n );\n }\n }\n echo $jsonAlert->result();\n\t}", "title": "" }, { "docid": "8df7577e740ebf45070a474f7bd1b104", "score": "0.57019275", "text": "public function addToExisting ($id, $qty1) {\r\n\t\t\r\n\t\t//$id = 1; //cart id here\r\n\t\t$qty = 0;\r\n\r\n\t\t//get the current ticket qty\r\n\t\t$data = $this->MCart->read($id);\r\n\t\tforeach ($data as $datum) {\r\n\t\t\t$qty = $datum->quantity;\r\n\t\t}\r\n\t\t$qty += $qty1;\r\n\r\n\t\t$affectedFields = array ('quantity'=>$qty);\r\n\t\t$where = array ('cart_id'=>$id);\r\n\r\n\t\tif ($this->MCart->update1($where, $affectedFields) > 0) {\r\n\t\t\tredirect(\"finance/cCart/viewCart\");\r\n\t\t} else {\r\n\t\t\techo 'Failed!';\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "85e0cdf9bf906e15bb904c71830bbb46", "score": "0.5690461", "text": "function AddToCart()\n\t{\n\t\tglobal $member_id;\n\n\t\tif($this->VarMod->MyConfig['onlyauth']['value']==\"1\")\n\t\t{\n\t\t\tif(isset($member_id['user_id'])&&$member_id['user_id']!=\"\")\n\t\t\t{\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\theader(\"location: \".$_SERVER['HTTP_REFERER']);\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\n\t\t$CountIT = 1;\n\t\tif(isset($_POST['prod_qty'])&&$_POST['prod_qty']!=\"\")\n\t\t{\n\t\t\t$CountIT = $_POST['prod_qty'];\n\t\t}\n\t\tif(isset($member_id['user_id'])&&$member_id['user_id']!=\"\")\n\t\t{\n\t\t\t$MyCartId = $member_id['user_id'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// look of we have a cookie\n\t\t\tif(isset($_COOKIE['elvic_userid']))\n\t\t\t{\n\t\t\t\t$MyCartId = $_COOKIE['elvic_userid'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$value = $this->wtl_GenerateId();\n\t\t\t\tsetcookie(\"elvic_userid\", $value, time()+3600*24, \"/\", '.'.$_SERVER['SERVER_NAME']); /* expire in 24 hour */\n\t\t\t\t$MyCartId = $value;\n\t\t\t}\n\t\t}\n\n\t\t// we have our cart ID try to get cart data\n\t\t$MyCart = $this->VarMod->GetRecords(\"carts\", array(\"user_id\"=>$MyCartId));\n\t\tif(isset($MyCart)&&count($MyCart)>0)\n\t\t{\n\t\t\t$MyCart = $MyCart[0];\n\t\t\t// as we have one lets edit it\n\t\t\t$CartContents = $this->wtl_convert(\"UTF-8\", \"cp1251\", json_decode($MyCart['contents'], true));\n\t\t//\tfor($u=0; $u<$CountIT; $u++)\n\t\t//\t{\n\t\t\t$existTrue = false;\n\t\t\tforeach($CartContents as $fey=>$citem)\n\t\t\t{\n\t\t\t\tif($citem['prod']==$_GET['id'])\n\t\t\t\t{\n\t\t\t\t\tif(!isset($_POST['newqty'])||$_POST['newqty']==\"\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$CartContents[$fey]['qty'] = (int)$citem['qty']+(int)$CountIT;\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$CartContents[$fey]['qty'] = $_POST['newqty'];\n\t\t\t\t\t}\n\t\t\t\t\t$existTrue = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($existTrue==false)\n\t\t\t{\n\t\t\t\t$CartContents[] = array(\"prod\"=>$_GET['id'], \"qty\"=>$CountIT);\n\t\t\t}\n\t\t//\t}\n\t\t\t$CartContentsStr = json_encode($this->wtl_convert(\"cp1251\", \"utf-8\", $CartContents));\n\t\t\t$this->VarMod->EditRecord(\"carts\", $MyCart['id'], array(\"contents\"=>$CartContentsStr));\n\t\t\t$CurCat = $MyCart['id'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// we need to create the new cart\n\t\t\t$CartContents = array();\n\t\t\t$CartContents[] = array(\"prod\"=>$_GET['id'], \"qty\"=>$CountIT);\n\t\t/*\tfor($u=0; $u<$CountIT; $u++)\n\t\t\t{\n\t\t\t\t$CartContents[] = array(\"prod\"=>$_GET['id']);\n\t\t\t}*/\n\t\t\t$CartContentsStr = json_encode($this->wtl_convert(\"cp1251\", \"utf-8\", $CartContents));\n\t\t\t$data = array(\"user_id\"=>$MyCartId, \"date\"=>date(\"Y-m-d G:i:s\"), \"contents\"=>$CartContentsStr);\n\t\t\t$CurCat = $this->VarMod->AddRecord(\"carts\", $data);\n\t\t}\n\t\theader(\"location: \".$_SERVER['HTTP_REFERER']);\n\t}", "title": "" }, { "docid": "b02af38b1d27cbaf74005a9e6d3ee6b4", "score": "0.56481", "text": "function delete_item($rowid){\n\t\t$this->cart->update(array('rowid' => $rowid, 'qty' => 0));\n\t\t$this->view_cart();\n\t}", "title": "" }, { "docid": "2cb016d5eea5d74bb917cc7f2eeeb12e", "score": "0.56413585", "text": "public function getRemoveItem($id)\n {\n $oldCart=Session::has('cart')?Session::get('cart'):null;\n $cart=new Cart( $oldCart);\n $cart->removeItem($id);\n\n if(count($cart->items )>0)\n {\n Session::put('cart',$cart);\n }\n else\n {\n Session::forget('cart');\n }\n\n\n return redirect('/cart');\n }", "title": "" }, { "docid": "6744e1d0908e564910f05226b6cfb9f0", "score": "0.5631574", "text": "public function removeItemFromCart(Request $request){\n if($request->isMethod('post')){\n $products = $request->session()->get('products');\n $num_products = count($products);\n if($num_products > 0){\n for($i = 0; $i < $num_products; $i++){\n $_this = $products[$i];\n if($_this['id'] == $request->id){\n array_splice($products, $i, 1);\n $request->session()->put('products', $products);\n return json_encode(true);\n }\n }\n return json_encode(false);\n } \n else\n return json_encode(false);\n }\n else\n return redirect('/');\n }", "title": "" }, { "docid": "de06c3f3c53700be481378e7e56e3f0a", "score": "0.56285894", "text": "public function removeitem(Request $request)\n {\n \\Cart::remove([\n 'id' => $request->id,\n ]);\n return back()->with('success', 'Pack removed successfully');\n }", "title": "" }, { "docid": "1fab959c41ce19f9b366a56c0970d33b", "score": "0.5627821", "text": "public function removeItem($id){\n $this->totalQty -= $this->items[$id]['qty'];\n $this->totalPrice -= $this->items[$id]['price'];\n\n unset($this->items[$id]);\n }", "title": "" }, { "docid": "1ec4b944486c645ef4235ab4466b875c", "score": "0.5627788", "text": "public function getRemoveitem($identifier) {\n //get reference to item object\n $item = Cart::item($identifier);\n //delete it\n $item->remove();\n //go back to the cart\n return Redirect::to('store/cart');\n }", "title": "" }, { "docid": "803799aca2eaf32f9f507feb62f0d559", "score": "0.56181455", "text": "public function removeItem($id)\n {\n Cart::remove($id);\n return redirect()->route('giohang');\n \n }", "title": "" }, { "docid": "3fac02137f5a9665be20f6986d21e97a", "score": "0.5614639", "text": "function removeFromCart($cart_id)\n {\n if (array_key_exists($cart_id, $this->CartContent))\n {\n if(!empty($this->CartContent[$cart_id]['options']))\n {\n foreach($this->CartContent[$cart_id]['options'] as $oinfo)\n {\n if(is_array($oinfo) and array_key_exists('is_file',$oinfo) and ($oinfo['val'] != ''))\n {\n modApiFunc('Shell','removeDirectory',dirname($oinfo['val']));\n };\n };\n };\n\n $prod_id = $this->CartContent[$cart_id]['product_id'];\n $stat = array( array('PRODUCT_ID'=>$prod_id, 'QUANTITY'=>$this->CartContent[$cart_id]['quantity']) );\n modApiFunc('EventsManager','throwEvent', 'ProductRemovedFromCart', $stat);\n\n $this->removeGCfromDB($prod_id);\n\n unset($this->CartContent[$cart_id]);\n }\n\n modApiFunc('Session', 'set', 'CartContent', $this->CartContent);\n $this -> buildOrders();\n }", "title": "" }, { "docid": "3bb14912bef0568c3ad8363ed023df21", "score": "0.5604237", "text": "public function update_cart() {\n $product = $this->product->get_product_by_id($this->input->post('product_id'));\n if($product['inventory_count'] < $this->input->post('amount'))\n {\n $this->session->set_flashdata('errors', 'The amount that you picked is larger than the stock amount. Please choose again');\n redirect('/products/show/'.$this->input->post('product_id'));\n }\n $amount = $this->session->userdata('cart_amount');\n $totalAmount = $amount + $this->input->post('amount');\n $this->session->set_userdata('cart_amount', $totalAmount);\n \n //updates the IDs and quantity of products in the cart\n $products = $this->session->userdata('products');\n $exist = false; //added or not\n $count = 0;\n \n //traversing through the products array to find if the product being added already exist in the cart\n foreach ($products as $product) { \n if ($product['id'] == $this->input->post('product_id')) { \n $product['amount'] += $this->input->post('amount');\n $newProduct = array(\n 'id' => $product['id'],\n 'amount' => $product['amount']\n );\n $exist = true;\n $products[$count] = $newProduct;\n $this->session->set_userdata('products', $products);\n redirect('/products/add_to_cart/' . $newProduct['id']); \n }\n $count++;\n }\n\n //if it doesnt exist create an array with the infomation of the product we just added to cart\n $newProduct = array(\n 'id' => $this->input->post('product_id'),\n 'amount' => $this->input->post('amount')\n );\n \n //push it into the session cart\n array_push($products, $newProduct); \n $this->session->set_userdata('products', $products);\n redirect('/products/add_to_cart/' . $newProduct['id']);\n }", "title": "" }, { "docid": "2abfa5983f8e366d78c6b5ef2b26537c", "score": "0.56010634", "text": "function deleteCartItem(){\n $lang['products'] = \" sản phẩm\";\n $lang['cart_empty'] = \"Bạn không có sản phẩm nào trong giỏ hàng\";\n $lang['removed'] = \"Đã xóa sản phẩm khỏi giỏ hàng\";\n \n if (isset($_SESSION['cart']) and !empty($_SESSION['cart'])) {\n $product_id = intval(getRequest('id'));\n if($product_id > 0){\n $cart = $_SESSION['cart'];\n $totalAmount = 0;\n foreach ($cart as $key => $product) {\n if($product['id'] == $product_id){\n unset($cart[$key]);\n }else{\n $totalAmount += $product['amount'];\n }\n }\n array_values($cart);\n $_SESSION['cart'] = $cart;\n\n Response(json_encode(array(\n 'status' => 'success',\n 'countCart' => count($cart) . $lang['products'],\n 'totalAmount' => number_format($totalAmount,0,',','.') . \" VNĐ\",\n 'message' => $lang['removed'],\n )));\n }\n }else{\n Response(json_encode(array(\n 'status' => 'error',\n 'message' => $lang['cart_empty'],\n )));\n }\n exit();\n}", "title": "" }, { "docid": "40c4a4c07789278e05c0e821d9711019", "score": "0.5600251", "text": "function remove_from_cart($product_id) {\r\n\tif(isset($_SESSION['cart'][$product_id]))\r\n\t\t$_SESSION['cart'][$product_id] = 0;\r\n}", "title": "" }, { "docid": "8f04344202878bd08eb8f527d3ebf98e", "score": "0.55628407", "text": "public function cart_remove_item($r) {\n $items = Base_EpesiStoreCommon::get_cart();\n $key = array_search($r, $items);\n if ($key !== false) {\n unset($items[$key]);\n Base_EpesiStoreCommon::set_cart($items);\n }\n }", "title": "" }, { "docid": "77f1a4c6d5a139bb1c1134a2aa8fbd60", "score": "0.5554109", "text": "function remove_from_cart($product_to_remove)\n{\n foreach ($product_to_remove as $product_id) {\n $where = array('product_id' => $product_id);\n if (is_guest()) {\n $where['session_id'] = get_session_id();\n } else {\n $where['ordered_by'] = get_member();\n }\n\n $GLOBALS['SITE_DB']->query_update(\n 'shopping_cart',\n array('is_deleted' => 1),\n $where\n );\n }\n}", "title": "" }, { "docid": "b4ec779adadb2f77cb3f43927ba1846c", "score": "0.5539176", "text": "function AddToCart($user, $userip, $packid) {\n\t$duplicatePacks = mysql_query(\"SELECT `cart_pack_id` FROM `cp_store_cart` WHERE `customer_id`='$user'\");\n\t$dupPack = mysql_num_rows($duplicatePacks);\n\tif ($dupPack == 1) {\n\t\t$redir = '<meta http-equiv=\"refresh\" content=\"0;url=http://'.$_SERVER['SERVER_NAME'].'/store.php?p=main&error=1\">';\n\t\techo $redir;exit();\n\t}\n\t$date = date('Y-m-d h:i:s A');\n\t// Check if there is at least 1 item in the customers cart\n\t$findPrevCart = mysql_query(\"SELECT `cart_id` FROM `cp_store_cart` WHERE `customer_id`='$user' AND `cart_id`='1' LIMIT 1\");\n\t$prevCart = mysql_num_rows($findPrevCart);\n\t// If there is not one, run..\n\tif ($prevCart != 1) {\n\t$addProduct = mysql_query(\"\n\t\tINSERT INTO `cp_store_cart` (`cart_id`,`customer_id`,`customer_ip_address`,`cart_pack_id`,`date_item_added`)\n\t\tVALUES ('1','$user','$userip','$packid','$date');\"\n\t );\n\t}\n\t// If there is one, run..\n\tif ($prevCart == 1) {\n\t$prevCartID = mysql_query(\"SELECT `cart_id`,`date_item_added` FROM `cp_store_cart` WHERE `customer_id`='\".$user.\"' ORDER BY `date_item_added` DESC LIMIT 1;\");\n\t$cartId = mysql_fetch_array($prevCartID);\n\t$cart = $cartId['cart_id'];\n\t$addProduct = mysql_query(\"\n\t\tINSERT INTO `cp_store_cart` (`id`,`cart_id`,`customer_id`,`customer_ip_address`,`cart_pack_id`,`date_item_added`)\n\t\tVALUES ('','$cart' + 1,'$user','$userip','$packid','$date');\"\n\t );\n\t}\n}", "title": "" }, { "docid": "16db08d8a01f77a05a4d45657fbc91ca", "score": "0.55382603", "text": "function pull_cart($cart) {\n $this->SC->load_library('Cart');\n $cart = $this->SC->Cart->explode_cart($cart); \n \n foreach ($cart as $item) {\n if ($this->item_stock_type($item['id']) === FINITE_STOCK) {\n $this->remove_item_stock($item['id'],$item['quantity']);\n }\n foreach ($item['options'] as $option) {\n if ($this->option_is_stockable($option['id'])) {\n $this->remove_option_stock($option['id'],$option['quantity']);\n }\n }\n }\n \n }", "title": "" }, { "docid": "2e130acc6e548372d6425b388702c812", "score": "0.5525129", "text": "public static function update()\n {\n static::$cart = static::get();\n\n $items = static::$cart->filter(function ($item) {\n return Product::exists($item->slug) && $item->update();\n });\n\n static::set($items);\n }", "title": "" }, { "docid": "c4982b6004b6176e29625312dff93811", "score": "0.55242586", "text": "public function delete(){\n\t\t// disable layout and view\n\t\t$this->autoRender = false;\n\n\t\t// load existing cart to add/edit products\n\t\t$curCart = $this->Session->read('User.Cart');\n\n\t\t// remove selected item\n\t\tunset($curCart[$this->request->data('itemNumber')]);\n\n\t\t// store updated cart values\n\t\t$this->Session->write('User.Cart', $curCart);\n\t}", "title": "" }, { "docid": "3cc8ccea972f7aff311aba8d42ae05f0", "score": "0.5521853", "text": "private function _updateQuoteItems()\n {\n\t\tif(\\Cart2Quote\\License\\Model\\License::getInstance()->isValid()) {\n\t\t\tif ($this->getRequest()->getPost('update_items')) {\n $this->quoteCreate->setQuote($this->getCurrentQuote());\n $items = $this->getRequest()->getPost('item', []);\n $items = $this->_processFiles($items);\n $items = $this->quoteCreate->updateQuotationItems($items);\n $this->quoteCreate->updateTierItems($items);\n if ($this->getRequest()->getPost('remove_items')) {\n foreach ($items as $key => $item) {\n if ($item['action'] == 'remove') {\n $this->getCurrentQuote()->removeQuotationItem($key);\n }\n }\n }\n if ($this->getRequest()->getPost('duplicate_items')) {\n foreach ($items as $key => $item) {\n if ($item['action'] == 'duplicate') {\n $originalItem = $this->getCurrentQuote()->getItemById($key);\n if (!$originalItem->getId()) {\n throw new \\Magento\\Framework\\Exception\\NoSuchEntityException(\n __('Item %1 does not exist', $key)\n );\n }\n $clonedItems = $this->cloningHelper->cloneItem($originalItem);\n foreach ($clonedItems as $clonedItem) {\n $this->getCurrentQuote()->getItemsCollection()->addItem(\n $clonedItem\n );\n }\n }\n }\n }\n }\n\t\t}\n\t}", "title": "" }, { "docid": "d6c23fa3a99960ea97d3b0dc3415bbb8", "score": "0.5516186", "text": "function addToCart($id) {\r\n $items = getItems();\r\n\r\n foreach ($items as $product) {\r\n if ($product['product_id'] == $id) {\r\n $_SESSION['cart'][] = $product;\r\n break;\r\n }\r\n }\r\n}", "title": "" }, { "docid": "e20e55d7395eb575dc25649c2cf4c1cc", "score": "0.5511209", "text": "public function insertInCart($id)\n {\n $item = Cart::instance('wishlist')->get($id);\n Cart::instance('wishlist')->remove($id);\n $duplicates = Cart::instance('default')->search(function ($cartItem, $rowId) use ($id) {\n return $rowId === $id;\n });\n if ($duplicates->isNotEmpty()) {\n return redirect()->route('reservation.store')->with('flash_success_message', 'Vehicle is already in your Cart!');\n }\n Cart::instance('default')->add($item->id, $item->vehicle_name, 1, $item->price_per_day)->associate('App\\Vehicle');\n return redirect()->route('reservation.store')->with('flash_success_message', 'Vehicle has been moved to Cart Successfully!');\n }", "title": "" }, { "docid": "ded8202c193ac49a765d80a1dc282870", "score": "0.5510465", "text": "function delete_item($product_item_id) {\r\n\t\t$products = $this->Session->read('Cart'); \r\n\t\tunset($products[$product_item_id]);\r\n\t\t$this->Session->write('Cart', $products);\t\t\r\n\t}", "title": "" }, { "docid": "6c75f9b8a96aa6856a26ab68d6cd5c77", "score": "0.5506838", "text": "public function remove(Request $request)\n {\n DB::beginTransaction();\n try {\n $cart = CartAmbil::where('user_id', Auth::id())\n ->where('to', $request->user) \n ->where('item_id', $request->item)->first();\n // $cart = Cart::session('ambil_' . $request->user)->get($request->item);\n if ( !empty($cart) ) {\n $item = ItemAmbil::find($cart->item_id);\n $item->stock = $item->stock + $cart->quantity;\n $item->save();\n\n CartAmbil::where('user_id', Auth::id())\n ->where('to', $request->user) \n ->where('item_id', $request->item)->delete();\n }\n Cart::session('ambil_' . $request->user)->remove($request->item);\n if (!empty(Cart::session('ambil_' . $request->user)->get($request->item))) {\n throw new Exception();\n } else {\n if (Cart::session('ambil_' . $request->user)->isEmpty()) {\n Cart::session('ambil_' . $request->user)->clear();\n $session = Session::get('ambil');\n $key = array_search($request->user, $session);\n unset($session[$key]);\n if (empty($session)) {\n Session::forget('ambil');\n } else {\n Session::put('ambil', $session);\n }\n }\n $alert = ['success', 'Berhasil menghapus barang dari pesanan.'];\n }\n DB::commit();\n } catch (Exception $e) {\n $alert = ['danger', 'Gagal menghapus data pesanan.'];\n DB::rollback();\n }\n return redirect()->back()->with('alert', $alert);\n }", "title": "" }, { "docid": "6967404c451bffb1a3cc6183e8f6e15d", "score": "0.5497452", "text": "public function addByOne($id){\n $this->items [$id]['qty']++;\n $this->items [$id]['price'] += $this->items[$id]['item']['price'];\n $this->totalQty++;\n $this->totalPrice += $this->items[$id]['item']['price'];\n Session::put('cart', $this);\n }", "title": "" }, { "docid": "a99c5e9046e3e4579f47e7685e323b9e", "score": "0.54943776", "text": "function DeleteItem($id) {\n\t\t\t\n\t\t\t# get file\n\t\t\t$file = rdumpfile('news.wb');\n\t\t\t\n\t\t\t# prepare result\n\t\t\t$result = false;\n\t\t\t\n\t\t\t# find and remove item $id\n\t\t\tfor ($i = 0; $i < count($file); $i++) {\n\t\t\t\t$temp = explode('|', $file[$i]);\n\t\t\t\tif ($temp[1] == $id) {\n\t\t\t\t\t$result = true;\n\t\t\t\t\t$file[$i] = '';\n\t\t\t\t\t}\n\t\t\t\t} // for\n\t\t\t\t\n\t\t\tif ($result == false) { return false; }\n\t\t\t\n\t\t\t# sort by date\n\t\t\tif (count($file) > 0) { rsort($file, SORT_NUMERIC); }\n\t\t\t\n\t\t\treturn write_new_file('news.wb', $file);\n\t\t\t}", "title": "" }, { "docid": "29bdc9eae482bc60435869bc760197b3", "score": "0.54890716", "text": "function add_to_cart() {\n\t\ttry {\n\t\t\tif($this->jsonvalue['package_id']) {\n\t\t\t\t\n\t\t\t\t$check_exist = $this->api_model->get_table_row('cart',['package_id' => $this->jsonvalue['package_id'], 'user_id' => $this->user_data['id']]);\n\t\t\t\t\n\t\t\t\tif(empty($check_exist)) {\n\t\t\t\t\t$data = array(\n\t\t\t\t\t\t'package_id' => $this->jsonvalue['package_id'],\n\t\t\t\t\t\t'quantity' => 1, \n\t\t\t\t\t\t'user_id' => $this->user_data['id']\n\t\t\t\t\t);\n\t\t\t\t\t$this->api_model->insert_data('cart',$data);\n\t\t\t\t} else {\n\t\t\t\t\t$this->api_model->update_quantity('cart', ['package_id' => $this->jsonvalue['package_id'], 'user_id' => $this->user_data['id']], 'quantity');\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$cart_data = $this->api_model->get_cart_data(['user_id' => $this->user_data['id']]);\n\t\t\techo json_encode($cart_data);\n\t\t} catch(Exception $e) {\n echo json_encode(array( \n \"status\" => $this->lang->line('json_error_status'), \n \"error\" => $e->getMessage()));\n exit;\n }\n\t}", "title": "" }, { "docid": "3628f99a08f00df4eaafae6de694bfd7", "score": "0.5480092", "text": "function nm_mini_cart_remove_product() {\n\t\t$cart_item_key = $_POST['cart_item_key'];\n\t\t\n\t\t$cart = WC()->instance()->cart;\n\t\t$removed = $cart->remove_cart_item( $cart_item_key ); // Note: WP 2.3 >\n\t\t\n\t\tif ( $removed )\t{\n\t\t $json_array['status'] = '1';\n\t\t $json_array['cart_count'] = $cart->get_cart_contents_count();\n\t\t $json_array['cart_subtotal'] = $cart->get_cart_subtotal();\n\t\t} else {\n\t\t\t$json_array['status'] = '0';\n\t\t}\n\t\t\n\t\techo json_encode( $json_array );\n\t\t\t\t\n\t\texit;\n\t}", "title": "" }, { "docid": "f102a7504d8f24621fb38988aef7c05a", "score": "0.54697376", "text": "public function remove() {\r\n $item_id = $this->input->post('item_id');\r\n $items = $this->session->userdata('cart');\r\n //print_r($items);\r\n unset($items[$item_id]);\r\n //echo '<br />';\r\n //print_r($items);\r\n $this->session->set_userdata('cart', $items);\r\n //print_r($this->session->userdata);\r\n //echo $item_id;\r\n redirect('shopping/view-cart', 'refresh');\r\n }", "title": "" }, { "docid": "997cea7fb45cb437a37fdb3e2fc697e4", "score": "0.54512703", "text": "function remove()\n {\n $this->load->library(\"cart\");\n $row_id = $_POST[\"row_id\"];\n $data = array(\n 'rowid' => $row_id,\n 'qty' => 0\n );\n $this->cart->update($data);\n echo $this->view();\n }", "title": "" }, { "docid": "cc196914d292713fa83c8c4aec56487e", "score": "0.54394674", "text": "public function removeItemFromCart($id)\n {\n return response($id);\n $cart = Cart::where('id', $id)->where('is_checked_out', 0)->find();\n if ($cart) {\n $cart->delete();\n } else {\n return response()->json(['error' => \"Problem deleting cart.\"], 500);\n }\n $count = Cart::where('is_checked_out', 0)\n ->where('user_id', Auth::id())\n ->count();\n return response()->json(['success' => \"Cart deleted successfully.\", 'data' => $count], 200);\n }", "title": "" }, { "docid": "cc4e719fca24c32910bdaa0e18f98432", "score": "0.5431547", "text": "public function remove($item_id = null){\n if(!$item_id){\n $this->error('No Item ID given.');\n \treturn false;\n }\n $this->loadModel();\n //remove the item from the cart\n if($cart_item = $this->Model->findById($item_id)){\n \t$key = $this->inCart($cart_item);\n if($key !== false){\n $slice = array_splice($this->cart,$key,1); //remove the found cart item.\n $this->save();\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "bdb5de11a43ec62459577839fe08eda3", "score": "0.5422248", "text": "function del_item($item_id)\n\t\t{\n\t\t$this->clear_promocode();\n\t\t$ti = array();\n\t\t$this->itemqtys[$item_id] = 0;\n\t\tforeach($this->items as $item)\n\t\t\t{\n\t\t\tif($item != $item_id)\n\t\t\t\t{\n\t\t\t\t$ti[] = $item;\n\t\t\t\t}\n\t\t\t}\n\t\t$this->items = $ti;\n\t\t$this->_update_total();\n\t\t}", "title": "" }, { "docid": "b011dcaea3c3c4c4fe54c26e45b13452", "score": "0.54206693", "text": "public function addItem($id){\n $product = Database::start()->get('*', 'shoppingcart', array(\n array('product_id', '=', $id),\n array('user_id', '=', $_SESSION['_user']['id'])\n ));\n if ($product->count() > 0){\n Database::start()->update('shoppingcart', array(\n 'amount' => ($product->first()->amount + 1)\n ), array(array('product_id','=', $id), array('user_id', '=', $_SESSION['_user']['id'])));\n }else{\n Database::start()->insert('shoppingcart', array(\n 'product_id' => $id,\n 'user_id' => $_SESSION['_user']['id'],\n 'amount' => 1\n ));\n }\n return true;\n }", "title": "" }, { "docid": "98d9e7b250dede4e37b1ab37bf8d51b5", "score": "0.5420313", "text": "function removefromcartAction(){\n $itemId = isset($_GET[\"id\"]) ? intval($_GET[\"id\"]) : null;\n if (! $itemId) exit();\n\n $resData = array();\n $key = array_search($itemId, $_SESSION[\"cart\"]);\n if ($key !== false){\n unset($_SESSION[\"cart\"][$key]);\n $resData[\"success\"] = 1;\n $resData[\"cntItems\"] = count($_SESSION[\"cart\"]);\n } else {\n $resData[\"success\"] = 0;\n }\n\n echo json_encode($resData);\n}", "title": "" }, { "docid": "cf222f234239e0763fafc4fbc2deea16", "score": "0.5417407", "text": "function removeMovieFromCart($movieID){\n $result = removeMovieFromShoppingCart($_SESSION[\"ID\"], $movieID);\n /* echo \"True or False: Movie was removed from shopping cart->\" . $result;*/\n /* $pos = array_search($movieID, $array);*/\n /* unset($array[$pos]);\n writeMovieData($array);*/\n displayCart();\n}", "title": "" }, { "docid": "d240c3924197dc542d491d424a65f647", "score": "0.54162556", "text": "public function addItem()\n {\n $products = Request::all();\n $id = $products['product_id'];\n $products_db = Products::findOrFail($id);\n\n if(Auth::check())\n {\n $cartContent = Cart::instance('shopping')->content();\n\n // If there is sth in the cart. Iterate through the session cart and add it to the database.\n if(count($cartContent))\n {\n foreach ($cartContent as $contents) \n {\n $cart = new ShopCart();\n $cart->user_id = Auth::user()->id;\n $cart->products_id = $contents->id;\n $cart->quantity = $contents->qty;\n $cart->save();\n }\n // Empty the Session Shop Cart\n Cart::instance('shopping')->destroy();\n\n return redirect()->intended('shopCart'); \n\n }\n else\n {\n // Determines if the product exists in the database if true increments the quantity by 1.\n $cart = ShopCart::where('user_id',Auth::user()->id)->where('products_id',$id)->first();\n if($cart)\n {\n $cart->quantity += 1;\n $cart->save();\n // return $cart->quantity;\n return redirect('shopCart');\n }\n // Create a new Item.\n $shopCart = new shopCart();\n $shopCart->user_id = Auth::user()->id;\n $shopCart->products_id = $id;\n $shopCart->quantity = 1;\n $shopCart->save();\n\n return redirect()->intended('shopCart'); \n } \n }\n else\n {\n Cart::instance('shopping')->add(['id' => $products_db->id, 'name' => $products_db->name, 'qty' => 1, 'price' => $products_db->price, 'options' => ['url_path' => $products_db->image]]); \n return redirect()->intended('shopCart');\n }\n }", "title": "" }, { "docid": "b7cfa77409dfae7497f211fa3218c824", "score": "0.5416175", "text": "public function minusQty () {\r\n\t\t$cart = new MCart();\r\n\t\t$id = $this->input->post(\"id\"); //cart id here\r\n\t\t$qty = $this->input->post(\"quantity\");\r\n\t\t\r\n\t\tif ($qty == 0) {\r\n\t\t\t$cart->delete($id);\r\n\t\t} else {\r\n\t\t\t$affectedFields = array ('quantity'=>$qty);\r\n\t\t\t$where = array ('cart_id'=>$id);\r\n\r\n\t\t\tif ($cart->update1($where, $affectedFields) > 0) {\r\n\t\t\t\techo 'Sucess!';\r\n\t\t\t} else {\r\n\t\t\t\techo 'Failed!';\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "038f6ec19850fb2250b301e07a443691", "score": "0.5403134", "text": "public function remove($id) {\n $user_id = auth()->user('id');\n $user = User::find($user_id->id);\n $cart = $user->cart;\n\n if ($cart == null) {\n $cart = new Cart;\n $cart->user_id = $user_id->id;\n $cart->save();\n }\n\n $cart_item = CartItem::where('cart_id', $user->cart->id)->where('id',$id);\n $cart_item->delete();\n \n return redirect('/products')->with('success', 'Product added to cart!');\n }", "title": "" }, { "docid": "6c5fde3a01ee3469d1f07ec5fd34dbce", "score": "0.53990626", "text": "public function removeFromCart(Request $request)\n {\n $credentials = $request->only('token','cart_id');\n $rules = [\n 'token' => 'required',\n 'cart_id' => 'required'\n ];\n $validator = Validator::make($credentials, $rules);\n if($validator->fails()) {\n $this->message = $validator->messages()->first();\n }\n else{\n $user = $this->getAuthUser($request->token); \n if($user){\n $isExist = CartOrder::where('id',$request->cart_id)->first();\n if($isExist){\n $cartData = CartOrder::where('id',$request->cart_id)\n ->delete(); \n $this->data = $this->getCartData($user->id);\n $this->status = \"true\";\n $this->message = 'messages.remove_from_cart';\n }else{\n $this->message = 'messages.item_not_found';\n }\n \n }else{\n $this->message = 'messages.token_invalid';\n }\n }\n return $this->response();\n \n }", "title": "" }, { "docid": "9b38e92c8d922289a50d4e6d17a86b64", "score": "0.53961235", "text": "private function addToCart () {\n }", "title": "" }, { "docid": "ba06687b4daae4edaa96ae115bf68175", "score": "0.53791213", "text": "public function itemRemove($id){\n //procura o item no array pelo id, se encontrar remove o item\n foreach ($this->cardItem as $item){\n if ($item->getId() == $id){\n $key = array_search($item,$this->cardItem);\n unset($this->cardItem[$key]);\n }\n }\n }", "title": "" }, { "docid": "33e609cfd3854e07bfec29ff615d1f72", "score": "0.536306", "text": "public function store(Request $request)\n {\n $itemID = $request->itemID;\n $customerID = $request->customerID;\n\n $item = Items::where('id', '=', $itemID)->get()[0];\n $itemstock = $item->stock;\n \n $cart = Carts::where('itemID', '=', $itemID)\n ->where('customerID', '=', $customerID)\n ->where('ispay', '=', 0)\n ->where('deleted_at', '=', null)\n ->get();\n //dd($cart[0]->id);\n if (count($cart) != 0) {\n $id = $cart[0]->id;\n $qty = $cart[0]->qty + $request->qty;\n\n if ($qty <= $itemstock) {\n $totalprice = $qty * $request->price;\n $update = [\n 'qty'=> $qty,\n 'totalprice'=> $totalprice\n ];\n Carts::where('id', $id)->update($update);\n $msg = \"Success!, add item quantity to cart\";\n $description = \"Change Quantity to Cart\";\n Helper::itemlog($request->itemID, $request->customerID, $request->qty, $request->price, $request->qty * $request->price, $description);\n } else {\n $msg = \"Sorry, Stock not available\";\n }\n } else {\n if ($request->qty <= $itemstock) {\n $cart = new Carts;\n $cart->itemID = $request->itemID;\n $cart->customerID = $request->customerID;\n $cart->qty = $request->qty;\n $cart->price = $request->price;\n $cart->totalprice = $request->qty * $request->price;\n $cart->ispay = 0;\n $cart->save();\n $msg = \"Success!, add item to cart\";\n $description = \"Add To Cart\";\n Helper::itemlog($request->itemID, $request->customerID, $request->qty, $request->price, $request->qty * $request->price, $description);\n } else {\n $msg = \"Sorry, Stock not available\";\n }\n }\n\n return redirect()->route('index', ['msg' => $msg]);\n }", "title": "" }, { "docid": "db51b14ece6ccf9f78a2307b60b42b03", "score": "0.5360687", "text": "public function edit($item){\n $i = 0;\n $remove = false;\n for ($i = 0; $i < sizeof($this->items); $i++){\n if($this->items[$i]['uid'] == $item['uid']){\n if($item['quantity'] == 0){\n $remove = true;\n }\n break;\n }\n }\n // Remove the item from the cart if the quantity is zero.\n if($remove === true){\n unset($this->items[$i]);\n }\n else{\n array_merge($this->items[$i], $item);\n }\n }", "title": "" }, { "docid": "7d0da99f045f8f3114c5950e1f47d164", "score": "0.53510356", "text": "public function remove($id)\n\t{\n\t\t//Fully functional.\n<<<<<<< HEAD\n\t\t$this->load->CartData->remove_from_cart($id);\n\t\tredirect('/main/cart');\n\t}", "title": "" }, { "docid": "1655d919d9fb2f0feed2b6dbc495acd2", "score": "0.5350958", "text": "public function getRemoveItem(){\n\n if (empty(Session::get('user_id'))){\n return redirect('/SignIn');\n }\n\n $product = Product::find($_POST[\"product\"]);\n\n $number = $_POST[\"number\"];\n\n if(isset($_COOKIE[\"cart\"])) {\n $cart = unserialize($_COOKIE[\"cart\"]);\n if (array_key_exists($product->id_products, $cart)) {\n if($number == 0) {\n unset($cart[$product->id_products]);\n }else{\n $cart[$product->id_products] = $number;\n }\n }\n }\n setcookie(\"cart\",serialize($cart));\n\n\n return redirect('/shop/cart');\n }", "title": "" }, { "docid": "5dad5344fc3fb4606a11901a71738b53", "score": "0.53440994", "text": "public function singleToAdd(Request $request){\n $request->validate([\n 'slug' => 'required',\n 'qty' => 'required',\n ]);\n\n $product = Product::where('slug', $request->slug)->first();\n if ( ($request->qty < 1) || empty($product) ) {\n return back()->withErrors('Something wrong. Try again!');\n } \n\n $already_cart = Cart::where('user_id', auth()->user()->id)->where('order_id', null)->where('product_id', $product->id)->first();\n\n\n\n if($already_cart) {\n $already_cart->quantity = $already_cart->quantity + $request->qty;\n $already_cart->price = ($product->offer_price * $request->qty) + $already_cart->price ;\n\n if ($already_cart->product->quantity < $already_cart->quantity || $already_cart->product->quantity <= 0) return back()->withErrors('Stock not sufficient!.');\n\n $already_cart->save();\n \n }else{\n \n $cart = new Cart;\n $cart->user_id = auth()->user()->id;\n $cart->product_id = $product->id;\n $cart->price = ($product->offer_price * $request->qty);\n $cart->quantity = $request->qty;\n\n if ($cart->product->quantity < $cart->quantity || $cart->product->quantity <= 0) return back()->withErrors('Stock not sufficient!.');\n\n $cart->save();\n }\n return back()->with('success','Product added to cart.'); \n }", "title": "" }, { "docid": "4b3827838aad6077c38a6ee1dd06b0ab", "score": "0.53372353", "text": "public function removeFromCart($id) {\n\t\tunset($this->items_in_cart[$id]);\n\t}", "title": "" }, { "docid": "0f689de02eaa7c5340cebb9cfef616d0", "score": "0.5332396", "text": "public function add_to_cart($id){\n // tim san pham\n $product = Product::findOrFail($id);\n $cart = []; // mac dinh gio hang trong\n if(Session::has(\"cart\")){\n $cart = Session::get(\"cart\");\n }\n if(check_cart($cart,$product)){\n $product->cart_qty = 1;\n\n }else{\n for($i=0;$i<count($cart);$i++){\n if($cart->id == $product->id){\n $product->qty += 1;\n }\n }\n }\n return redirect()->back();\n }", "title": "" }, { "docid": "4849d20d6a96e678569effb3608cd629", "score": "0.53243464", "text": "function updateCartItem(){\n $lang['products'] = \" sản phẩm\";\n $lang['cart_empty'] = \"Bạn không có sản phẩm nào trong giỏ hàng\";\n $lang['cart_updated'] = \"Đã cập nhật giỏ hàng\";\n \n if (isset($_SESSION['cart']) and !empty($_SESSION['cart'])) {\n $product_id = intval(getRequest('id'));\n $quantity = intval(getRequest('quantity'));\n if($product_id > 0 and $quantity > 0){\n $cart = $_SESSION['cart'];\n $totalAmount = 0;\n $item_amount = 0;\n foreach ($cart as $key => $product) {\n if($product['id'] == $product_id){\n $amount = $product['price'] * $quantity;\n $new_product = $product;\n $new_product['quantity'] = $quantity;\n $new_product['amount'] = $amount;\n unset($cart[$key]);\n array_push($cart, $new_product);\n $item_amount = $amount;\n $totalAmount += $amount;\n }else{\n $totalAmount += $product['amount'];\n }\n }\n array_values($cart);\n $_SESSION['cart'] = $cart;\n\n Response(json_encode(array(\n 'status' => 'success',\n 'countCart' => count($cart) . $lang['products'],\n 'item_amount' => number_format($item_amount,0,',','.') . \" VNĐ\",\n 'totalAmount' => number_format($totalAmount,0,',','.') . \" VNĐ\",\n 'message' => $lang['cart_updated'],\n )));\n }\n }else{\n Response(json_encode(array(\n 'status' => 'error',\n 'message' => $lang['cart_empty'],\n )));\n }\n exit();\n}", "title": "" }, { "docid": "586fcb7d387a8564b4e5b41467f20d08", "score": "0.53233343", "text": "public function depositItem() {\n $this->pdo->queryUpdate(\"pos_receipt-item\",\n [\"itemDepositPaid\" => true],\n \"iID = :iID limit 1\",\n [\"iID\" => $this->iID]);\n }", "title": "" }, { "docid": "7fda8fd8e36dbdd80ed39ef399159d31", "score": "0.5322333", "text": "public function remove() {\n \n $user_id = Session::get('user_id');\n $cart_id = filter_input(INPUT_POST, 'cart_id');\n $res = CartProductModel::remove($cart_id, $user_id);\n \n if($res) {\n Misc::redirect('');\n } else {\n $this->set('message', 'Doslo je do greske prilikom praznjenja korpe.');\n }\n \n }", "title": "" }, { "docid": "9b8dd8e3a9e95d46699dfed018558246", "score": "0.5318533", "text": "public function addToCart($id) {\n $product = Products::find($id);\n\n if(!$product) {\n abort(404);\n }\n\n $cart = session()->get('cart');\n\n if(!$cart) {\n $cart = [\n $id => [\n \"prod_name\" => $product->prod_name,\n \"qty\" => 1,\n \"prod_price\" => $product->prod_price,\n \"prod_img\" => $product->prod_img\n ]\n ];\n\n session()->put('cart', $cart);\n\n return redirect()->back()->with('Success', 'Product added to cart successfully');\n }\n\n if(isset($cart[$id])) {\n\n $cart[$id]['qty']++;\n\n session()->put('cart', $cart);\n\n return redirect()->back()->with('Success', 'Product added to cart successfully');\n }\n\n $cart[$id] = [\n \"prod_name\" => $product->prod_name,\n \"qty\" => 1,\n \"prod_price\" => $product->prod_price,\n \"prod_img\" => $product->prod_img\n ];\n\n session()->put('cart', $cart);\n\n return redirect()->back()->with('Success', 'Product added to cart successfully');\n }", "title": "" }, { "docid": "d3b915914394d07c50601a21010c0dff", "score": "0.5318057", "text": "function woocommerce_add_to_cart( $cart_item_key, $product_id, $quantity, $variation_id, $variation, $cart_item_data ) {\n\t return $cart_item_key;\n\n\t /*\n\t\tif( isset($cart_item_data['fpd_data']) ) {\n\n\t\t\t//check if an old cart item exist\n\t\t\tif( !empty($cart_item_data['fpd_data']['fpd_remove_cart_item']) ) {\n\n\t\t\t\tglobal $woocommerce;\n\t\t\t\t$woocommerce->cart->set_quantity($cart_item_data['fpd_data']['fpd_remove_cart_item'], 0);\n\n\t\t\t}\n\t\t}\n\t\t*/\n global $woocommerce;\n\n\t\tdie();\n\n\t\t$product_id = $_POST['assessories'];\n\n\t\t$found = false;\n\n\t\t//check if product already in cart\n\t\tif ( sizeof( WC()->cart->get_cart() ) > 0 ) {\n\t\t\tforeach ( WC()->cart->get_cart() as $cart_item_key => $values ) {\n\t\t\t\t$_product = $values['data'];\n\t\t\t\tif ( $_product->id == $product_id )\n\t\t\t\t\t$found = true;\n\t\t\t}\n\t\t\t// if product not found, add it\n\t\t\tif ( ! $found )\n\t\t\t\tWC()->cart->add_to_cart( $product_id );\n\t\t} else {\n\t\t\t// if no products in cart, add it\n\t\t\tWC()->cart->add_to_cart( $product_id );\n\t\t}\n\t}", "title": "" }, { "docid": "8f406917023a0110d93d6350033a3ab5", "score": "0.5309941", "text": "public function removeItem($id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "title": "" }, { "docid": "78f2a6d32cc0b071c3abfff86ce779e0", "score": "0.53061366", "text": "public function removeCartItem($index, Request $request){\n if (Auth::check()) {\n try {\n $cartItem = Cartitem::findOrFail($index);\n $check = $cartItem->delete();\n if($check){\n return redirect('cart')->withFlashDelete('<div class=\"alert alert-success\"><span>'. '<i class=\"fa fa-check-circle\" aria-hidden=\"true\"></i> Item is removed from cart.' .'</span></div>');\n \n // return response()->json(['stat'=> 'success', 'msg'=> '<div class=\"alert alert-success\"><span>'. '<i class=\"fa fa-check-circle\" aria-hidden=\"true\"></i> Item is removed from cart.' .'</span></div>']);\n }\n return redirect('cart')->withFlashDelete('<div class=\"alert alert-danger\"><span>'. '<i class=\"fa fa-times-circle\" aria-hidden=\"true\"></i> Item not found.' .'</span></div>');\n\n // return response()->json(['stat'=> 'failed', 'msg'=> '<div class=\"alert alert-danger\"><span>'. '<i class=\"fa fa-times-circle\" aria-hidden=\"true\"></i> Item not found.' .'</span></div>']);\n } catch (Exception $e) {\n return redirect('cart')->withFlashDelete('<div class=\"alert alert-danger\"><span>'. '<i class=\"fa fa-times-circle\" aria-hidden=\"true\"></i> Error occurred.' .'</span></div>');\n }\n \n }else{\n try {\n $cartItem = LaraCart::find(['itemHash' => $index]) ;\n if(empty($cartItem)){\n return redirect('cart')->withFlashDelete('<div class=\"alert alert-danger\"><span>'. '<i class=\"fa fa-times-circle\" aria-hidden=\"true\"></i> Item not found.' .'</span></div>');\n // return response()->json(['stat'=> 'failed', 'msg'=> '<div class=\"alert alert-danger\"><span>'. '<i class=\"fa fa-times-circle\" aria-hidden=\"true\"></i> Item not found.' .'</span></div>']);\n }\n LaraCart::removeItem($index);\n return redirect('cart')->withFlashDelete('<div class=\"alert alert-success\"><span>'. '<i class=\"fa fa-check-circle\" aria-hidden=\"true\"></i> Item is removed from cart.' .'</span></div>');\n // return response()->json(['stat'=> 'success', 'msg'=> '<div class=\"alert alert-success\"><span>'. '<i class=\"fa fa-check-circle\" aria-hidden=\"true\"></i> Item is removed from cart.' .'</span></div>']);\n } catch (Exception $e) {\n return redirect('cart')->withFlashDelete('<div class=\"alert alert-danger\"><span>'. '<i class=\"fa fa-times-circle\" aria-hidden=\"true\"></i> Error occurred.' .'</span></div>');\n // return response()->json(['stat'=> 'failed', 'msg'=> '<div class=\"alert alert-danger\"><span>'. '<i class=\"fa fa-times-circle\" aria-hidden=\"true\"></i> Error occurred.' .'</span></div>']);\n }\n\n // $cartItems = Session::has('cart') ? Session::get('cart') : null;\n // if (!empty($cartItems)) {\n // Session::forget('cart.'.$index);\n // }\n\n // $cartItems = Session::has('cart') ? Session::get('cart') : null;\n // $cartItems2 = array();\n // foreach ($cartItems as $key => $value) {\n // array_push($cartItems2,$value);\n // }\n // Session::flush();\n // Session::put('cart', $cartItems2);\n // $request->session()->save();\n }\n // return redirect()->route('frontend.cart.view');\n }", "title": "" }, { "docid": "60dab500972acf0cf5889dd881bd86e5", "score": "0.5298112", "text": "public function deleteItemCart(Request $request,$id)\n {\n $oldCart = Session('Cart')?Session('Cart'):null;\n $newCart = new Cart($oldCart);\n $newCart->DeleteItemCart($id);\n if(count($newCart->products) > 0)\n {\n $request->session()->put('Cart',$newCart);\n }\n else{\n $request->session()->forget('Cart');\n }\n $item = $newCart->products;\n return response()->json(['totalPrice'=>$newCart->totalPrice,'totalQuanty'=>$newCart->totalQuanty,'products'=>$item]);\n }", "title": "" }, { "docid": "e398d04037cebaf442b36c9077caacf8", "score": "0.5297543", "text": "function cart_remove($id)\n{\n $found = false;\n foreach ($_SESSION['cart'] as $key => $val) {\n if ($val['id'] == $id) {\n $found = $key;\n break;\n }\n }\n if ($found !== false) {\n /* found, remove */\n array_splice($_SESSION['cart'], $found, 1);\n }\n}", "title": "" }, { "docid": "58ffeeb36312d7341f4911234aa8cfe2", "score": "0.5295994", "text": "public function add(){\n\t\t// disable layout and view\n\t\t$this->autoRender = false;\n\n\t\t// gather submitted cart data\n\t\t$userCart = $this->request->data('cart');\n\n\t\t// load existing cart to add/edit products\n\t\t$curCart = $this->Session->read('User.Cart');\n\n\t\t// initialize cart if empty\n\t\tif($curCart == NULL){\n\t\t\t$curCart = array();\n\t\t}\n\n\t\t// walk through cart objects and update cart as needed\n\t\tforeach($userCart as $idx => $item){\n\t\t\t// remove from cart when quantity is zero\n\t\t\tif($item['qty'] <= 0){\n\t\t\t\tif(isset($curCart[$idx])){\n\t\t\t\t\tunset($curCart[$idx]);\n\t\t\t\t}\n\t\t\t// remove item from cart if minimum purchase price is set and not yet met\n\t\t\t} else if($item['minPurchasePrice'] > 0 && $item['total'] < $item['minPurchasePrice']){\n\t\t\t\tif(isset($curCart[$idx])){\n\t\t\t\t\tunset($curCart[$idx]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$curCart[$idx] = $item;\n\t\t\t}\n\t\t}\n\n\t\t// store updated cart values\n\t\t$this->Session->write('User.Cart', $curCart);\n\t}", "title": "" }, { "docid": "61e2ae95a1a4fd5b143f674e14c9e52b", "score": "0.52922624", "text": "function delete_playlist_item($id)\n {\n global $db;\n $item = $this->playlist_item($id);\n if (!$item)\n e(lang(\"playlist_item_not_exist\"));\n elseif ($item['userid'] != userid() && !has_access('admin_access'))\n e(lang(\"you_dont_hv_permission_del_playlist\"));\n else\n {\n $db->delete(tbl($this->playlist_items_tbl), array(\"playlist_item_id\"), array($id));\n //Update total items in the playlist\n $db->update(tbl('playlists'), array('total_items', 'last_update'), array('|f|total_items-1', now()), \" playlist_id='\" . $item['playlist_id'] . \"' \");\n\n e(lang(\"playlist_item_delete\"), \"m\");\n }\n }", "title": "" }, { "docid": "5603b5b7c9801f4711c2932693a671eb", "score": "0.5288115", "text": "public function add($id) {\n $user_id = auth()->user('id');\n $user = User::find($user_id->id);\n $cart = $user->cart;\n\n if ($cart == null) {\n $cart = new Cart;\n $cart->user_id = $user_id->id;\n $cart->save();\n }\n\n $cart_items = $cart->cart_item;\n $cart_item_modify = $this->cart_array_contains_product($cart_items, $id);\n\n if ($cart_item_modify == null) {\n $cart_item_modify = new CartItem;\n $cart_item_modify->cart_id = $user_id->cart->id;\n $cart_item_modify->product_id = $id;\n $cart_item_modify->quantity = 1;\n } else {\n $cart_item_modify->quantity++;\n }\n\n $cart_item_modify->save();\n \n return redirect('/products')->with('success', 'Product added to cart!');\n }", "title": "" }, { "docid": "e7089d5e4074c85c15f172fa6a935860", "score": "0.52847224", "text": "public function removeItem($id)\r\n {\r\n\r\n if ($_SESSION['products'][$id] != null) {\r\n unset($_SESSION['products'][$id]);\r\n $this->addSuccess(\"Varukorgen har uppdaterats. Produkten har tagits bort.\");\r\n } else {\r\n\r\n // If invalid product id, print error msg.\r\n $this->addError(\"Produkten existerar inte. Ogiltigt produkt-ID.\");\r\n }\r\n }", "title": "" }, { "docid": "0cbe3291d70895fcdc6864dec2b9218f", "score": "0.52820414", "text": "public function removeItem(Request $request)\n {\n $user_id = $request->input('user_id');\n $item_id = $request->input('item_id');\n\n return CartItem::where('user_id', $user_id)\n ->where('item_id', $item_id)\n ->firstOrFail()\n ->delete();\n }", "title": "" }, { "docid": "68c25c3e5c871812caf2068ee1738e2b", "score": "0.5281196", "text": "protected function _updateQuoteCart()\n {\n foreach ((array)$this->_getResponseParamData() as $itemId => $data) {\n foreach ($this->_getQuote()->getAllItems() as $item) {\n if ($item->getItemId() == $itemId) {\n if (isset($data['qty'])) {\n $item->clearMessage();\n $response = $item->setQty($data['qty']);\n }\n unset($data[$itemId]);\n }\n }\n }\n\n $result = $this->_saveQuoteUpdates();\n\n $this->_addShippingBlockToResponse();\n $this->_addCartBlockToResponse();\n $this->_addTotalsBlockToResponse();\n $this->_addSveaBlockToResponse();\n\n if (!$this->_getQuote()->validateMinimumAmount()) {\n $this->_addResponseMessage(\n self::SVEA_CHECKOUT_RESPONSE_REDIRECT,\n 'Minimum amount',\n Mage::getUrl('checkout/cart')\n );\n $code = 303;\n } elseif ($result) {\n $this->_addResponseMessage(\n self::SVEA_CHECKOUT_RESPONSE_SUCCESS,\n \"Cart updated\",\n __(\"Successful cart update\")\n );\n $code = 200;\n } else {\n $this->_addResponseMessage(\n self::SVEA_CHECKOUT_RESPONSE_ERROR,\n __(\"Cart updated unsuccessful\"),\n $this->_getQuoteErrors()\n );\n $this->_addAlertBlockToResponse();\n $code = 422;\n }\n\n $this->_sendResponse($code);\n }", "title": "" }, { "docid": "e0936f218dd5417147caf32e235742fb", "score": "0.5274097", "text": "function shopping_cart_add($params)\n{\n global $_SESSION;\n global $global_settings;\n global $db;\n global $rs;\n global $ds;\n\n $cart_id = shopping_cart_id();\n\n //Remove old carts\n $sql = \"select id from carts where id<>\" . $cart_id . \" and data<\" . (mktime(date(\"H\"), date(\"i\"), date(\"s\"), date(\"m\"), date(\"d\"), date(\"Y\")) - 2 * 3600) . \" and checked<>1\";\n $rs->open($sql);\n while (!$rs->eof) {\n $sql = \"select id_parent from carts_content where id_parent=\" . $rs->row[\"id\"];\n $ds->open($sql);\n if ($ds->eof) {\n $sql = \"delete from carts where id=\" . $rs->row[\"id\"];\n $db->execute($sql);\n } else {\n $sql = \"update carts set checked=1 where id=\" . $rs->row[\"id\"];\n $db->execute($sql);\n }\n\n $rs->movenext();\n }\n\n if ($cart_id != 0) {\n //Files\n if ($params[\"item_id\"] != 0) {\n $sql = \"select id_parent from carts_content where id_parent=\" . $cart_id . \" and item_id=\" . $params[\"item_id\"];\n $rs->open($sql);\n if ($rs->eof) {\n $sql = \"insert into carts_content (id_parent,item_id,prints_id,publication_id,quantity,option1_id,option1_value,option2_id,option2_value,option3_id,option3_value) values (\" . $cart_id . \",\" . $params[\"item_id\"] . \",\" . $params[\"prints_id\"] . \",\" . $params[\"publication_id\"] . \",\" . $params[\"quantity\"] . \",\" . $params[\"option1_id\"] . \",'\" . $params[\"option1_value\"] . \"',\" . $params[\"option2_id\"] . \",'\" . $params[\"option2_value\"] . \"',\" . $params[\"option3_id\"] . \",'\" . $params[\"option3_value\"] . \"')\";\n $db->execute($sql);\n }\n }\n\n //Prints\n if ($params[\"prints_id\"] != 0) {\n $sql = \"insert into carts_content (id_parent,item_id,prints_id,publication_id,quantity,option1_id,option1_value,option2_id,option2_value,option3_id,option3_value) values (\" . $cart_id . \",\" . $params[\"item_id\"] . \",\" . $params[\"prints_id\"] . \",\" . $params[\"publication_id\"] . \",\" . $params[\"quantity\"] . \",\" . $params[\"option1_id\"] . \",'\" . $params[\"option1_value\"] . \"',\" . $params[\"option2_id\"] . \",'\" . $params[\"option2_value\"] . \"',\" . $params[\"option3_id\"] . \",'\" . $params[\"option3_value\"] . \"')\";\n//\t\t\t$db->execute($sql);\n }\n }\n\n return $cart_id;\n}", "title": "" }, { "docid": "962691585b9019ad14862319b6d9d0d4", "score": "0.52739906", "text": "public function removeProduct($request, $response, $args) {\n if (!isset($_SESSION['cart'])) {\n return;\n }\n \n $articleToRemove = (int)$args[\"article_id\"];\n \n if(!array_key_exists($articleToRemove, $_SESSION['cart'])) {\n return;\n }\n \n // if there is more than one article, we only decrement quantity\n if($_SESSION[\"cart\"][$articleToRemove] > 1) {\n $_SESSION[\"cart\"][$articleToRemove]--;\n \n } else {\n unset($_SESSION[\"cart\"][$articleToRemove]);\n }\n }", "title": "" }, { "docid": "254f5019380bcf51c158b883ff70c5a2", "score": "0.527178", "text": "abstract public function removeItem($id);", "title": "" }, { "docid": "dc950df4b1f8e9611b54a5dbf080574b", "score": "0.52676725", "text": "public function store(Request $request){\n $duplicates = Cart::search(function ($cartItem, $rowId) use ($request){\n return $cartItem->id===$request->id;\n });\n if($duplicates->isNotEmpty()){\n return redirect ()->route ( 'reservation')->with ( 'flash_message_success','Vehicle already exist in cart');\n }\n //end function to check if item already exist in cart\n\n Cart::add($request->id,$request->vehicle_name,1,$request->price_per_day)->associate('App\\Vehicle');\n return redirect ()->route('reservation')->with('flash_message_success','Vehicle added successfully');\n }", "title": "" }, { "docid": "0214999bb8cd084f931175724e175db8", "score": "0.5267114", "text": "public function cart_add_item($r) {\n $items = Base_EpesiStoreCommon::get_cart();\n // user module id to compare orders in cart\n if (!isset($r['id']))\n return;\n foreach ($items as $it) {\n if (isset($it['id']) && $it['id'] == $r['id'])\n return;\n }\n $items[$r['id']] = $r;\n Base_EpesiStoreCommon::set_cart($items);\n }", "title": "" }, { "docid": "8e82a99b9dfe3fa3b1c9b3fa7a990875", "score": "0.5265359", "text": "public function testAddAndRremoveProduct()\n {\n $product=Product::first();\n $number='129';\n $this->visit(\"/cart/add/$product->id/$number\" )->seeStatusCode(200); //ajax api adding product to cart\n $this->visit('/cart')->see('Added to cart!')->see($product->name)->see($number); //in cart we should see the product now\n $this->visit(\"/cart/remove/$product->id\" )->seeStatusCode(200); //ajax api removing product from cart\n $this->visit('/cart')->dontSee($product->name); //in cart we shouldn't see the product now\n }", "title": "" }, { "docid": "be58387c51f0604a503097eb167b6fb4", "score": "0.5260816", "text": "function addCart()\n\t{\n\n\t\tif(isset($_POST['addtocart']))\n\t\t{\n\t\t\tif($_GET['prodid']!='')\n\t\t\t{\n\t\t\t\tif($_SESSION['user_id']!='')\n\t\t\t\t{\n\t\t\t\t\t// check wheter cart is exists for the user\n\t\t\t\t\t$cartid=$this->getCartIdOfUser();\n\t\t\t\t\t\n\t\t\t\n\t\t\t\t\tif($cartid!=0) // if cart available for the user\n\t\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t\t$sql=\"UPDATE shopping_cart_table SET cart_date='\".date('Y-m-d').\"' WHERE cart_id='\".$cartid.\"'\";\n\t\t\t\t\t\t$query = new Bin_Query();\n\t\t\t\t\t\t$query->updateQuery($sql);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//check the product id and cart id available in the scpt \n\t\t\t\t\t\t$sql=\"SELECT product_id,cart_id,product_qty FROM shopping_cart_products_table WHERE product_id='\".(int)$_GET['prodid'].\"' AND cart_id='\".$cartid.\"' \";\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t//if(yes)\n\t\t\t\t\t\tif($query->executeQuery($sql))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$req_qty=$query->records[0]['product_qty']+1; \n\t\n\t\t\t\t\t\t\t$sql_soh='select soh from product_inventory_table where product_id='.(int)$_GET['prodid'];\n\t\t\t\t\t\t\t$query_soh = new Bin_Query();\n\t\t\t\t\t\t\t$query_soh->executeQuery($sql_soh);\t\t\n\t\t\t\t\t\t\t$soh_product=$query_soh->records[0]['soh'];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$sql_originalprice='SELECT msrp from products_table where product_id='.$_GET['prodid'];\n\t\t\t\t\t\t\t$query_originalprice = new Bin_Query();\n\t\t\t\t\t\t\t$query_originalprice->executeQuery($sql_originalprice);\t\t\n\t\t\t\t\t\t\t$originalprice=$query_originalprice->records[0]['msrp']; \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//insert the cart id , product id , product qty(1) \n\t\t\t\t\t\t\tif($soh_product > $req_qty)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//update the scpt with qty and date added fields\n\t\t\t\t\t\t\t\t$sql=\"UPDATE shopping_cart_products_table SET date_added='\".date('Y-m-d').\"',product_qty='\".$req_qty.\"' ,product_unit_price=\".$originalprice.\" WHERE product_id='\".(int)$_GET['prodid'].\"' AND cart_id='\".$cartid.\"'\"; \n\t\t\t\t\t\t\t\t$query->updateQuery($sql);\n\t\t\t\t\t\t\t\t//update scpt set product_qty = product_qty+ 1 where cart_id = $cartid\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//check Soh for product\n\t\t\t\t\t\t\t$sql='select soh from product_inventory_table where product_id='.(int)$_GET['prodid'];\n\t\t\t\t\t\t\t$query = new Bin_Query();\n\t\t\t\t\t\t\t$query->executeQuery($sql);\t\t\n\t\t\t\t\t\t\t$soh=$query->records[0]['soh'];\n\t\t\t\t\t\t\t//insert the cart id , product id , product qty(1) \n\t\t\t\t\t\t\tif($soh!=0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$sql_originalprice='SELECT msrp from products_table where product_id='.$_GET['prodid'];\n\t\t\t\t\t\t\t\t$query_originalprice = new Bin_Query();\n\t\t\t\n\t\t\t\t\t\t\t\t$query_originalprice->executeQuery($sql_originalprice);\t\t\n\t\t\t\t\t\t\t\t$originalprice=$query_originalprice->records[0]['msrp']; \n\t\n\t\t\t\t\t\t\t\t$sql =\"insert into shopping_cart_products_table (cart_id,product_id , product_qty , date_added ,product_unit_price) values (\".$cartid.','. $_GET['prodid'].\",1,'\".date('Y-m-d').\"',\".$originalprice.\")\";\n\t\t\t\t\t\t\t\t$query->updateQuery($sql);\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\telse // if cart is not available for the user cnt ==0\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql_originalprice='SELECT msrp from products_table where product_id='.$_GET['prodid'];\n\t\t\t\t\t\t$query_originalprice = new Bin_Query();\n\t\t\t\t\t\t$query_originalprice->executeQuery($sql_originalprice);\t\t\n\t\t\t\t\t\t$originalprice=$query_originalprice->records[0]['msrp']; \n\t\n\t\t\t\t\t\t$sql =\"insert into shopping_cart_table (user_id , cart_date) values ('\". $_SESSION['user_id'].\"','\".date('Y-m-d').\"')\";\n\t\t\t\t\t\t$query = new Bin_Query();\n\t\t\t\t\t\t$query->updateQuery($sql);\n\n\t\t\t\t\t\t$cartid=$this->getCartIdOfUser();\n\t\t\t\t\t\t$sql1 =\"insert into shopping_cart_products_table (cart_id,product_id , product_qty , date_added,product_unit_price ) values (\".$cartid.','.$_GET['prodid'].\",1,'\".date('Y-m-d').\"',\".$originalprice.\")\"; \n\t\t\t\t\t\t$query1 = new Bin_Query();\n\t\t\t\t\t\t$query1->updateQuery($sql1);\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\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\n\t\t\t\t\t$mycart=array();\n\t\t\t\t\t$product_id=$_GET['prodid'];\n\t\t\t\t\t\n\t\t\t\t\t\tif (!(empty($_SESSION['mycart'])))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$flg=0;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tforeach ($_SESSION['mycart'] as $key=>$val)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\tif ($_SESSION['mycart'][$key]['product_id']==$product_id)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$_SESSION['mycart'][$key]['qty']=$val['qty']+1;\n\t\t\t\t\t\t\t\t\t$flg=1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($flg==0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$mycart['product_id']=$product_id;\n\t\t\t\t\t\t\t\t$mycart['qty']= 1;\n\t\t\t\t\t\t\t\t$_SESSION['mycart'][]=$mycart;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\n\t\t\t\t\t\t\t$mycart['product_id']=$product_id;\n\t\t\t\t\t\t\t$mycart['qty']= 1;\n\t\t\t\t\t\t\t$_SESSION['mycart'][]=$mycart;\n\t\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\t\n\t\t\t}\n\n\t\n\t\t}\n\t}", "title": "" }, { "docid": "16cc8867633e9421bf25fef12222e124", "score": "0.52492905", "text": "public function add_item_to_basket($id){\n $current_basket_items = [];\n if(Cookie::get('basket_items') && !empty(Cookie::get('basket_items'))){\n $current_basket_items = json_decode(Cookie::get('basket_items'),true);\n }\n if(!in_array($id,$current_basket_items)){\n array_push($current_basket_items,$id);\n }\n Cookie::queue('basket_items',json_encode($current_basket_items));\n return redirect()->route('home');\n }", "title": "" }, { "docid": "18389e2d98163934462c54e84a91d798", "score": "0.5234927", "text": "protected function decreaseQuantites(){\n // loop through the contents of the cart\n foreach (Cart::content() as $item){\n // find the item id that is in the cart\n $product = Product::find($item->model->id);\n // remove the cart quantity from the actual quantity\n $product->update(['quantity' => $product->quantity - $item->qty]);\n\n }\n\n }", "title": "" }, { "docid": "b9052ae65c2410e30d096b78d7e93f26", "score": "0.5233716", "text": "function addToCart() {\n if ($_SERVER[\"REQUEST_METHOD\"] == \"GET\" && isset($_GET[\"addToCartId\"])) {\n if (isset($_COOKIE[\"cart-artworks\"])) {\n $ids = explode(\"-\", $_COOKIE[\"cart-artworks\"]);\n if (in_array((string) $_GET[\"addToCartId\"], $ids)) {\n if (isset($_COOKIE[\"qty-\".$_GET[\"addToCartId\"]])) {\n setcookie(\"qty-\".$_GET[\"addToCartId\"], $_COOKIE[\"qty-\".$_GET[\"addToCartId\"]]+1, $expiryTime);\n } else {\n setcookie(\"qty-\".$_GET[\"addToCartId\"], 1, $expiryTime);\n }\n } else {\n array_push($ids, $_GET[\"addToCartId\"]);\n setcookie(\"cart-artworks\", join(\"-\", $ids), $expiryTime);\n setcookie(\"qty-\".$_GET[\"addToCartId\"], 1, $expiryTime);\n }\n } else {\n setcookie(\"cart-artworks\", $_GET[\"addToCartId\"], $expiryTime);\n setcookie(\"qty-\".$_GET[\"addToCartId\"], 1, $expiryTime);\n }\n }\n}", "title": "" }, { "docid": "096e42eb5b8cb97522a203e9efebddf4", "score": "0.5233553", "text": "public function addCartItemAction()\n {\n if (($data = \\System\\Helper::getJSONParameters()) !== false) {\n $product = new \\Models\\Product();\n\n if (!empty($data['order_data']) && !empty($data['server_url']) && !empty($data['quantity'])) {\n $default_products = $product->getServerDefaultProducts($data['server_url']);\n $min_period = 1;\n\n if (!empty($default_products)) {\n $item = ['products' => []];\n $selected_products = [];\n\n foreach ($default_products as $default_product) {\n foreach ($data['order_data'] as $ordered_product) {\n if ($default_product['id'] == $ordered_product['id']) { // Default product ordered\n $item['products'][] = [\n 'sub_cat_id' => $default_product['sub_category_id'],\n 'id' => $default_product['id']\n ];\n $selected_products[] = $default_product;\n } else {\n if (!empty($default_product['upgrade_products'])) {\n foreach ($default_product['upgrade_products'] as $upgrade_product) {\n if ($upgrade_product['id'] == $ordered_product['id']) { // Upgraded product ordered\n $item['products'][] = [\n 'sub_cat_id' => $upgrade_product['sub_category_id'],\n 'id' => $upgrade_product['id']\n ];\n $selected_products[] = $upgrade_product;\n if ($upgrade_product['minimal_period'] > $min_period) {\n $min_period = (int)$upgrade_product['minimal_period'];\n }\n }\n }\n }\n }\n }\n }\n\n if (!empty($item['products'])) {\n if ($min_period > $_SESSION['min_period']) {\n $_SESSION['min_period'] = $min_period;\n }\n\n if ($data['quantity'] > 0 && $data['quantity'] < 11) {\n $item['quantity'] = $data['quantity'];\n } else {\n $item['quantity'] = 1;\n }\n\n $item['server_url'] = $data['server_url'];\n $item['server_location'] = $data['location'];\n $item['comment'] = isset($data['comment']) ? $data['comment'] : '';\n\n if (!empty($data['edit']) && isset($data['cart_item_id'])) {\n $_SESSION['cart'][$data['cart_item_id']] = $item;\n echo 1;\n\n return;\n } else {\n echo (int)$product->addItemToCart($item);\n\n return;\n }\n\n\n }\n }\n }\n }\n echo 0;\n }", "title": "" } ]
20944500b3af2d41e9edc60da899d2c3
order cash on delivery
[ { "docid": "795ec7d0e45e5dac23d6b93015c79b6b", "score": "0.6221996", "text": "public function ordercash(Request $request){\n $session_id = session()->getId();\n $shipments = Shipment::create([\n 'name' => $request->input('name'),\n 'phone' => $request->input('phone'),\n 'email' => $request->input('email'),\n 'address' => $request->input('address'),\n 'city' => $request->input('city'),\n 'country' => $request->input('country'),\n 'total' => $request->input('total'),\n 'user_id' => Auth::user()->id,\n 'sid' => $session_id\n ]);\n if($shipments){\n $payments = Payment::create([\n 'payment_method' => $request->input('payment_method'),\n 'payment_status' => 0,\n 'payment_total' => $request->input('total'),\n 'user_id' => Auth::user()->id,\n 'sid' => $session_id\n ]);\n if ($payments) {\n // $shipment = Shipment::find('id')->where('sid',$session_id)->first();\n // $payment = Payment::where('sid',$session_id)->get();\n\n $shipmentid = $shipments->id;\n $paymentid = $payments->id;\n //dd($shipmentid);\n\n $orders = Order::create([\n 'user_id' => Auth::user()->id,\n 'payment_id' => $paymentid,\n 'shipping_id' => $shipmentid,\n 'order_status' => 0,\n 'order_total' => $request->input('total')\n ]);\n if ($orders) {\n\n $orderid = $orders->id;\n $carts = Cart::where('sid',$session_id)->get();\n foreach($carts as $cart){\n $orderdetails = Orderdetail::create([\n 'order_id' => $orderid,\n 'item_id' => $cart->item_id,\n 'item_name' => $cart->item_name,\n 'item_image' => $cart->image,\n 'unit_price' => $cart->price,\n 'item_qty' => $cart->quantity,\n 'subtotal' => $cart->price*$cart->quantity,\n 'ordertotal' => $request->input('total')\n ]);\n }\n if($orderdetails){\n foreach($carts as $cart){\n $cart = Cart::find($cart->id);\n $cart->delete();\n }\n \n return view('cashconfirmation');\n }\n \n }\n }\n }else{\n return back()->withInput()->with('error','Error Creating Order! Please try again..');\n }\n }", "title": "" } ]
[ { "docid": "c892bb23773ebbeb06d5324e38e3841c", "score": "0.643248", "text": "public function actiongettheapplicabledeliveryamount(){\n \n $model = new PlatformSettings;\n \n $member_id = Yii::app()->user->id;\n \n \n //get the open order of this member\n \n $order_id = $this->getTheOpenOrderInitiatedByMember($member_id);\n \n //confirm if the order contains only exclusive transactions like hampers and quoted transactions\n \n $is_exclusive = $this->isOrderWithOnlyExclusiveProducts($order_id);\n //get the city of delivery of this order\n //$city_of_delivery = $this->getThisOrderCityOfDelivery($order_id);\n $city_of_delivery = $_REQUEST['city_id'];\n \n $payment_method = $_REQUEST['payment_method'];\n \n $delivery_type = $_REQUEST['delivery_type'];\n if($city_of_delivery != 0){\n //get the top priority delivery charges for this order\n $top_priority_delivery_charge = $this->getTheCostOfOrderDeliveryToThisCityForTopPriority($order_id,$city_of_delivery);\n \n //get the priority delivery charges for this order\n $priority_delivery_charge = $this->getTheCostOfOrderDeliveryToThisCityForPriority($order_id,$city_of_delivery);\n \n //get the standard delivery charges for this order\n $standard_delivery_charge = $this->getTheCostOfOrderDeliveryToThisCityForStandard($order_id,$city_of_delivery);\n \n \n //get the delivery cost of products in the exclusive delivery cost list\n $delivery_cost_for_exclusive_products = $this->getTheCostOfDeliveryForExclusiveProductsInAnOrder($order_id);\n \n //get the escrow charges of an order\n $escrow_charges = $this->getTheEscrowChargesOfThisOrder($order_id);\n \n //get the cost of delivery to this city on payment on delivery service\n $payable_on_delivery_cost_of_service = $this->getTheOrderDeliveryCostToThisCityOnPaymentOnDeliveryService($order_id,$city_of_delivery,$payment_method,$delivery_type);\n \n //get the cost of delivery to this city on payment from wallet or online payment service\n $delivery_cost_on_wallet_or_online_payment = $this->getTheOrderDeliveryCostToThisCityOnPaymentByWalletOrOnlineService($order_id,$city_of_delivery,$payment_method,$delivery_type);\n \n \n \n header('Content-Type: application/json');\n echo CJSON::encode(array(\n \"success\" => mysql_errno() == 0,\n \"top_priority\" =>$top_priority_delivery_charge,\n \"priority\"=>$priority_delivery_charge,\n \"standard\"=>$standard_delivery_charge,\n \"exclusives\"=>$delivery_cost_for_exclusive_products,\n \"escrow\"=>$escrow_charges,\n \"is_exclusive_only\"=>$is_exclusive,\n \"payable_on_delivery_cost_of_service\"=>$payable_on_delivery_cost_of_service,\n \"delivery_cost_on_wallet_or_online_payment\"=>$delivery_cost_on_wallet_or_online_payment,\n \n ));\n \n \n }\n \n }", "title": "" }, { "docid": "bd9aaeea97f44f9629f927d39ea8360c", "score": "0.6365386", "text": "function distributeMoneyAccount($order_id){\n\t\t\t //getting purchase info from dtabase\n\t\t\t $purchase_details = $this->manage_data->getValue_where(\"purchase_info\",\"*\",\"order_id\",$order_id);\n\t\t\t //getting date of insertion\n\t\t\t $date = $this->getDate();\n\t\t\t //executing every value in order\n\t\t\t foreach($purchase_details as $purchase){\n\t\t\t\t //getting membership id\n\t\t\t\t $member = $this->manage_data->getValue_where(\"purchase_log\",\"membership_id\",\"order_id\",$order_id);\n\t\t\t\t //getting last system balence\n\t\t\t\t $system_balence = $this->manage_data->getLastValue(\"money_transfer_log\",\"system_balence\",\"id\");\n\t\t\t\t //checking for guest or member\n\t\t\t\t if($member[0]['membership_id'] == 'guest')\n\t\t\t\t {\n\t\t\t\t\t $price = 'price_guest';\n\t\t\t\t }\n\t\t\t\t else\n\t\t\t\t {\n\t\t\t\t\t $price = 'price_members';\n\t\t\t\t }\n\t\t\t\t//checking for membership product\n\t\t\t\tif(substr($purchase['product_id'],0,1) == 'M')\n\t\t\t\t{\n\t\t\t\t\t//getting product price\n\t\t\t\t\t$product_price = $this->manage_data->getValue_where(\"membership_product\",\"*\",\"product_id\",$purchase['product_id']);\n\t\t\t\t\t//amount credited\n\t\t\t\t\t$amount = $purchase['quantity']*$product_price[0]['price'];\n\t\t\t\t\t//new system balence\n\t\t\t\t\t$new_balance = $system_balence[0]['system_balence'] + $amount;\n\t\t\t\t\t//inserted credit amount\n\t\t\t\t\t$result = $this->manage_data->insertCreditAmount($member[0]['membership_id'],\n\t\t\t\t\t$purchase['product_id'],$purchase['quantity'],$date,$amount,$new_balance,0,\"\");\n\t\t\t\t\t//getting member details from member table\n\t\t\t\t\t$member_details = $this->manage_data->getValue_where(\"member_table\",\"*\",\"membership_id\",$member[0]['membership_id']);\n\t\t\t\t\t$previous_member_active = $member_details[0]['membership_activation'];\n\t\t\t\t\t//setting expiration date after 1 year\n\t\t\t\t\t$expiration_date = date('Y-m-d', strtotime('+1 years'));\n\t\t\t\t\t//updating the membership_activation column of member table\n\t\t\t\t\t$membership_activation = $this->manage_data->updateValueWhere(\"member_table\",\"membership_activation\",1,\"membership_id\",$member[0]['membership_id']);\n\t\t\t\t\t//update expiration date\n\t\t\t\t\t$update_expiry = $this->manage_data->updateValueWhere(\"member_table\",\"expiration_date\",$expiration_date,\"membership_id\",$member[0]['membership_id']);\n\t\t\t\t\tif($result == 1 && $member[0]['membership_id'] != 'guest')\n\t\t\t\t\t{\n\t\t\t\t\t\t//calling function for distribute money\n\t\t\t\t\t\t$result = $this->moneyCalculationForMembershipProduct($member[0]['membership_id'],$purchase['product_id']);\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t//checking for member product\n\t\t\t\telse if(substr($purchase['product_id'],0,1) == 'P')\n\t\t\t\t{\n\t\t\t\t\t//getting product price\n\t\t\t\t\t$product_price = $this->manage_data->getValue_where(\"product_table\",\"*\",\"product_id\",$purchase['product_id']);\n\t\t\t\t\t//amount credited\n\t\t\t\t\t$amount = $purchase['quantity']*$product_price[0][$price];\n\t\t\t\t\t//new system balence\n\t\t\t\t\t$new_balance = $system_balence[0]['system_balence'] + $amount;\n\t\t\t\t\t//inserted credit amount\n\t\t\t\t\t$result = $this->manage_data->insertCreditAmount($member[0]['membership_id'],\n\t\t\t\t\t$purchase['product_id'],$purchase['quantity'],$date,$amount,$new_balance,0,\"\");\n\t\t\t\t\tif($result == 1 && $member[0]['membership_id'] != 'guest')\n\t\t\t\t\t{\n\t\t\t\t\t\t//calling function for distribute money\n\t\t\t\t\t\t$result = $this->moneyCalculationForMemberProduct($member[0]['membership_id'],$purchase['product_id'],$purchase['quantity']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//checking for coupon in table\n\t\t\t\telse if(substr($purchase['product_id'],0,1) == 'C')\n\t\t\t\t{\n\t\t\t\t\t//getting coupon price\n\t\t\t\t\t$coupon = $this->manage_data->getValue_where(\"coupon_table\",\"*\",\"coupon_id\",$purchase['product_id']);\n\t\t\t\t\t//amount credited\n\t\t\t\t\t$amount = $purchase['quantity']*$coupon[0][$price];\n\t\t\t\t\t//new system balence\n\t\t\t\t\t$new_balance = $system_balence[0]['system_balence'] + $amount;\n\t\t\t\t\t//inserted credit amount\n\t\t\t\t\t$result = $this->manage_data->insertCreditAmount($member[0]['membership_id'],\n\t\t\t\t\t$purchase['product_id'],$purchase['quantity'],$date,$amount,$new_balance,0,\"\");\n\t\t\t\t\tif($result == 1 && $member[0]['membership_id'] != 'guest')\n\t\t\t\t\t{\n\t\t\t\t\t\t//calling function for distribute money\n\t\t\t\t\t\t$result = $this->moneyCalculationForCoupon($member[0]['membership_id'],$purchase['product_id']);\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t }\n\t\t\t //approve the payment confirmation\n\t\t\t $update = $this->manage_data->updateValueWhere(\"purchase_info\",\"payment_status\",1,\"order_id\",$order_id);\n\t\t\t $payment_status = $this->manage_data->updateValueWhere(\"purchase_info\",\"payment_request\",\"Confirm\",\"order_id\",$order_id);\n\t\t }", "title": "" }, { "docid": "6c02838ac8815a406f51311a07afe427", "score": "0.6354993", "text": "function distributeMoneyByMyAccount($order_id){\n\t\t\t //getting purchase info from dtabase\n\t\t\t $purchase_details = $this->manage_data->getValue_where(\"purchase_info\",\"*\",\"order_id\",$order_id);\n\t\t\t //getting date of insertion\n\t\t\t $date = $this->getDate();\n\t\t\t //executing every value in order\n\t\t\t foreach($purchase_details as $purchase){\n\t\t\t\t //getting membership id\n\t\t\t\t $member = $this->manage_data->getValue_where(\"purchase_log\",\"membership_id\",\"order_id\",$order_id);\n\t\t\t\t //getting last system balence\n\t\t\t\t $system_balence = $this->manage_data->getLastValue(\"money_transfer_log\",\"system_balence\",\"id\");\n\t\t\t\t //checking for guest or member\n\t\t\t\t if($member[0]['membership_id'] == 'guest')\n\t\t\t\t {\n\t\t\t\t\t $price = 'price_guest';\n\t\t\t\t }\n\t\t\t\t else\n\t\t\t\t {\n\t\t\t\t\t $price = 'price_members';\n\t\t\t\t }\n\t\t\t\t//checking for membership product\n\t\t\t\tif(substr($purchase['product_id'],0,1) == 'M')\n\t\t\t\t{\n\t\t\t\t\t//getting product price\n\t\t\t\t\t$product_price = $this->manage_data->getValue_where(\"membership_product\",\"*\",\"product_id\",$purchase['product_id']);\n\t\t\t\t\t//amount credited\n\t\t\t\t\t$amount = $purchase['quantity']*$product_price[0]['price'];\n\t\t\t\t\t//new system balence\n\t\t\t\t\t$new_balance = $system_balence[0]['system_balence'] + $amount;\n\t\t\t\t\t//inserted credit amount\n\t\t\t\t\t$result = $this->manage_data->insertCreditAmount($member[0]['membership_id'],\n\t\t\t\t\t$purchase['product_id'],$purchase['quantity'],$date,$amount,$new_balance,0,\"\");\n\t\t\t\t\t//setting expiration date after 1 year\n\t\t\t\t\t$expiration_date = date('Y-m-d', strtotime('+1 years'));\n\t\t\t\t\t//updating the membership_activation column of member table\n\t\t\t\t\t$membership_activation = $this->manage_data->updateValueWhere(\"member_table\",\"membership_activation\",1,\"membership_id\",$member[0]['membership_id']);\n\t\t\t\t\t//update expiration date\n\t\t\t\t\t$update_expiry = $this->manage_data->updateValueWhere(\"member_table\",\"expiration_date\",$expiration_date,\"membership_id\",$member[0]['membership_id']);\n\t\t\t\t\tif($result == 1 && $member[0]['membership_id'] != 'guest')\n\t\t\t\t\t{\n\t\t\t\t\t\t//calling function for distribute money\n\t\t\t\t\t\t$result = $this->moneyCalculationForMembershipProduct($member[0]['membership_id'],$purchase['product_id']);\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t//checking for member product\n\t\t\t\telse if(substr($purchase['product_id'],0,1) == 'P')\n\t\t\t\t{\n\t\t\t\t\t//getting product price\n\t\t\t\t\t$product_price = $this->manage_data->getValue_where(\"product_table\",\"*\",\"product_id\",$purchase['product_id']);\n\t\t\t\t\t//amount credited\n\t\t\t\t\t$amount = $purchase['quantity']*$product_price[0][$price];\n\t\t\t\t\t//new system balence\n\t\t\t\t\t$new_balance = $system_balence[0]['system_balence'] + $amount;\n\t\t\t\t\t//inserted credit amount\n\t\t\t\t\t$result = $this->manage_data->insertCreditAmount($member[0]['membership_id'],\n\t\t\t\t\t$purchase['product_id'],$purchase['quantity'],$date,$amount,$new_balance,0,\"\");\n\t\t\t\t\tif($result == 1 && $member[0]['membership_id'] != 'guest')\n\t\t\t\t\t{\n\t\t\t\t\t\t//calling function for distribute money\n\t\t\t\t\t\t$result = $this->moneyCalculationForMemberProduct($member[0]['membership_id'],$purchase['product_id'],$purchase['quantity']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//checking for coupon in table\n\t\t\t\telse if(substr($purchase['product_id'],0,1) == 'C')\n\t\t\t\t{\n\t\t\t\t\t//getting coupon price\n\t\t\t\t\t$coupon = $this->manage_data->getValue_where(\"coupon_table\",\"*\",\"coupon_id\",$purchase['product_id']);\n\t\t\t\t\t//amount credited\n\t\t\t\t\t$amount = $purchase['quantity']*$coupon[0][$price];\n\t\t\t\t\t//new system balence\n\t\t\t\t\t$new_balance = $system_balence[0]['system_balence'] + $amount;\n\t\t\t\t\t//inserted credit amount\n\t\t\t\t\t$result = $this->manage_data->insertCreditAmount($member[0]['membership_id'],\n\t\t\t\t\t$purchase['product_id'],$purchase['quantity'],$date,$amount,$new_balance,0,\"\");\n\t\t\t\t\tif($result == 1 && $member[0]['membership_id'] != 'guest')\n\t\t\t\t\t{\n\t\t\t\t\t\t//calling function for distribute money\n\t\t\t\t\t\t$result = $this->moneyCalculationForCoupon($member[0]['membership_id'],$purchase['product_id']);\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t }\n\t\t\t //approve the payment confirmation\n\t\t\t $update = $this->manage_data->updateValueWhere(\"purchase_info\",\"payment_status\",1,\"order_id\",$order_id);\n\t\t\t $payment_status = $this->manage_data->updateValueWhere(\"purchase_info\",\"payment_request\",\"Confirm\",\"order_id\",$order_id);\n\t\t\t $withdrawal_status = $this->manage_data->updateValueWhere(\"withdraw_log\",\"status\",1,\"withdraw_order_id\",$order_id);\n\t\t }", "title": "" }, { "docid": "a6650a91ff9d90c0697dee1456adec81", "score": "0.62949026", "text": "public function deliveryPrice(): Money\n {\n return $this->rules->deliveryPrice($this);\n }", "title": "" }, { "docid": "54f73935433a170f711b207779670f77", "score": "0.62230825", "text": "function withdrawCash($pid, $date, $amount, $action) {\r\n\t$cid = insertFields(\"pmo_cash\", array(\"pid\" => $pid, \"cash_date\" => $date, \"cash_amount\" => $amount, \"cash_action\" => $action));\r\n\t$balance = getById(\"pmo_portfolio\", \"pid\", $pid)[\"portfolio_cash\"];\r\n\t\r\n\t$balance = (floatval($balance) - floatval($amount));\r\n\t\r\n\tupdateById(\"pmo_portfolio\", \"pid\", $pid, array(\"portfolio_cash\" => $balance));\r\n\treturn $cid;\r\n}", "title": "" }, { "docid": "f2111d59a1de68b900c2275a3581942e", "score": "0.62137485", "text": "public function cash_on_delivery($page = \"\")\n\t{\n\t\t\n\t\t\n\t\t$this->page = $page ==\"\"?1:$page; // for export per page\n\t\t$this->url=\"merchant/cash-delivery.html\";\n\n\t\t$this->cash_delivery=\"1\";\n\t \t$this->mer_products_act=\"1\";\n \t $search=$this->input->get(\"id\"); // Export CSV format\n\t\t$this->count_shipping = $this->merchant->get_shipping_count($this->input->get(\"search\"),\"COD\");\n\n\n\t\t\t\t$this->pagination = new Pagination(array(\n\t\t\t\t'base_url' => 'merchant/cash-delivery.html/page/'.$page.\"/\",\n\t\t\t\t'uri_segment' => 4,\n\t\t\t\t'total_items' => $this->count_shipping,\n\t\t\t\t'items_per_page' => 20,\n\t\t\t\t'style' => 'digg',\n\t\t\t\t'auto_hide' => TRUE\n\t\t\t\t));\n\t\t$this->search = $this->input->get();\n\t\t$this->search_key = arr::to_object($this->search);\n\n\t\t$this->shipping_list = $this->merchant->get_shipping_list($this->pagination->sql_offset, $this->pagination->items_per_page,$this->input->get(\"search\"),\"COD\",0);\n\t\tif($search){ // Export all in CSV format\n\t\t\t$this->shipping_list = $this->merchant->get_shipping_list($this->pagination->sql_offset, $this->pagination->items_per_page,$this->input->get(\"search\"),\"COD\",1);\n\t\t}\n\n\t\t$this->product_size = $this->merchant->get_shipping_product_size();\n\t\t$this->product_color = $this->merchant->get_shipping_product_color();\n\n\t\tif($_POST){\n\t\t\t\n\t\t\tvar_dump(\"H\");\n\t\t\texit;\n\n\t\t\t\t\t$email_id = $this->input->post('email');\n\t\t\t\t\t$this->shipping_id = $this->input->post('id');\n\t\t\t\t\t$message = $this->input->post('message');\n\t\t\t\t\t$message.= new View(\"admin_product/shipping_mail_template\");\n\t\t\t\t\t$fromEmail = NOREPLY_EMAIL;\n\t\t\t\t\tif(EMAIL_TYPE==2){\n\t\t\t\t\temail::smtp($fromEmail,$email_id, SITENAME, $message);\n\t\t\t\t\t}else{\n\t\t\t\t\temail::sendgrid($fromEmail,$email_id, SITENAME, $message);\n\n\t\t\t\t\t}\n\t\t\t\t\tcommon::message(1, $this->Lang[\"MAIL_SENDED\"]);\n\t\t\t\t\t$status = $this->merchant->update_shipping_status($this->input->post('id'));\n\t\t\t\t\t\tif($status){\n\t\t\t\t\t\t $lastsession = $this->session->get(\"lasturl\");\n if($lastsession){\n url::redirect(PATH.$lastsession);\n } else {\n\t\t\t\t\t\t\turl::redirect(PATH.\"merchant/cash-delivery.html\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\n\t\t}\n\n\t\tif($search){ // Export in CSV format\n\t\t\t\t$out = '\"S.No\",\"Product Title\",\"Name\",\"Email\",\"Date & Time\",\"Phone Number\",\"Address\",\"Delivery Status\"'.\"\\r\\n\";\n\t\t\t\t$i=0;\n\t\t\t\t$first_item = $this->pagination->current_first_item;\n\t\t\t\tforeach($this->shipping_list as $d)\n\t\t\t\t{\n\t\t\t\t\tif($d->delivery_status == 0 ){\n\t\t\t\t\t\t$delivery = $this->Lang['PENDING'];\n\t\t\t\t\t}\n\t\t\t\t\telse if($d->delivery_status == 4 ){\n\t\t\t\t\t\t\t$delivery = $this->Lang['COMPLETED'];\n\t\t\t\t\t}\n\t\t\t\t\telse if($d->delivery_status == 5 ){\n\t\t\t\t\t\t\t$delivery = $this->Lang['FAILED'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$out .= $i+$first_item.',\"'.$d->deal_title.'\",\"'.$d->firstname.'\",\"'.$d->email.'\",\"'.date('d-M-Y h:i:s A',$d->shipping_date).'\",\"'.$d->phone.'\",\"'.$d->adderss1.\",\".$d->address2.'\",\"'.$delivery.'\"'.\"\\r\\n\";\n\t\t\t\t\t$i++;\n\n\t\t\t\t}\n\t\t\t\t\theader('Content-Description: File Transfer');\n\t\t\t\t\theader('Content-Type: application/octet-stream');\n\t\t\t\t\theader('Content-Disposition: attachment; filename=Product-COD.xls');\n\t\t\t\t\theader('Content-Transfer-Encoding: binary');\n\t\t\t\t\theader('Expires: 0');\n\t\t\t\t\theader('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n\t\t\t\t\theader('Pragma: public');\n\t\t\t\t\techo \"\\xEF\\xBB\\xBF\"; // UTF-8 BOM\n\t\t\t\t\techo $out;\n\t\t\t\t\texit;\n\t\t\t}\n\t\t$this->template->title = 'Cash On Delivery';\n\t\t$this->template->content = new View(\"merchant/cash_on_delivery\");\n\t}", "title": "" }, { "docid": "d372b22e63a21ac808f53c09d9a0440d", "score": "0.617916", "text": "static function send_delivery_confirmation($order){\n\t\t// order delivered \n\t\tif ($order->status == Bp_Order_Model::DELIVERED) {\n\t\t\tbasket_plus::send_order_update($order,ORDER_DELIVERED_EMAIL_SUBJECT,ORDER_DELIVERED_EMAIL);\n\t\t}\n\t\t//order paid and delivered earlier\n\t\telseif ($order->status == Bp_Order_Model::DELIVERED_NOTPAID) {\n\t\t\tbasket_plus::send_order_update($order,ORDER_DELIVERED_NOTPAID_EMAIL_SUBJECT,ORDER_DELIVERED_NOTPAID_EMAIL);\n\t\t}\n }", "title": "" }, { "docid": "662ddd917326e5a6b3a3be985a939cc9", "score": "0.61643237", "text": "function distributeMoneyByPaypalPayment($order_id){\n\t\t\t //getting purchase info from dtabase\n\t\t\t $purchase_details = $this->manage_data->getValue_where(\"purchase_info\",\"*\",\"order_id\",$order_id);\n\t\t\t //getting date of insertion\n\t\t\t $date = $this->getDate();\n\t\t\t //executing every value in order\n\t\t\t foreach($purchase_details as $purchase){\n\t\t\t\t //getting membership id\n\t\t\t\t $member = $this->manage_data->getValue_where(\"purchase_log\",\"membership_id\",\"order_id\",$order_id);\n\t\t\t\t //getting last system balence\n\t\t\t\t $system_balence = $this->manage_data->getLastValue(\"money_transfer_log\",\"system_balence\",\"id\");\n\t\t\t\t //checking for guest or member\n\t\t\t\t if($member[0]['membership_id'] == 'guest')\n\t\t\t\t {\n\t\t\t\t\t $price = 'price_guest';\n\t\t\t\t }\n\t\t\t\t else\n\t\t\t\t {\n\t\t\t\t\t $price = 'price_members';\n\t\t\t\t }\n\t\t\t\t//checking for membership product\n\t\t\t\tif(substr($purchase['product_id'],0,1) == 'M')\n\t\t\t\t{\n\t\t\t\t\t//getting product price\n\t\t\t\t\t$product_price = $this->manage_data->getValue_where(\"membership_product\",\"*\",\"product_id\",$purchase['product_id']);\n\t\t\t\t\t//amount credited\n\t\t\t\t\t$amount = $purchase['quantity']*$product_price[0]['price'];\n\t\t\t\t\t//new system balence\n\t\t\t\t\t$new_balance = $system_balence[0]['system_balence'] + $amount;\n\t\t\t\t\t//inserted credit amount\n\t\t\t\t\t$result = $this->manage_data->insertCreditAmount($member[0]['membership_id'],\n\t\t\t\t\t$purchase['product_id'],$purchase['quantity'],$date,$amount,$new_balance,0,\"\");\n\t\t\t\t\t//getting member details from member table\n\t\t\t\t\t$member_details = $this->manage_data->getValue_where(\"member_table\",\"*\",\"membership_id\",$member[0]['membership_id']);\n\t\t\t\t\t$previous_member_active = $member_details[0]['membership_activation'];\n\t\t\t\t\t//setting expiration date after 1 year\n\t\t\t\t\t$expiration_date = date('Y-m-d', strtotime('+1 years'));\n\t\t\t\t\t//updating the membership_activation column of member table\n\t\t\t\t\t$membership_activation = $this->manage_data->updateValueWhere(\"member_table\",\"membership_activation\",1,\"membership_id\",$member[0]['membership_id']);\n\t\t\t\t\t//update expiration date\n\t\t\t\t\t$update_expiry = $this->manage_data->updateValueWhere(\"member_table\",\"expiration_date\",$expiration_date,\"membership_id\",$member[0]['membership_id']);\n\t\t\t\t\tif($result == 1 && substr($member[0]['membership_id'],0,6) == 'member')\n\t\t\t\t\t{\n\t\t\t\t\t\t//calling function for distribute money\n\t\t\t\t\t\t$result = $this->moneyCalculationForMembershipProduct($member[0]['membership_id'],$purchase['product_id']);\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t\t//checking for member product\n\t\t\t\telse if(substr($purchase['product_id'],0,1) == 'P')\n\t\t\t\t{\n\t\t\t\t\t//getting product price\n\t\t\t\t\t$product_price = $this->manage_data->getValue_where(\"product_table\",\"*\",\"product_id\",$purchase['product_id']);\n\t\t\t\t\t//amount credited\n\t\t\t\t\t$amount = $purchase['quantity']*$product_price[0][$price];\n\t\t\t\t\t//new system balence\n\t\t\t\t\t$new_balance = $system_balence[0]['system_balence'] + $amount;\n\t\t\t\t\t//inserted credit amount\n\t\t\t\t\t$result = $this->manage_data->insertCreditAmount($member[0]['membership_id'],\n\t\t\t\t\t$purchase['product_id'],$purchase['quantity'],$date,$amount,$new_balance,0,\"\");\n\t\t\t\t\tif($result == 1 && substr($member[0]['membership_id'],0,6) == 'member')\n\t\t\t\t\t{\n\t\t\t\t\t\t//calling function for distribute money\n\t\t\t\t\t\t$result = $this->moneyCalculationForMemberProduct($member[0]['membership_id'],$purchase['product_id'],$purchase['quantity']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//checking for coupon in table\n\t\t\t\telse if(substr($purchase['product_id'],0,1) == 'C')\n\t\t\t\t{\n\t\t\t\t\t//getting coupon price\n\t\t\t\t\t$coupon = $this->manage_data->getValue_where(\"coupon_table\",\"*\",\"coupon_id\",$purchase['product_id']);\n\t\t\t\t\t//amount credited\n\t\t\t\t\t$amount = $purchase['quantity']*$coupon[0][$price];\n\t\t\t\t\t//new system balence\n\t\t\t\t\t$new_balance = $system_balence[0]['system_balence'] + $amount;\n\t\t\t\t\t//inserted credit amount\n\t\t\t\t\t$result = $this->manage_data->insertCreditAmount($member[0]['membership_id'],\n\t\t\t\t\t$purchase['product_id'],$purchase['quantity'],$date,$amount,$new_balance,0,\"\");\n\t\t\t\t\tif($result == 1 && substr($member[0]['membership_id'],0,6) == 'member')\n\t\t\t\t\t{\n\t\t\t\t\t\t//calling function for distribute money\n\t\t\t\t\t\t$result = $this->moneyCalculationForCoupon($member[0]['membership_id'],$purchase['product_id']);\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t }\n\t\t\t //approve the payment confirmation\n\t\t\t $update = $this->manage_data->updateValueWhere(\"purchase_info\",\"payment_status\",1,\"order_id\",$order_id);\n\t\t\t $payment_status = $this->manage_data->updateValueWhere(\"purchase_info\",\"payment_request\",\"Confirm\",\"order_id\",$order_id);\n\t\t }", "title": "" }, { "docid": "3cea2531ce13dbc1285b8807798c154a", "score": "0.6137389", "text": "public function amountPaid();", "title": "" }, { "docid": "333a4906836a6bd20497122c2116012d", "score": "0.6104848", "text": "public function total_receipt_cost(){\n return $this->total_receipt_cost;\n }", "title": "" }, { "docid": "51774d8355e7550dc851f2725871db5a", "score": "0.6076077", "text": "function checkstock($order) {\n\n// The warehouse can check to see whether it has the required \n// number of the items in stock. If yes, it then queries a \n// courier to see if they can deliver.\n\n\t$instock = 1;\n\n\tif ( $instock )\n\t{\n\n // This is location of the remote service\n $app_name = dirname($_SERVER['PHP_SELF']);\n $wsdl_url =\"http://{$_SERVER['HTTP_HOST']}{$app_name}/courier.php\";\n //echo $wsdl_url;\n $client = new nusoap_client($wsdl_url); \n\n\n // Call the SOAP method on the remote service\n\t\t$package = array('item' => $order['item'],\n\t\t 'quantity' => $order['quantity'],\n\t\t\t\t 'to' => $order['to'],\n\t\t\t\t 'from' => $warehouse);\n\t\t$result = $client->call(\n\t\t\t'checkdelivery', // method name\n\t\t\tarray('package' => new soapval('package',\n\t\t\t 'Package',\n\t\t\t\t\t\t $package,\n\t\t\t\t\t\t false,\n\t\t\t\t\t\t 'urn:MyURN')) \n\t\t);\n\n\t\t$accepted = $result['accepted'];\n\n\t\tif ( $accepted )\n\t\t{\n\t\t\t$cost = $result['cost'];\n\t\t\t$date = $result['date'];\n\n\t\t\t$details = '<p>Warehouse: <blockquote>\n\t\t\t \"Yes, we currently have ' . \n\t\t\t $order['quantity'] .\n\t\t\t ' of item ' . \n\t\t\t\t $order['item'] . \n\t\t\t\t ' in stock. ' .\n\t\t\t 'The courier can deliver them to ' . \n\t\t\t\t $order['to'] .\n\t\t\t ' on the ' . \n\t\t\t\t $date .\n\t\t\t '. The delivery cost will be £' . \n\t\t\t\t $cost . \n\t\t\t\t '.\"</blockquote></p>';\n\t\t} else {\n\t\t\t$details = 'Delivery Not Possible - Sorry!';\n\t\t}\n\t} else {\n\t\t$details = 'Item Out of Stock - Sorry!';\n\t}\n \n $retval = array(\n 'details' => $details,\n );\n\n return new soapval('return', 'DeliveryDetail', $retval, false, 'urn:MyURN');\n}", "title": "" }, { "docid": "95d1f06c74a83bd05e44ffa8703f5496", "score": "0.60467076", "text": "public function deliver_order() {\n if( ! isset( $_GET[\"security\"] ) )\n return;\n\n if( ! wp_verify_nonce( $_GET[\"security\"], self::DELIVER_NONCE ) ) {\n return;\n }\n\n if( ! isset( $_GET[\"order_id\"] ) ) {\n wp_redirect( admin_url() );\n return;\n }\n\n $order = new WC_Order( $_GET[\"order_id\"] );\n\n if( ! $order ) {\n wp_redirect( admin_url() );\n return;\n }\n\n $svea_order_id = ( $value = get_post_meta( $order->get_id(), \"_svea_order_id\", true ) ) \n ? $value : wc_get_order_item_meta( $order->get_id(), \"svea_order_id\" );\n\n if( ! $svea_order_id || strlen( $svea_order_id ) <= 0 ) {\n wp_redirect( admin_url() );\n return;\n }\n\n if( $order->get_payment_method() === WC_Gateway_Svea_Invoice::GATEWAY_ID ) {\n $wc_invoice = WC_Gateway_Svea_Invoice::init();\n\n $order_item_ids = isset( $_GET[\"order_items\"] ) ? explode(\",\", $_GET[\"order_items\"]) : array();\n\n $result = $wc_invoice->deliver_order( $order, $svea_order_id, $order_item_ids );\n\n if( $result[\"success\"] ) {\n WC_Gateway_Svea_Helper::add_admin_notice( \n $result[\"message\"], \n 'updated'\n );\n } else {\n WC_Gateway_Svea_Helper::add_admin_notice( \n $result[\"message\"], \n 'error'\n );\n }\n\n wp_redirect( admin_url( sprintf( 'post.php?post=%s&action=edit', $order->get_id() ) ) );\n } else if( $order->get_payment_method() === WC_Gateway_Svea_Part_Pay::GATEWAY_ID ) {\n $wc_part_pay = WC_Gateway_Svea_Part_Pay::init();\n\n $order_item_ids = array();\n\n $result = $wc_part_pay->deliver_order( $order, $svea_order_id, $order_item_ids );\n\n if( $result[\"success\"] ) {\n WC_Gateway_Svea_Helper::add_admin_notice( \n $result[\"message\"], \n 'updated'\n );\n } else {\n WC_Gateway_Svea_Helper::add_admin_notice( \n $result[\"message\"], \n 'error'\n );\n }\n\n wp_redirect( admin_url( sprintf( 'post.php?post=%s&action=edit', $order->get_id() ) ) );\n } else if ( $order->get_payment_method() === WC_Gateway_Svea_Card::GATEWAY_ID ) {\n $wc_card = WC_Gateway_Svea_Card::init();\n\n $order_item_ids = array();\n\n $result = $wc_card->deliver_order( $order, $svea_order_id, $order_item_ids );\n\n if( $result[\"success\"] ) {\n WC_Gateway_Svea_Helper::add_admin_notice( \n $result[\"message\"], \n 'updated'\n );\n } else {\n WC_Gateway_Svea_Helper::add_admin_notice( \n $result[\"message\"], \n 'error'\n );\n }\n\n wp_redirect( admin_url( sprintf( 'post.php?post=%s&action=edit', $order->get_id() ) ) );\n } else {\n wp_redirect( admin_url() );\n }\n }", "title": "" }, { "docid": "d05deb288aee36aa0d1573f33230bfff", "score": "0.60323167", "text": "public function getCashPrice(): float\n {\n return $this->cashPrice;\n }", "title": "" }, { "docid": "be417833911a0b98ee1482533a516daf", "score": "0.6022837", "text": "function addCash($pid, $date, $amount, $action) {\r\n\t$cid = insertFields(\"pmo_cash\", array(\"pid\" => $pid, \"cash_date\" => $date, \"cash_amount\" => $amount, \"cash_action\" => $action));\r\n\t$balance = getById(\"pmo_portfolio\", \"pid\", $pid)[\"portfolio_cash\"];\r\n\t\r\n\t$balance = (floatval($balance) + floatval($amount));\r\n\t\r\n\tupdateById(\"pmo_portfolio\", \"pid\", $pid, array(\"portfolio_cash\" => $balance));\r\n\treturn $cid;\r\n}", "title": "" }, { "docid": "8259d139b4780b28fb79d5a50d60ae8b", "score": "0.6019473", "text": "public function paid()\n {\n $message = new Message();\n $url = Felta::getInstance()->settings->get(\"website_url\") . \"/felta/shop/order/\" . $this->id;\n $message->put(\"You've received a new order\", \"Yes! You've received a new order from your webshop. It has been successfully paid.\", $url);\n\n // Message to customer\n $this->customer = Customer::get($this->customer);\n $this->orderConfirmation(\n \"Uw bestelling is compleet\",\n \"Uw bestelling komt er zo spoedig mogelijk aan. Mocht u nog vragen hebben, neemt u gerust contact op met ons. <br><br> Uw order nummer: \" . $this->id\n );\n\n $this->customer = $this->customer->id;\n $this->orderStatus = OrderStatus::PAID;\n $this->update();\n }", "title": "" }, { "docid": "4df6053487ab9e84d29a543b0ecaa5e6", "score": "0.6001428", "text": "public function recalcDelivery()\r\n\t{\r\n\t\tCore_Event::notify($this->_modelName . '.onBeforeRecalcDelivery', $this);\r\n\r\n\t\t$iOrderSum = 0;\r\n\t\t$iOrderWeight = 0;\r\n\r\n\t\t$aOrderItems = $this->Shop_Order_Items->findAll();\r\n\t\t$oShop = $this->Shop;\r\n\r\n\t\tforeach($aOrderItems as $oOrderItem)\r\n\t\t{\r\n\t\t\t$iOrderSum += floatval($oOrderItem->price * $oOrderItem->quantity);\r\n\t\t\t$iOrderWeight += floatval($oOrderItem->Shop_Item->weight * $oOrderItem->quantity);\r\n\t\t}\r\n\r\n\t\t$oShopDelivery = $this->Shop_Delivery_Condition->Shop_Delivery;\r\n\t\t$iCountryId = $this->shop_country_id;\r\n\t\t$iLocationId = $this->shop_country_location_id;\r\n\t\t$iCityId = $this->shop_country_location_city_id;\r\n\t\t$iCityAreaId = $this->shop_country_location_city_area_id;\r\n\r\n\t\tfor($i = 0; $i < 5; $i++)\r\n\t\t{\r\n\t\t\t$sql = \"\r\n\t\t\tSELECT `shop_delivery_conditions`.*,\r\n\t\t\tIF(`min_weight` > 0\r\n\t\t\t\tAND `max_weight` > 0\r\n\t\t\t\tAND `min_price` > 0\r\n\t\t\t\tAND `max_price` > 0, 1, 0) AS `orderfield`\r\n\t\t\tFROM `shop_deliveries`, `shop_delivery_conditions`\r\n\t\t\tWHERE `shop_id`='{$oShop->id}'\r\n\t\t\t\tAND `shop_deliveries`.`deleted`='0'\r\n\t\t\t\tAND `shop_delivery_conditions`.`deleted`='0'\r\n\t\t\t\tAND `shop_deliveries`.`id`=`shop_delivery_conditions`.`shop_delivery_id`\r\n\t\t\t\tAND `shop_delivery_conditions`.`shop_delivery_id`='{$this->Shop_Delivery_Condition->shop_delivery_id}'\r\n\t\t\t\tAND `shop_country_id`='{$iCountryId}'\r\n\t\t\t\tAND `shop_country_location_id`='{$iLocationId}'\r\n\t\t\t\tAND `shop_country_location_city_id` = '{$iCityId}'\r\n\t\t\t\tAND `shop_country_location_city_area_id` = '{$iCityAreaId}'\r\n\t\t\t\tAND `min_weight` <= '{$iOrderWeight}'\r\n\t\t\t\tAND (`max_weight` >= '{$iOrderWeight}' OR `max_weight` = '0')\r\n\t\t\t\tAND `min_price` <= '{$iOrderSum}'\r\n\t\t\t\tAND (`max_price` >= '{$iOrderSum}' OR `max_price` = '0')\r\n\t\t\tORDER BY\r\n\t\t\t\t`orderfield` DESC,\r\n\t\t\t\t`min_weight` DESC,\r\n\t\t\t\t`max_weight` DESC,\r\n\t\t\t\t`min_price` DESC,\r\n\t\t\t\t`max_price` DESC,\r\n\t\t\t\t`price` DESC\r\n\t\t\t\";\r\n\r\n\t\t\t$aRows = Core_DataBase::instance()\r\n\t\t\t\t->setQueryType(0)\r\n\t\t\t\t->query($sql)\r\n\t\t\t\t->asObject('Shop_Delivery_Condition_Model')\r\n\t\t\t\t->result()\r\n\t\t\t;\r\n\r\n\t\t\t$iRowCount = count($aRows);\r\n\r\n\t\t\tif($iRowCount)\r\n\t\t\t{\r\n\t\t\t\tif($iRowCount > 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tCore::$log\r\n\t\t\t\t\t->clear()\r\n\t\t\t\t\t->status(1)\r\n\t\t\t\t\t->notify(TRUE)\r\n\t\t\t\t\t->write(Core::_('Shop_Order.cond_of_delivery_duplicate', $oShopDelivery->name, $aRows[0]->id));\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\tif($this->shop_delivery_condition_id == $aRows[0]->id)\r\n\t\t\t\t{\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// Нашли новое условие доставки\r\n\t\t\t\t\t$this->shop_delivery_condition_id = $aRows[0]->id;\r\n\t\t\t\t\t$this->save();\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn TRUE;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tswitch ($i)\r\n\t\t\t\t{\r\n\t\t\t\t\tcase 0 :\r\n\t\t\t\t\t\t$iCityAreaId = 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 1 :\r\n\t\t\t\t\t\t$iCityId = 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 2 :\r\n\t\t\t\t\t\t$iLocationId = 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 3 :\r\n\t\t\t\t\t\t$iCountryId = 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Не нашли никаких условий доставки\r\n\t\t$this->shop_delivery_condition_id = 0;\r\n\t\t$this->save();\r\n\r\n\t\tCore_Event::notify($this->_modelName . '.onAfterRecalcDelivery', $this);\r\n\r\n\t\treturn TRUE;\r\n\t}", "title": "" }, { "docid": "de42b27fa9de2a8fb9a8de85e247743a", "score": "0.5961133", "text": "private static function sendPurchase($id_order,$data){\n $shipping = $data['shipping'];\n $order = wc_get_order($id_order);\n $items = $order->get_items();\n $details = [];\n $discount = $data[\"discount_total\"]/count($items);\n\n foreach ( $items as $index => $item ) {\n $price = floatval(number_format($item->get_total()+$item->get_total_tax(),2,'.',','));\n $realPrice = $price-$discount;\n array_push($details,[\n \"id\" => $id_order.\"-\".$index,\n \"codice_prodotto\" => $item->get_product_id(),\n \"descr_prodotto\" => substr($item->get_name(),0,49),\n \"quantita\" => $item->get_quantity(),\n \"prezzo_listino\" => $price,\n \"prezzo_pagato\" => $realPrice,\n \"sconto_perc\" => floatval(number_format(($discount*100)/$price,2,'.',',')),\n \"netto\" => $realPrice-$item->get_total_tax(),\n \"punti\" => 0\n ]);\n } \n\n $params = [\n \"login\" => $data['billing']['email'],\n \"data\" => date(\"d/m/Y\"),\n \"ora\" => date(\"H:i\"),\n \"data_pagamento\" => strtolower($data['payment_method_title'])!=\"paypal\" ? \"\" : date(\"d/m/Y\"),\n \"id\" => $id_order,\n \"tipo_pagamento\" => $data['payment_method_title'],\n \"destinatario\" => $shipping['last_name'].\" \".$shipping['first_name'],\n \"indirizzo\" => $shipping['address_1'],\n \"cap\" => $shipping['postcode'],\n \"provincia\" => $shipping['state'],\n \"citta\" => $shipping['city'],\n \"cellulare\" => $data['billing']['phone'],\n \"dettagli\" => $details\n ];\n\n $http = new Http();\n $response = $http->getJSONResponse(Http::ROUTE_INSERT_ORDER,$params,true,true);\n }", "title": "" }, { "docid": "afc2902b9f7d31878ce124bbac4220a9", "score": "0.5955914", "text": "public function afterPayment(Varien_Event_Observer $observer)\n {\n /**\n * @var $order Mage_Sales_Model_Order\n * @var $_product Mage_Sales_Model_Order_Item\n * @var $_stock Mage_CatalogInventory_Model_Stock_Item\n * @var $oStock Mage_CatalogInventory_Model_Stock_Item\n * @var $orderedItem Mage_Sales_Model_Order_Item\n * @var $shipment Mage_Sales_Model_Order_Shipment\n * @var $observer Varien_Event_Observer\n *\n * After invoicing and payment this method will be used to\n * check if your own stock will be enough to fulfill the requested amount.\n * If not, we will take the product and send a order to Stockbase for the\n * amount needed, and the order will be placed @Stockbase. This method\n * is using the sales_order_payment_pay event and will only be activated\n * after payment completes and the order is payed for by the customer.\n */\n $http = Mage::getSingleton('Divide_Stockbase_Helper_HTTP');\n $invoice = $observer->getInvoice();\n $order = $invoice->getOrder();\n $orderedProducts = $order->getAllItems();\n $moduleEnabled = Mage::getStoreConfig('stockbase_options/login/stockbase_active');\n\n if ($order && $moduleEnabled) {\n // Always rely on own stock first, so stockbase does not always get triggerd.\n $sendItToStockbase = false;\n foreach ($orderedProducts as $orderedProduct) {\n $baseQty = 0;\n $productId = $orderedProduct->getId();\n $baseQty = $orderedProduct->getQtyOrdered()\n - $orderedProduct->getQtyShipped()\n - $orderedProduct->getQtyRefunded()\n - $orderedProduct->getQtyCanceled();\n $finalQty[$productId] = $baseQty;\n $ownStockQty = $orderedProduct->getProduct()->getStockItem()->getQty();\n\n if ($ownStockQty <= 0 || $ownStockQty <= $baseQty) {\n $sendItToStockbase = true;\n }\n }\n\n // Only send if own stock is too low\n if ($sendItToStockbase == true) {\n $send = $http->sendMageOrder($order);\n\n // Add status history to order to identify Stockbase orders\n if ($send) {\n $order->addStatusHistoryComment('This order was send to stockbase.');\n $order->save();\n }\n }\n }\n }", "title": "" }, { "docid": "a6af73cb1a97b8edaa365dee8b74c980", "score": "0.5954368", "text": "public function deliverd(){\n\n $id = $this->uri->segment(3);\n $query = $this->db->where('id', $id)->get('orders')->row();\n $vendor_setttings = $this->db->where('vendor_id',$query->vendor_id)->get('system_settings')->row();\n\n $total_price = $query->price;\n \n if($query->payment_type == 'cod'){\n\n\n $vendor_commission_percent = $vendor_setttings->cash_commission;\n\n $amount_to_vc = ($vendor_commission_percent / 100) * $total_price;\n }\n\n if($query->payment_type == 'card'){\n\n $vendor_commission_percent = $vendor_setttings->card_commission;\n\n $amount_to_vc = ($vendor_commission_percent / 100) * $total_price;\n }\n\n $amount_to_vendor = $total_price - $amount_to_vc;\n $data1 = array(\n \"status\" => '4',\n 'commission' => $amount_to_vc,\n 'vendor_payback' => $amount_to_vendor\n );\n\n $s=$this->Allorders_model->update_order_status($id, $data1);\n\n $order_id = $query->order_reference;\n $order_price = $query->price;\n $customer_id = $query->customer_id;\n $res = $this->db->where('id', $customer_id)->get('customers')->row();\n $customer_name = $res->name;\n \n \n $fcm_data = array('type' => 'orderstatus' ,'id' => $order_id, 'title' => 'ORDER DELIVERED', 'message' => 'Hello ' .$customer_name. '! Thank you for shopping with Valucart . Kindly keep in touch with us on valucart.ae on fb /instagram 😊!');\n\n $this->sendpush($customer_id,$fcm_data);\n\n $log = array(\n 'id' =>$id,\n 'log' => 'Changed Order '.$order_id. ' to Delivered Status'\n );\n $session_data = $this->session->userdata('logged_in');\n updatelog($log,$session_data);\n\n\n $this->session->set_flashdata('message', array('message' => ' Order Delivered Successfully ','class' => 'success'));\n redirect(base_url().'Allorders/neworders');\n }", "title": "" }, { "docid": "cbbdd84822af739807b72e816f69d6b2", "score": "0.5950495", "text": "public function doPayment();", "title": "" }, { "docid": "886bfd27c7853554c785d60d56b3edd0", "score": "0.593012", "text": "public function addOrder() {\n $this->startTrans();\n //收集数据\n //获取详细的收货地址\n $address_id = I('post.address_id');\n $address = D('Address')->getAddressInfoById($address_id);\n $this->data['name'] = $address['name'];\n $this->data['tel'] = $address['tel'];\n $this->data['province_name'] = $address['province_name'];\n $this->data['city_name'] = $address['city_name'];\n $this->data['area_name'] = $address['area_name'];\n $this->data['detail_address'] = $address['detail_address'];\n\n //获取配送方式信息\n $delivery_id = $this->data['delivery_id'];\n switch ($delivery_id) {\n case 1:\n $this->data['delivery_price'] = 25.00;\n $this->data['delivery_name'] = '顺丰速递';\n break;\n case 2:\n $this->data['delivery_price'] = 10.00;\n $this->data['delivery_name'] = '天天快递';\n break;\n case 3:\n $this->data['delivery_price'] = 0.00;\n $this->data['delivery_name'] = '自提';\n break;\n }\n\n //获取支付方式信息\n $payment_id = $this->data['payment_id'];\n switch ($payment_id) {\n case 1:\n $this->data['payment_name'] = '微信支付';\n break;\n case 2:\n $this->data['payment_name'] = '银联在线';\n break;\n case 3:\n $this->data['payment_name'] = '邮局汇款';\n break;\n case 4:\n $this->data['payment_name'] = '货到付款';\n break;\n }\n\n //获取订单总金额\n $cart = D('Cart')->getCartList();\n if (empty($cart['cart_detail'])) {\n $this->error = '客官,不买点什么?';\n $this->rollback();\n return false;\n }\n\n $this->data['total_money'] = $cart['total_price'];\n //检查库存是否充足\n //where id=100 and stock>5 \n //select count(*) from goods where (id=1 and stock>=5) or (id=2 and stock>=2)\n $cond = [\n '_logic' => 'OR',\n ];\n foreach ($cart['cart_detail'] as $goods) {\n $cond[] = [\n 'id' => $goods['id'],\n 'stock' => ['egt', $goods['amount']],\n ];\n }\n $goods_model = M('Goods');\n $count = $goods_model->where($cond)->count();\n if ($count != count($cart['cart_detail'])) {\n $this->error = '库存不足';\n $this->rollback();\n return false;\n } else {\n foreach ($cart['cart_detail'] as $goods) {\n if ($goods_model->where(['id' => $goods['id']])->setDec('stock', $goods['amount']) === false) {\n $this->error = '下单失败';\n $this->rollback();\n return false;\n }\n }\n }\n// $cond = [\n// [\n// 'id'=>''\n// ]\n// ];\n //扣库存\n //创建订单,获取订单编号\n if (!$oid = $this->add()) {\n $this->rollback();\n return false;\n }\n\n //创建订单详情信息\n $order_detail = [];\n foreach ($cart['cart_detail'] as $goods) {\n $order_detail[] = [\n 'oid' => $oid,\n 'goods_id' => $goods['id'],\n 'goods_name' => $goods['name'],\n 'logo' => $goods['logo'],\n 'shop_price' => $goods['shop_price'],\n 'amount' => $goods['amount'],\n 'total_price' => $goods['sub_total'],\n ];\n }\n if (M('OrderDetail')->addAll($order_detail) === false) {\n $this->error = '创建订单失败';\n $this->rollback();\n return false;\n }\n\n //清空购物车\n if (D('Cart')->cleanUp() === false) {\n $this->rollback();\n return false;\n }\n $this->commit();\n return true;\n }", "title": "" }, { "docid": "1a867f8d7a5d0a0426b4e54c2107beb7", "score": "0.5926882", "text": "public function calculateCharge()\n {\n }", "title": "" }, { "docid": "c5d6b377c252554ba13292e047304782", "score": "0.5921111", "text": "function costToShip() {\n \t\treturn $this->weight * .8;\n }", "title": "" }, { "docid": "37a011b8f0b3894eeedac09b29b4d77e", "score": "0.58711386", "text": "public function processOrderShipping(Request $request){\n $order = Order::where('id', $request->id)->first();\n $order->dp_shipping = $request->amount;\n $order->save();\n\n /*--- Accrue shipping charge to partner ---*/\n $partner = DeliveryPartner::where('id', $request->partner)->first();\n $partner->balance += $request->amount;\n\n $transaction = new AccountTransaction;\n $transaction->trans_type = \"Delivery Partner Accrual\";\n $transaction->trans_amount = $request->amount;\n $transaction->trans_credit_account_type = 1;\n $transaction->trans_credit_account = \"INT-SC001\";\n $transaction->trans_debit_account_type = 9;\n $transaction->trans_debit_account = $partner->id;\n $transaction->trans_description = $log = \"Accrual of GH¢ \".$request->amount.\" to \".$partner->first_name.\" \".$partner->last_name.\" for order \".$request->id;\n $transaction->trans_date = date(\"Y-m-d G:i:s\");\n $transaction->trans_recorder = Auth::guard('manager')->user()->first_name.\" \".Auth::guard('manager')->user()->last_name;\n $transaction->save();\n\n $partner->save();\n\n /*--- log activity ---*/\n activity()\n ->causedBy(Manager::where('id', Auth::guard('manager')->user()->id)->get()->first())\n ->tap(function(Activity $activity) {\n $activity->subject_type = 'System';\n $activity->subject_id = '0';\n $activity->log_name = 'Order Shipping Charge Entered';\n })\n ->log(Auth::guard('manager')->user()->first_name.\" \".Auth::guard('manager')->user()->last_name.\" recorded an \".$log);\n \n $count[\"order\"] = Order::where('id', '=', $request->id)->first()->updated_at;\n $count[\"items\"] = OrderItem::where('oi_order_id', '=', $request->id)->get('updated_at');\n\n $order = Order::\n where(\"id\", $request->id)\n ->with('order_items.sku.product.images','order_items.order_item_state', 'customer', 'order_state', 'address', 'coupon.sales_associate.badge_info')\n ->first()\n ->toArray();\n\n $order[\"delivery_partner\"] = DeliveryPartner::get()->toArray();\n\n if(strtotime($order[\"order_state\"][\"id\"] == 6 AND $order[\"updated_at\"]) < strtotime('-14 days') AND $order[\"dp_shipping\"] == NULL){\n $order[\"allow_shipping_entry\"] = \"Yes\";\n }\n\n /*--- Nets ---*/\n if ($order[\"order_state\"][\"id\"] == 6) {\n //calculate profit or loss\n $order[\"profit_or_loss\"] = 0;\n $order[\"profit_or_loss_item\"] = [];\n\n //profit from order items\n for ($i=0; $i < sizeof($order[\"order_items\"]); $i++) { \n $order[\"profit_or_loss_item\"][\"description\"][$i] = \"Profit from \".$order[\"order_items\"][$i][\"oi_quantity\"].\" \".$order[\"order_items\"][$i][\"oi_name\"];\n $order[\"profit_or_loss_item\"][\"amount\"][$i] = $order[\"order_items\"][$i][\"oi_quantity\"] * ( $order[\"order_items\"][$i][\"oi_selling_price\"] - $order[\"order_items\"][$i][\"oi_settlement_price\"]);\n $order[\"profit_or_loss\"] += $order[\"profit_or_loss_item\"][\"amount\"][$i];\n }\n\n //Shipping charged from customer\n $order[\"profit_or_loss_item\"][\"description\"][$i] = \"Shipping fee from \".$order[\"customer\"][\"first_name\"].\" \".$order[\"customer\"][\"last_name\"];\n $order[\"profit_or_loss_item\"][\"amount\"][$i] = $order[\"order_shipping\"];\n $order[\"profit_or_loss\"] += $order[\"profit_or_loss_item\"][\"amount\"][$i];\n $i++;\n\n if($order[\"dp_shipping\"] != NULL){\n //shipping paid to delivery partner\n $order[\"profit_or_loss_item\"][\"description\"][$i] = \"Shipping fee paid to Delivery Partner \";\n $order[\"profit_or_loss_item\"][\"amount\"][$i] = -1 * $order[\"dp_shipping\"];\n $order[\"profit_or_loss\"] += $order[\"profit_or_loss_item\"][\"amount\"][$i];\n $i++;\n }\n \n\n //loss from sales coupon if set\n if(isset($order[\"order_scoupon\"]) AND $order[\"order_scoupon\"] != NULL AND $order[\"order_scoupon\"] != \"NULL\"){\n //1% discount on sale\n $order[\"profit_or_loss_item\"][\"description\"][$i] = \"1% discount from Sales Coupon \".$order[\"coupon\"][\"coupon_code\"];\n $order[\"profit_or_loss_item\"][\"amount\"][$i] = round(-0.01 * $order[\"order_subtotal\"], 2);\n $order[\"profit_or_loss\"] += $order[\"profit_or_loss_item\"][\"amount\"][$i];\n $i++;\n\n //Commission to Sales Associate\n $order[\"profit_or_loss_item\"][\"description\"][$i] = (100*$order[\"coupon\"][\"sales_associate\"][\"badge_info\"][\"sab_commission\"]).\"% commission to Sales Associate \".$order[\"coupon\"][\"sales_associate\"][\"first_name\"].\" \".$order[\"coupon\"][\"sales_associate\"][\"last_name\"].\" ( May have changed if SA was promoted )\";\n $order[\"profit_or_loss_item\"][\"amount\"][$i] = round(-1 * $order[\"coupon\"][\"sales_associate\"][\"badge_info\"][\"sab_commission\"] * $order[\"order_subtotal\"], 2);\n $order[\"profit_or_loss\"] += $order[\"profit_or_loss_item\"][\"amount\"][$i];\n $i++;\n }\n }\n\n return response()->json([\n 'order' => $order,\n 'type' => 'success',\n 'message' => \"Shipping charge recorded.\",\n \"count\" => $count,\n ]);\n }", "title": "" }, { "docid": "cd68a5806d974d27b84457cdfbb7554a", "score": "0.58683807", "text": "public function getCashondeliveryCharges($country){\r\n\t\t$rules_arr = array();\r\n\t\t$rules_arr['AE']['price'] = 5;\r\n\t\t$rules_arr['SA']['price'] = 32;\r\n\t\t$rules_arr['QA']['price'] = 32;\r\n\t\t$rules_arr['BH']['price'] = 32;\r\n\t\t$rules_arr['OM']['price'] = 32;\r\n\t\t$rules_arr['KW']['price'] = 32;\r\n\t\treturn $price = $rules_arr[$country]['price'];\r\n\t\t}", "title": "" }, { "docid": "d46bf633c1f99a8bd123d4980c4c919e", "score": "0.5859871", "text": "public function placeOrder() {\r\n //pr($this->request->getData());die();\r\n\r\n if($this->request->session()->read('sessionId') != '') {\r\n $sessionId = $this->request->session()->read('sessionId');\r\n\r\n } \r\n\r\n if($sessionId != '') {\r\n\r\n //Cart Details\r\n $cartsDetails = $this->Carts->find('all', [\r\n 'conditions' => [\r\n 'session_id' => $sessionId,\r\n ]\r\n ])->hydrate(false)->toArray();\r\n\r\n $customerDetails = $this->Users->find('all', [\r\n 'conditions' => [\r\n 'id' => $this->Auth->user('id')\r\n ]\r\n ])->hydrate(false)->first();\r\n\r\n $restaurantDetails = $this->Restaurants->find('all', [\r\n 'conditions' => [\r\n 'id' => $this->request->session()->read('resid')\r\n ]\r\n ])->hydrate(false)->first(); \r\n\r\n //Voucher Section\r\n $offerMode = $this->request->session()->read('offer_mode');\r\n $offerValue = $this->request->session()->read('offer_value');\r\n $voucherCode = $this->request->session()->read('voucher_code');\r\n $voucherAmount = $this->request->session()->read('voucherAmount');\r\n\r\n //Offer Section\r\n $offerPercentage = $this->request->session()->read('offerPercentage');\r\n $offerAmount = $this->request->session()->read('offerAmount');\r\n $firstUser = $this->request->session()->read('firstUser');\r\n\r\n //Redeem Section\r\n $redeemPercentage = $this->request->session()->read('rewardPercentage');\r\n $redeemAmount = $this->request->session()->read('rewardPoint');\r\n\r\n $addressDetails = $this->AddressBooks->find('all', [\r\n 'conditions' => [\r\n 'id' => $this->request->getData('checkout_address')\r\n ]\r\n ])->hydrate(false)->first(); \r\n\r\n $deliveryCharge = 0;\r\n\r\n\r\n if($this->request->getData('order_type') == 'delivery') {\r\n\r\n if(SEARCHBY == 'Google') {\r\n\r\n $sourcelatitude = $addressDetails['latitude'];\r\n $sourcelongitude = $addressDetails['longitude'];\r\n\r\n\r\n if($sourcelatitude != '' && $sourcelongitude != '') {\r\n\r\n $final = array();\r\n $distance = array();\r\n $result = array();\r\n\r\n $latitudeTo = $restaurantDetails['sourcelatitude'];\r\n $longitudeTo = $restaurantDetails['sourcelongitude'];\r\n $unit='K';\r\n $distance = $this->Common->getDistanceValue($sourcelatitude,$sourcelongitude,$latitudeTo,$longitudeTo,\r\n $unit);\r\n\r\n $distance = str_replace(',','',$distance);\r\n list($deliveryCharge,$message) = $this->getDeliveryCharge($restaurantDetails['id'],$distance,$sourcelatitude,$sourcelongitude);\r\n\r\n if ($message == 'success') {\r\n $to_distance = $distance;\r\n $deliveryCharge = number_format($deliveryCharge,2);\r\n }else {\r\n $to_distance = $distance;\r\n }\r\n }\r\n\r\n }else {\r\n\r\n $stateName = $this->States->find('all', [\r\n 'fields' => [\r\n 'state_name'\r\n ],\r\n 'conditions' => [\r\n 'id' => $addressDetails['state_id']\r\n ]\r\n ])->hydrate(false)->first();\r\n\r\n $cityName = $this->Cities->find('all', [\r\n 'fields' => [\r\n 'city_name'\r\n ],\r\n 'conditions' => [\r\n 'id' => $addressDetails['city_id']\r\n ]\r\n ])->hydrate(false)->first();\r\n\r\n $locationName = $this->Locations->find('all', [\r\n 'fields' => [\r\n 'area_name',\r\n 'zip_code'\r\n ],\r\n 'conditions' => [\r\n 'id' => $addressDetails['location_id']\r\n ]\r\n ])->hydrate(false)->first();\r\n\r\n $deliveryDetails = $this->DeliveryLocations->find('all', [\r\n 'conditions' => [\r\n 'restaurant_id' => $this->request->session()->read('resid'),\r\n 'city_id' => $addressDetails['city_id'],\r\n 'location_id' => $addressDetails['location_id'],\r\n ]\r\n ])->hydrate(false)->first();\r\n\r\n if(!empty($deliveryDetails)) {\r\n $value['to_distance'] = '0.00';\r\n $deliveryCharge = number_format($deliveryDetails['delivery_charge'],2);\r\n }else {\r\n $value['to_distance'] = '0.00';\r\n }\r\n\r\n if(SEARCHBY == 'area') {\r\n $cityaddress = $locationName['area_name'].','.$cityName['city_name'].','.$stateName['state_name'];\r\n }else {\r\n $cityaddress = $cityName['city_name'].','.$locationName['zip_code'].','.$stateName['state_name'];\r\n }\r\n\r\n $address = $addressDetails['address'].','.$cityaddress;\r\n }\r\n\r\n }else {\r\n $address = '';\r\n }\r\n\r\n $subTotal = 0;\r\n $taxAmount = 0;\r\n if(!empty($cartsDetails)) {\r\n foreach($cartsDetails as $ckey => $cvalue) {\r\n $subTotal = $cvalue['total_price'] + $subTotal;\r\n }\r\n if($restaurantDetails['restaurant_tax'] > 0) {\r\n $taxAmount = ($subTotal * $restaurantDetails['restaurant_tax'])/100;\r\n }\r\n }\r\n\r\n if($this->request->getData('order_type') == 'delivery') {\r\n\r\n if(SEARCHBY == 'Google') {\r\n if($restaurantDetails['free_delivery'] > 0 && $restaurantDetails['free_delivery'] <= $subTotal && ($firstUser == 'No' || $firstUser == '')) {\r\n $deliveryCharge = 0.00;\r\n }\r\n }\r\n\r\n //echo $totalAmount;die();\r\n\r\n $totalAmount = $subTotal + $taxAmount + $deliveryCharge;\r\n\r\n if($offerAmount != '') {\r\n $totalAmount = $totalAmount - $offerAmount;\r\n }\r\n\r\n if($redeemAmount != '') {\r\n $totalAmount = $totalAmount - $redeemAmount;\r\n }\r\n\r\n\r\n if($voucherAmount == 'free') {\r\n $totalAmount = $totalAmount - $deliveryCharge;\r\n $voucherAmount = $deliveryCharge;\r\n }else if ($voucherAmount) {\r\n $totalAmount = $totalAmount - $voucherAmount;\r\n }\r\n\r\n $orderUpdate['delivery_charge'] = $deliveryCharge;\r\n\r\n if($redeemAmount >= 100) {\r\n $totalAmount = $deliveryCharge;\r\n }\r\n\r\n }else {\r\n $totalAmount = $subTotal + $taxAmount;\r\n\r\n if($offerAmount != '') {\r\n $totalAmount = $totalAmount - $offerAmount;\r\n }\r\n\r\n if($redeemAmount != '') {\r\n $totalAmount = $totalAmount - $redeemAmount;\r\n }\r\n\r\n \r\n } \r\n\r\n $orderEntity = $this->Orders->newEntity();\r\n\r\n $orderUpdate['customer_id'] = $this->Auth->user('id');\r\n $orderUpdate['restaurant_id'] = $this->request->session()->read('resid');\r\n $orderUpdate['customer_name'] = $customerDetails['first_name'];\r\n $orderUpdate['customer_email'] = $customerDetails['username'];\r\n $orderUpdate['customer_phone'] = $customerDetails['phone_number'];\r\n $orderUpdate['source_latitude'] = $restaurantDetails['sourcelatitude'];\r\n $orderUpdate['source_longitude'] = $restaurantDetails['sourcelongitude'];\r\n $orderUpdate['destination_latitude'] = $addressDetails['latitude'];\r\n $orderUpdate['destination_longitude'] = $addressDetails['longitude'];\r\n $orderUpdate['flat_no'] = $addressDetails['flat_no'];\r\n if(SEARCHBY == 'Google') {\r\n $orderUpdate['address'] = $addressDetails['address'];\r\n }else {\r\n $orderUpdate['address'] = $address;\r\n }\r\n\r\n $orderUpdate['assoonas'] = ($this->request->getData('deliverytime') == 'now') ? $this->request->getData('deliverytime') : '';\r\n $orderUpdate['order_description\t'] = $this->request->getData('order_description');\r\n\r\n $orderUpdate['tax_percentage'] = $restaurantDetails['restaurant_tax'];\r\n $orderUpdate['tax_amount'] = $taxAmount;\r\n $orderUpdate['order_type'] = $this->request->getData('order_type');\r\n\r\n\r\n $orderUpdate['order_description'] = $this->request->getData('order_description');\r\n $orderUpdate['voucher_code'] = $this->request->getData('voucher_code');\r\n $orderUpdate['order_sub_total'] = $subTotal;\r\n $orderUpdate['order_grand_total'] = $totalAmount;\r\n $orderUpdate['payment_method'] = $this->request->getData('payment_method');\r\n\r\n //Voucher Section\r\n $orderUpdate['voucher_code'] = $voucherCode;\r\n $orderUpdate['voucher_percentage'] = $offerValue;\r\n $orderUpdate['voucher_amount'] = $voucherAmount;\r\n\r\n $orderUpdate['offer_percentage'] = $offerPercentage;\r\n $orderUpdate['offer_amount'] = $offerAmount;\r\n\r\n $orderUpdate['order_point'] = $this->request->session()->read('orderPoint');\r\n\r\n if($redeemAmount != '' && $redeemPercentage != '') {\r\n $orderUpdate['reward_used'] = 'Y';\r\n $orderUpdate['reward_offer'] = $redeemAmount;\r\n $orderUpdate['reward_offer_percentage'] = $redeemPercentage;\r\n }\r\n\r\n $this->request->session()->write('offer_mode','');\r\n $this->request->session()->write('offer_value','');\r\n $this->request->session()->write('voucher_code','');\r\n $this->request->session()->write('voucherAmount','');\r\n\r\n $this->request->session()->write('offer_percentage','');\r\n $this->request->session()->write('offer_amount','');\r\n\r\n\r\n //Reward\r\n $this->request->session()->write('rewardPercentage','');\r\n $this->request->session()->write('rewardPoint','');\r\n\r\n if($this->request->getData('deliverytime') != 'now') {\r\n\r\n if($this->request->getData('delivery_time') != '') {\r\n $deliveryTime = explode(' ',$this->request->getData('delivery_time'));\r\n $deliveryTime = $deliveryTime[1].' '.$deliveryTime[2];\r\n\r\n $orderUpdate['delivery_date'] = $this->request->getData('delivery_date');\r\n $orderUpdate['delivery_time'] = $deliveryTime;\r\n\r\n }else {\r\n $this->Flash->error('Delivery Time Missing');\r\n return $this->redirect(BASE_URL.'checkouts');\r\n }\r\n\r\n }else {\r\n $orderUpdate['delivery_date'] = date('Y-m-d');\r\n $orderUpdate['delivery_time'] = date('h:i A');\r\n }\r\n\r\n $cardFee = $this->siteSettings['card_fee'];\r\n\r\n $orderPatch = $this->Orders->patchEntity($orderEntity,$orderUpdate); \r\n\r\n if($this->request->getData('payment_method') == 'cod' || $this->request->getData('paidFull') == 'Yes') {\r\n\r\n $orderSave = $this->Orders->save($orderPatch);\r\n if($orderSave) {\r\n\r\n $ordergenid = $this->Common->generateId($orderSave->id);\r\n $finalorderid = \"ORD00\".$ordergenid;\r\n\r\n if($this->request->getData('payment_wallet') == 'Yes') {\r\n\r\n $walletAmount = $customerDetails['wallet_amount'] - $totalAmount;\r\n\r\n if($walletAmount < 0) {\r\n $history['amount'] = $customerDetails['wallet_amount'];\r\n $orderUpdate['split_payment'] = 'Yes';\r\n $orderUpdate['wallet_amount'] = $customerDetails['wallet_amount'];\r\n $customerDetails['wallet_amount'] = 0;\r\n $orderUpdate['payment_method'] = 'cod';\r\n }else {\r\n $customerDetails['wallet_amount'] = $walletAmount;\r\n $orderUpdate['payment_status'] = 'P';\r\n $orderUpdate['payment_method'] = 'Wallet';\r\n $history['amount'] = $totalAmount;\r\n }\r\n // $history['amount'] = $totalAmount;\r\n\r\n //Update Wallet Amount\r\n $custEntity = $this->Users->newEntity();\r\n $amount['wallet_amount'] = $customerDetails['wallet_amount'];\r\n $custPatch = $this->Users->patchEntity($custEntity,$amount);\r\n $custPatch->id = $this->Auth->user('id');\r\n $saveCust = $this->Users->save($custPatch);\r\n\r\n //Add Wallet History\r\n $walletEntity = $this->WalletHistories->newEntity();\r\n $history['customer_id'] = $this->Auth->user('id');\r\n $history['purpose'] = \"Amount Paid\";\r\n $history['transaction_type'] = 'Debited';\r\n\r\n $history['transaction_details'] = $finalorderid;\r\n $walletPatch = $this->WalletHistories->patchEntity($walletEntity,$history);\r\n $saveWallet = $this->WalletHistories->save($walletPatch);\r\n\r\n }\r\n\r\n //$orderUpdate['payment_method'] = 'cod';\r\n $orderUpdate['order_number'] = $finalorderid;\r\n $orderUpdate['payment_wallet'] = $this->request->getData('payment_wallet');\r\n $orderUpdate['paid_full'] = $this->request->getData('paidFull');\r\n $orderUpdate['id'] = $orderSave->id;\r\n $leadsupdt = $this->Orders->patchEntity($orderEntity,$orderUpdate);\r\n $leadssave = $this->Orders->save($leadsupdt);\r\n\r\n //Update orderiD to Cart Table\r\n foreach($cartsDetails as $key => $value) {\r\n $cartEntity = $this->Carts->newEntity();\r\n $cartUpdate['order_id'] = $orderSave->id;\r\n $cartPatch = $this->Carts->patchEntity($cartEntity,$cartUpdate);\r\n $cartPatch->id = $value['id'];\r\n $cartSave = $this->Carts->save($cartPatch);\r\n }\r\n\r\n $this->request->session()->write('sessionId','');\r\n session_regenerate_id();\r\n\r\n $orderId = base64_encode($orderSave->id);\r\n\r\n\r\n /*$this->Flash->set(__('Your Order Placed Successful'));\r\n return $this->redirect(BASE_URL.'users/thanks/'.$orderId);*/\r\n }\r\n }else if($this->request->getData('payment_method') == 'stripe') {\r\n\r\n require_once(ROOT . DS . 'vendor' . DS . 'stripe' . DS . 'init.php');\r\n \\Stripe\\Stripe::setApiKey('sk_test_BQokikJOvBiI2HlWgH4olfQ2');\r\n\r\n\r\n $token = $this->request->getData('res-sp-token');\r\n $payableAmount = $totalAmount*100; \r\n \r\n\r\n if($this->request->getData('payment_wallet') == 'Yes') {\r\n\r\n $payableAmount = $totalAmount - $customerDetails['wallet_amount'];\r\n\r\n $payableAmount = $payableAmount * 100;\r\n\r\n }\r\n if($this->request->getData('credit_card_choose') == '') {\r\n\r\n // Create a Customer:\r\n $customer = \\Stripe\\Customer::create([\r\n \"email\" => $customerDetails['username'],\r\n \"source\" => $token,\r\n ]);\r\n \r\n // Charge the Customer instead of the card:\r\n $charge = \\Stripe\\Charge::create([\r\n \"amount\" => $payableAmount,\r\n \"currency\" => \"usd\",\r\n \"customer\" => $customer->id\r\n ]);\r\n //echo \"<pre>\";print_r($charge);die();\r\n //Save Stripe's Customer Details in Table\r\n $cardEntity = $this->StripeCustomers->newEntity();\r\n $cardInsert['customer_id'] = $this->Auth->user('id');\r\n $cardInsert['customer_name'] = $this->Auth->user('first_name');\r\n $cardInsert['stripe_customer_id'] = $customer->id;\r\n $cardInsert['stripe_token_id'] = $token;\r\n $cardInsert['card_id'] = $charge['source']['id'];\r\n $cardInsert['card_brand'] = $charge['source']['brand'];\r\n $cardInsert['card_type'] = $charge['source']['funding'];\r\n $cardInsert['card_number'] = $charge['source']['last4'];\r\n $cardInsert['exp_month'] = $charge['source']['exp_month'];\r\n $cardInsert['exp_year'] = $charge['source']['exp_year'];\r\n $cardInsert['client_ip'] = $charge['source']['client_ip'];\r\n $cardInsert['country'] = $charge['source']['country'];\r\n $cardInsert['card_email'] = $charge['source']['name'];\r\n $cardPatch = $this->StripeCustomers->patchEntity($cardEntity,$cardInsert);\r\n $saveCard = $this->StripeCustomers->save($cardPatch);\r\n\r\n $orderUpdate['stripe_customerid'] = $customer->id;\r\n\r\n\r\n }else {\r\n $stripeDetails = $this->StripeCustomers->find('all', [\r\n 'conditions' => [\r\n 'id' => $this->request->getData('credit_card_choose')\r\n ]\r\n ])->hydrate(false)->first(); \r\n\r\n if(!empty($stripeDetails)) { \r\n \r\n\r\n if($stripeDetails['stripe_customer_id'] == '') { \r\n\r\n $customer = \\Stripe\\Customer::create([\r\n \"email\" => $customerDetails['username'],\r\n \"source\" => $stripeDetails['stripe_token_id'],\r\n ]); \r\n\r\n $stripeDetails['stripe_customer_id'] = $customer->id;\r\n\r\n $cardEntity = $this->StripeCustomers->newEntity();\r\n\r\n $cardInsert['stripe_customer_id'] = $customer->id;\r\n $cardPatch = $this->StripeCustomers->patchEntity($cardEntity,$cardInsert);\r\n $cardPatch->id = $stripeDetails['id'];\r\n $saveCard = $this->StripeCustomers->save($cardPatch);\r\n }\r\n \r\n\r\n // YOUR CODE: Save the customer ID and other info in a database for later.\r\n\r\n // YOUR CODE (LATER): When it's time to charge the customer again, retrieve the customer ID.\r\n $charge = \\Stripe\\Charge::create([\r\n \"amount\" => $payableAmount, // $15.00 this time\r\n \"currency\" => \"usd\",\r\n \"customer\" => $stripeDetails['stripe_customer_id']\r\n ]);\r\n $orderUpdate['stripe_customerid'] = $stripeDetails['stripe_customer_id'];\r\n\r\n\r\n }\r\n } \r\n \r\n\r\n $orderSave = $this->Orders->save($orderPatch);\r\n $payableAmount = $totalAmount;\r\n\r\n if($orderSave) {\r\n\r\n $ordergenid = $this->Common->generateId($orderSave->id);\r\n $finalorderid = \"ORD00\".$ordergenid;\r\n\r\n if($this->request->getData('payment_wallet') == 'Yes') {\r\n\r\n $orderUpdate['split_payment'] = 'Yes';\r\n\r\n $walletAmount = $customerDetails['wallet_amount'] - $totalAmount;\r\n\r\n $payableAmount = $totalAmount - $customerDetails['wallet_amount'];\r\n\r\n\r\n\r\n if($walletAmount < 0) {\r\n $orderUpdate['split_payment'] = 'Yes';\r\n $orderUpdate['wallet_amount'] = $customerDetails['wallet_amount'];\r\n $customerDetails['wallet_amount'] = 0;\r\n }else {\r\n $customerDetails['wallet_amount'] = $walletAmount;\r\n $orderUpdate['payment_status'] = 'P';\r\n }\r\n\r\n //Update Wallet Amount\r\n $custEntity = $this->Users->newEntity();\r\n $amount['wallet_amount'] = $customerDetails['wallet_amount'];\r\n $custPatch = $this->Users->patchEntity($custEntity,$amount);\r\n $custPatch->id = $this->Auth->user('id');\r\n $saveCust = $this->Users->save($custPatch);\r\n\r\n $history['amount'] = $totalAmount;\r\n\r\n\r\n //Add Wallet History\r\n $walletEntity = $this->WalletHistories->newEntity();\r\n $history['customer_id'] = $this->Auth->user('id');\r\n $history['purpose'] = \"Amount Paid\";\r\n $history['transaction_type'] = 'Debited';\r\n $history['transaction_details'] = $finalorderid;\r\n $walletPatch = $this->WalletHistories->patchEntity($walletEntity,$history);\r\n $saveWallet = $this->WalletHistories->save($walletPatch);\r\n\r\n }\r\n\r\n $token = $this->request->getData('res-sp-token');\r\n $payAmt = number_format($payableAmount,2)*100;\r\n\r\n $orderUpdate['cardfee_percentage'] = $cardFee;\r\n $orderUpdate['cardfee_price'] = $totalAmount * ($cardFee/100);\r\n\r\n $orderUpdate['order_number'] = $finalorderid;\r\n $orderUpdate['payment_wallet'] = $this->request->getData('payment_wallet');\r\n $orderUpdate['card_id'] = $this->request->getData('credit_card_choose');\r\n $orderUpdate['transaction_id'] = $charge['balance_transaction'];\r\n $orderUpdate['payment_status'] = 'P';\r\n\r\n $orderUpdate['id'] = $orderSave->id;\r\n $leadsupdt = $this->Orders->patchEntity($orderEntity,$orderUpdate);\r\n $leadssave = $this->Orders->save($leadsupdt);\r\n\r\n //Update orderiD to Cart Table\r\n foreach($cartsDetails as $key => $value) {\r\n $cartEntity = $this->Carts->newEntity();\r\n $cartUpdate['order_id'] = $orderSave->id;\r\n $cartPatch = $this->Carts->patchEntity($cartEntity,$cartUpdate);\r\n $cartPatch->id = $value['id'];\r\n $cartSave = $this->Carts->save($cartPatch);\r\n }\r\n\r\n $this->request->session()->write('sessionId','');\r\n session_regenerate_id();\r\n\r\n $orderId = base64_encode($orderSave->id);\r\n /*$this->Flash->set(__('Your Order Placed Successful'));\r\n return $this->redirect(BASE_URL.'users/thanks/'.$orderId);*/\r\n }\r\n }elseif ($this->request->getData('payment_method') == 'heartland') { \r\n \r\n $config = new \\GlobalPayments\\Api\\ServicesConfig(); \r\n $config->serviceUrl = 'https://cert.api2.heartlandportico.com';\r\n $config->secretApiKey = $restaurantDetails['heartland_secret_api_key']; \r\n\r\n \\GlobalPayments\\Api\\ServicesContainer::configure($config); \r\n\r\n $payableAmount = $totalAmount;\r\n\r\n if ($this->request->getData('payment_wallet') == 'Yes') {\r\n $payableAmount = $totalAmount - $customerDetails['wallet_amount'];\r\n $payableAmount = $payableAmount;\r\n }\r\n\r\n if ($this->request->getData('credit_card_choose') == '') {\r\n $this->Flash->error('Please select a card');\r\n return $this->redirect(BASE_URL . 'checkouts');\r\n }\r\n\r\n $heartlandDetails = $this->StripeCustomers->find('all', [\r\n 'conditions' => [\r\n 'id' => $this->request->getData('credit_card_choose')\r\n ]\r\n ])->hydrate(false)->first();\r\n if (!empty($heartlandDetails)) {\r\n $orderUpdate['stripe_customerid'] = $heartlandDetails['stripe_token_id'];\r\n\r\n $card = new \\GlobalPayments\\Api\\PaymentMethods\\CreditCardData();\r\n $card->token = $heartlandDetails['stripe_token_id'];\r\n\r\n $address = new \\GlobalPayments\\Api\\Entities\\Address();\r\n $address->postalCode = $this->request->getData('address_zip');\r\n\r\n $charge = null;\r\n try {\r\n $charge = $card->charge($payableAmount)\r\n ->withCurrency('USD')\r\n ->withAddress($address)\r\n ->withAllowDuplicates(true)\r\n ->execute();\r\n } catch (\\Exception $e) {\r\n error_log('payment exception: ' . $e->getMessage());\r\n $errorMessage = $e->getMessage();\r\n }\r\n }\r\n\r\n if (!isset($charge) || $charge == null) {\r\n $this->Flash->error($errorMessage ?: 'Error during payment');\r\n return $this->redirect(BASE_URL . 'checkouts');\r\n }\r\n\r\n // TODO: make sure data below is correct before order save?\r\n $orderUpdate['order_number'] = 'temp';\r\n $orderUpdate['driver_id'] = '0';\r\n $orderUpdate['ref_number'] = $charge->referenceNumber;\r\n $orderUpdate = $this->Orders->patchEntity($orderEntity, (array)$orderUpdate);\r\n $orderUpdate['google_address'] = '';\r\n $orderUpdate['landmark'] = '';\r\n $orderUpdate['state_name'] = '';\r\n $orderUpdate['city_name'] = '';\r\n $orderUpdate['location_name'] = '';\r\n $orderUpdate['delivery_time_slot'] = $this->request->getData('deliverytime');\r\n $orderUpdate['delivery_date'] = $this->request->getData('delivery_date');\r\n $orderUpdate['delivery_time'] = $this->request->getData('delivery_time');\r\n $orderUpdate['delivered_time'] = '';\r\n $orderUpdate['offer_percentage'] = '0';\r\n $orderUpdate['offer_amount'] = '0';\r\n $orderUpdate['voucher_percentage'] = '0';\r\n $orderUpdate['voucher_amount'] = '0';\r\n $orderUpdate['tip_percentage'] = '0';\r\n $orderUpdate['tip_amount'] = '0';\r\n\r\n $orderUpdate['cardfee_percentage'] = $cardFee;\r\n $orderUpdate['cardfee_price'] = $totalAmount * ($cardFee / 100);\r\n\r\n $orderUpdate['payment_wallet'] = $this->request->getData('payment_wallet') ?: 'No';\r\n $orderUpdate['card_id'] = $this->request->getData('credit_card_choose');\r\n $orderUpdate['transaction_id'] = $charge->transactionId;\r\n $orderUpdate['payment_status'] = 'P';\r\n $orderUpdate['paid_full'] = 1;\r\n $orderUpdate['wallet_amount'] = 0;\r\n $orderUpdate['distance'] = 0;\r\n $orderUpdate['driver_invoice_number'] = 'temp';\r\n $orderUpdate['driver_deliver_date'] = $this->request->getData('delivery_date');\r\n $orderUpdate['driver_deliver_time'] = $this->request->getData('delivery_time');\r\n $orderUpdate['driver_charge'] = 0;\r\n $orderUpdate['failed_reason'] = '';\r\n $orderUpdate['order_point'] = 0;\r\n $orderUpdate['reward_offer'] = 0;\r\n $orderUpdate['reward_offer_percentage'] = 0;\r\n $orderUpdate['payerID'] = '';\r\n $orderUpdate['paymentToken'] = $orderUpdate['stripe_customerid'];\r\n $orderUpdate['paymentID'] = $orderUpdate['transaction_id'];\r\n $orderUpdate['order_proof'] = '';\r\n $orderUpdate['payout_type'] = 0;\r\n $orderUpdate['payout_amount'] = 0;\r\n $orderUpdate['completed_time'] = 0;\r\n $orderSave = $this->Orders->save($orderUpdate);\r\n $payableAmount = $totalAmount;\r\n\r\n if ($orderSave) {\r\n $ordergenid = $this->Common->generateId($orderSave->id);\r\n $finalorderid = \"ORD00\".$ordergenid;\r\n\r\n if ($this->request->getData('payment_wallet') == 'Yes') {\r\n $orderUpdate['split_payment'] = 'Yes';\r\n\r\n $walletAmount = $customerDetails['wallet_amount'] - $totalAmount;\r\n\r\n $payableAmount = $totalAmount - $customerDetails['wallet_amount'];\r\n\r\n if ($walletAmount < 0) {\r\n $orderUpdate['split_payment'] = 'Yes';\r\n $orderUpdate['wallet_amount'] = $customerDetails['wallet_amount'];\r\n $customerDetails['wallet_amount'] = 0;\r\n } else {\r\n $customerDetails['wallet_amount'] = $walletAmount;\r\n $orderUpdate['payment_status'] = 'P';\r\n }\r\n\r\n //Update Wallet Amount\r\n $custEntity = $this->Users->newEntity();\r\n $amount['wallet_amount'] = $customerDetails['wallet_amount'];\r\n $custPatch = $this->Users->patchEntity($custEntity, $amount);\r\n $custPatch->id = $this->Auth->user('id');\r\n $saveCust = $this->Users->save($custPatch);\r\n\r\n $history['amount'] = $totalAmount;\r\n\r\n //Add Wallet History\r\n $walletEntity = $this->WalletHistories->newEntity();\r\n $history['customer_id'] = $this->Auth->user('id');\r\n $history['purpose'] = \"Amount Paid\";\r\n $history['transaction_type'] = 'Debited';\r\n $history['transaction_details'] = $finalorderid;\r\n $walletPatch = $this->WalletHistories->patchEntity($walletEntity, $history);\r\n $saveWallet = $this->WalletHistories->save($walletPatch);\r\n }\r\n\r\n $payAmt = number_format($payableAmount, 2) * 100;\r\n\r\n $orderUpdate['cardfee_percentage'] = $cardFee;\r\n $orderUpdate['cardfee_price'] = $totalAmount * ($cardFee / 100);\r\n\r\n $orderUpdate['order_number'] = $finalorderid;\r\n $orderUpdate['payment_wallet'] = $this->request->getData('payment_wallet') ?: 'No';\r\n $orderUpdate['card_id'] = $this->request->getData('credit_card_choose');\r\n $orderUpdate['transaction_id'] = $charge->transactionId;\r\n $orderUpdate['payment_status'] = 'P';\r\n\r\n $orderUpdate['id'] = $orderSave->id;\r\n $leadsupdt = $this->Orders->patchEntity($orderEntity, (array)$orderUpdate);\r\n $leadssave = $this->Orders->save($leadsupdt);\r\n\r\n //Update orderiD to Cart Table\r\n foreach ($cartsDetails as $key => $value) {\r\n $cartEntity = $this->Carts->newEntity();\r\n $cartUpdate['order_id'] = $orderSave->id;\r\n $cartPatch = $this->Carts->patchEntity($cartEntity, $cartUpdate);\r\n $cartPatch->id = $value['id'];\r\n $cartSave = $this->Carts->save($cartPatch);\r\n }\r\n\r\n $this->request->session()->write('sessionId', '');\r\n session_regenerate_id();\r\n\r\n $orderId = base64_encode($orderSave->id);\r\n /*$this->Flash->set(__('Your Order Placed Successful'));\r\n return $this->redirect(BASE_URL.'users/thanks/'.$orderId);*/\r\n }\r\n }else if($this->request->getData('payment_method') == 'paypal') {\r\n\r\n $orderSave = $this->Orders->save($orderPatch);\r\n if($orderSave) {\r\n\r\n $ordergenid = $this->Common->generateId($orderSave->id);\r\n $finalorderid = \"ORD00\".$ordergenid;\r\n\r\n\r\n\r\n if($this->request->getData('payment_wallet') == 'Yes') {\r\n $orderUpdate['split_payment'] = 'Yes';\r\n\r\n $walletAmount = $customerDetails['wallet_amount'] - $totalAmount;\r\n\r\n $history['amount'] = $customerDetails['wallet_amount'];\r\n\r\n /*if($walletAmount < 0) {\r\n $customerDetails['wallet_amount'] = 0;\r\n }else {\r\n $customerDetails['wallet_amount'] = $walletAmount;\r\n //$orderUpdate['payment_status'] = 'P';\r\n }*/\r\n\r\n if($walletAmount < 0) {\r\n $orderUpdate['split_payment'] = 'Yes';\r\n $orderUpdate['wallet_amount'] = $customerDetails['wallet_amount'];\r\n $customerDetails['wallet_amount'] = 0;\r\n }else {\r\n $customerDetails['wallet_amount'] = $walletAmount;\r\n $orderUpdate['payment_status'] = 'P';\r\n }\r\n\r\n //Update Wallet Amount\r\n $custEntity = $this->Users->newEntity();\r\n $amount['wallet_amount'] = $customerDetails['wallet_amount'] ;\r\n $custPatch = $this->Users->patchEntity($custEntity,$amount);\r\n $custPatch->id = $this->Auth->user('id');\r\n $saveCust = $this->Users->save($custPatch);\r\n }\r\n\r\n //$orderUpdate['cardfee_percentage'] = $cardFee;\r\n //$orderUpdate['cardfee_price'] = $totalAmount * ($cardFee/100);\r\n $orderUpdate['order_number'] = $finalorderid;\r\n $orderUpdate['payerID'] = $this->request->getData('payerID');\r\n $orderUpdate['paymentToken'] = $this->request->getData('paymentToken');\r\n $orderUpdate['paymentID'] = $this->request->getData('paymentID');\r\n $orderUpdate['payment_status'] = 'P';\r\n\r\n $orderUpdate['id'] = $orderSave->id;\r\n $leadsupdt = $this->Orders->patchEntity($orderEntity,$orderUpdate);\r\n $leadssave = $this->Orders->save($leadsupdt);\r\n\r\n //Update orderiD to Cart Table\r\n foreach($cartsDetails as $key => $value) {\r\n $cartEntity = $this->Carts->newEntity();\r\n $cartUpdate['order_id'] = $orderSave->id;\r\n $cartPatch = $this->Carts->patchEntity($cartEntity,$cartUpdate);\r\n $cartPatch->id = $value['id'];\r\n $cartSave = $this->Carts->save($cartPatch);\r\n }\r\n\r\n $this->request->session()->write('sessionId','');\r\n session_regenerate_id();\r\n\r\n $orderId = base64_encode($orderSave->id);\r\n\r\n }\r\n }else {\r\n return $this->redirect(BASE_URL);\r\n } \r\n\r\n\r\n if($_SERVER['HTTP_HOST'] != 'localhost') {\r\n\r\n $restaurantFCM = $this->Restaurants->find('all', [\r\n 'fields' => [\r\n 'device_id'\r\n ],\r\n 'conditions' => [\r\n 'id' => $this->request->session()->read('resid')\r\n ]\r\n ])->hydrate(false)->first();\r\n\r\n if($restaurantFCM['device_id'] != '') {\r\n\r\n $message = 'New order came - '.$finalorderid;\r\n\r\n $notificationdata['data']['title'] = \"Neworder\";\r\n $notificationdata['data']['message'] = $message;\r\n $notificationdata['data']['is_background'] = false;\r\n $notificationdata['data']['payload'] = array('OrderDetails' => \"\",'type' => \"ordercanceled\");\r\n $notificationdata['data']['timestamp'] = date('Y-m-d G:i:s');\r\n\r\n $this->FcmNotification->sendNotification($notificationdata, $restaurantFCM['device_id']);\r\n\r\n }\r\n\r\n //$this->orderEmail($orderSave->id);\r\n }\r\n\r\n $message = 'New Order Came';\r\n $this->PushNotification->pushNotification($message,$restaurantDetails['user_id']);\r\n\r\n //Reward Points Update\r\n\r\n if($redeemAmount != '' && $redeemPercentage != '') {\r\n\r\n $customerPoints = $this->CustomerPoints->find('all', [\r\n 'fields' => [\r\n 'total_points' => 'SUM(points)'\r\n ],\r\n 'conditions' => [\r\n 'customer_id' => $this->Auth->user('id'),\r\n 'status' => '1'\r\n ]\r\n ])->hydrate(false)->toArray();\r\n\r\n $customerPoint['order_id'] = $orderSave->id;\r\n $customerPoint['restaurant_name'] = $restaurantDetails['restaurant_name'];\r\n $customerPoint['customer_id'] = $this->Auth->user('id');\r\n $customerPoint['total'] = $totalAmount;\r\n $customerPoint['points'] = $customerPoints[0]['total_points'];\r\n $customerPoint['type'] = 'Spent';\r\n\r\n $customerPointEntity = $this->CustomerPoints->newEntity();\r\n $customerPointPatch = $this->CustomerPoints->patchEntity($customerPointEntity,$customerPoint);\r\n $customerPointSave = $this->CustomerPoints->save($customerPointPatch);\r\n\r\n $rewardPoints = $this->CustomerPoints->find('all', [\r\n 'conditions' => [\r\n 'customer_id' => $this->Auth->user('id'),\r\n 'status' => '1'\r\n ]\r\n ])->hydrate(false)->toArray();\r\n\r\n if(!empty($rewardPoints)) {\r\n\r\n foreach ($rewardPoints as $key => $value) {\r\n $reward['id'] = $value['id'];\r\n $reward['status'] = '0';\r\n $rewardPointEntity = $this->CustomerPoints->newEntity();\r\n $rewardPointPatch = $this->CustomerPoints->patchEntity($rewardPointEntity,$reward);\r\n $customerPointSave = $this->CustomerPoints->save($rewardPointPatch);\r\n }\r\n\r\n }\r\n\r\n }\r\n $this->Flash->set(__('Your Order Placed Successful'));\r\n return $this->redirect(BASE_URL.'users/thanks/'.$orderId);\r\n\r\n }\r\n }", "title": "" }, { "docid": "5326a4882df3ea103e10d1228f5f378a", "score": "0.5858396", "text": "public static function purchase() {\n $invoiceId = generateUuid(6);\n // die(var_dump($_POST));\n if ($_POST) {\n UserService::setCustomerData($_POST);\n }\n $total = CartService::createTickets($invoiceId);\n PaymentService::createPayment($total, $invoiceId);\n\n }", "title": "" }, { "docid": "28e5569a4f72761a0c22438c387401cc", "score": "0.5813549", "text": "public function receipt(){\n\t\t$total = $this->request->data['Check']['amount'];\n\t\t$debCard = $this->request->data['Check']['debcard'];\n $this->set('finalPrice',$total);\n\t\t\n\t\t// Encuentra la tarjeta\n $debCard = $this->CardUser->find('first',array('conditions'=>array('CardUser.id'=>$debCard)));\n $debCard = $debCard['CardUser']['card_id'];\n\n // Descuenta de la tarjeta\n\t\t$transaction = $this->Debitcard->find('first',array('conditions'=>array('Debitcard.id'=>$debCard)));\n\t\tif(($transaction['Debitcard']['balance'] - $total >= 0) && ($transaction['Debitcard']['expiration_date']>date(\"Y-m-d\"))){\n\t\t\t$this->Debitcard->id = $debCard;\n\t\t\t$this->Debitcard->set(array('balance' => $transaction['Debitcard']['balance'] - $total));\n\t\t\t$this->Debitcard->save();\n\t\t\t\n\t\t\t// Aquí se guarda la factura, trayendo los datos del formulario\n\t\t\t$checkId=0;\n\t\t\tif ($this->request->is('post')) {\n\t\t\t\t// Genera la factura\n\t\t\t\t$this->Check->create();\n\t\t\t\tif ($this->Check->save($this->request->data)) {\n\t\t\t\t\t$id = $this->request->data['Check']['id'];\n\t\t\t\t\t$this->Check->read(null, $id);\n\t\t\t\t\t$this->Check->set(['debitcard_id'=>$debCard, 'amount'=>$total, 'general_discount'=> 0, 'sold_the'=>date(\"Y-m-d H:i:s\")]);\n\t\t\t\t\t$this->Check->save();\n\t\t\t\t\t$checkId = $this->Check->id;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Muestra el valor de factura\n\t\t\t\t$this->set('idCheck',$checkId);\n\t\t\t\t\n\t\t\t\t$cart = array();\n\t\t\t\tif ($this->Session->check('Cart')) {\n\t\t\t\t\t$cart = $this->Session->read('Cart');\n\t\t\t\t}\n\t\t\t\t$this->set(compact('cart'));\n\t\t\t\t$number = 0;\n\t\t\t\tforeach($cart as $key => $product ){\n\t\t\t\t\t$discount = $product['Product']['discount'];\n\t\t\t\t\t$price = $product['Product']['price'];\n\t\t\t\t\t$qty = $this->Session->read('CartQty.'.$number);\n\t\t\t\t\t// Guardar items de factura: ID,IDCHECK,IDPRODUCT,DISCOUNT,PRICE,QTY\n\t\t\t\t\t$id=$this->CheckProduct->id +1;\n\t\t\t\t\t$this->CheckProduct->set(array(\n\t\t\t\t\t\t'id' => $id,'check_id'=>$checkId,'product_id'=>$product['Product']['id'],'discount'=>$discount,'prize'=>$price,'quantity'=>$qty\n\t\t\t\t\t));\n\t\t\t\t\t$this->CheckProduct->save();\n\t\t\t\t\t$number++;\n\t\t\t\t}\n\t\t\t\t$this->Session->delete('Cart');\n\t\t\t\t$this->Session->delete('CartQty');\n\t\t\t\t$this->Session->delete('CartPrc');\n\t\t\t}\n\t\t\n\t\t}\n\n\t}", "title": "" }, { "docid": "a2f8a0eb23305f21fa4eca5205fcb4f4", "score": "0.58123016", "text": "public function onCharge($order)\n {\n $this->statusCode = 'pending';\n\n // Begin paypal\n try {\n if ($order->total <= 0) {\n \n $this->statusCode = 'completed';\n\n $this->detail = 'Order total is 0; no PayPal transaction required.';\n\n $this->transactionId = uniqid();\n\n return true;\n }\n\n $this->setContext();\n\n $payer = new Payer();\n \n $payer->setPaymentMethod('paypal');\n\n $list = new ItemList();\n \n $list->setItems($this->toPayPalItems($order));\n\n $details = new Details();\n \n $details->setShipping($order->totalShipping)\n ->setTax($order->totalTax)\n ->setSubtotal($order->totalPrice);\n\n $amount = new Amount();\n /*\"shipping\" => \"10\"\n \"tax\" => \"3.84\"\n \"subtotal\" => \"19.20\"*/\n\n /*\"shipping\" => \"5\"\n \"tax\" => \"1.92\"\n \"subtotal\" => \"9.60\"*/\n//dd($details);\n $amount->setCurrency(Config::get('shop.currency'))\n ->setTotal($order->total)\n ->setDetails($details);\n\n $transaction = new Transaction();\n\n $transaction->setAmount($amount)\n ->setItemList($list)\n ->setDescription(sprintf(\n '%s payment, Order #%d',\n Config::get('shop.name'),\n $order->id\n ))\n ->setInvoiceNumber($order->id);\n\n $redirectUrls = new RedirectUrls();\n \n $redirectUrls->setReturnUrl($this->callbackSuccess)\n ->setCancelUrl($this->callbackFail);\n\n $payment = new Payment();\n\n $payment->setIntent('sale')\n ->setPayer($payer)\n ->setRedirectUrls($redirectUrls)\n ->setTransactions([$transaction]);\n\n //$request = clone $payment;\n\n $payment->create($this->apiContext);\n\n $this->approvalUrl = $payment->getApprovalLink();\n\n $this->detail = sprintf('Pending approval: %s', $this->approvalUrl);\n\n return true;\n\n } catch (PayPalConnectionException $e) {\n\n $response = json_decode($e->getData());\n\n throw new GatewayException(\n sprintf(\n '%s: %s',\n $response->name,\n isset($response->message) ? $response->message : 'Paypal payment Failed.'\n ),\n 1001,\n $e\n );\n\n } catch (\\Exception $e) {\n\n throw new GatewayException(\n $e->getMessage(),\n 1000,\n $e\n );\n\n }\n\n return false;\n }", "title": "" }, { "docid": "033dbf9709c570646ba7c44d69012bc6", "score": "0.5808223", "text": "function print_delivery_estimate($pid = 0, $orderdate = '')\n\t{\n\t\tglobal $ilance;\n\t\t$sql = $ilance->db->query(\"\n\t\t\tSELECT ship_handlingtime\n\t\t\tFROM \" . DB_PREFIX . \"projects_shipping\n\t\t\tWHERE project_id = '\" . intval($pid) . \"'\n\t\t\tLIMIT 1\n\t\t\");\n\t\tif ($ilance->db->num_rows($sql) > 0)\n\t\t{\n\t\t\t$res = $ilance->db->fetch_array($sql, DB_ASSOC);\n\t\t\t$datetime1 = $ilance->datetimes->fetch_datetime_from(($res['ship_handlingtime']), $orderdate);\n\t\t\t$temp1 = explode(' ', $datetime1);\n\t\t\t$temp2 = explode('-', $temp1[0]);\n\t\t\t$temp3 = $ilance->datetimes->is_business_day($temp2[0], $temp2[1], $temp2[2]);\n\t\t\tif ($temp3[0])\n\t\t\t{\n\t\t\t\t$datetime1 = print_date($datetime1, 'l M d Y', 0, 0);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ($temp3[1] == '6') // saturday, add 2 days to date\n\t\t\t\t{\n\t\t\t\t\t$datetime1 = $ilance->datetimes->fetch_datetime_from(2, $datetime1);\n\t\t\t\t\t$datetime1 = print_date($datetime1, 'l M d Y', 0, 0);\n\t\t\t\t}\n\t\t\t\telse if ($temp3[1] == '0') // sunday, add 1 day to date\n\t\t\t\t{\n\t\t\t\t\t$datetime1 = $ilance->datetimes->fetch_datetime_from(1, $datetime1);\n\t\t\t\t\t$datetime1 = print_date($datetime1, 'l M d Y', 0, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tunset($temp1, $temp2, $temp3);\n\t\t\t$datetime2 = $ilance->datetimes->fetch_datetime_from(($res['ship_handlingtime'] + 12), $orderdate);\n\t\t\t$temp1 = explode(' ', $datetime2);\n\t\t\t$temp2 = explode('-', $temp1[0]);\n\t\t\t$temp3 = $ilance->datetimes->is_business_day($temp2[0], $temp2[1], $temp2[2]);\n\t\t\tif ($temp3[0])\n\t\t\t{\n\t\t\t\t$datetime2 = print_date($datetime2, 'l M d Y', 0, 0);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ($temp3[1] == '6') // saturday, add 2 days to date\n\t\t\t\t{\n\t\t\t\t\t$datetime2 = $ilance->datetimes->fetch_datetime_from(2, $datetime2);\n\t\t\t\t\t$datetime2 = print_date($datetime2, 'l M d Y', 0, 0);\n\t\t\t\t}\n\t\t\t\telse if ($temp3[1] == '0') // sunday, add 1 day to date\n\t\t\t\t{\n\t\t\t\t\t$datetime2 = $ilance->datetimes->fetch_datetime_from(1, $datetime2);\n\t\t\t\t\t$datetime2 = print_date($datetime2, 'l M d Y', 0, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tunset($temp1, $temp2, $temp3);\n\t\t\treturn \"$datetime1 &ndash; $datetime2 {_by_lower} 8:00pm\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// default 1 week threshold\n\t\t\t$datetime1 = $ilance->datetimes->fetch_datetime_from(7, $orderdate);\n\t\t\t$temp1 = explode(' ', $datetime1);\n\t\t\t$temp2 = explode('-', $temp1[0]);\n\t\t\t$temp3 = $ilance->datetimes->is_business_day($temp2[0], $temp2[1], $temp2[2]);\n\t\t\tif ($temp3[0])\n\t\t\t{\n\t\t\t\t$datetime1 = print_date($datetime1, 'l M d Y', 0, 0);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ($temp3[1] == '6') // saturday, add 2 days to date\n\t\t\t\t{\n\t\t\t\t\t$datetime1 = $ilance->datetimes->fetch_datetime_from(2, $datetime1);\n\t\t\t\t\t$datetime1 = print_date($datetime1, 'l M d Y', 0, 0);\n\t\t\t\t}\n\t\t\t\telse if ($temp3[1] == '0') // sunday, add 1 day to date\n\t\t\t\t{\n\t\t\t\t\t$datetime1 = $ilance->datetimes->fetch_datetime_from(1, $datetime1);\n\t\t\t\t\t$datetime1 = print_date($datetime1, 'l M d Y', 0, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tunset($temp1, $temp2, $temp3);\n\t\t\t$datetime2 = $ilance->datetimes->fetch_datetime_from(12, $orderdate);\n\t\t\t$temp1 = explode(' ', $datetime2);\n\t\t\t$temp2 = explode('-', $temp1[0]);\n\t\t\t$temp3 = $ilance->datetimes->is_business_day($temp2[0], $temp2[1], $temp2[2]);\n\t\t\tif ($temp3[0])\n\t\t\t{\n\t\t\t\t$datetime2 = print_date($datetime2, 'l M d Y', 0, 0);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ($temp3[1] == '6') // saturday, add 2 days to date\n\t\t\t\t{\n\t\t\t\t\t$datetime2 = $ilance->datetimes->fetch_datetime_from(2, $datetime2);\n\t\t\t\t\t$datetime2 = print_date($datetime2, 'l M d Y', 0, 0);\n\t\t\t\t}\n\t\t\t\telse if ($temp3[1] == '0') // sunday, add 1 day to date\n\t\t\t\t{\n\t\t\t\t\t$datetime2 = $ilance->datetimes->fetch_datetime_from(1, $datetime2);\n\t\t\t\t\t$datetime2 = print_date($datetime2, 'l M d Y', 0, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tunset($temp1, $temp2, $temp3);\n\t\t\treturn \"$datetime1 &ndash; $datetime2 {_by_lower} 8:00pm\";\n\t\t}\n\t}", "title": "" }, { "docid": "16f16d533a77f57e8a8967300bab172e", "score": "0.58036494", "text": "public function calculateDeliveryCost($total_price){\n if ($total_price < 50){\n $this->cost = 4.95;\n }elseif($total_price < 90){\n $this->cost = 2.95;\n }else{\n $this->cost = 0;\n }\n return $this->cost;\n }", "title": "" }, { "docid": "ca093b2888bcfd53a2ebcc25dc095a37", "score": "0.58016324", "text": "private function sendOrderUpdate($order)\n\t{\n\t\tif (!$order) return;\n\n\t\t$data = array(\n\t\t\t/*\n\t\t\tan order \"reference\" is not unique normally, but this method will make sure it is (it adds a #2 etc)\n\t\t\tto the reference if there are multiple orders with the same one\n\t\t\t*/\n\t\t\t'number' => (string)$order->getUniqReference(),\n\t\t\t'refund_status' => 'not_refunded',\n\t\t\t'cancellation_status' => 'not_cancelled',\n\t\t\t'total_refunded' => 0,\n\t\t);\n\n\t\tif ((float)$order->total_paid_real == 0)\n\t\t{\n\t\t\t$data['payment_status'] = 'not_paid';\n\t\t\t$data['total_paid'] = 0;\n\t\t}\n\t\telse if ((float)$order->total_paid_real == (float)$order->total_paid)\n\t\t{\n\t\t\t$data['payment_status'] = 'paid';\n\t\t\t$data['total_paid'] = (string)$order->total_paid;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['payment_status'] = 'partially_paid';\n\t\t\t$data['total_paid'] = (string)$order->total_paid_real;\n\t\t}\n\n\t\t/* cancelled? */\n\t\tif ($order->getCurrentState() == Configuration::get('PS_OS_CANCELED'))\n\t\t\t$data['cancellation_status'] = 'cancelled';\n\t\t/*\n\t\tcredit slip hook\n\t\tactionOrderSlipAdd\n\t\tactionProductCancel\n\n\t\trefunds in prestashop are a bit of a clusterfuck, so this isn't too simple and might still have bugs\n\t\t*/\n\n\t\t$total_refunded = 0;\n\n\t\t/* i think we can simplify this by querying for credit (order) slips attached to this order */\n\t\t$credit_slips = OrderSlip::getOrdersSlip($order->id_customer, $order->id);\n\n\t\t/*\n\t\t * if we have at least one credit slip that should mean we have had a refund, so let's add them\n\t\t * NOTE: the \"amount\" is the unit price of the product * quantity refunded, plus shipping if they opted\n\t\t * refund the shipping cost. However PS doesn't stop you from refunding shipping cost more than\n\t\t * once if you do multiple refunds, so the refund total could end up more than the actual total\n\t\t * ... if this happens we will just cap it to the order total so it doesn't confuse loyaltylion\n\t\t*/\n\n\t\t// what the fuck\n\t\t// why can't I do this?\n\n\t\tforeach ($credit_slips as $slip)\n\t\t{\n\t\t\tif (!$slip['amount']) continue;\n\n\t\t\t$total_refunded += $slip['amount'];\n\t\t}\n\n\t\tif ($total_refunded > 0)\n\t\t{\n\t\t\tif ($total_refunded < (float)$order->total_paid)\n\t\t\t{\n\t\t\t\t$data['refund_status'] = 'partially_refunded';\n\t\t\t\t$data['total_refunded'] = $total_refunded;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\tif the total refunded is equal (or, perhaps, greater than?) the total cost of the order,\n\t\t\t\twe'll just class that as a full refund\n\t\t\t\t*/\n\t\t\t\t$data['refund_status'] = 'refunded';\n\t\t\t\t$data['total_refunded'] = (float)$order->total_paid;\n\t\t\t}\n\t\t}\n\n\t\t/* refund state: PS_OS_REFUND */\n\n\t\t$this->loadLoyaltyLionClient();\n\t\t$response = $this->client->orders->update($order->id, $data);\n\n\t\tif (!$response->success)\n\t\t{\n\t\t\tLogger::addLog('[LoyaltyLion] Failed to update order ('.$order->id.'). API status: '\n\t\t\t\t.$response->status.', error: '.$response->error, 3);\n\t\t}\n\t}", "title": "" }, { "docid": "ab4b76301de5dffa4398f6f8e0ee73be", "score": "0.57924277", "text": "public function displayTotalSavingsThroughDiscountInOrder($order){\n if(!is_object($order)){\n if(!empty($order) && is_int($order)){\n $order = FlycartWoocommerceOrder::wc_get_order($order);\n }\n }\n $items = $order->get_items();\n if(!empty($items)){\n $total_discount = 0;\n foreach ($items as $key => $item){\n $woo_discount_details = $item->get_meta('_fly_woo_discount_price_rules');\n if(!empty($woo_discount_details)){\n if (!empty($woo_discount_details['discount_amount_total'])) {\n $total_discount += $woo_discount_details['discount_amount_total'];\n }\n }\n }\n if($total_discount > 0){\n $total_discounted_price = FlycartWoocommerceProduct::wc_price($total_discount, array('currency' => FlycartWoocommerceOrder::get_currency($order)));\n $subtotal_additional_text = $this->getYouSavedContent($total_discounted_price);\n $path_from_template = $this->getTemplateOverride('total-savings-order.php');\n $path = WOO_DISCOUNT_DIR . '/view/template/total-savings-order.php';\n if($path_from_template){\n $path = $path_from_template;\n }\n include($path);\n }\n }\n }", "title": "" }, { "docid": "8ae58267c44000b6b0212a9c5494f34b", "score": "0.5782605", "text": "public function getCashByTransferElements()\n {\n return $this->_getDeliveryFieldsFromCollection(DeliveryTypeTable::getInstance()->findBy('cash_on_delivery', false));\n }", "title": "" }, { "docid": "79d891657857d9e5cd64f9a9707b5c61", "score": "0.57816964", "text": "function cbone_marketing_concierge_order($order_id) {\n global $user;\n $order = commerce_cart_order_load($user->uid);\n $data = array();\n $package_data = '';\n foreach ($order->commerce_line_items['und'] as $key => $value) {\n $line_item_id = $value['line_item_id'];\n $line_item = commerce_line_item_load($line_item_id);\n $product_id = $line_item->commerce_product['und']['0']['product_id'];\n $product = commerce_product_load($product_id);\n $product_id_array = array(1,2,3,7);\n if ( in_array($product_id, $product_id_array) ) {\n $banner = file_create_url($product->field_mc_product_banner['und']['0']['uri']);\n $logo = file_create_url($product->field_mc_image['und']['0']['uri']);\n $title = $product->title;\n $package_data = get_package_configuration_data($product_id);\n }\n }\n //saved unit cost\n $serialize_value = variable_get('mc_order_unit_cost', '0');\n $unit_cost = unserialize($serialize_value);\n $additional_items_cost_query = db_select('mc_package_addon_configuration', 'a')\n ->fields('a')\n ->condition('product_name', $title ,'like')\n ->execute()\n ->fetchAll();\n foreach($additional_items_cost_query as $addkey => $addvalue) {\n $unit_cost[$unit_cost_element][$addvalue->product_addon_sku] = $addvalue->addon_unit_price;\n }\n $variables = array(\n 'banner' => $banner,\n 'logo' => $logo,\n 'title' => $title,\n 'unit_cost' => $unit_cost,\n 'package' => $package_data,\n 'datad' => $order\n );\n if (isset($_SESSION['listing_reference_nid'])) {\n $order->field_lms_listing_reference['und']['0']['nid'] = $_SESSION['listing_reference_nid'];\n commerce_order_save($order);\n unset($_SESSION['listing_reference_nid']);\n } \n $output = theme('mc_additional_order', array('var_name' => $variables));\n return $output;\n}", "title": "" }, { "docid": "03e66a5f79c02c1f72e752bc18b29aae", "score": "0.5780886", "text": "public function sales_order_payment_place_end(Varien_Event_Observer $observer) {\n $payment = $observer->getPayment();\n /* if ($payment->getMethodInstance()->getLoworderfeee() != 'cashondelivery'){\n return;\n } */\n\n $order = $payment->getOrder();\n $quote = Mage::getSingleton('checkout/session')->getQuote();\n if (!$quote->getId()) {\n $quote = Mage::getSingleton('adminhtml/session_quote')->getQuote();\n }\n $order->setLoworderfee($quote->getLoworderfee());\n $order->setBaseLoworderfee($quote->getBaseLoworderfee());\n\n // $order->setLoworderfeeTaxAmount($quote->getLoworderfeeTaxAmount());\n // $order->setBaseLoworderfeeTaxAmount($quote->getBaseLoworderfeeTaxAmount());\n\n $order->save();\n }", "title": "" }, { "docid": "61b0bcb97452e7b57a8bcdffb5a296ae", "score": "0.57763046", "text": "public function actionPayorder($id)\n {\n $modelorder = $this->findModelorder($id);\n\n if (!\\Yii::$app->user->isGuest) {\n if (Yii::$app->user->identity->id == $modelorder->id_user) {\n \n $modelprofile = $this->findModelprofile(Yii::$app->user->identity->id);\n \n\n if ($modelorder->status == 6) {\n \n\n $modelorder->status = 8;\n if($modelorder->save(false)){\n\n $banalceclient = Balance::find()->where(['id_user' => $modelorder->id_user])->one();\n\n $banalcetranslater = Balance::find()->where(['id_user' => $modelorder->id_translater])->one();\n \n //balance client\n $newhold = $banalceclient->hold - $modelorder->totalcost;\n $banalceclient->hold = $newhold;\n //balance client\n\n //balance translater\n $newbalance = $banalcetranslater->balance + $modelorder->totalcost;\n $newhold = $banalcetranslater->hold - $modelorder->totalcost;\n $banalcetranslater->balance = $newbalance;\n $banalcetranslater->hold = $newhold;\n //balance translater\n\n \n\n if ($banalceclient->save() && $banalcetranslater->save()) {\n //create to client alert\n $modelalerts = new Alerts();\n $modelalerts->id_user = $modelorder->id_user;\n $modelalerts->id_order = $modelorder->id;\n $modelalerts->comment = 'Your order is paid';\n $modelalerts->status = 0;\n $modelalerts->type = 0;\n $modelalerts->save(false);\n //create to client alert\n\n //send email to client\n $subject = 'Your order is paid';\n $body = 'Your order is paid';\n $modeluser = $this->findModeluser($modelorder->id_user);\n $this->sendAletemail($subject, $body, $modeluser);\n //send email to client\n\n //create alert to tranlslater\n $modelalerts = new Alerts();\n $modelalerts->id_user = $modelorder->id_translater;\n $modelalerts->id_order = $modelorder->id;\n $modelalerts->comment = 'Order is paid';\n $modelalerts->status = 0;\n $modelalerts->type = 0;\n $modelalerts->save(false);\n //create alert to tranlslater\n\n //send email to client\n $subject = 'Order is paid';\n $body = 'Order is paid';\n $modeluser = $this->findModeluser($modelorder->id_translater);\n $this->sendAletemail($subject, $body, $modeluser);\n //send email to client\n\n\n Yii::$app->session->setFlash('info','Your order is paid');\n }\n else{\n Yii::$app->session->setFlash('error','Opps! Your order is not paid.'); \n }\n \n\n \n }\n else{\n Yii::$app->session->setFlash('error','Opps! Your order is not paid. Please contact us'); \n }\n\n\n return $this->redirect(Yii::$app->request->referrer); \n }\n else{\n \n return $this->redirect(['index']);\n }\n \n }\n }\n else{\n return $this->redirect(['/site/login']);\n }\n }", "title": "" }, { "docid": "c10e4ae75d1d3b51a765c919538bfc1f", "score": "0.5776127", "text": "public static function geoCart_payment_choicesProcess()\n {\n trigger_error('DEBUG TRANSACTION: Top of ' . self::gateway_name . ': geoCart_payment_choicesProcess() - processing');\n\n $cart = geoCart::getInstance();\n\n $gateway = geoPaymentGateway::getPaymentGateway(self::gateway_name);\n\n //get invoice on the order\n $invoice = $cart->order->getInvoice();\n $invoice_total = $due = $invoice->getInvoiceTotal();\n\n if ($due >= 0) {\n //DO NOT PROCESS! Nothing to process, no charge (or returning money?)\n return ;\n }\n\n if (!$gateway->_checks()) {\n //Gateway checks failed, cannot process payment.. Should not even show\n //the gateway choice on the payment gateway pages, this is just a failsafe\n return;\n }\n\n //Now, create a new transaction attached to the invoice, but set status to 0 meaning\n //is is not active yet. We'll activate the transaction when we get the IPN signal later..\n $transaction = new geoTransaction();\n $transaction->setAmount(-1 * $due);//balance out the amount due on invoice\n\n $transaction->setDate(geoUtil::time());\n //we need text from main cart page for the text to send to cashU\n $cart->db->get_text(false, 10203);\n //and also from invoice page\n $msgs = $cart->db->get_text(true, 183);\n $transaction->setDescription($msgs[501430]);\n $transaction->setGateway($gateway);\n $transaction->setInvoice($invoice);\n $transaction->setStatus(0);\n $transaction->setUser($cart->user_data['id']);\n\n $mult = ($gateway->get(\"currency_rate\", 0) != 0) ? $gateway->get(\"currency_rate\") : 1;\n $mult = ($mult * -1);//due is going to be negative, need to convert to positive to process by cashu\n $amount_converted = sprintf(\"%01.2f\", round(($mult * $due), 2));\n //Set this data in transaction for debug purposes later on\n $transaction->set('cashU_amount', $amount_converted); //amount sent to paypal\n\n $invoice->addTransaction($transaction);\n\n $transaction->save();//save changes\n\n $test_mode = ($gateway->get('testing_mode')) ? 1 : 0;\n\n trigger_error('DEBUG TRANSACTION: Inserting new transaction for cashu payment.');\n\n $soap = new SoapClient($gateway->_host_wsdl);\n\n $token = $gateway->_genToken($amount_converted);\n\n $transaction->set('token', $token);\n\n $result = $soap->DoPaymentRequest(\n $gateway->get('merchantId'),\n $token,\n $msgs[501431],\n $gateway->get('currency_type'),\n $amount_converted,\n $gateway->_getLanguage(),\n $transaction->getId(),\n $msgs[501431],\n '',\n '',\n '',\n '',\n $test_mode,\n '' . $gateway->get('service_name')\n );\n\n //Check for errors...\n\n if (!strlen($result) || isset(self::$_soapErrors[$result])) {\n //empty result, or result is one of the errors\n $gateway->_soapFailure($transaction, $result);\n return;\n }\n\n //break up the result\n $parts = explode('=', $result);\n\n if (!isset($parts[0]) || $parts[0] !== 'Transaction_Code') {\n //Result is not as expected, return failure\n $gateway->_soapFailure($transaction, $result);\n return;\n }\n $transactionCode = $parts[1];\n\n trigger_error(\"DEBUG TRANSACTION: cashU initial getting transaction code successful, code is $transactionCode\");\n\n $transaction->setGatewayTransaction($transactionCode);\n\n //re-save transaction to save paypal url.\n $transaction->save();\n\n //set order status to Pending to prep for sending data to gateway\n $cart->order->setStatus('pending');\n //Close the cart session so user can't come back and change something after payment\n $cart->removeSession();\n\n $post_fields = array(\n 'Transaction_Code' => $transactionCode,\n 'test_mode' => $test_mode,\n );\n\n $gateway->_submitViaPost($gateway->_host_payment, $post_fields);\n }", "title": "" }, { "docid": "a878f6a7c2fc4c1682d580a391623ae1", "score": "0.5757656", "text": "public function getPurchasedQuantity();", "title": "" }, { "docid": "c5dc6239bfe624eada85abebdba218af", "score": "0.5754589", "text": "public function calcCashBackByCode()\n {\n $result = Orders::find()->where(['orders.code_id'=>$this->id, 'orders.status'=>1])\n ->select('sum(orders_items.fee * orders_items.count) as current_cb')\n ->from('`orders`, orders_groups, orders_items')\n ->andWhere(['<=', 'orders.date', Yii::$app->params['promoPeriod'][$this->relatedRecords['type']->period_days]['last_dat']])\n ->andWhere(['>=', 'orders.date', Yii::$app->params['promoPeriod'][$this->relatedRecords['type']->period_days]['first_dat']])\n ->andWhere('orders_groups.order_id = orders.id')\n ->andWhere('orders_items.order_group_id = orders_groups.id')\n ->andWhere(['orders_items.status'=>1])\n ->asArray()->one();\n if(empty($result['current_cb'])){\n return 0;\n }\n else{\n return $result['current_cb'];\n }\n }", "title": "" }, { "docid": "06638acfbf0b60c5d3c214a8a35b36f5", "score": "0.5750129", "text": "public function process_payment( $order_id ) {\n\n\t\t$order = wc_get_order( $order_id );\n\n\t\tif ( $order->get_total() > 0 ) {\n\n\t\t\tif (!empty($this->fee) && !empty(trim($this->fee)) ) {\n\n\t\t\t $value = 0;\n\n\t\t\t if (strpos($this->fee, '%') !== false) {\n\t\t\t\t$value = (floatval( trim( $this->fee, '%' ) ) / 100) * ($order->get_subtotal() - $order->get_total_discount(false));\n\t\t\t } else {\n\t\t\t\t$value = floatval( $this->fee );\n\t\t\t }\n\n\t\t\t // Get the customer country code\n\t\t\t $country_code = $order->get_shipping_country();\n\n\t\t\t // Set the array for tax calculations\n\t\t\t $calculate_tax_for = array(\n\t\t\t\t'country' => $country_code,\n\t\t\t\t'state' => '',\n\t\t\t\t'postcode' => '',\n\t\t\t\t'city' => ''\n\t\t\t );\n\n\t\t\t // Get a new instance of the WC_Order_Item_Fee Object\n\t\t\t $item_fee = new WC_Order_Item_Fee();\n\n\t\t\t $item_fee->set_name( \"Consignado\" ); // Generic fee name\n\t\t\t $item_fee->set_amount( $value ); // Fee amount\n\t\t\t $item_fee->set_tax_class( '' ); // default for ''\n\t\t\t $item_fee->set_tax_status( 'taxable' ); // or 'none'\n\t\t\t $item_fee->set_total( $value ); // Fee amount\n\n\t\t\t // Calculating Fee taxes\n\t\t\t $item_fee->calculate_taxes( $calculate_tax_for );\n\n\t\t\t // Add Fee item to the order\n\t\t\t $order->add_item( $item_fee );\n\n\t\t\t $order->calculate_totals();\n\t\t\t}\n\n\t\t\t$order->update_status( 'on-hold', 'Aguardando pagamento consignado.' );\n\t\t} else {\n\t\t\t$order->payment_complete();\n\t\t}\n\n\t\t// Don't need to remove the cart since this gateway is POS only\n\t\t// WC()->cart->empty_cart();\n\n\t\t// Return thankyou redirect.\n\t\treturn array(\n\t\t\t'result' => 'success',\n\t\t\t'redirect' => '',\n\t\t);\n\t}", "title": "" }, { "docid": "c1d19a8ccc4eb3a47fbc1669226ad194", "score": "0.5745618", "text": "public function providerDeliveryCostRules()\n {\n $data = array();\n\n //add 10 EUR if basket value is between 0 and 100 EUR, once per cart, not stopping further rules\n $data['basket_value_50'][0]['rules'][0] = array(\n 'oxtitle' => 'first',\n 'oxactive' => 1,\n 'oxactivefrom' => '0000-00-00 00:00:00',\n 'oxactiveto' => '0000-00-00 00:00:00',\n 'oxaddsumtype' => 'abs',\n 'oxaddsum' => '10',\n 'oxdeltype' => 'p',\n 'oxparam' => '0',\n 'oxparamend' => '100',\n 'oxfixed' => oxDelivery::CALCULATION_RULE_ONCE_PER_CART,\n 'oxsort' => 100,\n 'oxfinalize' => 0\n );\n\n //add 20 EUR if basket value is between 100 and 200 EUR (what happens at 100 sharp?), once per cart,\n //not stopping further rules\n $data['basket_value_50'][0]['rules'][1] = array(\n 'oxtitle' => 'second',\n 'oxactive' => 1,\n 'oxactivefrom' => '0000-00-00 00:00:00',\n 'oxactiveto' => '0000-00-00 00:00:00',\n 'oxaddsumtype' => 'abs',\n 'oxaddsum' => '20',\n 'oxdeltype' => 'p',\n 'oxparam' => '100',\n 'oxparamend' => '200',\n 'oxfixed' => oxDelivery::CALCULATION_RULE_ONCE_PER_CART,\n 'oxsort' => 200,\n 'oxfinalize' => 0\n );\n\n //add 30 EUR if basket value is between 0 and 200 EUR, once per cart,\n //not stopping further rules\n $data['basket_value_50'][0]['rules'][2] = array(\n 'oxtitle' => 'third',\n 'oxactive' => 1,\n 'oxactivefrom' => '0000-00-00 00:00:00',\n 'oxactiveto' => '0000-00-00 00:00:00',\n 'oxaddsumtype' => 'abs',\n 'oxaddsum' => '30',\n 'oxdeltype' => 'p',\n 'oxparam' => '0',\n 'oxparamend' => '200',\n 'oxfixed' => oxDelivery::CALCULATION_RULE_ONCE_PER_CART,\n 'oxsort' => 300,\n 'oxfinalize' => 0\n );\n\n //amount of articles to purchase\n $data['basket_value_50'][0]['buyamount'] = 5;\n\n //what do we expect as result for shippings costs?\n $data['basket_value_50'][0]['expected_deliverycost'] = 40.0;\n\n //test with same rules once more, change basket value\n $data['basket_value_100'][0]['rules'] = $data['basket_value_50'][0]['rules'];\n $data['basket_value_100'][0]['buyamount'] = 10; //exactly 100 EUR basket value matches all three rules\n $data['basket_value_100'][0]['expected_deliverycost'] = 60.0; //\n\n //test again but set stopper on all rules. first match should stop further calculation.\n $data['basket_value_100_finalize'][0]['rules'] = $data['basket_value_50'][0]['rules'];\n $data['basket_value_100_finalize'][0]['rules'][0]['oxfinalize'] = 1;\n $data['basket_value_100_finalize'][0]['rules'][1]['oxfinalize'] = 1;\n $data['basket_value_100_finalize'][0]['rules'][2]['oxfinalize'] = 1;\n $data['basket_value_100_finalize'][0]['buyamount'] = 10; //exactly 100 EUR basket value matches all three rules\n $data['basket_value_100_finalize'][0]['expected_deliverycost'] = 10.0; //expect first rule to match\n\n return $data;\n }", "title": "" }, { "docid": "9282674e32af6396a836b1f7a8c37651", "score": "0.57346547", "text": "public function pay() {\n $order = $this->order;\n $customer_id = get_current_user_id();\n\n try {\n $this->validate_minimum_order_amount( $order );\n\n $stripe_customer = ! empty( $_POST['dokan_stripe_customer_id'] ) ? wc_clean( wp_unslash( $_POST['dokan_stripe_customer_id'] ) ) : null; // phpcs:ignore WordPress.Security.NonceVerification\n\n $force_save_source = false;\n if ( Helper::is_subscription_order( $order ) || Helper::has_subscription( $order->get_id() ) ) {\n $force_save_source = true;\n }\n $prepared_source = $this->prepare_source( $customer_id, $force_save_source, $stripe_customer );\n $this->validate_source( $prepared_source );\n\n if ( Helper::is_subscription_order( $order ) ) {\n $product_pack = Helper::get_subscription_product_by_order( $order );\n $subscription = dokan()->subscription->get( $product_pack->get_id() );\n\n if ( ! $subscription->is_recurring() ) {\n $currency = strtolower( get_woocommerce_currency() );\n /* translators: 1) site name, 2) Order number */\n $order_desc = sprintf( __( '%1$s - Order %2$s', 'dokan' ), esc_html( get_bloginfo( 'name' ) ), $order->get_order_number() );\n $charge = Charge::create(\n [\n 'amount' => Helper::get_stripe_amount( $order->get_total() ),\n 'currency' => $currency,\n 'description' => $order_desc,\n 'customer' => $prepared_source->customer,\n ]\n );\n\n $order->add_order_note(\n sprintf(\n /* translators: 1) Order number, 2) Payment gateway title 3) stripe charge id */\n __( 'Order %1$s payment completed via %2$s on Charge ID: %3$s', 'dokan' ),\n $order->get_order_number(),\n $this->get_title(),\n $charge->id\n )\n );\n $order->payment_complete();\n }\n\n do_action( 'dokan_process_subscription_order', $order, $prepared_source, $subscription->is_recurring() );\n } else {\n $this->process_seller_payment( $order, $prepared_source );\n }\n } catch ( Exception $e ) {\n /* translators: 1) Error message from stripe */\n $order->add_order_note( sprintf( __( 'Stripe Payment Error: %s', 'dokan' ), $e->getMessage() ) );\n update_post_meta( $order->get_id(), '_dwh_stripe_charge_error', $e->getMessage() );\n wc_add_notice( __( 'Error: ', 'dokan' ) . $e->getMessage(), 'error' );\n return array(\n 'result' => 'fail',\n 'redirect' => '',\n );\n }\n\n $response = [\n 'result' => 'success',\n 'redirect' => $this->get_return_url( $order ),\n ];\n\n return $response;\n }", "title": "" }, { "docid": "db2b7a98ac8ad1e6d920e4039c2ce57d", "score": "0.57331985", "text": "public function processPayment()\n\t {\n\t }", "title": "" }, { "docid": "6e6293294939858de7f36aa98bdf0526", "score": "0.5732962", "text": "function totalCost()\n {\n $total = 0;\n\n foreach ($this->storage->get('cart') as $item)\n {\n $total += $item['price'] * $item['qty'];\n }\n\n return $total;\n }", "title": "" }, { "docid": "b39e32a2fc5d46ddb12a62438d85c34e", "score": "0.5729757", "text": "function processTransferCash($textFinal,$RecipientPhone,$source){\r\n\trequire_once 'PHPSAPGateway.php';\r\n\t$gateway= new PhpSapGateway;\r\n\tglobal $username,$apiKey;\r\n\r\n\t$RecipientPhone = (substr($RecipientPhone, 0, 1) == '0') ? preg_replace('/^0/', '+254', $RecipientPhone) : $RecipientPhone;\r\n\t$RecipientPhone = (substr($RecipientPhone, 0, 3) == '254') ? str_replace('254', '+254', $RecipientPhone) : $RecipientPhone;\r\n\r\n\t$checkBalance=getWalletBalance($source);\r\n\t$verifyRecipient=checkPhoneNumber($RecipientPhone);\r\n\tif ($verifyRecipient==\"FALSE\") {\r\n\t\t# code...\r\n\t\t$response=\"END Sorry recipient phone number is not registred on DevPesa\";\r\n\t}\r\n\telseif ($textFinal>$checkBalance) {\r\n\t\t# code...\r\n\t\t$response=\"END You have insufficient balance to send Ksh \".$textFinal.\"\";\r\n\t}\r\n\telseif ($RecipientPhone==$source) {\r\n\t\t# code...\r\n\t\t$response=\"END Sorry you can not send cash to yourself\";\r\n\t}\r\n\telse{\r\n\t\t//calculate recipient and source balances\r\n\t\t$recipientBalance=getWalletBalance($RecipientPhone);\r\n\t\t$newBalanceRecipient=($recipientBalance+$textFinal);\r\n\t\t$newBalanceSource=($checkBalance-$textFinal);\r\n\r\n\t\t//update wallets table\r\n\t\tsql(\"UPDATE wallets SET available_amount='$newBalanceRecipient' WHERE phone_number='$RecipientPhone'\");\r\n\t\tsql(\"UPDATE wallets SET available_amount='$newBalanceSource' WHERE phone_number='$source'\");\r\n\r\n\t\t//Update transactions table\r\n\t\tsql(\"INSERT INTO transactions SET transaction_type='Transfer Cash',phone_number='$source',destination='$RecipientPhone',amount='$textFinal',new_wallet_balance='$newBalanceSource',`date`='\".date('Y-m-d').\"',`time`='\".date('h:s:a').\"'\");\r\n\t\tsql(\"INSERT INTO transactions SET transaction_type='Received Cash',phone_number='$source',destination='$RecipientPhone',amount='$textFinal',new_wallet_balance='$newBalanceRecipient',`date`='\".date('Y-m-d').\"',`time`='\".date('h:s:a').\"'\");\r\n\r\n\t\t//send SMS to recipient\r\n\t\t$reciverRecipient=$RecipientPhone;\r\n\t\t$messageRecipient=\"You have successfully received Ksh \".$textFinal.\" from \".$source.\" on \".date('Y/m/d h:s:A').\" your new DevPesa wallet balance is Ksh \".$newBalanceRecipient;\r\n\t\tsendSMS($reciverRecipient,$messageRecipient);\r\n\r\n\t\t//send SMS to source\r\n\t\t$reciverSource=$source;\r\n\t\t$messageSource=\"You have successfully sent Ksh \".$textFinal.\" to \".$RecipientPhone.\" on \".date('Y/m/d h:s:A').\" your new DevPesa wallet balance is Ksh \".$newBalanceSource;\r\n\t\tsendSMS($reciverSource,$messageSource);\r\n\r\n\t\t$response=\"END You have successfully sent Ksh \".$textFinal.\" to \".$RecipientPhone;\r\n\t}\r\n\r\n\treturn $response;\r\n}", "title": "" }, { "docid": "1883f863fc08aaa2e9947f30461a7ee4", "score": "0.5704688", "text": "public function applyCartDiscount(OrderInterface $order);", "title": "" }, { "docid": "9b947bf6684ec58e0fb8263f1b371904", "score": "0.5698715", "text": "public function prepareDeliveryByOrder(Order $order)\n {\n\n $deliveryCode = $order->getDelivery()->getDeliveryMode()->getCode();\n\n $user = $order->getUser();\n\n $addressTo = $order->getDeliveryAddress();\n\n $to = array(\n 'pays' => $addressTo->getCountry()->getCode(),\n 'ville' => $addressTo->getCity()->getName(),\n 'type' => ($user->getPro()) ? 'entreprise' : 'particulier',\n 'adresse' => $addressTo->getStreet(),\n 'code_postal' => $addressTo->getCity()->getZipcode()\n );\n\n\n $product = $order->getProduct();\n\n $from = array(\n 'pays' => $product->getAddress()->getCountry()->getCode(),\n 'code_postal' => $product->getAddress()->getCity()->getZipcode(),\n 'ville' => $product->getAddress()->getCity()->getName(),\n 'type' => ($order->getProduct()->getUser()->getPro()) ? 'entreprise' : 'particulier',\n 'adresse' => $product->getAddress()->getStreet()\n );\n\n\n $date = new \\DateTime();\n $date->modify('+1 day');\n\n $additionalParams = array(\n 'collecte' => $date->format(\"Y-m-d\"),\n 'delay' => 'aucun',\n //'offers' => $this->carriersEnabled,\n 'content_code' => 60122,\n 'assurance.selection' => false,\n 'valeur' => $order->getProductAmount(),\n );\n\n $type = 'colis';\n $weight = $product->getWeight() / 1000;\n if ($weight >= 70) {\n $type = 'encombrant';\n }\n\n $parcels = array(\n 'type' => 'colis', // your shipment type: \"encombrant\" (bulky parcel), \"colis\" (parcel), \"palette\" (pallet), \"pli\" (envelope)\n 'dimensions' => []\n );\n\n $quantity = $order->getQuantity();\n for($i = 0; $i < $quantity; $i++) {\n $parcels['dimensions'][] = [\n 'poids' => $product->getWeight() / 1000,\n 'longueur' => $product->getParcelLength(),\n 'largeur' => $product->getParcelWidth(),\n 'hauteur' => $product->getParcelHeight(),\n ];\n }\n\n $lib = new Quotation();\n $lib->getQuotation($from, $to, $parcels, $additionalParams);\n\n\n $this->handlerError($lib);\n\n foreach ($lib->offers as $offer) {\n if ($deliveryCode == $offer['operator']['code'] . $offer['service']['code']) {\n return $offer;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "d614cf96b7b77454a2ac0bbfd83732d7", "score": "0.56927896", "text": "public function courier_delivered()\n\t\t{\n\t\t\t// permittedArea();\n\t\t\ttheme('courier_delivered');\n\t\t}", "title": "" }, { "docid": "4669a4de1037884bbf8df4a7a499374a", "score": "0.5675861", "text": "public function sendOrder(Order $order)\n {\n NostoHelperContext::runWithEachNostoAccount(function () use ($order) {\n // We need to forge the employee in order to get a price for a product\n $employeeId = false; //@codingStandardsIgnoreLine\n if (!is_object(Context::getContext()->employee) && !is_object(Context::getContext()->cart)) {\n //if employee is null and cart is null, new Product() kills the process. (SoNice issue)\n $employeeId = 0;\n }\n NostoHelperContext::runInContext(\n function () use ($order) {\n try {\n $nostoOrder = NostoOrder::loadData($order);\n if (!$nostoOrder instanceof NostoOrder) {\n NostoHelperLogger::info('Not able to load order.');\n return;\n }\n $account = NostoHelperAccount::getAccount();\n if ($account !== null && $account->isConnectedToNosto()) {\n $customerId = NostoCustomerManager::getNostoId($order);\n\n $operation = new NostoSDKOrderConfirmOperation($account);\n $operation->send($nostoOrder, $customerId);\n try {\n if (NostoOrderService::$syncInventoriesAfterOrder === true) {\n $purchasedItems = $nostoOrder->getPurchasedItems();\n $products = array();\n foreach ($purchasedItems as $item) { //@codingStandardsIgnoreLine\n $productId = $item->getProductId();\n if (empty($productId) || $productId < 0) {\n continue;\n }\n $product = new Product($productId);\n if ($product instanceof Product) {\n $products[] = $product;\n }\n }\n $nostoProductOperation = new NostoProductService(); //@codingStandardsIgnoreLine\n $nostoProductOperation->updateBatch($products);\n }\n } catch (Exception $e) {\n NostoHelperLogger::error($e, 'Failed to synchronize products after order');\n }\n }\n } catch (Exception $e) {\n NostoHelperLogger::error($e, 'Failed to send order confirmation');\n }\n },\n false,\n false,\n false,\n $employeeId\n );\n });\n }", "title": "" }, { "docid": "0d2fced7252dfe5337d1450f574df39d", "score": "0.56726444", "text": "public function credit_order() {\n if( ! isset( $_GET[\"security\"] ) )\n return;\n\n if( ! wp_verify_nonce( $_GET[\"security\"], self::CREDIT_NONCE ) ) {\n return;\n }\n\n if( ! isset( $_GET[\"order_id\"] ) ) {\n wp_redirect( admin_url() );\n return;\n }\n\n $order = wc_get_order( $_GET[\"order_id\"] );\n\n if( ! $order ) {\n wp_redirect( admin_url() );\n return;\n }\n\n $svea_order_id = ( $value = get_post_meta( $order->get_id(), \"_svea_order_id\", true ) ) \n ? $value : wc_get_order_item_meta( $order->get_id(), \"svea_order_id\" );\n\n if( ! $svea_order_id || strlen( $svea_order_id ) <= 0 ) {\n wp_redirect( admin_url() );\n return;\n }\n\n if( $order->get_payment_method() === WC_Gateway_Svea_Invoice::GATEWAY_ID ) {\n $wc_invoice = WC_Gateway_Svea_Invoice::init();\n\n $order_item_ids = isset( $_GET[\"order_items\"] ) ? explode(\",\", $_GET[\"order_items\"]) : array();\n\n $result = $wc_invoice->credit_order( $order, $svea_order_id, $order_item_ids );\n\n if( $result[\"success\"] ) {\n WC_Gateway_Svea_Helper::add_admin_notice( \n $result[\"message\"], \n 'updated'\n );\n } else {\n WC_Gateway_Svea_Helper::add_admin_notice( \n $result[\"message\"], \n 'error'\n );\n }\n\n wp_redirect( admin_url( sprintf( 'post.php?post=%s&action=edit', $order->get_id() ) ) );\n } else if ( $order->get_payment_method() === WC_Gateway_Svea_Card::GATEWAY_ID ) {\n $wc_card = WC_Gateway_Svea_Card::init();\n\n $order_item_ids = isset( $_GET[\"order_items\"] ) ? explode(\",\", $_GET[\"order_items\"]) : array();\n\n $result = $wc_card->credit_order( $order, $svea_order_id, $order_item_ids );\n\n if( $result[\"success\"] ) {\n WC_Gateway_Svea_Helper::add_admin_notice( \n $result[\"message\"], \n 'updated'\n );\n } else {\n WC_Gateway_Svea_Helper::add_admin_notice( \n $result[\"message\"], \n 'error'\n );\n }\n\n wp_redirect( admin_url( sprintf( 'post.php?post=%s&action=edit', $order->get_id() ) ) );\n } else if( $order->get_payment_method() === WC_Gateway_Svea_Direct_Bank::GATEWAY_ID ) {\n $wc_direct_bank = WC_Gateway_Svea_Direct_Bank::init();\n\n $order_item_ids = isset( $_GET[\"order_items\"] ) ? explode(\",\", $_GET[\"order_items\"]) : array();\n\n $result = $wc_direct_bank->credit_order( $order, $svea_order_id, $order_item_ids );\n\n if( $result[\"success\"] ) {\n WC_Gateway_Svea_Helper::add_admin_notice( \n $result[\"message\"], \n 'updated'\n );\n } else {\n WC_Gateway_Svea_Helper::add_admin_notice( \n $result[\"message\"], \n 'error'\n );\n }\n\n wp_redirect( admin_url( sprintf( 'post.php?post=%s&action=edit', $order->get_id() ) ) );\n } else {\n wp_redirect( admin_url() );\n }\n }", "title": "" }, { "docid": "cee5b6bb2c9906af25e7a06a09ad81e1", "score": "0.56698453", "text": "public function providerDeliveryCostRulesWithArticleAssigned()\n {\n $data = array();\n\n //add 10 EUR if basket value is between 0 and 100 EUR, once per cart, stopping further rules\n $data['once_per_cart'][0]['rules'][0] = array(\n 'oxtitle' => 'first',\n 'oxactive' => 1,\n 'oxactivefrom' => '0000-00-00 00:00:00',\n 'oxactiveto' => '0000-00-00 00:00:00',\n 'oxaddsumtype' => 'abs',\n 'oxaddsum' => '10',\n 'oxdeltype' => 'p',\n 'oxparam' => '0',\n 'oxparamend' => '100',\n 'oxfixed' => oxDelivery::CALCULATION_RULE_ONCE_PER_CART,\n 'oxsort' => 100,\n 'oxfinalize' => 1\n );\n\n //add 20 EUR if basket value is between 200 and 600 EUR (what happens at 100 sharp?), once per cart,\n //stopping further rules\n $data['once_per_cart'][0]['rules'][1] = array(\n 'oxtitle' => 'second',\n 'oxactive' => 1,\n 'oxactivefrom' => '0000-00-00 00:00:00',\n 'oxactiveto' => '0000-00-00 00:00:00',\n 'oxaddsumtype' => 'abs',\n 'oxaddsum' => '20',\n 'oxdeltype' => 'p',\n 'oxparam' => '200',\n 'oxparamend' => '600',\n 'oxfixed' => oxDelivery::CALCULATION_RULE_ONCE_PER_CART,\n 'oxsort' => 200,\n 'oxfinalize' => 1\n );\n\n //add 30 EUR if basket value is between 0 and 600 EUR, once per cart,\n //stopping further rules\n $data['once_per_cart'][0]['rules'][2] = array(\n 'oxtitle' => 'third',\n 'oxactive' => 1,\n 'oxactivefrom' => '0000-00-00 00:00:00',\n 'oxactiveto' => '0000-00-00 00:00:00',\n 'oxaddsumtype' => 'abs',\n 'oxaddsum' => '30',\n 'oxdeltype' => 'p',\n 'oxparam' => '0',\n 'oxparamend' => '600',\n 'oxfixed' => oxDelivery::CALCULATION_RULE_ONCE_PER_CART,\n 'oxsort' => 300,\n 'oxfinalize' => 1\n );\n\n //amount of articles to purchase\n $data['once_per_cart'][0]['buyamount'] = 10;\n\n //what do we expect as result for shippings costs?\n $data['once_per_cart'][0]['expected_delivery_costs'] = 10.0;\n\n //which rule should fit the basket\n $data['once_per_cart'][0]['fits'] = array('first', 'third');\n\n $data['once_per_product'][0] = $data['once_per_cart'][0];\n $data['once_per_product'][0]['rules'][0]['oxfixed'] = 1;\n $data['once_per_product'][0]['rules'][1]['oxfixed'] = 1;\n $data['once_per_product'][0]['rules'][2]['oxfixed'] = 1;\n\n return $data;\n }", "title": "" }, { "docid": "26759e55c27c9f7f0f1759c3c3aec9a3", "score": "0.5657003", "text": "public function actionGenerateBill(){\n $finalProducts = Yii::$app->session->get('products');\n if(!$finalProducts){\n Yii::$app->session->setFlash('error', 'Add product to cart first.');\n return $this->redirect(['store/view-stock']);\n }\n $totalCost = 0;\n foreach ($finalProducts as $value) {\n $product = Stock::find()\n ->where(['product_id' => $value['product_id']])\n ->one();\n $product->units -= $value['quantity'] ;\n $product->save();\n unset($product);\n $totalCost += ($value['quantity']*$value['price_per_unit']);\n }\n \n if($totalCost == (Yii::$app->session->get('cost'))){\n //generate bill pdf\n //reset session vars\n //redirect back\n }\n echo '<pre>';print_r(Yii::$app->session->get('cost'));die;\n }", "title": "" }, { "docid": "3222ac737eba40aa6be0083d98c373a6", "score": "0.56482476", "text": "public function totalCost()\n\t{\n\t\t$cost = [];\n\t\tforeach($this->items as $order)\n\t\t{\n\t\t\t$cost[] = $order->getCost();\n\t\t}\n\n\t\treturn '$'.number_format(array_sum($cost), 2);\n\t}", "title": "" }, { "docid": "151a5cbd913175c5e445c28175acd301", "score": "0.56439006", "text": "function trade()\n {\n global $userInfo,$total,$rows,$CONNECTION_TIMEOUT;\n//----\n $res='';\n if(!empty($_SESSION['mq_l']))\n {\n $login =substr((int)$_SESSION['mq_l'],0,14);\n $password=substr($_SESSION['mq_p'],0,16);\n\n $res=MQ_Query('USERINFO-login='.$login.'|password='.$password,T_CACHEDIR,T_CACHETIME,$login.'/');\n\n if($res=='!!!CAN\\'T CONNECT!!!')\n {\n $CONNECTION_TIMEOUT=true;\n return;\n }\n }\n//---- If error or invalid/disabled login then logout\n if(empty($res) || strpos($res,'Invalid')!==false || strpos($res,'Disabled')!==false) MQ_Logout();\n\n $info=explode(\"\\r\\n\",$res);\n $size=sizeof($info);\n\n $userInfo['account']=$info[0];\n $userInfo['name'] =$info[1];\n $userInfo['2'] =$info[2];\n\n $beginIndex = 3;\n\n $equity=getParam($info[$beginIndex+1]);\n $margin=getParam($info[$beginIndex+2]);\n\n $margin_level=$margin!=0 ? ($equity/$margin) : 0;\n\n $total =array(\n 'balance' =>getParam($info[$beginIndex]),\n 'equity' =>$equity,\n 'margin' =>$margin,\n 'free_margin' =>getParam($info[$beginIndex+3]),\n 'margin_level'=>number_format(100*$margin_level,2,'.','').'%',\n );\n $rows=array();\n//---- list of open orders\n $cnt=0;\n for($i=$beginIndex+4;$i<$size;$i++)\n {\n if($info[$i]==='0') break;\n $row = explode(\"\\t\",$info[$i]);\n $rows[]=array(\n 'icon_img' =>strpos($row[2],'buy')===false?'sell':'buy',\n 'bgcolor' =>$cnt%2?'#e0e0e0':'#ffffff',\n 'order' =>$row[0],\n 'time' =>$row[1],\n 'type' =>$row[2],\n 'lots' =>$row[3],\n 'symbol' =>strtolower($row[4]),\n 'start_price'=>$row[5],\n 'S/L' =>$row[6],\n 'T/P' =>$row[7],\n 'price' =>$row[8],\n 'comm' =>$row[9],\n 'swap' =>$row[10],\n 'profit' =>$row[11],\n );\n ++$cnt;\n }\n $rows[]=null;\n//---- profit\n $profit = getParam($info[$i+3]);\n if($profit==0) $profit_img='stop';\n else $profit_img=$profit>0?'up':'down';\n $total['profit'] =$profit;\n $total['profit_img']=$profit_img;\n//---- list of pending orders\n for($i+=4;$i<$size;$i++)\n {\n if($info[$i]==='0') break;\n $row = explode(\"\\t\",$info[$i]);\n $rows[]=array(\n 'icon_img' =>strpos($row[2],'buy')===false?'sell':'buy',\n 'bgcolor' =>$cnt%2?'#e0e0e0':'#ffffff',\n 'order' =>$row[0],\n 'time' =>$row[1],\n 'type' =>$row[2],\n 'lots' =>$row[3],\n 'symbol' =>strtolower($row[4]),\n 'start_price'=>$row[5],\n 'S/L' =>$row[6],\n 'T/P' =>$row[7],\n 'price' =>$row[8],\n );\n }\n}", "title": "" }, { "docid": "aab81f494c3453ad78ee8d73f10ad3b6", "score": "0.5632598", "text": "public function execute(\\Magento\\Framework\\Event\\Observer $observer)\n {\n if(!$this->_helper->getConfig('general_settings/enable'))\n return;\n\n $creditmemo = $observer->getEvent ()->getCreditmemo ();\n $order = $creditmemo->getOrder ();\n $priceOrder = $order->getBaseSubtotal();\n $orderStt = $order->getStatus();\n $orderId = $order->getEntityId();\n\n $closed_order_status = 'closed';\n\n if($orderStt == $closed_order_status){\n # get orderData in transaction table\n $orderCancel = $this->_helper->getDataOrderAffiliate($order->getIncrementId());\n if (!empty($orderCancel)) {\n foreach ($orderCancel as $orderData) {\n $affiliate_code = $orderData['affiliate_code'];\n # 1 - update status or order in table transaction\n $dataCancel = array(\n 'order_id' => $orderId,\n 'increment_id' => $order->getIncrementId(),\n 'transaction_stt' => $closed_order_status,\n 'order_status' => $closed_order_status,\n 'is_active' => 1\n );\n $this->_helper->updateTransactionOrder($dataCancel);\n\n $this->_helper->cancelBalanceAffiliate($affiliate_code, $orderData['commission_total']);\n \n $this->_helper->saveDataCommissionCancel($affiliate_code, $priceOrder, $orderData['commission_total']);\n\n// try {\n// # 5 - send mail report user affiliate\n// $emailidentifier = self::EMAIL_IDENTIFIER_CANCEL;\n// $emailTo = $orderData['email_aff'];\n// $emailFrom = $this->_helper->getConfig('general_settings/sender_email_identity');\n// $templateVar = array(\n// 'name' => $orderData['customer_email']\n// );\n// $emailidentifier = self::EMAIL_IDENTIFIER_CANCEL;\n// $this->_helper->sendMail($emailFrom,$emailTo,$emailidentifier,$templateVar);\n// } catch (Exception $e) {\n// $this->messageManager->addException($e, __('You can\\'t send a request.'));\n// }\n }\n }\n }\n // end\n }", "title": "" }, { "docid": "a5f3d18c9bd623d2c1a40aab16e7d044", "score": "0.5631363", "text": "public function execute(\\Magento\\Framework\\Event\\Observer $observer)\n {\n /** @var $orderInstance Order */\n $order = $observer->getEvent()->getOrderIds();\n $orderId = $order[0];\n $this->_coreSession->start();\n $this->coinId = $this->_coreSession->getCoinid(); //$_SESSION['coin_id'];\n // $this->coinId = $_SESSION['coin_id'];\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance(); \n $orderObject = $objectManager->create('Magento\\Sales\\Model\\Order')->load($orderId);\n $lastOrderId = $orderObject->getIncrementId();\n $this->orderTotal = $orderObject->getGrandTotal();\n $payment_method_code = $orderObject->getPayment()->getMethodInstance()->getCode();\n // // getting data from file\n // $fileSystem = $objectManager->create('\\Magento\\Framework\\Filesystem');\n // $mediaPath=$fileSystem->getDirectoryRead(\\Magento\\Framework\\App\\Filesystem\\DirectoryList::MEDIA)->getAbsolutePath();\n if ($payment_method_code == 'cointopay_gateway') {\n $response = $this->sendCoins($lastOrderId);\n // $_SESSION['cointopay_response'] = $response;\n $this->_coreSession->setCointopayresponse($response);\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance(); \n $customerSession = $objectManager->get('Magento\\Customer\\Model\\Session');\n $customerSession->setCoinresponse($response); //set value in customer session\n $orderresponse = $this->_jsonDecoder->decode($response);\n $orderObject->setExtOrderId($orderresponse['TransactionID']);\n $orderObject->save();\n }\n }", "title": "" }, { "docid": "18554ada8b9eebaa5d0579cea514447f", "score": "0.5629833", "text": "public function actionPaymentResults()\n {\n// $log->pushHandler(new StreamHandler($_SERVER['DOCUMENT_ROOT'].'/error.log', Logger::ERROR));\n//\n// $tmp = '111112123';\n// $model = new OrdersCash();\n// $model->user_id = 1;\n// $model->order_id = 'id_5f6da3046bda66.18621041_1';\n// $model->usd = '777.77';\n// $model->amount = 77;\n// $model->date = date('Y-m-d H-i-s');\n// $model->is_paid = 0;\n// $model->save();\n// //$model->validate();\n// //var_dump($model->errors);exit();\n//\n// $post['us_userid'] = 1;\n// $post['us_usd'] = 1;\n// $post['MERCHANT_ORDER_ID'] = $tmp;\n// $post['AMOUNT'] = 777;\n try\n {\n// $log->error(\"POST DATA: \".implode(Yii::$app->request->post()));\n $curr_date = new DateTime(date(\"Y-m-d H:i:s\"));\n\n $post = Yii::$app->request->post();\n\n $sign = FreeCassa::generateSign($post['AMOUNT'],FreeCassa::SECRET_2, $post['MERCHANT_ORDER_ID']);\n if ($sign == $post['SIGN'])\n //if (true)\n {\n $user = $post['us_userid'];\n\n if (isset($post['us_caseid'])) {\n $case = Cases::findOne(['id' => $post['us_caseid']]);\n if ($post['AMOUNT'] == $case->price) {\n $balance = Balance::findOne(['user_id' => $user]);\n $balance->addBalance($case->likes, $case->views);\n History::create(\n $user,\n History::TRANSFER_TO_BALANCE,\n $case->likes,\n $case->views,\n \"Применен пакет {$case->name}!\"\n );\n } else {\n throw new \\Exception(\"Wrong amount!\");\n }\n } elseif (isset($post['us_usd'])) {\n\n $order = OrdersCash::findOne(['order_id' => $post['MERCHANT_ORDER_ID'], 'is_paid' => 0]);\n if ($order) {\n $is_correct_amount = $order->amount == $post['AMOUNT'];\n\n// $log->error(\"is_correct_amount: \". (string)$is_correct_amount);\n\n $exponent = intval(Settings::getSetting('balance_exponent'));\n $order_usd = intval(round(floatval($order->usd), 6) * $exponent);\n// $log->error(\"order_usd: \". (string) $order_usd);\n $post_usd = intval(round(floatval($post['us_usd']), 6) * $exponent);\n// $log->error(\"post_usd: \". (string) $post_usd);\n\n// var_dump($order_usd);\n// var_dump($post_usd);\n// exit();\n\n $is_correct_usd = $order_usd == $post_usd;\n// $log->error(\"is_correct_usd: \". (string) $is_correct_usd);\n\n //$is_correct_usd = true;\n $order_date = new DateTime($order->date);\n $expire_days = intval(Settings::getSetting('expiration_days'));\n $is_still_valid = $curr_date->diff($order_date)->days < $expire_days;\n if ($is_correct_amount) {\n if ($is_correct_usd) {\n if ($is_still_valid) {\n $balance = BalanceCash::findOne(['user_id' => $user]);\n// $amount = $post['us_usd'] * $exponent;\n $amount = $post['us_usd'] * $exponent;\n $balance->addBalance($amount);\n $order->is_paid = 1;\n $order->save();\n// $log->error(\"IS_PAID: \".$order->is_paid);\n// $log->error(\"USER ID: \".$user);\n// $log->error(\"AMOUNT: \".$amount);\n// $log->error(\"post[us_usd]: \".$post['us_usd']);\n\n HistoryCash::create(\n $user,\n HistoryCash::TRANSFER_TO_BALANCE,\n $amount,\n \"Пополнено на \" . $post['us_usd'] . '$'\n );\n\n $messenger = new TelegramApiServices(Yii::$app->params['telegram_api_url']);\n $messenger->sendTelegramMessage(Yii::$app->name,\n \"<b>Новая оплата!</b>\\n<b>Сумма: </b>\" . $amount / $exponent. \"\\n\");\n } else {\n throw new \\Exception(\"Order has expired!\");\n }\n } else {\n throw new \\Exception(\"Incorrect usd amount! {$order->usd} - {$post['us_usd']}\");\n }\n } else {\n throw new \\Exception(\"Order has expired!\");\n }\n } else {\n throw new \\Exception(\"Non-existing order!\");\n }\n } else {\n throw new \\Exception(\"Wrong parameters!\");\n }\n } else {\n throw new \\Exception(\"Wrong sign!\");\n }\n\n }\n catch(\\Exception $e)\n {\n echo $e->getMessage();\n }\n }", "title": "" }, { "docid": "396e9db7663a1143432e8fe3982effce", "score": "0.5622086", "text": "public function execute(Observer $observer)\n {\n $cart = $observer->getCart();\n $quote = $this->checkoutSession->getQuote();\n $cart->addCustomItem(__('Payment Fee'), 1, $quote->getBasePaymentFee(), 'paymentfee');\n }", "title": "" }, { "docid": "40cc7961f3ca6fb4848e2a2739ff77fd", "score": "0.56214577", "text": "public function checkout() {\n // ==================================================================================\n // as suggested by stripe, we can manually update order status to pending for review and confirmation by seller/admin\n $order = new Order;\n //we need to make sure that the user that's trying to checkout is logged in. else, we would encounter an error with Auth::user\n $order->user_id = Auth::user()->id;\n $order->status_id = 1; //all orders should have a default status pending\n $order->total = 0;\n $order->save();\n\n $total=0;\n // dd($order);\n // dd(Session::get('cart'));\n foreach(Session::get('cart') as $item_id => $quantity) {\n // dd(Session::get('cart'));\n // dd($order);\n\n //items()->attach() is a function that allows us to insert the item to the item_order table for that specific order_id along with any other columns that we want to include, in this case, the quantity column\n $order->items()->attach($item_id, ['quantity'=>$quantity]);\n //attach means insert to the pivot table\n //syntax attach(yung other fk, [other columns we want to include in the associative array])\n\n //update order total\n $item = Item::find($item_id);\n $total += $item->price * $quantity;\n }\n //save the the total to the current order\n $order->total = $total;\n $order->save();\n \n //remove the current session cart and return to catalog\n Session::forget('cart');\n return view('orders.order_confirmation', compact('order'));\n // return a view page that displays transaction summary, transaction number and thank you message.\n }", "title": "" }, { "docid": "64da8883512f9debefea75754127c546", "score": "0.56200725", "text": "public function order($card, $cost) {\n $order = $this->model(\"Cart\");\n $order->placeOrder($_SESSION[\"email\"], $card, $cost);\n\n $this->view(\"vwThanks\");\n }", "title": "" }, { "docid": "fa0c75956d7e58dbb88c374494124e13", "score": "0.5613678", "text": "public function getCartShippingCosts();", "title": "" }, { "docid": "677fbb22f9e2074b52b4a34518979fe3", "score": "0.56045085", "text": "public function actionOrderPayment() {\n if (Wizard2::getActiveStepName() == Wizard2::VIEW_CONFIRMATION) {\n Wizard2::redirectCurrent(); //keep the user on confirmation page\n }\n\n //check user can access this page\n Wizard2::handleClientSecurity2();\n\n //get current quote and client\n $quote = Session::getSelectedValidQuote();\n $client = Session::getClient();\n $errorMessages = '';\n\n //check amount to pay\n //1st convert quote to booking\n if ($quote instanceof HourlyQuoteSimpleForm || $quote instanceof BookingHourlyOneDayForm || $quote instanceof BookingHourlyRegularlyForm) {\n $booking = $quote->convertBookingHourly();\n }\n\n //check payment\n $payment = $booking->calculatePayment(Constants::USER_CLIENT, $client->id);\n\n if ($payment['toPay']->amount == 0 && $payment['paidCredit']->amount == 0) {\n //should never happen\n assert(false);\n }\n\n if ($payment['toPay']->amount == $payment['paidCredit']->amount) {\n $paymentType = Constants::PAYMENT_VOUCHER_ONLY;\n $creditCardNeeded = false;\n $creditCardValid = true;\n $creditCard = null;\n //$billingAddress = $creditCard->address;\n } elseif ($payment['paidCredit']->amount == 0) {\n $creditCardNeeded = true;\n $paymentType = Constants::PAYMENT_CARD_ONLY;\n } elseif ($payment['toPay']->amount != 0 && $payment['paidCredit']->amount != 0) {\n $creditCardNeeded = true;\n $paymentType = Constants::PAYMENT_CARD_AND_VOUCHER;\n } else {\n assert(false);\n }\n\n $creditCard = Session::getCreditCard();\n $firstTime = Session::getPaymentPageFirstTime();\n\n $client->setScenario(Client::SCENARIO_PAYMENT_CLIENT);\n\n $existingCreditCards = CreditCard::getCreditCard(Yii::app()->user->id, Constants::DATA_MASTER);\n\n if ($client->wizard_completed == Wizard2::CLIENT_LAST_STEP_INDEX) {\n $returningClient = true;\n } else {\n $returningClient = false;\n }\n\n $selectedCreditCardRadioButton = Session::getCreditCardRadioButton();\n\n if ($firstTime) {\n\n //init cards\n\n $creditCard = new CreditCard();\n Session::setCreditCard($creditCard);\n\n if ($returningClient && count($existingCreditCards) > 0) {\n $firstCard = $existingCreditCards[0];\n $selectedCreditCardRadioButton = $firstCard->id;\n } else {\n $selectedCreditCardRadioButton = '';\n }\n Session::setCreditCardRadioButton($selectedCreditCardRadioButton);\n Session::setPaymentPageFirstTime(false);\n } else {\n\n //GOING NEXT SCREEN\n $clientParam = Yii::app()->request->getPost('Client');\n if (isset($clientParam)) {\n\n //check if payment is alloweds\n if (Yii::app()->params['test']['allowClientPayment'] == false) {\n\n throw new CHttpException(403, Yii::t('texts', 'PAYMENT_DISABLED'));\n }\n\n //collect Client data\n $mobilePhone = $clientParam['mobile_phone'];\n $firstName = $clientParam['first_name'];\n $lastName = $clientParam['last_name'];\n\n $client->first_name = $firstName;\n $client->last_name = $lastName;\n $client->mobile_phone = $mobilePhone;\n\n if (!$returningClient) {\n $termsConditions = $clientParam['terms_conditions'];\n $client->terms_conditions = $termsConditions;\n }\n\n $clientValid = $client->validate();\n $err = $client->errors;\n\n Session::setClient($client);\n\n if ($creditCardNeeded) { //collect credit card input\n $radioParam = Yii::app()->request->getPost('radio_button_credit_card');\n\n if (!isset($radioParam) || (isset($radioParam) && $radioParam == UIConstants::RADIO_BUTTON_CREDIT_CARD_OTHER)) {\n\n //collect new credit card data\n $creditCard = new CreditCard();\n\n $data = $_POST['CreditCard'];\n $creditCard->attributes = $data;\n\n $month = $_POST['Month'];\n $year = $_POST['Year'];\n\n $creditCard->setExpiryDate($month, $year);\n $creditCardValid = $creditCard->validate();\n\n if (isset($radioParam)) {\n Session::setCreditCardRadioButton($radioParam);\n }\n } else {\n $creditCardId = $radioParam;\n CreditCard::authorizeClient($creditCardId);\n $creditCardEncrypted = CreditCard::loadModel($creditCardId);\n $creditCard = $creditCardEncrypted->getDecryptedTemporaryInstance();\n $num = $creditCard->card_number;\n $creditCardValid = true;\n Session::setCreditCardRadioButton($radioParam);\n }\n } else {\n //for legacy reason a credit card must be used for a booking, even if voucher\n if (isset($existingCreditCards[0])) {\n $creditCard = $existingCreditCards[0];\n }\n }\n\n Session::setCreditCard($creditCard);\n\n if ($_REQUEST['nav'] === 'back') {\n Wizard2::redirectPrevious();\n } else {\n\n //save data\n $client->save();\n\n //update header name\n Yii::app()->user->setState('full_name', $client->first_name . ' ' . $client->last_name);\n\n $serviceLocationId = Session::getSelectedServiceLocation();\n\n //Billing address is ServiceLocation, make a copy\n $billingAddress = Address::copy($serviceLocationId, Address::TYPE_BILLING_ADDRESS);\n $billingAddressValid = $billingAddress->validate();\n\n if ($billingAddressValid && $creditCardValid && $clientValid) {\n\n //CREDIT CARD AND BILLING OK - CONTINUE\n //Calculate payment\n $payment = $booking->calculatePayment(Constants::USER_CLIENT, $client->id);\n\n $price = $payment['paidCash'];\n\n if ($price->amount > 0) {\n\n if (Yii::app()->params['test']['paymentTest'] == false) {\n $environment = IPaymentHandler::ENVIRONMENT_LIVE;\n } else {\n $environment = IPaymentHandler::ENVIRONMENT_TEST;\n }\n $paymentHandler = BorgunHandler::getInstance($environment);\n $technicalSuccess = $paymentHandler->doDirectPayment($client, $creditCard, $billingAddress, $price);\n } else {\n $technicalSuccess = true;\n $transactionRef = null;\n }\n\n if ($technicalSuccess) {\n\n if (isset($paymentHandler)) {\n $transactionRef = $paymentHandler->getTransactionRef();\n $transactionDateBorgun = $paymentHandler->getTransactionDate();\n $transactionDate = Calendar::convert_BorgunDateTimeShortYear_DBDateTime($transactionDateBorgun);\n $success = $paymentHandler->isTransactionSuccessful();\n } else {\n //no payment to do\n $success = true;\n $transactionDate = null;\n }\n\n if ($success) {\n\n $carerId = Session::getSelectedCarer();\n\n //Get service users\n $serviceUserIds = Session::getSelectedServiceUsers();\n $serviceLocationId = Session::getSelectedServiceLocation();\n\n $billingAddressId = $serviceLocationId;\n\n //handle booking\n $newBooking = BookingHandler::handleBooking($booking, $client->id, $serviceUserIds, $serviceLocationId, $carerId, $billingAddressId, $creditCard, $transactionRef, $transactionDate);\n\n //get conversation\n $conversation = Conversation::getConversation($client->id, $carerId);\n $conversation->createBookingMessage($newBooking);\n\n //create a new message type booking\n //store booking id\n //Session::setNewBookingId($bookingId);\n //clear selected carers\n //Session::setSelectedCarers(null);\n //update the login name\n //Yii::app()->user->setState('full_name', $client->first_name . ' ' . $client->last_name);\n //\n ClientReferral::creditReferrer($client);\n\n Wizard2::redirectNext();\n } else {\n $errorMessage = $paymentHandler->getPaymentMessage();\n\n Yii::app()->user->setFlash('error', $errorMessage);\n Wizard2::redirectCurrent();\n }\n } else {\n //show error message\n $errorMessage = $paymentHandler->getLongErrorMessage();\n\n if ($errorMessage == null || $errorMessage == '') {\n $errorMessage = 'Payment error, probably no internet connection.';\n }\n\n Yii::app()->user->setFlash('error', $errorMessage);\n Wizard2::redirectCurrent();\n }\n } else {\n Wizard2::redirectCurrent();\n }\n }\n } else {\n\n if (Session::getShowErrors()) {\n $client->validate();\n $creditCard->validate();\n } else {\n $client->clearErrors();\n $creditCard->clearErrors();\n }\n Session::setShowErrors(false);\n }\n }\n\n $id = $client->id;\n\n $this->render('orderPayment', array('quote' => $quote, 'client' => $client, 'returningClient' => $returningClient,\n 'creditCard' => $creditCard, 'existingCreditCards' => $existingCreditCards, 'errorMessages' => $errorMessages,\n 'selectedCreditCardRadioButton' => $selectedCreditCardRadioButton, 'paymentType' => $paymentType\n ));\n }", "title": "" }, { "docid": "ef6da93118c95d88f42d89e4df3795fe", "score": "0.56011605", "text": "public function cms_self_delivery($cid)\n{\n\t\t\t//permittedArea();\n\t\t\t$data['res'] = singleDbTableRow1($cid,'cms_courier');\n\t\t\t$data['cms_delivery_status'] = singleDbTableRow1($cid,'cms_delivery_status');\n\n\n\n\n\t\t\tif($this->input->post())\n\t\t\t{\n\t\t\tif($this->input->post('submit') == 'delivered') \n\t\t\t{\n\t\t\t$this->form_validation->set_rules('status', 'Status', 'required|trim');\n\t\t\t$this->form_validation->set_rules('cons_no', 'Status', 'required|trim');\n\t\t\t//Delivery Charges to Delevery executive from CMS Manager Accounts Manager\n\n\t\t\tif($this->form_validation->run() == true)\n\t\t\t{\n\t\t\t\t\t$biz_id = 5;\t\n\t\t\t\t\t$user_info = $this->session->userdata('logged_user');\n\t\t\t\t\t$user_id = $user_info['user_id'];\n\t\t\t\t\t$currentUser = singleDbTableRow($user_id)->role;\n\t\t\t\t\t$referral_code = singleDbTableRow($user_id)->referral_code;\n\t\t\t\t\t$rolename = singleDbTableRow($user_id)->rolename;\n\t\t\t\t\t$shipping_cost = $this->input->post('shipping_cost');\n\t\t\t\t\t$pay_by_referral_code = singleDbTableRow($biz_id,'business_groups')->payment_reciever; // Sender's referral_code, ex : 5559990001\n\t\t\t\t\t$pay_to_referral_code = $referral_code; // Receiver's referral_code, ex : 5164830972\n\t\t\t\t\t$amount_to_pay = $shipping_cost; // Total amont to pay (or) transfer, ex : 100\n\t\t\t\t\t$pay_spec_type = singleDbTableRow($biz_id,'business_groups')->pay_type; // Pay Type, ex : 66(SMB Consumer to Company), 73(\"CMS\" Consumer to Company)\n\t\t\t\t\t$transaction_remarks = 'Paid For Successfully Delivery'; // remarks to insert into invoice table, ex : \"Transfer Values\";\n\t\t\t\t\t$pm_mode = 'wallet'; // points_mode, ex : wallet, loyality, discount.\n\n\n\t\t\t\t\t$make_payment = $this->payment_model->make_my_payment($pay_by_referral_code, $pay_to_referral_code, $amount_to_pay, $pay_spec_type, $transaction_remarks, $pm_mode);\n\n\n\t\t\t\t\t$insert = $this->courier_model->delivered_self();\n\t\t\t\t\t$this->session->set_flashdata('successMsg', 'Courier Pickup/ Delivered Successfully!');\n\t\t\t\t\tredirect(base_url('courier/courier_delivered'));\n\t\t\t}\n\n\t\t\t}\telseif($this->input->post('submit') == 'delivered2') {\n\t\t\t\t\t$this->form_validation->set_rules('status', 'status', 'required|trim');\n\n\n\t\t\t\t\tif($this->form_validation->run() == true)\n\t\t\t\t\t{\n\t\t\t\t\t\t$biz_id = 5;\t\n\t\t\t\t\t\t$user_info = $this->session->userdata('logged_user');\n\t\t\t\t\t\t$user_id = $user_info['user_id'];\n\t\t\t\t\t\t$currentUser = singleDbTableRow($user_id)->role;\n\t\t\t\t\t\t$referral_code = singleDbTableRow($user_id)->referral_code;\n\t\t\t\t\t\t$shipping_cost = $this->input->post('shipping_cost');\n\t\t\t\t\t\t//Delivery Charges to Delevery executive from CMS Manager Accounts Manager\n\t\t\t\t\t\t$pay_by_referral_code = singleDbTableRow($biz_id,'business_groups')->payment_reciever; // Sender's referral_code, ex : 5559990001\n\t\t\t\t\t\t$pay_to_referral_code = $referral_code; // Receiver's referral_code, ex : 5164830972\n\t\t\t\t\t\t$amount_to_pay = $shipping_cost; // Total amont to pay (or) transfer, ex : 100\n\t\t\t\t\t\t$pay_spec_type = singleDbTableRow($biz_id,'business_groups')->pay_type; // Pay Type, ex : 66(SMB Consumer to Company), 73(\"CMS\" Consumer to Company)\n\t\t\t\t\t\t$transaction_remarks = 'Paid For Successfully Delivery'; // remarks to insert into invoice table, ex : \"Transfer Values\";\n\t\t\t\t\t\t$pm_mode = 'wallet'; // points_mode, ex : wallet, loyality, discount.\n\n\n\t\t\t\t\t\t$make_payment = $this->payment_model->make_my_payment($pay_by_referral_code, $pay_to_referral_code, $amount_to_pay, $pay_spec_type, $transaction_remarks, $pm_mode);\n\n\n\t\t\t\t\t\t$insert = $this->courier_model->delivered_others();\n\n\t\t\t\t\t\t$this->session->set_flashdata('successMsg', 'Courier Pickup/ Delivered Successfully!');\n\t\t\t\t\t\tredirect(base_url('courier/courier_delivered'));\n\t\t\t\t\t}\n\n\t\t\t}\n\t\t\t}\n\t\t\ttheme('cms_self_delivery',$data);\n}", "title": "" }, { "docid": "2f895c523ac9f8b8935ef01518e60355", "score": "0.5598173", "text": "public function getServiceDeliveryCalculation()\n {\n return $this->doRequest();\n }", "title": "" }, { "docid": "3b7612062b4b0d6590dd19d4ec8f7fc2", "score": "0.55936426", "text": "public function delivered_succesful($cid)\n{\n\t\t//permittedArea();\n\t\t$data['res'] = singleDbTableRow1($cid,'cms_courier');\n\t\t$data['cms_delivery_status'] = singleDbTableRow1($cid,'cms_delivery_status');\n\n\n\n\t\tif($this->input->post())\n\t\t{\n\t\tif($this->input->post('submit') == 'delivered') \n\t\t{\n\t\t\t\t$this->form_validation->set_rules('status', 'Status', 'required|trim');\n\t\t\t\t//Delivery Charges to Delevery executive from CMS Manager Accounts Manager\n\n\t\t\t\tif($this->form_validation->run() == true)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t$user_info = $this->session->userdata('logged_user');\n\t\t\t\t$user_id = $user_info['user_id'];\n\t\t\t\t$currentUser = singleDbTableRow($user_id)->role;\n\t\t\t\t$referral_code = singleDbTableRow($user_id)->referral_code;\n\t\t\t\t$rolename = singleDbTableRow($user_id)->rolename;\n\t\t\t\t$shipping_cost = $this->input->post('shipping_cost');\n\t\t\t\t\n\t\t\t\t$biz_id = 5;\n\t\t\t\t$pay_by_referral_code = singleDbTableRow($biz_id,'business_groups')->payment_reciever; // Sender's referral_code, ex : 5559990001\n\t\t\t\t$pay_to_referral_code = $referral_code; // Receiver's referral_code, ex : 5164830972\n\t\t\t\t$amount_to_pay = $shipping_cost; // Total amont to pay (or) transfer, ex : 100\n\t\t\t\t$pay_spec_type = singleDbTableRow($biz_id,'business_groups')->pay_type; // Pay Type, ex : 66(SMB Consumer to Company), 73(\"CMS\" Consumer to Company)\n\t\t\t\t$transaction_remarks = 'Paid For Successfully Delivery'; // remarks to insert into invoice table, ex : \"Transfer Values\";\n\t\t\t\t$pm_mode = 'wallet'; // points_mode, ex : wallet, loyality, discount.\n\n\n\t\t\t\t$make_payment = $this->payment_model->make_my_payment($pay_by_referral_code, $pay_to_referral_code, $amount_to_pay, $pay_spec_type, $transaction_remarks, $pm_mode);\n\n\n\t\t\t\t$insert = $this->courier_model->delivered_self();\n\t\t\t\t$this->session->set_flashdata('successMsg', 'Courier Pickup/ Delivered Successfully!');\n\t\t\t\tredirect(base_url('courier/courier_delivered'));\n\t\t\t\t}\n\n\t\t}elseif($this->input->post('submit') == 'delivered2') {\n\t\t$this->form_validation->set_rules('status', 'status', 'required|trim');\n\n\n\t\tif($this->form_validation->run() == true)\n\t\t{\n\t\t\t\t$user_info = $this->session->userdata('logged_user');\n\t\t\t\t$user_id = $user_info['user_id'];\n\t\t\t\t$currentUser = singleDbTableRow($user_id)->role;\n\t\t\t\t$referral_code = singleDbTableRow($user_id)->referral_code;\n\t\t\t\t// If Current role is vendor counter delivery Payment for shipment cost will not be charged.\n\t\t\t\t$rolename = singleDbTableRow($user_id)->rolename;\n\t\t\t\t$biz_id = 5;\n\t\t\t\t$shipping_cost = $this->input->post('shipping_cost');\n\t\t\t\t//Delivery Charges to Delevery executive from CMS Manager Accounts Manager\n\t\t\t\t$pay_by_referral_code = singleDbTableRow($biz_id,'business_groups')->payment_reciever; // Sender's referral_code, ex : 5559990001\n\t\t\t\t$pay_to_referral_code = $referral_code; // Receiver's referral_code, ex : 5164830972\n\t\t\t\t$amount_to_pay = $shipping_cost; // Total amont to pay (or) transfer, ex : 100\n\t\t\t\t$pay_spec_type = singleDbTableRow($biz_id,'business_groups')->pay_type; // Pay Type, ex : 66(SMB Consumer to Company), 73(\"CMS\" Consumer to Company)\n\t\t\t\t$transaction_remarks = 'Paid For Successfully Delivery'; // remarks to insert into invoice table, ex : \"Transfer Values\";\n\t\t\t\t$pm_mode = 'wallet'; // points_mode, ex : wallet, loyality, discount.\n\n\n\t\t\t\t$make_payment = $this->payment_model->make_my_payment($pay_by_referral_code, $pay_to_referral_code, $amount_to_pay, $pay_spec_type, $transaction_remarks, $pm_mode);\n\n\n\t\t\t\t$insert = $this->courier_model->delivered_others();\n\n\t\t\t\t$this->session->set_flashdata('successMsg', 'Courier Pickup/ Delivered Successfully!');\n\t\t\t\tredirect(base_url('courier/courier_delivered'));\n\t\t}\n\n\t\t}\n\t\t}\ntheme('delivered_succesful',$data);\n}", "title": "" }, { "docid": "3ca6484a234e063092a4bd42fa0279c0", "score": "0.55919284", "text": "public function process_payment( $order_id ) {\n\n global $woocommerce;\n\n require_once __DIR__ . '/decidir/vendor/autoload.php';\n $clear_slashes = stripslashes($_COOKIE['result_decidir']);\n $result_decidir= json_decode($clear_slashes);\n\n $order = wc_get_order( $order_id );\n\n $keys_data = array('public_key' => $this->publishable_key, 'private_key' => $this->private_key);\n\n if($this->settings['testmode'] == 'no'){\n $ambient = \"prod\";\n } else {\n $ambient = \"test\";\n }\n\n $connector = new \\Decidir\\Connector($keys_data, $ambient);\n\n $decidir_MerchOrderIdnewdate = date(\"his\");\n $site_transaction_id = $order_id .'-'. $decidir_MerchOrderIdnewdate ;\n $psp_Amount = preg_replace( '#[^\\d.]#', '', $order->order_total );\n $amount = str_replace('.', '', $psp_Amount);\n\n $newdate = date(\"Y-m-d H:i:s\");\n $psp_MerchTxRef = $order->customer_id .'-'. $decidir_MerchOrderIdnewdate;\n $psp_CardFirstName = $_POST['decidir_gateway-card-first-name'];\n $psp_CardLastName = $_POST['decidir_gateway-card-last-name'];\n $psp_Product = $_POST['decidir_gateway-card-tipo'];\n $psp_CardNumber = str_replace(' ', '', $_POST['decidir_gateway-card-number']);\n $data = $_POST['decidir_gateway-card-expiry'];\n $year = substr($data, strpos($data, \"/\") + 1);\n $month = str_split($data, 2);\n $psp_CardExpDate = $year . $month[0];\n $psp_CardExpDate = str_replace(' ', '', $psp_CardExpDate);\n $psp_CardSecurityCode = str_replace(' ', '', $_POST['decidir_gateway-card-cvc']);\n $psp_CustomerMail = $_POST['billing_email'];\n $psp_NumPayments = str_replace(' ', '', $_POST['decidir-cuotas']);\n $tarjeta_tipo = str_replace(' ', '', $_POST['decidir-tarjeta-tipo']);\n $decidir_card_tipo = intval($_POST['decidir-card-tipo']);\n\n\n $cs_data = array(\n \"send_to_cs\" => true,\n \"channel\" => \"Web\",\n \"bill_to\" => array(\n \"city\" => $order->get_billing_city(),\n \"country\" => \"AR\",\n \"customer_id\" => $order->get_customer_id() . $order->get_billing_last_name(),\n \"email\" => $order->get_billing_email(),\n \"first_name\" => $order->get_billing_first_name(),\n \"last_name\" => $order->get_billing_last_name(),\n \"phone_number\" => $order->get_billing_phone(),\n \"postal_code\" => $order->get_billing_postcode(),\n \"state\" => $order->get_billing_state(),\n \"street1\" => $order->get_billing_address_1(),\n \"street2\" => $order->get_billing_address_2(),\n ),\n \"ship_to\" => array(\n \"city\" => $order->get_shipping_city(),\n \"country\" => \"AR\",\n \"customer_id\" => $order->get_customer_id() . $order->get_billing_last_name(),\n \"email\" => $order->get_billing_email(),\n \"first_name\" => $order->get_shipping_first_name(),\n \"last_name\" => $order->get_shipping_last_name(),\n \"phone_number\" => $order->get_billing_phone(),\n \"postal_code\" => $order->get_shipping_postcode(),\n \"state\" => $order->get_shipping_state(),\n \"street1\" => $order->get_shipping_address_1(),\n \"street2\" => $order->get_shipping_address_2(),\n ),\n \"currency\" => \"ARS\",\n \"amount\" => $psp_Amount,\n );\n\n \t $items = $order->get_items();\n $cs_products = array();\n foreach( $items as $item ) {\n\t\t\t\t\t\t\t\tif ( $item['product_id'] > 0 ) {\n\t\t\t\t\t\t\t\t\t$product = wc_get_product( $item['product_id'] );\n array_push($cs_products,\n array(\n \"csitproductcode\" => $product->get_sku(), //Código de producto. MANDATORIO.\n \"csitproductdescription\" => $product->get_name(), //Descripción del producto. MANDATORIO.\n \"csitproductname\" => $product->get_name(), //Nombre del producto. MANDATORIO.\n \"csitproductsku\" => $product->get_sku(), //Código identificador del producto. MANDATORIO.\n \"csittotalamount\" => $product->get_price(), //MANDATORIO\n \"csitquantity\" => $item['quantity'],//Cantidad del producto. MANDATORIO.\n \"csitunitprice\" => $product->get_price() //Formato Idem CSITTOTALAMOUNT. MANDATORIO\n )\n );\n }\n }\n\n $shipping_data = $order->get_items( 'shipping' );\n if(is_array($shipping_data)):\n\n foreach($shipping_data as $k=>$sm){\n\n array_push($cs_products,\n array(\n \"csitproductcode\" => 'envio', //Código de producto. MANDATORIO.\n \"csitproductdescription\" => $sm['method_title'], //Descripción del producto. MANDATORIO.\n \"csitproductname\" => $sm['method_title'], //Nombre del producto. MANDATORIO.\n \"csitproductsku\" => 'envio', //Código identificador del producto. MANDATORIO.\n \"csittotalamount\" => $sm['total'], //MANDATORIO\n \"csitquantity\" => 1,//Cantidad del producto. MANDATORIO.\n \"csitunitprice\" => $sm['total'] //Formato Idem CSITTOTALAMOUNT. MANDATORIO\n )\n );\n }\n\n endif;\n\n //$cybersource = new Decidir\\Cybersource\\Retail($cs_data,$cs_products);\n // $connector->payment()->setCybersource($cybersource->getData());\n\n $data = array(\n \"site_transaction_id\" => $site_transaction_id,\n \"token\" => $result_decidir->id,\n \"payment_method_id\" => (int)$tarjeta_tipo,\n \"bin\" => $result_decidir->bin,\n \"amount\" => $psp_Amount,\n \"currency\" => \"ARS\",\n \"installments\" => (int)$psp_NumPayments,\n \"description\" => $this->settings['establishment_name'],\n \"payment_type\" => \"single\",\n \"sub_payments\" => array()\n );\n\n\n try {\n $response = $connector->payment()->ExecutePayment($data);\n $status = $response->getStatus();\n if($status == 'approved'){\n\n $json = json_encode($response);\n update_post_meta($order_id, 'decidir_response',$json );\n\n $order->update_status( 'processing', __( 'TRANSACCION ID: ' . $response->getSite_transaction_id(), 'wc-gateway-decidir' ) );\n $order->add_order_note(\n sprintf(\n \"Detalle pago: '%s'\", $response->getId() . ' - ' . $status\n )\n );\n\n // Reduce stock levels\n $order->reduce_order_stock();\n\n // Remove cart\n WC()->cart->empty_cart();\n\n // Return thankyou redirect\n return array(\n 'result' => 'success',\n 'redirect' => $this->get_return_url( $order )\n );\n\n } else {\n\n $details = json_encode($response->getStatus_details());\n\n $order->add_order_note(\n sprintf(\n \"Detalle pago: '%s'\", $status\n )\n );\n $order->add_order_note(\n sprintf(\n \"Detalle error: '%s'\", $details\n )\n );\n\n // Remove cart\n //WC()->cart->empty_cart();\n wc_add_notice( __( $status ), 'error' );\n\n\n }\n\n\n } catch( \\Exception $e ) {\n\n $resultado = json_encode($e->getData());\n\n $order->add_order_note(\n sprintf(\n \"Detalle error: '%s'\", $resultado\n )\n );\n $detalle = json_encode($data);\n $order->add_order_note(\n sprintf(\n \"Detalle error data: '%s'\", $detalle\n )\n );\n\n\n wc_add_notice( __( $e->getData() ), 'error' );\n }\n\n }", "title": "" }, { "docid": "d5e8f28dbb53ed4600583975fccb3c3a", "score": "0.5589298", "text": "public function payment_complete( $order_id ) {\r\n\t\t\t//check for order method\r\n\t\t\t$order_method = get_option( 'ds_kashflow_order_method' );\r\n\t\t\tif ( $order_method == 'quote' ) {\r\n\t\t\t\t$this->logit( 'quote method used: no payment is taken.' );\r\n\t\t\t} else {\r\n\t\t\t\t$order = new WC_Order( $order_id );\r\n\r\n\t\t\t\t// only update invoice with customer details on payment complete\r\n\t\t\t\t// $invoice_on_complete = get_option( 'ds_kashflow_invoice_on_complete' );\r\n\t\t\t\t$invoice_on_complete = in_array( get_option('ds_kashflow_invoice_on_complete'), array(1,'yes',true)) ? true : false;\r\n\t\t\t\t$kf_invoice_id = false;\r\n\t\t\t\tif ( $invoice_on_complete ) {\r\n\t\t\t\t\t$kf_invoice_id = $this->update_customer( $order_id );\r\n\t\t\t\t}\r\n\t\t\t\tif(!$kf_invoice_id) {\r\n\t\t\t\t $kf_invoice_id = get_post_meta($order_id, 'kashflow_invoice_id', true);\r\n }\r\n /**\r\n * You need the Kashflow Order (Invoice) ID to apply the payment to\r\n * You can't use the WC order ID as Kashflow won't always mirror your WooCommerce Order references to KF Invoice ID's\r\n */\r\n if($kf_invoice_id !== false && $kf_invoice_id > 0) {\r\n\r\n\t $total_amount = $order->get_total();\r\n\t $invoice_payment = new KF_Invoice_Payment();\r\n\t $invoice_payment->PayInvoice = $kf_invoice_id;\r\n\t $invoice_payment->PayAmount = $total_amount;\r\n\t if ( $pay_method = get_option( 'ds_kashflow_gw_' . $order->get_payment_method() ) ) {\r\n\t\t $invoice_payment->PayMethod = $pay_method;\r\n\t\t $this->logit( 'sales invoice payment method - ' . $pay_method );\r\n\t }\r\n\t if ( $bank_account = get_option( 'ds_kashflow_gw_' . $order->get_payment_method() . '_bank_account' ) ) {\r\n\t\t $invoice_payment->PayAccount = $bank_account;\r\n\t }\r\n /*\r\n * Do not create invoice payment record for Paypal records\r\n * as Paypal integration in Kashflow will import these separately with more information\r\n * You can assign the payments via the import mechanism in Kashflow\r\n * TODO: Apply setting to enable/disable this option\r\n */\r\n\t if( preg_match('/paypal/i', $order->get_payment_method()) ) {\r\n $this->logit( 'sales invoice payment - Skipped. Paypal payments handled through Kashflow import system' );\r\n }\r\n else {\r\n $invoice_response = $this->api->insert_invoice_payment($invoice_payment);\r\n $this->logit('sales invoice payment - ' . print_r($invoice_response, true));\r\n }\r\n }\r\n else {\r\n\t $this->logit( 'sales invoice payment - UNABLE TO COMPLETE - No Kashflow Invoice ID to apply payment to' );\r\n }\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "e088f0d9a1c9c8ae44270340707fd7a5", "score": "0.5588301", "text": "public function notifyAction()\n {\n $_POST = file_get_contents('php://input');\n\n $_POST = empty($_POST) ? $_GET : $_POST;\n $k = Mage::helper('billmatebankpay')->getBillmate();\n $session = Mage::getSingleton('checkout/session');\n $data = $k->verify_hash($_POST);\n\n $session->setData('last_real_order_id', $data['orderid']);\n $order = Mage::getModel('sales/order')->loadByIncrementId($data['orderid']);\n\n if($data['status'] == 'Cancelled' && !$order->isCanceled()){\n\n if (!$order->isCanceled() && !$order->hasInvoices()) {\n\n $message = Mage::helper('billmatebankpay')->__('Order canceled by callback');\n $order->cancel();\n $order->addStatusToHistory(Mage_Sales_Model_Order::STATE_CANCELED, $message);\n $order->save();\n }\n\n if ($data['orderid']) {\n $quote = Mage::getModel('sales/quote')->load($order->getQuoteId());\n if ($quote->getId()) {\n $quote->setIsActive(true)->save();\n $session->setQuoteId($quote->getId());\n }\n\n $quoteItems = $quote->getAllItems();\n if ( sizeof( $quoteItems ) <=0 ) {\n $items = $order->getAllItems();\n if( $items ){\n foreach( $items as $item ){\n $product1 = Mage::getModel('catalog/product')->load($item->getProductId());\n $qty = $item->getQtyOrdered();\n $quote->addProduct($product1, $qty);\n }\n } else {\n $quote->setIsActive(false)->save();\n }\n $quote->setReservedOrderId(null);\n $quote->collectTotals()->save();\n }\n $session->unsRebuildCart();\n\n }\n return $this->getResponse()->setBody('OK');\n\n }\n if ($order->isCanceled()) {\n return $this->getResponse()->setBody('OK');\n }\n try{\n\t $payment = $order->getPayment();\n $status = Mage::getStoreConfig('payment/billmatebankpay/order_status');\n if ($data['status'] == 'Pending' && $order->getStatus() != $status) {\n $status = 'pending_payment';\n }\n\n if( $order->getStatus() == $status ) {\n $session->setOrderId($data['orderid']);\n $session->setQuoteId($session->getBillmateQuoteId(true));\n Mage::getSingleton('checkout/session')->getQuote()->setIsActive(false)->save();\n $session->unsRebuildCart();\n\n $this->getResponse()->setBody('OK');\n return;\n }\n\n $info = $payment->getMethodInstance()->getInfoInstance();\n $info->setAdditionalInformation('invoiceid',$data['number']);\n\n $data1 = $data;\n $order->addStatusHistoryComment(Mage::helper('payment')->__('Order processing completed'.'<br/>Billmate status: '.$data1['status'].'<br/>'.'Transaction ID: '.$data1['number']));\n\n $payment->setTransactionId($data['number']);\n\t $payment->setIsTransactionClosed(0);\n\t $transaction = $payment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH,null,false, false);\n\t $transaction->setOrderId($order->getId())->setIsClosed(0)->setTxnId($data['number'])->setPaymentId($payment->getId())\n\t ->save();\n\t $payment->save();\n $isCustomerNotified = false;\n $order->setState('new', $status, '', $isCustomerNotified);\n $order->save();\n $session->unsRebuildCart();\n\n $this->sendNewOrderMail($order);\n $this->clearAllCache();\n\n } catch(Exception $ex){\n Mage::log($ex->getMessage());\n }\n }", "title": "" }, { "docid": "69876505c075e1da06bb8e8ace4e798f", "score": "0.55712926", "text": "public function pay_depositAction() {\n\t\t$this->noViewRenderer(true);\n\t\t$request = $this->getRequest();\n\t\t\n\t\tif(!JO_Session::get('user_id')) {\n\t JO_Session::set('msg_error', $this->translate('You must be logged to change your profile'));\n\t $this->redirect(WM_Router::create($request->getBaseUrl() . '?controller=users&action=login'));\n\t }\n\t\t\n\t\tif($request->issetPost('item_id')) {\n\t\t\t\n\t\t\t$item = Model_Items::get($request->getPost('item_id'));\n\t\t\t\n\t\t\tif($request->getPost('licence') == 'personal') {\n\t\t\t\t\n\t\t\t\tif(JO_Session::get('total') < $item['prepaid_price']) {\n\t\t\t\t\tJO_Session::set('msg_error', 'You don\\'t have enought money in your account');\n\t\t\t\t} else {\n\t\t\t\t\tModel_Orders::buy($item, $item['prepaid_price']);\n\t\t\t\t\tJO_Session::set('msg_success', 'You have successfully bought this item.');\n\t\t\t\t\t$this->redirect(WM_Router::create($request->getBaseUrl() . '?controller=users&action=downloads'));\n\t\t\t\t}\n\t\t\t} elseif($request->getPost('licence') == 'extended') {\n\t \t\tif(JO_Session::get('total') < $item['extended_price']) {\n\t\t\t\t\tJO_Session::set('msg_error', 'You don\\'t have enought money in your account');\n\t\t\t\t} else {\n\t\t\t\t\tModel_Orders::buy($item, $item['extended_price'], true);\n\t\t\t\t\tJO_Session::set('msg_success', 'You have successfully bought this item.');\n\t\t\t\t\t$this->redirect(WM_Router::create($request->getBaseUrl() . '?controller=users&action=downloads'));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t$this->redirect(WM_Router::create($request->getBaseUrl() . '?controller=items&item_id='. $item['id'] .'&name='. WM_Router::clearName($item['name'])));\n\t\t} else {\n\t\t\t$this->redirect($request->getServer('HTTP_REFERER'));\n\t\t}\n\t}", "title": "" }, { "docid": "d727d38c87707b20cc00784f3d606fff", "score": "0.55680305", "text": "function receipt_page( $order ) {\n echo '<p>Thank you ! Your order is now pending payment. You should be automatically redirected to Jeeb to make payment.</p>';\n // Convert Base to Target\n $amount = $this->convert_base_to_target ( $order );\n // Create Invoice for payment in the Jeeb server\n $token = $this->create_invoice ( $order , $amount );\n // Redirecting user for the payment\n echo $this->redirect_payment ( $token );\n }", "title": "" }, { "docid": "e242efe07316e5a85cf737d751810c07", "score": "0.55673087", "text": "public function actionIndex()\n {\n // save to order here with draft orderline modifiers line all +++ and change status to draft \n $session = Yii::$app->session;\n $request = Yii::$app->request;\n\n if($request->isPost)\n {\n $discount=$request->post('discount');\n $payment=$request->post('payment');\n $order_type=$request->post('type');\n \n \n // Get info cart data\n $info_cart = $session['info'];\n $shift = $info_cart['shift'];\n $cashier = $info_cart['cashier'];\n\n // Calculating subtotal and grand total from cart \n $subtotal = $this->actionSubtotal();\n\n\n $grandtotal = $subtotal - ($discount/100 * $subtotal);\n \n\n // Saving to the order as draft order\n $order = new Order();\n $order->status = 0;\n $order->payment = $payment;\n $order->shift = $shift;\n $order->cashier = $cashier;\n $order->dine = $order_type;\n $order->discount = $discount;\n $order->subtotal =$subtotal;\n $order->grandtotal = $grandtotal;\n if($order->save())\n {\n $orderid= $order->id;\n\n // Saving the order items \n $shopping_cart = $session->get('cart');\n foreach($shopping_cart as $line)\n {\n if($line['type'] =='set')\n {\n $orderitem = new Orderitem();\n $orderitem->set_id = $line['set_id'];\n $orderitem->order_id = $orderid;\n $orderitem->qty = $line['set_qty'];\n if($orderitem->save())\n {}\n else\n {\n Yii::$app->session->setFlash('error','Please check your inputs.');\n return $this->redirect(Url::toRoute('product/shop')); \n }\n \n }\n elseif($line['type'] =='product')\n {\n $orderitem = new Orderitem();\n $orderitem->product_id = $line['product_id'];\n $orderitem->order_id = $orderid;\n $orderitem->qty = $line['product_qty'];\n if($orderitem->save()){}\n else{\n Yii::$app->session->setFlash('error','Please check your inputs.');\n return $this->redirect(Url::toRoute('product/shop'));\n }\n // Checking for modifiers and addings to orderitemsmodifiers table \n if(!empty($line['modifiers']))\n {\n foreach($line['modifiers'] as $ml)\n {\n $oim= new OrderItemModifiers();\n $oim->orderitem_id= $orderitem->id;\n $oim->modifier_id = $ml['modifier_id'];\n $oim->qty = $ml['modifier_qty'];\n if($oim->save()){}\n else\n {\n Yii::$app->session->setFlash('error','Please check your inputs.');\n return $this->redirect(Url::toRoute('product/shop'));\n } \n }\n }\n \n }\n }\n\n }\n else\n {\n Yii::$app->session->setFlash('error','Please check your inputs.');\n return $this->redirect(Url::toRoute('product/shop'));\n }\n \n }\n \n return $this->render('checkout',['item'=>$session['cart'],'info'=>$session['info'],\n 'discount'=>$discount,'payment'=> $payment,'ordertype'=>$order_type,'subtotal'=>$subtotal,\n 'grandtotal'=> $grandtotal,'order_id'=>$orderid]);\n }", "title": "" }, { "docid": "d5edc9c41f935c6ca7bfb21bc5ceadb6", "score": "0.5566491", "text": "static function send_payment_confirmation($order){\n\t\tif ($order->status == Bp_Order_Model::PAYMENT_CONFIRMED) {\n\t\t\tbasket_plus::send_order_update($order,ORDER_PAID_EMAIL_SUBJECT,ORDER_PAID_EMAIL);\n\t\t}\n\t\t//order paid and delivered earlier\n\t\telseif ($order->status == Bp_Order_Model::DELIVERED) {\n\t\t\tbasket_plus::send_order_update($order,ORDER_PAID_DELIVERED_EMAIL_SUBJECT,ORDER_PAID_DELIVERED_EMAIL);\n\t\t}\n }", "title": "" }, { "docid": "e7a9aa94a9c81fd4c4c70f5cfe930151", "score": "0.55638283", "text": "function receivingAmount($distributed_amount,$product_id,$quantity,$membership_id){\n\t\t\t//getting the system balence\n\t\t\t$system_balence = $this->manage_data->getLastValue(\"money_transfer_log\",\"system_balence\",\"id\");\n\t\t\t$getting_amount = ($distributed_amount/2);\n\t\t\t//get insertion date\n\t\t\t$date = $this->getDate();\n\t\t\t//calculating new system balence\n\t\t\t$new_system_balence = ($system_balence[0]['system_balence'] - $getting_amount);\n\t\t\t//checking for valid member or not\n\t\t\t$validiation = $this->manage_data->getValue_where(\"member_table\",\"*\",\"membership_id\",$membership_id);\n\t\t\tif($validiation[0]['membership_validiation'] == 0 || $validiation[0]['membership_activation'] == 0)\n\t\t\t{\n\t\t\t\t$notes = $membership_id;\n\t\t\t\t$m_id = 'potentialMoney';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$notes = '';\n\t\t\t\t$m_id = $membership_id;\n\t\t\t}\n\t\t\t//inserting values in money transfer log table\n\t\t\t$result = $this->manage_data->\n\t\t\tinsertDebitAmount($m_id,$product_id,$quantity,$date,$getting_amount,$new_system_balence,0,$notes);\n\t\t\treturn array($result,($distributed_amount - $getting_amount),$membership_id);\n\t\t}", "title": "" }, { "docid": "be69cf1b405f67585b2b98932c5ec50c", "score": "0.55633664", "text": "public function order()\n {\n $purchase = new \\Service\\Purchase;\n \n if ($purchase->check()) {\n $purchase->sendEmail();\n }\n }", "title": "" }, { "docid": "330ed32b39893118b9f236b41610d147", "score": "0.5562762", "text": "function income() {\n\t\t\n\t\t/* nothing to do here - payments are made by HAs */\n\t}", "title": "" }, { "docid": "7b4bb21cafe76465208c3c9158f6d6b3", "score": "0.5560912", "text": "public function index() {\n\t\tif ((!$this->cart->hasProducts() && empty($this->session->data['vouchers'])) || (!$this->cart->hasStock() && !$this->config->get('config_stock_checkout'))) {\n\t\t\t\n\t\t\t$this->response->redirect($this->url->link('checkout/cart'));\n\t\t}\n\n\t\t$data['language_href'] = $this->session->data['language_href'];\n\t\t\n\t\t$this->load->model('checkout/delivery');\n\t\t\n\t\t// Validate minimum quantity requirements.\n\t\t$products = $this->cart->getProducts();\n\n\t\t$data['language_href'] = $this->session->data['language_href'];\n\t\t\n\t\tforeach ($products as $product) {\n\t\t\t$product_total = 0;\n\n\t\t\tforeach ($products as $product_2) {\n\t\t\t\tif ($product_2['product_id'] == $product['product_id']) {\n\t\t\t\t\t$product_total += $product_2['quantity'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($product['minimum'] > $product_total) {\n\t\t\t\t$this->response->redirect($this->url->link('checkout/cart'));\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tif(isset($this->session->data['delivery_to_country_id'])){\n\t\t\t$data['delivery_info'] = $this->model_checkout_delivery->getDeliveryInfo((int)$this->session->data['delivery_to_country_id']);\n\t\t}\n\n\t\t$this->load->language('checkout/checkout');\n\n\t\t$this->document->setTitle($this->language->get('heading_title'));\n\n\t\t$this->document->addScript('catalog/view/javascript/jquery/datetimepicker/moment.js');\n\t\t$this->document->addScript('catalog/view/javascript/jquery/datetimepicker/bootstrap-datetimepicker.min.js');\n\t\t$this->document->addStyle('catalog/view/javascript/jquery/datetimepicker/bootstrap-datetimepicker.min.css');\n\n\t\t// Required by klarna\n\t\tif ($this->config->get('klarna_account') || $this->config->get('klarna_invoice')) {\n\t\t\t$this->document->addScript('http://cdn.klarna.com/public/kitt/toc/v1.0/js/klarna.terms.min.js');\n\t\t}\n\n\t\t$data['breadcrumbs'] = array();\n\n\t\t$data['breadcrumbs'][] = array(\n\t\t\t'text' => $this->language->get('text_home'),\n\t\t\t'href' => $this->url->link('common/home')\n\t\t);\n\n\t\t$data['breadcrumbs'][] = array(\n\t\t\t'text' => $this->language->get('text_cart'),\n\t\t\t'href' => $this->url->link('checkout/cart')\n\t\t);\n\n\t\t$data['breadcrumbs'][] = array(\n\t\t\t'text' => $this->language->get('heading_title'),\n\t\t\t'href' => $this->url->link('checkout/checkout', '', 'SSL')\n\t\t);\n\n\t\t$data['heading_title'] = $this->language->get('heading_title');\n\n\t\t$data['text_checkout_option'] = $this->language->get('text_checkout_option');\n\t\t$data['text_checkout_account'] = $this->language->get('text_checkout_account');\n\t\t$data['text_checkout_payment_address'] = $this->language->get('text_checkout_payment_address');\n\t\t$data['text_checkout_shipping_address'] = $this->language->get('text_checkout_shipping_address');\n\t\t$data['text_checkout_shipping_method'] = $this->language->get('text_checkout_shipping_method');\n\t\t$data['text_checkout_payment_method'] = $this->language->get('text_checkout_payment_method');\n\t\t$data['text_checkout_confirm'] = $this->language->get('text_checkout_confirm');\n\n\t\t$data['text_delivery'] = $this->language->get('text_delivery');\n\t\n\t$data['text_select_delive_adress'] = $this->language->get('text_select_delive_adress');\n\t$data['text_cart'] = $this->language->get('text_cart');\n\t$data['text_order'] = $this->language->get('text_order');\n\t$data['text_confirmation_order'] = $this->language->get('text_confirmation_order');\n\t$data['text_delivery_information'] = $this->language->get('text_delivery_information');\n\t$data['text_summary_information_on_ordering'] = $this->language->get('text_summary_information_on_ordering');\n\t$data['text_help_is_needed'] = $this->language->get('text_help_is_needed');\n\t$data['text_write_to_us'] = $this->language->get('text_write_to_us');\n\t$data['text_faq'] = $this->language->get('text_faq');\n\t$data['text_send_email'] = $this->language->get('text_send_email');\n\t$data['text_email'] = $this->language->get('text_email');\n\t$data['text_email_placeholder'] = $this->language->get('text_email_placeholder');\n\t$data['text_password'] = $this->language->get('text_password');\n\t$data['text_password_placeholder'] = $this->language->get('text_password_placeholder');\n\t$data['text_password_confirm'] = $this->language->get('text_password_confirm');\n\t$data['text_password_confirm_placeholder'] = $this->language->get('text_password_confirm_placeholder');\n\t$data['text_name'] = $this->language->get('text_name');\n\t$data['text_name_placeholder'] = $this->language->get('text_name_placeholder');\n\t$data['text_last_name'] = $this->language->get('text_last_name');\n\t$data['text_last_name_placeholder'] = $this->language->get('text_last_name_placeholder');\n\t$data['text_address1'] = $this->language->get('text_address1');\n\t$data['text_address1_placeholder'] = $this->language->get('text_address1_placeholder');\n\t$data['text_address2'] = $this->language->get('text_address2');\n\t$data['text_address2_placeholder'] = $this->language->get('text_address2_placeholder');\n\t$data['text_fields_zip'] = $this->language->get('text_fields_zip');\n\t$data['text_fields_zip_placeholder'] = $this->language->get('text_fields_zip_placeholder');\n\t$data['text_city'] = $this->language->get('text_city');\n\t$data['text_city_placeholder'] = $this->language->get('text_city_placeholder');\n\t$data['text_country'] = $this->language->get('text_country');\n\t$data['text_fields_phone'] = $this->language->get('text_fields_phone');\n\t$data['text_fields_phone_placeholder'] = $this->language->get('text_fields_phone_placeholder');\n\t$data['text_have_questions'] = $this->language->get('text_have_questions');\n\t$data['text_live_chat'] = $this->language->get('text_live_chat');\n\t$data['text_email_us'] = $this->language->get('text_email_us');\n\t$data['text_delivery_info'] = $this->language->get('text_delivery_info');\n\t$data['text_delivery_edit'] = $this->language->get('text_delivery_edit');\n\t$data['text_payment_details'] = $this->language->get('text_payment_details');\n\t$data['text_credit_card_number'] = $this->language->get('text_credit_card_number');\n\t$data['text_credit_card_number_placeholder'] = $this->language->get('text_credit_card_number_placeholder');\n\t$data['text_credit_card_expiration'] = $this->language->get('text_credit_card_expiration');\n\t$data['text_month'] = $this->language->get('text_month');\n\t$data['text_month_mm'] = $this->language->get('text_month_mm');\n\t$data['text_january'] = $this->language->get('text_january');\n\t$data['text_february'] = $this->language->get('text_february');\n\t$data['text_march'] = $this->language->get('text_march');\n\t$data['text_april'] = $this->language->get('text_april');\n\t$data['text_may'] = $this->language->get('text_may');\n\t$data['text_june'] = $this->language->get('text_june');\n\t$data['text_july'] = $this->language->get('text_july');\n\t$data['text_august'] = $this->language->get('text_august');\n\t$data['text_september'] = $this->language->get('text_september');\n\t$data['text_october'] = $this->language->get('text_october');\n\t$data['text_november'] = $this->language->get('text_november');\n\t$data['text_december'] = $this->language->get('text_december');\n\t$data['text_year'] = $this->language->get('text_year');\n\t$data['text_year_yyyy'] = $this->language->get('text_year_yyyy');\n\t$data['text_credit_card_cvn'] = $this->language->get('text_credit_card_cvn');\n\t$data['text_credit_card_cvn_placeholder'] = $this->language->get('text_credit_card_cvn_placeholder');\n\t$data['text_what_is_it'] = $this->language->get('text_what_is_it');\n\t$data['text_what_is_cvn'] = $this->language->get('text_what_is_cvn');\n\t$data['text_what_is_cvn_text'] = $this->language->get('text_what_is_cvn_text');\n\t$data['text_credit_card_name'] = $this->language->get('text_credit_card_name');\n\t$data['text_credit_card_name_placeholder'] = $this->language->get('text_credit_card_name_placeholder');\n\t$data['text_agreement'] = $this->language->get('text_agreement');\n\t$data['text_error_name'] = $this->language->get('text_error_name');\n\t$data['text_error_last_name'] = $this->language->get('text_error_last_name');\n\t$data['text_error_email'] = $this->language->get('text_error_email');\n\t$data['text_error_password'] = $this->language->get('text_error_password');\n\t$data['text_error_password_confirm'] = $this->language->get('text_error_password_confirm');\n\t$data['text_error_addres1'] = $this->language->get('text_error_addres1');\n\t$data['text_error_addres2'] = $this->language->get('text_error_addres2');\n\t$data['text_error_fields_zip'] = $this->language->get('text_error_fields_zip');\n\t$data['text_error_city'] = $this->language->get('text_error_city');\n\t$data['text_error_fields_phone'] = $this->language->get('text_error_fields_phone');\n\t$data['text_error_credit_card_number'] = $this->language->get('text_error_credit_card_number');\n\t$data['text_error_month'] = $this->language->get('text_error_month');\n\t$data['text_error_year'] = $this->language->get('text_error_year');\n\t$data['text_error_credit_card_cvn'] = $this->language->get('text_error_credit_card_cvn');\n\t$data['text_error_credit_card_name'] = $this->language->get('text_error_credit_card_name');\n\t$data['text_error_agreement'] = $this->language->get('text_error_agreement');\n\t$data['text_order_q'] = $this->language->get('text_order_q');\n\t$data['text_purchase_terms'] = $this->language->get('text_purchase_terms');\n\t\n\t$data['text_error_form_valid'] = $this->language->get('text_error_form_valid');\n\n\t\t\n\t\t\n\t\tif (isset($this->session->data['error'])) {\n\t\t\t$data['error_warning'] = $this->session->data['error'];\n\t\t\tunset($this->session->data['error']);\n\t\t} else {\n\t\t\t$data['error_warning'] = '';\n\t\t}\n\n\t\t$data['logged'] = $this->customer->isLogged();\n\t\t\n\t\t$data['customer_info'] = array();\n\t\tif($this->customer->isLogged()){\n\t\t\t\n\t\t\t$this->load->model('account/customer');\n\t\t\t$data['customer_info'] = $this->model_account_customer->getCustomer($this->customer->isLogged());\n\t\t\t\n\t\t\t$this->load->model('account/address');\n\t\t\t$data['customer_info']['addresses'] = $this->model_account_address->getAddresses();\n\t\t\t\n\t\t}\n\t\n\t\tif (isset($this->session->data['account'])) {\n\t\t\t$data['account'] = $this->session->data['account'];\n\t\t} else {\n\t\t\t$data['account'] = '';\n\t\t}\n\n\t\t\n\t\t// Totals\n\t\t$this->load->model('extension/extension');\n\t\t\n\t\t$total_data = array();\n\t\t$total = 0;\n\t\t$taxes = $this->cart->getTaxes();\n\n\t\t// Display prices\n\t\tif (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {\n\t\t\t$sort_order = array();\n\n\t\t\t$results = $this->model_extension_extension->getExtensions('total');\n\n\t\t\tforeach ($results as $key => $value) {\n\t\t\t\t$sort_order[$key] = $this->config->get($value['code'] . '_sort_order');\n\t\t\t}\n\n\t\t\tarray_multisort($sort_order, SORT_ASC, $results);\n\n\t\t\tforeach ($results as $result) {\n\t\t\t\tif ($this->config->get($result['code'] . '_status')) {\n\t\t\t\t\t$this->load->model('total/' . $result['code']);\n\n\t\t\t\t\t$this->{'model_total_' . $result['code']}->getTotal($total_data, $total, $taxes);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$sort_order = array();\n\n\t\t\tforeach ($total_data as $key => $value) {\n\t\t\t\t$sort_order[$key] = $value['sort_order'];\n\t\t\t}\n\n\t\t\tarray_multisort($sort_order, SORT_ASC, $total_data);\n\t\t}\n\n\t\t//echo $this->session->data['country_id'];\n\t\t$data['country_code'] = 'RU';\n\t\t\n\t\t//Подставим страну по выбранному языку\n\t\tif($data['language_href'] != '') $data['country_code'] = strtoupper(str_replace('/', '', $data['language_href']));\n\t\t\n\t\t//Если страна уже выбиралась и есть в сессии - возьмем ее\n\t\tif(isset($this->session->data['country_code'])) $data['country_code'] = $this->session->data['country_code'];\n\t\n\t\tif (isset($this->session->data['country_id'])) {\n\t\t\t$country_id = (int)$this->session->data['country_id'];\n\t\t}else {\n\t\t\t$country_id = 176;\n\t\t}\n\n\t\t\n/*\n\t\tif(is_numeric($country_id)){\n\t\t\t$delivery_info = $this->model_checkout_delivery->getDeliveryOnCountryId($country_id);\n\t\t}else{\n\t\t\t$delivery_info = $this->model_checkout_delivery->getDeliveryOnCountryCode($country_id);\t\n\t\t}\n\t\t\n\t\tif(!$delivery_info){\n\t\t\t$delivery_info = $this->model_checkout_delivery->getDeliveryOnCountryId(176);\n\t\t}\n\t\n\t\tforeach($delivery_info as $index => $row){\n\t\t\t\n\t\t\t$data['delivery']['realprice'] = number_format($row['price'],2,'.',' ');\n\t\t\t$data['delivery']['real_simbol_left'] = $this->currency->getSymbolLeft($this->session->data['currency']);\n\t\t\t$data['delivery']['real_simbol_right'] = $this->currency->getSymbolRight($this->session->data['currency']);\n\t\t\t\n\t\t}\n\t*/\n\n\t\t$realprice = $data['delivery']['realprice'] = $this->session->data['delivery_realprice'];\n\t\t$data['delivery']['real_simbol_left'] = $this->session->data['delivery_real_simbol_left'];\n\t\t$data['delivery']['real_simbol_right'] = $this->session->data['delivery_real_simbol_right'];\n\t\n\t\t$realprice = preg_replace('/[^0-9.]/', '', $realprice);\n\t\t\n\n\t\n\t\t$data['totals'] = array();\n\t\t\n\t\t$data['totals'][] = array(\n\t\t\t\t'title' => $total_data[0]['title'],\n\t\t\t\t'text' => $this->currency->format($total_data[0]['value']),\n\t\t\t);\n\t\t$data['totals'][] = array(\n\t\t\t\t'title' => $data['text_delivery'],\n\t\t\t\t'text' => $data['delivery']['real_simbol_left'].$data['delivery']['realprice'].$data['delivery']['real_simbol_right'],\n\t\t\t);\n\t\t$data['totals'][] = array(\n\t\t\t\t'title' => $total_data[1]['title'],\n\t\t\t\t'text' => $data['delivery']['real_simbol_left'].((float)$realprice + preg_replace('/[^0-9.]/', '',$this->currency->format($total_data[0]['value']))).$data['delivery']['real_simbol_right'],\n\t\t\t);\n/*\n\t\tforeach ($total_data as $result) {\n\t\t\t$data['totals'][] = array(\n\t\t\t\t'title' => $result['title'],\n\t\t\t\t'text' => $this->currency->format($result['value']),\n\t\t\t);\n\t\t}\n*/\n\t\t$this->load->model('localisation/country');\n\t\t$data['countries'] = $this->model_localisation_country->getCountries();\n\n\t\t$data['shipping_required'] = $this->cart->hasShipping();\n\n\t\t$data['column_left'] = $this->load->controller('common/column_left');\n\t\t$data['column_right'] = $this->load->controller('common/column_right');\n\t\t$data['content_top'] = $this->load->controller('common/content_top');\n\t\t$data['content_bottom'] = $this->load->controller('common/content_bottom');\n\t\t$data['footer'] = $this->load->controller('common/footer');\n\t\t$data['header'] = $this->load->controller('common/header');\n\n\t\tif (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/checkout/checkout.tpl')) {\n\t\t\t$this->response->setOutput($this->load->view($this->config->get('config_template') . '/template/checkout/checkout.tpl', $data));\n\t\t} else {\n\t\t\t$this->response->setOutput($this->load->view('default/template/checkout/checkout.tpl', $data));\n\t\t}\n\t}", "title": "" }, { "docid": "c099af648783c33f461544834c2f9915", "score": "0.5559676", "text": "function tmpl_get_payable_amount($pkg_id=0,$featured_type=0,$scats='')\r\n\t{\r\n\t\t$package_price = get_post_meta($pkg_id,'package_amount',true);\r\n\t\tif(isset($featured_type) && $featured_type == 'h')\r\n\t\t{\r\n\t\t\t$feature_amount = get_post_meta($pkg_id,'feature_amount',true);\r\n\t\t}elseif(isset($featured_type) && $featured_type == 'c')\r\n\t\t{\r\n\t\t\t$feature_amount = get_post_meta($pkg_id,'feature_cat_amount',true);\r\n\t\t}elseif(isset($featured_type) && $featured_type == 'both')\r\n\t\t{\r\n\t\t\t$feature_amount = get_post_meta($pkg_id,'feature_cat_amount',true)+get_post_meta($pkg_id,'feature_amount',true);\r\n\t\t}\r\n\t\t\r\n\t\tfor($i=0;$i<count($scats);$i++)\r\n\t\t{\r\n\t\t\t$cat_price = explode(\",\",$scats[$i]);\r\n\t\t\t$category_price = get_term( $cat_price[0], $_POST['cur_post_taxonomy']);\r\n\t\t\t$final_cat_price += $category_price->term_price; \r\n\t\t}\r\n\t\treturn $package_price+$feature_amount+$final_cat_price;\r\n\t}", "title": "" }, { "docid": "0f4050911c46807ccd5794e69684449a", "score": "0.5553547", "text": "public function getDateDelivery();", "title": "" }, { "docid": "239e1b82602261561343a830b9185872", "score": "0.55506575", "text": "public function pay()\n {\n }", "title": "" }, { "docid": "239e1b82602261561343a830b9185872", "score": "0.55506575", "text": "public function pay()\n {\n }", "title": "" }, { "docid": "239e1b82602261561343a830b9185872", "score": "0.55506575", "text": "public function pay()\n {\n }", "title": "" }, { "docid": "e772c27fc02519bbb1b2ac7e83463eed", "score": "0.55428076", "text": "public function getOehdcashamt()\n {\n return $this->oehdcashamt;\n }", "title": "" }, { "docid": "0c12117b07082e5451b2b2c5791c566d", "score": "0.55388296", "text": "public function shipment_delivery()\n\t\t{\n\t\t\t// permittedArea();\n\t\t\ttheme('shipment_delivery');\n\t\t}", "title": "" }, { "docid": "45412519226e5a05c694b2d6f0cbd201", "score": "0.55346787", "text": "public function totalAmount();", "title": "" }, { "docid": "d792a763d58d9143871a4067869e4948", "score": "0.55344754", "text": "public static function transferCommission($request, $order)\n {\n $totalCost = $request->REQUEST['total_cost'];\n $spareCost = $request->REQUEST['spare_cost'];\n $commission = ($totalCost - $spareCost) * 0.2;\n if ($commission <= 0.0) {\n throw new Pluf_Exception_BadRequest('Invalid value for commission. Commission should be a positive value.');\n }\n // Get wallet of current user\n $currency = Tenant_Service::setting('local.currency', NULL);\n if($currency == NULL){\n throw new Pluf_Exception_SettingError('Local currency of tenant is not set. Set it first.');\n }\n $wallets = Bank_Service::getWallets($request->user, $currency);\n if (count($wallets) === 0) {\n throw new Pluf_Exception_DoesNotExist('You have not any wallet with current currency, so you can not do this action.');\n }\n $fromWallet = $wallets[0]; // Get first wallet as main wallet of user\n $toWallet = null;\n $wId = Tenant_Service::setting('tenant.main_wallet_id', 0);\n if ($wId > 0) {\n Pluf::loadFunction('Pluf_Shortcuts_GetObjectOr404');\n $toWallet = Pluf_Shortcuts_GetObjectOr404('Bank_Wallet', $wId);\n if ($toWallet->deleted) {\n $toWallet = null;\n }\n }\n // Check for invalid transfer\n // Check if balance of source wallet is sufficeint\n $sourceBalance = $fromWallet->total_deposit - $fromWallet->total_withdraw;\n if ($sourceBalance < $commission) {\n throw new Pluf_Exception_BadRequest('Insufficeint balance [balance: ' . $sourceBalance . ', transfer: ' . $commission . '].');\n }\n // Create transfer\n $transfer = new Bank_Transfer();\n $transfer->_a['cols']['amount']['editable'] = true;\n $transfer->_a['cols']['acting_id']['editable'] = true;\n $transfer->_a['cols']['from_wallet_id']['editable'] = true;\n $transfer->_a['cols']['to_wallet_id']['editable'] = true;\n Pluf::loadFunction('Pluf_Shortcuts_GetFormForModel');\n $data = array(\n 'amount' => $commission,\n 'description' => Tenant_Service::setting('digidoci.commission_transfer_description', 'DigiDoki commission.') . 'Request ID: ' . $order->id,\n 'acting_id' => $request->user->id,\n 'from_wallet_id' => $fromWallet->id,\n 'to_wallet_id' => $toWallet !== null ? $toWallet->id : 0\n );\n $form = Pluf_Shortcuts_GetFormForModel($transfer, $data);\n $transfer = $form->save();\n // Update balance of wallets\n $fromWallet->total_withdraw += $transfer->amount;\n $fromWallet->update();\n if ($toWallet !== null) {\n $toWallet->total_deposit += $transfer->amount;\n $toWallet->update();\n }\n }", "title": "" }, { "docid": "6142dead296f8369952c8a8108292399", "score": "0.5527917", "text": "function calculate($m)\n\t{\n\t\tif ($m->session || $m->urn->is_concrete()) // LOAD CART BY UUID OR SESSION ID\n\t\t{\n\t\t\t// load cart\n\t\t\t$t = new Message('{\"action\": \"load\"}');\n\t\t\t$t->urn = $m->urn;\n\t\t\t$t->session = $m->session;\n\t\t\t$cart = $t->deliver();\n\t\t\tif (!count($cart)) return new Message('{\"urn\": \"urn-cart\", \"state\": \"lost cart\"}');\n\n\t\t\t// calc total on contents\n\t\t\t$total = 0;\n\t\t\t$discounted = 0;\n\t\t\t$urns = array();\n\t\t\t\n\t\t\t$m = new Message();\n\t\t\t$m->action = 'edgesfrom';\n\t\t\t$m->urn = $cart->urn;\n\t\t\t$m->to = 'urn-product';\n\t\t\t$edges = $m->deliver();\n\t\t\t$uuids = array();\n\t\t\t$uuid_amount = array();\n\t\t\tforeach ($edges as $edge)\n\t\t\t{\n\t\t\t\t$urn = new URN($edge->nodeTo);\n\t\t\t\t$uuid = $urn->uuid->toInt();\n\t\t\t\tarray_push($uuids, $uuid);\n\t\t\t\t$amount = $edge->metadata['amount'];\n\t\t\t\t$uuid_amount[$uuid] = $amount;\n\t\t\t}\n if (count($uuids))\n {\n $m = new Message();\n $m->urn = 'urn-product';\n $m->action = 'load';\n $m->id = $uuids;\n $products = $m->deliver();\n foreach ($products as $p)\n {\n $amount = $uuid_amount[$p->id];\n $urns[] = array(\"urn\"=>(string) $p->urn, \"amount\" => $amount, 'title' => $p->title, 'price' => $p->price);\n $total += $p->price * $amount;\n if ($p->discount > 0)\n {\n $discounted += ceil($p->price - ($p->price / 100 * $p->discount)) * $amount;\n }\n else\n {\n $discounted += $p->price * $pamount;\n }\n $discounted = $discounted;\n }\n }\n\t\t\t\n\t\t\t// update cart total in db\n\t\t\tif (!$m->nosave)\n\t\t\t{\n\t\t\t\t$mt = new Message();\n\t\t\t\t$mt->action = 'update';\n\t\t\t\t$mt->urn = $cart->urn;\n\t\t\t\t$mt->price = $total;\n\t\t\t\t$mt->deliver();\n\t\t\t}\n\t\t\t\n\t\t\t$t = new Message(array(\"urn\" => (string) $cart->urn, \"total\" => $total, \"contents\" => $urns));\n\t\t\t$t->discounted = $discounted;\n\t\t\treturn $t;\n\t\t}\t\n\t}", "title": "" }, { "docid": "135f303fe0aff8f6cd0c9166f60d4de2", "score": "0.55271155", "text": "public function productSalesCalculation($order)\n {\n /*\n * Marketplace Order details save before Observer\n */\n $this->_eventManager->dispatch(\n 'mp_order_save_before',\n ['order' => $order]\n );\n\n /*\n * Get Global Commission Rate for Admin\n */\n $percent = $this->_marketplaceHelper->getConfigCommissionRate();\n\n /*\n * Get Current Store Currency Rate\n */\n $currentCurrencyCode = $order->getOrderCurrencyCode();\n $baseCurrencyCode = $order->getBaseCurrencyCode();\n $allowedCurrencies = $this->_marketplaceHelper->getConfigAllowCurrencies();\n $rates = $this->_marketplaceHelper->getCurrencyRates(\n $baseCurrencyCode,\n array_values($allowedCurrencies)\n );\n if (empty($rates[$currentCurrencyCode])) {\n $rates[$currentCurrencyCode] = 1;\n }\n\n $lastOrderId = $order->getId();\n\n /*\n * Marketplace Credit Management module Observer\n */\n $this->_eventManager->dispatch(\n 'mp_discount_manager',\n ['order' => $order]\n );\n\n $this->_eventManager->dispatch(\n 'mp_advance_commission_rule',\n ['order' => $order]\n );\n\n $sellerData = $this->getSellerProductData($order, $rates[$currentCurrencyCode]);\n\n $sellerProArr = $sellerData['seller_pro_arr'];\n $sellerTaxArr = $sellerData['seller_tax_arr'];\n $sellerCouponArr = $sellerData['seller_coupon_arr'];\n\n $taxToSeller = $this->_marketplaceHelper->getConfigTaxManage();\n $shippingAll = $this->_coreSession->getData('shippinginfo');\n try {\n $shippingAllCount = count($shippingAll);\n } catch (\\Exception $e) {\n $this->_marketplaceHelper->logDataInLogger(\n \"Observer_SalesOrderPlaceAfterObserver productSalesCalculation : \".$e->getMessage()\n );\n $shippingAllCount = false;\n }\n foreach ($sellerProArr as $key => $value) {\n $productIds = implode(',', $value);\n $data = [\n 'order_id' => $lastOrderId,\n 'product_ids' => $productIds,\n 'seller_id' => $key,\n 'total_tax' => $sellerTaxArr[$key],\n 'tax_to_seller' => $taxToSeller,\n ];\n if (!$shippingAllCount && $key == 0) {\n $shippingCharges = $order->getBaseShippingAmount();\n $data = [\n 'order_id' => $lastOrderId,\n 'product_ids' => $productIds,\n 'seller_id' => $key,\n 'shipping_charges' => $shippingCharges,\n 'total_tax' => $sellerTaxArr[$key],\n 'tax_to_seller' => $taxToSeller,\n ];\n }\n if (!empty($sellerCouponArr) && !empty($sellerCouponArr[$key])) {\n $data['coupon_amount'] = $sellerCouponArr[$key];\n }\n $collection = $this->ordersFactory->create();\n $collection->setData($data);\n $collection->setCreatedAt($this->_date->gmtDate());\n $collection->setSellerPendingNotification(1);\n $collection->setUpdatedAt($this->_date->gmtDate());\n $collection->save();\n $sellerOrderId = $collection->getId();\n $this->notificationHelper->saveNotification(\n \\Webkul\\Marketplace\\Model\\Notification::TYPE_ORDER,\n $sellerOrderId,\n $lastOrderId\n );\n }\n /*\n * Marketplace Order details save after Observer\n */\n $this->_eventManager->dispatch(\n 'mp_order_save_after',\n ['order' => $order]\n );\n }", "title": "" }, { "docid": "b5257fd8e74d2eb2151f57763e672840", "score": "0.5526612", "text": "function cp_send_buyer_receipt( $order ) {\n\n\tif ( 0 == $order->get_total() && ! apply_filters( 'cp_send_zero_sum_order_emails', false ) ) {\n\t\treturn;\n\t}\n\n\t$recipient = get_user_by( 'id', $order->get_author() );\n\n\t$unique_items = array();\n\n\t$items_html = '';\n\tforeach ( $order->get_items() as $item ) {\n\t\t$ptype_obj = get_post_type_object( $item['post']->post_type );\n\t\tif ( ! $ptype_obj->public || isset( $unique_items[ $item['post']->ID ] ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t$unique_items[ $item['post']->ID ] = $item['post']->ID;\n\n\t\tif ( $order->get_id() != $item['post']->ID ) {\n\t\t\t$items_html .= html( 'p', html_link( get_permalink( $item['post']->ID ), $item['post']->post_title ) );\n\t\t} else {\n\t\t\t$items_html .= html( 'p', html( 'strong', APP_Item_Registry::get_title( $item['type'] ) ) );\n\t\t}\n\t}\n\n\t$table = new APP_Order_Summary_Table( $order );\n\tob_start();\n\t$table->show();\n\t$table_output = ob_get_clean();\n\n\t$content = '';\n\t$content .= html( 'p', sprintf( __( 'Hello %s,', APP_TD ), $recipient->display_name ) );\n\t$content .= html( 'p', __( 'This email confirms that you have purchased the following items:', APP_TD ) );\n\t$content .= $items_html;\n\t$content .= html( 'p', __( 'Order Summary:', APP_TD ) );\n\t$content .= $table_output;\n\n\t$blogname = wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES );\n\t$subject = sprintf( __( '[%1$s] Receipt for your order #%2$d', APP_TD ), $blogname, $order->get_id() );\n\n\t$email = array( 'to' => $recipient->user_email, 'subject' => $subject, 'message' => $content );\n\t$email = apply_filters( 'cp_email_user_receipt', $email, $order );\n\n\tappthemes_send_email( $email['to'], $email['subject'], $email['message'] );\n}", "title": "" }, { "docid": "913369d496f790d8fc79a3fac5907afd", "score": "0.55251914", "text": "public function getCash()\n\t{\n\t\tif(!isset($this->cash) || $this->cash === null)\n\t\t{\n\t\t\t$this->cash = HTMoney::convert($this->getXml()->getElementsByTagName('Cash')->item(0)->nodeValue, $this->money);\n\t\t}\n\t\treturn $this->cash;\n\t}", "title": "" }, { "docid": "9f2981f1df6cd749c4dd605aa45e522a", "score": "0.55244756", "text": "public static function coste() {\n self::carga_cesta();\n $total=0.0;\n if (!empty(self::$productos))\n foreach (self::$productos as $clave => $valor) \n $total+=(floatval ($valor)*floatval (self::$unidades[$clave]));\n \n \n $_SESSION['total']=$total;\n return $total;\n }", "title": "" }, { "docid": "2f1ce566d1722961c7b5089999c8dac1", "score": "0.55230105", "text": "public function cashOnDelivery(){\n return view('frontend.thanks');\n }", "title": "" }, { "docid": "f8db362c76e358a9078029128fdb30e1", "score": "0.55201954", "text": "function plgVmConfirmedOrder (VirtueMartCart $cart, $order) {\n\n\t \n\t\tif (!($method = $this->getVmPluginMethod ($order['details']['BT']->virtuemart_shipmentmethod_id))) {\n\t\t\treturn NULL; // Another method was selected, do nothing\n\t\t}\n $method->cost_per_transaction = JFactory::getSession()->get('cost',0,'ddelivery');\n $method->tax_id = -1;\n //echo ('<pre>$cart:'.print_r($cart,1).'</pre>');\n \n //jexit ('<pre>method_info:'.print_r($method,1).'</pre>');\n\t\tif (!$this->selectedThisElement ($method->shipment_element)) {\n\t\t\treturn FALSE;\n\t\t}\n\t\t$values['virtuemart_order_id'] = $order['details']['BT']->virtuemart_order_id;\n\t\t$values['order_number'] = $order['details']['BT']->order_number;\n\t\t$values['virtuemart_shipmentmethod_id'] = $order['details']['BT']->virtuemart_shipmentmethod_id;\n\t\t$values['shipment_name'] = $this->renderPluginName ($method);\n\t\t$values['order_weight'] = $this->getOrderWeight ($cart, $method->weight_unit);\n\t\t$values['shipment_weight_unit'] = $method->weight_unit;\n\t\t$values['shipment_cost'] = $method->shipment_cost;\n\t\t$values['shipment_package_fee'] = $method->package_fee;\n\t\t$values['tax_id'] = $method->tax_id;\n \n\t\t$this->storePSPluginInternalData ($values);\n try{\n $this->bootstrap();\n \n \t$IntegratorShop = new IntegratorShop();\n \t$ddeliveryUI = new \\DDelivery\\DDeliveryUI($IntegratorShop, true);\n $id = JFactory::getSession()->get('order_id', 0, 'ddelivery');\n $shopOrderID = $cart->order_number;\n $status = $order['history'][0]->order_status_code;\n //echo ('<pre>$cart:'.print_r($cart,1).'</pre>');\n if (isset($order['details']['ST']))\n $payment = $order['details']['ST']->virtuemart_paymentmethod_id;\n else $payment = $order['details']['BT']->virtuemart_paymentmethod_id;\n //jexit(\"id $id shopOrderID $shopOrderID status $status payment $payment\");\n \t$ddeliveryUI->onCmsOrderFinish( $id, $shopOrderID, $status, $payment);\n $session = JFactory::getSession();\n $session->clear('cost', 'ddelivery'); \n $session->clear('comment', 'ddelivery'); \n $session->clear('order_id', 'ddelivery'); \n }\n catch(\\DDelivery\\DDeliveryException $e)\n {\n echo $e->getMessage();\n $ddeliveryUI->logMessage($e);\n }\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "160cbd4d7b8b14078db880531ba432f5", "score": "0.5520079", "text": "public function getCost()\n {\n return $this->coffee->getCost() + 2;\n }", "title": "" }, { "docid": "06609a24c87f00c0fe4a8a6574b706e2", "score": "0.5519147", "text": "public function getProductAmount();", "title": "" }, { "docid": "bb68576d67a8c045631c8b001002d8fe", "score": "0.5518825", "text": "public function getOrderShippingCost($cart,$shipping_cost)\n {\n \n // We check if we already have a LceQuote for this cart. If not, we request one.\n $quote = LceQuote::getLatestForCart($cart);\n \n // No quote found. Generating a new one.\n if (!$quote) {\n $delivery_address = new Address((int)$cart->id_address_delivery);\n $delivery_country = new Country((int)$delivery_address->id_country);\n \n // We only proceed if we have a delivery address, otherwise it is quite pointless to request rates\n if (!empty($delivery_address->city)) {\n \n $weight = ceil($cart->getTotalWeight($cart->getProducts()));\n if ($weight == 0)\n $weight = 0.2;\n \n $dimension = LceDimension::getForWeight($weight);\n $params = array(\n 'shipper' => array(\n 'city' => Configuration::get('MOD_LCE_DEFAULT_CITY'),\n 'postal_code' => Configuration::get('MOD_LCE_DEFAULT_POSTAL_CODE'),\n 'country' => Configuration::get('MOD_LCE_DEFAULT_COUNTRY')),\n 'recipient' => array(\n 'city' => $delivery_address->city,\n 'postal_code' => $delivery_address->postcode,\n 'country' => $delivery_country->iso_code,\n 'is_a_company' => false),\n 'parcels' => array(\n array('length' => $dimension->length, 'height' => $dimension->height, 'width' => $dimension->width, 'weight' => $weight)\n )\n );\n $api_quote = Lce\\Resource\\Quote::request($params);\n \n $quote = new LceQuote();\n $quote->id_cart = $cart->id;\n $quote->api_quote_uuid = $api_quote->id;\n if ($quote->add()) {\n // Now we create the offers\n foreach($api_quote->offers as $k => $api_offer) {\n $offer = new LceOffer();\n $offer->id_quote = $quote->id;\n $offer->api_offer_uuid = $api_offer->id;\n $offer->lce_product_code = $api_offer->product->code;\n $offer->base_price_in_cents = $api_offer->price->amount_in_cents;\n $offer->total_price_in_cents = $api_offer->total_price->amount_in_cents;\n $offer->currency = $api_offer->total_price->currency;\n $offer->add();\n }\n }\n }\n }\n /* At this point, we should have a quote object, new or existing, and only if a delivery address was specified.\n * We now get the price for the corresponding carrier.\n */\n if ($quote) {\n $sql = 'SELECT `carrier`.`lce_product_code` FROM '._DB_PREFIX_.'carrier AS carrier WHERE (`carrier`.`id_carrier` = '.(int)$this->id_carrier.')';\n if ($row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql))\n $lce_product_code = $row['lce_product_code'];\n \n if ($lce_product_code && $lce_offer = LceOffer::getForQuoteAndLceProduct($quote, $lce_product_code)) {\n $increment = (int)Configuration::get('MOD_LCE_PRICE_ROUND_INCREMENT');\n $surcharge_amount = (int)Configuration::get('MOD_LCE_PRICE_SURCHARGE_STATIC');\n $surcharge_percent = (int)Configuration::get('MOD_LCE_PRICE_SURCHARGE_PERCENT');\n $price_taxation_rule = Configuration::get('MOD_LCE_PRICE_TAX_RULES');\n if ($price_taxation_rule == 'before_taxes') {\n $price = $lce_offer->base_price_in_cents;\n } else {\n $price = $lce_offer->total_price_in_cents;\n }\n \n if (is_int($surcharge_percent) && $surcharge_percent > 0 && $surcharge_percent <= 100) {\n $price = $price + ($price * $surcharge_percent / 100);\n }\n\n if (is_int($surcharge_amount) && $surcharge_amount > 0) {\n $price = $price+(int)$surcharge_amount;\n }\n\n if (is_int($increment) && $increment > 0) {\n $increment = 1 / $increment;\n $price = (ceil($price * $increment) / $increment);\n }\n\n return $price / 100;\n } else {\n return false;\n }\n }\n }", "title": "" }, { "docid": "3adb05e6296d4c6b2137b06450dbc45a", "score": "0.55171955", "text": "function hook_uc_payment_gateway_charge($order_id, $amount, $data) {\n}", "title": "" }, { "docid": "98b32a6bc22d379e52dfc079d57fe825", "score": "0.5516974", "text": "public static function get_order($delivery){\n \t\n\t\t$query=Doctrine_Query::create()-> select(\" kemsa_code, quantityOrdered, price,quantityRecieved, ROUND( (quantityRecieved /quantityOrdered) *100 ) AS fill_rate\")->from(\"orderdetails\")-> where(\"orderNumber=$delivery\")->OrderBy(\"fill_rate ASC \");\n\t\t$order=$query->execute();\n\t\treturn $order;\n\t}", "title": "" }, { "docid": "c344adb3312a1a583d05438b4305a4a7", "score": "0.5516229", "text": "public function charges();", "title": "" }, { "docid": "b1f8fe0ab09b2f8b8cf8d802c31b44f3", "score": "0.55160296", "text": "public function getConfirmPurchase($customerId,$websiteId,$store,$nonce_from_client,$amount,$save_my_card,$newsletter);", "title": "" } ]
b9c37ae1b5afbc6cfc6193f2d58678b7
Mustra la lista con todos los usuarios
[ { "docid": "7d6af0e03e485f887cff23c5ff5b4bdf", "score": "0.0", "text": "public function show()\n {\n\n $bodegas = Bodega::all();\n \n // Con el método all() le estamos pidiendo al modelo de Usuario\n // que busque todos los registros contenidos en esa tabla y los devuelva en un Array\n \n return View::make('bodega.transaccion.show')->with(\"bodegas\",$bodegas);\n \n // El método make de la clase View indica cual vista vamos a mostrar al usuario\n //y también pasa como parámetro los datos que queramos pasar a la vista.\n // En este caso le estamos pasando un array con todos los usuarios\n }", "title": "" } ]
[ { "docid": "990a688c02f9e2eca9a263417b757839", "score": "0.8081631", "text": "function listar_usuarios()\n\t{\n\t\n\t\t$sql_usuarios ='SELECT * FROM usuarios;';\n\t\t$stmt2 = $this->instancia_conexion->Consulta($sql_usuarios);\n\t\n\t\t$usuarios=array();\n\t\n\t\twhile ($registro = $this->instancia_conexion->LeeRegistro($stmt2))\n\t\t{\n\t\t\t$usuarios[]=$registro;\n\t\t}\n\t\n\t\treturn $usuarios;\n\t}", "title": "" }, { "docid": "b276d8beb272bf1be59d8775985513e4", "score": "0.7961913", "text": "public function listarUsuarios(){\n $usuarioDAO = new UsuarioDAO();\n\n\t\t\t//armazenando o retorno da consulta em uma variável\n $listUsuarios = $usuarioDAO->selectAll();\n\t\t\t\n\t\t\t//retornando a lista com os usuários\n return $listUsuarios;\n }", "title": "" }, { "docid": "e9df7eaab3155b39c5e71e943d691af6", "score": "0.7781826", "text": "public function obtenerTodosLosUsuarios(){\n $respuesta = $this->realizarPeticion('GET', $this->urlBase.'GetUsuarios');\n\n $datos = json_decode($respuesta);\n\n $users = $datos->objeto;\n\n return $users;\n }", "title": "" }, { "docid": "618574dd2cf8c660c38866a9f5d0120a", "score": "0.7623627", "text": "public function listarUsuarios() {\n $consulta = $this->db->prepare('SELECT * FROM usuarios');\n $consulta->execute();\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n }", "title": "" }, { "docid": "97ffa239faff59ab9a41d34640e65227", "score": "0.74901825", "text": "public function listarUsuarios(){\n try {\n $consulta = \"SELECT * FROM usuario WHERE 1\";\n $param = array();\n $this->con->ConsultaNormalAssoc($consulta, $param);\n $this->result = array();\n foreach ($this->con->datos as $fila){\n $usuario = new usuario(); \n $usuario->__SET(\"codUsuario\", $fila['codUsuario']);\n $usuario->__SET(\"nombre\", $fila['nombre']);\n $usuario->__SET(\"password\", $fila['password']);\n $usuario->__SET(\"email\", $fila['email']);\n $usuario->__SET(\"nivelAcceso\", $fila['nivelAcceso']);\n $this->result[] = $usuario;\n }\n }catch (Exception $e){\n echo($e->getMessage());\n }\n }", "title": "" }, { "docid": "b879f622f225a9639ca1e400020768b0", "score": "0.74277383", "text": "public function getUsuarios(){ // va\n $sentencia = $this->db->prepare('SELECT * FROM usuarios ORDER BY id_usuario ASC');\n $sentencia->execute();\n\n return $sentencia->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "f9164aa0ee6d7849f7b2afec8a4bc580", "score": "0.73304045", "text": "public function listarUsuarios ()\n {\n return app('db')->select(\"SELECT idUsuario as id, nome, eMail as eMail, login, sexo, telefone, CPF, dataNasc FROM usuario\");\n }", "title": "" }, { "docid": "093c1d07b9805ae3e20425230671d642", "score": "0.731114", "text": "private function getUserList(){\n \n $db = new \\classes\\MysqlDB( $this->DB_host, $this->DB_user,\n $this->DB_pw, $this->DB_db,$this->DB_showErrors);\n $q = 'SELECT UserName, Id FROM FK_User ORDER BY UserName';\n\n $users = $db->query_array($q);\n foreach($users as $user){\n $this->userList[]= $user['UserName'];\n }\n \n //var_dump($users);\n }", "title": "" }, { "docid": "cb1e011e44e774ea7318fefdf39de96a", "score": "0.7285853", "text": "function obtenerUsuarios(){\n $db = obtenerBaseDeDatos();\n $sentencia = $db->query(\"SELECT * FROM usuarios\");\n return $sentencia->fetchAll(); \n }", "title": "" }, { "docid": "b979d3d199857f78226b0fa6205efec2", "score": "0.7283887", "text": "public function listUser();", "title": "" }, { "docid": "db8aff43e4f3bff3eedb421f6dedcb8d", "score": "0.7281008", "text": "function recupere_liste_users(){\n\t\t$sql = \"SELECT login, nom, idPersAssoc, typeU FROM users;\";\n\t\t$dao = new DAO();\n\t\t$liste_users = $dao -> selectionner($sql);\n\t\t\n\t\treturn $liste_users;\n\t}", "title": "" }, { "docid": "cf49de1ccf5da065fff18062fff7ab37", "score": "0.72804934", "text": "public function getUsuarios(){\n $pdo=self::getConexion();\n $sql=\"SELECT * FROM Usuarios\";\n $consulta=$pdo->query($sql);\n $usuarios=$consulta->fetchAll(PDO::FETCH_ASSOC);\n return $usuarios;\n }", "title": "" }, { "docid": "e3ee93d07288169f5e52de56a06a9e33", "score": "0.7266081", "text": "public static function getList() \n\t{\n\t\t$sql = new Sql();\n\t\treturn $sql->select(\"SELECT * FROM tb_usuarios ORDER BY deslogin;\");\n\t}", "title": "" }, { "docid": "f11d54439219c82b76a31b806629fd36", "score": "0.72413164", "text": "private function getAllUsers()\n {\n $em = $this->getDoctrine()->getManager();\n $resu = $this->getDoctrine()\n ->getRepository('AdminBundle:Usuario')\n ->findAll(); \n return $resu;\n }", "title": "" }, { "docid": "647846031bbb380eac0b0d32ef748daa", "score": "0.7241008", "text": "public static function getUsuarios(){\n $conexion = IvaliceBD::connectDB();\n $registros = \"SELECT * from usuarios\";\n $consulta = $conexion->query($registros);\n $usuarios = [];\n\n while ($usuario = $consulta->fetchObject()) {\n $usuarios[] = new Usuario($usuario->nick, $usuario->pwd, $usuario->nombre, $usuario->apellidos, $usuario->email, $usuario->pts);\n }\n\n return $usuarios;\n }", "title": "" }, { "docid": "9405c676c9ffa86875c34648a8eab0ee", "score": "0.72324824", "text": "function ListarUsuario()\n\t{\n\t\t$sql = \"SELECT * from usuario\";\n\t\treturn EjecutarConsulta($sql);\n\t}", "title": "" }, { "docid": "c9367fe4e43c69ae8a6a23a0c76c1f32", "score": "0.7226762", "text": "function ListaUsuarios($Auxilio){\n\t\t\t$Banco_Vazio = \"Banco esta Vazio\";\n\t\t\t#Query Busca Folders\n\t\t\t$Sql = \"Select * from c_usuarios\";\n\t\t\t$result = parent::Execute($Sql);\n\t\t\t$num_rows = parent::Linha($result);\n\n\t\t\t#Monta no Html a Listagem\n\t\t\tif ($num_rows){\n\t\t\t\twhile( $rs = mysql_fetch_array($result , MYSQL_ASSOC) )\n\t\t\t\t{\n\t\t\t\t\t$Linha = $Auxilio;\n\t\t\t\t\t$Linha = str_replace('<%ID%>',$rs['idusuario'],$Linha);\n\t\t\t\t\t$Linha = str_replace('<%NOME%>',$rs['nome'],$Linha);\n\t\t\t\t\t$Linha = str_replace('<%CPF%>',$rs['cpf'],$Linha);\n\t\t\t\t\t$Linha = str_replace('<%EMAIL%>',$rs['email'],$Linha);\n\t\t\t\t\tif($rs['status'] == '0'){\n\t\t\t\t\t\t$Linha = str_replace('<%STATUS%>','inativo',$Linha);\n\t\t\t\t\t\t$Linha = str_replace('<%BOTAO%>','btn-edit',$Linha);\n\t\t\t\t\t\t$Linha = str_replace('<%BOTAOVALUE%>','Ativar',$Linha);\n\t\t\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$Linha = str_replace('<%STATUS%>','ativo',$Linha);\n\t\t\t\t\t\t$Linha = str_replace('<%BOTAO%>','btn-delete',$Linha);\n\t\t\t\t\t\t$Linha = str_replace('<%BOTAOVALUE%>','Desativar',$Linha);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$Usuarios .= $Linha;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$mensagem = $Banco_Vazio;\n\t\t\t}\n\t\t\treturn $Usuarios;\n\t\t}", "title": "" }, { "docid": "5af11092fdc8e5a81e2c51ab150b7090", "score": "0.71983445", "text": "public function visualizarTodosLosUsuarios()\r\n {\r\n $resultado[]=null;\r\n require_once __DIR__ . '/../../core/conexionBd.php';\r\n $conexionBD = (new ConexionBd())->getConexion();\r\n $stmt = null;\r\n try{\r\n /* Iniciar una transacción, desactivando 'autocommit' */\r\n $conexionBD->beginTransaction();\r\n\r\n $sql = \"SELECT usuario, grupo\r\n FROM dbo.usuario\";\r\n $stmt = $conexionBD->query( $sql );\r\n $contador=0;\r\n while ( $row = $stmt->fetch( PDO::FETCH_ASSOC ) ){\r\n $usuario = $row['usuario'];\r\n $grupo = $row['grupo'];\r\n //crear articulo\r\n require_once __DIR__ . '/../Modelo/usuario.php';\r\n $usuario= new Usuario($usuario,$grupo);\r\n $resultado[$contador] = $usuario;\r\n $contador++;\r\n }\r\n /* Consignar los cambios */\r\n $conexionBD->commit();\r\n }catch(PDOException $e ){\r\n echo \"Error: \".$e;\r\n /* Reconocer el error y revertir los cambios */\r\n $conexionBD->rollBack();\r\n }finally {\r\n \tif($stmt !=null){\r\n $stmt =null;\r\n }\r\n if($conexionBD !=null){\r\n $conexionBD !=null;\r\n }\r\n }\r\n return $resultado;\r\n }", "title": "" }, { "docid": "bc37d91778990bac6c7536ba3068e70f", "score": "0.71872705", "text": "public function allUsuarios(){\n\n return $this->user->allUsuarios();\n }", "title": "" }, { "docid": "10a6fb9a4356c61bf7a5c572afd71c7d", "score": "0.7127669", "text": "public function AllUsers()\r\n {\r\n\t\t@$sql = \"SELECT * FROM usuarios\";\r\n\t\t$result=mysqli_query($this->conn, $sql);\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "a36043e6dc8dd62776327f2bc935ceba", "score": "0.7125168", "text": "public function listarUsers(){\n\t\t$usuarios = User::all();\n\t\t//1er param: vista \n\t\t//$usuarios: variable que llamo en la vista\n\t\treturn view ('cpanel.index', [\n\t\t\t'usuarios' => $usuarios\n\t\t]);\n\t}", "title": "" }, { "docid": "1ff036d85a5b5c191227de5848c9dc7e", "score": "0.71176744", "text": "public function list(){\n $users_cadastrados = users_cadastrados::all(); // An interesting option is, you define whatever you print. Ex: all(\"id\", \"name\"), Will return you only name and id\n\n return $users_cadastrados;\n }", "title": "" }, { "docid": "e65202a07e5baf28ee09761140e27c91", "score": "0.708924", "text": "function listar_usuarios(){\n $sql = 'SELECT * FROM usuario as u, tipos_usuario as t where t.id = u.id_tipo_usuario';\n $result = $this->db->query($sql);\n\n return $result->result_array();\n \n }", "title": "" }, { "docid": "05d9239d30f1be47ac09474a5c193287", "score": "0.7046592", "text": "public function listar() {\n $sentencia = $this->bd->query(\"SELECT * FROM usuario\");\n return $sentencia->fetchAll(\\PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "1e2bb372f10d580bc3fefbef11be8c89", "score": "0.7042513", "text": "public static function getAllUsers() {\n $rows = array(array('id'=>'ID', 'name'=>'Username', 'mail'=>'E-mail', 'registered'=>'Registered at', 'lastloggedin'=>'Last logged in', 'admin'=>'Permission', 'remove'=>'Remove'));\n $sql = \"SELECT id, name, mail, registered, lastloggedin, admin FROM buza_peter_Users LIMIT 30;\";\n $db = database::getConnection();\n $result = $db->query($sql);\n return array_merge($rows, $result->fetchAll(PDO::FETCH_ASSOC));\n }", "title": "" }, { "docid": "56392f83a5bb75c9fce6904045e9f751", "score": "0.7033413", "text": "public function showUsers(){\n $repository = $this->getDoctrine()\n ->getRepository('AppBundle:Utilisateur');\n return $repository->findAll();\n }", "title": "" }, { "docid": "9e64201e7d682eebdef547c933570af8", "score": "0.7033317", "text": "public static function getListUserCli(){\n \n $sql = new Sql();\n $res = $sql->select('SELECT \n a.id_usuario,\n a.email_usuario,\n a.telefone_usuario,\n a.permissao_usuario,\n a.lst_login_usuario,\n a.status_usuario,\n b.id_cliente,\n b.id_usuario,\n b.id_empresa,\n b.cad_dependente,\n b.id_cliente_resp,\n b.nome_cliente,\n b.sobrenome_cliente,\n b.cpf_cliente,\n b.uf_cliente,\n b.cidade_cliente,\n b.dt_cliente,\n b.status_cliente,\n c.id_cidade,\n c.nome_cidade \n FROM usuarios AS a, clientes AS b, tb_cidades AS c\n WHERE a.id_usuario = b.id_usuario\n AND b.cidade_cliente = c.id_cidade');\n return $res;\n \n }", "title": "" }, { "docid": "70cbd6bae61d0aa6c8c42ad4cdea781f", "score": "0.7030722", "text": "public function obtenerUsuarios()\n {\n $db = Db::conectar();\n $select = $db->prepare('SELECT * FROM USUARIOS');\n $select->execute();\n $usuarios = array();\n while ($result = $select->fetch(PDO::FETCH_ASSOC)) {\n $usuario = new Usuario();\n $usuario->setId($result['id']);\n $usuario->setNick($result['nick']);\n $usuario->setPass($result['pass']);\n $usuario->setRol($result['rol']);\n $usuario->setIdEstacion($result['idEstacion']);\n array_push($usuarios, $usuario);//Añade el usuario al array de usuarios.\n }\n return $usuarios;\n }", "title": "" }, { "docid": "b8f7bc5c8dcae190cd7b9416ca5ac79b", "score": "0.70188004", "text": "public function getUserList() {\n $db = $this->dbConnect();\n $req = $db->query(\"SELECT id, username, role, DATE_FORMAT(registrationDate, '%d/%m/%Y at %Hh%imin%ss') AS registrationDate FROM users ORDER BY registrationDate DESC LIMIT 0, 50\");\n $req->setFetchMode(\\PDO::FETCH_CLASS | \\PDO::FETCH_PROPS_LATE,\n 'App\\Model\\User');\n $users = $req->fetchAll();\n return $users;\n }", "title": "" }, { "docid": "a4ad25227a42ebed8dc836b775ede05b", "score": "0.6997303", "text": "public function getUsers()\n {\n return self::$database->usuarios;\n }", "title": "" }, { "docid": "2a86c63ac80603535cc721daaaeaaed8", "score": "0.6989608", "text": "public function cargarUsuarios() {\n try {\n if ($_SESSION['posicion'] == 0) {\n $query = $this->db->connect()->prepare('SELECT u.nombre, u.apellido1, u.apellido2 \n FROM usuario u \n INNER JOIN hoja_de_tiempo h ON u.cedula = h.usuario\n WHERE h.estado = 1');\n\n $query->execute();\n }\n else {\n $query = $this->db->connect()->prepare('SELECT u.nombre, u.apellido1, u.apellido2 \n FROM usuario u \n INNER JOIN hoja_de_tiempo h ON u.cedula = h.usuario\n WHERE h.estado = 1 AND u.departamento = :departamento');\n\n $query->execute(['departamento' => $_SESSION['departamento']]);\n }\n\n $nombres = [];\n $nombre = \"\";\n\n while ($registro = $query->fetch(PDO::FETCH_ASSOC)) {\n $nombre = $registro['nombre'] . \" \" . $registro['apellido1'] . \" \" . $registro['apellido2'];\n array_push($nombres, $nombre);\n }\n\n return $nombres;\n }\n catch (PDOException $e) {\n return $e;\n }\n }", "title": "" }, { "docid": "5aa96da684e0efeddfd93964210673e3", "score": "0.6986655", "text": "public function GetAll(){\n $query = $this->db->prepare('SELECT * FROM usuarios');\n $query->execute();\n $users = $query->fetchAll(PDO::FETCH_OBJ); \n return $users;\n }", "title": "" }, { "docid": "aeb32087ac5bc4329167b016686f2f7d", "score": "0.6974763", "text": "public function getAllUsers();", "title": "" }, { "docid": "aeb32087ac5bc4329167b016686f2f7d", "score": "0.6974763", "text": "public function getAllUsers();", "title": "" }, { "docid": "618a185522488066af3ad4f4ba6d9bdb", "score": "0.6970442", "text": "public function obtenerDatosUsuarios()\n {\n $datosDeUsuarios = array();\n \n $datosDeUsuarios = Datos::traerDatosUsuarios();\n\n return $datosDeUsuarios;\n }", "title": "" }, { "docid": "8cbea32a6e590c71af2a3d7147ab4e0f", "score": "0.6961622", "text": "public function list_users() {\n global $om;\n return $om->shed->list_keys($this->_localize('users'));\n }", "title": "" }, { "docid": "2e5af48d0fe813dc77e165943204654d", "score": "0.6950719", "text": "public function Listar()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$stm = $this->pdo->prepare(\"SELECT * FROM usuarios, tipousuario WHERE usuarios.idTipo=tipousuario.idTipo AND activo=1\");\n\t\t\t$stm->execute();\n\t\t\treturn $stm->fetchAll(PDO::FETCH_OBJ);\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tdie($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "147914ee78c32eae2304495229ad03ef", "score": "0.69082654", "text": "public function listar_usuarios()\r\n {\r\n \r\n // Method should not be directly accessible \r\n if( $this->auth_role == 'admin' )\r\n {\r\n $this->load->model('sistema/Model_usuarios') ;\r\n $lst_usuarios = $this->Model_usuarios->listar_usuarios();\r\n \r\n $data = array (\r\n 'lst_usuarios' => $lst_usuarios\r\n );\r\n \r\n $this->load->view('sistema/usuarios', $data); \r\n \r\n \r\n }\r\n \r\n }", "title": "" }, { "docid": "ab3d0c9e74a4d686f0e067cdbe595cbd", "score": "0.690437", "text": "public function getUsuarios(){\n\t\t$sql = \"SELECT u.id_usuario,u.usuario,u.nombre_usu,u.apellido_usu,u.telefono_usu,u.correo_usu,u.direccion_usu,t.nombre_tipo_usu FROM usuario as u INNER JOIN tipo_usuario as t ON u.tipo_usu = t.id_tipo_usu WHERE id_tipo_usu = 1 || id_tipo_usu = 2 || id_tipo_usu = 3\";\n\t\t$params = array(null);\n\t\treturn Database::getRows($sql, $params);\n\t}", "title": "" }, { "docid": "cb5d8b5b21dc982b021b7825587195ea", "score": "0.6885054", "text": "public function getUsuarios(){\n //return GenericoDAO::EjecutarConsulta($sql);\n $query = \"select usuarios.*, tipo_usuario.nombre as nom_tipo\n\n FROM `usuarios` \n\n INNER JOIN tipo_usuario ON tipo_usuario.pkID=usuarios.fkID_tipo\";\n\n return GenericoDAO::EjecutarConsulta($query);\n }", "title": "" }, { "docid": "5ef5cb039fe72ae3ce4f5f402f32d96c", "score": "0.68720114", "text": "public function listarAllUsers(){\n\t\t$usuarios = User::paginate(8);\n\t\treturn view ('cpanel.listadoMagos', [\n\t\t\t'usuarios' => $usuarios\n\t\t]);\n\t}", "title": "" }, { "docid": "c0e9d070b7405c4852e1886a05dc635a", "score": "0.684491", "text": "public function listarUser() {\n \n $eval = \"SELECT * FROM usuario\";\n $peticion = $this->db->prepare($eval);\n $peticion->execute();\n $resultado = $peticion->fetchAll(PDO::FETCH_OBJ);\n exit(json_encode($resultado));\n \n }", "title": "" }, { "docid": "9614f128e223620282ed7b9430937512", "score": "0.68447864", "text": "public function getListado() {\r\n\t\t$conn = $this->setConection(); // En este caso no se pasa como parametro\r\n\t\ttry {\r\n\t\t\t$tb = mysqli_select_db($conn, $this->dataBaseName);\r\n\t\t\tif(!$tb) {\r\n\t\t\t\tthrow new Exception('Error de Base de Datos: '.mysqli_error());\r\n\t\t\t}\r\n\t\t\t$query = \"SELECT * FROM Usuarios ORDER BY id Asc\";\r\n\t\t\t$this->results = mysqli_query($conn, $query);\r\n\t\t\tif(!$this->results) {\r\n\t\t\t\tthrow new Exception('Error de Tabla: '.mysqli_error());\r\n\t\t\t} \r\n\t\t\t$arr = array();\r\n\t\t\twhile($row = mysqli_fetch_row($this->results)) {\r\n\t\t\t\t$add=array($row[0], $row[1], $row[2]);\r\n\t\t\t\tarray_push($arr, $add); \r\n\t\t\t}\r\n\t\t\tmysqli_close($conn);\r\n\t\t\treturn $arr; // pasar el array a la vista.\r\n\t\t} catch (Exception $ex) {\r\n\t\t\tdie($ex->getMessage());\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "6e82d5f66c7a5d7be97376974c8bcff0", "score": "0.6824104", "text": "function getUsuarios()\n\t{\n\t\t$conexion=new Conexion();\n\t\t$conexion=$conexion->conectarConBaseDatos();\n\t\t$statement=$conexion->prepare(\"SELECT * FROM infoPersonasEstados ORDER BY nombre ASC\");\n\t\t$statement->execute();\n\t\t$arreglo=$statement->fetchAll();\n\t\treturn $arreglo;\n\t}", "title": "" }, { "docid": "7229a02ede82fc5a223bfafc15280daa", "score": "0.68148", "text": "public function getAllUsers(){\n return $this->securityDAO->getAllUsersDAO();\n }", "title": "" }, { "docid": "a76d407a7442fbd251ca7256c2fca549", "score": "0.6811666", "text": "public static function getUsuarios()\n {\n $query = \"SELECT id_usuario,nombres,apellidos,nro_documento,telefono,nacionalidad,estado,usuario,id_tipo_documento,id_genero,id_tipo_usuario FROM usuario\";\n\n self::getConexion();\n\n $resultado = self::$cnx->prepare($query);\n\n $resultado->execute();\n\n $filas = $resultado->fetchAll();\n\n return $filas;\n }", "title": "" }, { "docid": "10c10160f39a78029c8baea2ba4e5bda", "score": "0.6808562", "text": "function listagrupoUsuario(){\n\n\t$sql = \"SELECT * FROM USU_GRUPO WHERE (login = '$this->login')\";\n\t$result = $this->mysqli->query($sql);\n\t$num=0;\n\t$lista=null;\n\twhile ($row = mysqli_fetch_array($result)) {\n\t\t$lista[$num] = $row['IdGrupo'];\n\t\t$num++;\n\t}\n\treturn $lista;\n\n}", "title": "" }, { "docid": "f58fedd7a2af1ab0ad4f91a0c01e68fe", "score": "0.68064845", "text": "public function usuarios()\n {\n return $this->vistasDocSimple(\"principal/documentacion/seguridad/usuarios\");\n }", "title": "" }, { "docid": "1905727d556fdce56f00e8ac7ee8d3ea", "score": "0.68043303", "text": "function userList() {\n\t\t$link = Db::link();\n\t\t$list = array();\n\t\t\t\n\t\t$sql = 'SELECT user_id, user_name, user_rank, user_mail, v.nb,\n\t\t user_language, user_tokenid, user_strongauth\n\t\t FROM uservca\n\t\t LEFT JOIN (SELECT vps_owner, count(vps_owner) as nb\n\t\t FROM vps GROUP BY vps_owner) v\n\t\t ON v.vps_owner=uservca.user_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->user_id] = array(\n\t\t\t\t\t'user_id' => $do->user_id,\n\t\t\t\t\t'user_name' => $do->user_name,\n\t\t\t\t\t'user_rank' => $do->user_rank,\n\t\t\t\t\t'user_mail' => $do->user_mail,\n\t\t\t\t\t'user_language' => $do->user_language,\n\t\t\t\t\t'user_tokenid' => $do->user_tokenid,\n\t\t\t\t\t'user_strongauth'=> $do->user_strongauth,\n\t\t\t\t\t'nb_vps' => $do->nb\n\t\t\t);\n\t\t}\n\t\t\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "57755c44f83b01863cb6d2736eedd037", "score": "0.6799015", "text": "public function getuserlistAction()\n {\n $params = $this->_getAllParams();\n $userList = KC\\Repository\\User::getUserList($params);\n echo $userList;\n die();\n }", "title": "" }, { "docid": "374659b870393abc39abce22730e23e5", "score": "0.67935836", "text": "private function getImportantUsers() {\n $this->admin[] = new Users(1);\n $this->admin[] = new Users(3);\n $this->admin[] = new Users(4);\n }", "title": "" }, { "docid": "346574b6db988f7a4cf05130407ea312", "score": "0.6786728", "text": "public function getUsers();", "title": "" }, { "docid": "346574b6db988f7a4cf05130407ea312", "score": "0.6786728", "text": "public function getUsers();", "title": "" }, { "docid": "81731ccbd84eb313ba96d3bb37791436", "score": "0.677883", "text": "public function getList_user(){\n $users = User::all();\n return $this->render('admin/list-users.twig', ['users' => $users]);\n }", "title": "" }, { "docid": "4de0ca5ce6fb34d380f0c512b8a69d7f", "score": "0.6775936", "text": "public function userList()\n {\n // Create return array\n $returnArray = array();\n // Load User model\n $userModel = new User();\n // Get active user list\n $userActiveList = $userModel->getActive();\n // If return is an error\n if ($userActiveList === false) {\n // Send JSON error return\n $returnArray['success'] = false;\n $returnArray['error']['code'] = 'USER_LIST';\n $returnArray['error']['message'] = 'Erreur lors de la récupération des utilisateurs.';\n header('Content-Type: application/json');\n echo json_encode($returnArray);\n exit();\n }\n // Create return data array\n $returnData = array();\n $index = 0;\n // Foreach user add to data array\n foreach ($userActiveList as $userActive) {\n $returnData[$index]['id'] = $userActive['usr_id'];\n $returnData[$index]['login'] = $userActive['usr_login'];\n $index++;\n }\n // Update connection date (for user list)\n $result = $userModel->updateConnection($_SESSION['user']['id']);\n // If error return json error message\n if ($result === false) {\n $returnArray['success'] = false;\n $returnArray['error']['code'] = 'USER_CONNEXION';\n $returnArray['error']['message'] = 'Une erreur est survenue durant la mise a jour de votre date de connexion.';\n header('Content-Type: application/json');\n echo json_encode($returnArray);\n exit();\n }\n // Return json success with data array\n $returnArray['success'] = true;\n $returnArray['data'] = $returnData;\n header('Content-Type: application/json');\n echo json_encode($returnArray);\n exit();\n }", "title": "" }, { "docid": "ea52d90ab2d18cab2089cedceefab78e", "score": "0.6767313", "text": "public function showAll(){\r\n\t\tif($_SESSION['statut'] == '1'){\r\n\t\t\techo \"Vous n'êtes pas autorisé à accéder à cette page\";\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$list = User::getList();\r\n\t\t\tforeach ($list as $user) {\r\n\t\t\t\techo \"<p> Nom Prénom : \".$user->nom.\" \".$user->prenom.\"</p>\";\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "b5cb4a57a63ce5cb2990965ddff201e0", "score": "0.67551", "text": "function listaAll() {\n require ROOT . \"config/bootstrap.php\";\n return $em->getRepository('models\\Usuarios')->findby(array(), array(\"id\" => \"DESC\"));\n $em->flush();\n }", "title": "" }, { "docid": "2b4f58dd584b24cbd89304590e763cba", "score": "0.6746233", "text": "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM usuarios';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "title": "" }, { "docid": "8f3b0a87925a143e1f350225f627336b", "score": "0.6741528", "text": "protected function getUsers() {\n\t\t$userList = new UserList;\n\t\treturn $userList->get(INF);\n\t}", "title": "" }, { "docid": "ac00309661ccc120bf68a88757ebc87d", "score": "0.67407", "text": "public function listar() {\n return $this->dame_query(\"select usuario.*, tipo_usuario.nombre rol \n from usuario \n inner join tipo_usuario on usuario.tipo_usuario = tipo_usuario.id\");\n }", "title": "" }, { "docid": "4b88146a233543c3f5740f7c03ed9ad4", "score": "0.67383295", "text": "public static function listar() {\n return array(0=> array(\"id\"=>\"1\", \"nome\"=>\"Usuario 1\"), 1=> array(\"id\"=>\"2\", \"nome\"=>\"Usuario 2\"));\n }", "title": "" }, { "docid": "18e07925e9353162559ebcb1df8fe501", "score": "0.6724297", "text": "public function listar()\n\t{\n\t\t$sql=\"SELECT * FROM usuario\";\n\t\treturn ejecutarConsulta($sql);\n\t}", "title": "" }, { "docid": "f8bd1af0c4e30bf2207a71e033261af1", "score": "0.6705202", "text": "public function users(){\n $db = $this->getPDO();\n $sql = \"SELECT * FROM utilisateurs\";\n $users = $db->query($sql);\n return $users;\n }", "title": "" }, { "docid": "ce1335caf445e3a32af1e11a3f3082a9", "score": "0.6699284", "text": "public function findAll(): array\n {\n // Récupérer la liste des utilisateurs\n $select = $this->connection->query(\n 'SELECT id, email, password, droit, nom, prenom FROM user'\n );\n\n // Liste d'utilisateurs à renvoyer\n $users = [];\n\n // Boucle sur les résultats de la requete\n while (false !== $data = $select->fetch(PDO::FETCH_ASSOC)) {\n $users[] = $this->buildUser($data);\n }\n\n // Renvoi la liste des utilisateurs\n return $users;\n }", "title": "" }, { "docid": "cf1f8c5ee817ab4c4b9131fe5016c9cf", "score": "0.66950494", "text": "public function getList()\n {\n $users = CHtml::listData(User::model()->findAll(), 'id', 'name');\n\n $this->setOutput('result', !empty($users));\n $this->setOutput('users', $users);\n }", "title": "" }, { "docid": "e55e07f19af7d280abee9ed0ca4137f8", "score": "0.6683272", "text": "public function getAllUsers(){\n $arrayObjetosUsuarios = [];\n\n $arrayStringUsuarios = explode(PHP_EOL,\"usuarios.php\");\n\n foreach ($arrayStringUsuarios as $stringUsuario) {\n $arrayUsuario = json_encode($stringUsuario);\n $arrayObjetosUsuarios[] = new Usuario($arrayUsuario);\n }\n\n return $arrayObjetosUsuarios;\n }", "title": "" }, { "docid": "afee78e1fddd6635c3ee9a8af6f2e81d", "score": "0.6676644", "text": "public function list(){\n\t\t$array_user = $this->User->find('all', array(\n\t\t'conditions'=>array('id > 0'),\n\t\t'recursive' =>-1\n\t\t));\n\t\t//đưa dữ liệu lấy được qua view bằng biến users\n\t\t$this->set('users', $array_user);\n\t}", "title": "" }, { "docid": "2ff1811f62d9f0dab31f6d648e60920c", "score": "0.66748226", "text": "public function createUsernameList() {\r\n $sql = \"SELECT username FROM tbl_user\";\r\n $command = Yii::app()->db->createCommand($sql);\r\n $rows = $command->queryAll();\r\n //format it for use with auto complete widget\r\n $usernames = array();\r\n foreach ($rows as $row) {\r\n $usernames[] = $row['username'];\r\n }\r\n return $usernames;\r\n }", "title": "" }, { "docid": "bfc18e4a8c222bc8fc96625e1e57a234", "score": "0.6670921", "text": "public function mostrarUsuarios()\n {\n $usuarios = User::all(); \n \n return View::make('usuarios.lista', array('usuarios' => $usuarios));\n \n }", "title": "" }, { "docid": "8716a88c23d0d68cd3ca024873206ec4", "score": "0.66684926", "text": "public function getUsersList() \n \t{\n\t\t$select = $this->db->select()->from('users', array('*'));\n\t\t\t\t\n\t\treturn $this->fetchAll($select, 'User');\n \t}", "title": "" }, { "docid": "9cac2273cf64189246a398958caef9f4", "score": "0.6663502", "text": "public function users()\n {\n \treturn $this->usersList->pluck('user');\n }", "title": "" }, { "docid": "08ddac494a58930042f50eaa8a174036", "score": "0.6645416", "text": "function getUsuarios(){\n $cnn = mysqli_connect(HOST,USER,PASS,BBDD);\n if ($cnn){\n $users=[];\n $query = \"SELECT * FROM USUARIOS\";\n $rest = mysqli_query($cnn, $query);\n if ($rest){\n while ($user = mysqli_fetch_assoc($rest)){\n $users[] = $user;\n }\n }\n }\n return $users;\n}", "title": "" }, { "docid": "0c1c28f2886af824052bc4c8ced9daff", "score": "0.6644935", "text": "function listarUsuarios($item)\r\n {\r\n //creo un objeto de la clase Usuario, donde esta la consulta\r\n $mensaje = new Mensajes_JSON();\r\n $usuario = new usuario();\r\n $usuarios = array();\r\n\r\n $res = $usuario->obtenerUsuarios($item);\r\n\r\n if($res->rowCount())\r\n {\r\n while($row = $res->fetch(PDO::FETCH_ASSOC))\r\n { \r\n $item = array(\r\n 'id' =>$row['idUsuario'],\r\n 'nombre' =>$row['nombreCompleto'],\r\n 'usuario' =>$row['usuario'],\r\n 'dui' =>$row['dui'],\r\n 'carnet' =>$row['carnet'],\r\n 'correo' =>$row['correo'],\r\n 'telefono' =>$row['telefono'],\r\n 'password' =>$row['password'],\r\n 'idRol' =>$row['idRol'],\r\n 'rol' =>$row['rol'],\r\n 'idEstado' =>$row['idEstado'],\r\n 'estado' =>$row['estado'],\r\n 'fechaCreacion' =>$row['fechaCreacion']\r\n );\r\n array_push($usuarios, $item);\r\n }\r\n $mensaje->printJSON($usuarios);\r\n }\r\n else\r\n {\r\n $mensaje->error('No hay elementos seleccionados');\r\n }\r\n }", "title": "" }, { "docid": "e5f5b1c669a3d3d7745e5445b3f5010d", "score": "0.66363007", "text": "public static function getList() {\n $sql = new Sql();\n return $sql->select(\"SELECT * FROM tb_usuario ORDER BY id ASC\");\n }", "title": "" }, { "docid": "42bffe594b7e165bf1763a5dbf99412c", "score": "0.663082", "text": "public function usuarios() {\n $usuarios = Usuario::orderBy('nombre', 'asc')->get();\n return view('admin.usuarios', compact('usuarios'));\n }", "title": "" }, { "docid": "35b6492d40c04e2fa8b3455055db8304", "score": "0.66302234", "text": "function list_usuarios($busca, $page, $orden, $lista) {\n\t\t\tglobal $tabla_usuarios;\n\t\t\t\n \n\t\t\t$paginacion = 50; \n\t\t\tif($page == '') $page = '0';\n\t\t\telse {\n\t\t\t\t$page = $page - 1; \n\t\t\t\t$page = $page * $paginacion;\n\t\t\t} \n\t\t\t$limit = \"LIMIT $page, $paginacion\";\n\t\t\t\n\t\t\t//SORTEAR ASCENDENTE O DESCENDENTE\n \tif($lista == \"\") $lista_query = \"ASC\";\n\t\t\telse if ($lista == \"ASC\") $lista_query = \"DESC\"; \n\t\t\telse if ($lista == \"DESC\") $lista_query = \"ASC\"; \n\t\t\t\n\t\t\t//SORTEAR POR CAMPO\n\t\t\tif($orden == \"\") $orden = \"representaciones.nombre\";\t\n\t\n\t\t\tif($busca != '' && $busca != 'Buscar usuario'){ $where .= \" AND nombre Rlike '$busca' OR iniciales Rlike '$busca'\"; $limit = \"LIMIT 0,$paginacion\"; $page = 0;}\n\t\t\t$max_pg = run_select_query(\"SELECT COUNT(id) AS id FROM $tabla_usuarios $where\");\n\t\t\t//echo \"SELECT COUNT(id) AS id FROM $tabla_usuarios $where\";\n\t\t\t\n\t\t\t$max_pg = $max_pg[0]['id']; $max_pg /= $paginacion;$max_pg = ceil($max_pg);\n\t\t\t\n $usuario = run_select_query(\"SELECT usuarios.id,\nusuarios.representacion,\nusuarios.departamento,\nusuarios.nombre,\nusuarios.correo,\nusuarios.cumple,\nrepresentaciones.nombre as representacion\nFROM\n$tabla_usuarios\nINNER JOIN representaciones ON representaciones.id = usuarios.representacion where (1 = 1) $where order by $orden $lista_query $limit\"); \n\t\t\t\n\t\t\t?>\n\t\t\t<table>\n\t\t\t<tr>\n\t\t\t<td>\n\t\t\t<div id=\"toolbar-box\">\n\t\t\t\t<div class=\"t\">\n\t\t\t\t\t<div class=\"t\">\n\t\t\t\t\t\t<div class=\"t\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t<div class=\"m\">\n\t\t\t\t\t<div class=\"clr\"></div>\n\t\t\t\t\t<div class=\"toolbar\" id=\"toolbar\">\n\t\t\t\t\t\t\t<table class=\"toolbar\">\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t<td class=\"button\" id=\"toolbar-new\"> \n\t\t\t\t\t\t\t\t\t<a href=\"index.php?add_usuario&page=<?php echo $page/$paginacion + 1 ?>\" class=\"toolbar\"> \n\t\t\t\t\t\t\t\t\t<span class=\"icon-32-new\" title=\"Nuevo\"> \n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<img src=\"images/agregar_usuario.png\" alt=\"Agregar usuario\" title=\"Agregar usuario\"> \n\t\t\t\t\t\t\t\t\tAgregar - usuario\n\t\t\t\t\t\t\t\t\t</a> \n\t\t\t\t\t\t\t\t\t</td> \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t </div>\n\t\t\t\t \n\t\t\t\t\t\t <div class=\"header galeria\">\n\t\t\t\t\t\t\tAdministrador de usuarios</div>\n\t\t\t\t\t\t <div class=\"clr\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t<div class=\"b\">\n\t\t\t\t\t<div class=\"b\">\n\t\t\t\t\t\t<div class=\"b\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\n\t\t\t <div id=\"element-box\">\n\t\t\t\t\t\t<div class=\"t\">\n\t\t\t\t\t\t\t<div class=\"t\">\n\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"t\"></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"m\">\n\t\t\t<form name=\"form_list_usuario\" action=\"index.php\" method=\"get\">\n\t\t\t<table >\n\t\t\t\t<tr>\n\t\t\t\t <td colspan='4'>\n\t\t\t\t Pages -\n\t\t\t\t\t<?PHP for($i=1; $i <= $max_pg; $i++){\n\t\t\t\t\t\t$pagina = $page/$paginacion + 1;\n\t\t\t\t\t\tif($pagina == $i){ \n\t\t\t\t\t\t$estilo = \"style='color:#0066CC'\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\telse $estilo = \"style='color:#0000'\";\n\t\t\t\t\t\techo \" <a href='index.php?admin_usuarios&page=$i' $estilo >$i</a> -\";\n\t\t\t\t\t}?>\n\t\t\t\t\t\t <input class='small_width highlight small' type=\"text\" name=\"busca\" value=\"<?php if($busca != '' && $busca != 'Buscar usuarios') echo $busca; else echo \"Buscar usuarios\"; ?>\" id=\"id_busca\" tabindex='2' />\n\t\t\t\t\t\t <span class=\"highlight small center\">\n\t\t\t\t\t\t <input type=\"submit\" name=\"admin_usuarios\" value=\"Go\" id=\"admin_usuarios\" class=\"button super_tiny\"/>\n\t\t\t\t\t\t </span> </td> \n\t\t\t\t\t\t\n\t\t\t </tr>\n\t\t\t </table>\n\t\t\t\n\t\t\t\t<table class=\"adminlist\">\n\t\t\t\t<tr>\n\t\t\t\t <thead>\n\t\t\t\t <th class=\"title\">Opciones</th>\n\t\t\t\t <th class=\"title\"><a href=\"index.php?admin_usuarios&busca=<?php echo $busca; ?>&page=<?php echo $pagina; ?>&orden=representaciones.nombre&lista=<?php echo $lista_query ?>\">Representación</a></th>\n\t\t\t\t <th class=\"title\"><a href=\"index.php?admin_usuarios&busca=<?php echo $busca; ?>&page=<?php echo $pagina; ?>&orden=usuarios.departamento&lista=<?php echo $lista_query ?>\">Departamento</a></th>\n\t\t\t\t <th class=\"title\"><a href=\"index.php?admin_usuarios&busca=<?php echo $busca; ?>&page=<?php echo $pagina; ?>&orden=usuarios.cargo&lista=<?php echo $lista_query ?>\">Cargo</a></th>\n <th class=\"title\"><a href=\"index.php?admin_usuarios&busca=<?php echo $busca; ?>&page=<?php echo $pagina; ?>&orden=usuarios.nombre&lista=<?php echo $lista_query ?>\">Nombre</a></th> \n <th class=\"title\">Iniciales</th>\n\t\t\t\t <th class=\"title\">Correo </th>\n\t\t\t\t <th class=\"title\">Cumpleaños </th>\n\t\t\t\t </thead>\n\t\t\t </tr>\n\t\t\t\t\n\t\t\t<?php\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\n\t\t\tif($usuario)\n\t\t\tforeach($usuario as $key => $value) {\n\t\t\tif($key\t % 2 == 0) $renglon = 0; else $renglon = 1;\n\t\t\t\n\t\t\t\t\t$id = $usuario[$key]['id'];\n\t\t\t\t\t$representacion = $usuario[$key]['representacion'];\n\t\t\t\t\t$departamento = $usuario[$key]['departamento'];\n\t\t\t\t\t$cargo = $usuario[$key]['cargo'];\n\t\t\t\t\t$nombre = $usuario[$key]['nombre'];\n\t\t\t\t\t$iniciales = $usuario[$key]['iniciales'];\n\t\t\t\t\t$correo = $usuario[$key]['correo'];\n\t\t\t\t\t$cumple = $usuario[$key]['cumple'];\n\t\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?>\n\t\t\t\t\n\t\t\t\t<tr class=\"row<?php echo $renglon; ?>\">\n\t\t\t\t\t<td class=\"center\">\n\t\t\t\t\t\t<a href='index.php?edit_usuarios&id=<?php echo $id ?>&busca=<?php echo $busca ?>&page=<?php echo $page/$paginacion + 1 ?>&orden=<?php echo $orden ?>&lista=<?php echo $lista ?>' title='Edit'><img src=\"images/editar.png\" alt=\"Editar\" title=\"Editar\"></a> | \n\t\t <a href='index.php?del_usuario&id=<?php echo $id ?>&busca=<?php echo $busca ?>&page=<?php echo $page/$paginacion + 1 ?>&orden=<?php echo $orden ?>&lista=<?php echo $lista ?>' title='Delete' onclick=\"return confirm('Está seguro de eliminar a: <?php echo $nombre?>?')\"><img src=\"images/eliminar.png\" alt=\"Eliminar\" title=\"Eliminar\"></a> | <a href=\"index.php?asigna_permisos&id_usuario=<?php echo $id ?>&busca=<?php echo $busca ?>&page=<?php echo $page/$paginacion + 1 ?>&orden=<?php echo $orden ?>&lista=<?php echo $lista ?>\">Permisos</a>\t\t\t\t</td>\n\t\t\t\t\t\t<td><?php echo $representacion ?></td>\n <td><?php echo $departamento ?></td>\n <td><?php echo $cargo ?></td>\n <td><?php echo $nombre ?></td>\n\t\t\t\t\t\t<td><?php echo $iniciales ?></td>\n\t\t\t\t\t\t<td><?php echo $correo ?></td>\n\t\t\t\t\t\t<td><?php echo $cumple ?></td>\n\t\t\t\t\t \n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<?php\n\t\t\t} // -foreach s\n\t\t\t?>\n\t\t\t</table>\n\t\t\t</form>\n\t\t\t <div class=\"clr\"></div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"b\">\n\t\t\t\t\t<div class=\"b\">\n\t\n\t\t\t\t\t\t<div class=\"b\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\n\t\t\t\n</td></tr></table>\n\t\t\t<?php\n\t\t}", "title": "" }, { "docid": "64d0f7ba78e004ed2827c542fd380ced", "score": "0.6620299", "text": "public function loadUsers(){\n\t\t $user_list ='';\n\t\t\t//getting list of users\n\t\t\t$query = \"SELECT * FROM user WHERE is_deleted=0 ORDER BY type\";\n\t\t\t$users = self::$db->executeQuery($query);\n\n\t\t\tself::$db->verifyQuery($users);\n\n\t\t\twhile($user = mysqli_fetch_assoc($users)){\n\t\t\t\t$user_list.= \"<tr>\";\n\t\t\t\t$user_list.= \"<td>{$user['first_name']}</td>\";\n\t\t\t\t$user_list.= \"<td>{$user['last_name']}</td>\";\n\t\t\t\t$user_list.= \"<td>{$user['email']}</td>\";\n\t\t\t\t$user_list.= \"<td>{$user['type']}</td>\";\n\t\t\t\t$user_list.= \"<td>{$user['last_login']}</td>\";\n $user_list.= \"<td><a class=\\\"btn btn-success btn-sm edit_data\\\" name=\\\"edit\\\" value=\\\"Edit\\\" id=\\\"{user['id']}\\\"><span class=\\\"glyphicon glyphicon-edit\\\"></span> Change Password</a></td>\";\n $user_list.= \"<td><a class=\\\"btn btn-danger btn-sm\\\" name=\\\"delete\\\" value=\\\"Delete\\\" id=\\\"{$user['id']}\\\"><span class=\\\"glyphicon glyphicon-trash\\\"></span> Delete</a></td>\";\n\t\t\t\t$user_list.= \"</tr>\";\n\t\t\t}\n\t\t\treturn $user_list;\t\t\n\t\t}", "title": "" }, { "docid": "7468ba442a95e2db3c882ad948e7db21", "score": "0.6611734", "text": "public function getUsers(){\n\n //llamamos al modelo para buscarlos\n $users = $this->model->getUsers();\n \n //manejo el codigo respuesta\n if ($users){\n $this->view->response($users, 200);\n }else {\n $this->view->response(\"no existen comentarios\", 404);\n }\n }", "title": "" }, { "docid": "9bcde511e524f835ee9ae25bdcaf623e", "score": "0.66090876", "text": "public function listarUsuarios(){\n $this->view->show(\"listausuarios\");\n }", "title": "" }, { "docid": "f9251595326e0f2cffd07ce6d3715abb", "score": "0.65956384", "text": "public function getAdminUsers();", "title": "" }, { "docid": "b44c5a5bc26474d0fcfe9ad645d60964", "score": "0.6591739", "text": "function getUserList()\n\t{\n\t\t$users = XN_Query::create('Content')->tag(\"Users\")\n\t\t\t\t\t\t\t->filter('type', 'eic', 'Users')\n\t\t\t\t\t\t\t->filter('my.deleted', '=', '0')\n\t\t\t\t\t\t\t->execute();\n\t\t$userlist = array ();\n\t\tforeach ($users as $user)\n\t\t{\n\t\t\t$givename = $user->my->givename;\n\t\t\tif (isset($givename) && $givename != \"\")\n\t\t\t{\n\t\t\t\t$userlist[$user->my->profileid] = $user->my->givename;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$userlist[$user->my->profileid] = $user->my->last_name;\n\t\t\t}\n\t\t}\n\n\t\treturn $userlist;\n\t}", "title": "" }, { "docid": "a066c39af4e13a34560965a0de1d5dbd", "score": "0.6588209", "text": "public function getListOfUsers_get() {\n\n $lists = $this->user_model->getListOfUsers();\n if (!is_null($lists)) {\n $this->response($lists, 200);\n } else {\n $this->response(array('error' => 'NO HAY RESULTADOS'), 404);\n }\n }", "title": "" }, { "docid": "7700d96ee2b4d7c32d529e778e104cae", "score": "0.658505", "text": "public function listaUsuario()\n\t{\n\t\t$this->load->view('layouts/header');\n\t\t$this->load->view('layouts/aside');\n\t\t$data['usuario']=$this->usuario_model->retornarUsuario();\n\t\t$this->load->view('admin/usuario/lista',$data);\n\t\t$this->load->view('layouts/footer');\n\t}", "title": "" }, { "docid": "f54185eecfe969dc117d8399299b4719", "score": "0.6581103", "text": "public function userList()\n {\n return $this->getService()->resourceList('User', $this->getUrl('users'), $this);\n }", "title": "" }, { "docid": "265d5e7c5ccc11f9c17b16a7d3ad661c", "score": "0.6580611", "text": "function get_users_list() {\n return $this->query(\"SELECT CONCAT(COALESCE(sca_first,''), ' ', COALESCE(sca_last,''), ' [',COALESCE(first,''),' ',COALESCE(last,''),'] ') AS name, id \n FROM user ORDER BY sca_first, sca_last, first, last\");\n }", "title": "" }, { "docid": "385ba85f673aa04749828a79a4092416", "score": "0.6572756", "text": "public function createUsernameList()\n\t{\n\t\t$sql = \"SELECT username FROM tbl_user\";\n\t\t$command = Yii::app()->db->createCommand($sql);\n\t\t$rows = $command->queryAll();\n\t\t//format it for use with auto complete widget\n\t\t$usernames = array();\n\t\tforeach($rows as $row)\n\t\t{\n\t\t\t$usernames[]=$row['username'];\n\t\t}\n\t\treturn $usernames;\n\t\t\n\t}", "title": "" }, { "docid": "047681efccc51519742ec463ce119b84", "score": "0.6568868", "text": "public function showUsers () {\n // Confirm the requestie is an abmin.\n if (!self::isActive()) { return false; }\n // Get all users.\n $users = parent::getUsers();\n // Remove self and the main 'admin' user.\n foreach ($users as $i => $user) {\n if ($user->username == 'admin' || ($user->username == self::$admin->username && $user->type == 2)) {\n array_splice($users, $i, 1);\n }\n }\n // Return the users.\n return $users;\n }", "title": "" }, { "docid": "73367a9cc2ea5660f36cbc97a991f381", "score": "0.6566801", "text": "function listUsers() {\r\n\t\t$query = \"SELECT * from users\";\r\n\t\t$result = mysql_query($query);\r\n\t\t\r\n\t\twhile($row = mysql_fetch_array($result))\r\n\t\t{\r\n\t\t\techo \"<option value=\".$row['username'].\">\".$row['email'].\"</option>\";\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "b52633f6e1c56580ef7b9d412c325568", "score": "0.6564706", "text": "public function index() {\n if(!Auth::user()->hasPermissionTo('user_list')) { abort(403); }\n\n // Se muestra la vista con el listado de usuarios\n return view('admin.user.index')->with([\n 'users' => User::all()\n ]);\n }", "title": "" }, { "docid": "6673d9d98d5b16add50ecf3b4c298833", "score": "0.655621", "text": "public function listCurrentUsers() {\n\t\tPresentation::presentation_type('plain-text');\n\n\t\t// set users information array\n\t\t$users_info = UserModel::getCurrentUsersData();\n\n\t\t// output user information\n\t\tfor ($i = 0; $i < count($users_info); $i++) {\n\t\t\techo 'User ID: ' . $users_info[$i]['user_id'] . \"\\n\";\n\t\t\techo 'Username: ' . $users_info[$i]['user_name'] . \"\\n\";\n\t\t\techo 'User Email: ' . $users_info[$i]['user_email'] . \"\\n\";\n\n\t\t\tif ($i != count($users_info) - 1) {\n\t\t\t\techo '--------------------------------------' . \"\\n\";\t\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}", "title": "" }, { "docid": "c8870499291e7bd06c7f8cac810bad93", "score": "0.65527284", "text": "public static function all()\n {\n $db = Database::getInstance();\n $list = $db->all('utilisateur');\n\n foreach ($list as &$model) {\n $data = $model;\n $model = new Utilisateur();\n $model->setData($data);\n $model->initRole($data);\n $model->initCommune($data);\n }\n\n return $list;\n }", "title": "" }, { "docid": "44c3808ca5a6399e85aa0d2ff55901bb", "score": "0.6552195", "text": "public function buscarUsuario($id){\n $usuarioDAO = new UsuarioDAO();\n\t\t\t\n\t\t\t//armazenando os dados da consulta em uma variável\n $listUsuarios = $usuarioDAO->SelectByID($id);\n\n\t\t\t//retornando a lista com os dados\n return $listUsuarios;\n }", "title": "" }, { "docid": "8449cc5e1eab50c2d08f82860bdbc663", "score": "0.6541825", "text": "public function usuarios()\n\t{\n\t\t//$this->db->order_by('usuario','asc');\n\t\t$usuarios= $this->db->get('usuarios');\n\t\tif($usuarios->num_rows()>0)\n\t\t{\n\t\t\treturn $usuarios->result();\n\t\t}\n\t}", "title": "" }, { "docid": "e605e93c55a366c107e396570bd82962", "score": "0.6540937", "text": "public function listar() {\n\t\trequire_once('conexao.php');\n\t\t$conexao = new conexao();\n\t\t\n\t\t$sql = \"select * from ouv_tipo_usuario order by id_tipo_usuario\";\n\t\t$resultado = $conexao -> query($sql);\n\t\t\n\t\treturn $resultado;\n\t}", "title": "" }, { "docid": "6d338237e535a663f31bf06b1356ca4c", "score": "0.6539039", "text": "function usuarios(){\n\t$sql = $this->query(\"select u.idempleado,u.usuario from accelog_usuarios u, accelog_usuarios_per p where p.idempleado = u.idempleado and p.idperfil=32 order by usuario asc\");\n\treturn $sql;\n}", "title": "" }, { "docid": "4414a95521d48b1fdc42c756e5a73901", "score": "0.6530546", "text": "protected function getUsers(){\r\t\t\t\r\t\t\t//obtengo todos los usuarios\r\t\t\t$filter_search = JRequest::getVar( 'filter_search' );\r\t\t\t$limit = JRequest::getVar( 'limit' , 10 );\r\t\t\t$limitstart = JRequest::getVar( 'limitstart' , '');\r\t\t\t\r\t\t\t$this->itemsall = $this->model_user->getObjects();\r\t\t\t\r\t\t\t$prlimits = array();\r\t\t\tif( is_numeric( $limit ) ){\r\t\t\t\t$prlimits = array(\r\t\t\t\t\t\t'limitstart' => $limitstart\r\t\t\t\t\t,\t'limit' => $limit\r\t\t\t\t);\r\t\t\t}\r\t\t\t\r\t\t\t$users_jw = $this->model_user->getObjects( array() , $prlimits );\r\t\t\t\r\t\t\t\r\t\t\tif( count($users_jw) ){\r\t\t\t\t//agrego informacion adicional para todos los usuarios\r\t\t\t\t$pos_user = 0;\r\t\t\t\tforeach( $users_jw as $key=>$user ){\r\t\t\t\t\t\r\t\t\t\t\t$model_user = new ReferidosModelUser();\r\t\t\t\t\t$model_user->instance( (int) $user->userid );\r\t\t\t\t\t\r\t\t\t\t\t$wheres_user = array();\r\t\t\t\t\tif( isset($filter_search) ){\r\t\t\t\t\t\t$wheres_user[] = (object) array(\r\t\t\t\t\t\t\t\t\t\t\t\t\t'key' => ' ( name'\r\t\t\t\t\t\t\t\t\t\t\t\t,\t'condition' => ' LIKE '\r\t\t\t\t\t\t\t\t\t\t\t\t,\t'value' => \"'%$filter_search%' OR email LIKE '%$filter_search%')\"\r\t\t\t\t\t\t\t\t\t\t\t\t,\t'glue' => ''\r\t\t\t\t\t\t\t\t\t\t\t);\r\t\t\t\t\t}\r\t\t\t\t\t\r\t\t\t\t\t$user_inf = $model_user->getUserInf( $wheres_user );\r\t\t\t\t\t\r\t\t\t\t\t//var_dump( $user_inf );\r\t\t\t\t\t\r\t\t\t\t\t$wheres_planes = array(\r\t\t\t\t\t\t0 => (object) array(\r\t\t\t\t\t\t\t\t'key' => 'a.estado_plan'\r\t\t\t\t\t\t\t,\t'condition' => ' <> '\r\t\t\t\t\t\t\t,\t'value' => '0'\r\t\t\t\t\t\t\t,\t'glue' => ''\r\t\t\t\t\t\t)\r\t\t\t\t\t);\r\t\t\t\t\t$params_user = array(\r\t\t\t\t\t\t'order' => 'fecha_adquiere DESC'\r\t\t\t\t\t);\r\t\t\t\t\t$user_planes = $model_user->getUserPlanes( $wheres_planes , $params_user);\r\t\t\t\t\t\r\t\t\t\t\t//var_dump( $user_planes );\r\t\t\t\t\t\r\t\t\t\t\t//compruebo si el filtro de plan es aplicado\r\t\t\t\t\t$app = JFactory::getApplication();\r\t\t\t\t\t$filterplan = $app->getUserState( 'filter.referidos.user.id_plan' );\r\t\t\t\t\t$pasa_plan = true;\r\t\t\t\t\tif( empty($user_planes) && $filterplan != '')\r\t\t\t\t\t\t$pasa_plan = false;\r\t\t\t\t\t\r\t\t\t\t\tif( !empty($user_inf) && $pasa_plan ){\r\t\t\t\t\t\t\r\t\t\t\t\t\t$this->items[ $pos_user ] = $user;\r\t\t\t\t\t\t\r\t\t\t\t\t\t//obtener información adicional\r\t\t\t\t\t\tif( count($user_inf) ){\r\t\t\t\t\t\t\tforeach( $user_inf as $attr=>$valor ){\r\t\t\t\t\t\t\t\t$this->items[ $pos_user ]->$attr = $valor;\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\tunset($valor);\r\t\t\t\t\t\t}\r\t\t\t\t\t\t\r\t\t\t\t\t\t//obtener planes de usuario\r\t\t\t\t\t\t$this->items[ $pos_user ]->planes = $user_planes;\r\t\t\t\t\t\t\r\t\t\t\t\t\t//obtener invitados por usuario\r\t\t\t\t\t\t$model_invt = new ReferidosModelInvitado();\r\t\t\t\t\t\t$wheres_invt = array(\r\t\t\t\t\t\t\t0 => (object) array(\r\t\t\t\t\t\t\t\t\t'key' => 'id_user'\r\t\t\t\t\t\t\t\t,\t'condition' => ' = '\r\t\t\t\t\t\t\t\t,\t'value' => $user->id\r\t\t\t\t\t\t\t\t,\t'glue' => ''\r\t\t\t\t\t\t\t)\r\t\t\t\t\t\t\t,\r\t\t\t\t\t\t\t1 => (object) array(\r\t\t\t\t\t\t\t\t\t'key' => ' GROUP BY'\r\t\t\t\t\t\t\t\t,\t'condition' => ' correo_invt, id_facebook '\r\t\t\t\t\t\t\t\t,\t'value' => ''\r\t\t\t\t\t\t\t\t,\t'glue' => ''\r\t\t\t\t\t\t\t)\r\t\t\t\t\t\t\t,\r\t\t\t\t\t\t\t2 => (object) array(\r\t\t\t\t\t\t\t\t\t'key' => 'ORDER BY'\r\t\t\t\t\t\t\t\t,\t'condition' => ' fecha_invt DESC'\r\t\t\t\t\t\t\t\t,\t'value' => ''\r\t\t\t\t\t\t\t\t,\t'glue' => ''\r\t\t\t\t\t\t\t)\r\t\t\t\t\t\t);\r\t\t\t\t\t\t$invt_user = $model_invt->getObjects( $wheres_invt );\r\t\t\t\t\t\t$this->items[ $pos_user ]->invitados = $invt_user;\r\t\t\t\t\t\t\r\t\t\t\t\t\t//obtener referidos por usuario\r\t\t\t\t\t\t$referidos_user = array();\r\t\t\t\t\t\tif( count($user_planes) ){\r\t\t\t\t\t\t\tforeach( $user_planes as $pos=>$plan){\r\t\t\t\t\t\t\t\t\r\t\t\t\t\t\t\t\t$wheres_ref = array(\r\t\t\t\t\t\t\t\t\t0 => (object) array(\r\t\t\t\t\t\t\t\t\t\t\t'key' => 'id_user_plan'\r\t\t\t\t\t\t\t\t\t\t,\t'condition' => ' = '\r\t\t\t\t\t\t\t\t\t\t,\t'value' => $plan->id_user_plan\r\t\t\t\t\t\t\t\t\t\t,\t'glue' => 'AND'\r\t\t\t\t\t\t\t\t\t)\r\t\t\t\t\t\t\t\t);\r\t\t\t\t\t\t\t\t$model_ref = new ReferidosModelReferido();\r\t\t\t\t\t\t\t\t$referidos = $model_ref->getObjects( $wheres_ref );\r\t\t\t\t\t\t\t\t\r\t\t\t\t\t\t\t\tif( is_array($referidos) )\r\t\t\t\t\t\t\t\t\t$referidos_user = array_merge( $referidos_user , $referidos);\r\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\tunset($plan);\r\t\t\t\t\t\t}\r\t\t\t\t\t\t\r\t\t\t\t\t\t$this->items[ $pos_user ]->referidos = $referidos_user;\r\t\t\t\t\t}\r\t\t\t\t\t$pos_user++;\r\t\t\t\t}\r\t\t\t\tunset($user);\r\t\t\t}\r\t\t}", "title": "" }, { "docid": "1faaa7d981e3091b7a3873e3849d4222", "score": "0.6528685", "text": "public function get_users()\n\t{\n\t\t$this->fetch_users();\n\n\t\t$this->theme->add_user_form = FormUI::build('add_user', 'add_user')->get();\n\t\t$this->theme->currentuser = User::identify();\n\n\t\t$this->theme->display( 'users' );\n\t}", "title": "" }, { "docid": "061d2c578603e7566bbf80e4aa0f464a", "score": "0.65248984", "text": "public function listuser() {\n\t\t$hasil = $this->db->query(\"SELECT a.iduser, a.username, a.password, b.kode_dir, b.nama_unit FROM `user` a JOIN `unit` b on a.iduser=b.unit_id WHERE a.role=1 GROUP BY a.iduser ORDER BY a.iduser ASC\");\n\t\tif($hasil->num_rows() > 0){\n\t\t\treturn $hasil->result();\n\t\t}\n\t\telse {\n\t\t\treturn array();\n\t\t}\n\t}", "title": "" }, { "docid": "72927fac48205f7e074860ba9e41303b", "score": "0.652448", "text": "public function allUsers()\n {\n $sql = \"select * from person\";\n $conn = DB::getInstance()->getConnection();\n $stmt = $conn->prepare($sql);\n $stmt->execute();\n $this->allUsersList = $stmt->fetchAll();\n\n return $this->allUsersList;\n }", "title": "" }, { "docid": "ed05a4a830e57776494f87af254a7edc", "score": "0.6522739", "text": "public function listUsuario() {\r\n $query = $this->db->query(\"SELECT * FROM usuario u inner join perfil p on u.per_id=p.per_id\");\r\n return $query->result();\r\n }", "title": "" }, { "docid": "1821c764f1e674e629677d9ece542646", "score": "0.65222925", "text": "public static function mostrarUsuarios($valor){\n\n\t\tif(is_null($valor)){\n\t\t\t//mostrar todos los usuarios\n\t\t\t\n\t\t\t$conexion = Conexion::conectar();\n\n\t\t\t$stmt = $conexion->prepare(\"CALL mostrar_Usuarios();\");\n\n\t\t\t$stmt->execute();\n\n\t\t\treturn $stmt->fetchAll();\n\n\t\t\tConexion::desconectar($conexion);\n\t\t\tunset($stmt);\n\n\t\t}else{\n\t\t\t//mostrar un usuario \n\t\t\t$conexion = Conexion::conectar();\n\n\t\t\t$stmt = $conexion->prepare(\"CALL mostrar_Usuarios();\");\n\n\t\t\t$stmt->execute();\n\n\t\t\treturn $stmt->fetchAll();\n\n\t\t\tConexion::desconectar($conexion);\n\t\t\tunset($stmt);\n\t\t}\n\t}", "title": "" } ]
9f590d6a8882cc2a94d4b0ec91eb7a74
mutator method for reference id
[ { "docid": "88a703007c5f2acfaebf28b608551aba", "score": "0.0", "text": "public function setReferenceId($newReferenceId) {\n\t\t// base case: if the reference id is null, this reference without a mySQL assigned id (yet)\n\t\tif($newReferenceId === null) {\n\t\t\t$this->referenceId = null;\n\t\t\treturn;\n\t\t}\n\n\t\t// verify the reference id is valid\n\t\t$newReferenceId = filter_var($newReferenceId, FILTER_VALIDATE_INT);\n\t\tif($newReferenceId === false) {\n\t\t\tthrow(new InvalidArgumentException(\"reference id is not an integer\"));\n\t\t}\n\n\t\t// verify the profile id is positive\n\t\tif($newReferenceId <= 0) {\n\t\t\tthrow(new RangeException(\"the reference id is not a positive\"));\n\t\t}\n\t\t// convert and store the reference id\n\t\t$this->referenceId = intval($newReferenceId);\n\t}", "title": "" } ]
[ { "docid": "eadd3159132d78ee417c3ba41546e1b4", "score": "0.6444478", "text": "public function setRefID($value) {\n\t\t$this->RefID = $value;\n\t}", "title": "" }, { "docid": "4063789de3ce26c93fd8385880d9179e", "score": "0.63832855", "text": "protected function setRandomRefId() {\n\t\t$this->refId = mt_rand( 100000000, 1000000000 ) . mt_rand( 100000000, 1000000000 );\n\t}", "title": "" }, { "docid": "62898e8ee6c903ca3eef7734f320d61b", "score": "0.63192904", "text": "public function getReferenceId(){\n\t\treturn($this->referenceId);\n\t}", "title": "" }, { "docid": "ceb2716d81fc23eaf2dbe3ebc4e9c055", "score": "0.6215062", "text": "public function set_id(){ }", "title": "" }, { "docid": "d935b1bc20169eb8d1b33289b1f853c6", "score": "0.619564", "text": "public function getRefId(){\n\t\treturn $this->refId;\n\t}", "title": "" }, { "docid": "fe74fb1990d02c19081cc4ffd92b5e3e", "score": "0.6073655", "text": "public function setId($value) { $this->id = $value;}", "title": "" }, { "docid": "fe74fb1990d02c19081cc4ffd92b5e3e", "score": "0.6073655", "text": "public function setId($value) { $this->id = $value;}", "title": "" }, { "docid": "45305d8117cc7e1a1538ffdcce450d4f", "score": "0.60368586", "text": "public function setID($id) {$this->id = $id;}", "title": "" }, { "docid": "8a7f6e80cf2a073d5e5e469a321d8c0a", "score": "0.6006779", "text": "function SetId($value) { $this->id=$value; }", "title": "" }, { "docid": "8a7f6e80cf2a073d5e5e469a321d8c0a", "score": "0.6006779", "text": "function SetId($value) { $this->id=$value; }", "title": "" }, { "docid": "8a7f6e80cf2a073d5e5e469a321d8c0a", "score": "0.6006779", "text": "function SetId($value) { $this->id=$value; }", "title": "" }, { "docid": "7ddae9ddeeee683a996090992d833708", "score": "0.59596014", "text": "public function getRefId()\n {\n return $this->refId;\n }", "title": "" }, { "docid": "816e925f61bddf4ee722169bb18adae0", "score": "0.5958769", "text": "function set_id($new_id){\n\t\t$this->id=$new_id;\n\t}", "title": "" }, { "docid": "d9ad87efb6ce4746236ed153475afd9d", "score": "0.5904143", "text": "function Establecer_id(){\n \t$id = $this->id;\n \t$this->model->SetId($id);\n }", "title": "" }, { "docid": "1d50b3d9e5afceace6bc631036bb3227", "score": "0.5900181", "text": "public function __clone()\r\n {\r\n $this->id = $this->generateId();\r\n }", "title": "" }, { "docid": "897d0f73d6293271485e77ad0dd5711d", "score": "0.5891284", "text": "public function setid()\n{\n return $this->id;\n}", "title": "" }, { "docid": "fd5dfad0697ff47b43449a089465d97a", "score": "0.58760023", "text": "public function useExplicitIdValue(){ }", "title": "" }, { "docid": "fd5dfad0697ff47b43449a089465d97a", "score": "0.58760023", "text": "public function useExplicitIdValue(){ }", "title": "" }, { "docid": "572bfee80d4fe2ec3dc250efedb6a0f4", "score": "0.5861679", "text": "public function __clone() {\n $this->id = ++self::$idCount;\n }", "title": "" }, { "docid": "29042e0db932b20e3525fc17b8fa0334", "score": "0.57967347", "text": "function setReferringUrl_id($referring_url)\n\t{\n\t\tif($referring_url != $this->referring_url)\n\t\t{\n\t\t\t$this->_modified = true;\n\t\t\t$this->referringurl_id = $referring_url;\n\t\n\t\t}\n\t}", "title": "" }, { "docid": "282645b0b4740f28d24c0b6a44f67304", "score": "0.578757", "text": "public function setId($_id) { $this->id = $_id; }", "title": "" }, { "docid": "ab5bd5acff96d926c0938580c46e00b7", "score": "0.5780784", "text": "public function setId($value);", "title": "" }, { "docid": "ab5bd5acff96d926c0938580c46e00b7", "score": "0.5780784", "text": "public function setId($value);", "title": "" }, { "docid": "ab5bd5acff96d926c0938580c46e00b7", "score": "0.5780784", "text": "public function setId($value);", "title": "" }, { "docid": "25ffd532d020c33f512a41fae8bf4495", "score": "0.57803774", "text": "function id($setter = NULL)\n\t{\n\t\t$id_field = $this->id_field;\n\t\tif (!is_null($setter))\n\t\t\t$this->$id_field = $setter;\n\t\tif (isset($this->$id_field))\n\t\t return $this->$id_field;\n\t}", "title": "" }, { "docid": "a3cdf6665edc4fb1ee752d3aaf95d15c", "score": "0.575465", "text": "function setId($id)\n\t{\n\t\t$this->_modified = true;\n\t\t$this->id = $id;\n\t}", "title": "" }, { "docid": "a3cdf6665edc4fb1ee752d3aaf95d15c", "score": "0.575465", "text": "function setId($id)\n\t{\n\t\t$this->_modified = true;\n\t\t$this->id = $id;\n\t}", "title": "" }, { "docid": "1ef16e3c8cf08fe40c149d01d12a02b0", "score": "0.57459295", "text": "function setItemGroupRefId($a_val)\n\t{\n\t\t$this->item_group_ref_id = $a_val;\n\t}", "title": "" }, { "docid": "bc2ade689913294e85c78a5662c13a84", "score": "0.5742818", "text": "public function getReferenceID()\n {\n return $this->referenceID;\n }", "title": "" }, { "docid": "bc2ade689913294e85c78a5662c13a84", "score": "0.5742818", "text": "public function getReferenceID()\n {\n return $this->referenceID;\n }", "title": "" }, { "docid": "067d4b5df1697b97ad973183e1a92e8d", "score": "0.5734963", "text": "public function __set(string $id, $val) : void { return; }", "title": "" }, { "docid": "968bdfc62f421cb55ac0e0e18757fe6c", "score": "0.5723534", "text": "abstract function setId($id);", "title": "" }, { "docid": "d2b220b475f5bcc2dc1f0aee8950a8de", "score": "0.5720943", "text": "public function getId(){ return $this->_id; }", "title": "" }, { "docid": "915e207572c36b31ac331e924223ab10", "score": "0.5720907", "text": "public function referenceItemId(): string;", "title": "" }, { "docid": "a8be7222ad54476de757dece23ff17f0", "score": "0.57182735", "text": "function getId(){ return $this->id; }", "title": "" }, { "docid": "09980820acc2803080652dda3b5c31e1", "score": "0.57159734", "text": "public function updateReferenceFields()\n {\n if (isset($this->data['referencesMany']['streams'])) {\n $group = $this->data['referencesMany']['streams'];\n $add = $group->getAdd();\n $remove = $group->getRemove();\n if ($add || $remove) {\n $ids = $this->getStreams_reference_field();\n foreach ($add as $document) {\n $ids[] = $document->getId();\n }\n foreach ($remove as $document) {\n if (false !== $key = array_search($document->getId(), $ids)) {\n unset($ids[$key]);\n }\n }\n $this->setStreams_reference_field($ids ? array_values($ids) : null);\n }\n }\n }", "title": "" }, { "docid": "dee56fa28befca3e051405abe70a21e1", "score": "0.5694541", "text": "public function getReferenceIdentifier();", "title": "" }, { "docid": "c3f5057f68aba95cdc06ecdb0b323223", "score": "0.5672587", "text": "static function set($id, $value) {\n\n\t}", "title": "" }, { "docid": "f728fdfd11c6eb731362d1ba43360aed", "score": "0.56568784", "text": "public function regenerateID()\n {\n }", "title": "" }, { "docid": "316a8efb6f9567c7993a2c217f37d2d5", "score": "0.56529444", "text": "public function getReference();", "title": "" }, { "docid": "2b936dbd849ca8e656020856d66f1d01", "score": "0.5652537", "text": "protected function define_id($id) {\t$this->id = $id ; }", "title": "" }, { "docid": "0172d7539092a47419a3b30539da330a", "score": "0.56400144", "text": "public function &setId($id) {\n\t\t$this->notifyChanged(self::FIELD_ID,$this->id,$id);\n\t\t$this->id=$id;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "7c9a1248e247c93c8239babbb1aabc23", "score": "0.56381863", "text": "public function __clone()\n {\n $this->setId($this->generateId());\n }", "title": "" }, { "docid": "d10b50560777203da1db14f7f522837d", "score": "0.5636686", "text": "function setId($id) { $this->id = $id; }", "title": "" }, { "docid": "3058fe19735e0e1f1c73c257e32da129", "score": "0.56329274", "text": "public function GetId()\n {\n return $this->id;\n }", "title": "" }, { "docid": "1f42d1bcf757896433ca11bb753c997c", "score": "0.56254345", "text": "function setRef($index, $value){\r\n\t\tdie('Not implemented');\r\n\t}", "title": "" }, { "docid": "98643420d01512ec05370b2a5a8903ba", "score": "0.5625038", "text": "public abstract function id ();", "title": "" }, { "docid": "3322fdea6dd3ed3d6e241533a64aa57e", "score": "0.5613974", "text": "public function getId(){return $this->_id;}", "title": "" }, { "docid": "9e178233bdfb9837ac32a882dea879de", "score": "0.56085736", "text": "public function setId(int $id) {\n$this->id = $id;\nreturn $this;\n}", "title": "" }, { "docid": "9797746d47fc412d415eca546b15cd66", "score": "0.56002325", "text": "public function getReferenceNo();", "title": "" }, { "docid": "e466debc0890b1b775db8644985b9d8a", "score": "0.55889976", "text": "function get_id()\n { return $this->id ;\n }", "title": "" }, { "docid": "0f614346735992a3fc00f12abe347834", "score": "0.5585005", "text": "function getIdValue()\n {\n }", "title": "" }, { "docid": "6c7ebec7299056a189f1f1f7e63370db", "score": "0.5584228", "text": "abstract function id();", "title": "" }, { "docid": "c493bbde4bae5784c444b27908370990", "score": "0.55724514", "text": "function setId($arg0) {\n\t\tparent::setId($arg0);\n\t\tif (\\MongoId::isValid($this->getId()) && $this->getName() == '') {\n\t\t\t$this->setName($this->getPingback()->getName());\n\t\t}\n\t\tif (\\MongoId::isValid($this->getId()) && $this->getUrl() == '') {\n\t\t\t$this->setUrl($this->getPingback()->getUrl());\n\t\t}\n\t}", "title": "" }, { "docid": "0fde7f60dc16e5f83864976108ae8ae1", "score": "0.55553204", "text": "public function __clone()\r\n {\r\n $this->id = null;\r\n }", "title": "" }, { "docid": "ebd86cbebc266017fee1c8cda9b28882", "score": "0.55522436", "text": "function changeID(string $uniqueId){\n\t\t$this->Id = md5($uniqueId);\n\t}", "title": "" }, { "docid": "9cbedb851570ebd5a0c300ece4d81d6e", "score": "0.5543666", "text": "abstract function getId();", "title": "" }, { "docid": "b7deec9cf0820449cb622c1b603334f8", "score": "0.55422723", "text": "public function reference(string $reference)\n {\n return $this->setAttribute('reference', $reference);\n }", "title": "" }, { "docid": "0254f5640e1c4b60be0c66d4c48c0f77", "score": "0.5534304", "text": "function set_id($id) {\r\n\t\t$this->id = $id;\r\n\t}", "title": "" }, { "docid": "9fd18f2eb3f58f8201f4e846cc1a362e", "score": "0.5530034", "text": "private function getId () { return $this->id; }", "title": "" }, { "docid": "25e98b120ee9c9d71f73914a2e670cda", "score": "0.5507965", "text": "public function setId($id) {\nif(isset($this->fields[ \"id\"])) {\n throw new \\ BadMethodCallException( __\n\n (\"The ID has been set already.\"));\n }\n\n if (!is_int($id) || $id < 1) {\n throw new \\InvalidArgumentException(__(\"The ID is invalid.\"));\n }$this->fields[\"id\"] = $id;\n\nreturn $this;\n\n }", "title": "" }, { "docid": "25e98b120ee9c9d71f73914a2e670cda", "score": "0.5507965", "text": "public function setId($id) {\nif(isset($this->fields[ \"id\"])) {\n throw new \\ BadMethodCallException( __\n\n (\"The ID has been set already.\"));\n }\n\n if (!is_int($id) || $id < 1) {\n throw new \\InvalidArgumentException(__(\"The ID is invalid.\"));\n }$this->fields[\"id\"] = $id;\n\nreturn $this;\n\n }", "title": "" }, { "docid": "25e98b120ee9c9d71f73914a2e670cda", "score": "0.5507965", "text": "public function setId($id) {\nif(isset($this->fields[ \"id\"])) {\n throw new \\ BadMethodCallException( __\n\n (\"The ID has been set already.\"));\n }\n\n if (!is_int($id) || $id < 1) {\n throw new \\InvalidArgumentException(__(\"The ID is invalid.\"));\n }$this->fields[\"id\"] = $id;\n\nreturn $this;\n\n }", "title": "" }, { "docid": "23cecef47b0ae37f6f30e9f0c09ee8e5", "score": "0.5502155", "text": "public function getId(){ return $this->id; }", "title": "" }, { "docid": "23cecef47b0ae37f6f30e9f0c09ee8e5", "score": "0.5502155", "text": "public function getId(){ return $this->id; }", "title": "" }, { "docid": "23cecef47b0ae37f6f30e9f0c09ee8e5", "score": "0.5502155", "text": "public function getId(){ return $this->id; }", "title": "" }, { "docid": "23cecef47b0ae37f6f30e9f0c09ee8e5", "score": "0.5502155", "text": "public function getId(){ return $this->id; }", "title": "" }, { "docid": "23cecef47b0ae37f6f30e9f0c09ee8e5", "score": "0.5502155", "text": "public function getId(){ return $this->id; }", "title": "" }, { "docid": "81b4368cead5cc545f56a03855a11582", "score": "0.5501478", "text": "function _set_id( $post ){\n \t\t$this->post = $post;\n }", "title": "" }, { "docid": "3bfafea35f82897f348542464df13f61", "score": "0.5499248", "text": "public function setId($value) \n {\n $this->id = $value;\n }", "title": "" }, { "docid": "ef9c5a3d1c02ba0ab40414b3f10a1a87", "score": "0.5497322", "text": "public function __clone()\n {\n $this->id = null;\n }", "title": "" }, { "docid": "ef9c5a3d1c02ba0ab40414b3f10a1a87", "score": "0.5497322", "text": "public function __clone()\n {\n $this->id = null;\n }", "title": "" }, { "docid": "ef9c5a3d1c02ba0ab40414b3f10a1a87", "score": "0.5497322", "text": "public function __clone()\n {\n $this->id = null;\n }", "title": "" }, { "docid": "8c527fc7b7d77beee2223fdcbdbde033", "score": "0.5494637", "text": "public function setId($value)\n\t{\n\t\t$this->_id=$value;\n\t}", "title": "" }, { "docid": "182c212ea9570d6d69cfc97e58965f9c", "score": "0.5483448", "text": "public function setReference($value) {\n return $this->setParameter('reference', $value);\n }", "title": "" }, { "docid": "26296d997c419854a0373bf8c21b872d", "score": "0.5474263", "text": "static function resetId() {\n\t\tself::$id = 0;\n\t}", "title": "" }, { "docid": "a2eb4c61a447cf88b702d1bc8214f5e0", "score": "0.5473709", "text": "abstract function id ();", "title": "" }, { "docid": "f6c4249e27f56dfbf9a9d6f6205688bb", "score": "0.5471178", "text": "function setId($id){\r\n\t\t$this->id = $id;\r\n\t}", "title": "" }, { "docid": "608c3196fac4e82dcdd431d04ee02294", "score": "0.5454917", "text": "function get_ref()\n {\n \treturn $this->ref;\n }", "title": "" }, { "docid": "8c6d0ddd2954da639c908b26555dd73a", "score": "0.54493326", "text": "abstract public function getId();", "title": "" }, { "docid": "8c6d0ddd2954da639c908b26555dd73a", "score": "0.54493326", "text": "abstract public function getId();", "title": "" }, { "docid": "8c6d0ddd2954da639c908b26555dd73a", "score": "0.54493326", "text": "abstract public function getId();", "title": "" }, { "docid": "8c6d0ddd2954da639c908b26555dd73a", "score": "0.54493326", "text": "abstract public function getId();", "title": "" }, { "docid": "0ec04630291d6deef19962c3e019cdac", "score": "0.54449975", "text": "public function setId($data)\n {\n $this->_Id=$data;\n return $this;\n }", "title": "" }, { "docid": "18265a8a82d848765893e13d096900e7", "score": "0.5444757", "text": "private function getId() { return $this->id; }", "title": "" }, { "docid": "f74d0253bd1734921681d37932ae59f0", "score": "0.5442443", "text": "public function setId($id) {\n\n }", "title": "" }, { "docid": "aee797fa5d5c934d188eec1dd6713cdb", "score": "0.54392904", "text": "abstract protected function changeLocal($id);", "title": "" }, { "docid": "930a6abe6cb6e2f4b4b6f1fc3b7cc47e", "score": "0.5437343", "text": "public function getID() {return $this->id;}", "title": "" }, { "docid": "53ab28017352b54f9ea3038fcd90877d", "score": "0.543674", "text": "function getId(){\n $result = $this->id;\n return $result;\n }", "title": "" }, { "docid": "eea923c0bf80947adf121e0ad9cbd01d", "score": "0.54330975", "text": "function SetMemberid($value) { $this->memberId=$value; }", "title": "" }, { "docid": "b1e529fcf5a78a0abcfd5b62e051ea52", "score": "0.54303145", "text": "function get_id(){\n\t\treturn $this->id;\n\t}", "title": "" }, { "docid": "f9c6949920db1ca0e78501c86b93048c", "score": "0.5424508", "text": "public function __clone()\n {\n $this->id = spl_object_hash($this);\n }", "title": "" }, { "docid": "c2231e117ceb9d6e17f83e88dc00dc1f", "score": "0.54195565", "text": "public function set_credits_id( $value ) {\n\t\t$this->set_prop( 'credits_id', absint( $value ) ) ;\n\t}", "title": "" }, { "docid": "3fbcb6057115a838bf564fcb57e41b1a", "score": "0.54184127", "text": "public function setIdAttribute ($name, $isId) {}", "title": "" }, { "docid": "f8cb6506e0e3a1ca330979ccf72a5330", "score": "0.54141116", "text": "public function set($id, string $value): static;", "title": "" }, { "docid": "02da76ed2412f36087158497699e5748", "score": "0.5413601", "text": "function get_id()\r\n {\r\n return $this->id;\r\n }", "title": "" }, { "docid": "f4de6bed04094d67ad9f5658958c91cd", "score": "0.5403641", "text": "function setId($id) {\n $this->id = $id;\n }", "title": "" }, { "docid": "777749f0e62875aa41dee2a420745f23", "score": "0.5402107", "text": "public function getId(){return $this->id;}", "title": "" }, { "docid": "777749f0e62875aa41dee2a420745f23", "score": "0.5402107", "text": "public function getId(){return $this->id;}", "title": "" }, { "docid": "777749f0e62875aa41dee2a420745f23", "score": "0.5402107", "text": "public function getId(){return $this->id;}", "title": "" }, { "docid": "1143891966c88c7eb947524421b5db8a", "score": "0.5396798", "text": "public function setid($id){\r\n $this->id = $id;\r\n }", "title": "" } ]
46de6fe89b07fef1071a7c507edebb9b
Effacement d'un RV dont on fournit l'identifiant.
[ { "docid": "9b467fc467c23905f6eb5e11229690f8", "score": "0.50493085", "text": "public function delRV($idRP, $idRV)\n {\n $connexion = self::connectPDO(SERVEUR, BASE, NOM, MDP);\n $sql = 'UPDATE '.PFX.'thotRpRv ';\n $sql .= 'SET matricule = Null, userParent = Null, dispo = 1 ';\n $sql .= 'WHERE idRP = :idRP AND idRV = :idRV ';\n $requete = $connexion->prepare($sql);\n\n $requete->bindParam(':idRP', $idRP, PDO::PARAM_INT);\n $requete->bindParam(':idRV', $idRV, PDO::PARAM_INT);\n\n $resultat = $requete->execute();\n\n $nb = $requete->rowCount();\n\n self::deconnexionPDO($connexion);\n\n return $nb;\n }", "title": "" } ]
[ { "docid": "6e4479b95cb5ca96ecdeeadc71cccbf8", "score": "0.6328699", "text": "public function validerRdv()\n {\n if ($_SESSION['userType'] != 'medecin') {\n notAuthorized();\n } else {\n $id = $_POST[\"id\"];\n $this->medecinModel->confirmerRdv($id);\n $data = [\n //'patients' => $this->medecinModel->patients(),\n 'medecin' => $this->activeUser,\n 'rdvs' => $this->medecinModel->rvdAttente(),\n 'msg' => 'success-message',\n 'page' => 'Rendez-vous en Attente'\n ];\n $this->view('medecins/rdvAvenirMed', $data);\n }\n }", "title": "" }, { "docid": "7f1df6ac37cf921d87a3d8524161bb58", "score": "0.6091323", "text": "public function supprimmerRdv()\n {\n if ($_SESSION['userType'] != 'medecin') {\n notAuthorized();\n } else {\n $id = $_POST[\"id\"];\n $this->medecinModel->supprimerRdv($id);\n $data = [\n //'patients' => $this->medecinModel->patients(),\n 'medecin' => $this->activeUser,\n 'rdvs' => $this->medecinModel->rvdAttente(),\n 'msg' => 'delete-message',\n 'page' => 'Rendez-vous en Attente'\n ];\n $this->view('medecins/rdvAttenteMed', $data);\n }\n }", "title": "" }, { "docid": "067f708477e9d1c41b3bcd48cb32b249", "score": "0.60576576", "text": "public function annulerRdv()\n {\n if ($_SESSION['userType'] != 'medecin') {\n notAuthorized();\n } else {\n $id = $_POST[\"id\"];\n $this->medecinModel->annulerRdv($id);\n $data = [\n //'patients' => $this->medecinModel->patients(),\n 'medecin' => $this->activeUser,\n 'rdvs' => $this->medecinModel->rvdValide(),\n 'msg' => 'success-message',\n 'page' => 'Rendez-vous en Attente'\n ];\n $this->view('medecins/rdvAvenirMed', $data);\n }\n }", "title": "" }, { "docid": "042516d22c27ae4bb7fc5c2c8b68716c", "score": "0.58873594", "text": "public function modifier() {\n $id = $this->requete->getParametreId('id');\n $produit = $this->produit->getProduit($id);\n $this->genererVue(['produit' => $produit]);\n }", "title": "" }, { "docid": "3bf0efbcd962eaec659f8bb133885cdc", "score": "0.5858871", "text": "static function dettagliVinile($id){\n $nome = null;\n $cognome=null;\n $nomenegozio=null;\n $indirizzo=null;\n $partitaiva=null;\n $view = new VVinile();\n $pm = new FPersistentManager();\n //ublic static function load($field, $value,$Fclass) {\n $result = $pm->load(\"id_vinile\", $id, \"FVinile\");\n $sessione=Session::getInstance();\n $sessione->setVinile($result);\n if(get_class($result->getVenditore())==\"EPrivato\") {\n $nome = $result->getVenditore()->getNome();\n $cognome = $result->getVenditore()->getCognome();\n }elseif(get_class($result->getVenditore())==\"ENegozio\"){\n $nomenegozio= $result->getVenditore()->getNameShop();\n $indirizzo=$result->getVenditore()->getAddress();\n $partitaiva=$result->getVenditore()->getPIva();\n }\n $username = $result->getVenditore()->getUsername();\n $email = $result->getVenditore()->getEmail();\n $telefono = $result->getVenditore()->getPhone();\n //public static function loadImg(string $categoriaImage,$field,$id){\n $img_utente = $pm->loadImg(\"EImageUtente\",\"email_utente\",$result->getVenditore()->getEmail());\n $id = $result->getId();\n $med_annuncio = $pm->loadImg(\"EImageVinile\",\"id_vinile\",$id);\n $sessione = Session::getInstance();\n if ($sessione->isLoggedUtente()) {\n $utente = $sessione->getUtente();\n //$utente = unserialize($_SESSION['utente']);\n if ($result->getVenditore()->getEmail() == $utente->getEmail())\n $view->dettagliVinile($result, $nome, $cognome,$nomenegozio,$indirizzo,$partitaiva,$username,$email,$telefono,$img_utente,$med_annuncio,\"no\");\n else\n $view->dettagliVinile($result, $nome, $cognome,$nomenegozio,$indirizzo,$partitaiva,$username,$email,$telefono,$img_utente,$med_annuncio,\"si\");\n }\n else\n $view->dettagliVinile($result, $nome, $cognome,$nomenegozio,$indirizzo,$partitaiva,$username,$email,$telefono,$img_utente,$med_annuncio,\"si\");\n }", "title": "" }, { "docid": "ffa579d7839bd003bfc3f82bd09002d0", "score": "0.57616836", "text": "static public function id_ronda_disponible()\n {\n return self::$conexion->autoID(\"partida_ronda_usupreg\",\"id_partida_ronda_usupreg\");\n }", "title": "" }, { "docid": "60001b6e9fea63cf42811ed26e6e226d", "score": "0.57549244", "text": "public function rdvAvenir()\n {\n if ($_SESSION['userType'] != 'medecin') {\n notAuthorized();\n } else {\n $data = [\n 'rdvs' => $this->medecinModel->rvdValide(),\n 'medecin' => $this->activeUser,\n 'page' => 'Rendez-vous a Venir'\n ];\n $this->view('medecins/rdvAvenirMed', $data);\n }\n }", "title": "" }, { "docid": "81083ba0935c8679418a4df3e7057d4d", "score": "0.5672729", "text": "function actualizar_institucion_id()\n {\n $this->App_model->actualizar_institucion_id();\n \n $data['mensaje'] = \"Actualización del campo institucion_id ejecutada\";\n $data['titulo_pagina'] = \"Actualización institucion_id\";\n $data['vista_a'] = \"app/mensaje_v\";\n \n $this->load->view('plantilla_apanel/plantilla', $data);\n }", "title": "" }, { "docid": "d88838f8540d3d51154065ade5e56682", "score": "0.5635207", "text": "function verif_ident_e($pseudo,$mdp,&$resultat) {\n\trequire ('./modele/utilisateur_bd.php');\n\treturn verif_ident_e_BD($pseudo,$mdp,$resultat);\n}", "title": "" }, { "docid": "6fc77dd9bf99e2eb12b15d0855696045", "score": "0.56312037", "text": "function modificarAuxCuentaCorriente(){\n $this->procedimiento='conta.f_auxiliar_ime';\n $this->transaccion='CONTA_AUXCTACO_MOD';\n $this->tipo_procedimiento='IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_auxiliar','id_auxiliar','int4');\n $this->setParametro('id_empresa','id_empresa','int4');\n $this->setParametro('estado_reg','estado_reg','varchar');\n $this->setParametro('codigo_auxiliar','codigo_auxiliar','varchar');\n $this->setParametro('nombre_auxiliar','nombre_auxiliar','varchar');\n $this->setParametro('corriente','corriente','varchar');\n $this->setParametro('tipo','tipo','varchar');\n $this->setParametro('cod_antiguo','cod_antiguo','varchar');\n\t\t\t\t$this->setParametro('tipo_interfaz','tipo_interfaz','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "2257eb1d13a500681670951d5e9b0d4b", "score": "0.56136054", "text": "public function show($id) //levent sonu bitir\n {\n uretimtakip::where('id',$id)->update(['end'=>now()]);\n $uretimtakip=uretimtakip::find($id);\n leventdepo::where('barcode',$uretimtakip->barcode)->update(['durum_id'=>3]);\n return redirect('uretimtakip/uretimtakip');\n }", "title": "" }, { "docid": "56f5aef5477ed1761ee38a85d146602e", "score": "0.55938", "text": "public function ver_presidente($idMesa)\n\t{\n\t\t\t$this->load->model(\"general_model\");\n\t\t\t$userID = $this->session->userdata(\"id\");\n\t\t\t\n\t\t\t//Informacion de las mesas para el Puesto de votacion\n\t\t\t$arrParam = array('idMesa' => $idMesa);\n\t\t\t$data['infoMesa'] = $this->general_model->get_mesas($arrParam);\n\t\t\t\n\t\t\t//Informacion PUESTO VOTACION\t\t\t\n\t\t\t$arrParam = array('idPuesto' => $data['infoMesa'][0]['fk_puesto_votacion_mesas']);\n\t\t\t$data['infoPuesto'] = $this->general_model->get_puesto($arrParam);\n\t\t\t\n\t\t\t//Informacion de las mesas para el Puesto de votacion\n\t\t\t$data['infoMesas'] = $this->general_model->get_mesas($arrParam);\n\t\t\t\n\t\t\t//Busco informacion de AUDITOR\n\t\t\t$data['infoEncargado'] = $this->general_model->get_info_encargado_puesto($arrParam);\n\t\t\t\n\t\t\t//Listado de CANDIDATOS PRESIDENTE\n\t\t\t$arrParam = array('idCorporacion' => 1);//buscar solo candidatos para presidente\n\t\t\t$data['info'] = $this->general_model->get_candidatos($arrParam);\n\t\t\t\n\t\t\t$data[\"view\"] = 'vista_presidente';\n\t\t\t$this->load->view(\"layout\", $data);\n\t}", "title": "" }, { "docid": "7b76dabb061777d5c02828e1fb8f395c", "score": "0.5592055", "text": "public function rdvAttente()\n {\n if ($_SESSION['userType'] != 'medecin') {\n notAuthorized();\n } else {\n $etat = \"attente\";\n $data = [\n 'medecin' => $this->activeUser,\n 'rdvs' => $this->medecinModel->rvdAttente(),\n 'page' => 'Rendez-vous en Attente'\n ];\n $this->view('medecins/rdvAttenteMed', $data);\n }\n }", "title": "" }, { "docid": "c74ce67ff0420ee99bfb902ca95c18e8", "score": "0.55920035", "text": "function aeph_renovarMembresiaConId($id_usuario){\n\t\t\t\n\t\t\t$expiracion=(int)get_the_author_meta( 'exp_date', $id_usuario );\n\t\t\t$nuevaExpiracion = strtotime('+1 years', $expiracion);\n\t\t\t\n\t\t\t$this->aeph_set_member_role($id_usuario,'Miembro');\t\t\t\n\t\t\tupdate_user_meta( $id_usuario, \"exp_date\",$nuevaExpiracion);\n\t\t\techo '<div class=\"updated fade\"><p>'.'ID: '.$id_usuario.'Vieja Fecha: '.$expiracion.' Nueva Fecha:'.$nuevaExpiracion.'</p></div>';\n\t\t}", "title": "" }, { "docid": "0d6d7ef089c5c44b4218887fc9db7be4", "score": "0.5571573", "text": "function eliminarAuxCuentaCorriente(){\n $this->procedimiento='conta.f_auxiliar_ime';\n $this->transaccion='CONTA_AUXCTACO_ELI';\n $this->tipo_procedimiento='IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_auxiliar','id_auxiliar','int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "05f064b8a2a54b8cfd7609d980a4828f", "score": "0.5559806", "text": "function verif_ident_l($pseudo,$mdp,&$resultat) {\n\trequire ('./modele/utilisateur_bd.php');\n\treturn verif_ident_l_BD($pseudo,$mdp,$resultat);\n}", "title": "" }, { "docid": "37a8879f22cb7df9f6d9444b755f93a9", "score": "0.5549308", "text": "function ingresarInvMantenimiento() {\n\t\t// Retorna 0 cuando ingresa el Equipo al inventario.\n\t\t// Retorna 1 cuando se hace imposible guardar el equipo por cualquier falla.\n\t\t// Retorna 2 si Existe un Serial Duplicado\n\t\tswitch($this->buscarSerialDuplicado()) {\n\t\t\tcase 0:\n\t\t\t\treturn 2;\n\t\t\t\tbreak 1;\n\t\t\tcase 1:\n\t\t\t\t$conUltimo=\"SELECT ID_INVENTARIO FROM inventario ORDER BY ID_INVENTARIO DESC\";\n\t\t\t\t$cons=new consecutivo(\"INV\",$conUltimo);\n\t\t\t\t$this->idInventario=$cons->retornar();\n\t\t\t\tconectarMysql();\n\t\t\t\t$resultadoIngresarInventario=$this->ingresarInventario();\n\t\t\t\t$resultadoIngresarInventarioPropiedad=$this->ingresarInventarioPropiedad();\n\t\t\t\t$this->cambio=\"NUEVO EQUIPO\";\n\t\t\t\t$resultadoIngresarInventarioUsuarioSistema=$this->ingresarInventarioUsuarioSistema();\n\t\t\t\t$resultadoIngresarEquipoCampo=$this->ingresarEquipoCampo();\n\t\t\t\tif (!empty($this->fechaInicio) && !empty($this->fechaFinal) && !empty($this->idPedido)) {\n\t\t\t\t\t$resultadoIngresarEquipoGarantia=$this->ingresarEquipoGarantia();\n\t\t\t\t}\n\t\t\t\t$resultadoIngresarInventarioUbicacion=$this->ingresarInventarioUbicacion();\n\t\t\t\t$resultadoIngresarInventarioUsuario=$this->ingresarInventarioUsuario();\n\t\t\t\t$resultado=$resultadoIngresarInventario+$resultadoIngresarInventarioPropiedad+$resultadoIngresarInventarioUsuarioSistema+\n\t\t\t\t$resultadoIngresarEquipoCampo+$resultadoIngresarEquipoGarantia+$resultadoIngresarInventarioUbicacion+$resultadoIngresarInventarioUsuario;\n\n\t\t\t\tif ($resultado==0) {\n\t\t\t\t\treturn 0;\n\t\t\t\t} else {\n\t\t\t\t\t$this->deshacerIngresar();\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\tbreak 1;\n\t\t}\n\t}", "title": "" }, { "docid": "e258567cd5af35c846d9f644cf6622ca", "score": "0.55454504", "text": "function retour_idpersonne_chambre_fiche($id){\nreturn ResultatRequette(\"select ID_PERSONNE as info from occuper where ID_OCCUPATION='$id'\");\n}", "title": "" }, { "docid": "d2570a879e0204ac7ac0fffc6ce02eb4", "score": "0.55093527", "text": "function modificarVenta(){\n\t\t$this->procedimiento='ven.ft_venta_ime';\n\t\t$this->transaccion='VEN_VEN_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_venta','id_venta','int4');\n\t\t$this->setParametro('id_cliente','id_cliente','int4');\n\t\t$this->setParametro('id_moneda','id_moneda','int4');\n\t\t$this->setParametro('fac_nit','fac_nit','varchar');\n\t\t$this->setParametro('id_factura','id_factura','int4');\n\t\t$this->setParametro('fac_nro_autoriz','fac_nro_autoriz','varchar');\n\t\t$this->setParametro('fac_nro','fac_nro','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('nit_factura','nit_factura','int4');\n\t\t$this->setParametro('estado','estado','varchar');\n\t\t$this->setParametro('fecha','fecha','date');\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": "2e70dff77bff437b6c6220cbe7b23ab7", "score": "0.5496227", "text": "static function VetrinaUtenteVisitato (){\n $view = new VVinile();\n $pm = new FPersistentManager();\n $sessione = Session::getInstance();\n if($sessione->isLoggedUtente()) {\n if ($_SERVER['REQUEST_METHOD'] == \"POST\") {\n $email=$_POST[\"email_venditore\"];\n //$result = $pm->load(\"venditore\",$email,\"FVinile\");\n $result = $pm->loadViniliAttivi($email);\n $img = CFiltro::ImageVinyls($result); //img anteriori\n $imgP = CFiltro::ImageVinyls2($result);//img posteriori\n $view->Vetrina($result, $img, $imgP);\n }\n else\n header('Location: /vinylwebmarket/User/profile');\n }\n else\n header('Location: /vinylwebmarket/User/login');\n }", "title": "" }, { "docid": "62493bfd4f214454fd8e5d582dbbfd3c", "score": "0.5409161", "text": "function HabilitarDetRendicion(){\n\t\t$this->procedimiento='cd.ft_cuenta_doc_ime';\n\t\t$this->transaccion='CD_HABDETREN_IME';\n\t\t$this->tipo_procedimiento='IME';//tipo de transaccion\n\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cuenta_doc','id_cuenta_doc','int4');\n\t\t$this->setParametro('confirmacion','confirmacion','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "f65a1243142e8449f8d3892c361dfd10", "score": "0.54085624", "text": "public function modifier() {\n $id = $this->requete->getParametreId('id');\n $meal = $this->meal->getMeal($id);\n $this->genererVue(['meal' => $meal]);\n }", "title": "" }, { "docid": "d005d5b6b46a71537d7fe7255979f13c", "score": "0.540223", "text": "public function borradetalle($id /*idtemp*/) {\n\n $detalletemp=Docompratemp::model()->findByPk($id /*idtemp*/);\n\n $mensaje=\"\";\n if(!is_null($detalletemp)) {\n ///verificamos primero si es un registro agregado\n if (is_null($detalletemp->id)) { ///quier decir que no existe una imagen en la tabla opriginal, osea se ha agregado recientemente\n $detalletemp->delete();\n //$detalletemp->save();\n $mensaje.=\"Se borro el registro\";\n } else {// si ya se ha grabado o confirmado en la tabla original\n //buscar en le registro orignal el firma\n $detallefirme=Docompra::model()->findByPk($detalletemp->id);\n // primero verificamos si ha abido entragas\n if ($detallefirme->cantidadentregada > 0) {\n $mensaje .= \" El item \" . $detalletemp->item . \" Tiene entregas, no puede ser borrado <br>\";\n\n } else { ///si no tiene entrgas aun no cantemos victoria\n //OJO QUE ALMOMENTO DE CONFIRMAR EL BUFFER DEBEMOS AEGURARNOQ UE EN EL EVENTO\n //AFTERSAVE() DEL REGISTRO DOCOMPRA\n\n $detalletemp->setScenario('cambiaestado');\n $detalletemp->estadodetalle = ESTADO_DOCOMPRA_ANULADO;\n $mensaje .= ($detalletemp->save()) ? \"\" : \" No se pudo anular el item \" . $detalletemp->item . \"<br>\";\n }\n\n }\n\n } else {\n $mensaje.=\"No se encontro ningun registro para borrar con el ID=\".$id;\n }\n\n echo $mensaje;\n\n}", "title": "" }, { "docid": "9c43c3856fedf4bb152896bc490efd92", "score": "0.53878385", "text": "function eliminarVenta(){\n\t\t$this->procedimiento='ven.ft_venta_ime';\n\t\t$this->transaccion='VEN_VEN_ELI';\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_venta','id_venta','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": "01f95871b51b490b8eb3025730eb6d86", "score": "0.53567666", "text": "protected function obr() {\r\n\r\n If ($_REQUEST['Act'] == 2) {\r\n $_SESSION['IdRec'] = $_REQUEST['id'];\r\n $this->Otvetstv();\r\n exit();\r\n }\r\n \r\n\r\n IF (isset($_POST['OTV'])) {\r\n $IdRec = $_SESSION['IdRec'];\r\n $IdUserSet = $_POST['UserId'];\r\n $this->Logging($_SESSION['Id_user'], $Id_Razdela=1,$IdRec,6,$IdUserSet,'Назначен ответственный');\r\n $query = \"UPDATE jurvipnetzapros SET Otvetstv='$IdUserSet' Where Id=$IdRec\";\r\n $this->query($query);\r\n unset($_SESSION['IdRec']);\r\n header(\"location: /?option=viewJurVipnet\");\r\n }\r\n\r\n If ($_REQUEST['Act'] == PZ) {\r\n $this->VxodZapros();\r\n \r\n unset($_SESSION['$Message']);\r\n exit();\r\n }\r\n \r\n If ($_REQUEST['Act'] == history) {\r\n // $this->VxodZapros();\r\n \r\n $this->Logging($_SESSION['Id_user'], $Id_Razdela=1,$_REQUEST['id'],1000,0,'Просмотр истории');\r\n $this->history();\r\n //Logging($Id_User, $Id_Razdela=1,$Id_Record,$id_Action,$Id_rezerv=0,$Action)\r\n // unset($_SESSION['$Message']);\r\n \r\n //exit();\r\n }\r\n IF (isset($_POST['HistoryBut'])) {\r\n header(\"location: /?option=viewJurVipnet\"); \r\n }\r\n \r\n IF (isset($_POST['VxdZ'])) {\r\n $DC = date('Y-m-d');\r\n $IDU = $_SESSION['Id_user'];\r\n \r\n $Ext = $this->getExtens($_FILES['FileZ']['name']); \r\n $PS = PATHINVipnet;\r\n $SpNap = $_POST['SposNapr'];\r\n \r\n $file=$_FILES['FileZ']['name'];\r\n \r\n $FileMas = explode(\"_\", $file);\r\n \r\n //$FileMas[0] - КОД ОПФР ЮРЛИЦА УПФР\r\n If ($FileMas[0]=='') \r\n {\r\n \r\n //exit('Ошибка выбора файла. Файл уже обработан. Выберите другой');\r\n $_SESSION['$Message']='Ошибка выбора файла. Файл уже обработан. Выберите другой';\r\n //TO-DOжестокий костыль нужно что бы выводило окно как в оригинале!\r\n header(\"location: /?option=CreateZapros&Act=PZ\");\r\n //$this->VxodZapros();\r\n }\r\n \r\n Else {\r\n $Zapr1=$FileMas[1];\r\n\r\n $napominanie=stripos($Zapr1, '(н)' );\r\n $Zapr=$Zapr1;\r\n\r\n If ($napominanie!==FALSE){\r\n $Zapr=substr($Zapr1,$napominanie+4);\r\n $napominanie=1;\r\n }\r\n else {$napominanie=0;}\r\n\r\n\r\n $Zapr1=$Zapr;\r\n $zablagRab=stripos($Zapr1, '(зр)' );\r\n\r\n If ($zablagRab!==FALSE){\r\n $Zapr=substr($Zapr1,0,$zablagRab);\r\n $zablagRab=1;\r\n\r\n }\r\n else {$zablagRab=0;}\r\n\r\n $Zapr1=mb_strtoupper($Zapr);\r\n\r\n $FIO=substr($FileMas[2],0,strlen($FileMas[2])-4);\r\n\r\n $TZI = $this->getTypeZ1($Zapr1);\r\n\r\n $Flname='_'.$file;\r\n\r\n\r\n\r\n $query = \"INSERT INTO jurvipnetzapros (DataReg, FIOZL,IdUserCreate,TypeZapros,TypeZaprosId,FileZapr,PathFileToArchiv,Napravl,Povtor,ZR,SpNap)\r\n VALUES('$DC','$FIO','$IDU','$Zapr1','$TZI','$Flname','$PS','1','$napominanie','$zablagRab','$SpNap')\";\r\n $this->query($query);\r\n \r\n $this->Logging($_SESSION['Id_user'], $Id_Razdela=1,$this->linkId,2,0,'Принят входящий запрос');\r\n \r\n $P=$PS.iconv('utf-8', 'windows-1251', $file);\r\n $P1=$PS.'_'.iconv('utf-8', 'windows-1251', $file);\r\n rename($P,$P1);\r\n header(\"location: /?option=viewJurVipnet\");\r\n } //If ($FileMas[0]=='') else\r\n } \r\n \r\n If ($_REQUEST['Act'] == 3) {\r\n //TO-DO добавить проверку на соответсвие ЗИЛС-ОИЛС И возможно на фамилию если не совпадает то предупреждать ;\r\n $this->VxodOtvet();\r\n $_SESSION['IdRec']=$_REQUEST['id'];\r\n exit();\r\n }\r\n \r\n IF (isset($_POST['VxdO'])) {\r\n $DC = date('Y-m-d');\r\n $IDU = $_SESSION['Id_user'];\r\n \r\n $Ext = $this->getExtens($_FILES['FileZ']['name']); \r\n $PS = PATHINVipnet;\r\n \r\n $file=$_FILES['FileZ']['name'];\r\n $FileMas = explode(\"_\", $file);\r\n $IdRec = $_SESSION['IdRec'];\r\n //$FileMas[0] - КОД ОПФР ЮРЛИЦА УПФР\r\n If ($FileMas[0]=='') \r\n {\r\n $_SESSION['$Message']='Ошибка выбора файла. Файл уже обработан. Выберите другой';\r\n //header(\"location: /?option=CreateZapros&Act=3\");\r\n $this->VxodOtvet();\r\n \r\n }\r\n \r\n Else {\r\n $F='_'.$file;\r\n $query = \"UPDATE jurvipnetzapros SET DateOtveta='$DC', FileOtv='$F' Where Id=$IdRec\";\r\n $this->query($query);\r\n $P=$PS.iconv('utf-8', 'windows-1251', $file);\r\n $P1=$PS.'_'.iconv('utf-8', 'windows-1251', $file);\r\n rename($P,$P1);\r\n header(\"location: /?option=viewJurVipnet\");\r\n }\r\n }\r\n \r\n If ($_REQUEST['Act'] == 'Peres') {\r\n $_SESSION['IdRec'] = $_REQUEST['id'];\r\n $Id= $_REQUEST['id'];\r\n $query = \"Select FileZapr from jurvipnetzapros Where Id=$Id\";\r\n $rez=$this->query($query);\r\n $rez=mysqli_fetch_assoc($rez); \r\n $_SESSION['FileZapr']=$rez['FileZapr'];\r\n \r\n \r\n $this->Peres();\r\n //exit();\r\n// $D = date('Y-m-d');\r\n// $Id = $_REQUEST['id'];\r\n// $query = \"UPDATE jurvipnetzapros SET DateOtveta='$D' Where Id=$Id\";\r\n// $this->query($query);\r\n// header(\"location: /?option=viewJurVipnet\");\r\n }\r\n \r\n If ($_REQUEST['Act'] == 'kontrols') {\r\n $_SESSION['IdRec'] = $_REQUEST['id'];\r\n $Id= $_REQUEST['id'];\r\n $query = \"UPDATE jurvipnetzapros SET Kontrol='1' Where Id=$Id\"; \r\n $rez=$this->query($query);\r\n $this->Kontrols();\r\n \r\n }\r\n \r\n IF (isset($_POST['KontrolsBut']))\r\n {\r\n $Action=$_POST['KontrolsText']; \r\n $IdRec = $_SESSION['IdRec'];\r\n $this->Logging($_SESSION['Id_user'],1,$IdRec,5,0,$Action);\r\n header(\"location: /?option=viewJurVipnet\");\r\n }\r\n \r\n \r\n \r\n IF (isset($_POST['ReSend']))\r\n {\r\n $IdRec = $_SESSION['IdRec'];\r\n $IDUs=$_SESSION['Id_user'];\r\n $DC = $_POST['DateC'];\r\n $KR = $_POST['KodRegion'];\r\n $KU = $_POST['KodUrL'];\r\n $KP = $_POST['KodUPFR'];\r\n $PS = PATHINVipnet;\r\n $PS1 = PathServerArxivPeres; \r\n $PS2 = PATHOUTVipnet;\r\n $FileZapr=$_SESSION['FileZapr'];\r\n $FileMas = explode(\"_\", $FileZapr);\r\n $NewFile=$KR.$KU.$KP.'_'.$FileMas[2].'_'.$FileMas[3];\r\n $P=$PS.iconv('utf-8', 'windows-1251', $FileZapr);\r\n $P1=$PS1.iconv('utf-8', 'windows-1251', $NewFile);\r\n $P2=$PS2.iconv('utf-8', 'windows-1251', $NewFile);\r\n rename($P,$P1);\r\n copy($P1, $P2);\r\n If ($_SESSION['Status']=22)\r\n $query = \"UPDATE jurvipnetzapros SET DateOtveta='$DC', KodReg='$KR',KodUrLic='$KU',KodUpfr='$KP', FileOtv='$Flname', Otvetstv='$IDUs' , Napravl='2' Where Id=$IdRec\"; \r\n else \r\n $query = \"UPDATE jurvipnetzapros SET DateOtveta='$DC', KodReg='$KR',KodUrLic='$KU',KodUpfr='$KP', FileOtv='$Flname', Napravl='2' Where Id=$IdRec\"; \r\n $this->query($query);\r\n \r\n };\r\n \r\n \r\n If ($_REQUEST['Act'] == 'PovtISXD') {\r\n $Path=PathServerArxiv;\r\n $D = date('Y-m-d');\r\n $Id= $_REQUEST['id'];\r\n $query = \"Select FileZapr from jurvipnetzapros Where Id=$Id\";\r\n $rez=$this->query($query);\r\n $rez=mysqli_fetch_assoc($rez);\r\n $FileName=$rez['FileZapr'];\r\n \r\n $FileMas = explode(\"_\", $rez['FileZapr']);\r\n $NewFileName=$FileMas[0].'_(н)'.$FileMas[1].'_'.$FileMas[2];\r\n $Pt=$Path.$FileName;\r\n $P=iconv('utf-8', 'windows-1251', $Pt);\r\n $Pt=$Path.$NewFileName;\r\n $P1=iconv('utf-8', 'windows-1251', $Pt);\r\n $Pt=PATHOUTVipnet.$NewFileName;\r\n $P2=iconv('utf-8', 'windows-1251', $Pt);\r\n $query = \"UPDATE jurvipnetzapros SET Povtor='1', DatePovtor='$D',FileZapr='$NewFileName' Where Id=$Id\";\r\n \r\n $this->query($query);\r\n rename($P,$P1);\r\n copy($P1, $P2);\r\n $this->Logging($_SESSION['Id_user'], $Id_Razdela=1,$Id,7,0,'Направлен повторный запрос');\r\n header(\"location: /?option=viewJurVipnet\");\r\n }\r\n \r\n \r\n \r\n If ($_REQUEST['Act'] == 'Msg') {\r\n \r\n $_SESSION['IdRec'] = $_REQUEST['id'];\r\n $Id= $_REQUEST['id'];\r\n $query = \"Select FIOZL from jurvipnetzapros Where Id=$Id\";\r\n $rez=$this->query($query);\r\n $rez=mysqli_fetch_assoc($rez); \r\n $_SESSION['FIOZL']=$rez['FIOZL'];\r\n $this->Msg();\r\n \r\n exit();\r\n// $D = date('Y-m-d');\r\n// $Id = $_REQUEST['id'];\r\n// $query = \"UPDATE jurvipnetzapros SET DateOtveta='$D' Where Id=$Id\";\r\n// $this->query($query);\r\n// header(\"location: /?option=viewJurVipnet\");\r\n }\r\n \r\n \r\n \r\n\r\n if (isset($_GET['SearchSTR'])) {\r\n\r\n// var_dump($_REQUEST);\r\n $qu = \"SELECT * FROM SPR_UPFR WHERE UPFR LIKE '%\" . strval($_GET['SearchSTR']) . \"%' ORDER BY KOP, KUP LIMIT 30\";\r\n $fetch = $this->query($qu);\r\n while ($row = mysqli_fetch_assoc($fetch)) {\r\n //$return_arr[] = array('FIO' => $row['FIO'],'Id' => $row['Id'],'Id_Otdel' =>$row['Id_Otdel']);}\r\n $return_arr[] = $row['Region'] . '|' . $row['UPFR']. '|' . $row['KOP']. '|' . $row['KUL'] . '|' . $row['KUP'] . '|';\r\n }\r\n echo json_encode($return_arr);\r\n exit();\r\n }\r\n\r\n \r\n\r\n// $data = array('bla', 'bla', 'bla');\r\n////header('Content-Type: application/javascript');\r\n// echo (isset($_GET['callback']) ? $_GET['callback'] : '').'(' . json_encode($data) . ')';\r\n\r\n IF (isset($_POST['SaveAs'])||isset($_POST['SendAs'])) {\r\n \r\n $IdRec = $_SESSION['IdRec'];\r\n $DC = $_POST['DateC'];\r\n $KR = $_POST['KodRegion'];\r\n \r\n $KU = $_POST['KodUrL'];\r\n $KP = $_POST['KodUPFR'];\r\n IF (isset($_POST['SaveAs']))\r\n {\r\n $FL = $_POST['FIOZL'];\r\n $SpNap = $_POST['SposNapr'];\r\n }\r\n else {\r\n $FL=$_SESSION['FIOZL'];\r\n }\r\n $TZI = $_POST['TypeZapr'];\r\n $TZ = $this->getTypeZ2($TZI);\r\n $TDe = $_POST['TypeDeistv'];\r\n $TZR = $_POST['ZR'];\r\n $PS = PathServerArxiv;\r\n $IDU = $_SESSION['Id_user'];\r\n\r\n $Ext = $this->getExtens($_FILES['FileZ']['name']);\r\n $Flname = $KR . $KU . $KP . '_';\r\n If ($_POST['NP'] == 1) {\r\n $Flname = $Flname . '(н)';\r\n };\r\n $Flname = $Flname . $TZ;\r\n If ($_POST['ZR'] == 1) {\r\n $Flname = $Flname . '(зр)';\r\n };\r\n $Flname = $Flname . '_' . $FL;\r\n\r\n $Flname = $Flname . '.' . $Ext['extension'];\r\n \r\n $img_src = PathServerArxiv.iconv('utf-8', 'windows-1251', $Flname);\r\n $img_src1 = PATHOUTVipnet.iconv('utf-8', 'windows-1251', $Flname);\r\n \r\n If (!move_uploaded_file($_FILES['FileZ']['tmp_name'], $img_src)) {\r\n exit(\"Не удалось загрузить файл\");\r\n }\r\n \r\n\r\n copy($img_src, $img_src1);\r\n\r\n //FileOtv\r\n \r\n \r\n If (isset($_POST['SaveAs'])) {\r\n $query = \"INSERT INTO jurvipnetzapros (DataReg, KodReg,KodUrLic,KodUpfr,FIOZL,IdUserCreate,TypeZapros,TypeZaprosId,TypeDeistv,FileZapr,PathFileToArchiv,ZR,Napravl,SpNap)\r\n VALUES('$DC','$KR','$KU','$KP','$FL','$IDU','$TZ','$TZI','$TDe','$Flname','$PS','$TZR','0',$SpNap)\";}\r\n else {\r\n $query = \"UPDATE jurvipnetzapros SET DateOtveta='$DC', KodReg='$KR',KodUrLic='$KU',KodUpfr='$KP', FileOtv='$Flname' Where Id=$IdRec\"; \r\n }\r\n //var_dump($query);\r\n $this->query($query);\r\n header(\"location: /?option=viewJurVipnet\");\r\n };\r\n }", "title": "" }, { "docid": "b32ba3c1cd1775b1aef0a7149155f272", "score": "0.5349859", "text": "public function mostra_utente($id_utente) \r\n {\r\n # estrazione del nome reale sulla base dell'identificatore memorizzato in sessione\r\n $sql = \"SELECT nome_reale FROM iscritti WHERE id_utente = $id_utente\";\r\n $risultato = $this->connessione->query($sql);\r\n $row = $risultato->fetch_array(MYSQLI_ASSOC);\r\n # stampa a video del nome reale dell'utente\r\n echo $row['nome_reale'];\r\n }", "title": "" }, { "docid": "ef3002aedd42f86b9e440c45295868f3", "score": "0.5330481", "text": "function mod_Prove($nombre,$ruc,$direccion,$id){\r\n $query0= mysql_query(\"select * from proveedor where id_prove = '\".$id.\"' \");\r\n $reg0 = mysql_fetch_array($query0);\r\n $ruc_bd_pro=$reg0[2];\r\n \r\n //QUERY2 QUE TRAE UN SOLO DATO PARA SER COMPARADO\r\n $quer2=mysql_query(\"select * from proveedor \r\n where not (ruc = '\".$ruc_bd_pro.\"') and estado= 'si' \r\n and ruc = '\".$ruc.\"'\" );\r\n \r\n $reg2=mysql_fetch_array($quer2);\r\n $varruc = $reg2[2];\r\n /////////// \r\n \r\n if($ruc == $varruc and $ruc != \"\" )\r\n {\r\n echo '<font color=\"red\" > * El ruc <strong>\"'.$ruc. '\" </strong> ya esta registrado por <strong> \"'.$reg2[1].'\" </strong></font>' ;\r\n } \r\n \r\n else {\r\n $this->datos = mysql_query(\"update proveedor set nombre = '\".$nombre.\"', ruc = '\".$ruc.\"',direccion = '\".$direccion.\"' where id_prove = '\".$id.\"'\");\r\n echo 'Proveedor Modificado' ;\r\n }\r\n \r\n}", "title": "" }, { "docid": "e074f3e21ac7355434ff5e192e9e5c85", "score": "0.5328717", "text": "function modificarNotaDetalle(){\n\t\t$this->procedimiento='fac.ft_nota_detalle_ime';\n\t\t$this->transaccion='FAC_DENO_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_nota_detalle','id_nota_detalle','int4');\n\t\t$this->setParametro('id_factura_detalle','id_factura_detalle','int4');\n\t\t$this->setParametro('id_nota','id_nota','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('importe','importe','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": "616792068d60e2aaebc419aba6208428", "score": "0.5318719", "text": "public function ocultar_cv($id)\n {\n $ajax = request()->ajax();\n $user = \\Auth::user();\n\n if ($user->hasRole('Estudiante')){\n\n $experiencia_laboral = $user->persona->experiencias_laborales()->where('id', $id)->get()->first();\n\n //verificamos que el usuario logueado como Estudiante no pueda \n //dar de Baja una Experiencia Laboral que no sea suya\n if (count($experiencia_laboral) == 0){\n //si es mediante ajax indica que no se actualizara enviando\n //mensaje de error\n if ($ajax) {\n return response()->json([\n 'update' => false,\n 'error' => \"No se puede actualizar\",\n ]);\n }\n //si no se encuentra el recurso\n abort(404);\n\n }\n }\n\n if ($experiencia_laboral->mostrar_cv == false){\n //si es por ajax se envia el boton indicando que \n //es igual\n return response()->json([\n 'igual' => true,\n ]);\n }\n //Se actualiza el boton\n $experiencia_laboral->mostrar_cv = false;\n $experiencia_laboral->save();\n\n if ($ajax){\n //enviamos el boton indicando que se actualizo\n return response()->json([\n 'update' => true\n ]);\n }\n //sino se redirige al index\n return redirect()->route('experiencias.laborales.index');\n }", "title": "" }, { "docid": "e35f5cbb23c9c96b4a752e809d57a57a", "score": "0.5303727", "text": "public function addRetour(Request $request,$id){\n // walla za3ma zayid 5ater kén tfassa5 méch béch ysir chay deja !? \n $Src=$request->Src;\n \n if($Src=='correctif'){\n $retours=$request->retours;\n $UserID=JWTAuth::user()->id;\n\n $di_bon_retour=di_bon_retour::where('RetourID','=',$id)->first();\n $statut=$di_bon_retour->statut;\n\n if($statut=='enAttente'){\n foreach($retours as $retour){\n $article_id=$retour['article_id'];\n $qter=$retour['qter'];\n\n di_bon_retour_det::where('retour_id','=',$id)\n ->where('article_id','=',$article_id)->update(['qter'=>$qter]);\n $di_bon_retour_det2=di_bon_retour_det::where('retour_id','=',$id)\n ->where('article_id','=',$article_id)->first();\n $qtear=$di_bon_retour_det2->qtear;\n $perdu=$qtear-$qter;\n\n app('App\\Http\\Controllers\\Divers\\generale')->UpdateStockByArticleID($article_id,$qtear);\n\n if($perdu>0){\n // tableau perdu generale :: create\n\n $retour_perdu=app('App\\Http\\Controllers\\Divers\\generale')->ArticlePerdu($article_id,$perdu);\n\n di_bon_retour_hist::create([\n 'retour_id'=>$id,\n 'article_id'=>$article_id,\n 'user_id'=>$UserID,\n 'type'=>'p',\n 'value'=>$perdu\n ]);\n }\n }\n di_bon_retour::where('RetourID','=',$id)->update(['statut'=>'ferme']);\n\n }else{\n\n foreach($retours as $retour){\n $article_id=$retour['article_id'];\n $qter=$retour['qter'];\n\n $di_bon_retour_det=di_bon_retour_det::where('retour_id','=',$id)\n ->where('article_id','=',$article_id)->first();\n $qter_a=$di_bon_retour_det->qter;\n \n di_bon_retour_det::where('retour_id','=',$id)\n ->where('article_id','=',$article_id)->update(['qter'=>$qter]);\n \n $poupu=$qter_a-$qter;\n if($poupu!=0){\n // tableau perdu generale :: create increment poupu\n \n if($poupu>0){\n $type='p';\n $retour_perdu=app('App\\Http\\Controllers\\Divers\\generale')->ArticlePerdu($article_id,$poupu);\n }\n if($poupu<0){\n $type='pu';\n $retour_perdu=app('App\\Http\\Controllers\\Divers\\generale')->UpdatePerduByArticleID($article_id,$poupu);\n }\n app('App\\Http\\Controllers\\Divers\\generale')->UpdateStockByArticleID($article_id,(-1*$poupu));\n di_bon_retour_hist::create([\n 'retour_id'=>$id,\n 'article_id'=>$article_id,\n 'user_id'=>$UserID,\n 'type'=>$type,\n 'value'=>abs($poupu)\n ]);\n }\n\n }\n\n\n }\n \n return response()->json($retours);\n }\n\n\n if($Src=='preventif'){\n $retours=$request->retours;\n $UserID=JWTAuth::user()->id;\n\n $di_bon_retour=prev_bon_retour::where('RetourID','=',$id)->first();\n $statut=$di_bon_retour->statut;\n \n if($statut=='enAttente'){\n foreach($retours as $retour){\n $article_id=$retour['article_id'];\n $qter=$retour['qter'];\n\n prev_bon_retour_det::where('retour_id','=',$id)\n ->where('article_id','=',$article_id)->update(['qter'=>$qter]);\n $di_bon_retour_det2=prev_bon_retour_det::where('retour_id','=',$id)\n ->where('article_id','=',$article_id)->first();\n $qtear=$di_bon_retour_det2->qtear;\n $perdu=$qtear-$qter;\n\n app('App\\Http\\Controllers\\Divers\\generale')->UpdateStockByArticleID($article_id,$qtear);\n\n if($perdu>0){\n // tableau perdu generale :: create\n\n $retour_perdu=app('App\\Http\\Controllers\\Divers\\generale')->ArticlePerdu($article_id,$perdu);\n\n prev_bon_retour_hist::create([\n 'retour_id'=>$id,\n 'article_id'=>$article_id,\n 'user_id'=>$UserID,\n 'type'=>'p',\n 'value'=>$perdu\n ]);\n }\n }\n prev_bon_retour::where('RetourID','=',$id)->update(['statut'=>'ferme']);\n\n }else{\n\n foreach($retours as $retour){\n $article_id=$retour['article_id'];\n $qter=$retour['qter'];\n\n $di_bon_retour_det=prev_bon_retour_det::where('retour_id','=',$id)\n ->where('article_id','=',$article_id)->first();\n $qter_a=$di_bon_retour_det->qter;\n \n prev_bon_retour_det::where('retour_id','=',$id)\n ->where('article_id','=',$article_id)->update(['qter'=>$qter]);\n \n $poupu=$qter_a-$qter;\n if($poupu!=0){\n // tableau perdu generale :: create increment poupu\n \n if($poupu>0){\n $type='p';\n $retour_perdu=app('App\\Http\\Controllers\\Divers\\generale')->ArticlePerdu($article_id,$poupu);\n }\n if($poupu<0){\n $type='pu';\n $retour_perdu=app('App\\Http\\Controllers\\Divers\\generale')->UpdatePerduByArticleID($article_id,$poupu);\n }\n app('App\\Http\\Controllers\\Divers\\generale')->UpdateStockByArticleID($article_id,(-1*$poupu));\n prev_bon_retour_hist::create([\n 'retour_id'=>$id,\n 'article_id'=>$article_id,\n 'user_id'=>$UserID,\n 'type'=>$type,\n 'value'=>abs($poupu)\n ]);\n }\n\n }\n\n\n }\n \n return response()->json($retours);\n }\n\n\n }", "title": "" }, { "docid": "75b01b31c51d56d60638461018717ba9", "score": "0.5299679", "text": "public function inspeccionar($id){\n $id = (int) $id;\n $denuncia = new Denuncia();\n $denuncia->getInformacionDenunciaDetalles($id);\n if (Input::hasPost('observacion_inspeccion')) {\n $denuncia_dt = new DetalleDenuncia();\n $denuncia_dt->getInformacionDetalleDenuncia($id);\n\n \n Flash::warning('joder..!!!'.Input::post('observacion_inspeccion'));\n\n \n /* if($denuncia_dt->guardar(Input::post('detalle_denuncia'), array('denuncia_id'=>$id))) {\n $denuncia->estatus = 'I';\n $denuncia->save();\n Flash::valid('Se han cargado la inspección Exitosamente..!!!');\n if (!Input::isAjax()) {\n return Router::redirect();\n }\n } else {\n Flash::warning('No se Pudieron Guardar los Datos...!!!');\n }*/\n }\n $this->denuncia= $denuncia;\n $this->titulo = 'Observaciones obtenidas en la Inspección';\n\n }", "title": "" }, { "docid": "f397d96bc8c1325774bbe5a97adb37ca", "score": "0.52995145", "text": "public function testUpdateUEId()\n {\n }", "title": "" }, { "docid": "656008b7b320563367585fd58b33bb86", "score": "0.52841026", "text": "function cambiarRevision(){\n $this->procedimiento='conta.ft_comisionistas_ime';\n $this->transaccion='CONTA_REV_IME';\n $this->tipo_procedimiento='IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_comisionista','id_comisionista','int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "8de9ac4a32e9b9ccfd182e862e900422", "score": "0.52820903", "text": "public function getId_vet()\n {\n return $this->id_vet;\n }", "title": "" }, { "docid": "1ec8f3ff56039c36b26581281d4c11cb", "score": "0.5280147", "text": "public function idreservacion(){\n\t\treturn $this->_idreservacion;\n\t}", "title": "" }, { "docid": "f5c7f531b25bc48c59a940573da160ae", "score": "0.52592224", "text": "function autoriser_orrreservation_voir_dist($faire, $type, $id, $qui, $opt) {\n if ($qui['statut']) {\n $statut=$qui['statut'];\n }else {\n $statut=\"tous\";\n }\n $id_auteur=$qui['id_auteur'];\n\t$autorisation=\"V\";\n\t$resultat=recherche_autorisation($id,$statut,$autorisation,$id_auteur);\n\treturn $resultat;\n}", "title": "" }, { "docid": "9e1f22e48f9f85a0ee898005cc9e41cc", "score": "0.525677", "text": "public function getIdVendedor()\n {\n return $this->idVendedor;\n }", "title": "" }, { "docid": "8b5f930dc41080a14dab5d91e9b9fa8c", "score": "0.5249401", "text": "public function confirmer() {\n $id = $this->requete->getParametreId('id');\n // Lire le Meal à l'aide du modèle\n $meal = $this->meal->getMeal($id);\n $this->genererVue(['meal' => $meal]);\n }", "title": "" }, { "docid": "aeffc801fe939fa2eaddcf832b7b5618", "score": "0.5246704", "text": "public function getIdlecturaEvotranspiracion(){\n return $this->idlecturaEvotranspiracion;\n }", "title": "" }, { "docid": "00e8eea12bbbb28024ed53be3c406e5f", "score": "0.523106", "text": "public function estVivant(){\n\n }", "title": "" }, { "docid": "198c88f1d40d6e5cb304b57c7dcdd204", "score": "0.5224066", "text": "function finnesRuteId($id) {\n\t\t$stmt = $this->db->prepare(\"SELECT id FROM Ruter WHERE id=? AND aktiv='1'\");\n\t\t$stmt->bind_param(\"i\", $id);\n\t\t$stmt->execute();\n\t\t$stmt->store_result();\n\n\t\tif ($stmt->num_rows>0)\n\t\t\treturn true;\n\t\telse \n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "62bcc1536f6f9de360c13dc96d4340d9", "score": "0.5221153", "text": "function ingresar() {\n\t\t// Retorna 0 cuando ingresa el Equipo al inventario.\n\t\t// Retorna 1 cuando se hace imposible guardar el equipo por cualquier falla.\n\t\t// Retorna 2 si Existe un Serial Duplicado\n\t\tswitch($this->buscarSerialDuplicado()) {\n\t\t\tcase 0:\n\t\t\t\treturn 2;\n\t\t\t\tbreak 1;\n\t\t\tcase 1:\n\t\t\t\t$conUltimo=\"SELECT ID_INVENTARIO FROM inventario ORDER BY ID_INVENTARIO DESC\";\n\t\t\t\t$cons=new consecutivo(\"INV\",$conUltimo);\n\t\t\t\t$this->idInventario=$cons->retornar();\n\t\t\t\tconectarMysql();\n\t\t\t\t$resultadoIngresarInventario=$this->ingresarInventario();\n\t\t\t\t$resultadoIngresarInventarioPropiedad=$this->ingresarInventarioPropiedad();\n\t\t\t\t$this->cambio=\"NUEVO EQUIPO\";\n\t\t\t\t$resultadoIngresarInventarioUsuarioSistema=$this->ingresarInventarioUsuarioSistema();\n\t\t\t\t$resultadoIngresarEquipoCampo=$this->ingresarEquipoCampo();\n\t\t\t\tif (!empty($this->fechaInicio) && !empty($this->fechaFinal) && !empty($this->idPedido)) {\n\t\t\t\t\t$resultadoIngresarEquipoGarantia=$this->ingresarEquipoGarantia();\n\t\t\t\t}\n\t\t\t\t$resultadoIngresarInventarioUbicacion=$this->ingresarInventarioUbicacion();\n\t\t\t\t$resultado=$resultadoIngresarInventario+$resultadoIngresarInventarioPropiedad+$resultadoIngresarInventarioUsuarioSistema+\n\t\t\t\t$resultadoIngresarEquipoCampo+$resultadoIngresarEquipoGarantia+$resultadoIngresarInventarioUbicacion;\n\n\t\t\t\tif ($resultado==0) {\n\t\t\t\t\treturn 0;\n\t\t\t\t} else {\n\t\t\t\t\t$this->deshacerIngresar();\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\tbreak 1;\n\t\t}\n\t}", "title": "" }, { "docid": "428c2a029d65df20b52798728a03f4b6", "score": "0.52192324", "text": "public function detalleVenta(DetalleVenta $det){ //detalle pedido\n $cnx=new ConexionDB();\n $cn=$cnx->getConexion();\n $res=$cn->prepare(\"INSERT INTO detallepedido VALUES($det->num,\" //modificado\n . \"'$det->codpro','$det->can')\");\n $res->execute();\n $resp=$cn->prepare(\"UPDATE productos SET stock=stock-$det->can WHERE codpro='$det->codpro'\");\n $resp->execute();\n return $res;\n }", "title": "" }, { "docid": "9f92149d3f7f4b0ea816169e473c1708", "score": "0.52132", "text": "public function ver_detalle($id, $Vendedor) \r\n\t{\r\n\t\t$Usuario = $this->session->userdata('Usuario');\r\n\t\t$usuario['Usuario'] = $Usuario; \r\n\t\t$usuario['Vendedor'] = $Vendedor; \r\n\t\t$usuario['Datos'] = $this->modelCliente->DetalleCliente($id);\r\n\t\t\r\n\t\t$this->load->view('Administrador/ADetalleCliente', $usuario);\r\n\t}", "title": "" }, { "docid": "969d83fb74e49ca14494ec2df6dc0177", "score": "0.5202237", "text": "function modificarAuxiliar(){\n\t\t$this->procedimiento='conta.f_auxiliar_ime';\n\t\t$this->transaccion='CONTA_AUXCTA_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_auxiliar','id_auxiliar','int4');\n\t\t$this->setParametro('id_empresa','id_empresa','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('codigo_auxiliar','codigo_auxiliar','varchar');\n\t\t$this->setParametro('nombre_auxiliar','nombre_auxiliar','varchar');\n\t\t$this->setParametro('corriente','corriente','varchar');\n\t\t$this->setParametro('tipo','tipo','varchar');\n\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": "82c6a476e70ce7dcf738222b918ca6f7", "score": "0.5200754", "text": "function eliminarAuxiliar(){\n\t\t$this->procedimiento='conta.f_auxiliar_ime';\n\t\t$this->transaccion='CONTA_AUXCTA_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_auxiliar','id_auxiliar','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": "6ef0d7bdda4f44f5ee0a36f191915bb6", "score": "0.5195895", "text": "public function actuEstu() {\n $consulta_cedulas = $this->db->select('SELECT cedula FROM sipce_estudiante');\n\n //recorro el registro de la consulta, le asigno la cedula a la variable $estudiante (array)\n foreach ($consulta_cedulas as $key => $estudiante) {\n //consulto si existe la cedula en el padron...\n $consulta_datos = $this->db->select('SELECT nombre, primerApellido, segundoApellido, sexo, fechaNacimiento FROM tpersonapadron \n WHERE cedula= :cedula', array('cedula' => $estudiante['cedula']));\n\n //si el resultado de la consulta es diferente a nulo, si existe\n if ($consulta_datos != null) {\n //recorro el registro de la consulta y realizo el update en la tabla sipce_estudiante\n foreach ($consulta_datos as $key => $value) {\n $postData = array('nombre' => $value['nombre'],\n 'apellido1' => $value['primerApellido'],\n 'apellido2' => $value['segundoApellido'],\n 'sexo' => $value['sexo'],\n 'fechaNacimiento' => $value['fechaNacimiento'],\n 'nacionalidad' => '506',\n );\n $this->db->update('sipce_estudiante', $postData, \"`cedula` = '{$estudiante['cedula']}'\");\n }\n //si es nulo realizo un update para colocarle 3 en el campo sexo, para identificarlo posteriormente\n } else {\n $postData = array('sexo' => 3,\n 'fechaNacimiento' => 0,\n 'nacionalidad' => 0,\n );\n $this->db->update('sipce_estudiante', $postData, \"`cedula` = '{$estudiante['cedula']}'\");\n }\n }\n }", "title": "" }, { "docid": "09fe2dbe6037d7e28699ee181707fb49", "score": "0.5191262", "text": "public function devolver(Solicitud $prestamo)\n {\n //la variable $prestamo, trae toda la informarcion de la solicitud\n $hoyDevolucion= Carbon::today()->format('Y-m-d');\n $now=Carbon::now();\n $solicitudId=$prestamo->id;\n $infoSolicitud=Solicitud::findOrFail($solicitudId);\n $fechaFin = $infoSolicitud->fecha_fin;\n $solicitud_estado = $infoSolicitud->estado_id;\n \n \n $existenciaId = $infoSolicitud->existencia_id;\n $infoExistencia = Existencia::find($existenciaId);\n\n //rescato valores de prestamo \n $idPrestamo = DB::table('prestamos')->where('solicitud_id',$solicitudId);\n $id_prestamo=$idPrestamo->pluck('id');\n $id_prest=$id_prestamo[0]; \n $infoPrestamo= Prestamo::find($id_prest);\n $prestamo_estado = $infoPrestamo->estado_id;\n\n $id_user = Solicitud::find($solicitudId)->user_id;\n $infoAlumno = User::find($id_user);\n $infoEncargado =User::find(1);\n\n //datos para el correo\n $correo = DB::table('prestamos')->where('id',$id_prest);\n $correo->fecha_devolucion = $now;\n $correo->alumnoNombre = $infoAlumno->name;\n $correo->alumnoApellido = $infoAlumno->lastname;\n $correo->encargadoNombre = $infoEncargado->name;\n $correo->encargadoApellido = $infoEncargado->lastname; \n $correo->idSolicitud = $infoSolicitud;\n // $correo->idExistencia = $existenciaId; \n \n $mailusuario = $infoAlumno->email;\n if( $solicitud_estado == 4 && $prestamo_estado == 1){\n //Terminar Prestamo\n DB::table('prestamos')->where('id',$id_prestamo)->update(['estado_id' => 2]);\n DB::table('prestamos')->where('id',$id_prestamo)->update(['fecha_devolucion' => $now]);\n DB::table('solicituds')->where('id',$solicitudId)->update(['estado_id' => 5]);\n DB::table('existencias')->where('id',$existenciaId)->update(['disponibilidad_id' => 1]);\n \n Mail::to($mailusuario)->send(new TerminarPrestamo($correo));\n\n return redirect()->action('PrestamoController@index')->with('mensaje','Se ha concluido su prestamo!');\n \n }else{\n return redirect()->action('PrestamoController@index')->with('fracaso','Error no se ha concluido su prestamo!');\n }\n\n }", "title": "" }, { "docid": "a55d17f07ec2c59e08fa2a7921307ea6", "score": "0.5188015", "text": "public function execute()\n {\n $rmID = $this->getContext()->getParameter('id', null);\n if (!$rmID)\n {\n $this->forward($this->module, CONTROLLER_DEFAULT_ACTION, array('messages' => 'Il faut passer l\\'ID d\\'un mouvement récurrent'));\n }\n \n //All is good\n try\n {\n recurringMovement::delete(recurringMovement::retrieve($rmID));\n $this->forward($this->module, CONTROLLER_DEFAULT_ACTION, array('messages' => 'Mouvement récurrent supprimé avec succès'));\n }\n catch (modelException $e)\n {\n $this->forward($this->module, CONTROLLER_DEFAULT_ACTION, array('messages' => 'Erreur : ' . $e->getMessage()));\n }\n }", "title": "" }, { "docid": "b7c2d1073d53781bb0f39cad93bf377f", "score": "0.5187077", "text": "function epurerVtt()\n{\n global $db_vue_rm;\n\n\techo \"Epuration de la table VTT<br>\";\n\n\t// On sélectionne tous les trolls RelaisMago\n\t$sql = \" SELECT id_troll FROM trolls WHERE guilde_troll=\".ID_GUILDE;\n\n if (!$result=mysql_query($sql,$db_vue_rm)) {\n echo mysql_error();\n } else {\n $i=1;\n while ($rmt = mysql_fetch_assoc($result)) {\n $lesRM[$i][id_troll] = $rmt[id_troll];\n $i++;\n }\n }\n\n\t// On sélectionne tous les trolls du VTT\n\t$sql = \" SELECT No FROM vtt\";\n\n if (!$result=mysql_query($sql,$db_vue_rm)) {\n echo mysql_error();\n } else {\n $j=1;\n while ($vtt = mysql_fetch_assoc($result)) {\n $lesVtt[$j][No] = $vtt[No];\n $j++;\n }\n }\n\n\t$sub_sql_list = \"\";\n\n\tfor ($k=1;$k<=count($lesVtt);$k++) {\n\t\t$flag=false;\n\t\t$id=$lesVtt[$k]['No'];\n\t\t\n\t\tfor ($m=1;$m<=count($lesRM);$m++) {\n\t\t\tif ($lesVtt[$k]['No'] == $lesRM[$m]['id_troll'])\n\t\t\t\t$flag=true;\n\t\t}\n\t\tif (!$flag) {\n\t\t\techo \"le Troll $id n'est plus un Relais&Mago<br>\";\n\t\t\t$sub_sql_list .= $id.\" OR No=\";\n\t\t}\n\t}\n\t\n\tif ($sub_sql_list != \"\") {\n\t\t$sub_sql_list=substr($sub_sql_list,0,strlen($substr)-7);\n\t\t$sql = \"DELETE FROM vtt\";\n\t\t$sql .= \" WHERE No = $sub_sql_list\";\n\t\techo \"Epuration du VTT avec : $sql <br>\";\n\t\tmysql_query($sql,$db_vue_rm);\n\t\techo mysql_error();\n\t}\n\n}", "title": "" }, { "docid": "87986a3f1d00a2c5ddbea3f6cdcd1501", "score": "0.51823944", "text": "function modificarViajeroFrecuente(){\n\t\t$this->procedimiento='obingresos.ft_viajero_frecuente_ime';\n\t\t$this->transaccion='OBING_VFB_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_viajero_frecuente','id_viajero_frecuente','int4');\n\t\t$this->setParametro('nombre_completo','nombre_completo','varchar');\n\t\t$this->setParametro('voucher_code','voucher_code','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('pnr','pnr','varchar');\n\t\t$this->setParametro('status','status','varchar');\n\t\t$this->setParametro('ffid','ffid','varchar');\n\t\t$this->setParametro('ticket_number','ticket_number','varchar');\n\t\t$this->setParametro('mensaje','mensaje','varchar');\n\t\t$this->setParametro('id_pasajero_frecuente','id_pasajero_frecuente','int4');\n\t\t$this->setParametro('id_boleto_amadeus','id_boleto_amadeus','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": "74935e06dd0b46422f6a2df9e94fc11c", "score": "0.51815623", "text": "function borraInactivoArticulo($idArticulo){\n\t\t$stock = $this->getStockInventarioByArticuloId($idArticulo);\n\t\t//Si no tiene stock\n\t\tif ( $stock < 1){\n\t\t\t//Pregunto si tiene algun Movimiento. Omito el movimiento de alta.\n\t\t\t$existMov = $this->existeMovimientosByArticuloId($idArticulo);\n\t\t\t//Pregunto si tiene algun Pedido Detalle\n\t\t\t$existPed = $this->existePedidoDetalleByArticuloId($idArticulo);\n\n\t\t\t//Si no tiene detalle de movimiento ni pedido\n\t\t\tif ((! $existMov) && (! $existPed)){\n\t\t\t\t//Borro el movimiento de Alta y los detalles de la baja\n\t\t\t\t$this->deleteMovimientosAltaBajaByArticuloId($idArticulo);\n\t\t\t\t//Borro el articulo\n\t\t\t\t$this->deleteArticulo($idArticulo);\n\n\t\t\t} else {\n\t\t\t\t//Pongo el articulo inactivo\n\t\t\t\t$this->inactivoArticulo($idArticulo);\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "40d7feab5089507b0ccf7fbcbb91cf3e", "score": "0.518049", "text": "public function rendrePrivee(){\n $listeId = filter_var($_POST['liste_id'], FILTER_SANITIZE_NUMBER_INT);\n $liste = m\\Liste::where('no', '=', $listeId)->first();\n if($liste->estProprietaireSession($_SESSION)){\n $liste->publique = 0;\n $liste->save();\n }\n $app = \\Slim\\Slim::getInstance();\n $app->redirect($app->urlFor('afficherListe', array('lid' => $listeId)));\n }", "title": "" }, { "docid": "66aab66e4a2588c34471a85d7a7b4e3c", "score": "0.51782644", "text": "function modificarPuntoVenta(){\n\t\t$this->procedimiento='vef.ft_punto_venta_ime';\n\t\t$this->transaccion='VF_PUVE_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_punto_venta','id_punto_venta','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('id_sucursal','id_sucursal','int4');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('descripcion','descripcion','text');\n\t\t$this->setParametro('codigo','codigo','varchar');\n\t\t$this->setParametro('habilitar_comisiones','habilitar_comisiones','varchar');\n\t\t$this->setParametro('tipo','tipo','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "aa93c2070adc566a3904f02ad9deacb5", "score": "0.5175064", "text": "private function emitirRegimeDePrevidencia() {\n\n if (!$this->exibirRelatorio(self::EMITIR_DESPESAS_RECEITAS_RPPS)) {\n return false;\n }\n\n $oDadosRegimePrevidencia = $this->getDadosRegimeDePrevidencia();\n $sDescricao = 'Despesas Previdenciárias Liquidadas(V)';\n $nValor = $oDadosRegimePrevidencia->nDespesasLiquidadas;\n if ($this->getPeriodo()->getCodigo() == self::CODIGO_SEXTO_BIMESTRE) {\n\n $sDescricao = 'Despesas Previdenciárias Empenhadas(V)';\n $nValor = $oDadosRegimePrevidencia->nDespesasEmpenhadas;\n }\n\n $this->oPdf->Cell(120, 3, \"RECEITAS E DESPESAS DOS REGIMES DE PREVIDÊNCIA\", 'TBR', 0, 'C');\n $this->oPdf->Cell(70, 3, \"Até o Bimestre\", 'TBL', 1, 'C');\n\n $this->oPdf->Cell(120, 3, \"Regime Geral de Previdência Social\", 'R', 0, 'L');\n $this->oPdf->Cell(70, 3, \"-\", 'L', 1, 'C');\n $this->oPdf->Cell(120, 3, \" Receitas Previdenciárias Realizadas(I)\", 'R', 0, 'L');\n $this->oPdf->Cell(70, 3, db_formatar('0.0','f'), 'L', 1, 'R');\n $this->oPdf->Cell(120, 3, \" Despesas Previdenciárias Liquidadas(II)\", 'R', 0, 'L');\n $this->oPdf->Cell(70, 3, db_formatar('0.0','f'), 'L', 1, 'R');\n $this->oPdf->Cell(120, 3, \" Resultado Previdenciário (III) = (I - II)\", 'R', 0, 'L');\n $this->oPdf->Cell(70, 3, db_formatar('0.0','f'), 'L', 1, 'R');\n\n $this->oPdf->Cell(120, 3, \"Regime Próprio de Previdência dos Servidores\", 'R', 0, 'L');\n $this->oPdf->Cell(70, 3, \"-\", 'L', 1, 'C');\n $this->oPdf->Cell(120, 3, \" Receitas Previdenciárias Realizadas(IV)\", 'R', 0, 'L');\n $this->oPdf->Cell(70, 3, db_formatar($oDadosRegimePrevidencia->nReceitasRealizadas,'f'), 'L', 1, 'R');\n $this->oPdf->Cell(120, 3, \" {$sDescricao}\", 'R', 0, 'L');\n $this->oPdf->Cell(70, 3, db_formatar($nValor,'f'), 'L', 1, 'R');\n $this->oPdf->Cell(120, 3, \" Resultado Previdenciário (VI) = (IV - V)\", 'BR', 0, 'L');\n $this->oPdf->Cell(70, 3, db_formatar(($oDadosRegimePrevidencia->nReceitasRealizadas - $nValor),'f'), 'BL', 1, 'R');\n\n $this->oPdf->ln();\n\n }", "title": "" }, { "docid": "aa329c4457632cedfb1fa436dc3069f5", "score": "0.5164092", "text": "public function ver($id) \n {\n\n $qry_servicio = $this->M_servicio->obtener_servicio($id);\n if($qry_servicio->num_rows() > 0)\n {\n $servicio = $qry_servicio->row();\n $this->data['acc'] = CONSULTAR;\n $this->data['servicio'] = $servicio; \n $this->_vista('comun');\n }\n else\n {\n echo false;\n }\n }", "title": "" }, { "docid": "98b1bf164b5876205fb438e51d5543f2", "score": "0.51600534", "text": "public function moverARecibido() {\n\t\treturn $this->_cambiarEstado(self::ESTADO_ACTIVO);\n\t}", "title": "" }, { "docid": "d9ad87efb6ce4746236ed153475afd9d", "score": "0.5155871", "text": "function Establecer_id(){\n \t$id = $this->id;\n \t$this->model->SetId($id);\n }", "title": "" }, { "docid": "ae3830ba3a0afd7f0f16544ef4f0d404", "score": "0.515537", "text": "function eliminarNotaDetalle(){\n\t\t$this->procedimiento='fac.ft_nota_detalle_ime';\n\t\t$this->transaccion='FAC_DENO_ELI';\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_nota_detalle','id_nota_detalle','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": "003df4da0498cd4c7e86481ce4bc457a", "score": "0.5147909", "text": "public function NotaCompleja()\n {\n $params=$this->params;\n if($params===null){\n $params=new RvFichaParams();\n $params->fic_id=$this->primaryKey;\n $params->data=$this->summary;\n $params->save();\n }\n $data=$params->data;\n /*\n * Se calcula la nota de le evaluacion INTERNA COMPLEJA\n */\n $flag=true;\n foreach ($data as $value) {\n if($value['total']==0)$flag=false;\n }\n if($flag){\n switch ($this->eva_id) {\n case 50:\n $dec_nota=($data['PRI_DEC']['acierto']/$data['PRI_DEC']['total'])*0.75\n +($data['PRI_DIS']['acierto']/$data['PRI_DIS']['total'])*0.1125\n +($data['SEC_DEC']['acierto']/$data['SEC_DEC']['total'])*0.1\n +($data['SEC_DIS']['acierto']/$data['SEC_DIS']['total'])*0.0375;\n // $pre_nota=$data['PREGUNTA']['acierto']/$data['PREGUNTA']['total'];\n $pre_nota=$data['PREGUNTA']['acierto']/20;\n $nota=(float)number_format(($dec_nota+$pre_nota)/2,2);\n $data['dec_nota']=(float)number_format($dec_nota,2);\n $data['pre_nota']=(float)number_format($pre_nota,2);\n $data['nota']=(float)number_format($nota,2);\n $params->data=$data;\n $params->save();\n $this->calificacion=$nota;\n if($params->save()){}else{}\n break;\n case 53:\n $dec_nota=($data['PRINCIPAL']['acierto']/$data['PRINCIPAL']['total'])*0.75\n +($data['SECUNDARIO']['acierto']/$data['SECUNDARIO']['total'])*0.15\n +($data['DISTRACTOR']['acierto']/$data['DISTRACTOR']['total'])*0.1; \n $pre_nota=$data['PREGUNTA']['acierto']/$data['PREGUNTA']['total'];\n $nota=(float)number_format(($dec_nota+$pre_nota)/2,2);\n $data['dec_nota']=(float)number_format($dec_nota,2);\n $data['pre_nota']=(float)number_format($pre_nota,2);\n $data['nota']=(float)number_format($nota,2);\n $params->data=$data;\n $params->save();\n $this->calificacion=$nota;\n if($params->save()){}else{}\n break;\n case 54:\n /*\n * Fix faltantes suma acierto \n */\n $faltantes=$data['PREGUNTA']['total']-20;\n $data['PREGUNTA']['total']=20;\n $data['PREGUNTA']['acierto']+=$faltantes;\n $data['SIN_PRE']=$faltantes;\n \n $dec_nota=($data['PRINCIPAL']['acierto']/$data['PRINCIPAL']['total'])*0.75\n +($data['SECUNDARIO']['acierto']/$data['SECUNDARIO']['total'])*0.15\n +($data['DISTRACTOR']['acierto']/$data['DISTRACTOR']['total'])*0.1; \n $pre_nota=$data['PREGUNTA']['acierto']/$data['PREGUNTA']['total'];\n $nota=(float)number_format(($dec_nota+$pre_nota)/2,2);\n $data['dec_nota']=(float)number_format($dec_nota,2);\n $data['pre_nota']=(float)number_format($pre_nota,2);\n $params->data=$data;\n if($params->save()){}else{} \n break;\n default:\n break;\n }\n }\n }", "title": "" }, { "docid": "7a1f8b246ef17950ab6b1dcb0b1820a2", "score": "0.5147464", "text": "public function mostrar_cv($id)\n {\n $ajax = request()->ajax();\n $user = \\Auth::user();\n\n if ($user->hasRole('Estudiante')){\n\n $experiencia_laboral = $user->persona->experiencias_laborales()->where('id', $id)->get()->first();\n\n //verificamos que el usuario logueado como Estudiante no pueda \n //dar de Baja una Experiencia Laboral que no sea suya\n if (count($experiencia_laboral) == 0){\n //si es mediante ajax indica que no se actualizara enviando\n //mensaje de error\n if ($ajax) {\n return response()->json([\n 'update' => false,\n 'error' => \"No se puede actualizar\",\n ]);\n }\n //si no se encuentra el recurso\n abort(404);\n\n }\n }\n\n if ($experiencia_laboral->mostrar_cv == true){\n //si es por ajax se envia el boton indicando que \n //es igual\n return response()->json([\n 'igual' => true,\n ]);\n }\n //Se actualiza el boton\n $experiencia_laboral->mostrar_cv = true;\n $experiencia_laboral->save();\n\n if ($ajax){\n //enviamos el boton indicando que se actualizo\n return response()->json([\n 'update' => true\n ]);\n }\n //sino se redirige al index\n return redirect()->route('experiencias.laborales.index');\n\n }", "title": "" }, { "docid": "05f70ab7d0b7630a1b6e88da914e899b", "score": "0.51465017", "text": "function setTransferirPartida($id){\n\t\t\t\n\t\t\t\n\t\t\t//COMPRUEBO QUE UNA SOLA VEZ PUEDA ENTREGAR SU SESSION\n\t\t\t//O SEA SI YA ESTA EN TRAMITE LA ENTREGA SALE LA FUNCION\n\t\t\tfor($i=0;$i<6;$i++)\t\n\t\t\t\tif($this->id_emisor[$i]== $id)\n\t\t\t\t\treturn 0;\n\t\t\t\n\t\t\tfor($i=0;$i<6;$i++){\n\t\t\t\t\n\t\t\t\t//GUARDO EL ID Y LE GENERO UNA CLAVE EN EL PRIMER LUGAR DEL ARREGLO VACIO\n\t\t\t\t//ESTO ULTIMO ES PORQUE MUCHOS A LA VEZ PUEDEN ESTAR ENTREGANDO SU SESSION\n\t\t\t\t//PREGUNTO SI EL QEU QUIERE TRANSFERIR LA PARTIDA NO ES EL QUE LA CREO\n\t\t\t\tif($this->id_emisor[$i] == NULL && $this->objeto_anfitrion->getId() != $id){\n\t\t\t\t\t$this->id_emisor[$i]=$id;\n\t\t\t\t\t$this->clave_emisor[$i]=rand(1,999999);\n\t\t\t\t\treturn $this->clave_emisor[$i];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn 0;\n\t\t}", "title": "" }, { "docid": "77592dafdcaba145dc213d660ff1ff10", "score": "0.5142315", "text": "function verReputacionUsuario($matricula){\n \t}", "title": "" }, { "docid": "1140ded212fc448dbb48b2eda76ef8e9", "score": "0.5141091", "text": "function recup_id_responsable__personne_visite($nom,$prenom){\n return ResultatRequette(\"select ID_CLIENT as info from personne_physique where NOM_CLIENT='$nom' AND PRENOM_CLIENT='$prenom'\");\n}", "title": "" }, { "docid": "5d368abc369d2e9428c9508f475cdc6b", "score": "0.5136998", "text": "function produits_vendus_post_edition($flux){\n \n \n // Apres COMMANDE :\n // quand la commande passe du statut=attente a statut=paye\n if (\n $flux['args']['action'] == 'instituer'\n AND $flux['args']['table'] == 'spip_commandes'\n AND ($id_commande = intval($flux['args']['id_objet'])) > 0\n AND ($statut_nouveau = $flux['data']['statut']) == 'paye'\n AND ($statut_ancien = $flux['args']['statut_ancien']) == 'attente'\n ){\n // Informations concernant la commande\n $id_auteur= sql_getfetsel('id_auteur', 'spip_commandes', 'id_commande='.intval($id_commande));\n \n // retrouver les objets correspondants a la commande dans spip_commandes_details\n if (\n $objets = sql_allfetsel('objet,id_objet', 'spip_commandes_details', 'id_commande='.intval($id_commande))\n AND is_array($objets)\n AND count($objets)\n ){\n \n include_spip('action/editer_objet');\n \n foreach($objets as $v) {\n // Si un objet produit\n // fait partit des details la commande\n if($v['objet']=='produit'){\n \n $objet = $v['objet'];\n $id_objet = intval($v['id_objet']);\n \n \n \n objet_modifier($objet, $id_objet, array('statut'=>'vendu'));\n spip_log(' Objet: '.$objet.' ('.$id_objet.') - Commande : '.$id_commande,'produits');\n\n } \n }\n }\n }\n \n return $flux;\n}", "title": "" }, { "docid": "e31e3963b4f10ef002946c4555b4948e", "score": "0.51357406", "text": "public function getIdfournisseur()\n {\n return $this->idfournisseur;\n }", "title": "" }, { "docid": "6a1091023b456f9df5b6ce56b49e5f67", "score": "0.51350796", "text": "function getidSoldeurChef()\r\n\t{\r\n\t\treturn $this->idSoldeurChef;\r\n\t}", "title": "" }, { "docid": "5b02094b3a06c4840875e71b49bbdabb", "score": "0.5123396", "text": "function AffecterLivreurLivraison($idLivreur, $idLivraison)\n {\n $sql = \"UPDATE virupedia.livraison set idUsers=:idUsers WHERE idLivraison=:idLivraison\";\n $db = Config::getConnexion();\n try {\n $req = $db->prepare($sql);\n\n\n\n\n $req->bindValue(':idUsers', $idLivreur);\n\n $req->bindValue(':idLivraison', $idLivraison);\n\n $req->execute();\n } catch (Exception $e) {\n die('Erreur: ' . $e->getMessage());\n }\n }", "title": "" }, { "docid": "65d9903b070bcb2853f42739ad423af8", "score": "0.5119578", "text": "public function Modifica() {\n $FRosa=USingleton::getInstance('FRosa');\n $Fdb=USingleton::getInstance('Fdb');\n $session= USingleton::getInstance('USession');\n $nome_squadra=$session->getValore('squadra');\n $FRosa->ResetRosa($nome_squadra);\n header(\"location: index.php?controller=Mercato&task=riempi\");\n \n\t}", "title": "" }, { "docid": "c34fa550c455d8aaa881a663519af677", "score": "0.5119522", "text": "function CambiarEstadoDetalle($iddetalle)\r\n {\r\n $con = new ConexionBD;\r\n if($con->conectar()==true) //Estado RC--> Resultados Completo\r\n {\t$query=\"UPDATE sec_detallesolicitudestudios SET estadodetalle=7 WHERE id=$iddetalle\";\t\r\n $result = pg_query($query);\r\n if (!$result)\r\n return false;\r\n else\r\n return $result;\t \r\n }\r\n }", "title": "" }, { "docid": "8e4e6bd55b6e4add9fac7bf559448f99", "score": "0.5114253", "text": "function CambiarEstadoDetalle($iddetalle)\r\n {\r\n $con = new ConexionBD;\r\n if($con->conectar()==true) //Estado RC--> Resultados Completo\r\n {\t$query=\"UPDATE sec_detallesolicitudestudios SET estadodetalle='RC' WHERE IdDetalleSolicitud=$iddetalle\"\t;\t\r\n $result = @mysql_query($query);\r\n if (!$result)\r\n return false;\r\n else\r\n return true;\t \r\n }\r\n }", "title": "" }, { "docid": "8606fd7b114fb23539001b601f17fd98", "score": "0.5112176", "text": "function simule_un_passage ($id_examen, $id_etab,$login) {\n global $REMOTE_ADDR,$CFG;\n \n $output=\"\";\n //rev 948\n if (compte_passages($id_examen,$id_etab,$login) >0) {\n // echo \"$login deja passé $id_examen $id_etab<br/>\";\n return;\n }\n\n \n\n $cle=$id_etab.\".\".$id_examen;\n $output = \"simulation passage de \".$login.\" a \".$cle.\"<br/>\";\n\n delete_records(\"resultats\", \"login='\".addslashes($login).\"' and examen='$cle'\"); // rev 984\n $questions=get_questions($id_examen,$id_etab,true,false); // desordre\n\n $ligne=new StdClass();\n $ligne->login=$login;\n $ligne->examen=$cle;\n $ligne->origine='simulation';\n $ligne->ts_date=time();\n $ligne->ip=$REMOTE_ADDR;\n foreach ($questions as $q) {\n $ligne->question=$q->id_etab.\".\".$q->id;\n $reponses=get_reponses($q->id,$q->id_etab, true); //desordre\n $ligne->reponse=$reponses[0]->num; // prend la 1ere comme r�ponse �tudiant\n insert_record(\"resultats\",$ligne,false);\n }\n $res=note_examen($id_examen,$id_etab,QCM_NORMAL,$login,false,false,false,false);\n return $output;\n }", "title": "" }, { "docid": "3d3c66334241f3007aa29bf4e108e662", "score": "0.511126", "text": "function formulaires_editer_produit_verifier($id_produit='new', $id_rubrique=0, $retour=''){\r\n\tset_request('id_parent', _request('parent'));\r\n\r\n\t$erreurs = array();\r\n\t$erreurs = formulaires_editer_objet_verifier('produit', $id_produit);\r\n\t\r\n\t$config = lire_config('produits') ;\r\n\t// Vérifier que la rubrique choisie se trouve dans les secteurs autorisés\r\n\tif($config['limiter_ajout']) {\r\n\t\t$id_secteur = sql_getfetsel(\"id_secteur\", \"spip_rubriques\", \"id_rubrique=\" . intval(produits_id_parent()));\r\n\t\tif(is_array($config['limiter_ident_secteur']) && !in_array($id_secteur,$config['limiter_ident_secteur'])) {\r\n\t\t\t$titres = \"\" ;\r\n\t\t\tforeach($config['limiter_ident_secteur'] as $id_secteur) {\r\n\t\t\t\t$titres .= sql_getfetsel(\"titre\", \"spip_rubriques\", \"id_rubrique=\" . intval($id_secteur)).\" / \" ;\r\n\t\t\t}\r\n\t\t\t$erreurs['id_parent'] .= _T(\"produits:secteurs_autorises\", array('secteurs' => $titres));\r\n\t\t}\r\n\t}\r\n\r\n\treturn $erreurs ;\r\n}", "title": "" }, { "docid": "d117027a0c145b5a880b35fa6f86dfa5", "score": "0.51106054", "text": "private function _hitung_regresi()\n {\n }", "title": "" }, { "docid": "252db3396e5ea4fa8a5d58c413349d73", "score": "0.5107226", "text": "function eliminarPuntoVenta(){\n\t\t$this->procedimiento='vef.ft_punto_venta_ime';\n\t\t$this->transaccion='VF_PUVE_ELI';\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_punto_venta','id_punto_venta','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": "9ae995b41faa0cb1183c90e61704c970", "score": "0.5106602", "text": "function getIdVlastnik () {\n return $this -> idVlastnik;\n }", "title": "" }, { "docid": "b73a09ca356820630f6494b92491acc0", "score": "0.5106317", "text": "public function edit($id)\n {\n $rendezvous = RendezVous::find($id);\n $candidatures = CandidatureRendezVous::where('rendez_vous_id',$rendezvous->id)->get();\n $candidatureIds = [];\n foreach($candidatures as $candidature){\n array_push($candidatureIds,$candidature->candidature_id);\n }\n $candidats = Candidature::all();\n $offres=Offre::all();\n return view('admin.rendezvous.edit-rendezvous',compact('offres','rendezvous','candidats','candidatureIds'));\n }", "title": "" }, { "docid": "57069a2ea568e7913a4c9dc3634a3a49", "score": "0.5095109", "text": "public function ver_estatus_trabajo(){\n\t\t$id_trabajo = $_GET['id_trabajo'];\n\t\t$this->obj_trabajo->set_id($id_trabajo);\n\t\t$trabajo_datos = $this->obj_trabajo->consultar($id_trabajo);\n\n\t\t$this->obj_trabajo_fase->set_fk_trabajo($id_trabajo);\n\t\t$fase_datos = $this->obj_trabajo_fase->consultar_trabajo();\n\t\t\t\n\t\t$this->obj_trabajo_linea->set_fk_trabajo($id_trabajo);\n\t\t$linea_datos = $this->obj_trabajo_linea->consultar_trabajo();\n\n\t\t$this->obj_usuario_trabajo->set_fk_trabajo($id_trabajo);\n\t\t$usuarios = $this->obj_usuario_trabajo->consultar_trabajo_estatus();\n\n\t\tob_start();\n\t\trequire_once 'app/vista/reportes/estatus_trabajo.php';\n\t\t$contenido = ob_get_clean();\n\t\t$nombre = \"estatus_trabajo.pdf\";\n\t\tControlador_Reporte::reportar($contenido,$nombre);\n\t}", "title": "" }, { "docid": "98ddf76084b146823809bf660c98866d", "score": "0.5091792", "text": "public function Ver($id) {\n if (!SesionIniciadaCheckAdmin()) { //Si no se ha iniciado sesión, vamos al login\n redirect('/Administrador/Login', 'location', 301);\n return; //Sale de la función\n }\n\n $proveedor = $this->Mdl_lista->getProveedor($id);\n\n if (!$proveedor) {//Si no existe el proveedor, mostramos error\n redirect('/Administrador/Login', 'location', 301);\n return; //Sale de la función\n }\n\n $cuerpo = $this->load->view('lista/adm_detalleProveedor', array('proveedor' => $proveedor), true); //Generamos la vista \n CargaPlantillaAdmin($cuerpo, ' | Detalle del Proveedor', \"<i class='fa fa-truck fa-lg' aria-hidden='true'></i>\" . ' Detalle del Proveedor');\n }", "title": "" }, { "docid": "c7fd84114b8d1e3578d6be107cef43e1", "score": "0.5089244", "text": "public function VoulnteerRecipte(){\n $user_id = Auth::user()->id;\n $voul = DB::table('voulnteer_event')->where('user_id',$user_id)->orderBy('updated_at', 'desc')->first();\n //get event details\n $event = Event::where('id', '=', $voul->event_id)->first();\n $receipt_d= array(\n 'type'=>'vl',\n 'venu' => $event->event_Location,\n 'time' => $event->event_StartTime,\n 'name'=>$event->event_Title,\n );\n Log::info('Redirectin to Receipt from voulnteer');\n return view ('/donates/receipt')->withReceipt_d($receipt_d);\n }", "title": "" }, { "docid": "b0e8f34d88674e5806eee4596a42f017", "score": "0.5087522", "text": "public function Anulaitem($id) {\n //luego de anular el documento de compras\n $detallecompra=Docompra::model()->findByPk($id);\n if( $detallecompra->iddesolpe > 0) { // Si este detalle esta relacionada con un detalle solpe\n //Borrar el registro de la tabla puente\n $command = Yii::app()->db->createCommand(\" DELETE FROM \".Yii::app()->params['prefijo'].\"desolpecompra where iddocompra=\".$detallecompra->id);\n $command->execute();\n }\n $command1 = Yii::app()->db->createCommand(\" DELETE FROM \".Yii::app()->params['prefijo'].\"alentregas where iddetcompras=\".$detallecompra->id);\n $command1->execute();\n\n $command2 = Yii::app()->db->createCommand(\" UPDATE \".Yii::app()->params['prefijo'].\"Docompra SET estadodetalle='40' where id=\".$detallecompra->id);\n $command2->execute();\n }", "title": "" }, { "docid": "cd965e8c19ffb0700920bee37827b1bb", "score": "0.5086219", "text": "function formulaires_signaler_abus_verifier_dist($objet,$id_objet){\n\t$erreurs=array();\n\t\n\tif(!_request('commentaire'))$erreurs['commentaire']=_T(\"info_obligatoire\");\n\t\n\treturn $erreurs;\n}", "title": "" }, { "docid": "1a4744c3ec864751a93cd635dbb7835f", "score": "0.50842595", "text": "function autoriser_acteur_voir_dist($faire, $type, $id, $qui, $opt) {\n\treturn true;\n}", "title": "" }, { "docid": "21a55c29cb32266b1dc2c615431efefc", "score": "0.50794625", "text": "public function Revisa_producto()\n\t{\n\t\t$id_producto_venta = $this -> input -> get('id_producto_venta'); \n\t\t$data['producto'] = $this -> Modelo_ingreso_productos -> Buscar_producto($id_producto_venta);\n\t\t$data['titulo'] = \"REVISA PRODUCTO\";\t\t\n\t\t\n\t\t$this -> load -> view('header',$data);\n\t\t$this -> load -> view('nota_ingreso/producto/revisa_producto',$data);\n\t\t$this -> load ->view($this->session->userdata('tipo_de_usuario'));\n\t}", "title": "" }, { "docid": "dd4a7bccfeedd89656a1ad409cb1e1f6", "score": "0.5076247", "text": "public function getIdVainqueur()\n {\n return $this->idVainqueur;\n }", "title": "" }, { "docid": "c72de11777a8ff0b533e82697ebc4f0d", "score": "0.5070742", "text": "static public function ctrActualizarRegistroIdentUsuario(){\n\n if(isset($_POST[\"actualizarIdU\"])){\n\n $tabla = \"empresa_cliente\";\n $datos = array(\"idEC\"=>$_POST[\"actualizarIdU\"],\n \"identificacionEC\" => $_POST[\"actualizarIdentEC\"]\n );\n\n $respuesta = ModeloClientes::mdlActualizarIdentUsuario($tabla,$datos);\n\n return $respuesta;\n }\n }", "title": "" }, { "docid": "0b844c4f02d9af434dbeb64226dc7e56", "score": "0.50698465", "text": "function _bosa_voucher_from_line_item_id($line_item_id)\n{\n $lineItemsEntity= entity_load('commerce_line_item', array($line_item_id));\n $lineItemEntity = reset($lineItemsEntity);\n\n $product = commerce_product_load_by_sku($lineItemEntity->line_item_label);\n\n $orderEntity = entity_load('commerce_order', array($lineItemEntity->order_id));\n\n $orderEntity = reset($orderEntity);\n\n $comment = isset($lineItemEntity->field_line_item_comment[LANGUAGE_NONE][0]['value']) ? $lineItemEntity->field_line_item_comment[LANGUAGE_NONE][0]['value'] : '-';\n\n if(isset($orderEntity->status))\n {\n if ($orderEntity->status == 'completed')\n {\n $wrapper = entity_metadata_wrapper('commerce_order', $orderEntity);\n $address = $wrapper->commerce_customer_billing->commerce_customer_address->value();\n $phone = $wrapper->commerce_customer_billing->field_mobile_phone->value();\n $ticket = bosa_voucher_check_ticket($lineItemEntity->line_item_id, $product->product_id);\n $name = '-';\n $register = '<a href=\"/bosa/voucher/ticket/'. variable_get('bosa_voucher_qr_prefix') .'-'. $lineItemEntity->line_item_id . '-'. $lineItemEntity->commerce_product[LANGUAGE_NONE][0]['product_id'] .'\"><i class=\"register-ticket\"></i></a>';\n\n if(!empty($ticket)){\n $register = date('H:i:s d-m-y', $ticket[0]);\n $user = user_load($ticket[1]);\n $name = $user->name;\n }\n\n // Module bosa_attendees, implements this function.\n if(function_exists('bosa_attendees_get_attendees_markup')){\n $attendee_names = bosa_attendees_get_attendees_markup($lineItemEntity, $address['name_line']);\n }\n else {\n $attendee_names = $address['name_line'];\n }\n $info = bosa_reserved_delta_check_by_line_item($line_item_id);\n $product_date = bosa_reserved_get_date_by_line_item($line_item_id);\n\n $attendees = array(\n 'name' => $attendee_names,\n 'phone' => $phone,\n 'quantity' => (int)$lineItemEntity->quantity,\n 'order_id' => $orderEntity->order_id,\n 'comment' => $comment,\n 'line_item_id' => $lineItemEntity->line_item_id,\n 'product_sku' => $lineItemEntity->line_item_label,\n 'product_title' => $product->title,\n 'price' => commerce_currency_format($lineItemEntity->commerce_total[LANGUAGE_NONE][0]['amount'], $lineItemEntity->commerce_total[LANGUAGE_NONE][0]['currency_code']),\n 'product_price' => commerce_currency_format($product->commerce_price[LANGUAGE_NONE][0]['amount'], $product->commerce_price[LANGUAGE_NONE][0]['currency_code']),\n 'ticket_reg' => $register,\n 'ticket_reg_name' => $name,\n 'product_date' => ($product_date == \"01/01/1970 - 01:00\") ? \"\" :$product_date ,\n 'delta' => $info[$line_item_id],\n );\n }\n }\n if(isset($attendees)) \n {\n return $attendees;\n }\n}", "title": "" }, { "docid": "35ce9d5da23f73504aa033afb252ab94", "score": "0.50675035", "text": "function formulaires_editer_cirv_objet_charger($type,$id){\n\t$id = intval($id);\n\t$id_table_objet = id_table_objet($type);\n\t\n\tif (!autoriser('modifier', 'auteur', $id_auteur))\n\t\treturn false;\n\t\n\t$row = sql_fetsel(\"*\", \"spip_auteurs\", \"id_auteur=$id\",\"\",\"\");\t\n\t$statut = $row['statut'];\n\t$cistatut = $row['cistatut'];\n\tif (!$cistatut)\n\t\t$cistatut = 'non';\n\t\n\tif ($statut=='1comite') {\n\t\t$valeurs = array();\n\t\t$valeurs['editable'] = false;\n\t\t$valeurs['cistatut'] = false;\n\t\t$valeurs[$id_table_objet] = intval($id);\n\t\t$valeurs['name'] = $cistatut;\n\t\t$valeurs['_hidden'] = \"<input type='hidden' name='id_auteur' value='$id' />\";\n\t\t$valeurs['_cirvt'] = '';\n\t\tif (!defined('_CIRV_PAS_CIREDVALTOUT'))\n\t\t\t$valeurs['_cirvt'] = 'oui';\t\t\n\t} else {\n\t\t$valeurs = false;\n\t}\n\n\treturn $valeurs;\n}", "title": "" }, { "docid": "1b65a810cbd85a50967b0f3d21721e2e", "score": "0.5067348", "text": "public function setIdlecturaEvotranspiracion($idlecturaEvotranspiracion){\n $this->idlecturaEvotranspiracion = $idlecturaEvotranspiracion;\n }", "title": "" }, { "docid": "0ad513c5550dcc3b61428ae7c753b7b2", "score": "0.50633204", "text": "public function get_mot(){retrun($id_local_mot); }", "title": "" }, { "docid": "c6d2070ecba391cdf35da2cfa5bd54e9", "score": "0.50555855", "text": "function actualizar_inventario()\n {\n\n \n $sql = \" update detalle_ingreso d , consingresos c\n set d.detalleing_saldo = c.detalleing_saldo,\n d.detalleing_salida = c.detalleing_salida\n WHERE\n d.detalleing_id = c.detalleing_id \";\n $this->Salida_model->ejecutar($sql);\n $sql1 = \"update detalle_ingreso\n set detalleing_salida=0\n where detalleing_salida IS NULL\";\n $this->Salida_model->ejecutar($sql1);\n return true;\n\n\n }", "title": "" }, { "docid": "65625f1acc14574fbc9f24f923284bba", "score": "0.5053461", "text": "public function erOvertatt()\n {\n try {\n Fylker::getOvertattAv($this->getId());\n return true;\n } catch( Exception $e) {}\n \n return false;\n }", "title": "" }, { "docid": "e2df0faeaf1909045bdac5ed54bfbb92", "score": "0.5052156", "text": "public function maitreChanteurAction($idCible){\n\n /* Récupérons un max de repositories ! */\n $repositoryUser = $this->getDoctrine()\n ->getManager()\n ->getRepository('MafiaPartieBundle:UserPartie');\n\n $ciblePartieCourant = $repositoryUser->find($idCible);\n\n $userGlobal = $this->getUser();\n $userPartieCourant = $userGlobal->getUserCourant();\n\n /* Si les 2 joueurs sont en jeu */\n if($userPartieCourant != null && $ciblePartieCourant != null && $userPartieCourant != $ciblePartieCourant){\n $partie = $userPartieCourant->getPartie();\n $partieCible = $ciblePartieCourant->getPartie();\n\n /* On vérifie que les parties existent bien */\n if($partie != null && $partieCible != null){\n\n /* Si ils sont dans la même partie */\n if($partie == $partieCible) {\n\n /* Si c'est bien la nuit */\n if ($partie->getPhaseEnCours() == PhaseJeuEnum::NUIT) {\n\n /* S'ils sont bien vivants tous les deux */\n if ($userPartieCourant->getVivant() && $ciblePartieCourant->getVivant()) {\n\n /* Si le joueur a bien un rôle */\n if ($userPartieCourant->getRole() != null) {\n\n /* Si le joueur est bien justicier */\n if ($userPartieCourant->getRole()->getEnumRole() == RolesEnum::MAITRE_CHANTEUR) {\n $statut = new Statut(StatusEnum::FERME_LA, $ciblePartieCourant, $userPartieCourant);\n $em = $this->getDoctrine()->getManager();\n $em->persist($statut);\n $em->flush();\n }\n }\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "12c2a6c74bbd39b206d65652c5838a52", "score": "0.504848", "text": "function eliminarViajeroFrecuente(){\n\t\t$this->procedimiento='obingresos.ft_viajero_frecuente_ime';\n\t\t$this->transaccion='OBING_VFB_ELI';\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_viajero_frecuente','id_viajero_frecuente','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": "9bf0920032ad4cde1d0d9e13399e54bd", "score": "0.5048228", "text": "function Recupera_nota_venta_por_id_venta($id_venta)\n{\n\t$query = $this->db->query(\" \n\t\t\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\t\tventa.id_venta,\n\t\t\t\t\t\t\t\tventa.no_factura,\n\t\t\t\t\t\t\t\tventa.numero_de_nota,\n\t\t\t\t\t\t\t\tventa.no_orden_compra,\n\t\t\t\t\t\t\t\tventa.fecha_de_venta,\n\t\t\t\t\t\t\t\tventa.id_cliente,\n\t\t\t\t\t\t\t\tventa.vendedor,\n\t\t\t\t\t\t\t\tventa.tipo_de_pago,\n\t\t\t\t\t\t\t\tventa.fecha_de_vencimiento_de_credito,\n\t\t\t\t\t\t\t\tventa.observaciones,\n\t\t\t\t\t\t\t\tventa.total_a_pagar,\n\t\t\t\t\t\t\t\tventa.total_a_pagar_descuento,\n\t\t\t\t\t\t\t\tventa.descuento,\n\t\t\t\t\t\t\t\tventa.saldo,\n\t\t\t\t\t\t\t\ttipo_de_nota.descripcion,\n\t\t\t\t\t\t\t\ttipo_de_nota.sigla,\n\t\t\t\t\t\t\t\tclientes.tipo,\n\t\t\t\t\t\t\t\tclientes.razon_social,\n\t\t\t\t\t\t\t\tclientes.deuda_actual,\n\t\t\t\t\t\t\t\tus_funcionarios.nombres,\n\t\t\t\t\t\t\t\tus_funcionarios.paterno,\n\t\t\t\t\t\t\t\tus_funcionarios.materno\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t\tventa\n\t\t\t\t\t\t\t\tINNER JOIN tipo_de_nota ON venta.id_tipo_de_venta = tipo_de_nota.id_tipo_de_venta\n\t\t\t\t\t\t\t\tINNER JOIN clientes ON venta.id_cliente = clientes.id_cliente\n\t\t\t\t\t\t\t\tINNER JOIN us_funcionarios ON venta.vendedor = us_funcionarios.id_funcionario\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\tventa.id_venta = '\".$id_venta.\"'\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\");\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\tif($query->num_rows()>0)\n\t\t\t{\n\t\t\t\treturn $query->result();\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\t\n\t\t\t}\t\n}", "title": "" }, { "docid": "65850449f4970bf7a06c9ba788aa0085", "score": "0.50420606", "text": "function modificarPartida(){\n\t\t$this->procedimiento='pre.ft_partida_ime';\n\t\t$this->transaccion='PRE_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_partida','id_partida','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('id_partida_fk','id_partida_fk','varchar');\n\t\t\n\t\t$this->setParametro('descripcion','descripcion','varchar');\n\t\t$this->setParametro('codigo','codigo','varchar');\n\t\t\n\t\t$this->setParametro('id_gestion','id_gestion','integer'); \n\t\t$this->setParametro('tipo','tipo','varchar'); \n\t\t\n\t\t$this->setParametro('sw_movimiento','sw_movimiento','varchar'); \n\t\t$this->setParametro('sw_transaccional','sw_transaccional','varchar'); \n\t\t$this->setParametro('nombre_partida','nombre_partida','varchar'); \n\t\t\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "f915c5e4b8e62440b0d1b9cd3ba84ab5", "score": "0.50395834", "text": "function initialiserId()\n {\n if(empty($this->m_idReservation))\n {\n $requete = 'SELECT idReservation FROM reservation WHERE nom=? AND prenom=? AND dateDebut=? AND idChambre_chambre=? AND idType_typeSejour=?';\n $tabParametres = array($this->m_nom, $this->m_prenom, $this->m_dateDebut, $this->m_chambre->getIdChambre(), $this->m_typeSejour->getIdType());\n $tabResultat = $this->m_bdd->selection($requete, $tabParametres);\n $this->m_idReservation = $tabResultat[0]['idReservation']; \n }\n }", "title": "" }, { "docid": "f07aa9d10badd7813c831ba57b7b74c4", "score": "0.50394624", "text": "public function actionView($id)\n\t{\n\t\n\t\t//$model=$this->loadModel($id);\n // $model->find();\n if(isset(yii::app()->user->ultimaHistoria))\n { \n $b=RegistroM::model()->findByPK($id); //obtengo el registro\n $esq=EsquemaMen::model()->findAll(' id_reg = '.$id);\n \n\t\t$a_1=0;\n\t\t//$a_1=new EsquemaMen;\n\t\t$a_2=new EsquemaMen;\n\t\t$a_3=new EsquemaMen;\n\t\t$a_4=new EsquemaMen;\n $i=1;\n\n \n \tforeach($esq as $item){ //asignamos los registros de esquema menstrual a los objetos de la forma \n ${'a_'.$i}=$item; \n\n\t\t $i++;\n\t\t}\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['EsquemaMen']))\n \t\t{\n\t\t\t$a_1->attributes=$_POST['EsquemaMen'][1];\n\t\t\t$a_2->attributes=$_POST['EsquemaMen'][2];\n\t\t\t$a_3->attributes=$_POST['EsquemaMen'][3];\n\t\t\t$a_4->attributes=$_POST['EsquemaMen'][4];\t \n\n\t\t\t$a_1->id_reg=$b->id_reg;\n\t\t\t$a_2->id_reg=$b->id_reg;\n\t\t\t$a_3->id_reg=$b->id_reg;\n\t\t\t$a_4->id_reg=$b->id_reg;\n\n\t\t\t$a_1->id_his=yii::app()->user->ultimaHistoria;\n\t\t\t$a_2->id_his=yii::app()->user->ultimaHistoria;\n\t\t\t$a_3->id_his=yii::app()->user->ultimaHistoria;\n\t\t\t$a_4->id_his=yii::app()->user->ultimaHistoria;\n\n\n\t\t\tif($a_1->save()&&$a_2->save()&&$a_3->save()&&$a_4->save()){\n\n\n\t\t\t$bit= new Bitacora;\t\t\t\t\t// se agrega a la bitacora \n \t$bit->id_his=yii::app()->user->ultimaHistoria;\n\t\t\t$bit->id_u=yii::app()->user->id_u;\n\t\t\t$bit->descripcion_bit=\"se actualizo esquema menstrual \";\n \t$bit->fecha_bit=date('Y-m-d');\n \t$bit->save();\n\n Yii::app()->user->setFlash('success', \"Esquema menstrual guardado Exitosamente\");\n\t\t\t\t$this->redirect(array('historia/update','id'=>yii::app()->user->ultimaHistoria)); }\n\t\t}\n\n\t\t$this->render('view',array(\n\t\t\t'a_1'=>$a_1,'a_2'=>$a_2,'a_3'=>$a_3,'a_4'=>$a_4\n\t\t));\n\n\n\n }// fin del if de la variable de session ultimaHistoria\n else \n throw new CHttpException(403,'Por favor consulte una historia.'); \n\t\n\t\t\n\t}", "title": "" }, { "docid": "e01779305a9027b576fc90b05fe5202a", "score": "0.50360495", "text": "public function ingresarventaPorUnidad(){\n\t\t$data['base_url'] = $this->config->item('base_url');\n\n\t\t\t$id_pedido = $_POST['id_pedido'];\n\t\t\t$numero = $_POST['numero'];\n\t\t\t$cantidad = $_POST['cantidad'];\n\t\t\t$precioUnidad = $_POST['precioUnidad'];\n\t\t\t$id_producto = $_POST['id_producto'];\n\t\t\t$montoTotal = $cantidad * $precioUnidad;\n\t\t\t$this->Venta_model->ingresarVenta(\n\t\t\t\t$cantidad,$precioUnidad,\n\t\t\t\t$montoTotal,$id_producto,\n\t\t\t\t1,$numero,$id_pedido\n\t\t\t);\n\t\t\t$id_linea = $_POST['id_linea'];\n\t\t\t$this->Venta_model->borrarLineaPedido($id_linea);\n\t\tredirect(\"/informes/detallepedidos?id=${id_pedido}\");\n\t}", "title": "" }, { "docid": "7f20b2daa99346df7f7d113919aca373", "score": "0.5031423", "text": "function marcar_rec($id) {\n\n $this->savedata_model->Actualizar(array('id_automovil' => $id), 'cq_automovil', array('recomendado' => '1'));\n redirect(base_url() . 'index.php/car/estado/aprobado-admin');\n\n \n }", "title": "" } ]
d419cae5ee405cac86fa61404bb6a457
How many people are on ratio watch? return int number of users
[ { "docid": "01a31ada6dbfccdc06b55b74c4176f78", "score": "0.76611775", "text": "public function totalRatioWatchUsers(): int {\n return $this->db->scalar(\"SELECT count(*) \" . $this->sqlRatioWatchJoins());\n }", "title": "" } ]
[ { "docid": "d725dcc728a532c4bc873774b4010b20", "score": "0.7077233", "text": "public function user_participation() {\n return (float) number_format($this->usercount / $this->everyoneelsecount, 2);\n }", "title": "" }, { "docid": "d4c134f2bc3f3e0dfce1294d58032b93", "score": "0.69602185", "text": "public static function counterUsers()\n {\n include ($_SERVER[\"DOCUMENT_ROOT\"] . \"/venue/venue-finder/config/db_config.php\");\n $query = \"SELECT COUNT(*) FROM user\";\n $result = mysqli_query($mysqli,$query);\n $rows = mysqli_fetch_row($result);\n\n // Debug increase value.\n $rows[0] = $rows[0] * 1;\n\n // Simplify the number if over 1000.\n if ($rows[0] > 1000) {\n // If over 1000.\n $rows[0] = number_format((float)$rows[0] / 1000, 2, '.', '') . \"K\";\n }\n\n return $rows[0];\n }", "title": "" }, { "docid": "383c92ff354023a1c8036441dfe8a5d4", "score": "0.6587785", "text": "function calcNumActiveUsers(){\n\t\t//calculate number of useres on site\n\t\t$q = \"SELECT * FROM \".TBL_ACTIVE_USERS;\n\t\t$result = mysql_query($q, $this->connection);\n\t\t$this->num_active_users = mysql_numrows($result);\n\t}", "title": "" }, { "docid": "a029d6f90c8928d8397ac2fd08c4e611", "score": "0.65459776", "text": "function calcNumActiveUsers(){\n /* Calculate number of users at site */\n $q = \"SELECT * FROM \".TBL_ACTIVE_USERS;\n $result = mysql_query($q, $this->connection);\n $this->num_active_users = mysql_numrows($result);\n }", "title": "" }, { "docid": "f8d56296103daeec74f944357ebcc501", "score": "0.6508849", "text": "protected function getNbrUsers(){\n User::selectRaw('count(*) as sum')->get();\n }", "title": "" }, { "docid": "db4c5aa2e386432c6ad19028e06faf54", "score": "0.65083236", "text": "function calcNumActiveUsers(){\r\n /* Calculate number of users at site */\r\n $q = \"SELECT * FROM \".TBL_ACTIVE_USERS;\r\n $result = mysql_query($q, $this->connection);\r\n $this->num_active_users = mysql_numrows($result);\r\n }", "title": "" }, { "docid": "e4ec9643288addc3f175811832429de3", "score": "0.65031457", "text": "public function getWinRatioFor($username){\n $win = $this->getAmountOfWinsFor($username);\n $total = $this->getAmountOfLobbiesFor($username);\n\n if($total === 0)\n return 0;\n else\n return ( ((float)$win) / ((float)$total) );\n }", "title": "" }, { "docid": "5be3eace0b2c1e89c7b53bf13f0b33d7", "score": "0.6497758", "text": "function getTotalUsers(){\n\t\trequire_once('conf.php');\n\t\t$query=\"select * from member where worktype='student' or worktype='staff' or worktype='guest' or worktype='community'\";\n\t\t$result=mysqli_query($con,$query) or die(mysqli_error($con));\n\t\t$counter=0;\n\t\twhile($row=mysqli_fetch_array($result)){\n\t\t\t$counter++;\n\t\t}\n\t\treturn $counter;\n\t}", "title": "" }, { "docid": "8209920c39509233128bc49e26b53634", "score": "0.64424175", "text": "function user_count() {\n\treturn count(user_array());\n}", "title": "" }, { "docid": "28f76b1b1771ffeeb0e135f807f7b5bc", "score": "0.6440996", "text": "function getCount(){\n$user = $this->loadUser(Yii::app()->user->id);\nreturn $user->count_visit;\n}", "title": "" }, { "docid": "dcc3db805cd1e2a675e66c97189a83f7", "score": "0.6423319", "text": "private function computeRateCounts(){\n\n $this->loadModel('Login');\n $this->loadModel('Study');\n $this->loadModel('Variable');\n\n $logins = $this->Login->getCurrentParticipants();\n $pp = array();\n $tp = array();\n\n // First check the total number of piece-rate(n1) and team-rate (n2)\n // participants.\n foreach ($logins as $login){\n // Get the rate of this login:\n $params = array(\n 'conditions' => array('Login.id' => $login) //array of conditions\n );\n $loginEntry = $this->Login->find('first',$params);\n if ($loginEntry->Login['rate'] == 'piece') {\n // push($pp, $login);\n } else if ($loginEntry->Login['rate'] == 'team') {\n // push($tp, $login);\n }\n }\n\n return array_merge($pp, $tp);\n\n }", "title": "" }, { "docid": "8f6fac7e1fce91981d8b372b976d40cc", "score": "0.64201903", "text": "public function getUserCount()\n {\n return $this->userCount;\n }", "title": "" }, { "docid": "0c319dd75d487907df2f7f7e343912c9", "score": "0.6383015", "text": "function calcNumActiveUsers(){\r\n\t /* Calculate number of USERS at site */\r\n\t $sql = $this->connection->query(\"SELECT * FROM \".TBL_ACTIVE_USERS);\r\n\t $this->num_active_users = $sql->rowCount();\r\n }", "title": "" }, { "docid": "c8b84f590494097deea6f56b1bc6e64b", "score": "0.63551396", "text": "public function totalBannedForRatio(): int {\n return $this->db->scalar(\"\n SELECT count(*) FROM users_info WHERE BanDate IS NOT NULL AND BanReason = '2'\n \");\n }", "title": "" }, { "docid": "991c95fd4d86a111a36c80f18de07e49", "score": "0.631678", "text": "public function numUsers(){\n $query = \"SELECT count(*) FROM final_usuario\";\n return $this->con->action($query);\n }", "title": "" }, { "docid": "dd758098ae79cc07a51af4089043789f", "score": "0.6292064", "text": "function user_count () {\n\treturn mysql_result(mysql_query(\"SELECT COUNT(`user_id`) FROM `mock_exam_users` WHERE `active_status` = 1 AND `user_type` = 0\"), 0);\n}", "title": "" }, { "docid": "a08a2d14256413e24309e4f6f5f6daa9", "score": "0.6267926", "text": "public static function getCountOfUsers()\n {\n $res = DB::select(\"select count(1) as count from app_users where active = 1\");\n if(!empty($res)){\n return $res[0]->count;\n }else{\n return 0;\n }\n }", "title": "" }, { "docid": "8a27817dd6f9cb3cc4e3a6c0d0c4e26e", "score": "0.6245825", "text": "public function getSeenByPercentAttribute()\n\t{\n\t\t$clientUserCount = $this->client->users()->count();\n\t\t$seenByCount = $this->dismissedUsers->count();\n\t\tif ( $clientUserCount == 0 ) return 0;\n\t\treturn round($seenByCount/$clientUserCount, 2)*100;\n\t}", "title": "" }, { "docid": "476e0e94c7a410c4c076990dc42cace4", "score": "0.6241338", "text": "function getUserCount()\r\n {\r\n $db = JFusionFactory::getDatabase($this->getJname());\r\n $query = 'SELECT count(*) from #__user';\r\n $db->setQuery($query );\r\n\r\n //getting the results\r\n return $db->loadResult();\r\n }", "title": "" }, { "docid": "c463e92739c9c843e08b89bbd7bae0ff", "score": "0.6221981", "text": "function get_numusers() {\n global $CFG;\n\n $countsql = \"SELECT COUNT(DISTINCT u.id)\n FROM {$CFG->prefix}grade_grades g RIGHT OUTER JOIN\n {$CFG->prefix}user u ON u.id = g.userid\n LEFT JOIN {$CFG->prefix}role_assignments ra ON u.id = ra.userid\n $this->groupsql\n WHERE ra.roleid in ($this->gradebookroles)\n $this->groupwheresql\n AND ra.contextid \".get_related_contexts_string($this->context);\n return count_records_sql($countsql);\n }", "title": "" }, { "docid": "c331278dba1fd584ed2745b7f31c1e99", "score": "0.6220308", "text": "public function getNbUsers(){\r\n $nb = 0 ;\r\n $q = \"select count(*) as nb from UserTab \";\r\n $res = execute($q) ;\r\n $l = mysql_fetch_assoc($res);\r\n $nb = $l['nb'];\r\n \r\n return $nb ;\r\n\r\n }", "title": "" }, { "docid": "949d3a1a8c4de4c8ada1888ea8e8233b", "score": "0.6196257", "text": "function User_Count()\n\t{\n\t\t$R=j::SQL(\"SELECT COUNT(*) AS Result FROM jfp_xuser AS XU\");\n\t\tif ($R)\n\t\t\treturn $R[0]['Result'];\n\t\telse \n\t\t\treturn 0;\n\t}", "title": "" }, { "docid": "b9f671beaf3b13ff83df7ea1308d839f", "score": "0.6179598", "text": "abstract public function getTotalConnectedUsers();", "title": "" }, { "docid": "12be40e20f25ab4683ad05dd226d9ea1", "score": "0.61320055", "text": "public function count()\n {\n return $this->user->count();\n }", "title": "" }, { "docid": "e9d051baf05be573dddef48ac0ebd3fb", "score": "0.61214846", "text": "public function getUsersCount()\n {\n return $this->count(self::_USERS);\n }", "title": "" }, { "docid": "477bcec66dfe58b2493b3f130b6640ba", "score": "0.61213005", "text": "public function overallSuccessRate(): int\n {\n $user_ids = $this->users()->pluck('users.id');\n $total = UserAnswer::whereIn('user_id', $user_ids)->count();\n $good_answers_count = UserAnswer::whereIn('user_id', $user_ids)->where('result', true)->count();\n if ($total == 0)\n return 0;\n return round(($good_answers_count/$total) * 100);\n }", "title": "" }, { "docid": "18c6a23f85b42c50592074b00fa9e6f2", "score": "0.6118598", "text": "function get_user_count() {\n\treturn get_site_option( 'user_count' );\n}", "title": "" }, { "docid": "8917730d73935175aeb57f517e65a167", "score": "0.61164397", "text": "function getUserAttemptsCount(): int\n{\n return ATTEMPTS;\n}", "title": "" }, { "docid": "3e83f8b3a46e4de56a1faa80e9867a79", "score": "0.61120576", "text": "public function NumberUsersEveryCountry(){\n $list_countries = User::select('country')->distinct()->get();\n foreach($list_countries as $country){\n $nbr_users[$country['country']] = $this->NumberUsersInCountry($country['country']);\n }\n return $nbr_users;\n }", "title": "" }, { "docid": "f19fe6d3def0dc288ee56fbff2418466", "score": "0.6110401", "text": "public function totalPotentialUsers()\n {\n return $this->users()->count() + $this->invitations()->count();\n }", "title": "" }, { "docid": "36f21b575ef00f592e8aeb777b2e592d", "score": "0.60989964", "text": "function get_greeting_count($type = 'user_from', $user) {\n $conn = $this->get_db_conn();\n $sql = \"SELECT count(*) as cnt FROM greetings WHERE $type = $user\";\n error_log($sql);\n $res = mysql_query($sql, $conn);\n $count = 0;\n while ($row = mysql_fetch_assoc($res)) {\n $count = $row[\"cnt\"];\n }\n return $count;\n }", "title": "" }, { "docid": "df4ac879d5e6340f85312e9b3409dff8", "score": "0.60951215", "text": "public function countUsers()\n\t{\n \treturn $this\n \t->createQueryBuilder('u')\n \t->select('COUNT(u)')\n \t->getQuery()->getSingleScalarResult();\n\t}", "title": "" }, { "docid": "39b6c1a25e57da845b8964377e70b18a", "score": "0.60943305", "text": "function getUsersCount()\n\t\t{\n\t\t\tglobal $CFG;\n\t\t\tglobal $objSmarty;\n\t\t\t$sql_qry = \"SELECT count(user_id) as user_count FROM \".$CFG['table']['register'].\"\";\n\t\t \t$res_qry = $this->ExecuteQuery($sql_qry,'select');\n\t\t \treturn $res_qry[0]['user_count'];\n\t\t}", "title": "" }, { "docid": "e206a05868293ee909a325e6bc76fbbf", "score": "0.6089107", "text": "public function countUser()\r\n\t\t{\r\n\t\t\t$req = $this->dao->query('SELECT COUNT(id) as id FROM utilisateur');\r\n\t\t\t$req->execute();\r\n\t\t\t$rs = $req->fetch();\r\n\t\t\t$nb = $rs['id'] + 1;\r\n\t\t\treturn $nb;\r\n\t\t}", "title": "" }, { "docid": "582029a8418f7ddb9cd3592c40f75ef4", "score": "0.60507494", "text": "public function getUserCount() {\n return @$this->attributes['user_count'];\n }", "title": "" }, { "docid": "a58b50046d5e6eef2b53cdc26e4a7cab", "score": "0.6041882", "text": "public function countUsers() {\n \\OCP\\Util::writeLog(self::BACKEND_NAME, 'countUsers()', \\OCP\\Util::DEBUG);\n $query = \\OC_DB::prepare('SELECT COUNT(*) FROM `*PREFIX*users_serverauth`');\n $result = $query->execute();\n return $result->fetchOne();\n }", "title": "" }, { "docid": "3d6a8d4c0619477113119924aca5dc0e", "score": "0.60357237", "text": "static function get_number_of_registered_users() {\n global $con;\n $sql = \"SELECT COUNT(`id`) AS 'count' FROM `user` WHERE `active` <> 0;\";\n $query = mysqli_query($con, $sql);\n return mysqli_fetch_object($query)->count;\n }", "title": "" }, { "docid": "a0244a0935e2dcb8d30b156ff6694acc", "score": "0.60300684", "text": "function count( ){\r\n\t\t$sql = \"select count(1) FROM users\";\r\n\t\t$result = mysql_query($sql);\r\n\t\t$row = mysql_fetch_array($result);\r\n\t\t$total = $row[0];\r\n\t\treturn($total);\r\n\t}", "title": "" }, { "docid": "606881de7e6ba6fb1c017bc7256d7bb8", "score": "0.60171837", "text": "function get_number_of_users (){\r\n\t\tif (empty($session_id)) {\r\n\t\t\t// Registered students in a course outside session.\r\n\t\t\t$a_students = CourseManager :: get_student_list_from_course_code(api_get_course_id());\r\n\t\t} else {\r\n\t\t// Registered students in session.\r\n\t\t\t$a_students = CourseManager :: get_student_list_from_course_code(api_get_course_id(), true, api_get_session_id());\r\n\t\t}\r\n\t\treturn count($a_students);\r\n\t}", "title": "" }, { "docid": "65b64fc47966707f40cf58d33624d374", "score": "0.60082203", "text": "protected static function getUsersCount()\n {\n $db = static::getDB();\n $sql = 'SELECT count(*) AS count FROM users';\n $stmt = $db->prepare($sql);\n $stmt->setFetchMode(PDO::FETCH_CLASS, get_called_class());\n $stmt->execute();\n $result = $stmt->fetch();\n return $result->count;\n }", "title": "" }, { "docid": "f319bde17ee76492a357e893e5df6f8e", "score": "0.6000701", "text": "function count_users():string{\n return addZero(User::count());\n }", "title": "" }, { "docid": "7001d4e7f26d2731517171a399a235a5", "score": "0.60000056", "text": "function user_count(){\n\treturn mysql_result(mysql_query(\"SELECT COUNT(`user_id`) FROM `cwusers`\"),0);\n}", "title": "" }, { "docid": "dcdcb2cd99140f4db3e7fea3f72a31f9", "score": "0.5986798", "text": "function getUserNbParticipation(){\n try{\n $bdd = dbConnect();\n $stmt = $bdd->prepare(\"SELECT COUNT(*) FROM project_member WHERE user_id=:id\");\n $stmt->execute(array(\n 'id' => $_SESSION['id']\n ));\n $result = $stmt->fetch(PDO::FETCH_NUM);\n return $result;\n }\n catch(PDOException $e){\n echo \"<br>\" . $e->getMessage();\n }\n }", "title": "" }, { "docid": "20c4c495a7c73ef69afebfe282d8c539", "score": "0.5985373", "text": "public function getCountByUser(User $user);", "title": "" }, { "docid": "6309ee43adc06e86da3d3f4afe221314", "score": "0.59780157", "text": "public function userCount()\n {\n return User::count();\n }", "title": "" }, { "docid": "9029813a5f3da63df62fe5e6f9cf1790", "score": "0.5977732", "text": "public function getViewedCount()\n {\n return $this->viewedUsers()->sum('count');\n }", "title": "" }, { "docid": "782ff064f3962de20b98eaead6abf0bf", "score": "0.5973718", "text": "private function getCount()\n {\n $bd = Core::getBdd()->getDb();\n $u_insc_c = \"SELECT DISTINCT COUNT(u.id) as c FROM c_user u\";\n $insc = 0 + $bd->query($u_insc_c)->fetchObject()->c;\n return ($insc);\n }", "title": "" }, { "docid": "f98c5bbd652e13e3e8b5b9ff46df65d7", "score": "0.59728575", "text": "function getLockedUsersCount() {\n\n $objUtil = new Util($this->apiKey, $this->secretKey);\n\n try {\n\t\t $params = null;\n $userObj = new App42Response();\n $headerParams = array();\n $queryParams = array();\n $signParams = $this->populateSignParams();\n $metaHeaders = $this->populateMetaHeaderParams();\n $headerParams = array_merge($signParams, $metaHeaders);\n $signature = urlencode($objUtil->sign($signParams)); //die();\n $headerParams['signature'] = $signature;\n $contentType = $this->content_type;\n $accept = $this->accept;\n $baseURL = $this->url;\n $baseURL = $baseURL . \"/count/locked\";\n $response = RestClient::get($baseURL, $params, null, null, $contentType, $accept, $headerParams);\n $userObj->setStrResponse($response->getResponse());\n $userObj->setResponseSuccess(true);\n $userResponseObj = new UserResponseBuilder();\n $userObj->setTotalRecords($userResponseObj->getTotalRecords($response->getResponse()));\n } catch (App42Exception $e) {\n throw $e;\n } catch (Exception $e) {\n throw new App42Exception($e);\n }\n return $userObj;\n }", "title": "" }, { "docid": "bbae659d1f1f583f95cba3b41b887d28", "score": "0.59591955", "text": "public function getCountPlayers(): int;", "title": "" }, { "docid": "57dca313b70807d5939beb8fa1d11946", "score": "0.59573585", "text": "function nb_ancienne_star(){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->query(\"SELECT COUNT(pseudo) AS nb_ancienne_star FROM utilisateur WHERE star = TRUE AND TIME_TO_SEC(TIMEDIFF((CURRENT_TIMESTAMP),(DATE_STAR)))/60 > 10\");\n\t\t$result = $req->fetch();\n\t\t\n\t\t$req->closeCursor();\n\t\treturn $result['nb_ancienne_star'];\n\t}", "title": "" }, { "docid": "995b624ce2b16e9cb66fb591d821d979", "score": "0.59491855", "text": "public function getNewuserCount()//for all pending quires\n\t\t{\n\t\t\t\n\t\t\t\t$this->load->model('admin/Users_model', 'users');\n\t\t\t\t$data['queryCount'] = $this->users->getNuCount();\n\t\t\t\techo $data['queryCount'];\n\t\t\t\n\t\t}", "title": "" }, { "docid": "c2bb101dfa555006716553b26cd4b37c", "score": "0.59479326", "text": "public function user_loyalty()\n\t{\n\t\t$dim_met = array('daysSinceLastSession', 'users', '-users', null);\n\t\treturn $dim_met;\n\t}", "title": "" }, { "docid": "0388a74de281ed032a5fcb0e90036e17", "score": "0.5943627", "text": "function get_usernumposts($userid)\n {\n }", "title": "" }, { "docid": "f8eee377044f0d96be4d58f50a667095", "score": "0.5941531", "text": "function sqlTest_numUsers()\n{\n\t$result = mysql_get(\"SELECT Count(*) FROM `Account` WHERE `Privileges`='u'\");\n\t$row = mysql_fetch_row($result);\n\treturn $row[0];\n}", "title": "" }, { "docid": "8f4a2e8e2ad86ddb2e996e190581f6e2", "score": "0.5936206", "text": "public function honeyCount()\n {\n return DB::table('userlink')\n ->where('user1', $this->id)\n ->orwhere('user2', $this->id)\n ->count();\n }", "title": "" }, { "docid": "6887e4aa19bb45e8195bc46963d78d2c", "score": "0.5924593", "text": "function nr_echipe($username) {\n $query=\"select count(*) from echipe where apartinator='$username';\";\n $nr_echipe=numarare($query);\n return $nr_echipe;\n}", "title": "" }, { "docid": "7e973697ab12d933cb70be6de2703cc8", "score": "0.592309", "text": "public function getPendingCount(User $requester);", "title": "" }, { "docid": "87be38895a05725eac8fb14899efdce2", "score": "0.5916513", "text": "public static function get_count_win()\n {\n $unique = self::$unique_user_obj->get_unique_user();\n $user_id = self::$storage_obj->get_id_user($unique);\n $count_pc = self::$storage_obj->get_count_win($user_id, 'pc');\n $count_user = self::$storage_obj->get_count_win($user_id, 'user');\n\n return response()->json(['count_pc' => $count_pc, 'count_user' => $count_user]);\n }", "title": "" }, { "docid": "136a84cf85052c6b95152a400c252abf", "score": "0.59045476", "text": "public function CountUsers()\r\n {\r\n return count($this->Messages);\r\n }", "title": "" }, { "docid": "836dc8f1dd86e31fb030cf82317a6813", "score": "0.59025705", "text": "public function countByUser(int $userId): int {\n return $this->contributors[$userId] ?? 0;\n }", "title": "" }, { "docid": "6307ecfd9423fcfc464e912f3fb4a45f", "score": "0.58974624", "text": "function countUsers(){\n return $this->db->count_all('user');\n \t}", "title": "" }, { "docid": "0c799b3f077558067b7f5ce509660894", "score": "0.58784", "text": "function count_vehicle_ratings($data)\n\t{\n\t\tglobal $cid , $db;\n\n\t\t//Lets See If This Is To Update Or Insert A Rating\n\t \t$sql = \"SELECT count(*) as total FROM \" . GARAGE_RATING_TABLE . \"\n\t\t\tWHERE user_id = '\".$data['user_id'].\"' AND garage_id = '$cid'\";\n\n\t\tif(!$result = $db->sql_query($sql))\n\t\t{\n\t\t\tmessage_die(GENERAL_ERROR, 'Error Counting Ratings', '', __LINE__, __FILE__, $sql);\n\t\t}\n\n\t $row = $db->sql_fetchrow($result);\n\t\t$db->sql_freeresult($result);\n\n\t\treturn $row;\n\t}", "title": "" }, { "docid": "3021fc07796885f2ce9a0bf6b332cae6", "score": "0.5876989", "text": "function avatar_get_amount()\n{\n\tglobal $db;\n\treturn $db->get_number_of_rows('user_avatars');\n}", "title": "" }, { "docid": "f243f12925c45c26c3784008c2fd089c", "score": "0.5874931", "text": "public function users_count()\n {\n return $this->db->count_all(\"hotel_sys_users\");\n }", "title": "" }, { "docid": "e703278c70c4b5f3609db5c0005edd8e", "score": "0.5867681", "text": "public function p_adod_growth() {\n\t\t$extras = 3; # admin, test users\n\t\t\n\t\t# Build the last weeks' user counts\n\t\t\n\t\t$q = \"SELECT\n\t\tCOUNT(user_id)\n\t\tFROM users\n\t\tWHERE created BETWEEN '01-Jan-2013' AND '\".date(\"d-M-Y\").\"'\";\n\n\t\t$today = DB::instance(DB_NAME)->select_field($q) - $extras;\n\t\t\n\t\t$q = \"SELECT\n\t\tCOUNT(user_id)\n\t\tFROM users\n\t\tWHERE created BETWEEN '01-Jan-2013' AND '\".date(\"d-M-Y\", strtotime('-1 day')).\"'\";\n\t\t\n\t\t$day_1 = DB::instance(DB_NAME)->select_field($q) - $extras;\n\t\t\n\t\t$q = \"SELECT\n\t\tCOUNT(user_id)\n\t\tFROM users\n\t\tWHERE created BETWEEN '01-Jan-2013' AND '\".date(\"d-M-Y\", strtotime('-2 days')).\"'\";\n\t\t\n\t\t$day_2 = DB::instance(DB_NAME)->select_field($q) - $extras;\n\t\t\n\t\t$q = \"SELECT\n\t\tCOUNT(user_id)\n\t\tFROM users\n\t\tWHERE created BETWEEN '01-Jan-2013' AND '\".date(\"d-M-Y\", strtotime('-3 days')).\"'\";\n\t\t\n\t\t$day_3 = DB::instance(DB_NAME)->select_field($q) - $extras;\n\t\t\n\t\t$q = \"SELECT\n\t\tCOUNT(user_id)\n\t\tFROM users\n\t\tWHERE created BETWEEN '01-Jan-2013' AND '\".date(\"d-M-Y\", strtotime('-4 days')).\"'\";\n\t\t\n\t\t$day_4 = DB::instance(DB_NAME)->select_field($q) - $extras;\n\t\t\n\t\t$q = \"SELECT\n\t\tCOUNT(user_id)\n\t\tFROM users\n\t\tWHERE created BETWEEN '01-Jan-2013' AND '\".date(\"d-M-Y\", strtotime('-5 days')).\"'\";\n\t\t\n\t\t$day_5 = DB::instance(DB_NAME)->select_field($q) - $extras;\n\t\t\n\t\t$q = \"SELECT\n\t\tCOUNT(user_id)\n\t\tFROM users\n\t\tWHERE created BETWEEN '01-Jan-2013' AND '\".date(\"d-M-Y\", strtotime('-6 days')).\"'\";\n\t\t\n\t\t$day_6 = DB::instance(DB_NAME)->select_field($q) - $extras;\n\t\t\n\t\t$q = \"SELECT\n\t\tCOUNT(user_id)\n\t\tFROM users\n\t\tWHERE created BETWEEN '01-Jan-2013' AND '\".date(\"d-M-Y\", strtotime('-7 days')).\"'\";\n\t\t\n\t\t$day_7 = DB::instance(DB_NAME)->select_field($q) - $extras;\n\t\t\n\t\t$data = array();\n\t\t$data['values'] = array($today, $day_1, $day_2, $day_3, $day_4, $day_5, $day_6, $day_7);\n\t\t$data['days'] = array(\n\t\t\t\t\t\t\tdate(\"d-M-y\"),\n\t\t\t\t\t\t\tdate(\"d-M-y\", strtotime('-1 day')), \n\t\t\t\t\t\t\tdate(\"d-M-y\", strtotime('-2 days')),\t\t\t\n\t\t\t\t\t\t\tdate(\"d-M-y\", strtotime('-3 days')),\n\t\t\t\t\t\t\tdate(\"d-M-y\", strtotime('-4 days')),\n\t\t\t\t\t\t\tdate(\"d-M-y\", strtotime('-5 days')),\n\t\t\t\t\t\t\tdate(\"d-M-y\", strtotime('-6 days')),\n\t\t\t\t\t\t\tdate(\"d-M-y\", strtotime('-7 days')));\n\t\t\t\n\t\techo json_encode($data);\n\t}", "title": "" }, { "docid": "f13f3fdd51995f7b3890e18aaaa4f1ee", "score": "0.5865588", "text": "public function getTotalOccupiedLots() {}", "title": "" }, { "docid": "69a9fff69cbb441e56387aff3ed843b6", "score": "0.58482254", "text": "protected function getNbrMarketModerators(){\n User::selectRaw('count(*) as sum')->whereRaw('rank = \"marketm\"')->get();\n }", "title": "" }, { "docid": "11941de0633f002f27f9dbb91014e0cd", "score": "0.5844644", "text": "function getALlUserCount()\n {\n return $this->db->count_all_results('users');\n }", "title": "" }, { "docid": "efb9ccdb3eb39b8fac939a19bf3f09e8", "score": "0.5842549", "text": "function wp_count_users( $args = '' ) {\n\twp_parse_args(\n\t\t$args, array(\n\t\t\t'role' => ''\n\t\t)\n\t);\n\t\n\t$users = new WP_Query_Users( $args );\n\treturn $users->get_total();\n\t\n}", "title": "" }, { "docid": "a914220a62d21585df6e4d03cd92a34e", "score": "0.58391553", "text": "protected function getNbrEncyclopediaModerators(){\n User::selectRaw('count(*) as sum')->whereRaw('rank = \"encyclopediam\"')->get();\n }", "title": "" }, { "docid": "3df28f1d4d88e4ae2651469ebee656a2", "score": "0.58295304", "text": "function getEventWeight($obs_id, $expert_id) {\n $weight_query = \"SELECT (SELECT COUNT(*) FROM timed_observations AS obs WHERE obs.video_id = t.video_id AND obs.user_id = $expert_id) AS expert_count, (SELECT COUNT(*) FROM timed_observations AS obs WHERE obs.video_id = t.video_id AND obs.user_id = t.user_id) AS user_count FROM timed_observations AS t WHERE t.id = $obs_id\";\n $weight_result = query_wildlife_video_db($weight_query);\n while ($weight_row = $weight_result->fetch_assoc()) {\n $user_count = $weight_row['user_count'];\n $expert_count = $weight_row['expert_count'];\n $max_count = max($user_count, $expert_count);\n return 1/$user_count * ($user_count / $max_count);\n }\n return 0;\n}", "title": "" }, { "docid": "e75026825a01385a9060b2d106024079", "score": "0.5824716", "text": "function calcNumActiveGuests(){\n /* Calculate number of guests at site */\n $q = \"SELECT * FROM \".TBL_ACTIVE_GUESTS;\n $result = mysql_query($q, $this->connection);\n $this->num_active_guests = mysql_numrows($result);\n }", "title": "" }, { "docid": "73520d961e43a26c095e40dbc493d103", "score": "0.58202225", "text": "public static function getCountUser($model,$user)\n { \n $sql = \"SELECT COUNT(*) FROM $model WHERE user_id='$user'\";\n $count = Yii::app()->db->createCommand($sql)->queryScalar();\n return $count; \n }", "title": "" }, { "docid": "6d0190cd8ec56b5a761cb30dcf77716b", "score": "0.5819498", "text": "public function memberCount() {\n $count = 0;\n foreach ($this->teams() as $team) {\n $count += $team->memberCount();\n }\n\n return $count;\n }", "title": "" }, { "docid": "ab0670dcd47fbbbcc69ed1f23f6494bf", "score": "0.58107495", "text": "public function mutualFriendCount(): int\n {\n return $this->pluck('mutualFriendsCount');\n }", "title": "" }, { "docid": "97876a9812047f1b54e01d94b63b7c03", "score": "0.580891", "text": "public function countUser(): int {\r\n $v = new Validation ();\r\n \r\n try {\r\n $v->emptyField ( $this->user );\r\n $v->atLeastFour ( $this->user );\r\n $v->alpha ( $this->user );\r\n \r\n $query = \"SELECT COUNT(*) as numUsers\r\n FROM Users\r\n WHERE user = :user\";\r\n \r\n $stmt = $this->_db->prepare ( $query );\r\n $stmt->bindValue ( ':user', $this->_user );\r\n $stmt->execute ();\r\n $row = $stmt->fetch ( PDO::FETCH_ASSOC );\r\n \r\n return $row ['numUsers'];\r\n } catch ( ValidationException $e ) {\r\n throw new ModelException ( $e->getMessage () );\r\n }\r\n }", "title": "" }, { "docid": "9c512838f04ecd012b8411d43680c81b", "score": "0.58041406", "text": "function get_number_users($show_deactivated = false) {\n\tglobal $CONFIG;\n\n\t$access = \"\";\n\n\tif (!$show_deactivated) {\n\t\t$access = \"and \" . _elgg_get_access_where_sql(['table_alias' => '']);\n\t}\n\n\t$query = \"SELECT count(*) as count\n\t\tfrom {$CONFIG->dbprefix}entities where type='user' $access\";\n\n\t$result = get_data_row($query);\n\n\tif ($result) {\n\t\treturn $result->count;\n\t}\n\n\treturn false;\n}", "title": "" }, { "docid": "e605c4a946a41d8f4e258a5c20fa2f66", "score": "0.5796303", "text": "function calcNumActiveGuests(){\r\n /* Calculate number of guests at site */\r\n $q = \"SELECT * FROM \".TBL_ACTIVE_GUESTS;\r\n $result = mysql_query($q, $this->connection);\r\n $this->num_active_guests = mysql_numrows($result);\r\n }", "title": "" }, { "docid": "18445e917264117713489d8706dd7f8e", "score": "0.57950026", "text": "function total_friend_count( $user_id = false ) {\r\n\t\tglobal $wpdb, $bp;\r\n\t\tif ( !$user_id )\r\n\t\t\t$user_id = ( $bp->displayed_user->id ) ? $bp->displayed_user->id : $bp->loggedin_user->id;\r\n\t\t/* This is stored in 'total_friend_count' usermeta.\r\n\t\t This function will recalculate, update and return. */\r\n\t\t$count = $wpdb->get_var( $wpdb->prepare( \"SELECT COUNT(id) FROM {$bp->friends->table_name} WHERE (initiator_user_id = %d OR friend_user_id = %d) AND is_confirmed = 1\", $user_id, $user_id ) );\r\n\t\tif ( !$count )\r\n\t\t\treturn 0;\r\n\t\tupdate_usermeta( $user_id, 'total_friend_count', $count );\r\n\t\treturn $count;\r\n\t}", "title": "" }, { "docid": "584dcd384c0de802e67a9826df3fff42", "score": "0.5793576", "text": "public function get_total_pages_user(){\n $count = $this->get_total_items_user();\n if (!$count) return 0;\n $count = ($count / $this->itemsforpage);\n return (int) ceil($count);\n }", "title": "" }, { "docid": "f8743d4a70779248341fc0e81c79bb74", "score": "0.5792224", "text": "function countActiveUsers($connection)\n{\n\t$sql = \"SELECT username FROM USERS WHERE last_login >= NOW() - INTERVAL 10 MINUTE\";\n\t$result = $connection->query($sql);\n\t$activeCount = $result->num_rows; \n\treturn $activeCount;\t\n}", "title": "" }, { "docid": "fea8e29a879f7edc8de28f172298f35d", "score": "0.57891136", "text": "function calcNumActiveGuests(){\r\n\t /* Calculate number of GUESTS at site */\r\n\t $sql = $this->connection->query(\"SELECT * FROM \".TBL_ACTIVE_GUESTS);\r\n\t $this->num_active_guests = $sql->rowCount(); \r\n\t}", "title": "" }, { "docid": "a37f2258d93e199f18a3348d3ffda9ad", "score": "0.5787435", "text": "function getComputedEventWeight($comp_id, $expert_id) {\n $weight_query = \"SELECT (SELECT COUNT(*) FROM timed_observations AS obs WHERE obs.video_id = t.video_id AND obs.user_id = $expert_id AND obs.start_time_s >= 0 AND obs.start_time_s <= obs.end_time_s) AS expert_count, (SELECT COUNT(*) FROM computed_events AS comp WHERE comp.video_id = t.video_id AND comp.algorithm_id = t.algorithm_id AND comp.version_id = t.version_id) AS user_count FROM computed_events AS t WHERE t.id = $comp_id\";\n $weight_result = query_wildlife_video_db($weight_query);\n while ($weight_row = $weight_result->fetch_assoc()) {\n $user_count = $weight_row['user_count'];\n $expert_count = $weight_row['expert_count'] * 2;\n $max_count = max($user_count, $expert_count);\n #return 1/$user_count * ($user_count / $max_count);\n return 1/$expert_count;\n }\n return 0;\n}", "title": "" }, { "docid": "f45a0533f3184d10e6bae65db0eb2ee3", "score": "0.57860106", "text": "public function getUserIdCount()\n {\n return $this->count(self::_USER_ID);\n }", "title": "" }, { "docid": "c3acaa285fdce0fd5df74495d9b7983d", "score": "0.57857233", "text": "public function getCountofCreatedUser(){\n\t\t\n\t\tif($_REQUEST['login_id']>0){ // Edit Time Check\n\t\t\t$this->checkUserCreateLimits();\t\t\t\n\t\t}else{\t// Add Time check\n\t\t\t$this->InsertTimeCheckUserCounts();\n\t\t}\n\t}", "title": "" }, { "docid": "4e1f2e07e669132c282e479d9b76bfa4", "score": "0.57854354", "text": "function calcNumActiveGuests(){\n\t\t$q = \"SELECT * FROM \".TBL_ACTIVE_GUESTS;\n\t\t$result = mysql_query($q, $this->connection);\n\t\t$this->num_active_guests = mysql_numrows($result);\n\t}", "title": "" }, { "docid": "454ab1ca1399910ac5b3d686eae12c43", "score": "0.5783503", "text": "public function total_user_count() {\n $this->db->where(array('status' => 1));\n $users_count = $this->db->from('users')->count_all_results();\n\n return $users_count;\n }", "title": "" }, { "docid": "4b4086e33e0820e5f35883e15680eb54", "score": "0.57827204", "text": "public function getReviewedUserCountAttribute()\n\t\t{\n\t\t\treturn $this->UserReview()->count();\t//Adding Custom Query\n\t\t}", "title": "" }, { "docid": "4ef332601686ec7282155923ae6ad7f1", "score": "0.5779214", "text": "function getNumMembers(){\n\t\tif($this->num_members < 0){\n\t\t\t$q = \"SELECT * FROM \".TBL_USERS;\n\t\t\t$result = mysql_query($q, $this->connection);\n\t\t\t$this->num_members = mysql_numrows($result);\n\t\t}\n\t\treturn $this->num_members;\n\t}", "title": "" }, { "docid": "07b6a74c3c48368ac81aea438bd25f67", "score": "0.5778342", "text": "function total_users(){\n\treturn mysql_result(mysql_query(\"SELECT COUNT(`user_id`) FROM `users` WHERE `active` =1\"), 0);\n}", "title": "" }, { "docid": "47d86a0321b613c4a00ed490656fa702", "score": "0.57764035", "text": "function get_user_score() \n\t{\n\t\t$this->load->model('frontendmodel');\n\n\t\t$arrResult = $this->frontendmodel->FetchResult();\n\n\t\t$intCounter = 0;\n\n\t\tforeach ($arrResult as $key => $value) \n\t\t{\n\t\t\tif($value['result'] && $value['includeinscoring'])\n\t\t\t{\n\t\t\t\t$intCounter = $intCounter + 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\techo $intCounter;\n\t}", "title": "" }, { "docid": "2e760b94cd481068f201416e1fdef132", "score": "0.57762563", "text": "function totalpatient_count(){\r\n\treturn mysql_result(mysql_query(\"SELECT COUNT(`user_id`) FROM `users` WHERE `active` = 1 AND `type` = 0\"), 0);\r\n}", "title": "" }, { "docid": "cdd505f1742f35d375b3323539a52aed", "score": "0.5775716", "text": "function getAllUsersCount() {\n\n $objUtil = new Util($this->apiKey, $this->secretKey);\n try {\n\t\t $params = null;\n $userObj = new App42Response();\n $headerParams = array();\n $queryParams = array();\n $signParams = $this->populateSignParams();\n $metaHeaders = $this->populateMetaHeaderParams();\n $headerParams = array_merge($signParams, $metaHeaders);\n $signature = urlencode($objUtil->sign($signParams)); //die();\n $headerParams['signature'] = $signature;\n $contentType = $this->content_type;\n $accept = $this->accept;\n $baseURL = $this->url;\n $baseURL = $baseURL . \"/count/all\";\n $response = RestClient::get($baseURL, $params, null, null, $contentType, $accept, $headerParams);\n $userObj->setStrResponse($response->getResponse());\n $userObj->setResponseSuccess(true);\n $userResponseObj = new UserResponseBuilder();\n $userObj->setTotalRecords($userResponseObj->getTotalRecords($response->getResponse()));\n } catch (App42Exception $e) {\n throw $e;\n } catch (Exception $e) {\n throw new App42Exception($e);\n }\n return $userObj;\n }", "title": "" }, { "docid": "73c3193a8667dd1dca61ad0b51df9e8d", "score": "0.57688934", "text": "public function count()\n {\n return $this->onlineUsers->count();\n }", "title": "" }, { "docid": "5c33ab9a28e3aa4e666332fcc57b2dbe", "score": "0.5767844", "text": "public function get_userformpagecount() {\n return $this->userformpagecount;\n }", "title": "" }, { "docid": "449630e7a99f9095edcb8db319be928c", "score": "0.5759268", "text": "function get_total_friends()\n\t\t{\n\t\t\t$query = \"SELECT * FROM signup\";\n\t\t\t$query_data = $this->QueryTool->get_query_data($query);\n\t\t\t$total_count = count($query_data);\n\t\t\treturn $total_count;\t\n\t\t}", "title": "" }, { "docid": "45ccd89c9404fb9b943ab0efc63dbe1b", "score": "0.5759244", "text": "protected function getNbrBlogModerators(){\n User::selectRaw('count(*) as sum')->whereRaw('rank = \"blogm\"')->get();\n }", "title": "" }, { "docid": "fa5a7616abbe44dab0d6f9302f4e2408", "score": "0.575574", "text": "public function count()\n {\n return (int)count($_SESSION[ 'throttle' ]);\n }", "title": "" }, { "docid": "5479417aa77f0730ff76a68e08bc7917", "score": "0.5752434", "text": "public function getHireUidsCount()\n {\n return $this->count(self::_HIRE_UIDS);\n }", "title": "" }, { "docid": "90e4c37be0b4e023d97bd8c619f66bb2", "score": "0.57504815", "text": "public function countOnlineUsers(){\n\n\t$onlineUsers=$this->conn->prepare(\"SELECT * FROM user_online \");\n\n\t$onlineUsers->execute();\n\n\t$howMany= $onlineUsers->rowCount();\n\n\treturn $howMany;\n\n}", "title": "" } ]
e48f2178ca5c35881359266fde39e0ec
Query for one row and one column
[ { "docid": "6d00977c9b3ab1d6ad4821d89908d134", "score": "0.0", "text": "protected function querySingleResult($sqlQuery){\n\t\treturn QueryExecutor::queryForString($sqlQuery);\n\t}", "title": "" } ]
[ { "docid": "43d3d3079568fe9a151384e5f61c4f0e", "score": "0.6828611", "text": "function query_single( &$row, $sql, $column = false )\r\n {\r\n $array = array();\r\n $ret = $this->array_query_append( $array, $sql, 1, 1, $column );\r\n $row = $array[0];\r\n return $ret;\r\n }", "title": "" }, { "docid": "9562038efc2cb70dcb56dad6b0b94252", "score": "0.6591616", "text": "public function getOneRow($sql) {\n }", "title": "" }, { "docid": "550fd2904283f8d7604c28ac70661bbd", "score": "0.64760846", "text": "public function row()\n\t{\n\t\t$this->init_query();\n\t\treturn safe_row(implode(',', $this->select), $this->table, \n\t\t\t$this->clause_string());\n\t}", "title": "" }, { "docid": "a72b5300c3047b0805caf0aa1eb9aee2", "score": "0.63932306", "text": "abstract function get_row($query);", "title": "" }, { "docid": "15d640268e9f302136437acd721776ca", "score": "0.6369425", "text": "public static function row()\n\t{\n\t\t$arguments = func_get_args();\n\t\t$sth = call_user_func_array('static::query', $arguments);\n\t\treturn $sth->fetch(\\PDO::FETCH_OBJ);\n\t}", "title": "" }, { "docid": "a7dd8525c8d8dcc3bf436261d4e695f5", "score": "0.6327738", "text": "function row($sql);", "title": "" }, { "docid": "46a596817ca33f1b6dd4ae7e4081a3ac", "score": "0.6324296", "text": "public function row()\n\t{\n\t\t$arguments = func_get_args();\n\t\t$sth = call_user_func_array(array($this, 'query'), $arguments);\n\t\treturn $sth->fetch(\\PDO::FETCH_OBJ);\n\t}", "title": "" }, { "docid": "11344f75493f87e6545b43ad0f640256", "score": "0.6317397", "text": "public function query($value, Column $column);", "title": "" }, { "docid": "5c7321cf6b5dd24985a6d37552eb2105", "score": "0.62557364", "text": "public static function fields_row()\n\t{\n\t\t$arguments = func_get_args();\n\t\t$sth = call_user_func_array('static::query', $arguments);\n\t\treturn $sth->fetch(\\PDO::FETCH_NUM);\n\t}", "title": "" }, { "docid": "b29af9c0e81be952fdb693fc4418c196", "score": "0.6228041", "text": "protected function _singleRow($query)\n {\n return empty($query[ 0 ]) ? null : $query[ 0 ];\n }", "title": "" }, { "docid": "02aa52319cbc61623ed104a2645974b1", "score": "0.62008256", "text": "public function one(array $row);", "title": "" }, { "docid": "9713ccb0911299658f920e9220705eea", "score": "0.6148294", "text": "public function rows($value, $column = 'id');", "title": "" }, { "docid": "49d886127db6458d89056364a3f2d02d", "score": "0.6136555", "text": "function func_query_first_cell($query) {\n\tif ($p_result = db_query($query)) {\n\t\t$result = db_fetch_row($p_result);\n\t\tdb_free_result($p_result);\n\t}\n\treturn is_array($result)?$result[0]:false;\n}", "title": "" }, { "docid": "9b81b999b63dcade07dae388a1ea889e", "score": "0.61255646", "text": "public function queryColumn(): array;", "title": "" }, { "docid": "2ce77378413e965c5aa198daa7c55445", "score": "0.6085133", "text": "abstract function f ($query_result, $single_column = false, $array = false, $indexed = false);", "title": "" }, { "docid": "3cdf7ff4fd05706ed8fdcadb5361b53e", "score": "0.60842985", "text": "function queryColumn($query)\n {\n $data = [];\n $res = $this->q($query);\n while ($row = $res->fetch_row())\n {\n if ($res->field_count == 1)\n $data[] = $row[0];\n else\n $data[$row[0]] = $row[1];\n }\n $res->close();\n return $data;\n }", "title": "" }, { "docid": "050b51456c33a4596054998d58f5745b", "score": "0.60688126", "text": "function FetchOneRowDataByTwoField($tableName,$fieldName,$fieldValue,$fieldName2,$fieldValue2)\n{\n $query = $this->db->query(\"Select * from $tableName where $fieldName='\".$fieldValue.\"' and $fieldName2='\".$fieldValue2.\"' \");\n $totalRowsUnique = $query->num_rows();\n if($totalRowsUnique > 0)\n {\n return $query->row();\n }\n \n }", "title": "" }, { "docid": "00dcca6b4c06d5497ea788b439f7e552", "score": "0.60456336", "text": "public function rowResult(){\n $result = $this->query();\n \n return empty($result)?$result:$result[0];\n }", "title": "" }, { "docid": "ef398dba48037fc5394174a1c405a409", "score": "0.6031324", "text": "public function singleRow()\n {\n $this->execute();\n return $this->stmt->fetch(\\PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "21a2816e89452bb851311bc979e6dfdc", "score": "0.6028495", "text": "public function row($value, $column = 'id');", "title": "" }, { "docid": "af5ee71fe9b93b9b43c72faf347c88ed", "score": "0.60123086", "text": "function get_where_single_row($table, $data)\n\t{\n\t\t//$this->db->_compile_select(); \n\t\t$query = $this->db->get_where($table, $data);\n\t\t//echo $this->db->last_query(); \n\t\treturn $query->row();\t\t\n\t}", "title": "" }, { "docid": "41429108c6f770cc804bbae31091d27e", "score": "0.60051554", "text": "private static function fetch_rows_where($table, $attributes, $only_one_row = false){\n\t\t\t$query = \"SELECT * FROM \" . $table . \" WHERE\";\n\t\t\tforeach ($attributes as $key => $value) {\n\t\t\t\t$query .= (\" \" . $key . \"=:\" . $key . \"#\");\n\t\t\t}\n\t\t\t$query = str_replace(\"#\", \" AND \", substr($query, 0, -1));\n\t\t\tif($only_one_row){\n\t\t\t\t$query .= \" LIMIT 1\";\n\t\t\t}\n\n\t\t\treturn self::db_query($query, $attributes);\n\t\t}", "title": "" }, { "docid": "86e9c2bd9bb2f65a0048bd77611c918c", "score": "0.6001469", "text": "public function queryOne()\n {\n return $this->queryInternal(self::FETCH_ONE);\n }", "title": "" }, { "docid": "456b5893e43af723fede836fedc9c33d", "score": "0.599729", "text": "public abstract function value($sql, $getRow = false);", "title": "" }, { "docid": "9b077c1441c0eadc4b396397188df574", "score": "0.5990938", "text": "abstract protected function fetchRowInternal();", "title": "" }, { "docid": "393c8aa3660d1f662c99a5d37f920d1e", "score": "0.5970088", "text": "public static function field()\n\t{\n\t\t$arguments = func_get_args();\n\t\t$sth = call_user_func_array('static::query', $arguments);\n\t\treturn $sth->fetchColumn();\n\t}", "title": "" }, { "docid": "d372b65313eaba8d42723097ca2fc25a", "score": "0.59682435", "text": "function getRowQuery($table, $cols, $cond=\"\"){\n if(!empty($cond)){\n $this->db->where($cond);\n }\n \n $this->db->select(implode(\",\", $cols));\n $query = $this->db->get($table);\n \n return $query; \n }", "title": "" }, { "docid": "e0ace4575176853c2a77dc6783946444", "score": "0.59511894", "text": "protected abstract function value($row);", "title": "" }, { "docid": "294fcc223dddea23737684520a9d36b8", "score": "0.59458244", "text": "function get_row($table_name,$column,$condition=\"\"){\t\t\n\t\t$arr = set_array_from_query2($table_name,$column,$condition);\n\t\t$array=array();\n\t\tforeach($arr as $val){\n\t\t\tif($val !=\"\"){\n\t\t\t\tforeach($val as $key => $value) {\n\t\t\t\t\t$array[$key] =\"$value\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "4e25cd5698dfc3ffb1cbc41c325dcd26", "score": "0.5945787", "text": "function getRow($sql, $returnType = \\PDO::FETCH_ASSOC);", "title": "" }, { "docid": "b793cc8aafb23c30284891ae46f48d11", "score": "0.592294", "text": "public function rows()\n\t{\n\t\t$this->init_query();\n\t\treturn safe_rows( ( $this->distinct ? 'distinct ' : '') . \n\t\t\timplode(',', $this->select), $this->table, $this->clause_string());\n\t}", "title": "" }, { "docid": "656159cf8c04da790b6420017b7ecc08", "score": "0.5914442", "text": "public function values_row()\n\t{\n\t\t$arguments = func_get_args();\n\t\t$sth = call_user_func_array(array($this, 'query'), $arguments);\n\t\treturn $sth->fetch(\\PDO::FETCH_NUM);\n\t}", "title": "" }, { "docid": "83526caf45c453f48d208a2c4dc91f0f", "score": "0.58938783", "text": "function get_row() { }", "title": "" }, { "docid": "706815c061c677ad27264536be022a18", "score": "0.5892722", "text": "public function primaryResult()\n {\n $result = $this->db->table($this->table);\n $primary = $this->db->getPrimary($this->table);\n\n if (is_array($primary)) {\n $this->execute();\n\n if (empty($this->rows)) {\n return $result->where(\"0=1\");\n }\n\n $or = array();\n\n foreach ($this->rows as $row) {\n $and = array();\n\n foreach ($primary as $column) {\n $and[] = \"(\" . $this->db->is($column, $row->__get($column)) . \")\";\n }\n\n $or[] = \"(\" . implode(\" AND \", $and) . \")\";\n }\n\n return $result->where(implode(\" OR \", $or));\n }\n\n return $result->where($primary, $this->getLocalKeys($primary));\n }", "title": "" }, { "docid": "e7c67f1ae8c65f49878e97882513ad36", "score": "0.58807933", "text": "public function oneRow($sql,$mode=PDO::FETCH_OBJ){\n return $this->prepexec($sql)->fetch($mode);\n }", "title": "" }, { "docid": "f75e8ea9a7ec2c03e8c59604e5315d2a", "score": "0.5870591", "text": "public function getRowMatching()\n {\n $num = func_num_args();\n $args = func_get_args();\n\n // We are passing in a single column/value\n if( $num == 2 )\n {\n $cols = array($args[0] => $args[1]);\n }\n\n // We are passing in an array\n else if( $num == 1 && is_array($args[0]) )\n {\n $cols = $args[0];\n }\n\n // Wth is this\n else\n {\n throw new Zend_Db_Table_Rowset_Exception(\"Malformed arguments\");\n }\n\n for( $i = 0, $l = count($this->_data); $i < $l; $i++ )\n {\n $row = $this->_getRow($i);\n foreach( $cols as $colName => $colValue )\n {\n if( !isset($row->$colName) || $row->$colName != $colValue )\n {\n continue 2;\n }\n }\n return $row;\n }\n\n return null;\n }", "title": "" }, { "docid": "5261af7fedae94ed3afcb982a818c5e0", "score": "0.5868222", "text": "public function oneCol($sql){\n return $this->prepexec($sql)->fetchAll(PDO::FETCH_COLUMN,0);\n }", "title": "" }, { "docid": "178c2034f8ec0bed172bae31d6bc459d", "score": "0.58343107", "text": "public function get_data($row);", "title": "" }, { "docid": "aca6f0b537c42206a713aff4220c064f", "score": "0.58336073", "text": "function getOne($sql);", "title": "" }, { "docid": "2d61cce5e4cb37beae99fcd711019dc3", "score": "0.5829756", "text": "function QueryRow($query)\n\t{\n\t\t$this->result=@mysqli_query($this->id,$query) or\n\t\t\t$this->mysql_ErrorMsg(\"Unable to perform query row: $query\",$this->show);\n\t\t$this->rows=@mysqli_num_rows($this->result);\n\n\t\tif ($this->rows)\n\t\t{\n\t\t\t$this->data=@mysqli_fetch_array($this->result) or\n\t\t\t\t$this->mysql_ErrorMsg(\"Unable to fetch data from query row: $query\",$this->show);\n\t\t\t$this->numfields=mysqli_num_fields($this->result);\n\t\t\treturn($this->data);\n\t\t} else {\n\t\t\treturn(-1);\n\t\t}\n\n\t}", "title": "" }, { "docid": "f95c2bd5520488338adffcab5a48f03b", "score": "0.58246255", "text": "function sqlite_single_query ($query, $first_row_only = null, $decode_binary = null) {}", "title": "" }, { "docid": "ea284ecd6ab9cbbe1ca5fd810141a174", "score": "0.5815692", "text": "public static function\t\tqueryOneColumn($connection, $statement, $binds)\n\t{\n\t\ttry {\n\t\t\t$st = \\net\\dryuf\\sql\\SqlHelper::bindParams($connection->prepareStatement($statement), $binds);\n\t\t\t$rs = $st->executeQuery();\n\t\t\tif ($rs->next()) {\n\t\t\t\tif ($rs->next()) {\n\t\t\t\t\tthrow new \\javax\\persistence\\NonUniqueResultException(\"more than one row found for statement \".$statement);\n\t\t\t\t}\n\t\t\t\treturn $rs->getObject(1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new \\javax\\persistence\\NoResultException(\"no row found for statement \".$statement);\n\t\t\t}\n\t\t}\n\t\tcatch (\\net\\dryuf\\sql\\SqlException $e) {\n\t\t\tthrow new \\net\\dryuf\\core\\RuntimeException($e);\n\t\t}\n\t}", "title": "" }, { "docid": "4e1de711a1231eaa3be1a510c96c1097", "score": "0.57952434", "text": "public function first($columns = ['*']);", "title": "" }, { "docid": "5f7191c0b7c3b433eaeea8bd70665906", "score": "0.57889265", "text": "public function querySingle(...$args)\n {\n return $this->_singleRow($this->query(...$args));\n }", "title": "" }, { "docid": "fd8144334330ac8bd87fc8c2f0250841", "score": "0.5787111", "text": "private function where_and_result() {\n\t\t/*\n\t\t\tValidates the where statement values\n\t\t*/\n\t\t$r = [];\n\n\t\t// Loop through the db rows. Ge the index and row\n\t\tforeach( $this->content as $index => $row ) {\n\n\t\t\t// Make sure its array data type\n\t\t\t$row = ( array ) $row;\n\n\t\t\t\n\t\t\t//check if the row = where['col'=>'val', 'col2'=>'val2']\n\t\t\tif(!array_udiff_uassoc($this->where,$row, array($this, \"intersect_value_check\" ), \"strcasecmp\" ) ) {\n\t\t\t\t$r[] = $row;\n\t\t\t\t// Append also each row array key\n\t\t\t\t$this->last_indexes[] = $index;\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\telse continue ;\n\t\t\t\n\n\t\t}\n\t\treturn $r;\n\t}", "title": "" }, { "docid": "d4ee75d4df1031a5d47847681e6048ae", "score": "0.57821715", "text": "function simpleQuery($query, $params = null)\n {\n $stmt = $this->executeQuery($query, $params);\n return $stmt->fetchColumn();\n }", "title": "" }, { "docid": "9995d8a07653da6b95220cb74fba05a7", "score": "0.5779389", "text": "public function selectOne(){\n //$this->db->select($select);\n if(isset($where)&&!empty($where)){\n foreach($where as $key=>$val){\n $this->db->where($key,$val);\n }\n }\n $this->db->limit(1);\n $result = $this->db->doSelect($this->table_name);\n return isset($result[0])?$result[0]:false;\n }", "title": "" }, { "docid": "00a7610ef5df44fef39e0c3f666c451c", "score": "0.577818", "text": "function getColumnValue4DoubleColumns(\n\t\t\t\t\t\t$conn, \n\t\t\t\t\t\t$search_column, \n\t\t\t\t\t\t$table, \n\t\t\t\t\t\t$condition_column1, \n\t\t\t\t\t\t$condition_value1,\n\t\t\t\t\t\t$condition_column2, \n\t\t\t\t\t\t$condition_value2\n\t\t\t\t\t\t)\n{\n\t$select = \"SELECT $search_column FROM $table WHERE $condition_column1='$condition_value1' AND $condition_column2='$condition_value2'\";\n\tif($result = mysqli_query($conn, $select))\n\t{\n\t\t$row = mysqli_fetch_row($result);\n\t\t$va = $row[0];\n\t}\n\t\n\tmysqli_free_result($result);\n\t\n\treturn($va);\n}", "title": "" }, { "docid": "60086c26673c480f80f0f549d9d1617d", "score": "0.57741344", "text": "function PDOsingleResult($sql,$query_params) {\n try {\n $stmt = $this->db->prepare($sql);\n $result = $stmt->execute($query_params);\n }\n catch(PDOException $ex) {\n die('error in PDOsingleResult '. $ex->getMessage());\n }\n $row = $stmt->fetchAll();\n if (count($row) == 1) return $row[0];\n else return false;\n }", "title": "" }, { "docid": "3ce1505460e115b3c35c83395e597402", "score": "0.576791", "text": "function QueryRow($query){\n\t\t$this->result=@mysqli_query($this->id, $query) or\n\t\t\tmysql_ErrorMsg(\"Unable to perform query: $query. \" . mysqli_error($this->id));\n\t\t$this->rows=@mysqli_num_rows($this->result);\n\t\t$this->data=@mysqli_fetch_array($this->result) or\n\t\t\tmysql_ErrorMsg(\"Unable to fetch data from query: $query. \" . mysqli_error($this->id));\n\t\t$this->StripRowSlashes();\n\t\treturn($this->data);\n\t}", "title": "" }, { "docid": "438fa03f05041450ce77ad6faa17ebac", "score": "0.5764498", "text": "public function whereColumn();", "title": "" }, { "docid": "3cb306bf839d662056a39562c002f365", "score": "0.5760225", "text": "public function fetchCol(string $query, array $args = []);", "title": "" }, { "docid": "2caf6aaf7fd735e3c81fdc03d0bc323a", "score": "0.5759679", "text": "public function result($query, $row = 0, $field = null)\n {\n }", "title": "" }, { "docid": "b48e8f43aef53f44e4c9d72a30ff0a2d", "score": "0.57555825", "text": "public function get_by_columns($params)\n\t\t{\n\t\t\t$query = $this->db->get_where($this->_table,$params);\n\t\t\treturn $query->result_object();\n\t\t}", "title": "" }, { "docid": "febc4f5e0f025d3bbe582dce94fa2d46", "score": "0.57537085", "text": "function FetchOneRowDataByOneField($tableName,$fieldName,$fieldValue)\n{\n $query = $this->db->query(\"Select * from $tableName where $fieldName='\".$fieldValue.\"'\");\n $totalRowsUnique = $query->num_rows();\n if($totalRowsUnique > 0)\n {\n return $query->row();\n }\n \n }", "title": "" }, { "docid": "a41903e09c05e21ae58fd09d97f6b642", "score": "0.57495904", "text": "public function getOne($sql, array $args = array())\n {\n// echo __METHOD__.'<br>';\n// dump(func_get_args());\n// echo '<hr>';\n $args = func_get_args();\n $tmpSql = $this->_createSql($args);\n $res = M()->query($tmpSql);\n //获取第一行记录的一列记录\n return array_shift(array_shift($res));\n\n }", "title": "" }, { "docid": "03e67b7425b2c65def62c4b37636cede", "score": "0.5745697", "text": "public static function get_one() {\n $schema = static::schema();\n $query = cy\\DB::select()->from($schema->table_name);\n $args = func_get_args();\n static::build_sfw($query, $args);\n $result = $query->exec($schema->database)->rows($schema->class)->as_array();\n switch(count($result)) {\n case 1: return $result[0];\n case 0: return null;\n default: throw new db\\Exception('more than one results: ' . $query->compile($schema->database));\n }\n }", "title": "" }, { "docid": "ea8c050cfce34b2f0bee2e75896ac94d", "score": "0.574498", "text": "public function getrow_two($where1,$whereval1,$where2,$whereval2,$table) {\n // use prepare statement\n $bind = array(\n \":whereval1\" => \"$whereval1\",\n \":whereval2\" => \"$whereval2\"\n );\n //\n $mwhere = $where1 .\"=:whereval1 AND \".$where2 .\"=:whereval2 LIMIT 1\";\n $fres = $this->select($table,$mwhere,$bind);\n $fieldval = array();\n if(FALSE !== $fres && !empty($fres)){\n foreach ($fres as $ffv) {\n $fieldval = $ffv;\n }\n return $fieldval;\n }\n else{\n return false;\n }\n }", "title": "" }, { "docid": "28697d5e442b6de2510c9cca62c113a3", "score": "0.5743369", "text": "public function getRow()\n {\n $result = DB::select()->from($this->_table);\n foreach ($this->_params AS $key => $arr) {\n $result->where($key, $arr['sign'], $arr['value']);\n }\n return $result->find();\n }", "title": "" }, { "docid": "dd42c9e0034b597bf68b5fce82dd23dd", "score": "0.57408375", "text": "public function value()\n\t{\n\t\t$arguments = func_get_args();\n\t\t$sth = call_user_func_array(array($this, 'query'), $arguments);\n\t\treturn $sth->fetchColumn();\n\t}", "title": "" }, { "docid": "02c024fd8bdca80d76a7f5c2ffc4581e", "score": "0.5733744", "text": "public function getUniqueRow() {}", "title": "" }, { "docid": "5efdf0db47f76abd4dc5a930b0871fba", "score": "0.57272667", "text": "public function read_single() {\n // Create query\n $query = 'SELECT ' . $this->cols . ' FROM ' . $this->table . \n ' WHERE\n category_id = :category_id \n LIMIT 0,1';\n\n // Prepare statement\n $stmt = $this->conn->prepare($query);\n\n // Bind params\n $stmt->bindParam(\":category_id\", $this->category_id);\n\n // Execute query\n $stmt->execute();\n // get row count\n $num = $stmt->rowCount();\n\n if ($num == 1) {\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n return $row;\n } else {\n return NULL;\n }\n }", "title": "" }, { "docid": "0e0f96924078558b2487d6da1f945efd", "score": "0.57244414", "text": "public function getRow();", "title": "" }, { "docid": "0e0f96924078558b2487d6da1f945efd", "score": "0.57244414", "text": "public function getRow();", "title": "" }, { "docid": "4e995541383044bfb39e12f9601b3fb0", "score": "0.57202977", "text": "public function fetchRow($result);", "title": "" }, { "docid": "938a26496aac961de681a184a9df12e9", "score": "0.5719675", "text": "function fetch_single($table,$field,$key,$value) {\n \t$sql = \"SELECT $field FROM $table WHERE $key = '$value' LIMIT 1\";\n\t$result = $GLOBALS['con']->query($sql);\n\tif ($result->num_rows > 0) {\n \t$data = $result->fetch_assoc();\n \treturn $data;\n\t}else{\n\t\treturn FALSE;\n\t}\t\n}", "title": "" }, { "docid": "aacfd05d2cc3d4b71f1140db36ba57bd", "score": "0.5713035", "text": "abstract public function fetchRow($res);", "title": "" }, { "docid": "ba3b8234b5e0528117085653f280c661", "score": "0.5712139", "text": "public function getManyRow($sql) {\n }", "title": "" }, { "docid": "61bd10aa39a56883b37018ae09e95a11", "score": "0.57114184", "text": "public function read_one($where = array(), $columns = '*', $debug = false)\n {\n $data = $this->db->get($this->table_name, $columns, $where);\n if($debug === true)\n return $this->db->last_query();\n\n return $data;\n }", "title": "" }, { "docid": "80ce7f0875739e9fcc43ac27a804c9dd", "score": "0.5704153", "text": "function get_cell ($db, $table, $column, $column2, $value) {\n $query=\"SELECT $column FROM $table WHERE $column2='$value'\";\n $result=$db->Execute($query);\n if ($result) {\n $out=$result->fields[0];\n }\n else {\n return false;\n }\n $result->MoveNext();\n if ($result->EOF) {\n return $out;\n }\n else {\n return false;\n }\n}", "title": "" }, { "docid": "fcc5060aafb6c4c349dd522f67f1e14f", "score": "0.56871116", "text": "public function select_single_assoc($table, $fields, $where){ return $this->s($table, $fields, $where, 'sa'); }", "title": "" }, { "docid": "eb2d450d2057d21580ca3917370d74be", "score": "0.56777596", "text": "function getSingle($table, $column, $value) {\n\n\t\t// SQL query\n\t\t$sql = \"SELECT * FROM \" . $table . \" WHERE \" . $column . \"='\" . $value . \"'\";\n\n\t\t// Check for errors\n\t\tif (!$this->result = $this->dbc->query($sql)) {\n\t\t\texit ('<strong>Error: </strong> Query Failed: (' . $this->dbc->errno . ') ' . $this->dbc->error . ' -- Query: ' . $sql);\n\t\t}\n\n\t\t// Get results\n\t\t$row = $this->result->fetch_assoc();\n\t\t\n\t\t$this->result->close();\n\t\t\n\t\t// Return results\n\t\treturn $row;\n\t}", "title": "" }, { "docid": "f894f06559ad27e420b61956b01c0a5a", "score": "0.56745553", "text": "public static function executeRow1($theQuery)\n {\n $result = self::query($theQuery);\n $row = $result->fetch_assoc();\n $n = $result->num_rows;\n $result->free();\n\n if (self::$ourMySql->more_results()) self::$ourMySql->next_result();\n\n if ($n!=1)\n {\n throw new ResultException('1', $n, $theQuery);\n }\n\n return $row;\n }", "title": "" }, { "docid": "2041fbdc3a6dbb39da3383944e7f2283", "score": "0.5671868", "text": "protected function queryColumn()\n {\n $this->select('tbl.id, tbl.name, tgs.project_id');\n }", "title": "" }, { "docid": "33b2dc53b0da4d90e53f6c768ca1d106", "score": "0.5667904", "text": "function select_row($cols, $table, $conditions='', $sort=''){\n\t\tif ($cols && $table) {\n\t\t\tglobal $mysqli;\n\t\t\t\n\t\t\tif (is_array($cols)) {\n\t\t\t\t$cols = implode(\", \", $cols);\n\t\t\t}\n\t\t\t\n\t\t\t$sql = \"SELECT \".$cols.\" FROM \".$table.($conditions ? \" WHERE \".$conditions : \"\").\" \".$sort.\" LIMIT 1\";\n\t\t\t\n\t\t\t$result = mysqli_query($mysqli, $sql);\n\t\t\t\n\t\t\tif (sql_error($result, $sql)){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$row = mysqli_num_rows($result) ? (mysqli_num_fields($result) > 1 ? mysqli_fetch_assoc($result) : mysqli_result($result, 0)) : false;\n\t\t\t\t\n\t\t\t\treturn $row;\t\t\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "86560e0891923e199ec99cd8f041c355", "score": "0.5660748", "text": "function queryRow(string $query, array $arguments): ?array\n {\n $result = \\pg_query_params($this->libpq, $query, $arguments);\n $row = \\pg_fetch_row($result);\n if ($row === FALSE)\n return NULL;\n return $row;\n }", "title": "" }, { "docid": "0e58eb9d762c7674b9e9a13d8f05af0e", "score": "0.56602865", "text": "function queryRow ($pdo, $sql, $debug=0){\r\n $rs = query($pdo, $sql, $debug);\r\n $row = $rs->fetch(PDO::FETCH_OBJ);\r\n return $row;\r\n}", "title": "" }, { "docid": "eeee154f940771255261f39db245b65c", "score": "0.5658098", "text": "function get_single_col_value($table,$col1,$val1,$select_col)\n{\n $ci= & get_instance();\n $ci->load->database();\n $ci->db->select($select_col);\n $ci->db->where($col1,$val1);\n $query=$ci->db->get($table);\n $count=$query->num_rows();\n $data = $query->row(); \n if($count > 0)\n {\n return $data->$select_col; \n }\n else\n {\n return NULL;\n }\n}", "title": "" }, { "docid": "add925ab85f131e1961f7a6edd40d741", "score": "0.5656221", "text": "abstract protected function query();", "title": "" }, { "docid": "bd07968e55e521d5471052a15e8656d0", "score": "0.5653844", "text": "public function single($query,$params = null)\n\t{\n\t\t$this->Init($query,$params);\n\t\treturn $this->sQuery->fetchColumn();\n\t}", "title": "" }, { "docid": "e892c51504bfcb9abc68d92b3883b847", "score": "0.5652957", "text": "public function row()\n\t{\n\t\treturn getRow($this->sql());\n\t}", "title": "" }, { "docid": "08393450d562450a94d76ef7d684eb10", "score": "0.56394017", "text": "abstract protected function get_rows();", "title": "" }, { "docid": "93089495284ee4f9c3aa8c9b53d3c5bd", "score": "0.5634125", "text": "function query($params = array(), $mode = ResultSet::FETCHMODE_NUM);", "title": "" }, { "docid": "7cd1d4880bb5db476b0b70f44f3231b2", "score": "0.563343", "text": "abstract function get_one($query);", "title": "" }, { "docid": "c659684a0730954f4677e11c437e73d9", "score": "0.56323236", "text": "public function cell($row=0, $column=0) {\n\t\tif (!$this->result) return false;\n\t\t@odbc_fetch_row($this->result, $this->row);\n\t\treturn @odbc_result($this->result, $column);\n\t}", "title": "" }, { "docid": "1743f3cfe3505e33e3570ba49528f260", "score": "0.56314254", "text": "public function select($column);", "title": "" }, { "docid": "dbf805f389422c11e0a6f6dfe45f5d26", "score": "0.56272775", "text": "public function find()\n\t{\n\t\t$args = func_get_args();\n\t\t$keyCols = $this->getKeyColumns();\n\t\t\n\t\tif (count($args) != count($keyCols)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$sel = $this->select();\n\t\t$i = 0;\n\t\tforeach ($keyCols as $col) {\n\t\t\t$sel->where($col, $args[$i]);\n\t\t\t$i++;\n\t\t}\n\t\t$row = $sel->fetchRow();\n\t\t\n\t\treturn $row;\n\t}", "title": "" }, { "docid": "9c3e99bc498c2a3b748ae4955ea0a170", "score": "0.5626745", "text": "function db_getrow($query, array $params=null) {\nreturn MSLDB::getActiveConnection()->getrow($query, $params); }", "title": "" }, { "docid": "12750d0ccae785fe854bad3b05a67c81", "score": "0.5626593", "text": "function exec_query_simple($query, $column, $params = array())\n {\n $this->lastResults = $this->exec_query($query, $params);\n\n if (!(@odbc_fetch_row($this->lastResults)))\n return null;\n\n return odbc_result($this->lastResults, $column);\n\n }", "title": "" }, { "docid": "d75449b1ffc21598f397d695b1a203cc", "score": "0.5614653", "text": "function select_from_where_and($array, $table, $column1, $value1, $column2, $value2)\n {\n $values = implode(\",\", $array);\n $query = \"SELECT \" . $values . \" FROM \" . $table . \" WHERE \" . $column1 . \" = '\" . $value1 . \"' AND \" . $column2 . \" = '\" . $value2 . \"';\";\n\n // Execute Query\n $result_set = $this->query($query);\n\n // Return Results\n while ($row = mysqli_fetch_array($result_set, MYSQL_ASSOC)) $rows[] = $row;\n return $rows;\n }", "title": "" }, { "docid": "e3ab3b6f026dba6705ee9735cab2297b", "score": "0.56111443", "text": "function get_single_row($table){\n$an_Array= array();\n$result = select_all($table);\nif ($result->num_rows > 0) {\n// output data of first row\n$row = $result->fetch_assoc();\nreturn $row;\n}else {\nreturn null;\ndebug_to_console(\"0 rows found in \".$table);\n}\n}", "title": "" }, { "docid": "1b7f9a6d4ad4b59d7c2d2c3db1507f3a", "score": "0.56097966", "text": "function get_record()\n\t{\n\t\tglobal $app;\n\t\t$db = new db();\n\t\t$args = func_get_args();\n\t\tswitch (func_num_args()):\n\t\t\tcase 2:\n\t\t\t\t$sql = \"select * from \".$app['table'][$args[0]].\" where $args[1] limit 1\";\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$sql = \"select * from \".$app['table'][$args[0]].\" where $args[1] = '$args[2]' limit 1\";\n\t\t\t\tbreak;\n\t\tendswitch;\n\t\tif (!stristr($sql,\"union\")){\t\t\t\n\t\t\t$db->query($sql, $rs, $nr);\n\t\t}\n \tif ($nr){\n \t $record = $db->fetch($rs);\n \t}else{\n \t $record[0] = \"\";\n \t}\n\t\t//print_r($rs);exit;\n\t\tmysqli_free_result($rs);\n \treturn $record;\n\t}", "title": "" }, { "docid": "f6f6dc0ebc49e7e68e5201e5a03ecf49", "score": "0.5607079", "text": "public static function select_single_row ($query, $values)\n\t{\n\t\tif(!is_array($values))\n\t\t\t$values = Array($values);\n\t\t$db = self::connect();\n\t\t$stmt = $db->prepare($query);\n\t\t$stmt->execute($values);\n\t\t$result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\treturn empty($result) ? false : $result[0];\n\t}", "title": "" }, { "docid": "7927f7426a4b289da1e69ddd07daf92c", "score": "0.55982816", "text": "function fetch($query) {\n if (is_blank($query))\n return null;\n $this->consulta($query);\n $numFilas = $this->numfilas();\n $numCols = $this->numcampos();\n if ($numFilas == 0)\n return null;\n\n $results = array();\n if ($numCols == 1) {\n if ($numFilas == 1)\n return $this->valcampo(0, 0);\n for ($i = 0; $i < $numFilas; $i++)\n $results[] = $this->valcampo($i, 0);\n return $results;\n }\n if ($numFilas == 1) {\n while ($result = pg_fetch_assoc($this->result_query))\n $results = array_merge($results, $result);\n return $results;\n }\n\n while ($result = pg_fetch_assoc($this->result_query))\n $results[] = $result;\n\n return $results;\n }", "title": "" }, { "docid": "cf344468ca7b34737e08966031b303c8", "score": "0.558844", "text": "public function values_col()\n\t{\n\t\t$arguments = func_get_args();\n\t\t$sth = call_user_func_array(array($this, 'query'), $arguments);\n\t\treturn $sth->fetchAll(\\PDO::FETCH_COLUMN);\n\t}", "title": "" }, { "docid": "8cf38f4c3b1ba42e7583bc9e4c373ee3", "score": "0.55813885", "text": "function GetRow($sql) {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "ff2a5525397cadfc2fad368e4c5cfe2b", "score": "0.5580242", "text": "abstract public function fetchRow($result);", "title": "" }, { "docid": "c2ba71affacab8bdeed732a44c77e210", "score": "0.5575018", "text": "public function getrow($where,$whereval,$table) {\n // use prepare statement\n $bind = array(\n \":whereval\" => \"$whereval\"\n );\n //\n $mwhere = $where .\"=:whereval LIMIT 1\";\n $fres = $this->select($table,$mwhere,$bind);\n $fieldval = array();\n if(FALSE !== $fres && !empty($fres)){\n foreach ($fres as $ffv) {\n $fieldval = $ffv;\n }\n return $fieldval;\n }\n else{\n return false;\n }\n }", "title": "" }, { "docid": "86c15f69d257fffff345f7fd3e8f9db7", "score": "0.5566186", "text": "public function firstOrFail($columns = ['*']);", "title": "" }, { "docid": "87f8c3d24fa1794261d1be2719c9224e", "score": "0.55653185", "text": "public function single($query, $params = null)\n {\n $this->Init($query, $params);\n $result = $this->query->fetchColumn();\n $this->query->closeCursor(); \n return $result;\n }", "title": "" }, { "docid": "3bf66786b361af9fc7490dae2b40ca7b", "score": "0.5565212", "text": "abstract function fetchRow($result);", "title": "" } ]
c25d8fcd55541de2a96fdf5b5ff0910f
Import the back end user object
[ { "docid": "04db896c6ab4d63b91d106056a51c07d", "score": "0.68454593", "text": "public function __construct()\n {\n parent::__construct();\n $this->import('BackendUser', 'User');\n }", "title": "" } ]
[ { "docid": "e988f64490b99b2f6eb54c81f75fc8a3", "score": "0.6925295", "text": "public function __construct()\r\n {\r\n parent::__construct();\r\n $this->import('BackendUser', 'User');\r\n }", "title": "" }, { "docid": "0bf1f101aa9a8afe19accee328bd9f29", "score": "0.6921685", "text": "public function __construct() {\n parent::__construct();\n $this->import('BackendUser', 'User');\n }", "title": "" }, { "docid": "96e5daf71cb7da980ff49c3d150e52e6", "score": "0.68503207", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->import('BackendUser','User');\n\t}", "title": "" }, { "docid": "5187452a84d32c9364c2cd1808426cf5", "score": "0.6845306", "text": "public function __construct()\n {\n parent::__construct();\n $this->import('Contao\\BackendUser', 'User');\n }", "title": "" }, { "docid": "f7ce3ef89f6d0e807410e5b289c39dcb", "score": "0.68251777", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this -> import('BackendUser', 'User');\n\t}", "title": "" }, { "docid": "3349c8c352378d0befd5a042fe9b76f6", "score": "0.6756915", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->import('BackendUser', 'User');\n\t}", "title": "" }, { "docid": "3349c8c352378d0befd5a042fe9b76f6", "score": "0.6756915", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->import('BackendUser', 'User');\n\t}", "title": "" }, { "docid": "3349c8c352378d0befd5a042fe9b76f6", "score": "0.6756915", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->import('BackendUser', 'User');\n\t}", "title": "" }, { "docid": "3349c8c352378d0befd5a042fe9b76f6", "score": "0.6756915", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->import('BackendUser', 'User');\n\t}", "title": "" }, { "docid": "3349c8c352378d0befd5a042fe9b76f6", "score": "0.6756915", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->import('BackendUser', 'User');\n\t}", "title": "" }, { "docid": "3349c8c352378d0befd5a042fe9b76f6", "score": "0.6756915", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->import('BackendUser', 'User');\n\t}", "title": "" }, { "docid": "3349c8c352378d0befd5a042fe9b76f6", "score": "0.6756915", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->import('BackendUser', 'User');\n\t}", "title": "" }, { "docid": "3349c8c352378d0befd5a042fe9b76f6", "score": "0.6756915", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->import('BackendUser', 'User');\n\t}", "title": "" }, { "docid": "3349c8c352378d0befd5a042fe9b76f6", "score": "0.6756915", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->import('BackendUser', 'User');\n\t}", "title": "" }, { "docid": "3349c8c352378d0befd5a042fe9b76f6", "score": "0.6756915", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->import('BackendUser', 'User');\n\t}", "title": "" }, { "docid": "3349c8c352378d0befd5a042fe9b76f6", "score": "0.6756915", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->import('BackendUser', 'User');\n\t}", "title": "" }, { "docid": "3349c8c352378d0befd5a042fe9b76f6", "score": "0.6756915", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->import('BackendUser', 'User');\n\t}", "title": "" }, { "docid": "3349c8c352378d0befd5a042fe9b76f6", "score": "0.6756915", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->import('BackendUser', 'User');\n\t}", "title": "" }, { "docid": "3349c8c352378d0befd5a042fe9b76f6", "score": "0.6756915", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->import('BackendUser', 'User');\n\t}", "title": "" }, { "docid": "3349c8c352378d0befd5a042fe9b76f6", "score": "0.6756915", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->import('BackendUser', 'User');\n\t}", "title": "" }, { "docid": "3349c8c352378d0befd5a042fe9b76f6", "score": "0.6756915", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->import('BackendUser', 'User');\n\t}", "title": "" }, { "docid": "3349c8c352378d0befd5a042fe9b76f6", "score": "0.6756915", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->import('BackendUser', 'User');\n\t}", "title": "" }, { "docid": "3349c8c352378d0befd5a042fe9b76f6", "score": "0.6756915", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->import('BackendUser', 'User');\n\t}", "title": "" }, { "docid": "3349c8c352378d0befd5a042fe9b76f6", "score": "0.6756915", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->import('BackendUser', 'User');\n\t}", "title": "" }, { "docid": "3349c8c352378d0befd5a042fe9b76f6", "score": "0.6756915", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->import('BackendUser', 'User');\n\t}", "title": "" }, { "docid": "3349c8c352378d0befd5a042fe9b76f6", "score": "0.6756915", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->import('BackendUser', 'User');\n\t}", "title": "" }, { "docid": "3349c8c352378d0befd5a042fe9b76f6", "score": "0.6756915", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->import('BackendUser', 'User');\n\t}", "title": "" }, { "docid": "2426f96df16b8e9f4b8fd09f606eee8d", "score": "0.6413001", "text": "public function import()\n {\n \n }", "title": "" }, { "docid": "edc602d02f8e996a319fa14e71c57087", "score": "0.6406263", "text": "public function load() {\n\n if (strlen($this->name) > 0 && $this->exists) {\n $this->loadJSON();\n if (isset($this->json->roles)) {\n $this->roles = (array)$this->json->roles;\n }\n if (isset($this->json->password)) {\n $this->setPassword($this->json->password);\n }\n if (isset($this->json->email)) {\n $this->setEmail($this->json->email);\n }\n if (isset($this->json->first_name)) {\n $this->setFirstName($this->json->first_name);\n }\n if (isset($this->json->last_name)) {\n $this->setLastName($this->json->last_name);\n }\n }\n\n $vars = array('user' => &$this);\n $this->env->hook('user_load', $vars);\n }", "title": "" }, { "docid": "9206b96907c85ec8197fb8e221359651", "score": "0.63644564", "text": "public function import()\n {\n return view('theme.backoffice.pages.user.import');\n }", "title": "" }, { "docid": "9e32fbbd2cfd07cc5cce36d91405945c", "score": "0.63315564", "text": "protected function load()\n {\n $this->setObject(user_load($this->object->uid));\n }", "title": "" }, { "docid": "c373186c073b715d59c5394229035533", "score": "0.6222777", "text": "public function import()\n {\n }", "title": "" }, { "docid": "a114e206af09e3e11cb35245136422b6", "score": "0.62012863", "text": "protected function importUser($user)\n\t{\n\t\t$data = [\n\t\t\t'id' => $user->id,\n\t\t\t'firstname' => $user->firstName,\n\t\t\t'surname' => $user->surname,\n\t\t\t'age' => $user->age,\n\t\t\t'gender' => $user->gender\n\t\t];\n\n\t\t$newUser = $this->user->newInstance();\n\t\t$newUser->fill($data);\n\t\t$newUser->save();\n\n\t\t$this->info(\"Imported user {$newUser->id}.\");\n\n\t\tunset($newUser);\n\t}", "title": "" }, { "docid": "dabdecd764339c39d075540b27b4cd20", "score": "0.61952966", "text": "public function __construct()\n {\n parent::__construct();\n $this->import('BackendUser', 'User');\n $this->pluginService = System::getContainer()->get('editor_plugin_service');\n }", "title": "" }, { "docid": "f0335b690529a672c50fa0e2f401f5ef", "score": "0.6094631", "text": "protected function importResultUser()\n\t{\n\t\tglobal $DIC;\n\n\t\t$tabs = $DIC->tabs();\n\t\t$tpl = $DIC->ui()->mainTemplate();\n\n\t\t$this->setSubTabs();\n\t\t$tabs->activateTab(self::TAB_IMPORT);\n\t\t$tabs->activateSubTab(self::SUBTAB_IMPORT_USR);\n\n\t\t$table = new ilVedaUserImportResultTableGUI($this, __FUNCTION__);\n\t\t$table->init();\n\t\t$table->parse();\n\n\t\t$tpl->setContent($table->getHTML());\n\t}", "title": "" }, { "docid": "684fefdae832bbc22b26588e20c7ea02", "score": "0.60288966", "text": "function user()\n\t{\n\t\t $data['author'] = $this->admin_model->dataadmin();\n \t$this->template->load('adminweb/media','adminweb/mod_user/user',$data);\n\t}", "title": "" }, { "docid": "fbab0a47acfde24947e5299bc0cf392d", "score": "0.5961306", "text": "public function user();", "title": "" }, { "docid": "fbab0a47acfde24947e5299bc0cf392d", "score": "0.5961306", "text": "public function user();", "title": "" }, { "docid": "fbab0a47acfde24947e5299bc0cf392d", "score": "0.5961306", "text": "public function user();", "title": "" }, { "docid": "fbab0a47acfde24947e5299bc0cf392d", "score": "0.5961306", "text": "public function user();", "title": "" }, { "docid": "fbab0a47acfde24947e5299bc0cf392d", "score": "0.5961306", "text": "public function user();", "title": "" }, { "docid": "fbab0a47acfde24947e5299bc0cf392d", "score": "0.5961306", "text": "public function user();", "title": "" }, { "docid": "fbab0a47acfde24947e5299bc0cf392d", "score": "0.5961306", "text": "public function user();", "title": "" }, { "docid": "6d36be790ae9b495d77689ced2b3cd1b", "score": "0.5904137", "text": "public function init()\n {\n $this->user = new Hb_User();\n }", "title": "" }, { "docid": "0849144dc54c4b02386bee6664ec279c", "score": "0.5901838", "text": "public function import(){\n\t\tif(!$this->hasPermission && !$this->user->isAdmin) {\n $this->load->view('errors/forbidden.php');\n return;\n }\n\n\t\t$data['user'] = $this->user;\n $data['settings'] = $this->userModel->getSettings();\n $data['hasPermission'] = $this->hasPermission;\n\n //loading views\n $data['title'] = 'Import';\n $data['active'] = 'Contacts';\n\t\t$this->load->view('partials/head', $data);\n\t\t$this->load->view('partials/navbar', $data);\n $this->load->view('emails/contact_import');\n\t}", "title": "" }, { "docid": "9d358d8026ec4544dd1b6bfeef4d9813", "score": "0.58426774", "text": "abstract public function import ( );", "title": "" }, { "docid": "901bd35d4298e8576ec84d6ac934af43", "score": "0.5799098", "text": "public function user()\n {\n }", "title": "" }, { "docid": "16d63a72b468a37ae546bef7ebea37f7", "score": "0.57956165", "text": "private function load_data()\r\n\t{\r\n\t\t$user_data = (unserialize($this->get_user_data($this)));\r\n\t\tif($user_data) $this->user_data = $user_data;\r\n\t}", "title": "" }, { "docid": "788618db8a84dbf9a24dbbc8292075cf", "score": "0.5784302", "text": "function lobby_admin_import()\n{\n \t// load handler class\n\tLoader::requireOnce('modules/lobby/includes/classes/admin/import.php');\n\n // Security check\n if (!SecurityUtil::checkPermission('lobby::', '::', ACCESS_ADMIN)) return LogUtil::registerPermissionError();\n\n\t// Create output and call handler class\n\t$render = FormUtil::newpnForm('lobby');\n\n // Return the output\n return $render->pnFormExecute('lobby_admin_import.htm', new lobby_admin_importHandler());\n}", "title": "" }, { "docid": "b6c85201599b4927d678d741c89365b2", "score": "0.57772046", "text": "public function __construct($user) {\n\t\t$this->user = ModelRegistry::loadModel('User', $user);\n\t}", "title": "" }, { "docid": "87c2d8859cd080df095981cef2c9f059", "score": "0.57252437", "text": "static public function __loader_user_objects($userobj)\r\n\t\t{\r\n\t\t\tif(strpos($userobj, '_'))\r\n\t\t\t{\r\n\t\t\t\t$file = APP_PATH.'Core/UserObjects/'.str_replace('_', '/', $userobj).'.php';\r\n\t\t\t\tif(is_file($file))\r\n\t\t\t\t{\r\n\t\t\t\t\trequire_once($file);\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$file = APP_PATH.'Core/UserObjects/'.$userobj.'.php';\r\n\t\t\t\tif(is_file($file))\r\n\t\t\t\t{\r\n\t\t\t\t\trequire_once($file);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "1c1fa71dc0813eabef5caf498338cff8", "score": "0.5704146", "text": "private function getUserData(){\n\t\ttry{\n\t\t\t$model = new UserModel();\n\t\t\t$user = $model -> getData($_SESSION['neozorus']['u_id']);\n\t\t\t$this->user = $user[0];\n\t\t}\n\t\tcatch(Exception $e){\n\t\t\t$controller = new ErrorController();\n\t\t\t$controller->error($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "7e812c5eb5890fb01bd40bf16102004f", "score": "0.5684216", "text": "public function setup()\n {\n CRUD::setModel(\\App\\Models\\User::class);\n CRUD::setRoute(config('backpack.base.route_prefix') . '/user');\n CRUD::setEntityNameStrings('user', 'users');\n $this->crud->enableExportButtons();\n\n\n }", "title": "" }, { "docid": "2c552548c2e74003c1bee18e60bc8668", "score": "0.56793934", "text": "function User()\n {\n parent::Model();\n }", "title": "" }, { "docid": "af4f1d8d820bebe7803fc50ecf88a79b", "score": "0.5675197", "text": "protected function _initUserObject()\n {\n $userClassID = $this->_ini->variable( 'UserSettings', 'UserClassID' );\n $userCreatorID = $this->_ini->variable( 'UserSettings', 'UserCreatorID' );\n $defaultSectionID = $this->_ini->variable( 'UserSettings', 'DefaultSectionID' );\n $class = eZContentClass::fetch( $userClassID );\n $contentObject = $class->instantiate( $userCreatorID, $defaultSectionID );\n $contentObject->store();\n\n return $contentObject;\n }", "title": "" }, { "docid": "36517c09409d5cd69b02d7750c9a9858", "score": "0.56746143", "text": "function importUsers() {\n\t\tif ($this->hasOption('verbose')) {\n\t\t\tprintf(\"Importing users\\n\");\n\t\t}\n\n\t\t$userDao = &DAORegistry::getDAO('UserDAO');\n\t\t$roleDao = &DAORegistry::getDAO('RoleDAO');\n\t\t$notifyDao = &DAORegistry::getDAO('NotificationStatusDAO');\n\n\t\t$result = &$this->importDao->retrieve('SELECT *, DECODE(chPassword, ?) AS chPassword FROM tblusers ORDER BY nUserID', $this->journalConfigInfo['chPasswordSalt']);\n\t\twhile (!$result->EOF) {\n\t\t\t$row = &$result->fields;\n\n\t\t\t$chFirstName = Core::cleanVar($row['chFirstName']);\n\t\t\t$chMiddleInitial = Core::cleanVar($row['chMiddleInitial']);\n\t\t\t$chSurname = Core::cleanVar($row['chSurname']);\n\n\t\t\t$initials = substr($chFirstName, 0, 1) . (empty($chMiddleInitial) ? '' : substr($chMiddleInitial, 0, 1)) . substr($chSurname, 0, 1);\n\t\t\t$interests = '';\n\n\t\t\tif ($row['fkEditorID']) {\n\t\t\t\t$tmpResult = &$this->importDao->retrieve('SELECT chInitials, nEditorRole FROM tbleditors WHERE nEditorID = ?', $row['fkEditorID']);\n\t\t\t\t$initials = Core::cleanVar($tmpResult->fields[0]);\n\t\t\t\t$editorRole = Core::cleanVar($tmpResult->fields[1]);\n\t\t\t\t$tmpResult->Close();\n\t\t\t}\n\n\t\t\tif ($row['fkReviewerID']) {\n\t\t\t\t$tmpResult = &$this->importDao->retrieve('SELECT chInterests FROM tblreviewers WHERE nReviewerID = ?', $row['fkReviewerID']);\n\t\t\t\t$interests = Core::cleanVar($tmpResult->fields[0]);\n\t\t\t\t$tmpResult->Close();\n\t\t\t}\n\n\t\t\t// Get username, email and transliterate to ASCII\n\t\t\timport('core.Transcoder');\n\t\t\t$trans =& new Transcoder('UTF-8', 'ASCII', true);\n\t\t\t$username = $trans->trans(Core::cleanVar($row['chUsername']));\n\t\t\t$email = $trans->trans(Core::cleanVar($row['chEmail']));\n\n\t\t\t// Check for existing user with this username\n\t\t\t$user = $userDao->getUserByUsername($username);\n\t\t\t$existingUser = ($user != null);\n\n\t\t\tif (!isset($user)) {\n\t\t\t\t// Create new user\n\t\t\t\t$user = &new User();\n\t\t\t\t$user->setUsername($username);\n\t\t\t\t$user->setPassword(Validation::encryptCredentials($username, Core::cleanVar($row['chPassword'])));\n\t\t\t\t$user->setFirstName(Core::cleanVar($row['chFirstName']));\n\t\t\t\t$user->setMiddleName(Core::cleanVar($row['chMiddleInitial']));\n\t\t\t\t$user->setInitials(Core::cleanVar($initials));\n\t\t\t\t$user->setLastName(Core::cleanVar($row['chSurname']));\n\t\t\t\t$user->setAffiliation(Core::cleanVar($row['chAffiliation']));\n\t\t\t\t$user->setEmail($email);\n\t\t\t\t$user->setPhone(Core::cleanVar($row['chPhone']));\n\t\t\t\t$user->setFax(Core::cleanVar($row['chFax']));\n\t\t\t\t$user->setMailingAddress(Core::cleanVar($row['chMailAddr']));\n\t\t\t\t$user->setBiography(Core::cleanVar($row['chBiography']), Locale::getLocale());\n\t\t\t\t$user->setInterests(Core::cleanVar($interests), Locale::getLocale());\n\t\t\t\t$user->setLocales(array());\n\t\t\t\t$user->setDateRegistered($row['dtDateSignedUp']);\n\t\t\t\t$user->setDateLastLogin($row['dtDateSignedUp']);\n\t\t\t\t$user->setMustChangePassword(0);\n\t\t\t\t$user->setDisabled(0);\n\n\t\t\t\t$otherUser =& $userDao->getUserByEmail($email);\n\t\t\t\tif ($otherUser !== null) {\n\t\t\t\t\t// User exists with this email -- munge it to make unique\n\t\t\t\t\t$user->setEmail('ojs-' . $username . '+' . $email);\n\t\t\t\t\t$this->conflicts[] = array(&$otherUser, &$user);\n\t\t\t\t}\n\t\t\t\tunset($otherUser);\n\n\t\t\t\t$userDao->insertUser($user);\n\t\t\t}\n\t\t\t$userId = $user->getUserId();\n\n\t\t\tif ($row['bNotify']) {\n\t\t\t\tif ($existingUser) {\n\t\t\t\t\t// Just in case\n\t\t\t\t\t$notifyDao->setJournalNotifications($this->journalId, $userId, 0);\n\t\t\t\t}\n\t\t\t\t$notifyDao->setJournalNotifications($this->journalId, $userId, 1);\n\t\t\t}\n\n\t\t\tif ($row['fkEditorID']) {\n\t\t\t\t$role = &new Role();\n\t\t\t\t$role->setJournalId($this->journalId);\n\t\t\t\t$role->setUserId($userId);\n\t\t\t\tswitch ($editorRole) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\t$role->setRoleId(ROLE_ID_EDITOR);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\t$role->setRoleId(ROLE_ID_SECTION_EDITOR);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\t$role->setRoleId(ROLE_ID_JOURNAL_MANAGER);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\t$role->setRoleId(ROLE_ID_LAYOUT_EDITOR);\n\t\t\t\t\t\t$this->journalLayoutUserId = $userId; // Assume one LE per journal, as per OJS 1.x semantics\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (!$existingUser || !$roleDao->roleExists($role->getJournalId(), $role->getUserId(), $role->getRoleId())) {\n\t\t\t\t\t$roleDao->insertRole($role);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($row['fkAuthorID']) {\n\t\t\t\t$role = &new Role();\n\t\t\t\t$role->setJournalId($this->journalId);\n\t\t\t\t$role->setUserId($userId);\n\t\t\t\t$role->setRoleId(ROLE_ID_AUTHOR);\n\t\t\t\tif (!$existingUser || !$roleDao->roleExists($role->getJournalId(), $role->getUserId(), $role->getRoleId())) {\n\t\t\t\t\t$roleDao->insertRole($role);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($row['fkReviewerID']) {\n\t\t\t\t$role = &new Role();\n\t\t\t\t$role->setJournalId($this->journalId);\n\t\t\t\t$role->setUserId($userId);\n\t\t\t\t$role->setRoleId(ROLE_ID_REVIEWER);\n\t\t\t\tif (!$existingUser || !$roleDao->roleExists($role->getJournalId(), $role->getUserId(), $role->getRoleId())) {\n\t\t\t\t\t$roleDao->insertRole($role);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($row['fkCopyEdID']) {\n\t\t\t\t$role = &new Role();\n\t\t\t\t$role->setJournalId($this->journalId);\n\t\t\t\t$role->setUserId($userId);\n\t\t\t\t$role->setRoleId(ROLE_ID_COPYEDITOR);\n\t\t\t\tif (!$existingUser || !$roleDao->roleExists($role->getJournalId(), $role->getUserId(), $role->getRoleId())) {\n\t\t\t\t\t$roleDao->insertRole($role);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($row['fkProofID']) {\n\t\t\t\t$role = &new Role();\n\t\t\t\t$role->setJournalId($this->journalId);\n\t\t\t\t$role->setUserId($userId);\n\t\t\t\t$role->setRoleId(ROLE_ID_PROOFREADER);\n\t\t\t\tif (!$existingUser || !$roleDao->roleExists($role->getJournalId(), $role->getUserId(), $role->getRoleId())) {\n\t\t\t\t\t$roleDao->insertRole($role);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($row['fkReaderID']) {\n\t\t\t\t$role = &new Role();\n\t\t\t\t$role->setJournalId($this->journalId);\n\t\t\t\t$role->setUserId($userId);\n\t\t\t\t$role->setRoleId(ROLE_ID_READER);\n\t\t\t\tif (!$existingUser || !$roleDao->roleExists($role->getJournalId(), $role->getUserId(), $role->getRoleId())) {\n\t\t\t\t\t$roleDao->insertRole($role);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->userMap[$row['nUserID']] = $userId;\n\t\t\t$this->userCount++;\n\t\t\t$result->MoveNext();\n\t\t\tunset($user);\n\t\t}\n\t\t$result->Close();\n\t}", "title": "" }, { "docid": "f4699b93297601a22c9430111b450393", "score": "0.5672375", "text": "public static function getUser()\n {\n \t$path = dirname(__FILE__).DS.'user.php';\n \t\tif (file_exists($path))\n \t\t{\n \t\t\tinclude_once $path;\n \t\t\t$instance = new User;\n \t\t}\n return $instance;\n }", "title": "" }, { "docid": "705eab8335796bed53b020681da298b0", "score": "0.5667757", "text": "public function import()\n {\n // Check for request forgeries\n JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\n $app = JFactory::getApplication();\n\n $model = $this->getModel();\n\n $result = $model->import();\n\n // Get redirect URL\n $redirect_url = JRoute::_('index.php?option=com_jce&view=profiles', false);\n\n // Push message queue to session because we will redirect page by Javascript, not $app->redirect().\n // The \"application.queue\" is only set in redirect() method, so we must manually store it.\n $app->getSession()->set('application.queue', $app->getMessageQueue());\n\n header('Content-Type: application/json');\n\n echo new JResponseJson(array('redirect' => $redirect_url), \"\", !$result);\n\n exit();\n }", "title": "" }, { "docid": "798c6d5167b8768957e3a060bf81d48d", "score": "0.56641304", "text": "public function startup()\n\t{\n\t\tparent::startup();\n\n\t\tif ($this->user->isLoggedIn())\n\t\t{\n\t\t\t$this->userEntity = $this->orm->users->getById($this->user->id);\n\t\t}\n\t}", "title": "" }, { "docid": "57209db910703f67b552a1571eb99162", "score": "0.5650889", "text": "public function import()\n {\n $this->_strategy->import();\n }", "title": "" }, { "docid": "4f8755371116c20c8ba55974bfee8933", "score": "0.56505907", "text": "public function __construct() {\n //parent::__construct(MigrateGroup::getInstance('UserMigrate'));\n parent::__construct();\n\n $this->description = t('Import an CSV-file (only \"Account\"-fields)');\n $columns = array(\n // \"Source\": ('Fieldname', 'Description')\n 0 => array('id', t('Member-ID (must be unique)')),\n 1 => array('first_name', t('First Name')),\n 2 => array('last_name', t('Last Name')),\n 3 => array('email', t('Email (Account)')),\n 4 => array('name', t('Full Name')),\n 5 => array('created', t('Created'))\n );\n // TIP: delete \", array('header_rows' => 1)\" in the next line, when the CSV-file has NO header-line\n $this->source = new MigrateSourceCSV(DRUPAL_ROOT . '/' . drupal_get_path('module', 'importusers') . '/data_sources/drupaluser_import.csv', $columns, array('header_rows' => 1));\n $this->destination = new MigrateDestinationUser();\n $this->map = new MigrateSQLMap($this->machineName,\n array('id' => array( // this field is used to connect user und profile2\n 'type' => 'int',\n 'unsigned' => TRUE,\n 'not null' => TRUE,\n 'description' => t('User\\'s ID') // description never used\n )\n ),\n MigrateDestinationUser::getKeySchema()\n );\n\n // Mapped fields\n //\n $this->addSimpleMappings(array('name', 'created'));\n $this->addFieldMapping('mail', 'email')\n ->defaultValue('[email protected]');\n $this->addFieldMapping('field_firstname', 'first_name')\n ->defaultValue('');\n $this->addFieldMapping('field_lastname', 'last_name')\n ->defaultValue('');\n $this->addFieldMapping('password')\n ->defaultValue('asdf');\n $this->addFieldMapping('is_new')\n ->defaultValue(TRUE);\n $this->addFieldMapping('roles')\n ->defaultValue(2); // 2 = \"authenticated user\"\n $this->addFieldMapping('theme')\n ->defaultValue('');\n $this->addFieldMapping('signature')\n ->defaultValue('');\n $this->addFieldMapping('signature_format')\n ->defaultValue('filtered_html');\n $this->addFieldMapping('access')\n ->defaultValue(0);\n $this->addFieldMapping('login')\n ->defaultValue(0);\n $this->addFieldMapping('status')\n ->defaultValue(1);\n $this->addFieldMapping('timezone')\n ->defaultValue(NULL);\n $this->addFieldMapping('language')\n ->defaultValue(t('en')); // e.g.: 'en', 'fr', 'de', ...\n $this->addFieldMapping('picture')\n ->defaultValue(0);\n $this->addFieldMapping('init', 'mail');\n \n // Other handlers\n $this->addFieldMapping('path')\n ->defaultValue(NULL);\n $this->addFieldMapping('pathauto')\n ->defaultValue(''); // Perform aliasing (set to 0 to prevent alias generation during migration)\n }", "title": "" }, { "docid": "1f13ea49225178fbdcb9d7ced790da8a", "score": "0.56322604", "text": "function __construct() {\r\n\t\t$imports = array(\r\n\t\t\t\"session\" => array(\r\n\t\t\t\t\"type\" => qoob_types::core, \r\n\t\t\t\t\"class\" => \"dbsession\", \r\n\t\t\t\t\"dir\" => \"users/\"));\r\n\t\tparent::__construct($imports);\r\n\t}", "title": "" }, { "docid": "8e75cf97694905c08f03a66659166afd", "score": "0.5597075", "text": "protected function _construct()\n {\n \t$this->_modulePath = getcwd().'/generated/app/code/local/';\n $this->_init('mve/user');\n }", "title": "" }, { "docid": "b815e9b5043d6d56c8abb9d1516cd4c9", "score": "0.55956054", "text": "public function getEntityUserModel(UserInterface $user);", "title": "" }, { "docid": "b408870316d40050c9ae7b05edddc72f", "score": "0.5588749", "text": "public function testImportUser() {\n //We need an admin to log in...\n $this->drupalLogin($this->user);\n\n //Make sure we can go to the user import form\n $this->drupalGet('/admin/people/import');\n $this->assertResponse(200);\n\n $this->drupalPostForm(NULL, array(\n 'search' => 'test'\n ), t('Search'));\n $this->assertText('Records Found. Select a user to import.', 'Able to search for a user');\n\n $this->drupalPostForm(NULL, array(\n 'uid' => 'test-user2'\n ), t('Import Selected User'));\n $this->assertText('imported test-user2', 'able to import a user');\n\n $this->assertTrue(preg_match('/user\\/(\\d)\\/edit/', $this->getUrl()), 'Should take you to the edit page for the new user');\n }", "title": "" }, { "docid": "75fe94cc80a61b01790a8cbebba64e26", "score": "0.55882716", "text": "protected function _loadUser()\n {\n if (empty($this->_id)) {\n throw new UnexpectedValueException('no user id given, can\\'t load user');\n }\n\n $userModel = new Application_Model_Db_Gitosis_Users();\n $userData = $userModel->getById($this->_id);\n\n if (!empty($userData)) {\n $this->_originData = $userData;\n\n foreach ($userData as $fieldName => $fieldValue) {\n switch ($fieldName) {\n case 'gitosis_user_id':\n $this->_id = intval($fieldValue);\n break;\n\n case 'gitosis_user_name':\n $this->setName($fieldValue);\n break;\n\n case 'gitosis_user_email':\n $this->setMailAdress($fieldValue);\n break;\n\n case 'gitosis_user_ssh_key':\n $this->setSshKey($fieldValue);\n break;\n\n default:\n Zend_Registry::get('Zend_Log')->warn('field \"' . $fieldName . '\" ignored while loading user');\n break;\n }\n }\n } else {\n $this->_id = null;\n }\n }", "title": "" }, { "docid": "05f0ee8b7ce7c45a893855460cc66080", "score": "0.5582678", "text": "function user_init() {\n global $user;\n $account = session_get('user');\n if (is_object($account)) {\n $user = $account;\n }\n}", "title": "" }, { "docid": "89fe34481865fa61a23a9fd8390d662a", "score": "0.5578642", "text": "abstract public function getUser();", "title": "" }, { "docid": "b3df3cf6561dfb9dae2c557af61d8790", "score": "0.5576799", "text": "public function formAdd(){\n $infoUser = new UserModel();\n require_once('views/user/formUser.php');\n }", "title": "" }, { "docid": "22d33b1fdc7a19636d131e3c66709c7e", "score": "0.5575802", "text": "function load_user_data () {\n\t\t\t$user = get_option( $this->plugin_prefix . 'username' );\n\t\t\t$pass = get_option( $this->plugin_prefix . 'password' );\n\t\t\t\n\t\t\tif ( $user != '' && $pass != '' ) {\n\t\t\t\t$this->username = $user;\n\t\t\t\t$this->password = $pass;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "c16010c07ffcb76ca43a9629524ebbfd", "score": "0.5575513", "text": "public function init() {\r\n $this -> user = User::byId(session('id'));\r\n }", "title": "" }, { "docid": "6665b600f9b8673c7731761274d0889f", "score": "0.556938", "text": "private function set_user(){\n\t\t\t\n\t\t\t$this->user = get_user_by( 'login', $this->login );\n\t\t\t\n\t\t}", "title": "" }, { "docid": "18a4b8b19e4c0c6a9c585b1c43d5eaf6", "score": "0.55654836", "text": "public function _initApiUserInformation(){\n \t$user_alegrapi = $this->getOption('user_alegrapi');\n \tZend_Registry::set('user_alegrapi', $user_alegrapi);\n\n \t$pwd_alegrapi = $this->getOption('pwd_alegrapi');\n \tZend_Registry::set('pwd_alegrapi', $pwd_alegrapi);\n }", "title": "" }, { "docid": "43e7a22e2a5fbcb925dd91ae6b504828", "score": "0.55516964", "text": "protected function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t$this->import('BackendUser', 'User');\n\t\t$this->import('Isotope');\n\t}", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.5532946", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.5532946", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.5532946", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.5532946", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.5532946", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.5532946", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.5532946", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.5532946", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.5532946", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.5532946", "text": "public function getUser();", "title": "" }, { "docid": "453a7b7dd8738d4a41567791045be4d7", "score": "0.55293006", "text": "function UserDAO() {\n\t\n }", "title": "" }, { "docid": "e39c06377ea8ae342e64d14e99d065c7", "score": "0.5528424", "text": "function user_model()\r\n {\r\n parent::Model();\r\n }", "title": "" }, { "docid": "75cd2c52a59360a4772e770c46cd1641", "score": "0.55270535", "text": "public function user(): UserSync;", "title": "" }, { "docid": "c88a83ec23bdd4941a45c97cd54d0f69", "score": "0.5518853", "text": "protected function loadUserConfig(){\n require $this->context->getPathApp() . 'load_user_config.php'; \n }", "title": "" }, { "docid": "238778a6b8c135f0ad8ceda88771366c", "score": "0.5515319", "text": "function add_import()\n {\n if($this->isWebAdmin()){\n $this->global['pageTitle'] = \"Import Data Sparepart - \".APP_NAME;\n $this->global['pageMenu'] = 'Import Data Sparepart';\n $this->global['contentHeader'] = 'Import Data Sparepart';\n $this->global['contentTitle'] = 'Import Data Sparepart';\n $this->global ['role'] = $this->role;\n $this->global ['name'] = $this->name;\n $this->global ['repo'] = $this->repo;\n\n $data['classname'] = $this->cname;\n $this->loadViews($this->view_dir.'import', $this->global, NULL);\n }else{\n redirect($this->cname.'/view');\n }\n }", "title": "" }, { "docid": "2bd322c300ceaada0e7ae37dbc360bb2", "score": "0.5515273", "text": "public function import()\n {\n Excel::import(new UsersImport, request()->file('file'));\n\n return redirect()\n ->route('user.index');\n }", "title": "" }, { "docid": "ea661159f671a72d6f2db8e7469e688e", "score": "0.550297", "text": "private function _loadData() {\n $id = new MongoId($_SESSION['user_id']);\n $this->_user = $this->_collection->findOne(array('_id' => $id));\n }", "title": "" }, { "docid": "9aeb18ef2d34a6895dff195032bcf798", "score": "0.54943174", "text": "public function run()\n {\n\n $data = [\n 'name' => 'Super Admin'\n ];\n\n UserType::create($data);\n\n\n }", "title": "" }, { "docid": "d87418de12bbd262ab7e546083ed101d", "score": "0.54823256", "text": "private static function userModel(): UserModel\n {\n if (!class_exists($userModel = UserModel::class)) {\n throw new BaseNoClassFoundExeption(sprintf('%s class is missing. In order to utalize the Authorized script within IkonizerCore. Then a user model is required.', UserModel::class));\n }\n\n return new $userModel();\n }", "title": "" }, { "docid": "90637419a9b909b52c522a67cef25bc4", "score": "0.5478061", "text": "private function setUserData()\n {\n $auth = Auth::getInstance();\n $user = $auth->getUser()[\"username\"];\n $result = $this->db->Query(\"SELECT * FROM `tbl_user` WHERE `login`='$user'\");\n\n if ($result == null)\n return;\n\n $user = $result[0];\n $kontostand = number_format($user[\"kontostand\"], \"2\", \",\", \".\") . \"€\";\n $this->tmp->setVar(\"Vorname\", $user[\"vorname\"]);\n $this->tmp->setVar(\"Name\", $user[\"nachname\"]);\n $this->tmp->setVar(\"Login\", $user[\"login\"]);\n $this->tmp->setVar(\"Kontostand\", $kontostand);\n }", "title": "" } ]
e056de964b000033f24caf25f7588c1d
Returns title of the current status of this artist
[ { "docid": "1245d965b598daf948d3f17972277d4f", "score": "0.0", "text": "public function getStatusName()\n {\n return self::$status_list[$this->celebrity_status];\n }", "title": "" } ]
[ { "docid": "0ce7149b38d1f67ca4d2a1058fc5bb4c", "score": "0.67532265", "text": "function title() {\n return $this->release_status($this->argument);\n }", "title": "" }, { "docid": "5fc63e74ce1dd55069adeee2e54691f8", "score": "0.670805", "text": "function getTitle()\n {\n return $this->activityTitle;\n }", "title": "" }, { "docid": "10bf92916268ced09b7efaa991a866f0", "score": "0.6689982", "text": "public function getStatusName()\n {\n return \\Marcoshoya\\MarquejogoBundle\\Helper\\BundleHelper::bookStatusName($this->status);\n }", "title": "" }, { "docid": "63251f68cf80b77e58bca88a2b58cf29", "score": "0.6657012", "text": "public function get_statusdescription() {\n\t\t\treturn ucfirst($this->statusdescriptions[$this->status]);\n\t\t}", "title": "" }, { "docid": "fdeb7974bf05465217944fb99833f1fd", "score": "0.6538991", "text": "function getTitle() {\r\n\t\treturn $this->states[$this->currentState]['title'];\r\n\t}", "title": "" }, { "docid": "3154dbd72a7abef5b6af14611c1afc9c", "score": "0.6523604", "text": "public function getTitle() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"title\");\n\t}", "title": "" }, { "docid": "3154dbd72a7abef5b6af14611c1afc9c", "score": "0.6523604", "text": "public function getTitle() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"title\");\n\t}", "title": "" }, { "docid": "3154dbd72a7abef5b6af14611c1afc9c", "score": "0.6523604", "text": "public function getTitle() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"title\");\n\t}", "title": "" }, { "docid": "b731a51cda4fabcc426bc9797d15632d", "score": "0.64940494", "text": "public function getTitle() {\n return $this->artifact->getTitle();\n }", "title": "" }, { "docid": "8a434b46d73c57c61eebca52e3264ece", "score": "0.64590025", "text": "public function statusLabel()\n {\n $list = self::listStatus();\n return isset($list[$this->status]) \n ? $list[$this->status] \n : $this->status;\n }", "title": "" }, { "docid": "d7a609aaa7bceffdea3fa1466daee896", "score": "0.64357024", "text": "public function get_title()\n\t{\n\t\t$username = $this->user_loader->get_username($this->get_data('closer_id'), 'no_profile');\n\n\t\treturn $this->language->lang(\n\t\t\t$this->language_key,\n\t\t\t$username\n\t\t);\n\t}", "title": "" }, { "docid": "390095c9bd544c94a5544afc74e1c3ed", "score": "0.6407915", "text": "public function getTitle()\r\n {\r\n return ($this->title) ? $this->title : \"No Title\";\r\n }", "title": "" }, { "docid": "0e6d64bcbad723846f8041b8521a1f87", "score": "0.6375387", "text": "public function status(): string\n {\n return $this->status;\n }", "title": "" }, { "docid": "c688949dd92e009cdd567434a08a3c1f", "score": "0.63683647", "text": "public function getStatusText()\n {\n if (!empty(static::$statuses[$this->status])) {\n return static::$statuses[$this->status];\n } else {\n return 'Unknown';\n }\n }", "title": "" }, { "docid": "62b22b54c763109a5db7f5f29b3ec101", "score": "0.63677627", "text": "public function getTitle() {\n\t\treturn $this->getAsString('title');\n\t}", "title": "" }, { "docid": "96f6b62922acb2d872d6508fa0e9c179", "score": "0.6367464", "text": "public function renderTitle() {\n if ($this->title === \"\") {\n return \"Historic Southern Naturalists\";\n } else {\n return $this->title . \" - Historic Southern Naturalists\";\n }\n }", "title": "" }, { "docid": "fc1c56911a8fab09d5adee5b602e883a", "score": "0.63644385", "text": "public function getStatusAsString()\n {\n return self::$_statuses[$this->status];\n }", "title": "" }, { "docid": "1384652a9a44e1d12456afb00d161ac3", "score": "0.63595295", "text": "public function getTitle(): string\n {\n return $this->title;\n }", "title": "" }, { "docid": "1384652a9a44e1d12456afb00d161ac3", "score": "0.63595295", "text": "public function getTitle(): string\n {\n return $this->title;\n }", "title": "" }, { "docid": "1384652a9a44e1d12456afb00d161ac3", "score": "0.63595295", "text": "public function getTitle(): string\n {\n return $this->title;\n }", "title": "" }, { "docid": "1384652a9a44e1d12456afb00d161ac3", "score": "0.63595295", "text": "public function getTitle(): string\n {\n return $this->title;\n }", "title": "" }, { "docid": "1384652a9a44e1d12456afb00d161ac3", "score": "0.63595295", "text": "public function getTitle(): string\n {\n return $this->title;\n }", "title": "" }, { "docid": "403c7c060deaddc736c13ac9f379af84", "score": "0.63522583", "text": "public function getStatusText() : string\n {\n return $this->statusText;\n }", "title": "" }, { "docid": "04c3de20b04bde4062d3c94c948d194e", "score": "0.6349586", "text": "public function latest_human_status()\n {\n if ($update = $this->latest()) {\n return trans('cachet.incidents.status.'.$update->status);\n }\n\n return $this->human_status();\n }", "title": "" }, { "docid": "5f9dee6db5a4ed7e802b6a915fb509f8", "score": "0.6347493", "text": "public function getTitle() : string {\n return $this->title;\n }", "title": "" }, { "docid": "2831ca4616c3ecdd7c1ecf339697c190", "score": "0.63352525", "text": "public function getTitle() {\r\n\t\treturn $this->title;\t\t\r\n\t}", "title": "" }, { "docid": "e82e08bd3c36f89a3642172216b17851", "score": "0.6335179", "text": "public function getTitle() {\n return $this->title->getValue();\n }", "title": "" }, { "docid": "2df958d38581c7ce0adb8a7ebe2a2d9c", "score": "0.6333864", "text": "public function get_title() {\n return $this->title;\n }", "title": "" }, { "docid": "2df958d38581c7ce0adb8a7ebe2a2d9c", "score": "0.6333864", "text": "public function get_title() {\n return $this->title;\n }", "title": "" }, { "docid": "1cd84bc439c48458d95142c59edcfa31", "score": "0.6333064", "text": "public function title()\n {\n return $this->title;\n }", "title": "" }, { "docid": "4d54ee4fb1ae4c786a8091ec756be294", "score": "0.63307256", "text": "public function getTitle () {\r\n return $this->title;\r\n }", "title": "" }, { "docid": "55cb1b321767190dd5d9d22cc6f6b678", "score": "0.6326588", "text": "public function getTitle() {\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "55cb1b321767190dd5d9d22cc6f6b678", "score": "0.6326588", "text": "public function getTitle() {\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "55cb1b321767190dd5d9d22cc6f6b678", "score": "0.6326588", "text": "public function getTitle() {\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "fc45c019327c80050ef95460e8e80d24", "score": "0.6325893", "text": "public function getTitle()\r\n {\r\n return $this->title;\r\n }", "title": "" }, { "docid": "fc45c019327c80050ef95460e8e80d24", "score": "0.6325893", "text": "public function getTitle()\r\n {\r\n return $this->title;\r\n }", "title": "" }, { "docid": "fc45c019327c80050ef95460e8e80d24", "score": "0.6325893", "text": "public function getTitle()\r\n {\r\n return $this->title;\r\n }", "title": "" }, { "docid": "f38b16c2d8cebc184e6f075c98e92d3b", "score": "0.6324561", "text": "private function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "5799fac89ada2c634caac2c5c8299517", "score": "0.63234407", "text": "public function getTitle(): string {\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "7c718f4dfdb0781a8c28c6ab77b2da6d", "score": "0.6319828", "text": "public function getTitle() {\n return $this->title;\n }", "title": "" }, { "docid": "7c718f4dfdb0781a8c28c6ab77b2da6d", "score": "0.6319828", "text": "public function getTitle() {\n return $this->title;\n }", "title": "" }, { "docid": "c6f1b819625dc91aee46db6162e8e25d", "score": "0.63195646", "text": "public function getTitle() {\r\n return $this->title;\r\n }", "title": "" }, { "docid": "c6f1b819625dc91aee46db6162e8e25d", "score": "0.63195646", "text": "public function getTitle() {\r\n return $this->title;\r\n }", "title": "" }, { "docid": "e5684fa5f69b12f02cac9bdf535b3ee9", "score": "0.6318206", "text": "public function get_title(){\n \n return $this->title;\n }", "title": "" }, { "docid": "e081f8ad51f269da7bfb59ab7004de7a", "score": "0.6315829", "text": "public function getTitle() {\n return $this->title;\n }", "title": "" }, { "docid": "e081f8ad51f269da7bfb59ab7004de7a", "score": "0.6315829", "text": "public function getTitle() {\n return $this->title;\n }", "title": "" }, { "docid": "e081f8ad51f269da7bfb59ab7004de7a", "score": "0.6315829", "text": "public function getTitle() {\n return $this->title;\n }", "title": "" }, { "docid": "e081f8ad51f269da7bfb59ab7004de7a", "score": "0.6315829", "text": "public function getTitle() {\n return $this->title;\n }", "title": "" }, { "docid": "e081f8ad51f269da7bfb59ab7004de7a", "score": "0.6315829", "text": "public function getTitle() {\n return $this->title;\n }", "title": "" }, { "docid": "e081f8ad51f269da7bfb59ab7004de7a", "score": "0.6315829", "text": "public function getTitle() {\n return $this->title;\n }", "title": "" }, { "docid": "895f29e019956299bf11714e3a15aa0a", "score": "0.63115907", "text": "public function get_title() {\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "09b8fd3f6ed0d863687d24e4c9aa8614", "score": "0.6310286", "text": "public function getTitle(): string\n {\n return $this->_title;\n }", "title": "" }, { "docid": "09b8fd3f6ed0d863687d24e4c9aa8614", "score": "0.6310286", "text": "public function getTitle(): string\n {\n return $this->_title;\n }", "title": "" }, { "docid": "0b976edc1e2f6f4083d04dabcb6fcb10", "score": "0.6308963", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "0b976edc1e2f6f4083d04dabcb6fcb10", "score": "0.6308963", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "1cfbe857cd322b15e6ccae69f79430d5", "score": "0.6303302", "text": "public function getTitle()\n {\n return $this->title;\n }", "title": "" } ]
5e4b1bacf3de1c39ad0553b6b45851ad
Filter: cleanyeti_postreply_text Creates the standard text 'Post a Reply to %s' Located in comments.php
[ { "docid": "4e0260cd5ec49a057bb452c874f3c0b7", "score": "0.8709699", "text": "function cleanyeti_postreply_text() {\n\t/* translators: comment reply form title, %s is author of comment */\n $content = __('Post a Reply to %s', 'cleanyeti');\n return apply_filters( 'cleanyeti_postreply_text', $content );\n}", "title": "" } ]
[ { "docid": "0ce4f153e749ee79eb99775446317aba", "score": "0.73923475", "text": "function cleanyeti_cancelreply_text() {\n $content = __('Cancel reply', 'cleanyeti');\n return apply_filters( 'cleanyeti_cancelreply_text', $content );\n}", "title": "" }, { "docid": "db9c22bd436239172c8a65cd1ff1cac6", "score": "0.7143485", "text": "function cleanyeti_postcomment_text() {\n\t/* translators: comment form title */\n $content = __('Post a Comment', 'cleanyeti');\n return apply_filters( 'cleanyeti_postcomment_text', $content );\n}", "title": "" }, { "docid": "6e1659ff936d030dc17a93e47fb82221", "score": "0.66129774", "text": "function cleanyeti_commentbox_text() {\n\t/* translators: label for comment form textarea */\n\t$content = _x('Comment', 'noun', 'cleanyeti');\n return apply_filters( 'cleanyeti_commentbox_text', $content );\n}", "title": "" }, { "docid": "7161dc6f0773a7a39893dd0d5216ab43", "score": "0.65332216", "text": "function cleanyeti_commentbutton_text() {\n\t/* translators: text of comment button */\n $content = esc_attr( __('Post Comment', 'cleanyeti') );\n return apply_filters( 'cleanyeti_commentbutton_text', $content );\n}", "title": "" }, { "docid": "b5faeab309b20720aedf0738f9d209b0", "score": "0.63807374", "text": "function cleanyeti_multiplecomments_text() {\n $content = '<span>%d</span> ' . __('Comments', 'cleanyeti');\n return apply_filters( 'cleanyeti_multiplecomments_text', $content );\n}", "title": "" }, { "docid": "997b5b5bd2d266d1b9e45f26f9f196a8", "score": "0.6289334", "text": "function change_default_comment_text($args) {\n $args['title_reply'] = 'Leave a Comment';\n return $args;\n}", "title": "" }, { "docid": "d15ef92dbdfcd53b08820a957d68d50f", "score": "0.61144114", "text": "public function get_reply_to() {\n\t\tif ( empty( $this->filter_name ) ) {\n\t\t\treturn $this->reply_to;\n\t\t}\n\t\treturn '';\n\t}", "title": "" }, { "docid": "f9b5e6885ba57170e9afa8d4ec4a547d", "score": "0.59985346", "text": "function frame_comment_reply_link_filter( $link ) {\n\treturn preg_replace( '/(<a\\s)/i', '$1itemprop=\"replyToUrl\"', $link );\n}", "title": "" }, { "docid": "8df8c1fabf7c4d6ee2f0e8d0936bfe6f", "score": "0.5979389", "text": "function cleanyeti_singlecomment_text() {\n $content = sprintf( _x( '%1$sOne%2$s Comment' , 'One Comment, where %$1s and %$2s are <span> tags', 'cleanyeti' ), '<span>' , '</span>' );\n return apply_filters( 'cleanyeti_singlecomment_text', $content );\n}", "title": "" }, { "docid": "cc63cab730ae674287dbced2426b2b01", "score": "0.596127", "text": "function harmonica_comment_reply_link_filter( $link ) {\n\treturn preg_replace( '/(<a\\s)/i', '$1itemprop=\"replyToUrl\"', $link );\n}", "title": "" }, { "docid": "e9a071b11bc231391a496b4ac365ec71", "score": "0.59077483", "text": "public static function filterReplyLink($link)\n {\n return str_replace('comment-reply-link', 'comment-reply-link uk-button uk-button-text', $link);\n }", "title": "" }, { "docid": "24826b289aeced527b8b35a7227e22dc", "score": "0.58878464", "text": "function theme_cancel_comment_reply_link($formatted_link, $link, $text) {\n\t\t$formatted_link = str_replace('#respond', '', $formatted_link);\n\t\treturn $formatted_link;\n\t}", "title": "" }, { "docid": "f03ab25dea6f835cd42db60562d4f605", "score": "0.5883907", "text": "function reply( $parent, $text ) {\n\t\tglobal $wgUser;\n\t\t$id = uniqid();\n\t\tarray_unshift( $this->comments[$parent][AJAXCOMMENTS_REPLIES], $id );\n\t\t$this->comments[$id] = array(\n\t\t\tAJAXCOMMENTS_PARENT => $parent,\n\t\t\tAJAXCOMMENTS_USER => $wgUser->getName(),\n\t\t\tAJAXCOMMENTS_DATE => time(),\n\t\t\tAJAXCOMMENTS_TEXT => $text,\n\t\t\tAJAXCOMMENTS_REPLIES => array()\n\t\t);\n\t\t$this->changed = true;\n\t\treturn $this->renderComment( $id );\n\t}", "title": "" }, { "docid": "a20763f40e6d3430cf272c0223759dbc", "score": "0.5846939", "text": "function themethreads_comment_reply_link( $args = array() ) {\n\techo themethreads_get_comment_reply_link( $args );\n}", "title": "" }, { "docid": "0f1c8283c07095f2dd19f4d45dd2087d", "score": "0.581381", "text": "function wct_comments_get_before_comment_title() {\n\t\t/**\n\t\t * @param string the mention output\n\t\t */\n\t\treturn apply_filters( 'wct_comments_get_before_comment_title', esc_html__( 'In reply to:', 'wordcamp-talks' ) );\n\t}", "title": "" }, { "docid": "0e0ac09865e69fd6071d658d5b824663", "score": "0.5802629", "text": "function sc_post_own_message()\n\t{\n\t\t$author = $this->var['account'];\n\t\t$thread = $this->var['thread'];\n\n\t\t// $username = vartrue($author['user_login'], $author['user_name']);\n\t\t$username = $author['user_name'];\n\n\t\t$search = array('[x]', '[y]');\n\t\t$replace = array($username, $thread['thread_name']);\n\n\t\treturn str_replace($search, $replace, LAN_PLUGIN_NODEJS_FORUM_FRONT_03);\n\t}", "title": "" }, { "docid": "8fc50be7b0975f82248026548580d65a", "score": "0.574029", "text": "function mxb_post_reply_preview()\n{\n extract($GLOBALS);\n\n ?>\n<h3 id=\"review\"><?php echo _TEXTTOPICREVIEW ?></h3>\n<div id=\"topicreview\">\n\n<?php\n $result = sql_query(\"SELECT COUNT(pid) as nbsites FROM $table_posts WHERE tid=\" . intval($tid));\n $row = sql_fetch_object($result);\n $replynum = (empty($row->nbsites)) ? 1 : $row->nbsites + 1;\n if ($replynum >= $ppp) {\n $threadlink = MXB_BM_VIEWTHREAD1 . \"fid=$fid&amp;tid=$tid\";\n eval(_EVALTREVLT);\n\t\t\t\techo mxbMessageScreen(_TREVLTMSG);\n } else {\n $thisbg = 'bgcolor1';\n $result = sql_query(\"SELECT * FROM $table_posts WHERE tid=\" . intval($tid) . \" ORDER BY dateline DESC\");\n while ($reply = sql_fetch_object($result)) {\n $date = gmdate($dateformat, (int)$reply->dateline + ($timeoffset * 3600));\n $time = gmdate($timecode, (int)$reply->dateline + ($timeoffset * 3600));\n\n $poston = _TEXTPOSTON . \" $date \" . _TEXTAT . \" $time\";\n if ($reply->icon) {\n $reply->icon = \"<img src=\\\"\" . MXB_BASEMODIMG . \"/\" . $reply->icon . \"\\\" alt=\\\"Icon depicting mood of post\\\" />\";\n }\n\n $reply->message = stripslashes($reply->message);\n $reply->message = mxbPostify($reply->message, $forums->allowhtml, $forums->allowsmilies, $forums->allowbbcode, $forums->allowimgcode, $reply->smileyoff, $reply->bbcodeoff);\n\n ?>\n\t<div class=\"post <?php echo $thisbg ?>\">\n\t\t<div class=\"inner\"> \n\t\t\t\t<p class=\"author\">\n\t\t\t\t\t<?php echo $reply->icon ?> \n\t\t\t\t\t<strong><?php echo $reply->author ?></strong>\n\t\t\t\t\t<br />\n\t\t\t\t\t<?php echo $poston ?>\n\t\t\t\t</p>\n\t\t\t\t<div class=\"content\">\n\t\t\t\t\t<?php echo $reply->message ?>\n\t\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<?php\n if ($thisbg == 'bgcolor2') { $thisbg = 'bgcolor1'; } else { $thisbg = 'bgcolor2'; } //alternate bgcolor\n \n }// end while\n $result = sql_query(\"SELECT * FROM $table_threads WHERE tid=\" . intval($tid));\n $topic = sql_fetch_object($result);\n $date = gmdate($dateformat, (int)$topic->dateline + ($timeoffset * 3600));\n $time = gmdate($timecode, (int)$topic->dateline + ($timeoffset * 3600));\n\n $poston = _TEXTPOSTON . \" $date \" . _TEXTAT . \" $time\";\n if (!empty($topic->icon)) {\n $topic->icon = \"<img src=\\\"\" . MXB_BASEMODIMG . \"/\" . $topic->icon . \"\\\" alt=\\\"Icon depicting mood of post\\\" />\";\n }\n\n $topic->message = stripslashes($topic->message);\n $topic->message = mxbPostify($topic->message, $forums->allowhtml, $forums->allowsmilies, $forums->allowbbcode, $forums->allowimgcode, $topic->smileyoff, $topic->bbcodeoff);\n\n ?>\n\t<div class=\"post <?php echo $thisbg ?>\">\n\t\t<div class=\"inner\">\n\t\t\t<p class=\"author\">\n\t\t\t\t<?php echo $topic->icon ?>\n\t\t\t\t<strong><?php echo $topic->author ?></strong>\n\t\t\t\t<br />\n\t\t\t\t<?php echo $poston ?>\n\t\t\t</p>\n\t\t\t<div class=\"content\">\n\t\t\t\t<?php echo $topic->message?>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\n<?php } ?>\n \n\t</div> \n<?php\n}", "title": "" }, { "docid": "724f2b51a1b471be1ce9eb2a91ffe2c2", "score": "0.57257944", "text": "function ReplyLink() {\n\t\treturn $this->Link() . 'reply/' . $this->urlParams['ID'];\n\t}", "title": "" }, { "docid": "9f3f7c05e431d0002e28afee6cd3dc50", "score": "0.5719586", "text": "function instapress_comment_form_submit_button( $submit_button, $args ) {\n $link = remove_query_arg( array( 'replytocom', 'unapproved', 'moderation-hash' ) );\n\n $display = (string) null;\n if ( empty( $_GET['replytocom'] ) ) {\n $display = ' style=\"display: none;\"';\n }\n\n $cancel_link = sprintf(\n '<a id=\"cancel-comment-reply-link\" class=\"comment-reply-cancel\" href=\"%1s\"rel=\"nofollow\"%3$s>%2$s</a>',\n esc_html( $link ) . '#respond',\n __( 'Cancel reply', 'instapress' ), $display\n );\n\n return $submit_button . $cancel_link;\n}", "title": "" }, { "docid": "23d8a39ae5508e8c14d867ee4683f5c6", "score": "0.56827295", "text": "public function getRepliesText();", "title": "" }, { "docid": "307b1da73e1daa2fe38b5318eeaf4229", "score": "0.54979783", "text": "function _bp_forums_reply_exists_posts_where( $where = '' ) {\n\t\treturn $where . \" AND p.post_text = '\" . buddypress()->forums->reply_exists_text . \"'\";\n\t}", "title": "" }, { "docid": "f80838fd078e9ae7852fc0304d45c438", "score": "0.5477465", "text": "function sc_post_all_message()\n\t{\n\t\t$author = $this->var['account'];\n\t\t$thread = $this->var['thread'];\n\n\t\t// $username = vartrue($author['user_login'], $author['user_name']);\n\t\t$username = $author['user_name'];\n\n\t\t$search = array('[x]', '[y]');\n\t\t$replace = array($username, $thread['thread_name']);\n\n\t\treturn str_replace($search, $replace, LAN_PLUGIN_NODEJS_FORUM_FRONT_02);\n\t}", "title": "" }, { "docid": "ff43b04b436a8b1bfae88002492f0391", "score": "0.5475561", "text": "function discussion_text_callback( $post ) {\n wp_nonce_field( basename(__FILE__), 'discussion_text_nonce');\n $discussion_text_stored = get_post_meta( $post->ID );\n ?>\n <p>\n <label for=\"ra_text\" class=\"discussion_text\">\n <?php _e( '<i>Text of the Research article:</i>', 'textdomain' )?>\n </label><br>\n <textarea rows=\"20\" cols=\"65\" name=\"ra_text\" id=\"ra_text\"><?php if ( isset ( $discussion_text_stored['ra_text'] ) ) echo $discussion_text_stored['ra_text'][0]; ?></textarea>\n </p>\n<?php\n}", "title": "" }, { "docid": "28e7ef8af2bb4a5a49416a4d80298d84", "score": "0.54307705", "text": "public function action_change_reply()\n\t{\n\t\t$this->_login_required();\n\n\t\t$topic = null;\n\n\t\t$values = Arr::extract($_POST, array('content'));\n\n\t\ttry {\n\t\t\t$reply = $this->_category\n\t\t\t\t->topic($this->request->param('topic'))\n\t\t\t\t->reply($this->request->param('reply'));\n\n\t\t\tif($reply->user->id != Fusion::$user->id && !Fusion::$user->hasAccess('forum.reply.edit'))\n\t\t\t{\n\t\t\t\tRD::set(RD::WARNING, 'You can\\'t edit other people\\'s replies');\n\n\t\t\t\t$this->redirect(Route::url('forum.topic', array(\n\t\t\t\t\t'id' => $this->request->param('id'),\n\t\t\t\t\t'topic' => $this->request->param('topic')\n\t\t\t\t), true));\n\t\t\t}\n\n\t\t\t$reply->values($values)\n\t\t\t\t->save();\n\n\t\t\tRD::set(RD::SUCCESS, 'Thanks for editing your reply.');\n\t\t}\n\t\tcatch(ORM_Validation_Exception $e)\n\t\t{\n\t\t\t$errors = $e->errors('model');\n\n\t\t\tforeach($errors as $error)\n\t\t\t{\n\t\t\t\tRD::set(RD::ERROR, $error);\n\t\t\t}\n\t\t}\n\t\tcatch(Quill_Exception_Topic_Load $e)\n\t\t{\n\t\t\tRD::set(RD::ERROR, 'There\\s no topic to reply to.');\n\t\t}\n\t\tcatch(Quill_Exception_Reply_Create $e)\n\t\t{\n\t\t\t$error = $e->getMessage();\n\t\t\tRD::set(RD::ERROR, $error);\n\t\t}\n\n\t\t$this->redirect(Route::url('forum.topic', array(\n\t\t\t'id' => $this->request->param('id'),\n\t\t\t'topic' => $this->request->param('topic')\n\t\t), true));\n\t}", "title": "" }, { "docid": "fc784153e8d0f9aeb97e8c175ac1139f", "score": "0.5429617", "text": "public static function get_reply( $reply_id ) {\n\t\tif ( $reply_id ) {\n\t\t\treturn \"<a href='\". esc_url( bbp_get_reply_url( $reply_id ) ) .\"'>\". bbp_get_reply_topic_title( $reply_id ) .\"</a>\";\n\t\t}\n\t\treturn '';\n\t}", "title": "" }, { "docid": "524df39eb1232c68fffa34c78af4505a", "score": "0.54184973", "text": "function form_reply($topic, $error_message='', $post_id=-1)\n{\n\t$tf = ${'tf'.get_cookid()};\n\tglobal $f, $l, $PHP_SELF,$posting_content, $t, $tf;\n\tif (!isset($topic))\n\t{\n\t\tprint $l['Topic_not_found'];\n\t\treturn false;\n\t}\n\n\t$fid = get_fid_from_header($topic);\n\t$catdat = get_category($fid);\n\n\tif ($catdat[4] == 0 && user_pass_match($tf['user'],$tf['pass']) == false)\n\t{\n\t\tprint $l['Only_users_can_post'];\n\t\treturn false;\n\t}\n\n\tif (isset($f) == false)\n\t{\n\t\t$topic_file = dir_data.date('YmdHis',$topic).msg_ext;\n\t\tif (!file_exists($topic_file))\n\t\t{\n\t\t\tprint $l['Topic_not_found'];\n\t\t\treturn false;\n\t\t}\n\t\t$topic_cont = file($topic_file);\t\t\n\n\t\tif ($post_id == -1 || $post_id=='')\n\t\t{\n\t\t\t$line = explode(d, $topic_cont[0]);\n\t\t\t$f['posting_subject'] = (eregi($l['Re'],$line[0])) ? $line[0] : $l['Re'].$line[0];\n\t\t}\n\t\telse if(isset($topic_cont[$post_id]))\n\t\t{\n\t\t\t$line = explode(d, $topic_cont[$post_id]);\n\t\t\t$f['posting_subject'] = (eregi($l['Re'],$line[0])) ? $line[0] : $l['Re'].$line[0];\n\t\t\t$post_content = $line[7];\n\t\t\t$post_content =nl2br_($post_content, \"\\n\");\n\t\t\t$posting_content = '[quote]'.$post_content.\"[/quote]\\n\";\n\t\t}\n\t}\n\t\n\tif ($post_id == -1 || $post_id == '')\n\t{\n\t\t$t['form_header'] = $l['Reply'];\n\t}\n\telse\n\t{\n\t\t$t['form_header'] = $l['Quote'];\n\t}\n\n\t$posting_content = nl2br_($posting_content, \"\\n\");\n\t$t['smileys'] = tpl_get_smileys();\n\n\t# if user isn't registrered we give him/her textboxes for email and name\n\tif (user_pass_match($tf['user'],$tf['pass'])==false)\n\t{\n\t\t$t['user_data']=parse_tpl(get_template(get_template_path().'form_posting_userdata.htm'));\n\t}\n\n\t$f['posting_smileys_value']=($f['posting_smileys']=='on') ? ' checked=\"checked\"' : '';\n\t$t['posting_icons'] = icon_bar($f['topic_icon']);\n\n\t$t['error_str']=$error_message;\n\t$t['posting_action'] = 'send_reply&topic='.$topic;\n\tisset($post_id) ? $t['posting_action'] .= '&id='.$post_id : '';\n\tprint parse_tpl(get_template(get_template_path().'form_posting.htm'));\n}", "title": "" }, { "docid": "8517b3452d16dfba1968e4bb455795d6", "score": "0.5416125", "text": "function g1_socials_twitter_render_reply_link( $tweet_id ) {\n\t$url = sprintf( apply_filters( 'g1_socials_twitter_tweet_intent_url', 'https://twitter.com/intent/tweet?in_reply_to=%s' ), $tweet_id );\n\t?>\n\t<a onclick=\"<?php echo esc_attr( g1_socials_twitter_new_window_js( $url ) ); ?>\" href=\"<?php echo esc_url( $url ); ?>\">\n\t\t<?php esc_html_e( 'Reply', 'g1_socials' ); ?>\n\t</a>\n\t<?php\n}", "title": "" }, { "docid": "151c66433dfec4349549d5c9eb35b32a", "score": "0.5413305", "text": "public function createReply()\n {\n //prevent CSRF\n if (!isset($_POST['token']) || !Token::check($_POST['token'], false))\n {\n echo json_encode(['displayError' => self::$language->invokeOutput('frequent/badRequest')]);\n }else{\n unset($_POST['token']);\n $addReply = repliesAPI::getInstance()->createReply($_POST);\n if (is_string($addReply) )\n {\n Token::destroyToken();\n if (isset_get($_GET, 'redirect') === 'true')\n echo json_encode([\"done\" => $addReply, 'redirect' => 'thread/'.$_POST['thread_id']]);\n else\n echo json_encode([\"done\" => $addReply, 'reload' => true]);\n }else{\n if (is_array($addReply))\n echo json_encode($addReply);\n else\n echo json_encode(['displayError' => Controller::$language->invokeOutput('frequent/wrong')]);\n }\n }\n }", "title": "" }, { "docid": "be93bae8d0d51e3fa3e8201f7d211616", "score": "0.53967947", "text": "public function actionReply()\n {\n $thread = $this->_em->getRepository('\\Jazzee\\Entity\\Thread')->findOneBy(array('id' => $this->actionParams['id'], 'applicant' => $this->_applicant->getId()));\n if (!$thread) {\n throw new \\Jazzee\\Exception($this->actionParams['id'] . \" is not a valid thread id for applicant \" . $this->_applicant->getId());\n }\n $this->setVar('thread', $thread);\n\n $form = new \\Foundation\\Form();\n $form->setCSRFToken($this->getCSRFToken());\n $form->setAction($this->applyPath('support/reply/' . $thread->getId()));\n\n $field = $form->newField();\n $field->setLegend('Reply to message');\n\n $element = $field->newElement('Textarea', 'text');\n $element->setLabel('Your Reply');\n $element->addValidator(new \\Foundation\\Form\\Validator\\NotEmpty($element));\n $element->addFilter(new \\Foundation\\Form\\Filter\\Safe($element));\n $form->newButton('submit', 'Submit');\n $this->setVar('form', $form);\n\n if ($input = $form->processInput($this->post)) {\n $reply = new \\Jazzee\\Entity\\Message();\n $reply->setSender(\\Jazzee\\Entity\\Message::APPLICANT);\n $reply->setText($input->get('text'));\n $thread->addMessage($reply);\n $this->_em->persist($reply);\n $this->addMessage('success', 'Your reply has been sent.');\n $this->redirectApplyPath('support');\n }\n }", "title": "" }, { "docid": "f17cdc7a1abe0edb9643c5e4951e46c1", "score": "0.53964615", "text": "function dil_post_faq_contrib() {\necho '<h3>FAQs about contributing</h3>';\n$contrib_page = get_page_by_title( 'Contributing' );\n\n$strip_email = str_replace( '[email]', '', $contrib_page->post_content );\n$contrib_page_content = str_replace( '[/email]', '', $strip_email );\necho $contrib_page_content;\n}", "title": "" }, { "docid": "4e5fe34ae55bf2788279889f3aa929c4", "score": "0.5394988", "text": "function add_comment_author_to_reply_link($link, $args, $comment){\n\n $comment = get_comment( $comment );\n\n // If no comment author is blank, use 'Anonymous'\n if ( empty($comment->comment_author) ) {\n if (!empty($comment->user_id)){\n $user=get_userdata($comment->user_id);\n $author=$user->user_login;\n } else {\n $author = __('Anonymous');\n }\n } else {\n $author = $comment->comment_author;\n }\n\n // If the user provided more than a first name, use only first name\n if(strpos($author, ' ')){\n $author = substr($author, 0, strpos($author, ' '));\n }\n\n // Replace Reply Link with \"Reply to &lt;Author First Name>\"\n $reply_link_text = $args['reply_text'];\n $link = str_replace($reply_link_text, 'Reply to ' . $author, $link);\n\n return $link;\n}", "title": "" }, { "docid": "9f0b6d66f870800479ae4fc80f5a8069", "score": "0.5380666", "text": "public function action_post_reply()\n\t{\n\t\t$this->_login_required();\n\n\t\t$topic = null;\n\n\t\t$values = Arr::extract($_POST, array('content'));\n\n\t\ttry {\n\t\t\t$reply = $this->_category\n\t\t\t\t->topic($this->request->param('topic'))\n\t\t\t\t->create_reply($values);\n\n\t\t\tPlug::fire('forum.parse', [$reply]);\n\n\t\t\tRD::set(RD::SUCCESS, 'Thanks for posting your reply.');\n\n\t\t\t$this->redirect(Route::url('forum.topic', array(\n\t\t\t\t'id' => $this->request->param('id'),\n\t\t\t\t'topic' => $this->request->param('topic')\n\t\t\t), true));\n\t\t}\n\t\tcatch(ORM_Validation_Exception $e)\n\t\t{\n\t\t\t$errors = $e->errors('model');\n\n\t\t\tforeach($errors as $error)\n\t\t\t{\n\t\t\t\tRD::set(RD::ERROR, $error);\n\t\t\t}\n\t\t}\n\t\tcatch(Quill_Exception_Topic_Load $e)\n\t\t{\n\t\t\tRD::set(RD::ERROR, 'There\\s no topic to reply to.');\n\t\t}\n\t\tcatch(Quill_Exception_Reply_Status $e)\n\t\t{\n\t\t\t$error = $e->getMessage();\n\t\t\tRD::set(RD::ERROR, $error);\n\t\t}\n\n\t\t$this->redirect(Route::url('forum.topic', array(\n\t\t\t'id' => $this->request->param('id'),\n\t\t\t'topic' => $this->request->param('topic')\n\t\t), true));\n\t}", "title": "" }, { "docid": "e59645ef508b64368296754d8ab9971d", "score": "0.536823", "text": "function pbe_filter_email_message($text)\n{\n\t$db = database();\n\n\t// load up the text filters from the database, regex first and ordered by the filter order ...\n\t$db->fetchQuery('\n\t\tSELECT\n\t\t\tfilter_from, filter_to, filter_type\n\t\tFROM {db_prefix}postby_emails_filters\n\t\tWHERE filter_style = {string:filter_style}\n\t\tORDER BY filter_type ASC, filter_order ASC',\n\t\tarray(\n\t\t\t'filter_style' => 'filter'\n\t\t)\n\t)->fetch_callback(\n\t\tfunction ($row) use (&$text) {\n\t\t\tif ($row['filter_type'] === 'regex')\n\t\t\t{\n\t\t\t\t// Newline madness\n\t\t\t\tif (!empty($row['filter_to']))\n\t\t\t\t{\n\t\t\t\t\t$row['filter_to'] = str_replace('\\n', \"\\n\", $row['filter_to']);\n\t\t\t\t}\n\n\t\t\t\t// Test the regex and if good use, else skip, don't want a bad regex to empty the message!\n\t\t\t\t$temp = preg_replace($row['filter_from'], $row['filter_to'], $text);\n\t\t\t\tif ($temp !== null)\n\t\t\t\t{\n\t\t\t\t\t$text = $temp;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$text = str_replace($row['filter_from'], $row['filter_to'], $text);\n\t\t\t}\n\t\t}\n\t);\n\n\treturn $text;\n}", "title": "" }, { "docid": "2362c605d8e337dd0b6c93ec1cfbf35a", "score": "0.5356469", "text": "public function extractRepliedUsernames() {\n preg_match(self::$patterns['valid_reply'], $this->tweet, $matches);\n return isset($matches[1]) ? $matches[1] : '';\n }", "title": "" }, { "docid": "2624304407a50c2458af8af63e899a4f", "score": "0.5329227", "text": "public function footer( $text ) {\n\n\t\t$url = 'https://wordpress.org/support/plugin/optinmonster/reviews?filter=5#new-post';\n\t\t$text = sprintf( __( 'Please rate <strong>OptinMonster</strong> <a href=\"%s\" target=\"_blank\" rel=\"noopener\">&#9733;&#9733;&#9733;&#9733;&#9733;</a> on <a href=\"%s\" target=\"_blank\">WordPress.org</a> to help us spread the word. Thank you from the OptinMonster team!', 'optin-monster-api' ), $url, $url );\n\t\treturn $text;\n\n\t}", "title": "" }, { "docid": "34f9a0af756dbffba2a1518ae2a632bb", "score": "0.53109384", "text": "public function replyTo($replyTo, $name = null);", "title": "" }, { "docid": "59305bcd30c7a9d3b828c63baa91ba32", "score": "0.5280721", "text": "public function get_no_reply() {\n\t\treturn apply_filters( 'bbp_private_replies_no_reply_address', bbp_get_do_not_reply_address() );\n\t}", "title": "" }, { "docid": "a43ff7e44dddf086fd2de3d92830dc13", "score": "0.5228622", "text": "function reply_url( $args = array(), $postID) {\r\n\t\t$reply = bbp_get_reply( bbp_get_reply_id( (int) $r['id'] ) );\r\n\r\n\t\t// Bail if no reply or user cannot reply\r\n\t\tif ( empty( $reply ) || ! bbp_current_user_can_access_create_reply_form() )\r\n\t\t\treturn;\r\n\r\n\t\t// Build the URI and return value\r\n\t\t//$uri = remove_query_arg( array( 'bbp_reply_to' ) );\r\n\t\t//$uri = add_query_arg( array( 'bbp_reply_to' => $reply->ID ) );\r\n $url = get_permalink($postID).'?bbp_reply_to='.$reply->ID;\r\n\t\t$uri = wp_nonce_url( $url, 'respond_id_' . $reply->ID );\r\n\t\t$uri = $uri . '#new-post';\r\n\r\n\t\treturn $uri;\r\n\t}", "title": "" }, { "docid": "112a9ac9257f8e084da5fa279b739ee0", "score": "0.52275896", "text": "function custom_pings($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment;\n ?>\n <li id=\"comment-<?php comment_ID() ?>\" <?php comment_class() ?>>\n <div class=\"comment-author\"><?php printf(__('By %1$s on %2$s at %3$s', 'your-theme'),\n get_comment_author_link(),\n get_comment_date(),\n get_comment_time() );\n edit_comment_link(__('Edit', 'your-theme'), ' <span class=\"meta-sep\">|</span> <span class=\"edit-link\">', '</span>'); ?></div>\n <?php if ($comment->comment_approved == '0') _e('\\t\\t\\t\\t\\t<span class=\"unapproved\">Your trackback is awaiting moderation.</span>\\n', 'your-theme') ?>\n <div class=\"comment-content\">\n <?php comment_text() ?>\n </div>\n<?php }", "title": "" }, { "docid": "36b47787742bfd2f4df515e7aa77d7fb", "score": "0.52144486", "text": "function inigui_comment_submitted($comment) {\n return t('Submitted by !username on @datetime.',\n array(\n '!username' => theme('username', $comment),\n '@datetime' => format_date($comment->timestamp)\n ));\n}", "title": "" }, { "docid": "b717cd5dfc64ea4e1426226b304b03f3", "score": "0.5211271", "text": "public function footer_text() {\n\t\t// Translators: theme name and theme slug.\n\t\techo wp_kses_post( sprintf( __( 'Please rate <strong>%1$s</strong> <a href=\"https://wordpress.org/support/theme/%2$s/reviews/?filter=5\" target=\"_blank\">&#9733;&#9733;&#9733;&#9733;&#9733;</a> on <a href=\"https://wordpress.org/support/theme/%2$s/reviews/?filter=5\" target=\"_blank\">WordPress.org</a> to help us spread the word. Thank you from GretaThemes!', 'thefour-lite' ), $this->pro_name, $this->rate ) );\n\t}", "title": "" }, { "docid": "00e74ed8704da4816c46fe5e17a19277", "score": "0.5210161", "text": "function send_reply_email($info, $slug, $reply){\n\t\t\t//$info is an array of post data\n\n\t\t\t/*\n\t\t\tHey ekramer,\n\n\t\t\tYour Reply To ekramer's Comment on ekramer's Article Has Been Accepted!\n\n\t\t\tYour Reply:\n\n\t\t\t@LKramer your are welcome!\n\n\t\t\tView The Comment You Replied To: http://alphaschildren.org/alphas_children/blog/posts/A-Few-New-Things-And-An-Old-One#comment-4dee8eac4ad47\n\t\t\tRead The Post You Commented On: http://alphaschildren.org/alphas_children/blog/posts/A-Few-New-Things-And-An-Old-One\n\t\t\tLove,\n\t\t\tAlpha Children's Home\n\n\t\t\t*/\n\n\t\t\t$postinfo = $this->get_post($slug);\n\n\t\t\t$config['useragent'] = 'Faye Doman\\'s Blog';\n\t\t\t$config['smtp_host'] = 'smtp.fayesblog.com';\n\t\t\t$config['stmp_user'] = '[email protected]';\n\t\t\t$config['smtp_pass'] = 'a3d59e185b';\n\n\t\t\t$this->load->library('email');\n\n\t\t\t$this->email->initialize($config);\n\n\t\t\t$this->email->from($config['stmp_user'], 'Faye Doman\\'s Blog');\n\t\t\t$this->email->to($reply['email']);\n\n\t\t\t$this->email->subject($info['name']. \" Just replied to \".$reply['name'].\"'s comment on ' \". $postinfo['name'].\" '\");\n\t\t\t$this->email->message(\"\n\n\t\t\t\tHey \".$reply['name'].\",\n\n\t\t\t\t\".$info['name'].\" just replied to your comment on \".$postinfo['name'].\"\n\n\t\t\t\tThey said:\n\n\t\t\t\t\".$info['comment'].\"\n\n\t\t\t\tRead the post they commented on: \".site_url('index.php/post/'.$slug).\"\n\t\t\t\tView the comment they replied to: \".site_url('index.php/post/'.$slug.\"#comment-\".$reply['identifier']).\"\n\n\n\t\t\t\");\n\n\t\t\t$this->email->send();\n\n\n\t}", "title": "" }, { "docid": "f409532ae222d3b02d8e1bf8c3cca1e3", "score": "0.51975393", "text": "public function get_replace_message() {\n\t\t\treturn apply_filters(\n\t\t\t\t'wapu_core/handlers/post_rating/replace_message',\n\t\t\t\tsprintf(\n\t\t\t\t\t'<div class=\"wapu-post-rating__replace_msg\">%s</div>',\n\t\t\t\t\tesc_html__( 'Thank you for vote', 'wapu-core' )\n\t\t\t\t)\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "e46571f0cca29dec318ae206cf04ba9f", "score": "0.51894796", "text": "function cleanyeti_list_comments_arg() {\n\t$content = 'type=comment&callback=cleanyeti_comments';\n\treturn apply_filters('list_comments_arg', $content);\n}", "title": "" }, { "docid": "f02ae248818ecdddb64249deb20b84db", "score": "0.5187339", "text": "function prepareMessage(){\n\t\t$this->title = 'Post deleted';\n\t\t$this->message = '@'.$this->post->user->username.'\\'s post was deleted from discussion #' . $this->post->discussion->id . ' ('.$this->post->discussion->title.')';\n\t\t$this->short = 'Post deleted';\n\t\t$this->color = 'red';\n\n\t\t$this->addLinkToParse('@'.$this->post->user->username, app('flarum.config')['url'].\"/u/{$this->post->user->id}\");\n\t\t$this->addLinkToParse('discussion #'.$this->post->discussion->id, app('flarum.config')['url'].\"/d/{$this->post->discussion->id}\");\n\t}", "title": "" }, { "docid": "c28afe1957899ea00d89657fcab67723", "score": "0.5175229", "text": "public function post_reply() {\n\n\t\t// validate data\n\t\t$data = Input::get();\n\t\t$rules = array(\n\t\t\t'thread_id'\t=> 'required',\n\t\t\t'reply'\t\t=> 'required',\n\t\t);\n\t\t$val = Validator::make($data, $rules);\n\t\tif( $val->fails() ) {\n\t\t\tSession::flash('status', 'reply-fail');\n\t\t\treturn Redirect::to('/');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// make the post\n\t\t\t$post = new Post();\n\t\t\t$user = Auth::user();\n\t\t\t// add the info\n\t\t\t$post->user_id \t\t= $user->id;\n\t\t\t$post->thread_id \t= $data['thread_id'];\n\t\t\t$post->body \t\t= $data['reply'];\n\t\t\t$post->save();\n\t\t\t// add to the users posts count\n\t\t\t$user->posts++;\n\t\t\t$user->save();\n\t\t\t// add to the reply count in the thread\n\t\t\t$thread = Thread::find( $data['thread_id'] );\n\t\t\t$thread->postcount++;\n\t\t\t$thread->save();\n\t\t\t// notification for user\n\t\t\t\t\tSession::flash('status', 'new-post');\n\t\t\t// we are done, go back to the thread\n\t\t\treturn Redirect::to('thread/view/' . $data['thread_id']);\n\t\t}\n\t}", "title": "" }, { "docid": "b3334b2586f97b27fe39ffa6b536c6cf", "score": "0.51713926", "text": "public function get_comment_or_reply_label($text_to_display, $post_type, $count) {\n $label_single = __('comment', 'peepso-core');\n $label_plural = __('comments', 'peepso-core');\n\n\t\treturn sprintf($text_to_display, $count, _n($label_single, $label_plural, $count, 'peepso-core'));\n\t}", "title": "" }, { "docid": "24a50e122ca412a384b2e885b7d5e4af", "score": "0.5150239", "text": "function templatemela_posted_on_other() {\r\r\n\t\t$str=get_the_date(d);\r\r\n\t\t$str1=get_the_date(M);\r\r\n\t\tprintf( __( '%2$s <span class=\"meta-sep\">by</span> %3$s', 'templatemela' ),\r\r\n\t\t'meta-prep meta-prep-author',\r\r\n\t\tsprintf( '<a href=\"%1$s\" title=\"%2$s\" rel=\"bookmark\"><span class=\"entry-date\">'.$str.'</span></a>',\r\r\n\t\t\tget_permalink(),\r\r\n\t\t\tesc_attr( get_the_time() ),\r\r\n\t\t\tget_the_date()\r\r\n\t\t),\r\r\n\t\tsprintf( '<span class=\"author vcard\"><a class=\"url fn n\" href=\"%1$s\" title=\"%2$s\">%3$s</a></span>',\r\r\n\t\t\tget_author_posts_url( get_the_author_meta( 'ID' ) ),\r\r\n\t\t\tsprintf( esc_attr__( 'View all posts by %s', 'templatemela' ), get_the_author() ),\r\r\n\t\t\tget_the_author()\r\r\n\t\t)\r\r\n\t);\r\r\n}", "title": "" }, { "docid": "6478282bccda2872458c09cf58f9b53c", "score": "0.51370245", "text": "function _hrb_disable_dispute_comment_replies( $link, $args, $comment ) {\n\n\tif ( ! hrb_is_disputes_enabled() || APP_DISPUTE_PTYPE != $comment->comment_type ) {\n\t\treturn $link;\n\t}\n\n\treturn '';\n}", "title": "" }, { "docid": "1d8dfb2186d1ea26236d803980773236", "score": "0.5110536", "text": "function custom_pings($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment;\n ?>\n <li id=\"comment-<?php comment_ID() ?>\" <?php comment_class() ?>>\n <div class=\"comment-author\"><?php printf(__('By %1$s on %2$s at %3$s', 'Foundation'),\n get_comment_author_link(),\n get_comment_date(),\n get_comment_time() );\n edit_comment_link(__('Edit', 'Foundation'), ' <span class=\"meta-sep\">|</span> <span class=\"edit-link\">', '</span>'); ?></div>\n <?php if ($comment->comment_approved == '0') _e('\\t\\t\\t\\t\\t<span class=\"unapproved\">Your trackback is awaiting moderation.</span>\\n', 'Foundation') ?>\n <div class=\"comment-content\">\n <?php comment_text() ?>\n </div>\n<?php }", "title": "" }, { "docid": "5bc377f3469165af545e933b0fc93be8", "score": "0.5099197", "text": "private function clean_reply_to_com() {\n\t\t/**\n\t\t * Filter: 'wpseo_remove_reply_to_com' - Allow disabling the feature that removes ?replytocom query parameters.\n\t\t *\n\t\t * @param bool $return True to remove, false not to remove.\n\t\t */\n\t\treturn (bool) apply_filters( 'wpseo_remove_reply_to_com', true );\n\t}", "title": "" }, { "docid": "64852624d92e4c5ba9c582a4ff6444d7", "score": "0.508778", "text": "public function replyto( $replyto = '' )\r\n\t\t{\r\n\t\t\t\r\n\t\t\tif ( $this->validate )\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tif ( !Legato_Validation::email( $replyto ) )\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->_replyto = $replyto;\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "f0334937f8c418a7628efa18601bee4b", "score": "0.5080564", "text": "private function identify_replies( $p_description )\n\t{\n\t\t$t_description = $p_description;\n\n\t\tif ( $this->_mail_remove_replies )\n\t\t{\n\t\t\t$t_first_occurence = stripos( $t_description, $this->_mail_remove_replies_after );\n\t\t\tif ( $t_first_occurence !== FALSE )\n\t\t\t{\n\t\t\t\t$t_description = substr( $t_description, 0, $t_first_occurence ) . $this->_mail_removed_reply_text;\n\t\t\t}\n\t\t}\n\n\t\tif ( $this->_mail_remove_mantis_email )\n\t\t{\n\t\t\t# The pear mimeDecode.php seems to be removing the last \"=\" in some versions of the pear package.\n\t\t\t# the version delivered with this package seems to be working OK though but just to be sure\n\t\t\t$t_email_separator1 = substr( $this->_email_separator1, 0, -1 );\n\n\t\t\t$t_first_occurence = strpos( $t_description, $t_email_separator1 );\n\t\t\tif ( $t_first_occurence !== FALSE && substr_count( $t_description, $t_email_separator1, $t_first_occurence ) >= 5 )\n\t\t\t{\n\t\t\t\t$t_description = substr( $t_description, 0, $t_first_occurence ) . $this->_mail_removed_reply_text;\n\t\t\t}\n\t\t}\n\n\t\treturn( $t_description );\n\t}", "title": "" }, { "docid": "69e5bc6dd19734a3b379c461135969b0", "score": "0.5077959", "text": "private function replyCommandTextHari($display_name,$message_type,$room_id){\n $comment = \n \"Pernikahan kami akan dilaksanakan pada hari Minggu, 22 Desember 2019\";\n\n $replay = array(\n 'access_token'=>$this->access_token,\n 'topic_id'=>$room_id,\n 'type'=>'text',\n 'comment'=> $comment\n );\n $post_comment = Request::post($this->apiurl.\"post_comment\", $this->headers, $replay);\n $post_comment->raw_body;\n }", "title": "" }, { "docid": "aef1a23a4005c987b1282b8a96712670", "score": "0.5077777", "text": "function edit( $id, $text ) {\n\t\tglobal $wgParser;\n\t\t$this->comments[$id][AJAXCOMMENTS_TEXT] = $text;\n\t\t$html = $wgParser->parse( $text, $this->talk, new ParserOptions(), true, true )->getText();\n\t\t$this->changed = true;\n\t\treturn \"<div class=\\\"ajaxcomment-text\\\">$html</div>\";\n\t}", "title": "" }, { "docid": "e8c38fa07f8669e44afb364de4e3f1f5", "score": "0.50678533", "text": "function qtranslate_filter($text){\n\treturn __($text);\n}", "title": "" }, { "docid": "9ccbb719926bfa03566b59a25c94f74d", "score": "0.5058295", "text": "function replyForumPost() {\n global $user, $nuked, $visiteur, $user_ip;\n\n require_once 'Includes/nkToken.php';\n require_once 'Includes/nkUpload.php';\n\n $forumId = (isset($_POST['forum_id'])) ? (int) $_POST['forum_id'] : 0;\n $threadId = (isset($_POST['thread_id'])) ? (int) $_POST['thread_id'] : 0;\n $error = false;\n // TODO : quote ?\n $referer = 'index.php?file=Forum&page=post&forum_id='. $forumId .'&thread_id='. $threadId;\n\n // Check captcha\n if (initCaptcha() && ! validCaptchaCode())\n return;\n\n // Check Forum post reply token\n $tokenValid = nkToken_valid('replyForumPost'. $forumId . $threadId,\n 300, array($referer)\n );\n\n if (! $tokenValid) {\n printNotification(__('TOKEN_NO_VALID'), 'error');\n // TODO : Only for reply, no quote :/\n redirect($referer, 2);\n return;\n }\n\n // Check if Forum topic is closed and Forum posting level\n $dbrForum = nkDB_selectOne(\n 'SELECT F.level, FT.closed, FT.nbReplies\n FROM '. FORUM_TABLE .' AS F\n INNER JOIN '. FORUM_THREADS_TABLE .' AS FT\n ON F.id = FT.forum_id\n WHERE FT.id = '. $threadId\n );\n\n if (! $dbrForum) {\n printNotification(__('FORUM_NO_EXIST'), 'error');\n redirect('index.php?file=Forum', 2);\n return;\n }\n\n if ($dbrForum\n && ! isForumAdministrator($forumId)\n && ($dbrForum['closed'] == 1 || $dbrForum['level'] > $visiteur)\n ) {\n printNotification(__('ZONE_ADMIN'), 'error');\n redirect($referer, 2);\n return;\n }\n\n // Check post fields are really filled\n if ($_POST['author'] != '' && ! ctype_space($_POST['author'])\n && $_POST['titre'] != '' && ! ctype_space($_POST['titre'])\n && $_POST['texte'] != '' && ! ctype_space($_POST['texte'])\n ) {\n // Check author data\n list($authorId, $author, $error) = checkForumPostAuthor();\n\n if ($error === false) {\n // Post flood checking\n if (! checkForumPostFlood($author)) {\n // Check joined file\n list($filename, $error) = checkForumPostJoinedFile();\n }\n else {\n $error = __('NO_FLOOD');\n }\n }\n }\n else {\n $error = __('FIELD_EMPTY');\n }\n\n if ($error !== false) {\n printNotification($error, 'error');\n redirect($referer, 2);\n return;\n }\n\n // Prepare Forum post data\n $postData = prepareForumPostData();\n $date = time();\n\n // Update last poste date of Forum topic\n nkDB_update(FORUM_THREADS_TABLE, array('last_post' => $date), 'id = '. $threadId);\n\n updateForumReadTable($forumId, $threadId);\n\n // Save Forum post reply\n nkDB_insert(FORUM_MESSAGES_TABLE, array_merge($postData, array(\n 'date' => $date,\n 'edition' => '',\n 'auteur' => $author,\n 'auteur_id' => $authorId,\n 'auteur_ip' => $user_ip,\n 'thread_id' => $threadId,\n 'forum_id' => $forumId,\n 'file' => $filename\n )));\n\n $messId = nkDB_insertId();\n\n // Update Forum and Forum topic stats\n nkDB_update(FORUM_TABLE, array(\n 'nbMessages' => array('nbMessages + 1', 'no-escape')\n ),\n 'id = '. $forumId\n );\n\n nkDB_update(FORUM_THREADS_TABLE, array(\n 'nbReplies' => array('nbReplies + 1', 'no-escape')\n ),\n 'id = '. $threadId\n );\n\n // Get list of Forum message author ID to notify\n $dbrForumMessage = nkDB_selectMany(\n 'SELECT FM.auteur_id, U.mail\n FROM '. FORUM_MESSAGES_TABLE .' AS FM\n LEFT JOIN '. USER_TABLE .' AS U\n ON U.id = FM.auteur_id\n WHERE FM.thread_id = '. $threadId .'\n AND FM.emailnotify = 1\n AND FM.auteur_id != '. nkDB_quote($authorId) .'\n GROUP BY FM.auteur_id'\n );\n\n if (nkDB_numRows() > 0) {\n $subject = __('MESSAGE') .' : '. $postData['titre'];\n $corps = __('EMAIL_REPLY_NOTIFY') .\"\\r\\n\"\n . $nuked['url'] .'/index.php?file=Forum&page=viewtopic&forum_id='. $forumId .'&thread_id='. $threadId .\"\\r\\n\\r\\n\\r\\n\"\n . $nuked['name'] .' - '. $nuked['slogan'];\n $from = 'From: '. $nuked['name'] .' <'. $nuked['mail'] .'>' .\"\\r\\n\"\n . 'Reply-To: '. $nuked['mail'];\n\n $subject = @nkHtmlEntityDecode($subject);\n $corps = @nkHtmlEntityDecode($corps);\n $from = @nkHtmlEntityDecode($from);\n\n foreach ($dbrForumMessage as $forumMessage)\n mail($dbrForumMessage['mail'], $subject, $corps, $from);\n }\n\n // Update user Forum post stats\n if ($user)\n nkDB_update(USER_TABLE, array('count' =>array('count + 1', 'no-escape')), 'id = '. nkDB_quote($user['id']));\n\n list($url) = getForumMessageUrl($forumId, $threadId, $messId, $dbrForum['nbReplies'] + 2);\n\n printNotification(__('MESSAGE_SEND'), 'success');\n redirect($url, 2);\n}", "title": "" }, { "docid": "26fdec3db78a43ace6a137eae8989a3d", "score": "0.50578856", "text": "function sa_form_post_text(&$data)\r\n{\r\n $element = (isset($data['post_text'])) ? ' <span style=\" text-align: bottom; \">' . $post_text . '</span>' . chr(10) : '';\r\n unset($data['post_text']);\r\n return $element;\r\n}", "title": "" }, { "docid": "4f7fe4f91849785dd7bfdec2e8c8d888", "score": "0.5045549", "text": "public function testLinkReply() {\n $this->enableModules(['field']);\n $this->installSchema('comment', ['comment_entity_statistics']);\n $this->installConfig(['field']);\n\n $field_storage_comment = FieldStorageConfig::create([\n 'field_name' => 'comment',\n 'type' => 'comment',\n 'entity_type' => 'entity_test',\n ]);\n $field_storage_comment->save();\n // Create a comment field which allows threading.\n $field_comment = FieldConfig::create([\n 'field_name' => 'comment',\n 'entity_type' => 'entity_test',\n 'bundle' => 'entity_test',\n 'settings' => [\n 'default_mode' => CommentManagerInterface::COMMENT_MODE_THREADED,\n ],\n ]);\n $field_comment->save();\n\n $host = EntityTest::create(['name' => $this->randomString()]);\n $host->save();\n // Attach an unapproved comment to the test entity.\n $comment = $this->commentStorage->create([\n 'uid' => $this->adminUser->id(),\n 'entity_type' => 'entity_test',\n 'entity_id' => $host->id(),\n 'comment_type' => 'entity_test',\n 'field_name' => $field_storage_comment->getName(),\n 'status' => 0,\n ]);\n $comment->save();\n\n $view = Views::getView('test_comment');\n $view->setDisplay();\n\n $view->displayHandlers->get('default')->overrideOption('fields', [\n 'replyto_comment' => [\n 'table' => 'comment',\n 'field' => 'replyto_comment',\n 'id' => 'replyto_comment',\n 'plugin_id' => 'comment_link_reply',\n 'entity_type' => 'comment',\n ],\n ]);\n $view->save();\n\n /** @var \\Drupal\\Core\\Session\\AccountSwitcherInterface $account_switcher */\n $account_switcher = \\Drupal::service('account_switcher');\n $account_switcher->switchTo($this->adminUser);\n $view->preview();\n\n // Check if I can see the reply link on an unapproved comment.\n $replyto_comment = $view->style_plugin->getField(0, 'replyto_comment');\n $this->assertEmpty((string) $replyto_comment, \"I can't reply to an unapproved comment.\");\n\n // Approve the comment.\n $comment->setPublished();\n $comment->save();\n $view = Views::getView('test_comment');\n $view->preview();\n\n // Check if I can see the reply link on an approved comment.\n $replyto_comment = $view->style_plugin->getField(0, 'replyto_comment');\n $url = Url::fromRoute('comment.reply', [\n 'entity_type' => 'entity_test',\n 'entity' => $host->id(),\n 'field_name' => 'comment',\n 'pid' => $comment->id(),\n ]);\n $this->assertEquals((string) $replyto_comment, Link::fromTextAndUrl('Reply', $url)->toString(), 'Found the comment reply link as an admin user.');\n\n // Check if I can see the reply link as an anonymous user.\n $account_switcher->switchTo(new AnonymousUserSession());\n $view = Views::getView('test_comment');\n $view->preview();\n $replyto_comment = $view->style_plugin->getField(0, 'replyto_comment');\n $this->assertEmpty((string) $replyto_comment, \"Didn't find the comment reply link as an anonymous user.\");\n }", "title": "" }, { "docid": "0c3bc953368ecfc7490ec7934ec6d670", "score": "0.50420016", "text": "function phptemplate_comment_submitted($comment)\n{\n return t(\n '!datetime — !username',\n array(\n '!username' => theme('username', $comment),\n '!datetime' => format_date($comment->timestamp)\n )\n );\n}", "title": "" }, { "docid": "ad75909b5af0359c870220e7ea138f6c", "score": "0.5023188", "text": "public function hide_reply( $content = '', $reply_id = 0 ) {\n\n\t\tif( empty( $reply_id ) )\n\t\t\t$reply_id = bbp_get_reply_id( $reply_id );\n\n\t\tif( $this->is_moderator_only( $reply_id ) ) {\n\n\t\t\t$can_view = false;\n\n\t\t\tif( current_user_can( $this->capability ) ) {\n\t\t\t\t// Let moderators view all replies\n\t\t\t\t$can_view = true;\n\t\t\t}\n\n\t\t\tif( ! $can_view ) {\n\t\t\t\t$content = __( 'This reply has been marked as moderator-only.', 'bbpress-private-replies-enhanced' );\n\t\t\t}\n\n\t\t} elseif ( $this->is_private( $reply_id ) ) {\n\n\t\t\t$can_view = false;\n\t\t\t$current_user = is_user_logged_in() ? wp_get_current_user() : false;\n\t\t\t$topic_author = bbp_get_topic_author_id();\n\t\t\t$reply_author = bbp_get_reply_author_id( $reply_id );\n\n\t\t\tif ( ! empty( $current_user ) && $topic_author === $current_user->ID && user_can( $reply_author, $this->capability ) ) {\n\t\t\t\t// Let the thread author view replies if the reply author is from a moderator\n\t\t\t\t$can_view = true;\n\t\t\t}\n\n\t\t\tif ( ! empty( $current_user ) && $reply_author === $current_user->ID ) {\n\t\t\t\t// Let the reply author view their own reply\n\t\t\t\t$can_view = true;\n\t\t\t}\n\n\t\t\tif( current_user_can( $this->capability ) ) {\n\t\t\t\t// Let moderators view all replies\n\t\t\t\t$can_view = true;\n\t\t\t}\n\n\t\t\tif( ! $can_view ) {\n\t\t\t\t$content = __( 'This reply has been marked as private.', 'bbpress-private-replies-enhanced' );\n\t\t\t}\n\t\t}\n\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "e3b06061aa90f57166e72b4cb67e10af", "score": "0.50229096", "text": "public function action_edit_reply()\n\t{\n\t\t$this->_login_required();\n\n\t\t$this->_tpl = new View_Forum_Reply_Edit;\n\n\t\t$this->_tpl->category = $this->_category;\n\t\t$this->_tpl->topic = $this->_tpl->category->topic($this->request->param('topic'));\n\n\t\ttry {\n\t\t\t$reply = $this->_tpl->topic\n\t\t\t\t->reply($this->request->param('reply'));\n\n\t\t\tif($reply->user->id != Fusion::$user->id && !Fusion::$user->hasAccess('forum.reply.edit'))\n\t\t\t{\n\t\t\t\tRD::set(RD::WARNING, 'You can\\'t edit other people\\'s replies');\n\n\t\t\t\t$this->redirect(Route::url('forum.topic', array(\n\t\t\t\t\t'id' => $this->request->param('id'),\n\t\t\t\t\t'topic' => $this->request->param('topic')\n\t\t\t\t), true));\n\t\t\t}\n\n\t\t\t$this->_tpl->reply = $reply;\n\t\t\t$this->_tpl->submit_link = Route::url('forum.topic.reply.change', array(\n\t\t\t\t'id' => $this->request->param('id'),\n\t\t\t\t'topic' => $this->request->param('topic'),\n\t\t\t\t'reply' => $this->request->param('reply')\n\t\t\t), true);\n\n\t\t\t$this->_breadcrumb->last_item('Edit Reply');\n\t\t}\n\t\tcatch(Quill_Exception_Topic_Load $e)\n\t\t{\n\t\t\tRD::set(RD::ERROR, 'No reply found.');\n\n\t\t\t$this->redirect(Route::url('forum.topic', array(\n\t\t\t\t'id' => $this->request->param('id'),\n\t\t\t\t'topic' => $this->request->param('topic')\n\t\t\t), true));\n\t\t}\n\t}", "title": "" }, { "docid": "9f8a35a7a24ce9cb48df7c49376f0af8", "score": "0.50184596", "text": "function clean_note($text)\n{\n // Highlight PHP source\n $text = highlight_php(trim($text), TRUE);\n\n // Turn urls into links\n $text = preg_replace(\n '!((mailto:|(http|ftp|nntp|news):\\/\\/).*?)(\\s|<|\\)|\"|\\\\|\\'|$)!',\n '<a href=\"\\1\" target=\"_blank\">\\1</a>\\4',\n $text\n );\n \n return $text;\n}", "title": "" }, { "docid": "c920ac61d069a957550137c410728ea4", "score": "0.5010245", "text": "function comment_text_shortcodes( $comment_text, $comment ) { \n\t\t$comment_text = do_shortcode_only_for($comment_text, array('quote'));\n\t\treturn $comment_text; \n\t}", "title": "" }, { "docid": "65f5368e9b24da03eb7274a4b389133e", "score": "0.5006818", "text": "public function replycomment(PeepSoAjaxResponse $resp) {\n $post_id = $this->_input->int('postid');\n $act_id = $this->_input->int('actid');\n $user_id = $this->_input->int('uid');\n\n\t\t$post = $this->get_comment($post_id);\n if ($post->have_posts()) {\n $post->the_post();\n $this->post_data = get_object_vars($post->post);\n\t\t}\n\n $owner_id = intval($this->get_author_id($post_id));\n\n if (PeepSo::check_permissions($owner_id, PeepSo::PERM_COMMENT, $user_id)) {\n\n $html = PeepSoTemplate::exec_template('activity', 'comment-reply', array('act_id' => $act_id, 'PeepSoActivity' => $this), TRUE);\n\n $resp->set('html', $html);\n $resp->success(1);\n }\n }", "title": "" }, { "docid": "1e1b3604e58f1bd57a2125845a917203", "score": "0.4995318", "text": "function note_mail_on_action($user, $id, $subject, $body)\n{\n mail(NOTES_MAIL, $subject, $body, \"From: [email protected]\\r\\nIn-Reply-To: <[email protected]>\", \"-f{$user}@php.net\");\n}", "title": "" }, { "docid": "a59bd368c5f866ee2f2244398c356f7a", "score": "0.49877045", "text": "function delete_reply_confirm($post_id , $reply_id) {\n\n $ids = array('reply_id' => $reply_id, 'forum_id' => $post_id);\n return $this->db->delete('forum_reply', $ids);\n\n }", "title": "" }, { "docid": "c9e9451e584c8403f49c7ccb7e804874", "score": "0.49798205", "text": "public function process_text() {\n\n if ( ! current_user_can( 'manage_options' ) ) {\n\n return;\n\n }\n\n $post = get_post( $_POST['post_id'] );\n\n\n try {\n\n //text\n $content = strip_tags( $post->post_content );\n\n $notes = $this->plugin->analysis->feed($content);\n\n $filename = $this->plugin->music->generate($notes);\n\n $this->plugin->midi->save_to_media_library( $_POST['post_id'], $filename);\n\n } catch (Exception $e){\n\n\n wp_send_json_error($e->getMessage());\n\n }\n\n wp_send_json_success('Bibgo');\n\n }", "title": "" }, { "docid": "0b7d5ed18a90109f6db256428f97f03e", "score": "0.49791354", "text": "function bbps_admin_setting_callback_reply_count( array $args ) {\n\t$i = ( isset( $args[0] ) ) ? ( absint( $args[0] ) ) : ( 1 );\n\t$options = get_option('_bbps_reply_count');\n\t?>\n\tRank Title\n\t<input name=\"_bbps_reply_count[<?php echo $i; ?>][title]\" type=\"text\" id=\"_bbps_reply_count_title\" value=\"<?php if (isset($options[$i]['title'])) { echo $options[$i]['title']; } ?>\" />\n\tis granted when a user has at least\n\t<input name=\"_bbps_reply_count[<?php echo $i; ?>][start]\" type=\"text\" id=\"bbps_reply_count_start\" value=\"<?php if (isset($options[$i]['start'])){ echo $options[$i]['start']; } ?>\" class=\"small-text\" />\n\tposts but not more than\n\t<input name=\"_bbps_reply_count[<?php echo $i; ?>][end]\" type=\"text\" id=\"bbps_reply_count_end\" value=\"<?php if (isset($options[$i]['end'])){ echo $options[$i]['end']; }?>\" class=\"small-text\" />\n\tposts\n\t<?php\n}", "title": "" }, { "docid": "b8c882cd7bdc782724aabc2c42721d1b", "score": "0.4972927", "text": "public function email($ticketID, $replyID = 0) {\r\n $text = '';\r\n $qF = mysqli_query($GLOBALS[\"___mysqli_ston\"], \"SELECT * FROM `\" . DB_PREFIX . \"cusfields`\r\n LEFT JOIN `\" . DB_PREFIX . \"ticketfields`\r\n ON `\" . DB_PREFIX . \"cusfields`.`id` = `\" . DB_PREFIX . \"ticketfields`.`fieldID`\r\n WHERE `ticketID` = '{$ticketID}'\r\n AND `replyID` = '{$replyID}'\r\n AND `enField` = 'yes'\r\n ORDER BY `\" . DB_PREFIX . \"cusfields`.`orderBy`\r\n \") or die(mswMysqlErrMsg(((is_object($GLOBALS[\"___mysqli_ston\"])) ? mysqli_errno($GLOBALS[\"___mysqli_ston\"]) : (($___mysqli_res = mysqli_connect_errno()) ? $___mysqli_res : false)), ((is_object($GLOBALS[\"___mysqli_ston\"])) ? mysqli_error($GLOBALS[\"___mysqli_ston\"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)), __LINE__, __FILE__));\r\n if (mysqli_num_rows($qF) > 0) {\r\n while ($FIELDS = mysqli_fetch_object($qF)) {\r\n switch ($FIELDS->fieldType) {\r\n case 'checkbox':\r\n $text .= mswCleanData($FIELDS->fieldInstructions) . mswDefineNewline();\r\n $text .= str_replace('#####', mswDefineNewline(), mswCleanData($FIELDS->fieldData)) . mswDefineNewline() . mswDefineNewline();\r\n break;\r\n default:\r\n $text .= mswCleanData($FIELDS->fieldInstructions) . mswDefineNewline();\r\n $text .= mswCleanData($FIELDS->fieldData) . mswDefineNewline() . mswDefineNewline();\r\n break;\r\n }\r\n }\r\n }\r\n return ($text ? trim($text) : 'N/A');\r\n }", "title": "" }, { "docid": "57369ec1a44a151205931955a58e51af", "score": "0.49718854", "text": "public static function wcap_reply_email_callback( $args ) {\n\t\t\t// First, we read the option\n\t\t\t$wcap_reply_email = get_option( 'wcap_reply_email' );\n\t\t\t// Next, we update the name attribute to access this element's ID in the context of the display options array\n\t\t\t// We also access the show_header element of the options collection in the call to the checked() helper function\n\t\t\tprintf(\n\t\t\t\t'<input type=\"text\" id=\"wcap_reply_email\" name=\"wcap_reply_email\" value=\"%s\" />',\n\t\t\t\tisset( $wcap_reply_email ) ? esc_attr( $wcap_reply_email ) : ''\n\t\t\t);\n\t\t\t// Here, we'll take the first argument of the array and add it to a label next to the checkbox\n\t\t\t$html = '<label for=\"wcap_reply_email_label\"> ' . $args[0] . '</label>';\n\t\t\techo $html;\n\t\t}", "title": "" }, { "docid": "c3201ae71d38caaaaa9daff16d616c7b", "score": "0.49663225", "text": "public function reply($pageID = 1)\n {\n if($this->app->user->account == 'guest') $this->locate(inlink('login'));\n\n /* Load pager. */\n $this->app->loadClass('pager', $static = true);\n $pager = new pager(0, $this->config->user->recPerPage->reply, $pageID);\n\n /* Load the thread lang thus to rewrite the page lang items. */\n $this->app->loadLang('thread'); \n\n $this->view->title = $this->lang->user->reply;\n $this->view->replies = $this->loadModel('reply')->getByUser($this->app->user->account, $pager);\n $this->view->pager = $pager;\n $this->view->mobileURL = helper::createLink('user', 'reply', \"pageID=$pageID\", '', 'mhtml');\n $this->view->desktopURL = helper::createLink('user', 'reply', \"pageID=$pageID\", '', 'html');\n\n $this->display();\n }", "title": "" }, { "docid": "2e0ac1baecbec946510f3a23ceddfedb", "score": "0.49641743", "text": "function cleanyeti_commenter_link() {\n\t$commenter = get_comment_author_link();\n\t$avatar_email = get_comment_author_email();\n\t$avatar_size = apply_filters( 'avatar_size', '80' ); // Available filter: avatar_size\n\t$avatar = str_replace( \"class='avatar\", \"class='photo avatar\", get_avatar( $avatar_email, $avatar_size ) );\n\techo $avatar . ' <span class=\"fn n\">' . $commenter . '</span>';\n}", "title": "" }, { "docid": "8d77f126b4bbb878e4648b1b4ed794f6", "score": "0.49601412", "text": "function revert($string)\n{\n\t$string = preg_replace(\"/<a href='mailto:(.*?)'>\\\\1<\\/a>/\", \"$1\", $string);\n\t$string = preg_replace(\"`<a href='\" . str_replace(\"?\", \"\\?\", makeLink(\"post\", \"(\\d+)\")) . \"'[^>]*>(.*?)<\\/a>`e\", \"'[post:$1' . ('$2' ? ' $2' : '') . ']'\", $string);\n\t$string = preg_replace(\"`<a href='\" . str_replace(\"?\", \"\\?\", makeLink(\"(\\d+)\")) . \"'[^>]*>(.*?)<\\/a>`\", \"[conversation:$1 $2]\", $string);\n\t$string = preg_replace(\"/<a href='(?:\\w+:\\/\\/)?(.*?)'>\\\\1<\\/a>/\", \"$1\", $string);\n\t$string = preg_replace(\"/<a(.*?)>(.*?)<\\/a>/\", \"&lt;a$1&gt;$2&lt;/a&gt;\", $string);\n\t\t\n\treturn $string;\n}", "title": "" }, { "docid": "9dddb492e547f7b7b1292574a273d797", "score": "0.4953309", "text": "public function getPostCreateItemReply()\n {\n $title = \"H&G - Reply\";\n $view = $this->di->get(\"view\");\n $pageRender = $this->di->get(\"pageRender\");\n $form = new CreateReplyForm($this->di);\n\n $form->check();\n\n $data = [\n \"form\" => $form->getHTML(),\n ];\n\n $view->add(\"reply/reply\", $data);\n\n $pageRender->renderPage([\"title\" => $title]);\n }", "title": "" }, { "docid": "7f8300df9c8b073145dc4757663498c4", "score": "0.49506247", "text": "public function emailReply()\n {\n $app = App::getInstance();\n $reply = $this->getReply();\n\n // Get content\n ob_start();\n $data = array(\n 'app' => $app,\n 'comment' => $this,\n 'reply' => $reply,\n );\n // Render email template\n call_user_func(function () use ($data) {\n extract($data);\n include realpath(__DIR__ . '/../../../templates/') . '/comment_reply_notification.php';\n });\n $content = ob_get_contents();\n ob_end_clean();\n\n // Create message\n $message = \\Swift_Message::newInstance()\n ->setSubject($this->getName() . ' has replied to your comment on \"'.$this->getArticle()->getTitle().'\"')\n ->setTo(array(\n $reply->getEmail() => $reply->getName(),\n ))\n ->setFrom(array(Settings::get('email_replyto_addr') => Settings::get('email_replyto_name')))\n ->setBody($content, 'text/html');\n\n // Send message\n return $app['email']->send($message);\n }", "title": "" }, { "docid": "df2d544d05a4322f73b9ad4953dbfee3", "score": "0.4949509", "text": "public function reply() {\n $postStr = $GLOBALS [\"HTTP_RAW_POST_DATA\"];\n // file_put_contents ( \"request.txt\", $postStr );\n\n if (!empty($postStr)){\n $this->request = ( array ) simplexml_load_string ( $postStr, 'SimpleXMLElement', LIBXML_NOCDATA );\n $message = self::reply_main($this->request, $this);//reply_main\n\n if (!is_array($message)) {\n $ret = $this->replyText($message);\n } else {\n $ret = $this->replyNews($message);\n }\n echo $ret;\n }else {\n echo \"success\";\n exit;\n }\n }", "title": "" }, { "docid": "547c34fd1fc1e3e0ca3a6772c632ad01", "score": "0.494437", "text": "public function rest_post_conversation() {\n\t\tif(strlen($this->arg) == 0) $this->status = 'ERROR_GET_NOT_SET';\n\t\tif(!is_numeric(str_replace(',', '.', $this->arg))) $this->status = 'ERROR_NON_NUMERIC_INTEREST_ID';\n\t\tif(substr($this->status,0,5) == 'ERROR') return;\n\n\t\tif(!isset($_POST['text'])) $_POST['text'] = '';\n\t\t$this->set_response(\n\t\trMessages::post_message_by_match($this->arg, $this->getLoggedUserId(), $_POST['text'])\n\t\t);\n\t}", "title": "" }, { "docid": "adc16366c827ea52b8dc7b67d097884e", "score": "0.49420363", "text": "public function action_delete_reply()\n\t{\n\t\t$this->_login_required();\n\n\t\t$this->_tpl = new View_Forum_Reply_Edit;\n\n\t\t$topic = $this->_category->topic($this->request->param('topic'));\n\n\t\ttry {\n\t\t\t$reply = $topic\n\t\t\t\t->reply($this->request->param('reply'));\n\n\t\t\tif($reply->user->id != Fusion::$user->id && !Fusion::$user->hasAccess('forum.reply.delete'))\n\t\t\t{\n\t\t\t\tRD::set(RD::WARNING, 'You can\\'t delete other people\\'s replies');\n\n\t\t\t\t$this->redirect(Route::url('forum.topic', array(\n\t\t\t\t\t'id' => $this->request->param('id'),\n\t\t\t\t\t'topic' => $this->request->param('topic')\n\t\t\t\t), true));\n\t\t\t}\n\n\t\t\t$reply->delete();\n\n\t\t\tRD::set(RD::SUCCESS, 'You\\'ve successfully deleted your reply!');\n\t\t\t$this->redirect(Route::url('forum.topic', array(\n\t\t\t\t'id' => $this->request->param('id'),\n\t\t\t\t'topic' => $this->request->param('topic')\n\t\t\t), true));\n\t\t}\n\t\tcatch(Quill_Exception_Topic_Load $e)\n\t\t{\n\t\t\tRD::set(RD::ERROR, 'No reply found.');\n\t\t\t$this->redirect(Route::url('forum.topic', array(\n\t\t\t\t'id' => $this->request->param('id'),\n\t\t\t\t'topic' => $this->request->param('topic')\n\t\t\t), true));\n\t\t}\n\n\t}", "title": "" }, { "docid": "473b85e611ac8d791136976e8e6849d7", "score": "0.4939494", "text": "function comment_mail_notify($comment_id) {\n\t\t$comment = get_comment($comment_id);\n\t\t$parent_id = $comment->comment_parent ? $comment->comment_parent : '';\n\t\t$spam_confirmed = $comment->comment_approved;\n\t\tif (($parent_id != '') && ($spam_confirmed != 'spam')) {\n\t\t\t$wp_email = 'no-reply@' . preg_replace('#^www.#', '', strtolower($_SERVER['SERVER_NAME'])); //e-mail 发出点, no-reply 可改为可用的 e-mail.\n\t\t\t$to = trim(get_comment($parent_id)->comment_author_email);\n\t\t\t$subject = '您在 [' . get_option(\"blogname\") . '] 的留言有了回复';\n\t\t\t$message = '\n\t\t\t\t<div style=\"background-color:#eef2fa; border:1px solid #d8e3e8; color:#111; padding:0 15px; -moz-border-radius:5px; -webkit-border-radius:5px; -khtml-border-radius:5px;\">\n\t\t\t\t<p><strong>' . trim(get_comment($parent_id)->comment_author) . '</strong>, 您好!</p>\n\t\t\t\t<p>您曾在 <a href=\"'.site_url( '/' ).'\" target=\"_blank\">'.get_option('blogname').'</a> 《' . get_the_title($comment->comment_post_ID) . '》的留言:</p>\n\t\t\t\t<p style=\"text-indent:2em;\">'. trim(get_comment($parent_id)->comment_content) . '</p>\n\t\t\t\t<hr />\n\t\t\t\t<p> <a href=\"'.site_url( '/' ).'\" target=\"_blank\">'. trim($comment->comment_author) . '</a> 给您的回复:</p>\n\t\t\t\t<p style=\"text-indent:2em;\">'. trim($comment->comment_content) . '</p>\n\t\t\t\t<p>您可以点击 <a href=\"'.get_permalink( $comment->comment_post_ID ).'#comment-'.$parent_id.'\" target=\"_blank\">查看回复完整內容</a></p>\n\t\t\t\t<hr />\n\t\t\t\t<p>欢迎再度光临 <a href=\"'.site_url( '/' ).'\" target=\"_blank\">'.get_option('blogname').'</a> </p>\n\t\t\t\t<p>(此邮件由系统自动发送,请勿回复.)</p>\n\t\t\t</div>';\n\t\t\t$from = \"From: \\\"\" . get_option('blogname') . \"\\\" <$wp_email>\";\n\t\t\t$headers = \"$from\\nContent-Type: text/html; charset=\" . get_option('blog_charset') . \"\\n\";\n\t\t\twp_mail( $to, $subject, $message, $headers );\n\t\t}\n\t}", "title": "" }, { "docid": "475f31741ddf674c799d053a5b1b2745", "score": "0.49332425", "text": "function filter($text, $mentionid='6'){\n\t//Prevent xss\n\t$text = htmlspecialchars($text);\n\t\n\t//Star out bad words\n\tif (getInfo((int) @$_SESSION['id'], 'filter') == '1' || !@$_SESSION['id']) {\n\t\t$filterWords = array(\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'fuck','mother fucker','motherfucking','motherfucker','fucked','shit','hell','bitch','bitches','goddamn','dick','dicks','whore','vagina','vaginas','pussy','damn','tit','tits','crap','fag','fucker','fuckable','fuckboy','fucky','nigger','nigga','ass','boobies','cunt','boobs','porn','fucking','retarded','sex','truffle butter','sexy','poussey','cum','cumm','cumming','jizz','arse','arsehole','arse hole','g-spot','g spot','wanker','penis');\n\t\t$filterCount = sizeof($filterWords);\n\n\t\tfor($i=0; $i<$filterCount; $i++){\n\t\t\t$text = preg_replace('/\\b'.$filterWords[$i].'\\b/ie',\"str_repeat('*',strlen('$0'))\",$text);\n\t\t}\n\t}\n\t\t\n\t//Make links clickable\n\t$text = linkify($text, $mentionid);\n\n\t//Preserve line breaks\n\t$text = nl2br($text);\n\n\treturn $text;\n}", "title": "" }, { "docid": "1eb6d491c2683d636b15f7834179fe80", "score": "0.49310803", "text": "public function commentReply(int $id)\n {\n $back_url = BLOG_ADMIN_URL.\"comments\";\n $self_url = BLOG_ADMIN_URL.\"commentReply/$id\";\n\n $data = Models::blogComments()->getOne($id);\n if (count($data)==0) {\n return $this->errorMessage(\"Couldn't find the comment.\", $back_url);\n }\n\n $this->data['sub_title'] = _l(\"Replay\", $this);\n\n $language = Models::languages()->getOne($data['language_id']);\n $form_attr = array('data-redirect'=>1);\n $myform = new Form($this);\n $config = array(\n array(\n 'field'=>\"language_id\",\n 'label'=>_l(\"Language\", $this),\n 'type'=>\"static\",\n 'value'=>$language['language_title'],\n ),\n array(\n 'field' => 'comment',\n 'label' => _l(\"Comment\", $this),\n 'type' => \"static\",\n 'value'=>$data['comment_content'],\n ),\n array(\n 'field' => 'comment_content',\n 'label' => _l(\"Replay\", $this),\n 'type' => \"textarea\",\n 'rules' => 'required',\n ),\n );\n\n $myform->config($config, $self_url, 'post', 'ajax');\n if ($myform->ispost()) {\n if (!Services::identity()->isAdmin()) {\n return Services::identity()->getResponse();\n }\n $post_data = $myform->getPost();\n // Stop Page\n if ($post_data === false) {\n return $myform->getResponse();\n }\n\n $post_data['language_id'] = $data['language_id'];\n $post_data['reply_to'] = $data['reply_to']!=0 ? $data['reply_to'] : $id;\n $post_data['user_id'] = $this->userdata['user_id'];\n $post_data['post_id'] = $data['post_id'];\n $post_data['admin_side'] = 1;\n $post_data['comment_read'] = 1;\n $post_data['comment_name'] = $this->userdata['fullname'];\n\n $new_id = Models::blogComments()->add($post_data);\n return $this->successMessage(\"The comment's replay has been added successfully.\", $back_url);\n }\n\n if ($data['comment_read']==0) {\n Models::blogComments()->edit($id, array('comment_read'=>1));\n }\n\n $myform->data['form_title'] = _l(\"Comment replay\", $this);\n return $myform->fetch(\"\", $form_attr);\n }", "title": "" }, { "docid": "1a9170283ecaf9d082afd68ea74be947", "score": "0.4930671", "text": "function submit_midwife_submit_button_text( $text ) {\n\t$text = __('Submit', 'babyhallo');\n\treturn $text;\n}", "title": "" }, { "docid": "2bc7f4413c8cb072d69adf9fcfbe6311", "score": "0.49304637", "text": "public function replyText($text){\r\n\t\treturn $this->replyMethod(\"sendMessage\" , [\"text\" => $text]);\r\n\t}", "title": "" }, { "docid": "6e6bd2857c7e4597dfc82821816a37c9", "score": "0.49291238", "text": "public function rateUpReply()\n {\n //prevent CSRF\n if (!isset($_POST['token']) || !Token::check($_POST['token'], false))\n {\n echo json_encode(['error' => self::$language->invokeOutput('frequent/badRequest')]);\n }else{\n $rateReply = repliesAPI::getInstance()->rateReply($_POST['id']);\n if (is_string($rateReply) )\n echo json_encode([\"done\" => $rateReply]);\n else\n {\n if (is_array($rateReply))\n echo json_encode([\"error\" => $rateReply[0]]);\n else\n echo json_encode([\"error\" => Controller::$language->invokeOutput('frequent/wrong')]);\n }\n }\n }", "title": "" }, { "docid": "169c654465f9cec5a7e0b1d2a53527af", "score": "0.49273646", "text": "function mf_gettext( $translated_text, $text, $domain ) {\n\t\n\tif ( 'buddypress' !== $domain ) \n return $translated_text; \n \n\tswitch ( $text ) {\n\t\n\t\tcase 'Notification successfully marked read.':\n\t\t\treturn 'Notification successfully marked as Viewed.';\n\t\n\t\tcase 'Notification successfully marked unread.':\n\t\t\treturn 'Notification successfully marked as Not Viewed.';\t\t\n\t\t\n default:\n return $translated_text;\t\n\t\n\t}\n}", "title": "" }, { "docid": "ad3d11a7029359e40cd2a01a96b70440", "score": "0.4909656", "text": "public function reply()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'comment', 'create')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\tif (!empty($_POST)) {\n\t\t\t$data = array(\n\t\t\t\t'id_parent' => $this->postring->valid($_POST['id_parent'], 'sql'),\n\t\t\t\t'id_post' => $this->postring->valid($_POST['id_post'], 'sql'),\n\t\t\t\t'name' => $_SESSION['namalengkap'],\n\t\t\t\t'email' => $this->posetting[5]['value'],\n\t\t\t\t'url' => WEB_URL,\n\t\t\t\t'comment' => $this->postring->valid($_POST['comment'], 'xss'),\n\t\t\t\t'date' => date('Y-m-d'),\n\t\t\t\t'time' => date('h:m:s'),\n\t\t\t\t'active' => 'Y',\n\t\t\t\t'status' => 'Y'\n\t\t\t);\n\t\t\t$query_comment = $this->podb->insertInto('comment')->values($data);\n\t\t\tif ($query_comment->execute()) {\n\t\t\t\t$this->poflash->success($GLOBALS['_']['comment_message_1'], 'admin.php?mod=comment');\n\t\t\t} else {\n\t\t\t\t$this->poflash->error($GLOBALS['_']['comment_message_3'], 'admin.php?mod=comment');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "02ae51d521be2e40bdff36ac64b152d0", "score": "0.49095535", "text": "function pwps_get_copyright_text() {\n\t\t// dynamic content\n\t\t$pattern = array( '%COPY%', '%YEAR%', '%SITENAME%' );\n\t\t$replace = array( '&copy;', date( 'Y' ), esc_html( get_option( 'blogname' ) ) );\n\t\t$ct = (string) premise_get_value( 'pwps_customizer_options[footer][copyright]' );\n\n\t\treturn (string) str_replace( $pattern, $replace, $ct );\n\n\t}", "title": "" }, { "docid": "beb2fc206b80ce1b99f7bd426ba6a2e4", "score": "0.49019787", "text": "function custom_comments($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment;\n $GLOBALS['comment_depth'] = $depth;\n ?>\n <li id=\"comment-<?php comment_ID() ?>\" <?php comment_class() ?>>\n <div class=\"comment-author vcard\"><?php commenter_link() ?></div>\n <div class=\"comment-meta\"><?php printf(__('Posted %1$s at %2$s <span class=\"meta-sep\">|</span> <a href=\"%3$s\" title=\"Permalink to this comment\">Permalink</a>', 'your-theme'),\n get_comment_date(),\n get_comment_time(),\n '#comment-' . get_comment_ID() );\n edit_comment_link(__('Edit', 'your-theme'), ' <span class=\"meta-sep\">|</span> <span class=\"edit-link\">', '</span>'); ?></div>\n <?php if ($comment->comment_approved == '0') _e(\"\\t\\t\\t\\t\\t<span class='unapproved'>Your comment is awaiting moderation.</span>\\n\", 'your-theme') ?>\n <div class=\"comment-content\">\n <?php comment_text() ?>\n </div>\n <?php // echo the comment reply link\n if($args['type'] == 'all' || get_comment_type() == 'comment') :\n comment_reply_link(array_merge($args, array(\n 'reply_text' => __('Reply','your-theme'),\n 'login_text' => __('Log in to reply.','your-theme'),\n 'depth' => $depth,\n 'before' => '<div class=\"comment-reply-link\">',\n 'after' => '</div>'\n )));\n endif;\n ?>\n<?php }", "title": "" }, { "docid": "7ef9e9d7b6456f9cf553f1c46e0e349d", "score": "0.48974335", "text": "function custom_related_products_text( $translated_text, $text, $domain ) {\n switch ( $translated_text ) {\n case 'Related products' :\n $translated_text = __( 'You May Also Like', 'woocommerce' );\n break;\n }\n return $translated_text;\n}", "title": "" }, { "docid": "08e1b6376b6f1baa1998e92f09a48108", "score": "0.48881757", "text": "function wpsyslog_comment_post($arg='null', $arg2='null') {\n\tglobal $wpsyslogHaveTriggered, $wpsyslogDoTrigger;\n\tif ('true' === $wpsyslogDoTrigger['comment_post']) {\n\t\t$name = $arg;\n\t\tif ( is_numeric($arg) ) {\n\t\t\t$commentdata = get_comment($arg);\n\t\t\t$name = $commentdata->comment_author;\n\t\t\t$postdata = get_post($commentdata->comment_post_ID);\n\t\t\t$posttitle = $postdata->post_title;\n\n\t\t\tif (1 == $commentdata->comment_approved)\n\t\t\t\t$commentstatus = __('approved', 'wpsyslog');\n\t\t\telseif (0 == $commentdata->comment_approved)\n\t\t\t\t$commentstatus = __('not approved', 'wpsyslog');\n\t\t\telseif ('spam' == $commentdata->comment_approved)\n\t\t\t\t$commentstatus = __('spam', 'wpsyslog');\n\t\t\telse\n\t\t\t\t$commentstatus = 'undefined';\n\t\t}\n\t\twpsyslog('core', sprintf( __('Comment posted. Comment Id: #%1$s, name: %2$s. Post Id: #%3$s, name: %4$s. Comment status: %5$s.', 'wpsyslog'), $arg, $name, $commentdata->comment_post_ID, $posttitle, $commentstatus ), 1);\n\t\t$wpsyslogHaveTriggered['comment_post'] = true;\n\t}\n}", "title": "" }, { "docid": "1e6b460294a8c659f2a875d6c3fefa07", "score": "0.4887968", "text": "function acf_localize_text($text)\n{\n}", "title": "" }, { "docid": "bed3acabd113c09c7e882d9e86f1d12a", "score": "0.48756945", "text": "function instapress_comment_reply_link( $link ) {\n if ( get_option( 'comment_registration' ) && ! is_user_logged_in() ) {\n $link = (string) null;\n }\n\n return $link;\n}", "title": "" }, { "docid": "a9fca08cf7256fb082c0ddf15c98ab80", "score": "0.48749885", "text": "function cleanText( $text )\n\t{\n\t\t$bbcode = & JCommentsFactory::getBBCode();\n\t\t\n\t\t$text = $bbcode->filter($text, true);\n\t\t$text = str_replace('<br />', ' ', $text);\n\t\t$text = preg_replace('/(\\s){2,}/i', '\\\\1', $text);\n\t\t$text = preg_replace(\"'<script[^>]*>.*?</script>'si\", '', $text);\n\t\t$text = preg_replace('/<a\\s+.*?href=\"([^\"]+)\"[^>]*>([^<]+)<\\/a>/is', '\\2 (\\1)', $text);\n\t\t$text = preg_replace('/<!--.+?-->/', '', $text);\n\t\t$text = preg_replace('/{.+?}/', '', $text);\n\t\t$text = preg_replace('/&nbsp;/', ' ', $text);\n\t\t$text = preg_replace('/&amp;/', ' ', $text);\n\t\t$text = preg_replace('/&quot;/', ' ', $text);\n\t\t$text = strip_tags($text);\n\t\t$text = htmlspecialchars($text);\n\t\t$text = html_entity_decode($text);\n\t\t\n\t\treturn $text;\n\t}", "title": "" }, { "docid": "d274ef9c77687e4e1b0b58055fd185f8", "score": "0.48730844", "text": "function get_opus_tweet_meta(){\n\t// Get tweet time\n\t$current_timestamp \t= current_time( 'timestamp' );\n\t$post_time \t\t\t= get_the_date();\n\t$post_timestamp \t= strtotime( $post_time );\n\t$since \t\t\t\t= \"<abbr title='$post_time' style='font-weight: bold; border-bottom: 1px dotted #afafaf; cursor: pointer;'>\" . human_time_diff( $post_timestamp, $current_timestamp ) . \"</abbr>\";\n\n\t// Display in reply to link\n\t$reply_id \t\t\t= get_post_meta( get_the_ID(), 'ozh_ta_reply_to_tweet', true );\n\t$reply_name \t\t= get_post_meta( get_the_ID(), 'ozh_ta_reply_to_name', true );\n\n\tif( $reply_id && $reply_name ){\n\t\t$reply_href = \"http://twitter.com/statuses/$reply_id/\";\n\t\t$reply_message = sprintf( __( 'In reply to %s', 'opus_tweets' ), $reply_name );\n\t\t$reply_link = \"<a href='$reply_href' title='$reply_message' target='_blank'>$reply_message</a>\";\n\n\t\t$cite = sprintf( __( 'Tweeted %s %s ago', 'opus_tweets' ), $reply_link, $since );\n\t} else {\n\t\t$cite = sprintf( __( 'Tweeted %s ago', 'opus_tweets' ), $since ); \n\t}\t\t\n\n\treturn $cite;\n}", "title": "" }, { "docid": "214bcbbe63145e816ba5189e8c27bfc4", "score": "0.48685125", "text": "function parse($mf, $refURL=false, $maxTextLength=150, $maxLines=2) {\n // This is used to check for an explicit in-reply-to property set to this URL.\n\n // Remove the scheme from the refURL and treat http and https links as the same\n removeScheme($refURL);\n\n $type = 'mention';\n $published = false;\n $name = false;\n $text = false;\n $url = false;\n $author = array(\n 'name' => false,\n 'photo' => false,\n 'url' => false\n );\n $rsvp = null;\n\n if(array_key_exists('type', $mf) && in_array('h-entry', $mf['type']) && array_key_exists('properties', $mf)) {\n $properties = $mf['properties'];\n\n if(array_key_exists('author', $properties)) {\n $authorProperty = $properties['author'][0];\n if(is_array($authorProperty)) {\n\n if(array_key_exists('name', $authorProperty['properties'])) {\n $author['name'] = $authorProperty['properties']['name'][0];\n }\n\n if(array_key_exists('url', $authorProperty['properties'])) {\n $author['url'] = $authorProperty['properties']['url'][0];\n }\n\n if(array_key_exists('photo', $authorProperty['properties'])) {\n $author['photo'] = $authorProperty['properties']['photo'][0];\n }\n\n } elseif(is_string($authorProperty)) {\n $author['url'] = $authorProperty;\n }\n }\n\n if(array_key_exists('published', $properties)) {\n $published = $properties['published'][0];\n }\n\n if(array_key_exists('url', $properties)) {\n $url = $properties['url'][0];\n }\n\n // If the post has an explicit in-reply-to property, verify it matches $refURL and set the type to \"reply\"\n if($refURL && array_key_exists('in-reply-to', $properties)) {\n // in-reply-to may be a string or an h-cite\n foreach($properties['in-reply-to'] as $check) {\n removeScheme($check);\n if(is_string($check) && $check == $refURL) {\n $type = 'reply';\n continue;\n } elseif(is_array($check)) {\n if(array_key_exists('type', $check) && in_array('h-cite', $check['type'])) {\n if(array_key_exists('properties', $check) && array_key_exists('url', $check['properties'])) {\n if(in_array($refURL, $check['properties']['url'])) {\n $type = 'reply';\n }\n }\n }\n }\n }\n }\n\n // Check if the reply is an RSVP\n if(array_key_exists('rsvp', $properties)) {\n $rsvp = $properties['rsvp'][0];\n $type = 'rsvp';\n }\n\n // Check if the reply is an invitation\n if(array_key_exists('invitee', $properties)) {\n $inviteeProperty = $properties['invitee'][0];\n if(is_array($inviteeProperty)) {\n\n if(array_key_exists('name', $inviteeProperty['properties'])) {\n $invitee['name'] = $inviteeProperty['properties']['name'][0];\n }\n\n if(array_key_exists('url', $inviteeProperty['properties'])) {\n $invitee['url'] = $inviteeProperty['properties']['url'][0];\n }\n\n if(array_key_exists('photo', $inviteeProperty['properties'])) {\n $invitee['photo'] = $inviteeProperty['properties']['photo'][0];\n }\n\n } elseif(is_string($inviteeProperty)) {\n $invitee['url'] = $inviteeProperty;\n }\n $type = 'invite';\n }\n\n // Check if this post is a \"repost\"\n if($refURL && array_key_exists('repost-of', $properties)) {\n removeScheme($properties['repost-of']);\n if(in_array($refURL, $properties['repost-of']))\n $type = 'repost';\n }\n\n // Also check for \"u-repost\" since some people are sending that. Probably \"u-repost-of\" will win out.\n if($refURL && array_key_exists('repost', $properties)) {\n removeScheme($properties['repost']);\n if(in_array($refURL, $properties['repost']))\n $type = 'repost';\n }\n\n if($refURL && array_key_exists('like-of', $properties)) {\n removeScheme($properties['like-of']);\n if(in_array($refURL, $properties['like-of']))\n $type = 'like';\n }\n\n // Check if this post is a \"like\"\n if($refURL && array_key_exists('like', $properties)) {\n removeScheme($properties['like']);\n if(in_array($refURL, $properties['like']))\n $type = 'like';\n }\n\n // From http://indiewebcamp.com/comments-presentation#How_to_display\n\n // If the entry has an e-content, and if the content is not too long, use that\n if(array_key_exists('content', $properties)) {\n $content = $properties['content'][0];\n if ((is_array($content) && array_key_exists('value', $content)) || is_string($content)) {\n if (is_array($content)) {\n $content = $content['value'];\n }\n\n $visibleLines = array_filter(explode(\"\\n\", $content));\n if(strlen($content) <= $maxTextLength && count($visibleLines) <= $maxLines) {\n $text = $content;\n }\n }\n // If the content is not a string or array with “value”, something is wrong.\n }\n\n // If there is no e-content, or if it is too long\n if($text == false) {\n // if the h-entry has a p-summary, and the text is not too long, use that\n if(array_key_exists('summary', $properties)) {\n $summary = $properties['summary'][0];\n if(is_array($summary) && array_key_exists('value', $summary))\n $summary = $summary['value'];\n\n if(strlen($summary) <= $maxTextLength) {\n $text = $summary;\n } else {\n // if the p-summary is too long, then truncate the p-summary\n $text = truncate($summary, $maxTextLength, $maxLines);\n }\n } else {\n // if no p-summary, but there is an e-content, use a truncated e-content\n if(array_key_exists('content', $properties)) {\n // $content already exists from line 127, and is guaranteed to be a string.\n $text = truncate($content, $maxTextLength, $maxLines);\n }\n }\n }\n\n // If there is no e-content and no p-summary\n if($text == false) {\n // If there is a p-name, and it's not too long, use that\n if(array_key_exists('name', $properties)) {\n $pname = $properties['name'][0];\n if(strlen($pname) <= $maxTextLength) {\n $text = $pname;\n } else {\n // if the p-name is too long, truncate it\n $text = truncate($pname, $maxTextLength, $maxLines);\n }\n }\n }\n\n // Now see if the \"name\" property of the h-entry is unique or part of the content\n if(array_key_exists('name', $properties)) {\n $nameSanitized = strtolower(strip_tags($properties['name'][0]));\n $nameSanitized = preg_replace('/ ?\\.+$/', '', $nameSanitized); // Remove trailing ellipses\n // Using the already truncated version of the content here. But the \"name\" would not have been truncated so may be longer than the content.\n $contentSanitized = strtolower(strip_tags($text));\n $contentSanitized = preg_replace('/ ?\\.+$/', '', $contentSanitized); // Remove trailing ellipses\n\n // If this is a \"mention\" instead of a \"reply\", and if there is no \"content\" property,\n // then we actually want to use the \"name\" property as the name and leave \"text\" blank.\n if($type == 'mention' && !array_key_exists('content', $properties)) {\n $name = $properties['name'][0];\n $text = false;\n } else {\n if($nameSanitized != $contentSanitized and $nameSanitized !== '') {\n // If the name is the beginning of the content, we don't care\n // Same if the content is the beginning of the name (like with really long notes)\n if(!(strpos($contentSanitized, $nameSanitized) === 0) && !(strpos($nameSanitized, $contentSanitized) === 0)) {\n // The name was determined to be different from the content, so return it\n $name = $properties['name'][0]; //truncate($properties['name'][0], $maxTextLength, $maxLines);\n }\n }\n }\n }\n\n }\n\n $result = array(\n 'author' => $author,\n 'published' => $published,\n 'name' => $name,\n 'text' => $text,\n 'url' => $url,\n 'type' => $type\n );\n\n if($type == 'invite')\n $result['invitee'] = $invitee;\n\n if($rsvp !== null) {\n $result['rsvp'] = $rsvp;\n }\n\n return $result;\n}", "title": "" }, { "docid": "9548478bf7b0ae7d8878915c78016364", "score": "0.48623633", "text": "function do_store_post_reply($post_id) {\r\n // echo '<pre>'; print_r($_POST); die();\r\n foreach(array(\"description\",\"replied_by\") as $i)\r\n\t\t\t$$i=$this->input->post($i);\r\n $replied_on = time();$status=1;\r\n $this->db->query(\"insert into m_stream_post_reply(description,post_id,replied_by,replied_on,status) values(?,?,?,?,?)\",array($this->prep($description),$post_id,$replied_by,$replied_on,$status));\r\n }", "title": "" }, { "docid": "099c88a95e63edf81ec4ffd1ca703f40", "score": "0.4861939", "text": "function reply_topic_form() {\r\n\techo \"<div class=\\\"box\\\">\";\r\n\tif( isset( $_SESSION['user_id'] ) ) {\r\n\t\techo \"<h1>Reply this topic:</h1>\";\r\n\t\techo \"<a name=\\\"comment\\\"></a>\";\r\n\t\tif( isset( $_SESSION['msg-err-reply']['empty-field'] ) ) {\r\n\t\t\techo \"<p class=\\\"err\\\"><b>Pesan kesalahan:</b><br>\".$_SESSION['msg-err-reply']['empty-field'].\"</p>\";\r\n\t\t\tunset( $_SESSION['msg-err-reply']['empty-field'] );\r\n\t\t}\r\n\t\techo \"<form method=\\\"post\\\" action=\\\"\\\">\";\r\n\t\techo \"Komentar Anda<br><textarea name=\\\"reply\\\" rows=\\\"3\\\" cols=\\\"87\\\"></textarea><br>\";\r\n\t\techo \"<input type=\\\"submit\\\" name=\\\"action\\\" value=\\\"Reply Topic\\\">\";\r\n\t\techo \"<input type=\\\"hidden\\\" name=\\\"topicid\\\" value=\\\"\".$_GET['topicid'].\"\\\">\";\r\n\t\techo \"</form>\";\r\n\t} else {\r\n\t\techo \"<h1>Comment Disabled</h1>\";\r\n\t\techo \"<p>For any reason, comment feature has been disabled by Administrator. Please contact Administrator for further information.</p>\";\r\n\t}\r\n\techo \"</div>\";\r\n}", "title": "" }, { "docid": "13af2257f06ea593cfe575a3a8c1f959", "score": "0.48607022", "text": "function renren_comment(&$comment, $op) {\n global $user;\n if (!is_array($comment)) {\n $comment = (array)$comment;\n }\n $comment_body = renren_clean_data($comment['comment']);\n $comment_subject = renren_clean_data($comment['subject']);\n \n if ($body_pattern = variable_get('renren_template_comment_body', '')) {\n $body = '{\"'.$body_pattern.'\" : \"'.$comment_body.'\"}';\n }\n\n if ($title_pattern = variable_get('renren_template_comment_title', '')) {\n $title = '{\"'.$title_pattern.'\" : \"'.$comment_subject.'\"}';\n }\n //$body = '{\"content\":\"'.$comment_body.'\"}';\n //$title = '{\"feedtype\":\"'.$comment_subject.'\"}';\n \n // if renren user logined\n $comment_author = renren_user_profile();\n if (isset($comment_author)) {\n global $RR_client;\n $result = $RR_client->POST('feed.publishTemplatizedAction', array(1, $title, $body));\n if ($result->result) {\n drupal_set_message('Successful share this comment on renren');\n }\n else {\n drupal_set_message('Renren Error: '.$result->error_msg);\n drupal_set_message('Renren Error Code: '.$result->error_code);\n }\n }\n}", "title": "" }, { "docid": "ba6505f1e79b68c30a703a42791698b0", "score": "0.4857452", "text": "public function replace_post_button_label( $translation, $text, $context, $domain ) {\n\t\tif ( 'o2' !== $domain || 'Verb, to post' !== $context || 'Post' !== $text ) {\n\t\t\treturn $translation;\n\t\t}\n\n\t\tremove_filter( 'gettext_with_context', [ $this, 'replace_post_button_label' ] );\n\n\t\tif ( $this->user_can_publish() ) {\n\t\t\treturn $translation;\n\t\t}\n\n\t\treturn __( 'Submit for review', 'o2' );\n\t}", "title": "" } ]
da6ec908bbbb06563d855c1cec9061a0
Returns an associative array of values for keys.
[ { "docid": "7d26ebe3004967212cfaf719955273aa", "score": "0.0", "text": "function fetchMultiple(array $keys);", "title": "" } ]
[ { "docid": "4056b00d430bc86a6b0fa6185569e5ef", "score": "0.7954717", "text": "function getArray()\r\n {\r\n $ret = array();\r\n foreach ($this->keys as $i => $k)\r\n {\r\n $ret[$k] = $this->values[$i];\r\n }\r\n return $ret;\r\n }", "title": "" }, { "docid": "47653911be8058f1a78f786d054a3be0", "score": "0.7361069", "text": "public static function getValues(): array\n {\n return array_keys(static::getNames());\n }", "title": "" }, { "docid": "3a7aeeb9c3b1e75c2e457cc8c743bf73", "score": "0.7354408", "text": "public static function getValues()\n {\n return array_values(static::toDictionary());\n }", "title": "" }, { "docid": "da1629082dffd05e5a69c00249a8537f", "score": "0.7271012", "text": "public function getKeys(): array;", "title": "" }, { "docid": "341b5fabfb30d7e849cf5da7198d4689", "score": "0.7217989", "text": "public function keys(): array;", "title": "" }, { "docid": "b595f4debb87b3bc7d66bca2e3fc3579", "score": "0.71648246", "text": "function items()\n {\n $temp = array();\n\n for ($i = 0; $i < count($this->keys); $i++) {\n $temp[] = array($this->keys[$i],\n $this->values[$i]);\n }\n return $temp;\n }", "title": "" }, { "docid": "54874f1c388ee6e8e9b99e10e66c128c", "score": "0.71521676", "text": "static function getValues(): array\n {\n self::ensureKeyToValueMapLoaded();\n\n return array_values(self::$keyToValueMap[static::class]);\n }", "title": "" }, { "docid": "bf444793d02058ecbe3f42b2d813f430", "score": "0.7066995", "text": "public function keysValuesProvider()\n {\n return array(\n array('test-key0', 'value'),\n array('test-key1', 'value1'),\n array('test-key0', 'value-changed'),\n array('test-array-num', array(1, 2, 3, 4, 5)),\n array('test-array-assoc', array('a'=>'c', 'c'=>'d', 'e'=>123)),\n array('test-array-assoc-nested', array('a'=>array('c'=>array('t'=>'a-c-t-nest')), 'c'=>'d', 'e'=>123))\n );\n }", "title": "" }, { "docid": "e312f042e806d89853658b2910f126f9", "score": "0.70198655", "text": "public static function values()\n {\n return array_keys(static::getValues());\n }", "title": "" }, { "docid": "76edb1049350521c9268cb20c9086a33", "score": "0.698484", "text": "public function getKeys();", "title": "" }, { "docid": "76edb1049350521c9268cb20c9086a33", "score": "0.698484", "text": "public function getKeys();", "title": "" }, { "docid": "76edb1049350521c9268cb20c9086a33", "score": "0.698484", "text": "public function getKeys();", "title": "" }, { "docid": "a34a2f96e54ea0a524c336077f844688", "score": "0.693361", "text": "public function getValueKeys()\n {\n return $this->valueKeys;\n }", "title": "" }, { "docid": "fbda7db68c3e00fca669fff21c7c165c", "score": "0.6932704", "text": "static function getValueMap(): array\n {\n self::ensureValueToKeyMapLoaded();\n\n return self::$valueToKeyMap[static::class];\n }", "title": "" }, { "docid": "b3d3a0659b9474b33e6829c317477fb2", "score": "0.69261545", "text": "public function getArray(){\n\t\t$array = array();\n\t\tforeach ($this as $key => $value) {\n\t\t\t$array[$key] = $value;\n\t\t}\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "c0952af47e5ae681df9d1f28ff8b2cf5", "score": "0.68849194", "text": "public function fetchAllKeyValue(): array\n {\n return $this->executeQuery()->fetchAllKeyValue();\n }", "title": "" }, { "docid": "d62722ac2660ce983996650ec5b95fcc", "score": "0.6876361", "text": "public function toArray()\n {\n $ret = [ ];\n foreach ($this as $key => $value) {\n $ret[ $key ] = $value;\n }\n return $ret;\n }", "title": "" }, { "docid": "895e8f9ce934c593440f156abaff6ae6", "score": "0.6855193", "text": "public function values($keys = []);", "title": "" }, { "docid": "6129051f8825d92050cff879c4858947", "score": "0.6819414", "text": "public function keys() : array;", "title": "" }, { "docid": "182c538c91aa7c931f0d28cf490b8f60", "score": "0.681403", "text": "public function toArray()\n {\n $toreturn = array();\n foreach ($this as $key => $value) {\n $toreturn[$key] = $value;\n }\n return $toreturn;\n }", "title": "" }, { "docid": "37a494669365b62dc7aa9b0207f9c445", "score": "0.68132615", "text": "public static function keysToArrayProvider()\n {\n return [\n [['a', 'b', 'c'], ['a', 'b', 'c']],\n [new \\ArrayIterator(['a', 'b', 'c']), ['a', 'b', 'c']],\n ];\n }", "title": "" }, { "docid": "7eee2003c6ec0c575902f0323fea04eb", "score": "0.679181", "text": "public function getKeys()\n {\n return array_keys($this->val());\n }", "title": "" }, { "docid": "fdc4f616ddd9053c1282deb4a8948010", "score": "0.67843324", "text": "public function toArray()\n\t{\n\t\t$tmp = [];\n\n\t\tforeach ($this as $key => $value) {\n\t\t\t$tmp[$key] = $value;\n\t\t}\n\n\t\treturn $tmp;\n\t}", "title": "" }, { "docid": "b828024e57cce6f65c09ed0194ba1372", "score": "0.67709225", "text": "public static function getKeys()\n {\n return array_keys(static::toDictionary());\n }", "title": "" }, { "docid": "4c3e363ca07bfd0eb959add63e66c30b", "score": "0.67332166", "text": "public function values() {\n\t\t\t$values = array();\n\t\t\tforeach ( $this->entries as $key => $value ) {\n\t\t\t\tarray_push( $values, $value );\n\t\t\t}\n\t\t\treturn $values;\n\t\t}", "title": "" }, { "docid": "81b2ec7bf6772db98756cb73cf1b7be0", "score": "0.6723701", "text": "static public function getKeys();", "title": "" }, { "docid": "0e15f41f4610f11cd03e8bcfb07dbb9d", "score": "0.6716479", "text": "public function keys() {\n\t\t\t$keys = array();\n\t\t\tforeach ( $this->entries as $key => $value ) {\n\t\t\t\tarray_push( $keys, $key );\n\t\t\t}\n\t\t\treturn $keys;\n\t\t}", "title": "" }, { "docid": "80d01b5d22175c6b0dc2f93c282dd081", "score": "0.6702863", "text": "public function getAll()\n {\n $result = array();\n foreach ($this->getKeys() as $key) {\n $result[$key] = $this->get($key);\n }\n return $result;\n }", "title": "" }, { "docid": "eb302f392a4cdfef3e3fcd48e33c2950", "score": "0.67023504", "text": "public function getImmutableKeys(): array;", "title": "" }, { "docid": "78f1ab118ab3e2f6bb20ace1d7c7696e", "score": "0.66882515", "text": "public function keys() {\n return array_keys($this->_values);\n }", "title": "" }, { "docid": "52c78d37341eb09c2811608d564e14ad", "score": "0.6687531", "text": "protected static function determineKeyToValueMap(): array\n {\n // default behavior is to use all public constants of the current class\n $keyToValueMap = [];\n\n foreach ((new \\ReflectionClass(static::class))->getReflectionConstants() as $constant) {\n if ($constant->isPublic()) {\n $keyToValueMap[$constant->name] = $constant->getValue();\n }\n }\n\n return $keyToValueMap;\n }", "title": "" }, { "docid": "6ede8102f1c8c6fc64f8233c18590ec7", "score": "0.6674605", "text": "public function toPairs()\n {\n $result = [];\n foreach ($this as $key => $value) {\n $result[] = [$key, $value];\n }\n return $result;\n }", "title": "" }, { "docid": "0a7187b478fd04692fd2bbbd683e5042", "score": "0.66558594", "text": "public function keys()\n {\n return array_keys($this->values);\n }", "title": "" }, { "docid": "0a7187b478fd04692fd2bbbd683e5042", "score": "0.66558594", "text": "public function keys()\n {\n return array_keys($this->values);\n }", "title": "" }, { "docid": "ecbe500a6ea8176128bae4be4b8b4687", "score": "0.66256684", "text": "public function keys(): Seq;", "title": "" }, { "docid": "7e362fcf7c9a409e4cfd9d44a360798c", "score": "0.6591379", "text": "final public function getPrimaryKeyValues(): array\n {\n $keys = static::getPrimaryKeys();\n $values = array_intersect_key($this->data, array_flip($keys));\n\n return $values;\n }", "title": "" }, { "docid": "812687d4b5956bf5e5e837e2b8924359", "score": "0.6585047", "text": "public function keys(): array\n {\n return array_keys($this->data);\n }", "title": "" }, { "docid": "812687d4b5956bf5e5e837e2b8924359", "score": "0.6585047", "text": "public function keys(): array\n {\n return array_keys($this->data);\n }", "title": "" }, { "docid": "299ff076ab70fdad79aaa2cfa5472a01", "score": "0.6575071", "text": "public function ReturnArrayKeys()\n\t{\n\t\t$SiteAttribute = $this->SiteAttribute();\n\t\t\n\t\t/* Reset the array pointer */\n\t\treset($SiteAttribute);\n\t\t\n\t\t/* Get first Key */\n\t\t$first_key = key($SiteAttribute);\n\n\t\t/* Get the keys */\n\t\t$first_key_val = $SiteAttribute[$first_key];\n\t\t\n\t\t/* Get array keys */\n\t\t$keys = array_keys($first_key_val);\n\t\t\n\t\t/* Return the variable */\n\t\treturn $keys;\n\t\t\n\t}", "title": "" }, { "docid": "e33a507be45fbaf0a5a29b6828953d30", "score": "0.6570939", "text": "public function keys()\n {\n return array_values($this->keys);\n }", "title": "" }, { "docid": "6d881357095e29cc771b7ce1910cfa97", "score": "0.65566874", "text": "public function toArray() {\n $array = array();\n foreach ($this->_collection as $header) {\n $array[$header->key] = $header->value; \n }\n\n return $array;\n }", "title": "" }, { "docid": "8b3ceacf655dc5830b7886f76e3a3859", "score": "0.6549622", "text": "public function toArray()\n\t{\n\t\treturn array_values($this->values);\n\t}", "title": "" }, { "docid": "7aa95f15b5013975927b9cb5d38b4274", "score": "0.65469867", "text": "protected function getMapKeys(): array\n {\n return $this->mapKeys = empty($this->mapKeys)\n ? array_keys($this->getDefaultMap())\n : $this->mapKeys;\n }", "title": "" }, { "docid": "dce541211c1947017eb3fb1ddae5fca3", "score": "0.65402126", "text": "public static function getKeys()\n\t{\n\t\treturn [static::$key, static::$nonce];\n\t}", "title": "" }, { "docid": "0e834b55cc364220e8142f2dfd960302", "score": "0.65281767", "text": "#[Pure] public function array_keys(): array\n {\n return array_keys($this->pointer);\n }", "title": "" }, { "docid": "c0c9cc66ea96805def631a5559b0e8ee", "score": "0.6513866", "text": "public function toArray()\n\t{\n\t\t$result = array();\n\n\t\t$cvars = get_class_vars(__CLASS__);\n\n\t\tforeach ($cvars as $key => $value)\n\t\t{\n\t\t\tif ($key{0} == '_')\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$current = $this->__get($key);\n\n\t\t\t$result[$key] = $current;\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "6dd9a676ad238e9516f828a723a1ab88", "score": "0.6504475", "text": "public function values() {\n $tvals = array();\n if (!$this->iterinit()) {\n return $tvals;\n }\n while ($key = $this->iternext()) {\n $value = $this->get($key);\n if (!$value) {\n break;\n }\n $tvals[] = $value;\n }\n return $tvals;\n }", "title": "" }, { "docid": "b84c70b8343620eff5a45467c42e5a18", "score": "0.65005296", "text": "public function toArray() {\n $out = array();\n foreach($this as $key => $value) {\n $out[$key] = $value->toArray();\n }\n\n return $out;\n }", "title": "" }, { "docid": "fd64103de542740ce69bc5f2cc719a4b", "score": "0.64953053", "text": "public function getKeys():array {\n $keys = [];\n foreach ($this->table as $k => $d){\n $keys[] = $k;\n }\n return !empty($keys)?$keys:[];\n }", "title": "" }, { "docid": "60ae15a7af8fe6faf8aefd1eaee78530", "score": "0.6477513", "text": "public function GetAsHash()\n\t{\n\t\t$aReturn = array();\n\t\tforeach($this->aValues as $sName => $sValue)\n\t\t{\n\t\t\t$aReturn[\"c[$sName]\"] = $sValue;\n\t\t}\n\t\treturn $aReturn;\n\t}", "title": "" }, { "docid": "b3ef7d24c37fa587afbd8fd61abca5d5", "score": "0.64643055", "text": "public function keys()\n {\n return $this->config()['keys'] ?? [];\n }", "title": "" }, { "docid": "116737d3c04cac1860ecea3d746410e0", "score": "0.64537466", "text": "public function toArray(): array\n {\n $out = [];\n foreach ($this->rawValues as $name => $value) {\n $out[$name] = $value;\n }\n return $out;\n }", "title": "" }, { "docid": "931bd62b9da36d653c9fef8aea29f83e", "score": "0.64532363", "text": "public function getAllKeys();", "title": "" }, { "docid": "9f755000801985b2b68bda8acd95c021", "score": "0.64381164", "text": "public static function keys()\n {\n return \\array_keys(static::toArray());\n }", "title": "" }, { "docid": "be23a1e968f26e6c4754d9524620f911", "score": "0.6410755", "text": "public function keys()\n {\n return $this->toBase()->keys();\n }", "title": "" }, { "docid": "be23a1e968f26e6c4754d9524620f911", "score": "0.6410755", "text": "public function keys()\n {\n return $this->toBase()->keys();\n }", "title": "" }, { "docid": "e96d7490f43fc300a1925e750892f41d", "score": "0.64096576", "text": "public function keys(){\n $tkeys = array();\n if (!$this->iterinit()) {\n return $tkeys;\n }\n while ($key = $this->iternext()) {\n $tkeys[] = $key;\n }\n return $tkeys;\n }", "title": "" }, { "docid": "5a18aef4903cbe6b90ea60cb42a8b7ef", "score": "0.6394643", "text": "public function get_assoc_array(){\n\t\t$this->execute();\n\t\treturn $this->statement->fetchAll(PDO::FETCH_ASSOC);\n\t}", "title": "" }, { "docid": "74d6c04dc9c33a07fca635d580a03848", "score": "0.63926", "text": "public function getKeys()\n\t{\n\t\treturn $this->keys;\n\t}", "title": "" }, { "docid": "d9b4b5579549ed6c838abd34f09500c1", "score": "0.63923466", "text": "public function exportValues(): array\n\t{\n\t\t$values = array();\n\n\t\tforeach($this->values as $key => $value)\n\t\t\t$values[$key] = $value->value;\n\n\t\treturn $values;\n\t}", "title": "" }, { "docid": "c272d7ca07c7899af78c15ef688cc9a0", "score": "0.6384918", "text": "public function getKeys()\n {\n return $this->keys;\n }", "title": "" }, { "docid": "c272d7ca07c7899af78c15ef688cc9a0", "score": "0.6384918", "text": "public function getKeys()\n {\n return $this->keys;\n }", "title": "" }, { "docid": "c272d7ca07c7899af78c15ef688cc9a0", "score": "0.6384918", "text": "public function getKeys()\n {\n return $this->keys;\n }", "title": "" }, { "docid": "c272d7ca07c7899af78c15ef688cc9a0", "score": "0.6384918", "text": "public function getKeys()\n {\n return $this->keys;\n }", "title": "" }, { "docid": "c272d7ca07c7899af78c15ef688cc9a0", "score": "0.6384918", "text": "public function getKeys()\n {\n return $this->keys;\n }", "title": "" }, { "docid": "00eb25daa960f1c7199dcdaf39792081", "score": "0.6382975", "text": "public function getKeyList() {\n\t\tif(!is_array($this->keyList)) {\n\t\t\t$this->loadKeyList();\n\t\t}\n\t\treturn $this->keyList;\n\t}", "title": "" }, { "docid": "fb84c6e92bf62a32103b843ff1245eee", "score": "0.63828886", "text": "public static function getValues(): array;", "title": "" }, { "docid": "03b0e65066baba05397776e6d5a98d6c", "score": "0.63817537", "text": "public static function getValuesByKeys(array $haystack, $keys, $stringifyKeys = false) :array\n\t{\n\t\tif (is_string($keys) || is_numeric($keys)) {\n\t\t\t$keys = array($keys);\n\t\t} elseif (empty($keys)) {\n\t\t\treturn array();\n\t\t}\n\n\t\t$map = null;\n\t\t$values = array();\n\n\t\tif ($stringifyKeys) {\n\t\t\t$map = array();\n\t\t\tforeach ($haystack as $key => $value) {\n\t\t\t\t$map[(string)$key] = $key;\n\t\t\t}\n\t\t}\n\n\t\tforeach ($keys as $key) {\n\t\t\t$sourceKey = false;\n\t\t\tif ($stringifyKeys) {\n\t\t\t\tif (array_key_exists((string)$key, $map)) {\n\t\t\t\t\t$sourceKey = $map[(string)$key];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (array_key_exists($key, $haystack)) {\n\t\t\t\t\t$sourceKey = $key;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($sourceKey === false) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$values[$sourceKey] = $haystack[$sourceKey];\n\t\t}\n\n\t\treturn $values;\n\t}", "title": "" }, { "docid": "635b638da7ea6cb06e59d70ae9030f1e", "score": "0.63806134", "text": "public function all() : array\n {\n $all = $this->applyContext()->get()->keyBy('key')->toArray();\n $this->resetContext();\n return $all;\n }", "title": "" }, { "docid": "ef783127367355b49f4176cb4615907d", "score": "0.63797545", "text": "public function toArray()\n {\n $array = [];\n foreach (get_object_vars($this) as $key => $value) {\n $array[strtolower(preg_replace('/[a-z]+(?=[A-Z])/', '\\0_', $key))] = $value;\n }\n return $array;\n }", "title": "" }, { "docid": "c9f3edce8e722065bbddbef6aca9131e", "score": "0.6348943", "text": "public function keys(): array\n {\n return array_keys($this->items);\n }", "title": "" }, { "docid": "783f3deb462aa6e0bda96fd5b9929df2", "score": "0.6348498", "text": "public function toArray()\n {\n $arr = array();\n foreach ($this as $key => $value) {\n $method = 'get' . $key;\n if (method_exists($this, $method)) {\n $arr[$key] = $this->$method();\n }\n }\n\n return $arr;\n }", "title": "" }, { "docid": "658901b67392d4b0c8f1ad82d0a21a65", "score": "0.63468796", "text": "public static function key_values($arr, $key) {\n $result = array();\n if ($arr) {\n foreach ($arr as $item) {\n $result[$item[$key]] = $item;\n }\n }\n return $result;\n }", "title": "" }, { "docid": "eea56ab488cf78eb5d7c4a88c6daf0c9", "score": "0.6342452", "text": "function from_keys(iterable $keys, Closure $value_func): array\n{\n $result = [];\n foreach ($keys as $key) {\n $result[$key] = $value_func($key);\n }\n\n return $result;\n}", "title": "" }, { "docid": "1aba13a1b53fed4c00a81185d6e44eed", "score": "0.6326253", "text": "protected function values(): array\n {\n return array_merge(parent::values(), $this->defineValues());\n }", "title": "" }, { "docid": "d584033759b97a2bf7a0fe5c52de6bfe", "score": "0.63244843", "text": "public function keys()\n {\n return array_keys($this->get());\n }", "title": "" }, { "docid": "416e9d7179b14821a8249d1b54f079f7", "score": "0.6322189", "text": "public function toArray()\n\t{\n\t\treturn $this->getIniValues();\n\t}", "title": "" }, { "docid": "af28dd7934da5a3ca70825e6188a5234", "score": "0.631246", "text": "public function keys () {\n\t\treturn new NativeIndexedArrayIterator(\\array_values($this->_keys));\n\t}", "title": "" }, { "docid": "273657c1321e371507dca5b49f3fedce", "score": "0.63095796", "text": "public function asArray()\n {\n return ArrayUtils::mapAssoc(\n static function ($key, $value) {\n return in_array($key, self::KEYS_WITH_UNIQUE_VALUES) ? array_values($value) : $value;\n },\n array_filter(\n $this->query,\n static function ($value) {\n /** @noinspection TypeUnsafeComparisonInspection */\n return ((is_array($value) && ! empty($value)) || ($value != null));\n }\n )\n );\n }", "title": "" }, { "docid": "e52c8d29eb2dd959c496d6f73648474b", "score": "0.6298944", "text": "static function getKeyMap(): array\n {\n self::ensureKeyMapLoaded();\n\n return self::$keyMap[static::class];\n }", "title": "" }, { "docid": "35703c33750f0863c6646e970e160670", "score": "0.6296971", "text": "public function keys(): array\n {\n return array_keys($this->bag);\n }", "title": "" }, { "docid": "93859c0dde0634bf250d1e299b80a234", "score": "0.62826395", "text": "public function getKeys() {\n\t\tif (sizeof($this->keys) == 0) {\n\t\t\t$this->loadKeys();\n\t\t}\n\t\t\n\t\treturn $this->keys;\n\t}", "title": "" }, { "docid": "2fe012d0f601f909833546180be5d45e", "score": "0.62783974", "text": "function toArray() {\n $ret = array();\n $vars = $this->getVars();\n foreach (array_keys($vars) as $i) {\n $ret[$i] = $this->getVar($i);\n }\n return $ret;\n }", "title": "" }, { "docid": "3a03b237ddc8297b45fcf78e5ff51ad6", "score": "0.6276102", "text": "public function keys(): array\n\t{\n\t\treturn array_keys($_COOKIE);\n\t}", "title": "" }, { "docid": "92e086892fe9964db4e0837ff5a3cff8", "score": "0.62721795", "text": "public function getKeyData() : array\n {\n return [\n 'mastery_id' => $this->masteryID,\n 'version' => $this->version,\n 'region' => $this->region\n ];\n }", "title": "" }, { "docid": "d1b8b865c8bde1a10c476673fd49eac6", "score": "0.62566423", "text": "public function as_array() {\n if (func_num_args() === 0) {\n return $this->_data;\n }\n $args = func_get_args();\n return array_intersect_key($this->_data, array_flip($args));\n }", "title": "" }, { "docid": "d1265484981949d52197d5d012de46c7", "score": "0.6252167", "text": "private static function getKeys()\n {\n return explode(',', self::$keys);\n }", "title": "" }, { "docid": "ae94e4d33e8c50b0b3c50f6755576370", "score": "0.62490827", "text": "protected function fetchKeys()\n {\n $keys=array();\n foreach($this->getData() as $i=>$entity)\n {\n $key=$this->keyAttribute===null ? $entity['id'] : $entity[$this->keyAttribute];\n $keys[$i]=is_array($key) ? implode(',',$key) : $key;\n }\n return $keys;\n }", "title": "" }, { "docid": "7e8e600047e5cb073b46af022c640fc7", "score": "0.6244369", "text": "public function getValueArray()\n {\n return $this->getListValues($this->Value());\n }", "title": "" }, { "docid": "fb0dcaece107a6bf44b3902a3ea7b45d", "score": "0.6243887", "text": "function iterator_to_array_key($iterator, $key_value='key'){\n\t$array = array();\n\tforeach ($iterator as $key => $value){\n\t\tswitch ($key_value) {\n\t\t\tcase 'key':\n\t\t\t\t$array[] = $key;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t$array[] = $value;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn $array;\n}", "title": "" }, { "docid": "10f10883b335a39b2cbe686a7a4797ac", "score": "0.6238443", "text": "protected function getKeyValue(): array\n {\n $key = $this->argument('key');\n $value = $this->argument('value');\n\n if (! $value) {\n $parts = explode('=', $key, 2);\n\n if (count($parts) !== 2) {\n throw new InvalidArgumentException('No value was set');\n }\n\n $key = $parts[0];\n $value = $parts[1];\n }\n\n if (! $this->isValidKey($key)) {\n throw new InvalidArgumentException('Invalid argument key');\n }\n\n if (! is_bool(strpos($value, ' '))) {\n $value = '\"' . $value . '\"';\n }\n\n return [strtoupper($key), $value];\n }", "title": "" }, { "docid": "bc64970a92fad52f3c343e6e2b461b32", "score": "0.6235207", "text": "function keys()\n {\n $keys = [];\n foreach(array_keys($this->properties) as $k) {\n if (array_key_exists($k, $this->__mapedPropObjects))\n $k = $this->__mapedPropObjects[$k];\n\n $keys[] = $k;\n }\n\n return $keys;\n }", "title": "" }, { "docid": "45966b211cbee96b7f7211353d403697", "score": "0.6225505", "text": "public function toArray()\n\t{\n\t\treturn $this->values;\n\t}", "title": "" }, { "docid": "727fc01e4c433e3aae77ea85a9640b57", "score": "0.62251604", "text": "public function getKeys()\n {\n return array_keys($this->getAll());\n }", "title": "" }, { "docid": "1ae6d4d2aadcc9858b3dc5d3a1cf4b44", "score": "0.6216476", "text": "public function values(): array\n {\n return array_values($this->data);\n }", "title": "" }, { "docid": "fffe1e0582d3e001fa829aa458b49a17", "score": "0.62111956", "text": "public function to_array($key='id') {\n $array = array();\n foreach ($this as $rec) {\n $array[$rec->$key] = $rec;\n }\n $this->close();\n return $array;\n }", "title": "" }, { "docid": "4c6677fa1cc4b74f1c1e986d008897af", "score": "0.6209503", "text": "function as_array(){\r\n\t\t\r\n\t\t$array = parent::as_array();\r\n\r\n\t\tforeach($array as $key=>$value){\r\n\t\t\t$array[$key] = $this->$key;\r\n\t\t}\r\n\r\n\t\treturn $array;\r\n\r\n\t}", "title": "" }, { "docid": "faa033af923c6686f008534bc5dc272e", "score": "0.62082195", "text": "function toArray() {\n\t\t$ret = array ();\n\t\t$vars = $this->getVars ();\n\t\tforeach ( array_keys ( $vars ) as $i ) {\n\t\t\t$ret [$i] = $this->getVar ( $i );\n\t\t}\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "31ec22127af7ff825b72e09259632493", "score": "0.6205496", "text": "public function hVals(string $key): array\n {\n return $this->redis->hVals($key);\n }", "title": "" }, { "docid": "dd1e9f7448187f5b8e7e361f9fafab8a", "score": "0.6195427", "text": "function keys() {\n return (new self(\\array_keys($this->data)));\n }", "title": "" }, { "docid": "01defc4822af5bbac1ec56c8094c1504", "score": "0.6194995", "text": "public function provideSimpleArrayToSetKeysAsValues()\n {\n yield [\n [\n 1,\n 2,\n 3,\n 4,\n ],\n [\n 1 => 0,\n 2 => 1,\n 3 => 2,\n 4 => 3,\n ],\n ];\n\n yield [\n [\n 'Lorem',\n 'ipsum',\n 'dolor',\n 'sit',\n 'amet',\n ],\n [\n 'Lorem' => 0,\n 'ipsum' => 1,\n 'dolor' => 2,\n 'sit' => 3,\n 'amet' => 4,\n ],\n ];\n }", "title": "" } ]
c4fee7d512a28a08feb096a893bf1d07
TODO: Your mock expectations here
[ { "docid": "ec3f43babd1a019da38eb054b24d14a6", "score": "0.0", "text": "public function testCustomize_register2804()\n{\n\n // Traversed conditions\n // if ($this->manager->settings_previewed()) == true (line 557)\n // if (\\current_theme_supports('widgets')) == true (line 573)\n // if (1 == $num_locations) == true (line 594)\n // if (\\current_theme_supports('widgets')) == true (line 601)\n // if (!$this->manager->is_theme_active()) == true (line 622)\n // if (empty($theme_mods['nav_menu_locations'])) == true (line 626)\n // if ($setting) == false (line 637)\n // if (empty($changeset[$setting_id]) && isset($mapped_nav_menu_locations[$location])) == false (line 654)\n\n $actual = $this->wP_Customize_Nav_Menus->customize_register();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" } ]
[ { "docid": "d86fcd1451bda0a4bc92d13204f6bbc1", "score": "0.65137875", "text": "protected function stub()\n {\n }", "title": "" }, { "docid": "ada9b0b5a93d3441558f36e1413c84be", "score": "0.63116264", "text": "public function testRecordingsGet()\n {\n }", "title": "" }, { "docid": "c9f501c1523ccfa6ff6e16b4af7c6957", "score": "0.61427385", "text": "public function testServiceOrdersCompleteWorkOrders()\n {\n }", "title": "" }, { "docid": "f09dfa206c8a88382c01e550edb38b02", "score": "0.6126799", "text": "public function testCheckDocumentIdentitiesIdGet()\n {\n }", "title": "" }, { "docid": "6836ea9c37da54e8eaa7ce45567f8798", "score": "0.6090719", "text": "public function testServiceOrdersGetServiceOrder()\n {\n }", "title": "" }, { "docid": "843fb4c288b43fbb0f2c48ee01735a79", "score": "0.6031826", "text": "public function test_getDuplicateBillOfLadingById() {\n\n }", "title": "" }, { "docid": "f40371cee663b92d3b5505e735a2c895", "score": "0.60213524", "text": "public function test5069Get()\n {\n }", "title": "" }, { "docid": "edc878320e25b0443a3a5839bef49f9f", "score": "0.60154253", "text": "public function test_getDuplicateSubstitutionById() {\n\n }", "title": "" }, { "docid": "2b61e5ad1cde754f813f35e8b134f8eb", "score": "0.5999527", "text": "public function testCheckDocumentBankAccountsIdGet()\n {\n }", "title": "" }, { "docid": "f62935417c61e76b7d56c8454e2dfaec", "score": "0.5989293", "text": "public function testBuildsGetCollection()\n {\n }", "title": "" }, { "docid": "aff3b07fba0728ba712f51a71f03de96", "score": "0.5978359", "text": "public function testReportGet()\n {\n }", "title": "" }, { "docid": "408e6aa7c2958fdf6d0f0ab7b7518386", "score": "0.5977732", "text": "public function testPostMeasurements()\n {\n }", "title": "" }, { "docid": "aecaac1cab593e5407bcd6325d88e3bb", "score": "0.59621656", "text": "public function testBuildsGetInstance()\n {\n }", "title": "" }, { "docid": "b3b189b1a5c19fef4a8a9f37fc46b582", "score": "0.59558606", "text": "public function testGetOrderCredits()\n {\n }", "title": "" }, { "docid": "c6d37f75b3001aa25941471bc068eab6", "score": "0.5940384", "text": "public function testBuildsUpdateInstance()\n {\n }", "title": "" }, { "docid": "e04b8a01c8af84ca2d6a683168656872", "score": "0.5939662", "text": "public function testAddItemAudit()\n {\n }", "title": "" }, { "docid": "212691f7c8602a6e7f406f296b4a6ae0", "score": "0.59335935", "text": "public function testStrategiesStrategyIdZipListsGet()\n {\n }", "title": "" }, { "docid": "61564a21620189dc3ebc00607c2be16d", "score": "0.591943", "text": "public function testStrategiesSpendInfoGet()\n {\n }", "title": "" }, { "docid": "2e694567117379ef00908513800d8eef", "score": "0.58935624", "text": "public function testGetMetadata3()\n {\n }", "title": "" }, { "docid": "82564b0af983c61abbc538b4bccd6982", "score": "0.58803934", "text": "public function test_getBillOfLadingTags() {\n\n }", "title": "" }, { "docid": "93dfbc2696d205cd65155862379a77cf", "score": "0.5870057", "text": "public function testAttachLocation()\n {\n\n }", "title": "" }, { "docid": "69469a79f567d5f47fb17f3c5d1a8ee3", "score": "0.5869599", "text": "public function testInvoicesRead()\n {\n }", "title": "" }, { "docid": "09dbe96464fd6a693ebd6630f64a174a", "score": "0.58682823", "text": "protected function setup() {}", "title": "" }, { "docid": "09dbe96464fd6a693ebd6630f64a174a", "score": "0.58682823", "text": "protected function setup() {}", "title": "" }, { "docid": "6979e80ece67c0756965fc26f6a87d07", "score": "0.5867553", "text": "public function testServiceOrdersGetServiceOrderList()\n {\n }", "title": "" }, { "docid": "3b070c14d6b76b5a0847ccb162a5c426", "score": "0.5862833", "text": "public function testGetTokenRequestor()\n {\n }", "title": "" }, { "docid": "4912627967d370879e2f7fdbbaf84f1c", "score": "0.58540916", "text": "public function testAssetsIdDownloadGet()\n {\n }", "title": "" }, { "docid": "e93d11a723afe267d25741ccf2f0a04b", "score": "0.58490235", "text": "public function test_getBillOfLadingByFilter() {\n\n }", "title": "" }, { "docid": "c70c065965fc84a42f9ff155866352a6", "score": "0.58480567", "text": "public function testGetPromotions()\n {\n }", "title": "" }, { "docid": "7bc22d6cca919bc8813ee28a92e24a79", "score": "0.5840584", "text": "public function testChatbotChatbotIDEntityStatisticsGet()\n {\n }", "title": "" }, { "docid": "ee5dd0f5b8f350729a54320ea238da2c", "score": "0.58400136", "text": "public function testGetProviderStatus()\n {\n }", "title": "" }, { "docid": "983bc8c18cca7e73aa3f259969a8dc6a", "score": "0.5838183", "text": "public function testGetProcessById()\n {\n }", "title": "" }, { "docid": "ac89a7a3734e0d62734f66500f94c6f6", "score": "0.5835077", "text": "public function testSearchDashboardElements()\n {\n }", "title": "" }, { "docid": "900b10a3bfaf0f99d58aa67a14981868", "score": "0.5825133", "text": "public function testGetItemById()\n {\n }", "title": "" }, { "docid": "07cf86224f3c1bbb16cc26441829844a", "score": "0.58213544", "text": "public function testChallengeTeamRead()\n {\n }", "title": "" }, { "docid": "ea61fc268d526bef1990536ad8e39dbc", "score": "0.58153635", "text": "public function testStrategiesGet()\n {\n }", "title": "" }, { "docid": "463a19650e921c55f38375499437f8c5", "score": "0.58134216", "text": "public function testGetTerytById()\n {\n }", "title": "" }, { "docid": "dfc7f19c09a4871791ffec85568b3c5d", "score": "0.581266", "text": "public function testReportProovCodeGet()\n {\n }", "title": "" }, { "docid": "0163bd27f4e8590c733873eb7be09098", "score": "0.5810836", "text": "public function test_getDuplicateQuickReceiptById() {\n\n }", "title": "" }, { "docid": "cc437aca2b36febb5b7ecfa821447f63", "score": "0.58054173", "text": "public function testAssetsIdGet()\n {\n }", "title": "" }, { "docid": "3063a1791564b0158cb943ed18ac0b44", "score": "0.5803721", "text": "public function testGetAttributes()\n {\n\n }", "title": "" }, { "docid": "12f7a368797ff048290caf48fea9c0de", "score": "0.58021027", "text": "public function testGetDuplicateLocationFootprintById()\n {\n }", "title": "" }, { "docid": "d3ed9dd649938f828fb1dffb7fde40a9", "score": "0.57965195", "text": "public function testScheduledPlansForLook()\n {\n }", "title": "" }, { "docid": "fab8856ca6f162f9f7d26c931e0d5ee7", "score": "0.5796322", "text": "public function testBuildsAppStoreVersionGetToOneRelated()\n {\n }", "title": "" }, { "docid": "d7ad443018160e341e72cd26db6b2104", "score": "0.57953733", "text": "public function test_getBillOfLadingById() {\n\n }", "title": "" }, { "docid": "d0fe61e3f0e8d9feae7b81ef75386108", "score": "0.5794294", "text": "public function testGetByUuid()\n {\n }", "title": "" }, { "docid": "337dc0ec54883e4708be4f8a1a4838a0", "score": "0.5794114", "text": "public function testGetOrderHistories()\n {\n }", "title": "" }, { "docid": "69bee7ac0169e5f83cda5cd822f34c59", "score": "0.57940537", "text": "public function test_addSubstitutionAudit() {\n\n }", "title": "" }, { "docid": "0aeb387ab16f65d1e8055f5a35c252f4", "score": "0.57935923", "text": "public function testStrategiesStrategyIdUseragentListsGet()\n {\n }", "title": "" }, { "docid": "602613632c90464bbf0a8935d4afe0b5", "score": "0.57931566", "text": "public function testGetDuplicateItemById()\n {\n }", "title": "" }, { "docid": "0855a2c578f0ff8e1d8962b6cbdda26e", "score": "0.57847166", "text": "public function testGetRetiradaPatrimonio()\n {\n }", "title": "" }, { "docid": "55d0a0980f19999d659d83e6490c6c71", "score": "0.5780087", "text": "public function testGetOrderStatuses()\n {\n }", "title": "" }, { "docid": "7a2b34146f527a6fa7a9a681f9103a18", "score": "0.5778035", "text": "public function testAvatarGet()\n {\n }", "title": "" }, { "docid": "c495894301262d9fbb907714b5c7efd0", "score": "0.57716745", "text": "public function testGetInbound()\n {\n }", "title": "" }, { "docid": "16a15ca9e42399c737b43f4031339829", "score": "0.57673544", "text": "public function testProcurementPricingschedulesIdDetailsGet()\n {\n\n }", "title": "" }, { "docid": "1075d05964ca22863e3bc97941b7bdbd", "score": "0.57670194", "text": "public function testCrceTariffGetTariffs()\n {\n\n }", "title": "" }, { "docid": "3a397526ed58118a028350b43c445c13", "score": "0.5766533", "text": "public function testRootGet()\n {\n }", "title": "" }, { "docid": "5c16c23d5588ea9c6fdc309e0d74aea6", "score": "0.5759893", "text": "public function testPayrollsGet()\n {\n }", "title": "" }, { "docid": "1b7d16d420680275f885e9f74c7a7d73", "score": "0.57565963", "text": "public function testDossierItemsRead()\n {\n }", "title": "" }, { "docid": "9efeb457779b8fb5f4b15d49b2e050f4", "score": "0.57553524", "text": "public function test_getDuplicateLocationAddressSchemeById() {\n\n }", "title": "" }, { "docid": "4a99328c172afd74bd4803d660967eb8", "score": "0.57549274", "text": "public function testGetAccountLookup()\n {\n }", "title": "" }, { "docid": "6a04cb7d365081f56c10d6ef196d721e", "score": "0.5751546", "text": "public function testAvailabilitySearch()\n {\n }", "title": "" }, { "docid": "9a18f91f7ec9dec664c08144ba13043b", "score": "0.5744664", "text": "public function testGetPackingList()\n {\n }", "title": "" }, { "docid": "3b541c2b69018c28fc4ec533c51b10af", "score": "0.5743285", "text": "public function testStrategiesStrategyIdGet()\n {\n }", "title": "" }, { "docid": "194493ba6f1ebc40a12adf15da933002", "score": "0.57429713", "text": "public function testImportProcess()\n {\n }", "title": "" }, { "docid": "0c240e98850bbf39ed9015b702605a9f", "score": "0.57415247", "text": "public function testGetInvoiceCounters()\n {\n }", "title": "" }, { "docid": "31191de74b56d7119ca88414f9515f0c", "score": "0.57411754", "text": "public function testStrategiesStrategyIdCreativesGet()\n {\n }", "title": "" }, { "docid": "bc9d41995f6496124f2265502db73f08", "score": "0.5740642", "text": "public function testRetrieveApiUser()\n {\n }", "title": "" }, { "docid": "dd5f642cdc2b36e0a2a20c1d528a2bc3", "score": "0.5739119", "text": "public function testGetRoomS3Tags()\n {\n }", "title": "" }, { "docid": "01ff8aa75f167d90beadcc652b62e814", "score": "0.57357275", "text": "public function test_updateBillOfLadingCustomFields() {\n\n }", "title": "" }, { "docid": "4a77f3415074eb03e38fc6ddb1ba9627", "score": "0.5735116", "text": "public function before() {}", "title": "" }, { "docid": "a0b66680997f13ebe83804386639a75a", "score": "0.5734311", "text": "public function testStrategiesStrategyIdDealsGet()\n {\n }", "title": "" }, { "docid": "79e6585b409a8f0560df8fe3dd177923", "score": "0.5733186", "text": "public function testStrategiesStrategyIdSiteListsGet()\n {\n }", "title": "" }, { "docid": "b31d5d0bb8e59065736d15629331f8fe", "score": "0.5730946", "text": "public function testPurchaseOrderReceiptsNumberGet()\n {\n }", "title": "" }, { "docid": "6cfaa30ce83d751d4b4bc37fe2a54de0", "score": "0.572974", "text": "public function testQuerySettings()\n {\n }", "title": "" }, { "docid": "80f21fac578acd83298c02267e4ca45d", "score": "0.57273597", "text": "public function testCrceTariffChangeGetAllAvailable()\n {\n\n }", "title": "" }, { "docid": "a830c90123764872be2132eb083ce1b2", "score": "0.57259697", "text": "public function testBuildsPreReleaseVersionGetToOneRelated()\n {\n }", "title": "" }, { "docid": "b2dfd57d9a2be3c41b8ea1324002d6b8", "score": "0.57258517", "text": "public function testGetMetadata1()\n {\n }", "title": "" }, { "docid": "d05e2365cc7144c2d7d3c82f3e8022a6", "score": "0.5717419", "text": "public function test_addBillOfLadingTag() {\n\n }", "title": "" }, { "docid": "3281c3ae2a97f468c13c3db9784c34bc", "score": "0.571678", "text": "public function test_imageCollectionDownload() {\n\n }", "title": "" }, { "docid": "50999f634457fbe591c97aea969f1853", "score": "0.5716364", "text": "public function testGetPlan()\n {\n }", "title": "" }, { "docid": "103bf8afe1c2b4d2900840e2611a2691", "score": "0.5714048", "text": "public function testGetFounder()\n {\n\n }", "title": "" }, { "docid": "e1cf725e832a20bff0c9e508c3526032", "score": "0.571343", "text": "public function testCrceTariffGetTariff()\n {\n\n }", "title": "" }, { "docid": "ce0e4ae9f9e4f8e1b53d946732a94bae", "score": "0.5711232", "text": "public function testProcurementPricingschedulesIdDetailsCountGet()\n {\n\n }", "title": "" }, { "docid": "97a8c428b99e050d17c2e108810a842e", "score": "0.570866", "text": "public function testCrceFlexiPlanServiceGetPlanTariffTemplate()\n {\n\n }", "title": "" }, { "docid": "1777e182fad7eb9dd816e55f3449c495", "score": "0.57055634", "text": "public function testScheduledPlansForLookmlDashboard()\n {\n }", "title": "" }, { "docid": "d1e69e9878c207ba049cfbe5a230a5f9", "score": "0.5703417", "text": "public function testRetrieveListRoute()\n {\n }", "title": "" }, { "docid": "9003d52c9884fa78dccf5fb211053c7c", "score": "0.5701992", "text": "public function testCheckDocumentIdentitiesPost()\n {\n }", "title": "" }, { "docid": "391fb50a1a8d490ea5e7c8e72aba43ed", "score": "0.5700842", "text": "public function testAvailabilityResult()\n {\n }", "title": "" }, { "docid": "c62fd9bd69f0762addae1c4a2de5b1ea", "score": "0.5700704", "text": "public function testGetGroupMemberById()\n {\n }", "title": "" }, { "docid": "007b6ccadf0a43912459f50fb6f5609e", "score": "0.5699574", "text": "public function testMeasurementExportRequest()\n {\n }", "title": "" }, { "docid": "adb430dca88665483dc0619dc22a53e4", "score": "0.5697937", "text": "public function test_imageCollectionFind() {\n\n }", "title": "" }, { "docid": "d3f73280d6ba8a55a72a7a1acaf35041", "score": "0.56970257", "text": "public function testRetrieveRoute()\n {\n }", "title": "" }, { "docid": "427bea0c715850646696093d7b819644", "score": "0.569408", "text": "public function testGetCurrentPlan()\n {\n }", "title": "" }, { "docid": "a095147b89d5c92b958aeda92b91754b", "score": "0.56933206", "text": "public function testServiceOrdersPostServiceOrder()\n {\n }", "title": "" }, { "docid": "862b05af1fbf2907764e58aa0bf35104", "score": "0.56911165", "text": "protected function setup() { }", "title": "" }, { "docid": "6d46b7c061c3b52afa3cc8e2ed6bb676", "score": "0.5687618", "text": "public function testGetClient()\n {\n }", "title": "" }, { "docid": "011e558688d5e2eecba3980cb90ac79b", "score": "0.5683594", "text": "public function testPostInbound()\n {\n }", "title": "" }, { "docid": "662085285e2e1cf747b28219bc5855b3", "score": "0.568296", "text": "public function testGetAllocationCompositionAllUsingGet()\n {\n }", "title": "" }, { "docid": "bc4620eac870570458a81d59b00a1273", "score": "0.5681705", "text": "public function testPurchaseOrdersBook()\n {\n }", "title": "" }, { "docid": "26c925dd63175f32c123e9d4572203c2", "score": "0.5680402", "text": "public function testGetProductDescriptions()\n {\n }", "title": "" } ]
a2d437ee1ba1b1d69246d3ef62f06045
Perform address validation with abolapi
[ { "docid": "bc05017daf9ce65ea9e30f309a49c750", "score": "0.71588856", "text": "public function AbolValidateAddress(AbolValidateAddress $request)\r\n\t{\r\n\t\t// $request = array(__FUNCTION__ => $request);\r\n\t\treturn $this->call(__FUNCTION__, $request);\r\n\t}", "title": "" } ]
[ { "docid": "38041965337e9fccedca95db92605845", "score": "0.72208124", "text": "function addressValidation($address_to_validate){\n $reg_exp = \"/^[a-zA-Z0-9\\/\\-\\,\\#\\.\\_\\s]+$/\";\n return preg_match($reg_exp, $address_to_validate);\n }", "title": "" }, { "docid": "a568d3475d93d6821cccead90350bbfa", "score": "0.6933959", "text": "function _mymodule_address_validate($element, &$form_state, $form) {\n if (strlen(trim($element['#value'])) < 21) {\n form_error($element, t('Please input full address.'));\n }\n}", "title": "" }, { "docid": "600ebb1b868efd15f1ba3ba580bd0258", "score": "0.68686116", "text": "private function addressValidation($address){\n if($address == null){\n $arr[] = \"Please fill address field\";\n $arr[] = false;\n return $arr;\n }\n else{\n $addressArray = explode(',',$address);\n $lastAddressIndex = end($addressArray);\n foreach($addressArray as $val){\n if($val == null){\n $arr[] = \"Check your address please (Must include comma ',').\";\n $arr[] = false;\n return $arr;\n }\n }\n if(strlen($lastAddressIndex) < 4){\n $arr[] = \"Address is too short\";\n $arr[] = false;\n return $arr;\n }\n else{\n $arr[] = \"ok\";\n $arr[] = true;\n return $arr;\n }\n } \n }", "title": "" }, { "docid": "36deeb0d3b239c0cb74d4883707aef51", "score": "0.68185586", "text": "public function addressValidation(){\n\t\t$salesModel = new SalesModel();\n\t\t$addressValidation = $salesModel->validateAddress();\n\t\treturn $addressValidation;\n\t}", "title": "" }, { "docid": "6ea04a4b33ab626eaebb6afaff353b9c", "score": "0.6790433", "text": "function _validate_address()\n\t{\n\t\t$txn_id = $this->session->userdata('txn_id');\n\t\t$checkout_order = $this->database->GetCheckoutOrder($txn_id);\n\n\t\t$address_id = $checkout_order['address_id'];\n\n\t\tif($this->_is_address_valid_for_current_user($address_id) == false)\n\t\t\tredirect('checkout/');\n\t}", "title": "" }, { "docid": "879956c3639afe48477373f182b7d9b3", "score": "0.6749369", "text": "private function ValidateAddress()\n\t {\t \n\t\t $val = filter_input( INPUT_POST, 'address', FILTER_SANITIZE_STRING ); \n $val = trim($val); \n\t\t \t\t \n\t\t $_SESSION['values']['address'] = $val;\t\n\t\t \t\t \n\t\t /*if( ctype_alnum($val) === false)\n\t\t {\n\t\t\t $_SESSION['errors']['address'] = CSSERROR;\t\t\n return;\t\n\t\t }\t\t */\n\t\t \n\t\t if( strlen($val) === 0 || $val === 0 || $val === NULL) \n\t\t { \n\t\t\t $_SESSION['errors']['address'] = CSSERROR;\t\t\n return;\t\t\t \n\t\t }\t \n \n $_SESSION['errors']['address'] = 'hidden';\n\t }", "title": "" }, { "docid": "455dd28b8f5cdff21d0e7577dfcdef1c", "score": "0.6574946", "text": "public static function addressValid($toValidate) {\n\t\t$res = \"\";\n\t\terror_log(\"AddressValid = \".json_encode($toValidate));\n\t\t//Check country => Mandatory\n\t\tif (empty($toValidate[\"addressCountry\"])) return \"Country missing in the address !\";\n\t\t//Check country => Mandatory\n\t\tif (empty($toValidate[\"addressLocality\"])) return \"City name missing in the address !\";\n\t\t//Check insee => Mandatory\n\t\tif (empty($toValidate[\"osmID\"]) && empty($toValidate[\"localityId\"])) return \"CityId missing in the address !\";\n\t\t//Check insee => Mandatory\n\t\t//if (empty($toValidate[\"codeInsee\"])) return \"CityId missing in the address !\";\n\t\t//Check cp => Mandotory\n\t\t//if (empty($toValidate[\"postalCode\"])) return \"Postal Code missing in the address !\";\n\t\t\n\t\t//Check country, cp and insee are coherent in bd\n\t\t\n\t\tif(!empty($toValidate[\"localityId\"])){\n\t\t\t$city = City::getById($toValidate[\"localityId\"]);\n\t\t\tif ($city[\"country\"] != $toValidate[\"addressCountry\"]) return \"Invalid CityId with that country !\";\n\t\t\t// $postalCodeOk = false;\n\t\t\t// foreach ($city[\"postalCodes\"] as $postalCode) {\n\t\t\t// \tif ($postalCode[\"postalCode\"] == $toValidate[\"postalCode\"]) {\n\t\t\t// \t\t$postalCodeOk = true;\n\t\t\t// \t\tbreak;\n\t\t\t// \t}\n\t\t\t// }\n\t\t\t// if (! $postalCodeOk) return \"Invalid postal code and insee code\";\n\t\t}\n\t\t\n\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "d8f55a684517463e91890cac60beec0d", "score": "0.6443176", "text": "function validAddress($address)\r\n{\r\n return !empty($address);\r\n}", "title": "" }, { "docid": "253e26fae411bbefaacc651e101468de", "score": "0.6350406", "text": "public function address($address);", "title": "" }, { "docid": "f8864b5fa6ba06fd09c370ff37ecf465", "score": "0.6339226", "text": "public function checkFullAddress($address){\n $url = 'http://maps.googleapis.com/maps/api/geocode/json?address=' . $address . '&sensor=false';\n $geocode = file_get_contents($url);\n $results = json_decode($geocode, true);\n if ($results['status'] == 'OK') {\n $lat = $results['results'][0]['geometry']['location']['lat'];\n $long = $results['results'][0]['geometry']['location']['lng'];\n } \n if ($results['status'] == 'OK') {\n if (count($results['results']) > 1) {\n echo \"Multiple address found\";\n }\n if (count($results['results']) == 1) {\n if (isset($results['results'][0]['partial_match'])) {\n if ($results['results'][0]['partial_match']) {\n echo \"This is a partially right address\";\n }\n } else {\n echo \"Valid address\";\n }\n }\n } else {\n echo \"Invalid address\";\n }\n }", "title": "" }, { "docid": "548f5c402fc964d63b38b1f2da9aeef3", "score": "0.6291039", "text": "public function testGetAddressVerification()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "763328bc0b41357042cac1e3cac5423b", "score": "0.6226218", "text": "private function __validate_external() {\n if (isset($this->initial_data[\"external\"])) {\n # Require the external address to be either IPv4 or IPv6 address\n if (is_ipaddrv4($this->initial_data[\"external\"]) or is_ipaddrv6($this->initial_data[\"external\"])) {\n $this->validated_data[\"external\"] = $this->initial_data[\"external\"];\n } else {\n $this->errors[] = APIResponse\\get(4082);\n }\n } else {\n $this->errors[] = APIResponse\\get(4081);\n }\n }", "title": "" }, { "docid": "fe4acd46bd16cb4d903b34d329fea2a3", "score": "0.62193704", "text": "public function validateSpeedyAddress() {\n $request = $this->_getRequest();\n $actionName = $request->getActionName();\n\n\n\n if ($request->isPost()) {\n\n $isValidSpeedyAddress = FALSE;\n\n\n $addressData = $this->_extractSpeedyData($actionName);\n if(array_key_exists('speedy_site_id', $addressData)){\n $speedy_site_id = (int) $addressData['speedy_site_id'];\n }\n if(array_key_exists('speedy_street_id', $addressData)){\n $speedy_street_id = (int) $addressData['speedy_street_id'];\n }\n if(array_key_exists('speedy_street_name', $addressData)){\n $speedy_street_name = $addressData['speedy_street_name'];\n }\n if(array_key_exists('speedy_street_number', $addressData)){\n $speedy_street_number = $addressData['speedy_street_number'];\n }\n if(array_key_exists('speedy_quarter_id', $addressData)){\n $speedy_quarter_id = $addressData['speedy_quarter_id'];\n }\n if(array_key_exists('speedy_quarter_name', $addressData)){\n $speedy_quarter_name = $addressData['speedy_quarter_name'];\n }\n if(array_key_exists('speedy_blok_number', $addressData)){\n $speedy_blok_number = $addressData['speedy_blok_number'];\n }\n\n if(array_key_exists('speedy_address_note', $addressData)){\n $speedy_address_note = $addressData['speedy_address_note'];\n }\n if(array_key_exists('speedy_office_id', $addressData)){\n $speedy_office_id = $addressData['speedy_office_id'];\n }\n\n //Perform address validation against Speedy address verification rules\n if (!$speedy_site_id) {\n return $isValidSpeedyAddress;\n }\n\n if (($speedy_quarter_id || $speedy_quarter_name) &&\n ( $speedy_street_number || $speedy_blok_number)) {\n $isValidSpeedyAddress = TRUE;\n } else if (($speedy_street_id || $speedy_street_name) &&\n ( $speedy_street_number || $speedy_blok_number)) {\n $isValidSpeedyAddress = TRUE;\n } else if ($speedy_address_note) {\n $isValidSpeedyAddress = TRUE;\n } else if ($speedy_office_id) {\n $isValidSpeedyAddress = TRUE;\n }\n\n return $isValidSpeedyAddress;\n }\n\n return FALSE;\n }", "title": "" }, { "docid": "967980a4007ffdd8b2100f0914ccff40", "score": "0.62095696", "text": "function os2forms_address_autocomp_addrs_autocomp_l_validate($element, &$form_state, $form) {\n // Equals to something like: submitted[address_linked][...].\n $parents = $element['#parents'];\n\n $value_address = drupal_array_get_nested_value($form_state['values'], array_merge($parents, array('address')));\n $value_matrikula = drupal_array_get_nested_value($form_state['values'], array_merge($parents, array('matrikula')));\n\n $address_element = drupal_array_get_nested_value($form_state['complete form'], array_merge($parents, array('address')));\n $matrikula_element = drupal_array_get_nested_value($form_state['complete form'], array_merge($parents, array('matrikula')));\n\n // Getting matrikula autocomplete params.\n $matrikula_ac_params = $matrikula_element['#webform_component']['extra'];\n $matrikula_ac_params = os2forms_address_autocomp_addrs_autocomp_l_generate_autocomplete_params($value_address, $matrikula_ac_params);\n\n // Updating matrikula option list.\n $matrikula_element = drupal_array_get_nested_value($form, array_merge($parents, array('matrikula')));\n\n $matrikula_element['#options'] = os2forms_address_autocomp_perform_request($matrikula_ac_params);\n $matrikula_element = form_process_select($matrikula_element);\n\n // Updating webform_component['extra'].\n $matrikula_element['#webform_component']['extra'] = $matrikula_ac_params + $matrikula_element['#webform_component']['extra'];\n\n if (!empty($matrikula_element['#options'])) {\n unset($matrikula_element['#attributes']['disabled']);\n }\n\n drupal_array_set_nested_value($form_state['complete form'], array_merge($parents, array('matrikula')), $matrikula_element);\n\n // Getting address autocomplete params.\n $address_ac_path = $address_element['#autocomplete_path'];\n $address_ac_params = os2forms_address_autocomp_extract_params_from_autocomplete_path($address_ac_path);\n\n if (!empty($value_address) && !os2forms_address_autocomp_is_element_valid($value_address, $address_ac_params)) {\n form_error($element, t('!name: Address value has been changed. Only values from list are allowed.', array('!name' => $element['#title'])));\n }\n if (!empty($value_matrikula) && !os2forms_address_autocomp_is_element_valid($value_matrikula, $matrikula_ac_params)) {\n form_error($element, t('!name: Matrikula value has been changed. Only values from list are allowed.', array('!name' => $element['#title'])));\n }\n}", "title": "" }, { "docid": "0ae5ff0eb85860c15088599e090065f0", "score": "0.6206716", "text": "public function onyeka_address($name, $value, $required = true, $min = 3, $max = 300) {\n //Get field object\n $field = $this->fields->getField($name);\n\n // If field is not required and empty, remove error and exit\n if (!$required && empty($value)) {\n $field->clearErrorMessage();\n return;\n }\n\n //Check field and set or clear error message\n if ($required && empty($value)) {\n $field->setErrorMessage('Required');\n } else if (strlen($value) < $min) {\n $field->setErrorMessage('Too short');\n } else if (strlen($value) > $max) {\n $field->setErrorMessage('Too long');\n } else {\n $field->clearErrorMessage();\n }\n\n // call pattern below\n $pattern = '/^[a-zA-Z0-9\\s\\.,-]{1,300}$/';\n $message = 'Invalid Address Format';\n $this->pattern($name, $value, $pattern, $message, $required = true);\n }", "title": "" }, { "docid": "3c92fe6fecb18bdce5364d0a2240c11a", "score": "0.61841965", "text": "public function searchAddress()\n {\n }", "title": "" }, { "docid": "f80e65647382ebe24a07d1431db3fa62", "score": "0.61003846", "text": "public function getCardAddressValidation() {\n try {\n return array(\n 'address' => 'required',\n 'city' => 'required',\n 'state' => 'required',\n 'pin' => 'required|max:10|regex:/(^[A-Za-z0-9 ]+$)+/',\n 'id' => 'required|exists:users,id'\n );\n } catch (Exception $ex) {\n Log::error(__METHOD__ . $ex->getMessage());\n }\n }", "title": "" }, { "docid": "a8a01c7a28ad42b2ecddfcd6bad5d120", "score": "0.6025623", "text": "function check_port_address(&$_data) {\n\n\t\tglobal $gMessage;\n\t\tglobal $gBase;\n\n\t\t//\n\t\t// Check that the three main fields are filled in\n\t\t//\n\t\tif (!$gBase->Valid(TYPE_NUM, $_data['streetnum'], 0, 99999999))\n\t\t\t$gMessage->_error->add(\"streetnum\", _(\"ERROR: invalid street number provided; please try again.\"));\n\t\tif (!$gBase->Valid(TYPE_STRING, $_data['streetname'], 1, 255))\n\t\t\t$gMessage->_error->add(\"streetname\", _(\"ERROR: invalid street name provided; please try again.\"));\n\t\tif (!$gBase->Valid(TYPE_STRING, $_data['city'], 1, 255))\n\t\t\t$gMessage->_error->add(\"city\", _(\"ERROR: invalid city name provided; please try again.\"));\n\n\t\tif ($gMessage->waiting())\n\t\t\treturn 0;\n\n\t\t//\n\t\t// Make sure the street name is only letters, numbers and spaces\n\t\t//\n\t\tif (!preg_match(\"/^[a-zA-Z0-9\\s]{1,}$/\", $_data['streetname']))\n\t\t\t$gMessage->_error->add(\"streetname\", _(\"ERROR: street names can only contain letters, numbers and spaces (no symbols), please try again.\"));\n\n\t\t//\n\t\t// If the street name is completely numeric, then add\n\t\t// the appropriate suffix (st/nd/rd/th)\n\t\t//\n\t\tif (is_numeric($_data['streetname']))\n\t\t\t$_data['streetname'] = $_data['streetname'] . $gBase->NumericSuffix($_data['streetname']);\n\n\t\tif ($gMessage->waiting())\n\t\t\treturn 0;\n\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "fef5626d8d16d8e5bbd6c1d2a0c30957", "score": "0.5990434", "text": "public function validateAddress(string $address)\n {\n return $this->__call('validateaddress', [$address]);\n }", "title": "" }, { "docid": "98dc8675a8de01a2432a4b550f9c842e", "score": "0.5975441", "text": "private function validateUSaddress(array $address) {\n\t\tif ($address['country'] != \"USA\")\n\t\t\treturn [];\n\n\t\trequire_once APPPATH . 'third_party/RocketShipIt/autoload.php';\n\n\t\t$av = new \\RocketShipIt\\AddressValidate('STAMPS');\n\t\t$av->setParameter('toAddr1', $address['addrLine1']);\n\t\tif (!empty($address['addrLine2Of1']))\n\t\t\t$av->setParameter('toAddr2', $address['addrLine2Of1']);\n\t\t$av->setParameter('toCity', $address['city']);\n\t\t$av->setParameter('toState', $address['state']);\n\t\t$av->setParameter('toCode', $address['zipcode']);\n\t\t$av->setParameter('toExtendedCode', $address['extendedZipcode']);\n\t\treturn $av->validate();\n\t}", "title": "" }, { "docid": "faab613dbc0dd4692897393de95a7daa", "score": "0.5946638", "text": "private function _ignoreAddressValidation()\n {\n $this->_quote->getBillingAddress()->setShouldIgnoreValidation(true);\n if (!$this->_quote->getIsVirtual()) {\n $this->_quote->getShippingAddress()->setShouldIgnoreValidation(\n true\n );\n }\n }", "title": "" }, { "docid": "7e7f16f22a89429ef9b7c43c194f5f6f", "score": "0.59111834", "text": "function radius_cvt_addr($data){}", "title": "" }, { "docid": "5506013d2bca217a62e75f55455f720f", "score": "0.5844115", "text": "abstract protected function getAddressInfo();", "title": "" }, { "docid": "58f003cc45556b7c8511f913414f66d4", "score": "0.58296895", "text": "public static function verify($auth_obj, &$address, $minimal_address_validation = false, \n\t\t$overwrite = true) {\n\t\t\n\t\t$api_version = PBShipping::getApiVersion(\"post/addresses/verify\");\t\n $api_path = \"/addresses/verify\";\n\t\tif ($minimal_address_validation == null || !$minimal_address_validation) \n\t\t\t$hdrs = array(\"minimalAddressValidation: false\");\n\t\telse\n\t\t\t$hdrs = array(\"minimalAddressValidation: true\");\n\t\t$json_resp = PBShippingRequestor::request($auth_obj, \"post\", $api_version, \n\t\t\t$api_path, $hdrs, null, $address);\n\t\tif ($overwrite == true) {\n\t\t\t$address = array_replace($address, $json_resp);\n\t\t\treturn $address;\n\t\t}\n\t\telse \n\t\t\treturn new PBShippingAddress($json_resp);\n\t}", "title": "" }, { "docid": "f2929c6d94a9cc614ea40a625bf14a23", "score": "0.5820127", "text": "function validateAddresses($addresses) {\n global $_RPC_USER,\n $_RPC_PASSWORD; \n\n if (gettype($addresses) != \"string\" or $addresses === \"\" or strlen($addresses) > 749) {\n return false;\n }\n\n if ($addresses != preg_replace('/[^1234567890ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz;]/', '', $addresses)) {\n return false;\n }\n\n $addressesArray = explode(\";\", $addresses);\n if (count($addressesArray) > 10) {\n return false;\n }\n\n $bitcoin = new Bitcoin_anon($_RPC_USER, $_RPC_PASSWORD);\n if (!$bitcoin) {\n return false;\n }\n\n for ($i = 0; $i < count($addressesArray); $i++) {\n $check = $bitcoin -> validateaddress($addressesArray[$i]);\n if (!$addressesArray[$i] or !$check[\"isvalid\"]) {\n return false;\n }\n }\n\n return $addressesArray;\n }", "title": "" }, { "docid": "53f58a3720cb4fd3ad9890aacca0b4b5", "score": "0.5794149", "text": "public function verify_address($address)\n\t{\n\t\t\n\t\t// Prep our query string\n\t\t$query_string = array(\n\t\t\t'Action' => 'VerifyEmailAddress',\n\t\t\t'EmailAddress' => $address\n\t\t);\n\t\t\n\t\t// Hand it off to Amazon\t\t\n\t\treturn $this->_api_request($query_string);\n\t\t\n\t}", "title": "" }, { "docid": "2ca6f5072d1ec29dd3d2b78c89175801", "score": "0.57892203", "text": "protected function validate_street_address($field, array $input, array $params = [], $value = null)\n {\n // Theory: 1 number, 1 or more spaces, 1 or more words\n $has_letter = preg_match('/[a-zA-Z]/', $value);\n $has_digit = preg_match('/\\d/', $value);\n $has_space = preg_match('/\\s/', $value);\n\n return $has_letter && $has_digit && $has_space;\n }", "title": "" }, { "docid": "c5de113dcf76c0dc9fdd36da4ae6f429", "score": "0.5787829", "text": "public static function addressIsValid($address) {\n $isValid = TRUE;\n $atIndex = strrpos($address, \"@\");\n if (is_bool($atIndex) && !$atIndex)\n {\n $isValid = FALSE; // No '@' symbol found!\n }\n else\n {\n $domain = substr($address, $atIndex+1);\n $local = substr($address, 0, $atIndex);\n $localLen = strlen($local);\n $domainLen = strlen($domain);\n if ($localLen < 1 || $localLen > 64)\n {\n // local part length exceeded\n $isValid = FALSE;\n }\n else if ($domainLen < 1 || $domainLen > 255)\n {\n // domain part length exceeded\n $isValid = FALSE;\n }\n else if ($local[0] == '.' || $local[$localLen-1] == '.')\n {\n // local part starts or ends with '.'\n $isValid = FALSE;\n }\n else if (preg_match('/\\\\.\\\\./', $local))\n {\n // local part has two consecutive dots\n $isValid = FALSE;\n }\n else if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain))\n {\n // character not valid in domain part\n $isValid = FALSE;\n }\n else if (preg_match('/\\\\.\\\\./', $domain))\n {\n // domain part has two consecutive dots\n $isValid = FALSE;\n }\n else if (! preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/', str_replace(\"\\\\\\\\\",\"\",$local)))\n {\n // character not valid in local part unless \n // local part is quoted\n if (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/', str_replace(\"\\\\\\\\\",\"\",$local)))\n {\n $isValid = FALSE;\n }\n }\n \n if ($isValid && !(checkdnsrr($domain,\"MX\") || checkdnsrr($domain,\"A\")))\n {\n // domain not found in DNS\n $isValid = FALSE;\n }\n }\n return $isValid;\n }", "title": "" }, { "docid": "deba0fffd9930855ab2c1262e4866482", "score": "0.5775168", "text": "function after_save_address_validation_custom_validation($user_id, $load_address)\n{\n if ($user_id <= 0) {\n return;\n }\n if ($load_address == 'billing') {\n $fields['billing_first_name'] = $_POST['billing_first_name'];\n $fields['billing_last_name'] = $_POST['billing_last_name'];\n $fields['billing_dob'] = $_POST['billing_dob'];\n $fields['billing_dlf'] = $_POST['billing_dlf'];\n $fields['billing_dlb'] = $_POST['billing_dlb'];\n\t\t$fields['billing_dl'] = $_POST['billing_dl'];\n\t\t$fields['billing_state'] = $_POST['billing_state'];\n\t\t$fields['billing_postcode'] = $_POST['billing_postcode'];\n\t\t$fields['billing_city'] = $_POST['billing_city'];\n\n $validate = document_varify($fields);\n if ($validate == false)\n wc_add_notice(__('Identity validation failed, please check all fields and re-try'), 'error');\n\n }\n return;\n}", "title": "" }, { "docid": "82117a6b1555d40a20bab2ed14c28ae6", "score": "0.5755553", "text": "public function validateAddress($adress){\n\t\t$padrao = \"/\\A[A-z\\ ]*\\z/\";\n\t\treturn preg_match($padrao, $adress);\n\t}", "title": "" }, { "docid": "2d36801919bc3fc9c2ff1bf7c8ce3a9c", "score": "0.5735311", "text": "public function testSubmitAddress()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "e0346df29943b2239762de86a3355828", "score": "0.57195514", "text": "function mail_isvalid($email){\n $validator = new EmailAddressValidator;\n $validator->allowLocalAddresses = true;\n return $validator->check_email_address($email);\n}", "title": "" }, { "docid": "c21a95f4ecf194a5a24e9c8e06f9d895", "score": "0.57102346", "text": "public function getFromAddress();", "title": "" }, { "docid": "640854bb596bfc33fdf4473f67b3adf1", "score": "0.5707629", "text": "function is_adress_valid($adress) {\n\t\t/* Check if the adress is between 2 and 50 characters,\n\t\t\tand only contains letters, numbers or dashes */\n\t\techo 'adress:'.$adress;\n\t\tif (preg_match(\"#^[a-zA-Z0-9- ]{2,50}$#\", $adress)) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "2096a448264d75023a480f630aec7ac0", "score": "0.5690594", "text": "function lunch_address_hook($hook, $type, $fields, $params) {\n\telgg_load_library('elgg:lunch');\n $street = urlencode(get_input('street'));\n $city = urlencode(get_input('city'));\n\t$json = lunch_geocode($street . ',+' . $city);\n set_input('geocode', $json['results'][0]['geometry']['location']);\n set_input('activity_enable', 'no');\n set_input('forum_enable', 'no');\n return true;\n}", "title": "" }, { "docid": "24b9a3c4053bda30bb8bfb639d478a92", "score": "0.56851065", "text": "function fnValidateStreet($sStreet){\n\n\t// checks for at least one character and one number, ignores spaces and commas.\n\t$bRegexTest = preg_match(\"/^([0-9\\s*]+[æøåa-zÆØÅA-Z\\s\\','*]+|[æøåa-zÆØÅAA-Z\\s\\','*]+[0-9\\s*]+)[0-9\\s\\','*æøåa-z\\s\\','*ÆØÅAA-Z\\s\\','*]*$/\", $sStreet);\n\t\n\t$iMin = 2;\n\t$iMax = 28;\n\n\t// checks length and regex\n\tif( strlen($sStreet) < $iMin || strlen($sStreet) > $iMax ){\n\t\treturn false;\n\t} else if ($bRegexTest == 0) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}", "title": "" }, { "docid": "26b3e81021982dbb2398a730cf1c2056", "score": "0.5679491", "text": "public function updateAddress()\n {\n }", "title": "" }, { "docid": "e5d8eec249adbbe5ca0607a2a3506a3d", "score": "0.56682384", "text": "function adresschecker($address){\n\n\t$decodedAddress = base58_decode($address);\n\n\t$hexEncodedAddress = encodeHex($decodedAddress);\n\t$lastCharacter = substr($hexEncodedAddress, -8);\n\n\t//Append the 00 to the front of it\n\t$hexEncodedAddress = appendHexZeros($address, $hexEncodedAddress);\n\n\t//Remove last 8 characters from Hexencoded string\n\t$encodedAddress = substr($hexEncodedAddress, 0, strlen($hexEncodedAddress) - 8);\n\n\t//Convert to binary\n\t$binaryAddress = pack(\"H*\" , $encodedAddress);\n\n\t//Hash(Hash(Value))\n\t$hashedAddress = strtoupper(hash(\"sha256\", hash(\"sha256\", $binaryAddress, true)));\n\n\t//Si l'adresse est vérifiée on cré le compte dans la BDD, sinon on revient en page d'accueil\n\tif ((substr($hashedAddress, 0 ,8)) == (substr($hexEncodedAddress, -8)))\n\t\t{\n\t\t\t$statut = true;\n\t\t}\n\n\telse\n\t\t{\n\t\t\t$statut = false;\n\t\t}\n\n\t\treturn $statut;\n}", "title": "" }, { "docid": "d475877f203f45a93c579d6bb76d71e8", "score": "0.5632176", "text": "public function testAddress(): void\n {\n $this->assertInstanceOf(\n Address::class,\n new Address('Jane Doe', NULL, '1 Hacker Way', NULL, 'Palo Alto', 'CA', '94025', NULL, 'US')\n );\n }", "title": "" }, { "docid": "c383e1f40673218e8b0fc6096ad0317c", "score": "0.5617758", "text": "function isValidAddressL1($addressL1) {\n\tif($addressL1 == \"\")\n\t\treturn false;\n\treturn true;\n}", "title": "" }, { "docid": "ea6781c95d3d98bba72be7d72447e3f6", "score": "0.5616044", "text": "public function testPostal()\n {\n $this->assertTrue(NoValidation::postal('0123'));\n $this->assertFalse(NoValidation::postal('90210'));\n }", "title": "" }, { "docid": "44d8fc27a53fd2bdd8b187398485c987", "score": "0.56095827", "text": "public function createAddress()\n {\n }", "title": "" }, { "docid": "047acd750a9853f6226d3bef29b7ac10", "score": "0.5606097", "text": "public static function parseAddress($address) {\n /***\n * 2008-05-08 used first for quickbooks import => database table\n *\n * johnson city, tex|tx|texas 78691[-1234]\n * vancouver, bc A0A 0A0\n * charlotte, n.c. 02899\n ***/\n try {\n $address = trim($address);\n $zip = '([a-z0-9][0-9][a-z0-9][- ]*[0-9][a-z0-9][0-9]*)([- ]+([0-9]{4}))*';\n $state = '([.a-z]{2,4})';\n $parts = explode(',', $address);\n array_walk($parts, function (&$part) {\n $part = trim($part);\n });\n $state_zip = array_pop($parts);\n if (preg_match(\"/$state\\s+$zip\" . '$' . \"/i\", $state_zip, $matches)) {\n if (sizeof($matches) >= 2) {\n $state = strtoupper(str_replace('.', '', $matches[1]));\n $zip = $matches[2];\n }\n } else { //state only\n $state = $state_zip;\n $zip = null;\n }\n $city = array_pop($parts);\n $address1 = array_pop($parts);\n $address2 = array_pop($parts);\n if (! empty($address2)) {\n [$address1, $address2] = [$address2, $address1];\n }\n\n return compact('address1', 'address2', 'city', 'state', 'zip');\n } catch (\\Exception $e) {\n $address1 = null;\n $address2 = null;\n $city = null;\n $state = null;\n $zip = null;\n return compact('address1', 'address2', 'city', 'state', 'zip');\n }\n }", "title": "" }, { "docid": "9e8efb9d028b63aa4313f425131d7c82", "score": "0.55815107", "text": "public function getValidationForAddress($postCode) {\n try { \n return [\n 'address' => 'required',\n 'city' => 'required',\n 'state' => 'required',\n 'pin' => \"required|regex:/(^[A-Za-z0-9 ]+$)+/|max:10\",\n ];\n } catch (Exception $ex) {\n Log::error(__METHOD__ . $ex->getMessage());\n }\n }", "title": "" }, { "docid": "4c3d65e56d89e886073eb3c6bae36d42", "score": "0.55769265", "text": "public function checkAndCorrectAddresses($abt = null) {\n if (!isset($abt))\n $abt = ClientsAdresses::orderByType($this->client->addresses->toArray());\n \n $type_d = ClientsAdresses::TYPE_DELIVERY;\n $type_b = ClientsAdresses::TYPE_BILLING;\n \n // something went wrong somewhere\n if (!$abt[$type_d]['length'])\n return false;\n \n // the set delivery address doesn't exist or doesn't belong to the client, use the default one\n if (!isset($this->delivery_address) || !isset($abt[$type_d]['list'][$this->delivery_address_id])) {\n $dda = reset($abt[$type_d]['list']);\n $this->delivery_address_id = $dda['id'];\n }\n \n if ($abt[$type_b]['length']) {\n // the billing address doesn't belong to the client set ones -> get the default one\n if (!isset($this->billing_address) || !isset($abt[$type_b]['list'][$this->billing_address_id])) {\n $dba = reset($abt[$type_b]['list']);\n $this->billing_address_id = $dba['id'];\n }\n } else {\n // there is no billing address set for the client, but the billing isn't set to the delivery one -> correct it\n if ($this->billing_address_id != $this->delivery_address_id) {\n $dba = $this->delivery_address;\n $this->billing_address_id = $this->delivery_address_id;\n }\n }\n \n return true;\n }", "title": "" }, { "docid": "6179b38a5074edb492c9ced3534785ac", "score": "0.55719244", "text": "public function setAddress($address);", "title": "" }, { "docid": "6db64fce6affd287c459e974be91b065", "score": "0.5567951", "text": "function check_valid_address($domainname) {\n\t\t\n\t\t//Check domain length > 2 || < 63 characters\n\t\t if (strlen($domainname) < 3){\n\t\t return 1;\n\t\t//Check domain cannot start with - and \n\t\t } elseif (ereg(\"^-|-$|^\\.|\\.$\", $domainname)){\n\t\t return 2;\n\t\t//Domain is set in order\n\t\t } elseif (ereg(\"\\.\", $domainname)){\n\t\t return 7;\n\t\t//Letters , numbers and - _ only\n\t\t } elseif (!ereg(\"([a-z]|[A-Z]|[0-9]|-){\".strlen($domainname).\"}\", $domainname)){\n\t\t return 3;\n\t\t }\n\t\t return 0;\n\t\t}", "title": "" }, { "docid": "9379cc9ba36578bc3c9b878f3dae53e5", "score": "0.5559089", "text": "function validateUPSAddress($destPostalCode,$destCountryCode){ \n \n global $iso_countries;\n \n if(empty($destPostalCode)){\n return (\"Missing the one to six alphanumeric-character postal code of the destination country, if the destination country uses postal codes.\");\n }\n \n if(empty($destCountryCode)){\n return (\"Missing the country of the destination postal code.\");\n }\n if(strlen($destCountryCode) > 3){\n \t reset($iso_countries);\n \t $destCountryCode = preg_replace(\"'&AMP;'si\",\"and\",$destCountryCode);\n \t $destCountryCode = preg_replace(\"'ST. 'si\",\"Saint \",$destCountryCode);\n \twhile (list($key, $value) = each($iso_countries)) {\n \t if(strcasecmp($destCountryCode,$value)==0){\n \t $destCountryCode = strtoupper($key);\n \t break;\n \t } \n }\n \t} \n\n \t\n $code = strtolower($destCountryCode);\n \t$country = $iso_countries[\"$code\"];\n \n if(empty($country)){\n return (\"Missing the ISO country code of the destination country $destCountryCode .\");\n }\n \n if(! eregi('US',$destCountryCode)) {return (\"Valid Postal Code check not supported for $destCountryCode.\"); } \n\n \n $destPostalCode = urlencode($destPostalCode);\n \n \n$work_string = \"http://www.ups.com/using/services/cszval/cszval_dss.cgi?\";\n$work_string .= \"AcceptUPSLicenseAgreement=yes\";\n$work_string .= \"&AppVersion=1.0\";\n$work_string .= \"&ResponseType=application/x-ups-cszval\";\n$work_string .= \"&PostalCode=$destPostalCode\";\n \n $fp = fopen($work_string, \"r\"); \n if(!$fp){ return \"Error connecting to UPS shipping rates calculator server.\"; } \n while(!feof($fp)){ \n $result1 = fgets($fp, 1024); \n //echo \"<p>$result1\";\n if(eregi('error',$result1)) { fclose($fp); return (\"Not a Valid US Postal Code.\"); } \n $result = array();\n $result = split(\"%\", $result1);\n if(is_array($result)){\n if(preg_match(\"/^[0-9]/\",$result[8])){\n $returnval .= \": $result[6], $result[7] $result[8]\"; \n } \n } \n \n } \n fclose($fp); \n if(! $returnval) { $returnval = \"Error connecting to UPS zipcode validating server.\"; } \n return $returnval; \n}", "title": "" }, { "docid": "680c626aca9943404e85da1bc608310d", "score": "0.55576897", "text": "function parseAddress($addresses, $insert, $for_real)\n{\n global $countries;\n\n foreach ($addresses as $id => $address) {\n if (empty($address)) {\n continue;\n }\n $city = $state = $postalCode = $street = $country = '';\n $p_address = Horde_Form_Type_address::parse($address);\n if (!count($p_address)) {\n $street = $address;\n } else {\n if (!empty($p_address['street'])) {\n $street = $p_address['street'];\n }\n if (!empty($p_address['city'])) {\n $city = $p_address['city'];\n }\n if (!empty($p_address['state'])) {\n $state = $p_address['state'];\n }\n if (!empty($p_address['zip'])) {\n $postalCode = $p_address['zip'];\n }\n if (!empty($p_address['country'])) {\n $country = isset($countries[Horde_String::upper($p_address['country'])])\n ? $countries[Horde_String::upper($p_address['country'])]\n : Horde_String::upper($p_address['country']);\n }\n }\n if ($for_real) {\n $GLOBALS['db']->execute($insert, array($street, $city, $state, $postalCode, $country, $id));\n } else {\n $GLOBALS['cli']->writeln(\"ID: $id\\nStreet: $street\\nCity: $city\\nState: $state\\nPostal Code: $postalCode\\nCountry: $country\\nAddress:\\n$address\\n\");\n }\n }\n}", "title": "" }, { "docid": "3f409e86faa788a567ab9218eb86038f", "score": "0.5547602", "text": "public function addresscheck($coin, $address)\n\t{\n//\t\t$results = json_decode($res->getBody());\n//\t\treturn $results;\n\t}", "title": "" }, { "docid": "c34b9a0b67189bd833ac86904be8d4ee", "score": "0.55457354", "text": "public function getAddress();", "title": "" }, { "docid": "c34b9a0b67189bd833ac86904be8d4ee", "score": "0.55457354", "text": "public function getAddress();", "title": "" }, { "docid": "c34b9a0b67189bd833ac86904be8d4ee", "score": "0.55457354", "text": "public function getAddress();", "title": "" }, { "docid": "98a8829449f506d4e9c7ec79e463271d", "score": "0.5533807", "text": "public function verify_address_change()\n {\n\n $this->load->helper(array('form', 'url'));\n $this->load->library('form_validation');\n\n if ($this->form_validation->run('address') == FALSE)\n {\n // if the form is completely ok, we call the index method with\n // the new address as a parameter\n\n $this->checkout_1($this->input->post('new_selected_address'),true);\n\n } elseif ($this->Account_model->set_account_update_address(\n Array(\n \"id\" => $this->session->id,\n \"add_id\" => $this->input->post(\"new_selected_address\"),\n \"new_description\" => $this->input->post('new_description'),\n \"new_name\" => $this->input->post('new_name'),\n \"new_surname\" => $this->input->post('new_surname'),\n \"new_address\" => $this->input->post('new_address'),\n \"new_number\" => $this->input->post('new_number'),\n \"new_block\" => $this->input->post('new_block'),\n \"new_commune\" => $this->input->post('new_commune'),\n \"new_phone\" => $this->input->post('new_phone'),\n \"new_email\" => $this->input->post('new_email'))\n ))\n {\n // if the insert fails user is redirected to account\n $this->checkout_1();\n }\n }", "title": "" }, { "docid": "2c08ac2a7f75ea4a96135ebe0b594b04", "score": "0.5531659", "text": "function address_post(){\n\n $this->check_service_auth();\n $user_id = $this->authData->userID;\n\n $this->form_validation->set_rules('name', 'Name','trim|required|min_length[2]|max_length[100]');\n $this->form_validation->set_rules('phone_number', 'Phone Number','trim|required|numeric|regex_match[/^[0-9]/]|min_length[5]');\n $this->form_validation->set_rules('house_number', 'House Number','trim|required|max_length[50]');\n $this->form_validation->set_rules('street', 'Street','trim|required');\n $this->form_validation->set_rules('city', 'City','trim|required|max_length[100]');\n $this->form_validation->set_rules('pincode', 'Pincode','trim|required|numeric|max_length[20]');\n $this->form_validation->set_rules('dial_code', 'Dial Code','trim|required');\n $this->form_validation->set_rules('country', 'Country','trim|required');\n\n if (!preg_match('/^(0|[0-9]\\d*)$/',$this->post('phone_number'))){\n\n $this->error_response('Phone number is not valid.'); //error reponse\n }\n\n if (!preg_match('/^(0|[0-9]\\d*)$/',$this->post('pincode'))){\n\n $this->error_response('Pin code is not valid.'); //error reponse\n }\n\n //set response msg for form validation\n if($this->form_validation->run() == FALSE){\n $this->error_response(strip_tags(validation_errors()));\n }\n \n $name = sanitize_input_text($this->post('name')); // Person name on which item delivered\n $phone_number = sanitize_input_text($this->post('phone_number'));\n $house_number = sanitize_input_text($this->post('house_number'));\n $street = sanitize_input_text($this->post('street'));\n $city = sanitize_input_text($this->post('city'));\n $pincode = sanitize_input_text($this->post('pincode'));\n $country_code = sanitize_input_text($this->post('country_code')); //IN, US\n $dial_code = sanitize_input_text($this->post('dial_code')); //+91, +97\n $country = sanitize_input_text($this->post('country')); \n //$is_default = $this->post('is_default'); //Making default address\n\n //check user profile address is empty or not\n $isProfileAddress = $this->common_model->getsingle(USERS,array('userID' =>$user_id));\n\n if($isProfileAddress->profile_address == null && $isProfileAddress->profile_country_code == null){\n\n $updateProfileAddress = array(\n 'profile_address' => $house_number.','.$street.','.$city.','.$country,\n 'profile_country_code' => $country_code\n );\n\n $this->common_model->updateFields(USERS,$updateProfileAddress,array('userID' =>$user_id)); //Update field for user profile address\n }\n\n //check user has added address before\n $isAddress = $this->common_model->getsingle(USER_ADDRESS,array('user_id' =>$user_id));\n\n $insertData = array(\n 'user_id' => $user_id,\n 'name' => $name,\n 'phone_dial_code' => $dial_code,\n 'country_code' => $country_code,\n 'mobile_number' => $phone_number,\n 'house_number' => $house_number,\n 'locality' => $street,\n 'city' => $city,\n 'zip_code' => $pincode,\n 'country' => $country,\n 'updated_at' => datetime(),\n 'created_at' => datetime(),\n );\n if(empty($isAddress)){\n $insertData['is_default'] = 1; //make default address if user add first address\n }\n \n $addressID = $this->common_model->insertData(USER_ADDRESS,$insertData);\n if(!empty($addressID)){\n $address= $this->common_model->getsingle(USER_ADDRESS,array('addressID' =>$addressID));\n\n $this->success_response(get_response_message(161),['address_list'=> $address]);\n }\n\n $this->error_response(get_response_message(107),SERVER_ERROR,500); //error reponse\n }", "title": "" }, { "docid": "24e124ef6e0196dbaa325eb56e15c48e", "score": "0.5530529", "text": "protected function streetAddress(string $field, string $value, $param = null)\n{\n if (empty($value)) {\n return true;\n }\n\n $hasLetter = preg_match('/[a-zA-Z]/', $value);\n $hasDigit = preg_match('/\\d/', $value);\n $hasSpace = preg_match('/\\s/', $value);\n\n $passes = $hasLetter && $hasDigit && $hasSpace;\n\n if (!$passes) {\n $this->addError($field, 'streetAddress', $param);\n }\n}", "title": "" }, { "docid": "49f1e2f73a1533115bdb2e721ac6a845", "score": "0.55255544", "text": "private function containsFromAddress($fromAddresses, $userInput) {}", "title": "" }, { "docid": "3a82ac54ccd5c9ed88cb2606c21be907", "score": "0.5520802", "text": "public function verifyAddress($address, $signature);", "title": "" }, { "docid": "f4c5fdeb9668a6fb5b333c44dcad72b9", "score": "0.55085903", "text": "public function rules()\n {\n return [\n 'address' => 'required',\n ];\n }", "title": "" }, { "docid": "02a69b3df1241ffc3567703a85d72111", "score": "0.5508231", "text": "public function testAddAddressToRejects()\n {\n $address = new Model\\Address(array(\n 'email' => '[email protected]',\n 'comment' => 'Comment for blacklisting.',\n 'subaccount' => null\n ));\n\n $response = $this->service->add($address);\n\n $this->assertNotEmpty($response);\n\n $this->assertArrayHasKey('email', $response);\n $this->assertArrayHasKey('added', $response);\n\n $this->assertEquals($address->getEmail(), $response['email']);\n $this->assertTrue($response['added']);\n\n return $response['email'];\n }", "title": "" }, { "docid": "f46d8928a2618bc4d31052a46dfa03c4", "score": "0.550294", "text": "public function cleanAddressAction(): JsonResponse\n {\n $this->forbidNotXmlHttpRequest();\n\n if (! $this->http_request->request->has('address')) {\n throw new Exception('Invalid request.', 400);\n }\n\n $dadata = new Dadata();\n\n if (! $result = $dadata->cleanAddress($this->http_request->request->get('address'))) {\n return $this->sendJsonResponse(['data' => ['success' => false]]);\n }\n\n return $this->sendJsonResponse(['data' => ['success' => true, 'address' => $result]]);\n }", "title": "" }, { "docid": "2a5ca47ec76281fffa3be647cc7cbcfc", "score": "0.54931647", "text": "protected function verifyAddressRequest($address)\n {\n // verify the required parameter 'address' is set\n if ($address === null || (is_array($address) && count($address) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $address when calling verifyAddress'\n );\n }\n\n $resourcePath = '/api/v2/address/verify';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($address !== null) {\n $queryParams['address'] = ObjectSerializer::toQueryValue($address);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'application/xml', ]\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'application/xml', ],\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-CSRF-TOKEN');\n if ($apiKey !== null) {\n $headers['X-CSRF-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 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "52e67a87bf9d43e94fb8a76285546ba7", "score": "0.5482291", "text": "public function testCRUDAddressApi()\n {\n $strCompanyId = $this->createCompany();\n $arrFakeAddr = factory(Address::class)->make()->toArray();\n $strCompId = $arrFakeAddr[\"company_id\"];\n $this->refreshApplication();\n\n $addResponse = $this->_addAddress($arrFakeAddr); // add address\n\n $this->assertEquals(200, $addResponse->status());\n $intAddressId = json_decode($addResponse->getContent())->data->id; // get last inserted row by id\n $this->refreshApplication();\n\n $editAddrResponse = $this->_updateAddress($strCompId, $intAddressId);\n $this->assertEquals(200, $editAddrResponse->status());\n\n $strAddressIds = json_decode($editAddrResponse->getContent())->data->id;\n $deleteResponse = $this->_deleteAddress($strCompId, $strAddressIds); // delete address by ID\n $this->assertEquals(200, $deleteResponse->status());\n }", "title": "" }, { "docid": "651041267184dd083845d3d24990ab42", "score": "0.5476722", "text": "public static function isValidateAddress($address)\n {\n $validator = new Regex(array(\n 'pattern' => '/^([\\x{4e00}-\\x{9fa5}]|[a-zA-Z0-9]|[,]|[%]|[%]|[$]|[¥]|[\\']|[,]|[.]|[。]|[:]|[:]|[;]|[?]|[?]|[\\s]){0,140}$/u'\n ));\n $flag = $validator->isValid($address);\n return $flag;\n }", "title": "" }, { "docid": "915ce0da70d1546a6206b80648c6132f", "score": "0.5471027", "text": "public function parseAddress($xml);", "title": "" }, { "docid": "481709bdeb9f45b96c9325625d989219", "score": "0.5453842", "text": "function valid_email ( $address )\n{\n\treturn ( !preg_match ( \"/^([a-z0-9\\+_\\-]+)(\\.[a-z0-9\\+_\\-]+)*@([a-z0-9\\-]+\\.)+[a-z]{2,6}$/ix\" , $address ) ) ? FALSE : TRUE;\n}", "title": "" }, { "docid": "c4c59bb0197ce241ab8d0abda86d4c54", "score": "0.5442563", "text": "public function getFromAddress(): string;", "title": "" }, { "docid": "82e811862f67b7c807caebc0180ed47a", "score": "0.5438186", "text": "public function doAddAddress()\n\t{\n \t$rules = array(\n \t'name' => 'required', // make sure the username field is not empty\n \t\n \t);\n\n \t$validator = Validator::make(Input::all(), $rules);\n\n \tif ($validator->fails()) {\n \treturn Redirect::to('/db/addnewaddr')\n \t->withErrors($validator);\n \t}\n\n \telse {\n \t\t$newItem = new Address;\n \t\t$newItem->fill(Input::all())->save();\n \t\treturn Redirect::to('db/viewaddrs');\n \t}\n\t}", "title": "" }, { "docid": "99897632ac137f9ed0c29f33b2b2e29e", "score": "0.54380083", "text": "public function testAddressFormatting()\n {\n // Given there is an address with poor formatting;\n $address = new Address(\n [\n 'name' => 'ms foo bar',\n 'line_one' => 'soMe house',\n 'line_two' => 'sOme street',\n 'city' => 'fooBar citY',\n 'post_code' => 'ab5 dE6',\n 'country_code' => 'gb',\n ]\n );\n\n // When we get it as a string;\n $addressString = (string) $address;\n\n // Then it should be nicely formatted.\n self::assertEquals(\n 'Ms Foo Bar, Some House, Some Street, Foobar City, AB5 DE6, GB',\n $addressString\n );\n }", "title": "" }, { "docid": "1d8094d3c23f521539e97364c4c036f9", "score": "0.5431777", "text": "public function testShouldGetGeoLocationOfObjectAddress()\n\t {\n\t\t$xml = new SimpleXMLElement(file_get_contents(__DIR__ . \"/datasets/adverts/a.xml\"));\n\t\t$advert = new Advert($xml);\n\n\t\t$advert->getGeoLocation();\n\t\t$this->assertRegExp(\"/[0-9]{1,2}\\.[0-9]{1,2}\\.[0-9]{4}/ui\", $advert->date);\n\t\t$advert->createXML();\n\t\t$this->assertEquals(104.360772, $advert->lat);\n\t\t$this->assertEquals(52.250526, $advert->lang);\n\n\t\t$expectedxml = new SimpleXMLElement(file_get_contents(__DIR__ . \"/datasets/adverts/b.xml\"));\n\t\t$advertxml = new SimpleXMLElement($advert->doc->saveXML());\n\t\t$props = [\"country\", \"region\", \"city\", \"address\", \"lat\", \"lang\", \"description\", \"price\", \"phone\", \"link\", \"rooms\", \"area\", \"name\", \"comission\", \"floor\", \"floors\"];\n\t\tforeach ($props as $prop)\n\t\t {\n\t\t\tif (empty($advertxml->$prop) === false && empty($expectedxml) === false)\n\t\t\t {\n\t\t\t\t$this->assertEquals($expectedxml->$prop, $advertxml->$prop);\n\t\t\t } //end if\n\n\t\t } //end foreach\n\n\t }", "title": "" }, { "docid": "89c0b28a1c282de9862d3897024ed67d", "score": "0.5419091", "text": "protected function validate_streetaddress($field, $input, $args = NULL)\n {\n if (!isset($input[$field]) || empty($input[$field])) {\n return TRUE;\n }\n\n // Theory: 1 number, 1 or more spaces, 1 or more words\n $hasLetter = preg_match('/[a-zA-Z]/', $input[$field]);\n $hasDigit = preg_match('/\\d/', $input[$field]);\n $hasSpace = preg_match('/\\s/', $input[$field]);\n\n return ($hasLetter && $hasDigit && $hasSpace);\n }", "title": "" }, { "docid": "ddb9876493024adbfd98020268ed3c2f", "score": "0.5418802", "text": "function _geocodeAddress($address) {\n $request = 'address=' . $address . '&sensor=false';\n\n $HttpSocket = new HttpSocket();\n \n $result = $HttpSocket->get('http://maps.google.com/maps/api/geocode/json', $request);\n $result = json_decode($result, true);\n \n $status = $result['status'];\n $data = array();\n if ( $status == 'OK') {\n $addressFields = $result['results'][0]['address_components'];\n $this->addressData = $addressFields;\n \n $data['province_id'] = $this->_getVenueProvince();\n $data['region_id'] = $this->_getVenueRegion( $data['province_id']);\n $data['city_id'] = $this->_getVenueCity( $data['region_id'], $data['province_id'] );\n $data['city_neighbourhood_id'] = $this->_getVenueNeighbourhood( $data['city_id']);\n $data['city_region_id'] = $this->_getVenueCityRegion( $data['city_id']);\n $data['postal'] = $this->_lookupAddressField('postal_code');\n \n }\n // debug($data); exit;\n return($data);\n }", "title": "" }, { "docid": "7af32e5e91fa518adcbd93d33789fd2c", "score": "0.5401822", "text": "static public function isAddress($address) {\n return empty($address) or preg_match('/^[^!<>?=+@{}_$%]*$/', $address);\n }", "title": "" }, { "docid": "ec8c881d46e5a689213293da903877a7", "score": "0.54015875", "text": "public function index(Request $request)\n {\n \\Shippo::setApiKey('shippo_test_d36106395f5e193336d71737ac26208fef870f4e');\n\n\n $fromAddress = \\Shippo_Address::create( array(\n \"name\" => \"Shawn Ippotle\",\n \"company\" => \"Shippo\",\n \"street1\" => \"215 Clayton St.\",\n \"city\" => \"San Francisco\",\n \"state\" => \"CA\",\n \"zip\" => \"94117\",\n \"country\" => \"US\",\n \"email\" => \"[email protected]\",\n \"validate\" => true\n ));\n $arr =json_decode($fromAddress,true);\n $object_id =$arr['object_id'];\n dd($object_id);\n $fromAddress = \\Shippo_Address::validate($object_id);\n\n// print_r($fromAddress);\n// dd (json_decode($fromAddress,true));\n $validArr =json_decode($fromAddress,true);\n// dd($validArr['validation_results']['is_valid']);\n return $validArr['validation_results']['is_valid'];\n\n }", "title": "" }, { "docid": "b8069291d11fc24b5e309c92f0ae1df1", "score": "0.5399615", "text": "public function testAddressingCountryCodeTooShort()\r\n {\r\n (new Pakket)\r\n ->setGeadresseerdeLandcode('x');\r\n }", "title": "" }, { "docid": "595463ee6d97aafc8f8253d98a292ee3", "score": "0.5393064", "text": "function maporama_curl($address1, $address2, $zip, $city, $state = null, $countrycode)\r\n {\r\n // If zip and city are empty (the address is placed only in line1 and line2) THEN parse zip and city from line2\r\n if(empty($zip) && empty($city)) // parse line2\r\n {\r\n $a = explode(\" \",$address2);\r\n $i=0;\r\n $p1 = true;\r\n $zip .= $a[$i++].\" \"; // first piece always D-20200\r\n while($a[$i])\r\n {\r\n if($p1 && is_numeric($a[$i]))\r\n $zip .= $a[$i].\" \";\r\n else\r\n { $p1 = false;\r\n $city .= $a[$i].\" \";\r\n }\r\n $i++;\r\n }\r\n }\r\n \r\n // fix any incompatibilities between addressbook and maporama country codes\r\n if (strcasecmp($countrycode, \"GB\")==0) {$countrycode=\"UK\";}\r\n if (strcasecmp($countrycode, \"VE\")==0) {$countrycode=\"UE\";}\r\n if (strcasecmp($countrycode, \"AZ\")==0) {$countrycode=\"AJ\";}\r\n if (strcasecmp($countrycode, \"AW\")==0) {$countrycode=\"AB\";}\r\n if (strcasecmp($countrycode, \"PF\")==0) {$countrycode=\"FP\";}\r\n if (strcasecmp($countrycode, \"SB\")==0) {$countrycode=\"SS\";}\r\n if (strcasecmp($countrycode, \"SC\")==0) {$countrycode=\"SH\";}\r\n if (strcasecmp($countrycode, \"SJ\")==0) {$countrycode=\"NO\";}\r\n if (strcasecmp($countrycode, \"VG\")==0) {$countrycode=\"VU\";}\r\n if (strcasecmp($countrycode, \"VI\")==0) {$countrycode=\"VS\";}\r\n if (strcasecmp($countrycode, \"WF\")==0) {$countrycode=\"WA\";}\r\n if (strcasecmp($countrycode, \"UM\")==0) {$countrycode=\"US\";}\r\n \r\n // Simplistic check to decide if Address1 or Address2 is the one to send to Maporama\r\n // We will base the decision on the presence of a housenumber at either the start or the end of the line\r\n \r\n if ($address1 AND $address2) {\r\n // check start of string for housenumber\r\n if ((is_numeric(mb_substr($address1, 0, mb_strpos($address1,\" \")))) OR (is_numeric(mb_substr($address1, -1)))) {\r\n $address = $address1;\r\n } else {\r\n if ((is_numeric(mb_substr($address2, 0, mb_strpos($address2,\" \")))) OR (is_numeric(mb_substr($address2, -1)))) {\r\n $address = $address2;\r\n }\r\n }\r\n } else {\r\n if ($address1) {\r\n $address = $address1;\r\n }\r\n }\r\n \r\n $address = utf8_encode($address);\r\n $city = utf8_encode($city);\r\n $state = utf8_encode($state);\r\n $zip = utf8_encode($zip);\r\n $countrycode = mb_strtoupper($countrycode);\r\n $vars = \"form-name=MapForm&xml=map&xsl=map&MD_scale=\" . urlencode('0.0002') . \"&MD_drawTraffic=0&MD_zoomToFit=1&MD_size=500x380&MD_mapTemplate=US&GC_country=$countrycode&GC_address=\" . \r\n $address . \"&GC_zip=\" . $zip . \"&GC_state=\" . $state . \"&GC_city=\". $city .\"&Go=Go\";\r\n \r\n $accept = array( 'Accept-Encoding: gzip', 'Accept-Language: en' );\r\n $ch = curl_init();\r\n curl_setopt($ch, CURLOPT_URL,'http://world.maporama.com/');\r\n curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)'); // pretend to be InternetExplorer!!\r\n curl_setopt($ch, CURLOPT_HEADER, 1);\r\n curl_setopt($ch, CURLOPT_HTTPHEADER, $accept);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n $html = curl_exec($ch); // Fetch the frontpage as if we were a normal user inclusive cookie\r\n sleep(1); // enter the data really fast ;-)\r\n curl_setopt($ch, CURLOPT_URL,'http://world.maporama.com/drawaddress.aspx');\r\n curl_setopt($ch, CURLOPT_POST, 1);\r\n curl_setopt($ch, CURLOPT_POSTFIELDS, $vars); \r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n $html = curl_exec($ch);\r\n curl_close($ch);\r\n \r\n return $html . $vars; // null on error\r\n }", "title": "" }, { "docid": "e69e3b0a491176d5519d072eb2a5f7b5", "score": "0.53733695", "text": "public function testCRUDAddressFail()\n {\n $arrFakeAddress = factory(Address::class)->make()->toArray();\n $companyId = $arrFakeAddress[\"company_id\"];\n $this->refreshApplication();\n $strFakeID = $this->_getFakeAddrId();\n $arrFakeAddress[\"company_id\"] = Uuid::generate(4)->string;\n $addResponse = $this->_addAddress($arrFakeAddress);\n // $this->assertEquals(404, $addResponse->status());\n $this->refreshApplication();\n\n // $editResBlank = $this->_updateAddress($companyId, ''); // blank ID in edit\n // $this->refreshApplication();\n // $this->assertEquals(405, $editResBlank->status());\n $editResInvalid = $this->_updateAddress($companyId, 'fdfsfsdfdsf'); // invalid ID in edit\n $this->refreshApplication();\n $this->assertEquals(404, $editResInvalid->status());\n $this->refreshApplication();\n\n $delResponse = $this->_deleteAddress($companyId, $strFakeID); //delete address by ID\n $this->assertEquals(404, $delResponse->status());\n $this->refreshApplication();\n $strTestID = 'ab7ad310-6985-11e8-9b53-213c65f8c3b7';\n\n $deleResponse = $this->_deleteAddress($companyId, $strTestID); //delete address by invalid ID\n $this->assertEquals(404, $deleResponse->status());\n $this->refreshApplication();\n }", "title": "" }, { "docid": "e9cd67690b562b7c598b0131794b2834", "score": "0.53705937", "text": "public function CheckAdresses($aad){\n for($i=0;$i< count($aad); $i++){\n if(!$this->ValidEmail($aad[$i])){\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "4d60672c2cd19265211163fe81050549", "score": "0.5362814", "text": "function validate($form, &$form_state) {\n \n $values = (object)$form_state['values']['erpal_crm_mailaction'];\n $mailBox = (object)$values->mailbox_settings;\n \n if (intval ($mailBox->port) <= 0) {\n form_set_error ('mailbox[port]', t('Please specify a valid port number (>0).'));\n } \n \n module_load_include ('inc', 'erpal_crm_mailaction', 'inc/ImapFetcher/ImapFetcher.class');\n \n if (! ImapFetcher::checkHostAccessibility($mailBox->host, $mailBox->port)) {\n form_set_error ('mailbox[host]', t('The given host name is not accessible.'));\n }else{\n drupal_set_message (t('Host is accessible on given port.'));\n }\n \n return;\n}", "title": "" }, { "docid": "d75cff392b122f5c94c10b91985bb236", "score": "0.53578633", "text": "function validate_school_email($email_addr) {\n if(filter_var($email_addr, FILTER_VALIDATE_EMAIL) && preg_match('/@bc.fi/', $email_addr)) {\n return ('<p style = color:green;>True, valid input<p>');\n }\n else {\n return ('<p style = color:red;>False, invalid input</p>');\n }\n }", "title": "" }, { "docid": "dae891e81d342586c6fc34075c89ee57", "score": "0.5355448", "text": "function getAddressCode();", "title": "" }, { "docid": "a066f90a195548f17d2103941d040aaa", "score": "0.53337884", "text": "public function testValidateInvalid()\n {\n $this->expectException(\\Oliver\\IpAddress\\Exception\\InvalidIpException::class);\n $this->ipAddress->validate(\"2.apa.4.5\");\n }", "title": "" }, { "docid": "455de9d0cd3491c976e6bc8e92a00562", "score": "0.53258026", "text": "public function alnum_check();", "title": "" }, { "docid": "ea405bec978e68d47dfaf7bae86dcf62", "score": "0.532492", "text": "function validate_address1($mail)\n\t{\n\t\t$this->form_validation->set_message('validate_address1','Address 1 invalid');\n if (is_numeric($mail))\n {\n \treturn false;\n }\n \n $this->form_validation->set_message('validate_address1','Address 1 you entered already exist');\n if ($this->users->check_address1($this->session->userdata('id'), $mail))\n {\n \treturn false;\n }\n else\n {\n \treturn true;\n }\n\t}", "title": "" }, { "docid": "1fdf444c3a8511f9d72ca6f79149ebe0", "score": "0.5319382", "text": "public function setLocalAddress($address){}", "title": "" }, { "docid": "2ed278bb6cb102690e87d7c7dbc31870", "score": "0.5315901", "text": "private function validateAuthorityUrl() {\n $uv = new UrlValidation();\n $uv->addRule('scheme', 'https', '==');\n $uv->addRule('query', '', '==');\n\n try {\n $uv->validate($this->url);\n } catch (Exception $e) {\n Logger::log($e->getMessage());\n }\n }", "title": "" }, { "docid": "855bcbfde18b234031d0e1803fd8994b", "score": "0.53129625", "text": "public function address()\n\t{\n\t\tif($this->input->server('REQUEST_METHOD') == \"POST\" && empty($this->errors) )\n\t\t{\n\t\t\t$this->post_address();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data = array();\n\t\t\t$data[\"errors\"] = $this->errors;\n\t\t\t$this->load->view('address_registration',$data);\n\t\t}\n\n\t}", "title": "" }, { "docid": "df868d24b11c6e9cb7f9593293b452fc", "score": "0.53120166", "text": "public function test_create_new_pobox_address()\n {\n new Helpers\\EloquentHelper();\n\n $address = Models\\Address::create([\n 'type' => 'pobox',\n 'name' => 'My Address',\n 'city' => 'Toronto',\n 'postal_code' => 'A1A1A1',\n 'province' => 'ON',\n 'country' => 'CA',\n 'pobox' => 'PO BOX 123',\n 'station' => 'STN A'\n ]);\n\n $this->assertEquals([], $address->errors);\n }", "title": "" }, { "docid": "0345afbef28e679c27f233ab0cfe45c3", "score": "0.53087074", "text": "public function rules()\n {\n $input = parent::all();\n\n $rules = [\n 'name' => 'required|max:255',\n 'ministry' => 'max:255',\n 'phone1' => 'max:15',\n 'phone2' => 'max:15',\n 'phone3' => 'max:15',\n 'cnpj' => 'max:14|cnpj',\n 'email' => 'max:255|email',\n 'comments' => 'max:65535',\n 'online' => 'boolean',\n 'addresses' => 'required_if:online,false,0|required_without:online|array',\n ];\n\n /*\n * Verifica se foram passados endereços\n * Caso contrário devolver as regras\n */\n if (!isset($input['addresses']) || !is_array($input['addresses'])) {\n return $rules;\n }\n\n /*\n * Regras para validação dos addresses(endereços)\n * @var array\n */\n $addressesRules = [\n 'title' => 'max:255',\n 'zipcode' => 'max:10',\n 'street' => 'required|max:255',\n 'number' => 'integer|max:99999',\n 'district' => 'max:255',\n 'city' => 'required|max:255',\n 'state' => 'required|max:255',\n 'country' => 'required|max:255',\n 'phone1' => 'max:15',\n 'phone2' => 'max:15',\n 'phone3' => 'max:15',\n 'email' => 'email',\n 'website' => 'max:255',\n 'latitude' => 'numeric',\n 'longitude' => 'numeric',\n 'comments' => 'max:65535',\n ];\n\n /*\n * @var array\n */\n $addresses = $input['addresses'];\n\n /*\n * varre a array de addresses e verifica se todos os campos\n * de \"rules\" foram informados\n *\n * @var array\n */\n $newRules = [];\n foreach ($addresses as $row => $address) {\n /*\n * varre rules para verificar as keys e\n * o tipo de validação configurada, e adiciona nas novas rules\n * @var array\n */\n foreach ($addressesRules as $key => $value) {\n $newRules['addresses.'.$row.'.'.$key] = $value;\n }\n }\n\n return array_merge($rules, $newRules);\n }", "title": "" }, { "docid": "51d86a91c65ff4bb3440faf35dc6a793", "score": "0.5302365", "text": "public function postcodeAddressAction() {\n\t\t$result = new stdClass();\n\t\t$result->error = false;\n\n\t\t$resultIndex = 0;\n\t\t$indexCounter = 0;\n\n\t\t$postcode = $this->getRequest()->getParam( 'postcode' );\n\t\t$postcode = urlencode( trim( $postcode ) );\n\t\t$specificCountry = trim( $this->getRequest()->getParam( 'country' ) );\n\n\t\t$result->data = new stdClass();\n\n\t\t$r = json_decode( file_get_contents( \"http://maps.googleapis.com/maps/api/geocode/json?address=\" . $postcode . \"&sensor=true\" ) );\n\t\tif ( $r->status == \"OK\" ) {\n\t\t\t// if a specific country is specified, find the index among multiple results\n\t\t\tif ( !empty( $specificCountry ) ) {\n\t\t\t\tforeach ( $r->results as $resultInstance ) {\n\t\t\t\t\tforeach ( $resultInstance->address_components as $address_component ) {\n\t\t\t\t\t\tif ( $address_component->types[0] == 'country' ) {\n\t\t\t\t\t\t\tif ( $address_component->long_name == $specificCountry )\n\t\t\t\t\t\t\t\t$resultIndex = $indexCounter;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$indexCounter++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( count( $r->results[ $resultIndex ]->address_components ) > 0 ) {\n\t\t\t\tforeach ( $r->results[ $resultIndex ]->address_components as $address_component ) {\n\t\t\t\t\t$result->error = true;\n\t\t\t\t\tforeach ( $address_component->types as $type ) {\n\t\t\t\t\t\tif ( $type == \"locality\" ) {\n\t\t\t\t\t\t\t$result->error = false;\n\t\t\t\t\t\t\t$result->data->city = $address_component->long_name;\n\t\t\t\t\t\t} elseif ( $type == \"administrative_area_level_1\" ) {\n\t\t\t\t\t\t\t$result->error = false;\n\t\t\t\t\t\t\t$result->data->state = $address_component->short_name;\n\t\t\t\t\t\t} elseif ( $type == \"country\" ) {\n\t\t\t\t\t\t\t$result->error = false;\n\t\t\t\t\t\t\t$countryOption = Mage::helper( 'anattadesign_awesomecheckout' )->getAllowedCountryOptionById( $address_component->short_name );\n\t\t\t\t\t\t\t$result->data->country = $address_component->long_name;\n\t\t\t\t\t\t\tif ( $countryOption ) {\n\t\t\t\t\t\t\t\t$result->data->country_id = $countryOption['value'];\n\t\t\t\t\t\t\t\t$result->data->country = $countryOption['label'];\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} else {\n\t\t\t\t$result->error = true;\n\t\t\t}\n\t\t} else {\n\t\t\t$result->error = true;\n\t\t}\n\n\t\t$this->getResponse()->setBody( Mage::helper( 'core' )->jsonEncode( $result ) );\n\t}", "title": "" }, { "docid": "dd72783f42c072a57f9233f7ff25e2af", "score": "0.5280685", "text": "public function test_create_new_civic_address()\n {\n new Helpers\\EloquentHelper();\n\n $address = Models\\Address::create([\n 'type' => 'civic',\n 'name' => 'My Address',\n 'street_number' => '123',\n 'street_number_suffix' => 'A',\n 'street_name' => 'Fake',\n 'street_type' => 'Street',\n 'street_direction' => 'North',\n 'city' => 'Toronto',\n 'postal_code' => 'A1A1A1',\n 'province' => 'ON',\n 'country' => 'CA',\n 'suite' => 'Unit 15',\n 'buzzer' => '654321',\n ]);\n\n $this->assertEquals([], $address->errors);\n }", "title": "" }, { "docid": "1391e808aa9d9b0cbb9658f49a718792", "score": "0.5272055", "text": "public function addAddress(Request $request, $id = null)\n {\n// \\Log::info($request->all());\n $lang = $request->header('Accept-Language');\n $validator = \\Validator::make($request->all(), []);\n if ($lang == 'ar') {\n $validator->getTranslator()->setLocale('ar');\n }\n $req_auth = $request->header('Authorization');\n $user_id = User::getUserByToken($req_auth);\n if ($user_id) {\n $DataRequests = $request->all();\n $validator = \\Validator::make($DataRequests, [\n 'name' => 'required|string',\n 'mobile_number' => 'required|numeric|digits:8',\n 'location' => 'required|string',\n 'street_number' => 'required|string',\n 'building_number' => 'required',\n 'zone' => 'required|string',\n 'apartment_number' => 'required',\n 'is_apartment' => 'required',\n 'latitude' => 'required|numeric',\n 'longitude' => 'required|numeric'\n ]);\n if ($validator->fails()) {\n return response()->json(array('success' => 0, 'status_code' => 400,\n 'message' => 'Invalid inputs',\n 'error_details' => $validator->messages()));\n } else {\n if ($id) {\n $address = Address::where('id', $id)->where('user_id', $user_id)->first();\n $address->name = $DataRequests['name'];\n $address->mobile_number = $DataRequests['mobile_number'];\n $address->location = $DataRequests['location'];\n $address->street_number = $DataRequests['street_number'];\n $address->building_number = $DataRequests['building_number'];\n $address->zone = $DataRequests['zone'];\n $address->is_apartment = $DataRequests['is_apartment'];\n $address->apartment_number = $DataRequests['apartment_number'];\n $address->latitude = $DataRequests['latitude'];\n $address->longitude = $DataRequests['longitude'];\n $address->save();\n } else {\n Address::where('user_id', $user_id)->where('is_default', 1)->update(['is_default' => 0]);\n $address = new Address();\n $address->user_id = $user_id;\n $address->is_default = 1;\n $address->name = $DataRequests['name'];\n $address->mobile_number = $DataRequests['mobile_number'];\n $address->location = $DataRequests['location'];\n $address->street_number = $DataRequests['street_number'];\n $address->building_number = $DataRequests['building_number'];\n $address->zone = $DataRequests['zone'];\n $address->is_apartment = $DataRequests['is_apartment'];\n $address->apartment_number = $DataRequests['apartment_number'];\n $address->latitude = $DataRequests['latitude'];\n $address->longitude = $DataRequests['longitude'];\n $address->save();\n $deliveryAddress = Address::where('user_id', $user_id)->where('id','!=', $address->id)->first();\n if(!$deliveryAddress){\n UserCart::where('user_id', $user_id)->where('completed', 0)->update(['delivery_address_id' => $address->id]);\n }\n }\n\n return response()->json(array(\n 'success' => 1,\n 'status_code' => 200,\n 'address_id' => $address->id));\n }\n } else {\n return response()->json(array(\n 'success' => 0,\n 'status_code' => 200,\n 'message' => \\Lang::get('message.loginError')));\n }\n\n }", "title": "" }, { "docid": "b28cd7881c4b9fd85c04677cda022395", "score": "0.5272023", "text": "private function resolveParametersFromApiRequest(\\Magento\\Quote\\Model\\Quote\\Address $address)\n {\n /** @var \\Magento\\Quote\\Model\\Quote\\Address[] $addressesFound */\n $addressesFound = [];\n try {\n $inputParams = $this->inputParamsResolver->resolve();\n if (empty($inputParams)) {\n return;\n }\n foreach ($inputParams as $param) {\n if ($param instanceof \\Magento\\Quote\\Api\\Data\\AddressInterface) {\n $addressesFound[] = $param;\n }\n }\n if (!count($addressesFound)) {\n return;\n }\n\n $priorAddress = $addressesFound[0];\n foreach ($addressesFound as $addressFound) {\n if ($addressFound->getAddressType() === \\Magento\\Quote\\Model\\Quote\\Address::TYPE_SHIPPING) {\n $priorAddress = $addressFound;\n break;\n }\n }\n $address->addData($priorAddress->getData());\n\n return;\n } catch (\\Exception $e) {\n return;\n }\n }", "title": "" }, { "docid": "c04135c6c9530cb2875eae18e378397b", "score": "0.52693427", "text": "function valid_email($address) {\n $patternselect = 'auto';\n\n // Added by Ivan Tcholakov, 17-OCT-2015.\n if (function_exists('idn_to_ascii') && defined('INTL_IDNA_VARIANT_UTS46') && $atpos = strpos($address, '@')) {\n $address = substr($address, 0, ++$atpos).idn_to_ascii(substr($address, $atpos), 0, INTL_IDNA_VARIANT_UTS46);\n }\n\n if (!$patternselect or $patternselect == 'auto') {\n //Check this constant first so it works when extension_loaded() is disabled by safe mode\n //Constant was added in PHP 5.2.4\n if (defined('PCRE_VERSION')) {\n //This pattern can get stuck in a recursive loop in PCRE <= 8.0.2\n if (version_compare(PCRE_VERSION, '8.0.3') >= 0) {\n $patternselect = 'pcre8';\n } else {\n $patternselect = 'pcre';\n }\n } elseif (function_exists('extension_loaded') and extension_loaded('pcre')) {\n //Fall back to older PCRE\n $patternselect = 'pcre';\n } else {\n //Filter_var appeared in PHP 5.2.0 and does not require the PCRE extension\n if (version_compare(PHP_VERSION, '5.2.0') >= 0) {\n $patternselect = 'php';\n } else {\n $patternselect = 'noregex';\n }\n }\n }\n\n switch ($patternselect) {\n case 'pcre8':\n /**\n * Uses the same RFC5322 regex on which FILTER_VALIDATE_EMAIL is based, but allows dotless domains.\n * @link http://squiloople.com/2009/12/20/email-address-validation/\n * @copyright 2009-2010 Michael Rushton\n * Feel free to use and redistribute this code. But please keep this copyright notice.\n */\n return (boolean)preg_match(\n '/^(?!(?>(?1)\"?(?>\\\\\\[ -~]|[^\"])\"?(?1)){255,})(?!(?>(?1)\"?(?>\\\\\\[ -~]|[^\"])\"?(?1)){65,}@)' .\n '((?>(?>(?>((?>(?>(?>\\x0D\\x0A)?[\\t ])+|(?>[\\t ]*\\x0D\\x0A)?[\\t ]+)?)(\\((?>(?2)' .\n '(?>[\\x01-\\x08\\x0B\\x0C\\x0E-\\'*-\\[\\]-\\x7F]|\\\\\\[\\x00-\\x7F]|(?3)))*(?2)\\)))+(?2))|(?2))?)' .\n '([!#-\\'*+\\/-9=?^-~-]+|\"(?>(?2)(?>[\\x01-\\x08\\x0B\\x0C\\x0E-!#-\\[\\]-\\x7F]|\\\\\\[\\x00-\\x7F]))*' .\n '(?2)\")(?>(?1)\\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)' .\n '(?>(?1)\\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}' .\n '|(?!(?:.*[a-f0-9][:\\]]){8,})((?6)(?>:(?6)){0,6})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:' .\n '|(?!(?:.*[a-f0-9]:){6,})(?8)?::(?>((?6)(?>:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}' .\n '|[1-9]?[0-9])(?>\\.(?9)){3}))\\])(?1)$/isD',\n $address\n );\n case 'pcre':\n //An older regex that doesn't need a recent PCRE\n return (boolean)preg_match(\n '/^(?!(?>\"?(?>\\\\\\[ -~]|[^\"])\"?){255,})(?!(?>\"?(?>\\\\\\[ -~]|[^\"])\"?){65,}@)(?>' .\n '[!#-\\'*+\\/-9=?^-~-]+|\"(?>(?>[\\x01-\\x08\\x0B\\x0C\\x0E-!#-\\[\\]-\\x7F]|\\\\\\[\\x00-\\xFF]))*\")' .\n '(?>\\.(?>[!#-\\'*+\\/-9=?^-~-]+|\"(?>(?>[\\x01-\\x08\\x0B\\x0C\\x0E-!#-\\[\\]-\\x7F]|\\\\\\[\\x00-\\xFF]))*\"))*' .\n '@(?>(?![a-z0-9-]{64,})(?>[a-z0-9](?>[a-z0-9-]*[a-z0-9])?)(?>\\.(?![a-z0-9-]{64,})' .\n '(?>[a-z0-9](?>[a-z0-9-]*[a-z0-9])?)){0,126}|\\[(?:(?>IPv6:(?>(?>[a-f0-9]{1,4})(?>:' .\n '[a-f0-9]{1,4}){7}|(?!(?:.*[a-f0-9][:\\]]){8,})(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,6})?' .\n '::(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,6})?))|(?>(?>IPv6:(?>[a-f0-9]{1,4}(?>:' .\n '[a-f0-9]{1,4}){5}:|(?!(?:.*[a-f0-9]:){6,})(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,4})?' .\n '::(?>(?:[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,4}):)?))?(?>25[0-5]|2[0-4][0-9]|1[0-9]{2}' .\n '|[1-9]?[0-9])(?>\\.(?>25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}))\\])$/isD',\n $address\n );\n case 'html5':\n /**\n * This is the pattern used in the HTML5 spec for validation of 'email' type form input elements.\n * @link http://www.whatwg.org/specs/web-apps/current-work/#e-mail-state-(type=email)\n */\n return (boolean)preg_match(\n '/^[a-zA-Z0-9.!#$%&\\'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}' .\n '[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/sD',\n $address\n );\n case 'noregex':\n //No PCRE! Do something _very_ approximate!\n //Check the address is 3 chars or longer and contains an @ that's not the first or last char\n return (strlen($address) >= 3\n and strpos($address, '@') >= 1\n and strpos($address, '@') != strlen($address) - 1);\n case 'php':\n default:\n return (boolean)filter_var($address, FILTER_VALIDATE_EMAIL);\n }\n }", "title": "" }, { "docid": "8b8ab4252cb4d70b313fac55eb318e01", "score": "0.5268146", "text": "public function __invoke($attribute, $value, $fail)\n {\n if (! preg_match_all(self::Regex, $value)) {\n $fail('The :attribute must be a valid MultiversX address.');\n }\n }", "title": "" }, { "docid": "dcb434c86d6b62ae193cd78dfae0b8bb", "score": "0.526812", "text": "function validate_address2($mail)\n\t{\n\t\t$this->form_validation->set_message('validate_address2','Address 2 invalid');\n if (is_numeric($mail))\n {\n \treturn false;\n }\n\n\t\t$this->form_validation->set_message('validate_address2','Address 2 you entered already exist');\n if ($this->users->check_address2($this->session->userdata('id'), $mail))\n {\n \treturn false;\n }\n else\n {\n \treturn true;\n }\n\t}", "title": "" }, { "docid": "ed7c155a078695e3710354dc0a23417f", "score": "0.5265607", "text": "public function getAddressLine1();", "title": "" }, { "docid": "0f093c26cd962e61540b388e9b31d658", "score": "0.5264621", "text": "public static function geoValid($toValidate) {\n\t\t$res = \"\";\n\t\terror_log(\"geoValid = \".json_encode($toValidate));\n\t\tif(!empty($toValidate[\"addressesIndex\"]))\n\t\t\tunset($toValidate[\"addressesIndex\"]);\n\n\t\tif(!empty($toValidate)){\n\t\t\t//Check type \n\t\t\tif (empty($toValidate[\"@type\"])) return \"Type missing in the geo !\";\n\t\t\tif ($toValidate[\"@type\"] != \"GeoCoordinates\") return \"Type missing in the geo !\";\n\t\t\t//Check latitude\n\t\t\tif (empty($toValidate[\"latitude\"])) return \"latitude missing in the geo !\";\n\t\t\tif (!is_string($toValidate[\"latitude\"])) return \"latitude is not a string in the geo !\";\n\t\t\t//Check longitude\n\t\t\tif (empty($toValidate[\"longitude\"])) return \"longitude Code missing in the geo !\";\n\t\t\tif (!is_string($toValidate[\"longitude\"])) return \"longitude is not a string in the geo !\";\n\t\t}\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "7149a8535dba33eea041b4cb49cd8aac", "score": "0.5258628", "text": "public function validate()\n {\n $errors = array();\n $helper = Mage::helper('customer');\n $this->implodeStreetAddress();\n if (!Zend_Validate::is($this->getFirstname(), 'NotEmpty')) {\n $errors[] = $helper->__('Please enter the first name.');\n }\n\n if (false && !Zend_Validate::is($this->getLastname(), 'NotEmpty')) {\n $errors[] = $helper->__('Please enter the last name.');\n }\n\n if (!Zend_Validate::is($this->getStreet(1), 'NotEmpty')) {\n $errors[] = $helper->__('Please enter the street.');\n }\n\n if (!Zend_Validate::is($this->getCity(), 'NotEmpty') && !Zend_Validate::is($this->getCityId(), 'NotEmpty')) {\n $errors[] = $helper->__('Please enter the city.');\n }\n\n if (!Zend_Validate::is($this->getTelephone(), 'NotEmpty') && !Zend_Validate::is($this->getCityId(), 'NotEmpty')) {\n $errors[] = $helper->__('Please enter the right telephone number.');\n }\n\n /* if (!Zend_Validate::is($this->getTelephone(), 'Zend_Validate_StringLength',array('min' => 11,'max' =>11)) || !Zend_Validate::is($this->getTelephone(), 'Zend_Validate_Digits')) {\n $errors[] = $helper->__('Please enter the right telephone number.');\n }*/\n\n $_havingOptionalZip = Mage::helper('directory')->getCountriesWithOptionalZip();\n if (!in_array($this->getCountryId(), $_havingOptionalZip) && !Zend_Validate::is($this->getPostcode(), 'NotEmpty')) {\n $errors[] = $helper->__('Please enter the zip/postal code.');\n }\n\n if (!Zend_Validate::is($this->getCountryId(), 'NotEmpty')) {\n $errors[] = $helper->__('Please enter the country.');\n }\n\n if ($this->getCountryModel()->getRegionCollection()->getSize()\n && !Zend_Validate::is($this->getRegionId(), 'NotEmpty')) {\n $errors[] = $helper->__('Please enter the state/province.');\n }\n\n if (empty($errors) || $this->getShouldIgnoreValidation()) {\n return true;\n }\n return $errors;\n }", "title": "" }, { "docid": "9944a244d5ec79f3712567daf88de9a0", "score": "0.5256103", "text": "function check_email_address ( $emailaddress )\n{\n\treturn ereg( '^[-!#$%&\\'*+\\\\./0-9=?A-Z^_`a-z{|}~]+'.'@'.'[-!#$%&\\'*+\\\\/0-9=?A-Z^_`a-z{|}~]+\\.'.'[-!#$%&\\'*+\\\\./0-9=?A-Z^_`a-z{|}~]+$', $emailaddress);\n}", "title": "" } ]
609282fdd9f2e5bb5a5dfccc40d1d73f
Function remplace le contenu d'un fichier
[ { "docid": "e96270e9f8b75bdc1b3cda1b1a35d8d2", "score": "0.54236746", "text": "function file_replace_content($file, $old_content, $new_content) {\n \n if ( ! file_exists($file) )\n return false;\n\n $file_content = file_get_content( $file );\n $new_content = preg_replace( $old_content, $new_content, $file_content );\n $replaced = null !== $new_content && $new_content !== $file_content;\n $put_contents = file_put_content( $file, $new_content );\n\n return $put_contents && $replaced;\n}", "title": "" } ]
[ { "docid": "7c1ba24101ff99d6fb9ed4598465cd48", "score": "0.6216867", "text": "public function UpdateFile($newContent);", "title": "" }, { "docid": "a6c1f129da48e8c7e4f50a20ca3ccaa2", "score": "0.6170891", "text": "function cs_ecrire_fichier($file, $contenu) {\r\n\t$inf = pathinfo($file);\r\n\tif(!ecrire_fichier($test = $inf['dirname'].'/test_'.$inf['basename'], $contenu)) \r\n\t\treturn false;\r\n\t$old = $inf['dirname'].'/'.$inf['basename'].'.old';\r\n\t// le fichier actuel, s'il existe, remplace la sauvegarde eventuelle\r\n\tif(@is_readable($file)) { @spip_unlink($old); @rename($file, $old); }\r\n\treturn @rename($test, $file); // le fichier test est promu\r\n}", "title": "" }, { "docid": "7731105ef4d2f7b5ba580c9ea758b6aa", "score": "0.6151766", "text": "function replace($fileChange, $original, $new){\n $str = implode(file($fileChange));\n $fileOpen = fopen($fileChange,'w');\n\n $replace = str_replace($original, $new, $str);\n\n fwrite($fileOpen, $replace);\n fclose($fileOpen);\n}", "title": "" }, { "docid": "8ae84a7a36004b1210d06e9ee424a418", "score": "0.614589", "text": "function przetworz2(){\n$i = 1;\nforeach(file('plik4.txt') as $line) {\n#echo $line;\n$bizon1 = \"$i.jpg\";\n$bizon2 = str_replace(\"\\n\", '', $bizon1);\n$content11 = file_get_contents($line);\nfile_put_contents(\"$bizon2\", $content11);\n$i++;\n}\n\t\n}", "title": "" }, { "docid": "a4257140ab6bbcd94d8a0b1e3ffda2eb", "score": "0.61245394", "text": "function tpl_file($destination,$modulename,$str_to_replace,$str_with_replace)\n\t{\n\t\t $file_handle = fopen($destination, \"r\");\n\t\t while (!feof($file_handle)) {\n\t\t $line = fgets($file_handle);\n\t\t $data1[]= str_replace($str_to_replace,$str_with_replace,$line);\n\t\t}\n\t\t if($data1)\n\t\t if(file_put_contents($destination, $data1))\n\t\treturn true;\n\t}", "title": "" }, { "docid": "d1116363bb6069f596974105913a094b", "score": "0.6027248", "text": "function putFile() {\n\t\t\n\t}", "title": "" }, { "docid": "a77e8c11e3a4c496862341a857e7dd38", "score": "0.6001083", "text": "function file_get_and_put() {\n //replace spaces and get contents\n $newFileName = str_replace(\" \", \"%20\", $this->filenameIn);\n $contentOrFalseOnFailure = file_get_contents($newFileName);\n //chose tmp location and put contents\n $this->fileTmpLoc = $_SERVER[\"DOCUMENT_ROOT\"].\"/tmp/\" . basename($newFileName);\n if($this->loop_tracker === \"exit\"){\n $this->fileTmpLoc = $_SERVER[\"DOCUMENT_ROOT\"].\"/tmp/\" . date(\"DMjGisY\") . \"\" . rand(1000, 9999);\n }\n $this->fileSize = file_put_contents($this->fileTmpLoc, $contentOrFalseOnFailure);\n }", "title": "" }, { "docid": "9a5c95dba0c24859fe512ee68e1cb81a", "score": "0.5987605", "text": "function usunOstatnieLitery(){\nexec('cat plik2.txt | sed s\\'/...............$//\\' > plik2b.txt');\n}", "title": "" }, { "docid": "df5f50a2ff6220fe91820d87cfa4ec26", "score": "0.598056", "text": "static function revert_editable($file_name,$content_identification_id)\r\n\t\t{\r\n\t\t\t$content =utf8_encode(file_get_contents($file_name));\r\n\t\t\t// SQL Select Single \r\n\t\t\t$sql = \"select * from cms_atom_content where id='\".$content_identification_id.\"'\";\r\n\t\t\t$rs = mysql_query($sql ) or die(mysql_error());\r\n\t\t\t$row = mysql_fetch_array($rs);\r\n\t\t\tif(mysql_num_rows($rs))\r\n\t\t\t{\r\n\t\t\t\t$string_to_replace = \"<?php fastest_cms::editable(\".$content_identification_id.\"); ?>\";\r\n\t\t\t\t$content = str_replace($string_to_replace, $row['content'], $content);\r\n\t\t\t\tfile_put_contents($file_name,$content);\r\n\t\t\t\techo \"done\";\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "1275f6f5000cb13f6e957b7b1f9d2435", "score": "0.59281266", "text": "public function originalFilename();", "title": "" }, { "docid": "ce86898e28879f96c0db14378500e217", "score": "0.58716404", "text": "function abre(){\n\t $this->arquivo = fopen($this->nomearq,\"w\");\n }", "title": "" }, { "docid": "1c1e5ccc2efdbf0231e720276f3759b0", "score": "0.5862999", "text": "function saveFile($id){\n\t$file = getFileURL($id);\n\t$content = file_get_contents($file);\n\t$filename = explode(\"/\", $file);\n\tfile_put_contents($_SERVER['DOCUMENT_ROOT'].\"/seubot/files/\".$filename[count($filename)-1], fopen($file, 'r'));\n}", "title": "" }, { "docid": "afee703aec86dd6bf973ee34dbbc935b", "score": "0.58461154", "text": "public function reconstruireFichierCache()\n\t{\n\t\t$contenuTemplate = file_get_contents( $this->getFichier() );\n\n\t\t$contenuCache\t = preg_replace( $this->getPattern(), $this->getReplace(), $contenuTemplate );\n\t\t\n\t\t$fCache = fopen( $this->getFichierCache(), 'w+' );\n\t\tfwrite( $fCache, $contenuCache );\n\t\tfclose( $fCache );\n\t}", "title": "" }, { "docid": "7f64cdffe1157750c94d6b94b5395376", "score": "0.5803639", "text": "function recModifWithImg()\n\t\t{\n\t\t $imageNameChapitre = $_FILES['imageChapitre']['name']; // Nom du fichier envoyé dans l'input imageChapitre.\n\t \t$file_extension = strrchr($imageNameChapitre, \".\"); // Affiche ce qui se trouve à partir du \".\" après le nom du fichier (l'extention).\n\n\t \t$file_tmp_name = $_FILES['imageChapitre']['tmp_name']; // Nom du repertoire temporaire du fichier envoyé dans l'input imageChapitre.\n\t \t$imageDestChapitre = 'public/images/' . $imageNameChapitre; // Repertoire de destination du fichier envoyé.\n\n\t \t$extensions_autorisees = array(\".png\", \".PNG\", \".jpg\", \".JPG\", \".jpeg\", \".JPEG\"); // Tableau des extensions autorisées au DL.\n\n\t \t// Je vérifie grâce à la fonction in_array, si le fichier DL à une extension autorisée dans le tableau ou non.\n\t \tif (in_array($file_extension, $extensions_autorisees)) \n\t\t \t{\n\t\t \t\t// Envoi du fichier du repertoire temporaire à sa destination finale.\n\t\t \t\tif (move_uploaded_file($file_tmp_name, $imageDestChapitre)) \n\t\t\t \t\t{\n\t\t\t \t\t\t// Enregistrement du chapitre avec l'image.\n\t\t\t \t\t\t$idChapitre = $_GET['idChapitre'];\n\t\t\t \t\t\t$numeroChapitre = $_POST['numeroChapitre'];\n\t\t $titreChapitre = $_POST['titreChapitre'];\n\t\t $texteChapitre = $_POST['texteChapitre'];\n\t\t recModifChapter($numeroChapitre, $titreChapitre, $texteChapitre, $imageNameChapitre, $imageDestChapitre, $idChapitre);\n\t\t\t \t\t}\n\t\t\t \t\telse\n\t\t\t \t\t\t{\n\t\t\t \t\t\t\tthrow new Exception(\"Une erreur est survenue lors de l'envoi de l'image.\");\n\t\t\t \t\t\t}\n\t\t \t}\n\t\t \t// Si l'extension n'est pas autorisé ou si on ne DL pas de fichier.\n\t\t \telse\n\t \t\t\t{\n\t \t\t\t\t// Enregistrement du chapitre sans l'image.\n\t \t\t\t\trecModifWithoutImg();\n\t \t\t\t} \n\t\t}", "title": "" }, { "docid": "13e6377c2265f60bb6d95be4d421624c", "score": "0.5786194", "text": "function abre(){\n $this->arquivo = fopen($this->nomearq,\"w\");\n }", "title": "" }, { "docid": "d10605dcd957d66056167b7a34d2e0f3", "score": "0.57821196", "text": "function modif(){\r\n\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\r\n\t$filename = \"../Users/\".$_SESSION['usuarios'].\"/ayear.php\";\r\n\t$fw1 = fopen($filename, 'r+');\r\n\t$contenido = fread($fw1,filesize($filename));\r\n\tfclose($fw1);\r\n\t\r\n\t$contenido = explode(\"\\n\",$contenido);\r\n\t$contenido[2] = \"'' => 'YEAR',\\n'\".date('y').\"' => '\".date('Y').\"',\";\r\n\t$contenido = implode(\"\\n\",$contenido);\r\n\t\r\n\t//fseek($fw, 37);\r\n\t$fw = fopen($filename, 'w+');\r\n\tfwrite($fw, $contenido);\r\n\tfclose($fw);\r\n\tglobal $dat1;\r\n\t$dat1 = \"\\tMODIFICADO Y ACTUALIZADO \".$filename.PHP_EOL;\r\n}", "title": "" }, { "docid": "3f180e077f34ffd3e4d74e91b33ae178", "score": "0.5778612", "text": "public function upload()\n {\n // Si jamais il n'y a pas de fichier (champ facultatif)\n if (null === $this->file) {\n return;\n }\n\n // Si on avait un ancien fichier, on le supprime\n if (null !== $this->tempFilename) {\n $oldFile = $this->getUploadRootDir() . '/' . $this->name . '.' . $this->tempFilename;\n if (file_exists($oldFile)) {\n unlink($oldFile);\n }\n }\n\n $this->name = $this->renomme($this->name);\n\n // On déplace le fichier envoyé dans le répertoire de notre choix\n $this->file->move(\n $this->getUploadRootDir(), // Le répertoire de destination\n $this->name . '.' . $this->url // Le nom du fichier à créer, ici « id.extension »\n );\n\n\n }", "title": "" }, { "docid": "257f626eb7bb9e94ee98cd471e2c425c", "score": "0.57422215", "text": "final function getFile();", "title": "" }, { "docid": "09fab45cf2dfbc0ee104dbde993f4064", "score": "0.57318836", "text": "function action_spipmotion_ajouter_file_encodage_tout_dist() {\n\n\t$securiser_action = charger_fonction('securiser_action', 'inc');\n\t$arg = $securiser_action();\n\n\tinclude_spip('inc/autoriser');\n\tif (autoriser('configurer')) {\n\t\tif (preg_match(',^(\\w+)$,', $arg, $r)) {\n\t\t\t$format = $arg;\n\t\t\tspip_log(\"Demande de réencodage complet au format: $format\", 'spipmotion');\n\t\t} else {\n\t\t\tspip_log('On réencode tous les fichiers', 'spipmotion');\n\t\t}\n\t\taction_spipmotion_ajouter_file_encodage_tout_post($format);\n\t}\n\tif (_request('redirect')) {\n\t\t$redirect = str_replace('&amp;', '&', urldecode(_request('redirect')));\n\t\t$GLOBALS['redirect'] = $redirect;\n\t}\n}", "title": "" }, { "docid": "4776b2820c1bdaf217a54c5c65156324", "score": "0.5730723", "text": "function islandora_transcription_file_update($transcription, $filename) {\n $transcription['TRANSCRIPTION']->setContentFromFile($filename);\n unlink($filename);\n}", "title": "" }, { "docid": "a5b381fb9dc368f1ee3ab694184a9249", "score": "0.5713717", "text": "public function enviar_archivo()\n {\n $this->cabecera_http(filesize($this->temp_salida));\n readfile($this->temp_salida);\n unlink($this->temp_salida);\n }", "title": "" }, { "docid": "e39c921a57e9315d07313462350ee82b", "score": "0.5710889", "text": "public function executeContentOriginal()\n {\n $this->_getfile(\"original\");\n }", "title": "" }, { "docid": "78e27db1f51062c9874e8b1e5da9bd5e", "score": "0.57105386", "text": "function hapusfile(){\n\t\t$previllage = 4;\n\t\tcheck_super_user($this->session->tipe_user,$previllage);\n\n\t \t$id = $this->uri->segment(3);\n\t\t\n\n\t\t//Action\t\t \n\t\t$itemfile = $this->sk_m->get($id)->row();\n \t\tif ($itemfile->download != null) {\n \t\t\t$target_file = 'assets/dist/files/sk/'.$itemfile->download;\n \t\t\tunlink($target_file);\n \t\t}\n \t\t$params['download'] = \"\";\n \t\t$this->db->where('id',$id);\n\t \t$this->db->update('tb_sk',$params);\n\t \tredirect('sk/edit/'.$id);\t \n\t}", "title": "" }, { "docid": "9b29d0a847c2641e268a234008d36b17", "score": "0.5707666", "text": "function cargar($fichero,$ruta=\"\") {\n if (empty($ruta)){\n if (is_readable($fichero)){\n $this->contenido = file_get_contents($fichero);\n if ($this->compactar) $this->compactar_html();\n return true;\n }\n //Directorio principal de plantillas\n if (!is_readable(ZF_DIR_PLANTILLAS.$fichero)) {\n if (is_readable(ZF_DIR_IDIOMA.$fichero)){\n $this->contenido = file_get_contents(ZF_DIR_IDIOMA.$fichero);\n } elseif(!is_readable(ZF_DIR_CONTENIDO_ZEN.$fichero)){\n //Directorio de plantillas de zenphp, lo más interior: en el idioma de la web por defecto,claro\n $f = ZF_DIR_CONTENIDO_ZEN.'plantillas'.DIRECTORY_SEPARATOR.ZF_IDIOMA_DEFECTO.DIRECTORY_SEPARATOR.$fichero;\n if (!is_readable($f)){\n trigger_error(_('No se puede leer el fichero ').$fichero);\n return false;\n } else {\n $this->contenido = file_get_contents($f);\n if ($this->compactar) $this->compactar_html();\n return true;\n }\n } else{\n //Devolver\n $this->contenido = file_get_contents(ZF_DIR_CONTENIDO_ZEN.$fichero);\n if ($this->compactar) $this->compactar_html();\n return true;\n }\n } else {\n //Devolver\n $this->contenido = file_get_contents(ZF_DIR_PLANTILLAS.$fichero);\n if ($this->compactar) $this->compactar_html();\n return true;\n }\n } else {\n if (is_readable($ruta.$fichero)){\n $this->contenido = file_get_contents($ruta.$fichero);\n if ($this->compactar) $this->compactar_html();\n return true;\n }\n //Ruta proporcionada:\n if (substr($ruta,-1,1)!=DIRECTORY_SEPARATOR) $ruta .= DIRECTORY_SEPARATOR;\n if (!is_readable($ruta.$fichero)) {\n //Error\n trigger_error(_('No se puede leer el fichero ').$fichero);\n return false;\n }\n else { //Devolver\n $this->contenido = file_get_contents($ruta.$fichero);\n if ($this->compactar) $this->compactar_html();\n return true;\n }\n }\n if ($this->compactar) $this->compactar_html();\n return true;\n }", "title": "" }, { "docid": "b6e98a725fcd37344a313b4c509f4796", "score": "0.56783783", "text": "public function preUpload()\n\t{\n\t\t// Si jamais il n'y a pas de fichier (champ facultatif), on ne fait rien\n\t\tif (null === $this->file) {\n\t\t\treturn;\n\t\t}\n\n\t\t// On donne un nom unique au fichier grâce a uniqudId et on récupère l'extension\n\t\t$this->src = uniqid() . '.' . $this->file->guessExtension();\n\t\t// Définition de la balise alt\n\t\t// getClientOriginalName() récupère le nom complet du fichier (extension comprise)\n\t\t// Du coup on récupère nom original + extension, et grâce à str_replace, et ré-cré un le alt du fichier avec\n\t\t// le nom original du fichier tel qu'il etait sur la machine du client sans l'extension.\n\t\t$alt = $this->file->getClientOriginalName();\n\t\t$ext = $this->file->guessExtension();\n\t\t$this->alt = str_replace('.'.$ext, '', $alt);\n\t}", "title": "" }, { "docid": "bca2ccc1c0bbb9c5a2dca7e4bfc3da0c", "score": "0.5676468", "text": "public function set_file($file) {$this->file = $this->path.$file;}", "title": "" }, { "docid": "19fe3ea6efddc87bf57becc58bdb8a95", "score": "0.5659599", "text": "function actualizarData(){\n $infofile = $_FILES['sma_archivo'];\n $location = $infofile['tmp_name'];\n $name = RUTA_PRINCIPAL . '/archivos/' . $infofile['name'];\n move_uploaded_file($location, $name);\n $rutaFallo = INDEX_ACTUALIZAR_DATA['url'];\n $validacion = $this->validarCSV($name);\n $this->insertarActualizarEquipo($name, $validacion, $rutaFallo);\n }", "title": "" }, { "docid": "a560d1f99b6db0e831c68cfcbdb1a679", "score": "0.5641068", "text": "function ecrire_fichier_en_tmp(&$infos_fichiers, $type) {\r\n\t$code = '';\r\n\tif(isset($infos_fichiers['inc_'.$type]))\r\n\t\tforeach ($infos_fichiers['inc_'.$type] as $inc) $code .= \"include_spip('outils/$inc');\\n\";\r\n\tif(isset($infos_fichiers['code_'.$type]))\r\n\t\tforeach ($infos_fichiers['code_'.$type] as $inline) $code .= $inline.\"\\n\";\r\n\t// on optimise avant...\r\n\t$code = str_replace(array('intval(\"\")',\"intval('')\"), '0', $code);\r\n\t$code = str_replace(\"\\n\".'if(strlen($foo=\"\")) ',\"\\n\\$foo=''; //\", $code);\r\n\t// ... en avant le code !\r\n\t$fichier_dest = _DIR_CS_TMP . \"mes_$type.php\";\r\nif(defined('_LOG_CS')) cs_log(\"ecrire_fichier_en_tmp($type) : lgr=\".strlen($code)).\" pour $fichier_dest\";\r\n\tif(!ecrire_fichier($fichier_dest, '<'.\"?php\\n// Code d'inclusion pour le plugin 'Couteau Suisse'\\nisset(\\$GLOBALS['cs_$type'])?\\$GLOBALS['cs_$type']++:\\$GLOBALS['cs_$type']=1;\\n$code?\".'>', true))\r\n\t\tcs_log(\"ERREUR ECRITURE : $fichier_dest\");\r\n}", "title": "" }, { "docid": "1e42c51695d96b79a5abbc25bc90fcc2", "score": "0.56375074", "text": "function devolver_contenido($f=''){\n\t\tif (!empty($f)) $this->cargar($f);\n\t\telse $this->contenido = \"\";\n\t\treturn $this->contenido;\n\t}", "title": "" }, { "docid": "e3bdc21dc82cc0591cbb317227c27abe", "score": "0.56311303", "text": "function RecuperaDocumento($idDocumento = NULL) {\r\n\t\r\n\trequire_once ('../../Vendor/database.php');\r\n\t$contents = 'File not found!';\r\n\t$file = \"../files/\".urldecode($idDocumento);\r\n\r\n\tif(file_exists($file)){\r\n\t\t\r\n\t\t$date = date('Y-m-d H:i:s');\r\n\t\t$method = 'RecuperaDocumento'; \r\n\t\t$message = \"$date - $method: Enviando el archivo '$idDocumento'\";\r\n\t\terror_log(\"$message\\n\", 3, \"../../tmp/logs/info_services.log\");\r\n\t\t\r\n\t\t//$this->log(\"$date -- Enviando documento ($file)\", LOG_INFO);\r\n\t\t\r\n\t\t$handle = fopen($file, \"rb\");\r\n\t\t$contents = (base64_encode(fread($handle, filesize($file))));\r\n\t\tfclose($handle);\r\n\r\n\t\t$date = date('Y-m-d H:i:s');\r\n\t\t$method = 'RecuperaDocumento';\r\n\t\t$message = \"$date - $method: Archivo enviado con exito.\";\r\n\t\terror_log(\"$message\\n\", 3, \"../../tmp/logs/info_services.log\");\r\n\t\t$nombre=explode(\"/\",$file);\r\n\t\tmysqli_query($conexion,\"UPDATE acknowledgments SET status = 'enviado' where document = '\".$idDocumento.\"'\");\r\n\t\t\r\n\t}\r\n\r\n\treturn $contents;\r\n\r\n}", "title": "" }, { "docid": "141ed3c2596c076639c6867c7fe37f85", "score": "0.5617729", "text": "function replaceFile($a_upload_file, $a_filename)\n\t{\n\t\t$this->getUploadFile($a_upload_file, $a_filename, true);\n\t\t\n\t\trequire_once(\"./Services/History/classes/class.ilHistory.php\");\n\t\tilHistory::_createEntry(\n\t\t\t$this->getId(),\n\t\t\t\"replace\",\n\t\t\t$a_filename.\",\".$this->getVersion()\n\t\t);\n\t\t$this->setFilename($a_filename);\n\t\t$this->addNewsNotification(\"file_updated\");\n\t\t\n\t\t// create preview\n\t\t$this->createPreview(true);\n\t}", "title": "" }, { "docid": "09323079c17989bfdc131b86e2b5027b", "score": "0.5615171", "text": "function gz_file_from_file($source, $new)\n{\n $data = implode(\"\", file($source));\n gz_file_put_contents($new, $data);\n unset($data);\n}", "title": "" }, { "docid": "4c850532621e09263343733517b9b206", "score": "0.56131744", "text": "function moverArchivosNombre($archivos,$nombre,$ruta){ //Optimizada para multiples archivos\n\n $directorio = $ruta; //ubicacion y nombre del directorio donde se guarda\n $ubicaciones = array();//array resultado de los nombres de las imagenes\n\n //$extensiones = array('gif','jpg','jpe','jpeg','png'); //extensiones permitidas\n \t//asigna un numero consecutivo al nuevo nombre de cada imagen\n if (file_exists($directorio) && is_writable($directorio)) { //comprueba si el directorio existe y si es posible escribir\n\n if(isset($archivos[\"archivo\"][\"error\"])){\n\n foreach ($archivos[\"archivo\"][\"error\"] as $key => $error) {\n\n if ($error == 0) {\n\n /* $trozo = explode(\".\",$archivos[\"archivo\"][\"name\"][$key]); //obtenemos la extensión\n $extension = strtolower(end($trozo)); //la pasamos a minuscula\n\n\n\t\t\t\t\t/*\n foreach($extensiones as $tipo){ //comprobamos que sea una extensión permitida\n if($tipo == $extension){\n $valido = true;\n\t\t\t\t\t\t\tbreak;\n }\n else {\n $valido = false;\n }\n }*/\n\n\t\t\t\t\t$valido = true;\n\n if(isset($valido) && $valido === true){ //si el archivo es valido lo intentamos mover\n //$nombre_archivo = $nombre. \".\".$extension; //generamos un nombre personalizable\n\t\t\t\t\t\t $nombre_archivo = $nombre; //generamos un nombre personalizable\n $ubicacion_original = $archivos[\"archivo\"][\"tmp_name\"][$key]; //ubicacion original y temporal del archivo\n\n if(!move_uploaded_file($ubicacion_original,\"$directorio/$nombre_archivo\")){\n\n\t\t\t\t\t\t\t?><ul class=\"message error grid_12\">\n <li><strong>Error!</strong>, <?php echo \"No se puede mover el archivo \\n\"; ?></li>\n <li class=\"close-bt\"></li>\n </ul>\n <?php\n }\n else{\n\n\n $ubicaciones[] = $nombre_archivo;\n\n\n\n }\n }\n else{\n\n\t\t\t\t\t\t?><ul class=\"message error grid_12\">\n <li><strong>Error!</strong>, <?php echo \"Extension de archivo no valida \\n\"; ?></li>\n <li class=\"close-bt\"></li>\n </ul>\n <?php\n }\n }\n else{\n if($error != 0 and $error != 4){ //Si no subieron archivos No enviar ninguna advertencia\n $mensaje_error = mensajesErrorArchivos($archivos[\"archivo\"][\"error\"][$key]);\n\n\t\t\t\t\t\t?> <ul class=\"message error grid_12\">\n <li><strong>Error!</strong>, <?php echo $mensaje_error.\" Intente nuevamente. \\n\"; ?></li>\n <li class=\"close-bt\"></li>\n \t\t</ul>\n <?php\n die;\n }\n }\n }\n return $ubicaciones;\n } //fin del existe error\n else {\n\n\t\t\t\t\t\t?> <ul class=\"message error grid_12\" style=\"position:absolute; z-index:100;\">\n <li><strong>Error!</strong> uno de los archivos sobrepasa la capacidad establecida por el servidor</li>\n <li class=\"close-bt\"></li>\n \t\t</ul>\n <?php\n\t\t}\n }\n else {\n\n\t\t?> <ul class=\"message error grid_12\" style=\"position:absolute; z-index:100;\">\n <li><strong>Error!</strong>, <?php echo $mensaje_error.\" No existe la carpeta para subir archivos o no tiene los permisos suficientes\"; ?></li>\n <li class=\"close-bt\"></li>\n \t\t</ul>\n <?php\n }\n}", "title": "" }, { "docid": "90d5bf334ffc3b9d5b859cd71ca61cda", "score": "0.56099117", "text": "public function getContentFile();", "title": "" }, { "docid": "e915cd8de68d006ce9f7d19b38651fd8", "score": "0.56093574", "text": "function joli_titrew($fichier){\n$fichier=basename($fichier);\n //Si je trouve un point vers la fin du nom de fichier, je renvoie ce qui suit\n if (preg_match(',\\.([^\\.]+)$,', $fichier, $regs))\n$extension=\".\".$regs[1];\n$fichier=ereg_replace($extension,'',$fichier);\n$fichier=ereg_replace('^ ','',$fichier);\n$fichier = eregi_replace(\"_\",\" \", $fichier );\n$fichier = eregi_replace(\"'\",\" \",$fichier );\nreturn $fichier ;\n}", "title": "" }, { "docid": "ff803b8a596d419fb9ca24ecc96d34be", "score": "0.5607232", "text": "public function delfile()\n {\n $id = $this->__sanitizeString($this->input->post('id'));\n $q = \"SELECT file FROM data_arsip WHERE id=$id\";\n $hsl = $this->db->query($q);\n $row = $hsl->row_array()['file'];\n if ($row != \"\") {\n $alamat = ROOTPATH . \"/files/\" . $row;\n unlink($alamat);\n }\n $q = sprintf(\"UPDATE data_arsip SET file=NULL WHERE id=%d\", $id);\n $hsl = $this->db->query($q);\n }", "title": "" }, { "docid": "bd5447d8484ec94abacba66a132037e6", "score": "0.5580736", "text": "public static function enlace($fichero) {\n $aws = Yii::$app->awssdk->getAwsSdk();\n $s3 = $aws->createS3();\n $file = $s3->getObjectUrl('go00', $fichero);\n return $file;\n }", "title": "" }, { "docid": "a463b7f564d953bdb0dfa6ec02c0382f", "score": "0.55786675", "text": "function editController($dir) {\n $array = array();\n $fileName = (isset($_REQUEST['fileName'])) ? filter_var($_REQUEST['fileName'], FILTER_SANITIZE_STRING) : \"\";\n array_push($array, $fileName);\n\n if ($fileName) {\n $file_handle = fopen($dir.$fileName.\"/\".$fileName.\".ino\", \"r\"); \n\t\t $file_string = fread($file_handle, filesize($dir.$fileName.\"/\".$fileName.\".ino\"));\n fclose($file_handle);\n array_push($array, $file_string);\n }\n}", "title": "" }, { "docid": "ce16474eb913a69e233a36c69756256e", "score": "0.55683523", "text": "function lang_file($new_filename,$modulename)\n\t{\n\t\t $file_handle = fopen($new_filename, \"r\");\n\t\t while (!feof($file_handle)) {\n\t\t $line = fgets($file_handle);\n\t\t\t$old_phrase = array(\"Module Name\", \"SINGLE_ModuleName\", \"ModuleBlock Information\", \"MODULEBLOCK\");\n\t\t\t$new_phrase = array($modulename, 'SINGLE_'.$modulename, $modulename,strtoupper($modulename));\n\t\t\t$newphrase[] = str_replace($old_phrase, $new_phrase, $line);\n\t\t}\n\t\t if($newphrase)\n\t\t if(file_put_contents($new_filename, $newphrase))\n\t\t return true;\n\t}", "title": "" }, { "docid": "f81f73e762e4d57d4783d6999584589c", "score": "0.5559692", "text": "function put_file_contents($filename, $cont)\n{\n if (!function_exists('file_put_contents'))\n {\n $fhandle = fopen($filename, \"w\");\n $fcontents = fwrite($fhandle, $cont);\n fclose($fhandle);\n }\n else\n {\n file_put_contents($filename, $cont);\n }\n}", "title": "" }, { "docid": "856985cc6b5614569295334069e05504", "score": "0.5551497", "text": "function okcdesign_file_str_replace($file_path, $find, $replace) {\n $file_contents = file_get_contents($file_path);\n $file_contents = str_replace($find, $replace, $file_contents);\n file_put_contents($file_path, $file_contents);\n}", "title": "" }, { "docid": "02ae894e9ac32830b4520180308a9847", "score": "0.5547946", "text": "public function getFile();", "title": "" }, { "docid": "02ae894e9ac32830b4520180308a9847", "score": "0.5547946", "text": "public function getFile();", "title": "" }, { "docid": "02ae894e9ac32830b4520180308a9847", "score": "0.5547946", "text": "public function getFile();", "title": "" }, { "docid": "02ae894e9ac32830b4520180308a9847", "score": "0.5547946", "text": "public function getFile();", "title": "" }, { "docid": "d2fd56f127e5491aaa3b8817c1182ff2", "score": "0.5537355", "text": "public function storeFilenameForRemove()\n {\n $this->temp = $this->getAbsoluteImagePath();\n }", "title": "" }, { "docid": "42063f991bede7558015edc2e9a70253", "score": "0.5530644", "text": "private function guardaImagen(){\r\n\t\ttry{\t\t\r\n\t\t\tforeach($this->files as $file){\r\n\t\t\t\tif(trim($file['name']) != ''){\t\t\t\t\t\r\n\t\t\t\t\tif($this->validaArchivo($file)){\r\n\t\t\t\t\t\t$pathCom = $this->session['pathFile'].$file['name'];\r\n\t\t\t\t\t\t$path = 'downfiles/'.$file['name'];\t\t\t\t\r\n\t\t\t\t\t\t$web = $this->session['pathFileWeb'].$file['name'];\r\n\t\t\t\t\t\tif(file_exists($pathCom)){\r\n\t\t\t\t\t\t\t@unlink($pathCom);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (move_uploaded_file($file['tmp_name'], $path)) {\r\n\t\t\t\t\t\t\t$this->insertaArchivo($pathCom, $web, $file['name']);\r\n\t\t\t\t\t\t\t$this->mensaje = Comunes::MSGSUCESS;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$this->mensaje = \"No se cargo el archivo\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\t$this->writeLog($this->mensaje, Comunes::INFO);\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}\r\n\t\t}\r\n\t\tcatch(\\Exception $e){\r\n\t\t\t$this->mensaje = Comunes::MSGERROR;\r\n\t\t\t$this->writeLog($e->getMessage(), Comunes::ERROR);\r\n\t\t}\t\r\n\t}", "title": "" }, { "docid": "45b73bd2a2577899484b56628aba31b6", "score": "0.5502865", "text": "public function restoreToFile()\n {\n $this->writeFile($this->contentBackup);\n }", "title": "" }, { "docid": "cbeb4579a47f725004dfb1cdf08d3d05", "score": "0.55016786", "text": "public function getFile(): string;", "title": "" }, { "docid": "11a788f677fbd1ae6c200f0e94a1d99b", "score": "0.549932", "text": "public function indexAction()\n {\n $logedUser = $this->getServiceLocator()\n ->get('user')\n ->getUserSession();\n $permission = $this->getServiceLocator()\n ->get('permissions')\n ->havePermission($logedUser[\"idUser\"], $logedUser[\"idWebsite\"], $this->moduleId);\n if ($this->getServiceLocator()\n ->get('user')\n ->checkPermission($permission, \"insert\") || $logedUser[\"idCompany\"] == 1) {\n $request = $this->getRequest();\n if($request->isPost()){\n $files = $request->getFiles()->toArray();\n $temp = explode(\".\", $files[\"arquivo\"][\"name\"]);\n $ext = end($temp);\n if($ext == \"txt\"){\n $newName = date('YmdHis');\n $newfilename = $newName . '.' . $ext;\n $diretorio = \"public/files_database/\" . $logedUser[\"idWebsite\"] . \"/\" . $newfilename;\n //move_uploaded_file($_FILES[\"arquivo\"][\"tmp_name\"], $diretorio);\n //echo file_get_contents($_FILES[\"arquivo\"][\"tmp_name\"]);\n //$arquivo = fopen($_FILES[\"arquivo\"][\"tmp_name\"]);\n \n //$fh = fopen($_FILES[\"arquivo\"][\"tmp_name\"], 'r');\n /*\n $newText = array();\n foreach(file($_FILES[\"arquivo\"][\"tmp_name\"]) as $line){\n echo substr($line, 85, 20);\n echo \"<br><br>\";\n //str_replace(\"2019\", \"196\", $line);\n //substr_replace($line, $replacement, $start)\n //echo $line.\"<br><br>\";\n //$newText[] = $line;\n }\n */\n $file = new \\SplFileObject($_FILES[\"arquivo\"][\"tmp_name\"]);\n $dataNew = \"\";\n $dataNew2 = \"\";\n while (!$file->eof()) {\n $data = '<pre>' . $file->fgets() . '</pre>';\n \n //1 Coluna\n $dataToChange = substr($data, 89, 4);\n $dataToChange2 = substr($data, 90, 3);\n if($dataToChange == \"4183\"){\n $dataNew = substr_replace($data, \"2542\", 89, 4);\n }else if($dataToChange == \"2019\"){\n $dataNew = substr_replace($data, \"196 \", 89, 4);\n }else if($dataToChange2 == \"182\"){\n $dataNew = substr_replace($data, \"55 \", 90, 3);\n }else if($dataToChange2 == \"181\"){\n $dataNew = substr_replace($data, \"110\", 90, 3);\n }else if($dataToChange == \"2031\"){\n $dataNew = substr_replace($data, \"191 \", 89, 4);\n }else if($dataToChange == \"2046\"){\n $dataNew = substr_replace($data, \"192 \", 89, 4);\n }else if($dataToChange == \"2047\"){\n $dataNew = substr_replace($data, \"193 \", 89, 4);\n }else if($dataToChange == \"2015\"){\n $dataNew = substr_replace($data, \"196 \", 89, 4);\n }else if($dataToChange == \"2016\"){\n $dataNew = substr_replace($data, \"196 \", 89, 4);\n }else if($dataToChange == \"2052\"){\n $dataNew = substr_replace($data, \"206 \", 89, 4);\n }else if($dataToChange == \"2451\"){\n $dataNew = substr_replace($data, \"242 \", 89, 4);\n }else if($dataToChange == \"2450\"){\n $dataNew = substr_replace($data, \"243 \", 89, 4);\n }else if($dataToChange == \"2429\"){\n $dataNew = substr_replace($data, \"312 \", 89, 4);\n }else if($dataToChange == \"4188\"){\n $dataNew = substr_replace($data, \"377 \", 89, 4);\n }else if($dataToChange == \"4189\"){\n $dataNew = substr_replace($data, \"378 \", 89, 4);\n }else if($dataToChange == \"4333\"){\n $dataNew = substr_replace($data, \"379 \", 89, 4);\n }else if($dataToChange == \"4332\"){\n $dataNew = substr_replace($data, \"380 \", 89, 4);\n }else if($dataToChange == \"4274\"){\n $dataNew = substr_replace($data, \"382 \", 89, 4);\n }else if($dataToChange == \"4770\"){\n $dataNew = substr_replace($data, \"416 \", 89, 4);\n }else if($dataToChange == \"4684\"){\n $dataNew = substr_replace($data, \"429 \", 89, 4);\n }else if($dataToChange == \"4655\"){\n $dataNew = substr_replace($data, \"510 \", 89, 4);\n }else if($dataToChange == \"4679\"){\n $dataNew = substr_replace($data, \"511 \", 89, 4);\n }else if($dataToChange == \"4680\"){\n $dataNew = substr_replace($data, \"511 \", 89, 4);\n }else if($dataToChange == \"4681\"){\n $dataNew = substr_replace($data, \"511 \", 89, 4);\n }else if($dataToChange == \"4793\"){\n $dataNew = substr_replace($data, \"512 \", 89, 4);\n }else if($dataToChange == \"4794\"){\n $dataNew = substr_replace($data, \"513 \", 89, 4);\n }else if($dataToChange == \"4798\"){\n $dataNew = substr_replace($data, \"516 \", 89, 4);\n }else if($dataToChange == \"4801\"){\n $dataNew = substr_replace($data, \"516 \", 89, 4);\n }else if($dataToChange == \"4803\"){\n $dataNew = substr_replace($data, \"516 \", 89, 4);\n }else if($dataToChange == \"4804\"){\n $dataNew = substr_replace($data, \"516 \", 89, 4);\n }else if($dataToChange == \"4805\"){\n $dataNew = substr_replace($data, \"516 \", 89, 4);\n }else if($dataToChange == \"4819\"){\n $dataNew = substr_replace($data, \"516 \", 89, 4);\n }else if($dataToChange == \"4820\"){\n $dataNew = substr_replace($data, \"516 \", 89, 4);\n }else if($dataToChange == \"4823\"){\n $dataNew = substr_replace($data, \"516 \", 89, 4);\n }else if($dataToChange == \"4795\"){\n $dataNew = substr_replace($data, \"517 \", 89, 4);\n }else if($dataToChange == \"4829\"){\n $dataNew = substr_replace($data, \"519 \", 89, 4);\n }else if($dataToChange == \"4828\"){\n $dataNew = substr_replace($data, \"520 \", 89, 4);\n }else if($dataToChange == \"4799\"){\n $dataNew = substr_replace($data, \"521 \", 89, 4);\n }else if($dataToChange == \"4272\"){\n $dataNew = substr_replace($data, \"523 \", 89, 4);\n }else if($dataToChange == \"4768\"){\n $dataNew = substr_replace($data, \"523 \", 89, 4);\n }else if($dataToChange == \"4311\"){\n $dataNew = substr_replace($data, \"526 \", 89, 4);\n }else if($dataToChange == \"4807\"){\n $dataNew = substr_replace($data, \"529 \", 89, 4);\n }else if($dataToChange == \"5044\"){\n $dataNew = substr_replace($data, \"706 \", 89, 4);\n }else if($dataToChange == \"5189\"){\n $dataNew = substr_replace($data, \"707 \", 89, 4);\n }else if($dataToChange == \"5188\"){\n $dataNew = substr_replace($data, \"708 \", 89, 4);\n }else if($dataToChange == \"5167\"){\n $dataNew = substr_replace($data, \"722 \", 89, 4);\n }else if($dataToChange == \"5130\"){\n $dataNew = substr_replace($data, \"725 \", 89, 4);\n }else if($dataToChange == \"4183\"){\n $dataNew = substr_replace($data, \"2542\", 89, 4);\n }else if($dataToChange == \"4185\"){\n $dataNew = substr_replace($data, \"2542\", 89, 4);\n }else if($dataToChange == \"4299\"){\n $dataNew = substr_replace($data, \"2543\", 89, 4);\n }else if($dataToChange == \"4302\"){\n $dataNew = substr_replace($data, \"2544\", 89, 4);\n }else if($dataToChange == \"4307\"){\n $dataNew = substr_replace($data, \"2544\", 89, 4);\n }else if($dataToChange == \"4308\"){\n $dataNew = substr_replace($data, \"2544\", 89, 4);\n }else if($dataToChange == \"4309\"){\n $dataNew = substr_replace($data, \"2544\", 89, 4);\n }else if($dataToChange == \"4323\"){\n $dataNew = substr_replace($data, \"2544\", 89, 4);\n }else if($dataToChange == \"4324\"){\n $dataNew = substr_replace($data, \"2544\", 89, 4);\n }else if($dataToChange == \"4327\"){\n $dataNew = substr_replace($data, \"2544\", 89, 4);\n }else if($dataToChange == \"4298\"){\n $dataNew = substr_replace($data, \"2545\", 89, 4);\n }else if($dataToChange == \"4297\"){\n $dataNew = substr_replace($data, \"2546\", 89, 4);\n }else if($dataToChange == \"5158\"){\n $dataNew = substr_replace($data, \"2597\", 89, 4);\n }else if($dataToChange == \"5163\"){\n $dataNew = substr_replace($data, \"2597\", 89, 4);\n }else if($dataToChange == \"5164\"){\n $dataNew = substr_replace($data, \"2597\", 89, 4);\n }else if($dataToChange == \"5165\"){\n $dataNew = substr_replace($data, \"2597\", 89, 4);\n }else if($dataToChange == \"5179\"){\n $dataNew = substr_replace($data, \"2597\", 89, 4);\n }else if($dataToChange == \"5180\"){\n $dataNew = substr_replace($data, \"2597\", 89, 4);\n }else if($dataToChange == \"5183\"){\n $dataNew = substr_replace($data, \"2597\", 89, 4);\n }else if($dataToChange == \"5156\"){\n $dataNew = substr_replace($data, \"2598\", 89, 4);\n }else if($dataToChange == \"5039\"){\n $dataNew = substr_replace($data, \"2601\", 89, 4);\n }else if($dataToChange == \"5040\"){\n $dataNew = substr_replace($data, \"2601\", 89, 4);\n }else if($dataToChange == \"5041\"){\n $dataNew = substr_replace($data, \"2601\", 89, 4);\n }else if($dataToChange == \"5154\"){\n $dataNew = substr_replace($data, \"2604\", 89, 4);\n }else if($dataToChange == \"5153\"){\n $dataNew = substr_replace($data, \"2605\", 89, 4);\n }else if($dataToChange == \"5045\"){\n $dataNew = substr_replace($data, \"2606\", 89, 4);\n }else if($dataToChange == \"5128\"){\n $dataNew = substr_replace($data, \"2619\", 89, 4);\n }else{\n $dataNew = $data;\n }\n //2 Coluna\n $dataNewToChange = substr($dataNew, 109, 4);\n $dataNewToChange2 = substr($dataNew, 109, 3);\n if($dataNewToChange == \"4183\"){\n $dataNew2 .= substr_replace($dataNew, \"2542\", 109, 4);\n }else if($dataNewToChange == \"2019\"){\n $dataNew2 .= substr_replace($dataNew, \"196 \", 109, 4);\n }else if($dataNewToChange2 == \"182\"){\n $dataNew2 .= substr_replace($dataNew, \"55 \", 109, 3);\n }else if($dataNewToChange2 == \"181\"){\n $dataNew2 .= substr_replace($dataNew, \"110\", 109, 3);\n }else if($dataNewToChange == \"2031\"){\n $dataNew2 .= substr_replace($dataNew, \"191 \", 109, 4);\n }else if($dataNewToChange == \"2046\"){\n $dataNew2 .= substr_replace($dataNew, \"192 \", 109, 4);\n }else if($dataNewToChange == \"2047\"){\n $dataNew2 .= substr_replace($dataNew, \"193 \", 109, 4);\n }else if($dataNewToChange == \"2015\"){\n $dataNew2 .= substr_replace($dataNew, \"196 \", 109, 4);\n }else if($dataNewToChange == \"2016\"){\n $dataNew2 .= substr_replace($dataNew, \"196 \", 109, 4);\n }else if($dataNewToChange == \"2052\"){\n $dataNew2 .= substr_replace($dataNew, \"206 \", 109, 4);\n }else if($dataNewToChange == \"2451\"){\n $dataNew2 .= substr_replace($dataNew, \"242 \", 109, 4);\n }else if($dataNewToChange == \"2450\"){\n $dataNew2 .= substr_replace($dataNew, \"243 \", 109, 4);\n }else if($dataNewToChange == \"2429\"){\n $dataNew2 .= substr_replace($dataNew, \"312 \", 109, 4);\n }else if($dataNewToChange == \"4188\"){\n $dataNew2 .= substr_replace($dataNew, \"377 \", 109, 4);\n }else if($dataNewToChange == \"4189\"){\n $dataNew2 .= substr_replace($dataNew, \"378 \", 109, 4);\n }else if($dataNewToChange == \"4333\"){\n $dataNew2 .= substr_replace($dataNew, \"379 \", 109, 4);\n }else if($dataNewToChange == \"4332\"){\n $dataNew2 .= substr_replace($dataNew, \"380 \", 109, 4);\n }else if($dataNewToChange == \"4274\"){\n $dataNew2 .= substr_replace($dataNew, \"382 \", 109, 4);\n }else if($dataNewToChange == \"4770\"){\n $dataNew2 .= substr_replace($dataNew, \"416 \", 109, 4);\n }else if($dataNewToChange == \"4684\"){\n $dataNew2 .= substr_replace($dataNew, \"429 \", 109, 4);\n }else if($dataNewToChange == \"4655\"){\n $dataNew2 .= substr_replace($dataNew, \"510 \", 109, 4);\n }else if($dataNewToChange == \"4679\"){\n $dataNew2 .= substr_replace($dataNew, \"511 \", 109, 4);\n }else if($dataNewToChange == \"4680\"){\n $dataNew2 .= substr_replace($dataNew, \"511 \", 109, 4);\n }else if($dataNewToChange == \"4681\"){\n $dataNew2 .= substr_replace($dataNew, \"511 \", 109, 4);\n }else if($dataNewToChange == \"4793\"){\n $dataNew2 .= substr_replace($dataNew, \"512 \", 109, 4);\n }else if($dataNewToChange == \"4794\"){\n $dataNew2 .= substr_replace($dataNew, \"513 \", 109, 4);\n }else if($dataNewToChange == \"4798\"){\n $dataNew2 .= substr_replace($dataNew, \"516 \", 109, 4);\n }else if($dataNewToChange == \"4801\"){\n $dataNew2 .= substr_replace($dataNew, \"516 \", 109, 4);\n }else if($dataNewToChange == \"4803\"){\n $dataNew2 .= substr_replace($dataNew, \"516 \", 109, 4);\n }else if($dataNewToChange == \"4804\"){\n $dataNew2 .= substr_replace($dataNew, \"516 \", 109, 4);\n }else if($dataNewToChange == \"4805\"){\n $dataNew2 .= substr_replace($dataNew, \"516 \", 109, 4);\n }else if($dataNewToChange == \"4819\"){\n $dataNew2 .= substr_replace($dataNew, \"516 \", 109, 4);\n }else if($dataNewToChange == \"4820\"){\n $dataNew2 .= substr_replace($dataNew, \"516 \", 109, 4);\n }else if($dataNewToChange == \"4823\"){\n $dataNew2 .= substr_replace($dataNew, \"516 \", 109, 4);\n }else if($dataNewToChange == \"4795\"){\n $dataNew2 .= substr_replace($dataNew, \"517 \", 109, 4);\n }else if($dataNewToChange == \"4829\"){\n $dataNew2 .= substr_replace($dataNew, \"519 \", 109, 4);\n }else if($dataNewToChange == \"4828\"){\n $dataNew2 .= substr_replace($dataNew, \"520 \", 109, 4);\n }else if($dataNewToChange == \"4799\"){\n $dataNew2 .= substr_replace($dataNew, \"521 \", 109, 4);\n }else if($dataNewToChange == \"4272\"){\n $dataNew2 .= substr_replace($dataNew, \"523 \", 109, 4);\n }else if($dataNewToChange == \"4768\"){\n $dataNew2 .= substr_replace($dataNew, \"523 \", 109, 4);\n }else if($dataNewToChange == \"4311\"){\n $dataNew2 .= substr_replace($dataNew, \"526 \", 109, 4);\n }else if($dataNewToChange == \"4807\"){\n $dataNew2 .= substr_replace($dataNew, \"529 \", 109, 4);\n }else if($dataNewToChange == \"5044\"){\n $dataNew2 .= substr_replace($dataNew, \"706 \", 109, 4);\n }else if($dataNewToChange == \"5189\"){\n $dataNew2 .= substr_replace($dataNew, \"707 \", 109, 4);\n }else if($dataNewToChange == \"5188\"){\n $dataNew2 .= substr_replace($dataNew, \"708 \", 109, 4);\n }else if($dataNewToChange == \"5167\"){\n $dataNew2 .= substr_replace($dataNew, \"722 \", 109, 4);\n }else if($dataNewToChange == \"5130\"){\n $dataNew2 .= substr_replace($dataNew, \"725 \", 109, 4);\n }else if($dataNewToChange == \"4183\"){\n $dataNew2 .= substr_replace($dataNew, \"2542\", 109, 4);\n }else if($dataNewToChange == \"4185\"){\n $dataNew2 .= substr_replace($dataNew, \"2542\", 109, 4);\n }else if($dataNewToChange == \"4299\"){\n $dataNew2 .= substr_replace($dataNew, \"2543\", 109, 4);\n }else if($dataNewToChange == \"4302\"){\n $dataNew2 .= substr_replace($dataNew, \"2544\", 109, 4);\n }else if($dataNewToChange == \"4307\"){\n $dataNew2 .= substr_replace($dataNew, \"2544\", 109, 4);\n }else if($dataNewToChange == \"4308\"){\n $dataNew2 .= substr_replace($dataNew, \"2544\", 109, 4);\n }else if($dataNewToChange == \"4309\"){\n $dataNew2 .= substr_replace($dataNew, \"2544\", 109, 4);\n }else if($dataNewToChange == \"4323\"){\n $dataNew2 .= substr_replace($dataNew, \"2544\", 109, 4);\n }else if($dataNewToChange == \"4324\"){\n $dataNew2 .= substr_replace($dataNew, \"2544\", 109, 4);\n }else if($dataNewToChange == \"4327\"){\n $dataNew2 .= substr_replace($dataNew, \"2544\", 109, 4);\n }else if($dataNewToChange == \"4298\"){\n $dataNew2 .= substr_replace($dataNew, \"2545\", 109, 4);\n }else if($dataNewToChange == \"4297\"){\n $dataNew2 .= substr_replace($dataNew, \"2546\", 109, 4);\n }else if($dataNewToChange == \"5158\"){\n $dataNew2 .= substr_replace($dataNew, \"2597\", 109, 4);\n }else if($dataNewToChange == \"5163\"){\n $dataNew2 .= substr_replace($dataNew, \"2597\", 109, 4);\n }else if($dataNewToChange == \"5164\"){\n $dataNew2 .= substr_replace($dataNew, \"2597\", 109, 4);\n }else if($dataNewToChange == \"5165\"){\n $dataNew2 .= substr_replace($dataNew, \"2597\", 109, 4);\n }else if($dataNewToChange == \"5179\"){\n $dataNew2 .= substr_replace($dataNew, \"2597\", 109, 4);\n }else if($dataNewToChange == \"5180\"){\n $dataNew2 .= substr_replace($dataNew, \"2597\", 109, 4);\n }else if($dataNewToChange == \"5183\"){\n $dataNew2 .= substr_replace($dataNew, \"2597\", 109, 4);\n }else if($dataNewToChange == \"5156\"){\n $dataNew2 .= substr_replace($dataNew, \"2598\", 109, 4);\n }else if($dataNewToChange == \"5039\"){\n $dataNew2 .= substr_replace($dataNew, \"2601\", 109, 4);\n }else if($dataNewToChange == \"5040\"){\n $dataNew2 .= substr_replace($dataNew, \"2601\", 109, 4);\n }else if($dataNewToChange == \"5041\"){\n $dataNew2 .= substr_replace($dataNew, \"2601\", 109, 4);\n }else if($dataNewToChange == \"5154\"){\n $dataNew2 .= substr_replace($dataNew, \"2604\", 109, 4);\n }else if($dataNewToChange == \"5153\"){\n $dataNew2 .= substr_replace($dataNew, \"2605\", 109, 4);\n }else if($dataNewToChange == \"5045\"){\n $dataNew2 .= substr_replace($dataNew, \"2606\", 109, 4);\n }else if($dataNewToChange == \"5128\"){\n $dataNew2 .= substr_replace($dataNew, \"2619\", 109, 4);\n }else{\n $dataNew2 .= $dataNew;\n }\n \n }\n echo $dataNew2;\n \n }\n \n \n die(\"morreu\");\n }\n return array();\n }\n }", "title": "" }, { "docid": "117cd4269c3a47ce76dee3e3eb92d406", "score": "0.54946786", "text": "function carregaTxt($arquivo) {\n\t\tif (file_exists ( $arquivo ) == true) {\n\t\t\t$this->_arquivo = file ( $arquivo );\n\t\t}\n\t}", "title": "" }, { "docid": "ad0615aebd0f0e0281607c0ec257e70c", "score": "0.54803085", "text": "function putFile($path, $content){\n\t\t\trequire_once(\"knj/functions_knj_strings.php\");\n\t\t\t\n\t\t\t$lines = explode(\"\\n\", $content);\n\t\t\t$first = true;\n\t\t\tforeach($lines AS $line){\n\t\t\t\tif ($first){\n\t\t\t\t\t$first = false;\n\t\t\t\t\t$this->shellCMD(\"echo \" . knj_string_unix_safe($line) . \" > \" . $path) . \"\\n\";\n\t\t\t\t}else{\n\t\t\t\t\t$this->shellCMD(\"echo \" . knj_string_unix_safe($line) . \" >> \" . $path) . \"\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "5094134a19fc2581ad86bc770466d60e", "score": "0.54773927", "text": "function openArquivo(){\n $this->arquivo = fopen($this->path, \"w\");\n }", "title": "" }, { "docid": "75602a3966e05e53d12e5bb4470fc6a1", "score": "0.5457815", "text": "function saveFile($id, $fileName){ \n\t\n\t\tif (file_exists(COMPLETE_ROOT_DIR.\"img/tmp/\".$fileName)){\n\t\t\n\t\t\tcopy(COMPLETE_ROOT_DIR.\"img/tmp/\".urlencode($fileName), COMPLETE_ROOT_DIR.\"img/productos/\".$id.'.jpg');\n\t\t\tunlink(COMPLETE_ROOT_DIR.\"img/tmp/\".urlencode($fileName));\n\t\t\t\n\t\t\treturn ROOT_URL.\"img/productos/\".$id.'.jpg';\n\t\t}else\n\t\t\treturn '';\n\t}", "title": "" }, { "docid": "35c92740a3c7081f15c742efad031889", "score": "0.54565865", "text": "public function subirImagen(){\n \n if($this->nombreI!=''){\n if($this->foto){\n\n $info = pathinfo($this->foto->path());\n $codificado = base64_encode(file_get_contents($this->foto->path()));\n $data = 'data:'.mime_content_type($this->foto->path()).\";base64,\".$codificado;\n $mime = mime_content_type($this->foto->path());\n \n \n \n \n $texto = $this->nombreI;\n $this->mensaje = $texto;\n $result = $this->guardarImagen($this->nombreI,$data);\n\n\n $archivo = $this->getImagen($this->nombreI);\n \n $this->imagen = $archivo;\n $this->foto=null;\n }else{\n Session::flash('error','Error, no se cargó la imagen correctamente');\n $this->foto=null;\n }\n }else{\n Session::flash('error','Seleccione un proceso para el nombre de la imagen');\n $this->foto=null;\n }\n \n }", "title": "" }, { "docid": "0177bc7208d0543d00a0c6d4b6dbb59f", "score": "0.5446543", "text": "function f_making($name){\n\n\t$fp = fopen(\"temp.txt\",\"r\");\n\t$newfp = fopen(\"category_ss/\".$name,\"w\");\n\n\t$order = \"\\n\";\n\t//$order = array(\"\\r\\n\", \"\\n\", \"\\r\");\n\t$replace = \"\\r\\n\";\n\n\t\t//transfer the file data into a new file\n\t\twhile(!feof($fp))\n\t\t{\n\t\t\t$string =fgets($fp);\n\n\t\t//modifying the string with \\r\\n\n\t\t\t$newstr = str_replace($order, $replace, $string);\n\n\t\t\tfputs($newfp, $newstr); // save the strings to the file \"received?.html\"\n\t\t}\n\n\tfclose($fp);\n\tfclose($newfp);\n}", "title": "" }, { "docid": "e44f6f107210d9630306d90e9e60e28c", "score": "0.544425", "text": "final public function getFile () {}", "title": "" }, { "docid": "e44f6f107210d9630306d90e9e60e28c", "score": "0.544425", "text": "final public function getFile () {}", "title": "" }, { "docid": "e44f6f107210d9630306d90e9e60e28c", "score": "0.544425", "text": "final public function getFile () {}", "title": "" }, { "docid": "e44f6f107210d9630306d90e9e60e28c", "score": "0.544425", "text": "final public function getFile () {}", "title": "" }, { "docid": "e44f6f107210d9630306d90e9e60e28c", "score": "0.544425", "text": "final public function getFile () {}", "title": "" }, { "docid": "e44f6f107210d9630306d90e9e60e28c", "score": "0.544425", "text": "final public function getFile () {}", "title": "" }, { "docid": "e44f6f107210d9630306d90e9e60e28c", "score": "0.544425", "text": "final public function getFile () {}", "title": "" }, { "docid": "e44f6f107210d9630306d90e9e60e28c", "score": "0.544425", "text": "final public function getFile () {}", "title": "" }, { "docid": "e44f6f107210d9630306d90e9e60e28c", "score": "0.544425", "text": "final public function getFile () {}", "title": "" }, { "docid": "e44f6f107210d9630306d90e9e60e28c", "score": "0.544425", "text": "final public function getFile () {}", "title": "" }, { "docid": "e44f6f107210d9630306d90e9e60e28c", "score": "0.544425", "text": "final public function getFile () {}", "title": "" }, { "docid": "e44f6f107210d9630306d90e9e60e28c", "score": "0.544425", "text": "final public function getFile () {}", "title": "" }, { "docid": "e44f6f107210d9630306d90e9e60e28c", "score": "0.544425", "text": "final public function getFile () {}", "title": "" }, { "docid": "e44f6f107210d9630306d90e9e60e28c", "score": "0.544425", "text": "final public function getFile () {}", "title": "" }, { "docid": "e44f6f107210d9630306d90e9e60e28c", "score": "0.544425", "text": "final public function getFile () {}", "title": "" }, { "docid": "e44f6f107210d9630306d90e9e60e28c", "score": "0.544425", "text": "final public function getFile () {}", "title": "" }, { "docid": "e44f6f107210d9630306d90e9e60e28c", "score": "0.544425", "text": "final public function getFile () {}", "title": "" }, { "docid": "e44f6f107210d9630306d90e9e60e28c", "score": "0.544425", "text": "final public function getFile () {}", "title": "" }, { "docid": "e44f6f107210d9630306d90e9e60e28c", "score": "0.544425", "text": "final public function getFile () {}", "title": "" }, { "docid": "e44f6f107210d9630306d90e9e60e28c", "score": "0.544425", "text": "final public function getFile () {}", "title": "" }, { "docid": "e44f6f107210d9630306d90e9e60e28c", "score": "0.544425", "text": "final public function getFile () {}", "title": "" }, { "docid": "e44f6f107210d9630306d90e9e60e28c", "score": "0.544425", "text": "final public function getFile () {}", "title": "" }, { "docid": "e44f6f107210d9630306d90e9e60e28c", "score": "0.544425", "text": "final public function getFile () {}", "title": "" }, { "docid": "e44f6f107210d9630306d90e9e60e28c", "score": "0.544425", "text": "final public function getFile () {}", "title": "" }, { "docid": "e44f6f107210d9630306d90e9e60e28c", "score": "0.544425", "text": "final public function getFile () {}", "title": "" }, { "docid": "e44f6f107210d9630306d90e9e60e28c", "score": "0.544425", "text": "final public function getFile () {}", "title": "" }, { "docid": "e44f6f107210d9630306d90e9e60e28c", "score": "0.544425", "text": "final public function getFile () {}", "title": "" }, { "docid": "7b37c02e037fea9c293d85aa867e9a92", "score": "0.5443583", "text": "public function saveFromFilename()\n\t{\n\t\tlist($siw, $jenis, $cabang, $divisi, $username) = explode('_',$this->file_name);\n\t\t\n\t\t$this->jenis = $jenis;\n\t\t// change from jenis text taken from file name to integer field\n\t\t$this->changeJenisFromFile();\n\t\t\n\t\t$this->cabang_id = $cabang;\n\t\t\n\t\t// change from cabang text to cabang id\n\t\t$this->changeCabangFromFile();\n\t\t\n\t\t$this->divisi = $divisi;\n\t\t$this->user = $username;\t\n\t\t\n\t\t//save change to save the id of cabang\n\t\t$this->save();\n\t\t$this->createWithConvertDataFromFile();\n\t}", "title": "" }, { "docid": "44e5f0fbda53fa30198a09c19dc02d44", "score": "0.54399925", "text": "public function treat_file(){\n\t\t$this->clean_file();\n\t\t// Application du préfixe\n\t\t$this->apply_fix();\n\t}", "title": "" }, { "docid": "350cbb10936112b031e01ef7e2c6e2b5", "score": "0.5426319", "text": "function superFromFile($file){\n\t\t//$this->setFileName(strtolower($file[\"name\"]));\n\t\t$this->setFileName(\"\");\n\t\t$typeTmp = strtolower(substr($file[\"name\"],strrpos($file[\"name\"],\".\")));\n\t\t$this->setFileExt($typeTmp);\n\t\t$this->setSize($file[\"size\"]);\n\t\t$this->setTmpName($file[\"tmp_name\"]);\n\t}", "title": "" }, { "docid": "3c7b13e68502aae726e38decd2d6b9a7", "score": "0.5405893", "text": "protected function replaceFileContent()\n {\n $climate = $this->climate();\n $targetName = $this->targetName();\n $snakeTargetName = self::snake($targetName);\n $studlyTargetName = self::studly($targetName);\n $sourceName = $this->sourceName();\n $snakeSourceName = self::snake($sourceName);\n $studlySourceName = self::studly($sourceName);\n\n $climate->br()->backgroundGreen()->out('Replacing all files content');\n $climate->green()->out(sprintf(\n '<green>Changing </green><white>%s</white> to <white>%s</white>',\n $snakeSourceName,\n $snakeTargetName\n ));\n $climate->green()->out(sprintf(\n '<green>Studly target name: </green><white>%s</white> to <white>%s</white>',\n $studlySourceName,\n $studlyTargetName\n ));\n $climate->br();\n\n $files = array_merge(\n $this->globRecursive($this->path()),\n glob('*.*')\n );\n\n // Output array\n $data = [\n [\n '<white>File name</white>',\n $snakeSourceName,\n $studlySourceName,\n 'total'\n ]\n ];\n\n foreach ($files as $filename) {\n if (is_dir($filename)) {\n continue;\n }\n $file = file_get_contents($filename);\n $numReplacement1 = 0;\n $numReplacement2 = 0;\n $content = preg_replace(\n '#'.$snakeSourceName.'#',\n $snakeTargetName,\n $file,\n -1,\n $numReplacement1\n );\n $content = preg_replace(\n '#'.$studlySourceName.'#',\n $studlyTargetName,\n $content,\n -1,\n $numReplacement2\n );\n $numReplacements = ($numReplacement1 + $numReplacement2);\n if ($numReplacements > 0) {\n // Save file content\n file_put_contents($filename, $content);\n\n $data[] = [\n $filename,\n '<white>'.$numReplacement1.'</white>',\n '<white>'.$numReplacement2.'</white>',\n '<white>'.$numReplacements.'</white>',\n ];\n }\n }\n\n $climate->green()->table($data);\n }", "title": "" }, { "docid": "0efb6bf92a3ff7cefdf2cef00e72eebc", "score": "0.5404222", "text": "function fett_file_str_replace($file_path, $find, $replace) {\n $file_contents = file_get_contents($file_path);\n $file_contents = str_replace($find, $replace, $file_contents);\n file_put_contents($file_path, $file_contents);\n}", "title": "" }, { "docid": "3be6ab56303d34e776f3cbb2cea92243", "score": "0.54031885", "text": "function createFile($fromURL, $toURL, $name) { \n $Name = ucfirst($name);\n $NAME = strtoupper($name);\n $names = $name.\"s\";\n $Names = $Name.\"s\";\n\n echo \"\\t \\e[32m + \".$toURL.\" \\e[0m \\n\"; \n $file = file_get_contents(__DIR__.$fromURL);\n $string = eval(\"return '\".$file.\"';\"); // pure meta programming right here\n file_put_contents(__DIR__.$toURL, $string); \n}", "title": "" }, { "docid": "5552e5da16049596af45e98eaf660a8f", "score": "0.5393944", "text": "public function renameFile() {\n }", "title": "" }, { "docid": "6f6c40b7333934738624a61f2c197464", "score": "0.5385436", "text": "public function ctraAcualizarRestaurante(){\n\n\t\tif(isset($_POST[\"idPlato\"])){\n\n\t\t\tif(preg_match('/^[\\/\\=\\\\&\\\\;\\\\_\\\\*\\\\\"\\\\<\\\\>\\\\?\\\\¿\\\\!\\\\¡\\\\:\\\\,\\\\.\\\\0-9a-zA-ZñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"EditPescripcionRestaurante\"])){\n\n\t\t\t\t$ruta=$_POST[\"antiguoimgPlato\"];\n\n\t\t\t\tif(isset($_FILES[\"editarsubirImgRestaurante\"][\"tmp_name\"]) && !empty($_FILES[\"editarsubirImgRestaurante\"][\"tmp_name\"])){\n\n\t\t\t\t\tlist($anchos,$altos)=getimagesize($_FILES[\"editarsubirImgRestaurante\"][\"tmp_name\"]);\n\n\t\t\t\t\t$nuevoAncho=169;\n\t\t\t\t\t$nuevoAlto=169;\n\t\t\t\t\t/*=========================================\n\t\t\t\t\t= VERIFICAR SI EXITE UNA IMAGEN EN LA BD =\n\t\t\t\t\t=========================================*/\n\n\t\t\t\t\tif(isset($_POST[\"antiguoimgPlato\"])){\n\n\t\t\t\t\t\tunlink($_POST[\"antiguoimgPlato\"]);\n\t\t\t\t\t}\n\n\t\t\t\t\t/*=========================================\n\t\t\t\t\t= Nombramos el dirctorio =\n\t\t\t\t\t=========================================*/\n\t\t\t\t\t$directorio=\"vistas/img/restaurante\";\n\n\n\t\t\t\t\t/*=========================================\n\t\t\t\t\t=De acuerdo al tipo de imagen aplicamos las funciones por defecto de psp =\n\t\t\t\t\t=========================================*/\n\n\t\t\t\t\tif($_FILES[\"editarsubirImgRestaurante\"][\"type\"]==\"image/jpeg\"){\n\n\t\t\t\t\t\t$aleatorio =mt_rand(100,999);\n\t\t\t\t\t\t$ruta =$directorio.\"/\".$aleatorio.\".jpg\";\n\n\t\t\t\t\t\t$origin=imagecreatefromjpeg($_FILES[\"editarsubirImgRestaurante\"][\"tmp_name\"]);\n\n\t\t\t\t\t\t$destino=imagecreatetruecolor($nuevoAncho, $nuevoAlto);\n\n\t\t\t\t\t\timagecopyresized($destino,$origin, 0, 0, 0, 0, $nuevoAncho, $nuevoAlto, $anchos,$altos);\n\n\t\t\t\t\t\timagejpeg($destino,$ruta);\n\n\t\t\t\t\t}else if($_FILES[\"editarsubirImgRestaurante\"][\"type\"]==\"image/png\"){\n\n\n\t\t\t\t\t\t$aleatorio = mt_rand(100,999);\n\n\t\t\t\t\t\t$ruta = $directorio.\"/\".$aleatorio.\".png\";\n\n\t\t\t\t\t\t$origen = imagecreatefrompng($_FILES[\"editarsubirImgRestaurante\"][\"tmp_name\"]);\t\t\t\t\t\t\n\n\t\t\t\t\t\t$destino = imagecreatetruecolor($nuevoAncho, $nuevoAlto);\n\n\t\t\t\t\t\timagealphablending($destino, TRUE);\n\t\t\t\n\t\t\t\t\t\timagesavealpha($destino, TRUE);\n\n\t\t\t\t\t\timagecopyresized($destino, $origen, 0, 0, 0, 0, $nuevoAncho, $nuevoAlto, $anchos,$altos);\n\n\t\t\t\t\t\timagepng($destino, $ruta);\n\n\t\t\t\t\t}else{\n\n\t\t\t\t\techo '<script>\n\n\t\t\t\t\t\tswal({\n\n\t\t\t\t\t\t\ttype:\"error\",\n\t\t\t\t\t\t\ttitle: \"¡CORREGIR!\",\n\t\t\t\t\t\t\ttext: \"¡No se permiten formatos diferentes a JPG y/o PNG!\",\n\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\n\t\t\t\t\t\t}).then(function(result){\n\n\t\t\t\t\t\t\tif(result.value){\n\n\t\t\t\t\t\t\t\twindow.location = \"restaurante\";\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t});\t\n\n\t\t\t\t\t</script>';\n\n\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t$tabla=\"restaurante\";\n\n\t\t\t\t$datos=array(\"id\"=>$_POST[\"idPlato\"],\n\t\t\t\t\t\"foto\"=>$ruta,\n\t\t\t\t\t\"descripcion\"=>$_POST[\"EditPescripcionRestaurante\"]);\n\n\t\t\t\t$respuesta=RestauranteModelo::mdlActualizarRestaurante($tabla,$datos);\n\n\t\t\t\tif($respuesta==\"ok\"){\n\n\t\t\t\t echo '<script>\n\n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\ttype:\"success\",\n\t\t\t\t\t\t \ttitle: \"¡CORRECTO!\",\n\t\t\t\t\t\t \ttext: \"¡El plato del restaurante ha sido modificado exitosamente!\",\n\t\t\t\t\t\t \tshowConfirmButton: true,\n\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\t\t\t\t\t\t \n\t\t\t\t\t\t}).then(function(result){\n\n\t\t\t\t\t\t\t\tif(result.value){ \n\t\t\t\t\t\t\t\t window.location = \"restaurante\";\n\t\t\t\t\t\t\t\t } \n\t\t\t\t\t\t});\n\n\t\t\t\t\t</script>';\n\n\t\t\t\t}\n\n\t\t\t}else {\n\n\t\t\techo '<script>\n\n\t\t\t\t\tswal({\n\n\t\t\t\t\t\ttype:\"error\",\n\t\t\t\t\t\ttitle: \"¡CORREGIR!\",\n\t\t\t\t\t\ttext: \"¡No se permiten caracteres especiales en ninguno de los campos!\",\n\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\n\t\t\t\t\t}).then(function(result){\n\n\t\t\t\t\t\tif(result.value){\n\n\t\t\t\t\t\t\twindow.location = \"restaurante\";\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t});\t\n\n\t\t\t\t</script>';\n\n\t\t\t}\n\n\t\t}\n\t}", "title": "" }, { "docid": "489e0ab56c8635481207537713a47824", "score": "0.53836423", "text": "public function save(Request $request)\n{\n //recupera archivo del form\n $file = $request->file('file');\n\n //recupera el nombre del archivo\n $nombre = $file->getClientOriginalName(); \n\n $carpeta =(string) Carbon::today();\n $carpeta = \\substr($carpeta,0,7);\n \n //indicamos que queremos guardar un nuevo archivo en el disco local\n $path = Storage::putFileAs($carpeta, $file, $nombre);\n\n $archivos = Archivo::all(); \n $band = true;\n foreach ($archivos as $archivo){\n if ($archivo->url == 'app/'.$path){\n $band = false;\n break;\n }\n \n }\n\n if($band){\n\n $archivo = new Archivo();\n $archivo->url = 'app/'.$path;\n $archivo->nombre = $nombre;\n $archivo->extension = strtolower($file->getClientOriginalExtension());\n $archivo->descripcion = 'Archivo de aportes y de descuentos de la UNSa';\n $archivo->categoria='unsa';\n if($archivo->extension ==\"txt\") {\n $archivo->save();\n\n //nose si usarlo VERRR\n $contenido = \\File::get($file);\n\n //variable \n $lineas = array();\n\n\n \n //convierte el archivo en un array donde cada elemento es una linea del txt\n foreach (file($request->file('file')) as $linea){\n $lineas[] = $linea; \n } \n\n for($k=1;$k < sizeof($lineas);$k++ ){\n $aux = $lineas[$k]; \n $i=0;\n //PARA UNA FILA EM UN STRING BUSCA EL PRIMER CARACTER DEL ALFABETO \n while( $i<strlen($aux)){\n\n if( $aux[$i]<= 'Z' and $aux[$i]>= 'A' ){\n \n break; \n \n }\n\n $i++;\n };\n $resultado= \\substr($aux , $i ,-1);\n $j=0;\n //BUSCA EL ULTIMO CARACTER PARA RECUPERAR EL TIPO DE DOCUMENTO\n while( $j<strlen($resultado)){\n if( $resultado[$j]<= '9' and $resultado[$j]>= '0' ){ \n break; \n }\n $j++;\n }\n $tipo_documento=trim( \\substr($resultado , 0 ,$j-1));\n\n $resultado= trim(\\substr($resultado , $j ,-1));\n \n $i=0;\n //PARA UNA FILA EM UN STRING BUSCA EL PRIMER CARACTER DEL ALFABETO \n while( $i<strlen($resultado)){\n\n if( $resultado[$i]<= 'Z' and $resultado[$i]>= 'A' ){\n \n break; \n \n }\n\n $i++;\n };\n $numero_dni= \\substr($resultado ,0, $i+1 );\n $resultado= \\substr($resultado , $i ,-1);\n\n $j=0;\n //BUSCA EL ULTIMO CARACTER PARA RECUPERAR EL TIPO DE DOCUMENTO\n while( $j<strlen($resultado)){\n if( $resultado[$j]<= '9' and $resultado[$j]>= '0' ){ \n \n break; \n }\n $j++;\n }\n $nombre=trim(\\substr($resultado ,0, $j )); \n\n $resultado= trim(\\substr($resultado , $j ,-1));\n\n $j=strlen($resultado)-1;\n //BUSCA EL ULTIMO CARACTER PARA RECUPERAR EL TIPO DE DOCUMENTO\n \n $cod = trim(\\substr($resultado ,0, 3 ));\n $resultado= trim(\\substr($resultado ,4, -1 ));\n $monto = trim(\\substr($resultado ,0, 9 ));\n $resultado= trim(\\substr($resultado ,9, -1 ));\n\n $año_mes = trim(\\substr($resultado ,0, 6 ));\n\n \n \n\n\n /*\n 'tipo_documento',\n 'numero_documeno',\n 'nombre_apellido',\n 'codigo',\n 'monto',\n 'año_mes',\n */\n $persona = new PersonasUnsa;\n $persona->tipo_documento = $tipo_documento ;\n\n\n $numero_dni =(int)$numero_dni ;\n\n $persona->numero_documento = trim((string)$numero_dni);\n $aux2= \\utf8_decode($nombre); // Busca y remplaza los caracteres desconocidos por un '?'\n $aux2= \\str_replace('?','Ñ',$aux2); // Remplaza el ? por una Ñ\n $persona->nombre_apellido =$aux2;\n $persona->codigo = $cod;\n $monto = (int)$monto/100;\n \n $persona->monto =$monto;\n $auxYear = \\substr($año_mes,0,4);\n $auxMonth = \\substr($año_mes,4,5);\n \n\n $persona->año_mes = Carbon::create($auxYear, $auxMonth);\n $persona->archivo_id = $archivo->id;\n $persona->save();\n \n } \n\n \n return redirect('home')->with('success','ARCHIVO CARGADO EXITOSAMENTE!!!!!!');\n } else{\n return redirect('cargaxls')->with('success','EXTENSION INCORRECTA, CARGUE UN ARCHIVO CORRECTO!!');\n }\n \n }else{\n return redirect('home')->with('success','ARCHIVO YA EXISTENTE!');\n }\n}", "title": "" }, { "docid": "9cb15b0115bc2b139f9ba19f1f35820c", "score": "0.53824246", "text": "function cargar_imagenSC($tipo,$imagen,$email,$carpeta){\n $destino = \"./RESOURCE/IMAGES/fotos/\".$carpeta.\"/\".$email.\".png\";//guardaremos la imagenen este directorio\n if (strstr($tipo,\"image\")) {//verificamos el tipo de archivo que se esta cargando \n //guardandolo con el nombre del email\n move_uploaded_file($imagen,$destino);//metodo donde copiaremos la imagen\n \n }else{\n $archivo = RQ.\"IMAGES/fotos/default.png\";//RQ ES UNA CONSTANTE DEFINIDA EN CONFIG.PHP\n $archivo = RQ.\"IMAGES/fotos/\".$carpeta.\"/default.png\";//RQ ES UNA CONSTANTE DEFINIDA EN CONFIG.PHP\n copy($archivo , $destino);//obtenemos el directorio del archivo y luego le indicamos el lugar destino asi lo que copiara\n }//metodo copy es cuando lo obtenemos (en este caso)por post o http\n return $email.\".png\";\n }", "title": "" }, { "docid": "1ef18a87c451258ce81a0cc99bf84f7b", "score": "0.5380603", "text": "function save_new_file($filename, $content) {\n file_put_contents($filename, $content);\n}", "title": "" }, { "docid": "11d5c77869a6ae420029bad4ee044c1e", "score": "0.53804755", "text": "protected static function file(): string\n {\n return dirname(Retour::root('redirects')) . '/.retour';\n }", "title": "" }, { "docid": "cf2f85b81717d2676f35c0b7c7460e37", "score": "0.537273", "text": "function process_file($file) {\n\n\t\t\t$this->file = trim($file);\n\t\t\t$directory = dirname($this->file).\"/\";\n\n\t\t\t$this->contents = file_get_contents($this->file);\n\n\t\t\tif(preg_match_all(\"/\\{\\{([A-Za-z0-9_\\s+\\-]+)\\}\\}/i\", $this->contents, $g)) {\n\n\t\t\t\tglobal $items;\n\t\t\t\t$arr = $g[1];\n\n\t\t\t\tforeach($arr as $item) {\n\t\t\t\t$this->contents = preg_replace(\"/\\{\\{$item+\\}\\}/i\", $items[$item], $this->contents);\n\t\t\t\t}\n\n\t\t\t\t$this->file = (str_replace(dirname($file), \"\", $this->file));\n\t\t\t\t$this->file = preg_replace(\"/\\/+/\", \"\", $this->file);\n\n\t\t\t\t$this->file = str_replace(\".zynamo\", \"\", $this->file);\n\n\t\t\t\t$open_file = fopen($directory.\"/\".$this->file, \"w\");\n\n\t\t\t\t$write = fwrite($open_file, $this->contents);\n\n\t\t\t\tfclose($open_file);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t} \n\t\n\n\t\t}", "title": "" }, { "docid": "aad7db973beebab09024715ec3e6e329", "score": "0.53659934", "text": "function loadFile($file) {\n $file = $DOCUMENT_ROOT . \"$file\";\n print \"FILE:$file<br />\";\n $f = file ($file);\n $f = implode(\"\", $f);\n return $f;\n}", "title": "" }, { "docid": "3f0668671dda954438ce9e23047eed7c", "score": "0.5362608", "text": "function BorrarImagenBD()\n\t\t{\n\t\t\tunlink( \"../../media/perlas/\" . $this->id );\n\t\t}", "title": "" }, { "docid": "a46783116ce8c982a0b9f362b335722c", "score": "0.53455013", "text": "private function getFileName($filePath){\n\nreturn str_replace(SITEMAPPATH, '', $filePath);\n\n}", "title": "" }, { "docid": "877aae88a11411ed5a4c1b2daaa2234a", "score": "0.5339679", "text": "public function unduhFile($opk){\n if($this->session->userdata(\"tipe_account\") == 1){\n $list_entri = $this->modelEntri->readFile($opk);\n $filen= $list_entri->row();\n \n\n header(\"Content-Disposition: attachment; filename=\".$filen->nama_file);\n header(\"Content-length: \".$filen->ukuran.\"\");\n header(\"Content-type: \".$filen->ekstensi.\"\");\n echo $filen->file; \n }\n else{\n redirect(\"\");\n }\n }", "title": "" } ]
25116492e74f419c688f6acc77897a1b
get location to put select option
[ { "docid": "59bba3bbead8a06e4f43ffe3831f5aa6", "score": "0.0", "text": "public function makeJsonLoadLocation($data) {\n $arr = array();\n foreach($data as $d) {\n $arr[$d['c']['location_name']] = $d['c']['location_name'];\n }\n\n return json_encode($arr);\n }", "title": "" } ]
[ { "docid": "4caa3b9e0fe7ba92a2c9e6c89b31e928", "score": "0.61068976", "text": "function fill_site_location_select_box($connect)\n{ \n $output = '';\n $query = \"SELECT * FROM time_tracker_site_location_select_box\";\n $statement = $connect->prepare($query);\n $statement->execute();\n $result = $statement->fetchAll();\n foreach($result as $row)\n {\n $output .= '<option value=\"'.$row[\"unit_name\"].'\">'.$row[\"unit_name\"].'</option>';\n }\n return $output;\n}", "title": "" }, { "docid": "ee100d61b6c98de1a7a3e572ceef0c36", "score": "0.6031293", "text": "protected static function get_control_treelocationselect($auth, $args, $tabAlias, $options) {\n global $indicia_templates;\n global $user;\n\n data_entry_helper::$helpTextPos = 'before';\n $indicia_templates['two-col-50'] = '<div class=\"two_columns\"><div id=\"leftcol\" class=\"column\">{col-1}</div><div id=\"rightcol\" class=\"column\">{col-2}</div></div>';\n $r=\"\";\n if (!array_key_exists('location_type_id', $options))\n return \"Control [tree location select] must be provided with a location_type_id.<br />\";\n if (!array_key_exists('tree_location_type_id', $options))\n return \"Control [tree location select] must be provided with a tree_location_type_id.<br />\";\n$r .= '<span style=\"display:none;\">'.print_r($_SERVER,true).'</span>';\n if(isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER']!='' && ($referer = self::getRefererPath()) !== false)\n $r .= '<input name=\"referer\" type=\"hidden\" value=\"'.$referer.'\" />';\n\n $attrArgs = array(\n \t\t'valuetable' => 'sample_attribute_value',\n \t\t'attrtable' => 'sample_attribute',\n \t\t'key' => 'sample_id',\n \t\t'extraParams'=>$auth['read'],\n \t\t'survey_id'=>$args['survey_id'],\n \t\t'fieldprefix' => 'smpAttr'\n );\n $attrArgs['extraParams'] += array('query'=>json_encode(array('in'=>array('caption'=>array('No Understorey Observed')))));\n $smpAttrs = data_entry_helper::getAttributes($attrArgs, false);\n if(!count($smpAttrs))\n throw new exception(lang::get('This form must be used with an \"No Understorey Observed\" sample attribute.'));\n\n data_entry_helper::$javascript .= \"\n// assume map projection is same as indicia internal\n// Create vector layers: one to display the Parent Site onto, and another for the tree locations list\n// the default edit layer is used for this sample\nvar labelRule = new OpenLayers.Rule({\n symbolizer: {\n label : \\\"\\${name}\\\",\n fontSize: \\\"16px\\\",\n fontFamily: \\\"Verdana, Arial, Helvetica,sans-serif\\\",\n fontWeight: \\\"bold\\\",\n fontColor: \\\"#FF0000\\\",\n labelAlign: \\\"cm\\\",\n labelYOffset: \\\"-15\\\"\n }\n });\nvar defaultStyle = new OpenLayers.Style({pointRadius: 6,fillColor: \\\"Red\\\",fillOpacity: 0.3,strokeColor: \\\"Yellow\\\",strokeWidth: 1});\ndefaultStyle.addRules([labelRule]);\n\nParentLocStyleMap = new OpenLayers.StyleMap({\\\"default\\\": new OpenLayers.Style({strokeColor: \\\"Yellow\\\",fillOpacity: 0,strokeWidth: 4})});\nParentLocationLayer = new OpenLayers.Layer.Vector('Parents',{styleMap: ParentLocStyleMap,displayInLayerSwitcher: false});\n\nTreeStyleMap = new OpenLayers.StyleMap({\\\"default\\\": defaultStyle});\nTreeListLayer = new OpenLayers.Layer.Vector('Trees',{styleMap: TreeStyleMap, displayInLayerSwitcher: false});\nvar _zoomToExtent = function(bounds, layer){\n var dy = Math.max(10, (bounds.top-bounds.bottom) * layer.map.div.settings.maxZoomBuffer);\n var dx = Math.max(10, (bounds.right-bounds.left) * layer.map.div.settings.maxZoomBuffer);\n bounds.top = bounds.top + dy;\n bounds.bottom = bounds.bottom - dy;\n bounds.right = bounds.right + dx;\n bounds.left = bounds.left - dx;\n if (layer.map.getZoomForExtent(bounds) > layer.map.div.settings.maxZoom) {\n // if showing something small, don't zoom in too far\n layer.map.setCenter(bounds.getCenterLonLat(), layer.map.div.settings.maxZoom);\n } else {\n // Set the default view to show something a bit larger than the size of the grid square\n layer.map.zoomToExtent(bounds);\n }\n};\n$('.scPresence:checkbox').change(function(){\n var cells = $(this).closest('tr').find('.scOccAttrCell');\n if($(this).attr('checked')){\n cells.find('select').addClass('required').removeAttr('disabled');\n cells.append('<span class=\\\"deh-required\\\">*</span>');\n } else {\n cells.find('select').removeClass('required').val('').attr('disabled',true);\n cells.find('.deh-required').remove();\n cells.find('label.error').remove();\n cells.find('.error').removeClass('error');\n cells.find('.inline-error').remove();\n cells.find('.ui-state-error').removeClass('ui-state-error');\n }\n});\n$('.scPresence:checkbox').change();\nindiciaData.searchUpdatesSref=false;\\n\";\n data_entry_helper::$late_javascript .= \"\njQuery('[name=\".str_replace(':','\\\\\\\\:',$smpAttrs[0]['id']).\"],[name^=\".str_replace(':','\\\\\\\\:',$smpAttrs[0]['id']).\"\\\\\\\\:]').filter(':checkbox').rules('add', {no_observation: true});\n$.validator.addMethod('no_observation', function(arg1, arg2){\n // ignore the hidden zeroing field asscoiated with the boolean\n if(!$(arg2).filter(':checkbox').length) return true;\n var numRows = jQuery('.scPresence').filter(':checkbox').filter('[checked]').length;\n var isChecked = jQuery(arg2).attr('checked') != false;\n if(isChecked) return(numRows==0)\n else if(numRows>0) return true;\n return false;\n},\n \\\"The <strong>\".lang::get('No Understorey Observed').\"</strong> checkbox must be selected if there are no species entered in the Flowering plant phenology grid, otherwise it must be unchecked.\\\");\n\\n\";\n self::$treeOccurrenceRecord = false;\n\n if (self::$loadedSampleId) {\n $location_id = data_entry_helper::$entity_to_load['sample:location_id'];\n } else if(isset($_GET['location_id'])) {\n $location_id = $_GET['location_id'];\n } else $location_id = false;\n\n $attrArgs = array(\n \t\t'valuetable' => 'location_attribute_value',\n \t\t'attrtable' => 'location_attribute',\n \t\t'key' => 'location_id',\n \t\t'extraParams'=>$auth['read'],\n \t\t'survey_id'=>$args['survey_id'],\n \t\t'fieldprefix' => 'locAttr',\n 'location_type_id' => $options['tree_location_type_id']\n );\n\n if($location_id) $attrArgs['id'] = $location_id;\n $attrArgs['extraParams'] += array('query'=>json_encode(array('in'=>array('caption'=>array('Recorder Name')))));\n $locAttrs = data_entry_helper::getAttributes($attrArgs, false);\n\n $attrArgs = array(\n \t\t'valuetable' => 'sample_attribute_value',\n \t\t'attrtable' => 'sample_attribute',\n \t\t'key' => 'sample_id',\n \t\t'extraParams'=>$auth['read'],\n \t\t'survey_id'=>$args['survey_id'],\n \t\t'fieldprefix' => 'smpAttr',\n \t\t'sample_method_id'=>$args['sample_method_id']\n );\n $attrArgs['extraParams'] += array('query'=>json_encode(array('in'=>array('caption'=>array('Recorder Name')))));\n $smpAttrs = data_entry_helper::getAttributes($attrArgs, false);\n\n if(!count($locAttrs))\n throw new exception(lang::get('This form must be used with a \"Recorder Name\" tree location attribute.'));\n if(!count($smpAttrs))\n \tthrow new exception(lang::get('This form must be used with a \"Recorder Name\" sample attribute.'));\n\n data_entry_helper::$javascript .= \"indiciaData.assignedRecorderAttrID='\".$locAttrs[0]['attributeId'].\"';\\n\";\n data_entry_helper::$javascript .= \"indiciaData.recorderNameID='\".$smpAttrs[0]['id'].\"';\\n\";\n\n if($location_id){\n $r .= '<div class=\"page-notice ui-state-highlight ui-corner-all\">This visit is registered against the tree highlighted on the map. All fields followed by a red asterisk (<span class=\"deh-required\">*</span>) must be filled in. You can not modify any field that is greyed out.</div>';\n $locationRecord = data_entry_helper::get_population_data(array(\n 'table' => 'location',\n 'extraParams' => $auth['read'] + array('id' => $location_id, \"view\"=>\"detail\"),\n 'nocache' => true\n ));\n if(count($locationRecord)!=1)\n throw new exception(lang::get('Could not identify tree location : ID ').$location_id);\n\n if(count($locAttrs) && count($smpAttrs))\n data_entry_helper::$entity_to_load[$smpAttrs[0]['fieldname']] = $locAttrs[0]['default'];\n\n $parentLocationRecord = data_entry_helper::get_population_data(array(\n 'table' => 'location',\n 'extraParams' => $auth['read'] + array('id' => $locationRecord[0]['parent_id'], \"view\"=>\"detail\"),\n 'nocache' => true\n ));\n if(count($parentLocationRecord)!=1)\n throw new exception(lang::get('Could not identify site location : ID ').$locationRecord[0]['parent_id']);\n\n // TODO make sure user is allocated this tree, or if sample already exists, that they created this sample, or they are admin\n\n $registrationSampleRecord = data_entry_helper::get_population_data(array(\n 'table' => 'sample',\n 'extraParams' => $auth['read'] + array('location_id' => $locationRecord[0]['id'], \"view\"=>\"detail\", \"sample_method_id\"=>$args['reg_sample_method_id']),\n 'nocache' => true\n ));\n if(count($registrationSampleRecord)!=1)\n throw new exception(lang::get('Could not identify registration sample for tree location ID ').$locationRecord[0]['id']);\n\n $registrationOccurrenceRecord = data_entry_helper::get_population_data(array(\n 'table' => 'occurrence',\n 'extraParams' => $auth['read'] + array('sample_id' => $registrationSampleRecord[0]['id'], \"view\"=>\"detail\"),\n 'nocache' => true\n ));\n if(count($registrationOccurrenceRecord)!=1){\n throw new exception(lang::get('Could not identify registration occurrence for tree location ID ').$locationRecord[0]['id']);\n }\n\n if(self::$loadedSampleId)\n self::$treeOccurrenceRecord = data_entry_helper::get_population_data(array(\n 'table' => 'occurrence',\n 'extraParams' => $auth['read'] + array('sample_id' => self::$loadedSampleId, \"view\"=>\"detail\", 'taxa_taxon_list_id'=>$registrationOccurrenceRecord[0]['taxa_taxon_list_id']),\n 'nocache' => true\n )); // can handle this so no error check.\n else // need to set sref & system to match tree.\n data_entry_helper::$javascript .= \"\\n$('#imp-sref').val('\".$locationRecord[0]['centroid_sref'].\"');\\n\";\n\n $r .= data_entry_helper::text_input(array(\n 'label' => lang::get('Site'),\n 'fieldname' => 'dummy:site_name',\n 'class' => 'control-width-4 tree-details-readonly',\n 'default' => $parentLocationRecord[0][\"name\"],\n 'disabled' => ' readonly=\"readonly\"'\n )); // don't need a hidden control.\n $r .= data_entry_helper::text_input(array(\n 'label' => lang::get('Tree'),\n 'fieldname' => 'dummy:tree_name',\n 'class' => 'control-width-4 tree-details-readonly',\n 'default' => $locationRecord[0][\"name\"],\n 'disabled' => ' readonly=\"readonly\"'\n ));\n $r .= '<input name=\"sample:location_id\" type=\"hidden\" value=\"'.$location_id.'\" />';\n $r .= data_entry_helper::text_input(array(\n 'label' => lang::get('Tree Species'),\n 'fieldname' => 'dummy:tree_species',\n 'class' => 'control-width-4 tree-details-readonly',\n 'default' => $registrationOccurrenceRecord[0][\"taxon\"],\n \t\t'disabled' => ' readonly=\"readonly\"'\n ));\n if(self::$treeOccurrenceRecord && count(self::$treeOccurrenceRecord))\n $r .= '<input name=\"sc:tree:'.self::$treeOccurrenceRecord[0]['id'].':present\" type=\"hidden\" value=\"'.self::$treeOccurrenceRecord[0]['taxa_taxon_list_id'].'\" />';\n else\n $r .= '<input name=\"sc:tree::present\" type=\"hidden\" value=\"'.$registrationOccurrenceRecord[0]['taxa_taxon_list_id'].'\" />';\n if(self::$loadedSampleId)\n $systems = array(data_entry_helper::$entity_to_load['sample:entered_sref_system'] => data_entry_helper::$entity_to_load['sample:entered_sref_system']);\n else\n $systems = array($locationRecord[0]['centroid_sref_system'] => $locationRecord[0]['centroid_sref_system']);\n $r .= data_entry_helper::sref_and_system(array_merge(array(\n 'label' => lang::get('Tree Grid Ref'),\n 'systems' => $systems,\n 'disabled' => ' readonly=\"readonly\"',\n 'validation' => '',\n 'class' => 'control-width-4 tree-details-readonly'\n ), $options));\n data_entry_helper::$javascript .= \"\nmapInitialisationHooks.push(function (div) {\n 'use strict';\n $.getJSON(ParentLocationLayer.map.div.settings.indiciaSvc + 'index.php/services/data/location/'+\".$locationRecord[0]['parent_id'].\" +\n '?mode=json&view=detail' + ParentLocationLayer.map.div.settings.readAuth + '&callback=?', function(data) {\n if (typeof data.error!=='undefined') {\n alert(data.error);\n return;\n }\n if (data.length>0) {\n var geomwkt = data[0].boundary_geom || data[0].centroid_geom;\n var parser = new OpenLayers.Format.WKT();\n var feature = parser.read(geomwkt);\n ParentLocationLayer.addFeatures([feature]);\n // no zoom, but put in other trees at site - will add our name.\n $.getJSON(TreeListLayer.map.div.settings.indiciaSvc + 'index.php/services/data/location?parent_id='+data[0].id +\n '&mode=json&view=detail' + TreeListLayer.map.div.settings.readAuth + '&callback=?', function(tdata) {\n if (typeof tdata.error!=='undefined') {\n alert(tdata.error);\n return;\n }\n if (tdata.length>0) {\n for(var i=0; i<tdata.length; i++){\n var geomwkt = tdata[i].centroid_geom, feature;\n var parser = new OpenLayers.Format.WKT();\n var feature = parser.read(geomwkt);\n feature.attributes.name = tdata[i].name;\n TreeListLayer.addFeatures(feature);\n }}});\n }});\n if(div.map.editLayer.features.length>0) {\n var highlighter = new OpenLayers.Control.SelectFeature(div.map.editLayer, {highlightOnly: true});\n div.map.addControl(highlighter);\n highlighter.activate();\n highlighter.highlight(div.map.editLayer.features[0]);\n }\n});\";\n if(self::$loadedSampleId)\n data_entry_helper::$javascript .= \"\n$('[name=sample\\\\\\\\:date]').change(function(){ // sample exists so just check that no sample already taken on that date.\n $.getJSON(ParentLocationLayer.map.div.settings.indiciaSvc + 'index.php/services/data/sample?location_id='+\".$locationRecord[0]['id'].\" +\n '&sample_method_id=\".$args['sample_method_id'].\"&mode=json&view=detail' + ParentLocationLayer.map.div.settings.readAuth + '&callback=?', function(data) {\n if (typeof data.error!=='undefined') {\n alert(data.error);\n return;\n }\n var date = $('[name=sample\\\\\\\\:date]').val();\n date = date.split('/');\n for(var i = 0; i < data.length; i++){\n if(data[i][\\\"id\\\"] != \".self::$loadedSampleId.\" && data[i][\\\"date_start\\\"] == date[2]+'-'+date[1]+'-'+date[0]){\n alert(\\\"Warning: there is already a visit recorded for this tree on \\\"+data[i][\\\"date_start\\\"]);\n return;\n }}\n });\\n});\\n\";\n else\n data_entry_helper::$javascript .= \"\n$('[name=sample\\\\\\\\:date]').change(function(){\n $.getJSON(ParentLocationLayer.map.div.settings.indiciaSvc + 'index.php/services/data/sample?location_id='+\".$locationRecord[0]['id'].\" +\n \t\t'&sample_method_id=\".$args['sample_method_id'].\"&mode=json&view=detail&orderby=date_start' + ParentLocationLayer.map.div.settings.readAuth + '&callback=?', function(data) {\n if (typeof data.error!=='undefined') {\n alert(data.error);\n return;\n }\n var date = $('[name=sample\\\\\\\\:date]').val();\n date = date.split('/');\n for(var i = 0; i < data.length; i++){\n if(data[i][\\\"date_start\\\"] == date[2]+'-'+date[1]+'-'+date[0]) {\n alert(\\\"Warning: there is already a visit recorded for this tree on \\\"+data[i][\\\"date_start\\\"]);\n return;\n }\n }\n for(var i = 0; i < data.length; i++){\n sdate = data[i][\\\"date_start\\\"].split('-');\n if(sdate[0] > date[2] || (sdate[0] == date[2] && (sdate[1] > date[1] || (sdate[1] == date[1] && sdate[2] >= date[0])))) {\n alert(\\\"Warning: there is already a visit recorded for this tree after this date, on \\\"+data[i][\\\"date_start\\\"]);\n break;\n }\n }\n for(var i = data.length-1; i >=0; i--){\n sdate = data[i][\\\"date_start\\\"].split('-');\n if(sdate[0] < date[2] || (sdate[0] == date[2] && (sdate[1] < date[1] || (sdate[1] == date[1] && sdate[2] <= date[0])))) {\n if(confirm(\\\"There was a previously recorded visit for this tree prior to this date, on \\\"+data[i][\\\"date_start\\\"]+'. Do you wish to use the data from this earlier visit as a starting point? (This will not affect any previously recorded observations - it will just fill in this form with the data from your previous visit, excluding the field diary. You can then update the data with any changes for this visit.)')){\n // this is an initial save: all attributes have vanilla names.\n $('.scPresence').removeAttr('checked');\n var cells = $('.scOccAttrCell');\n $('#\".data_entry_helper::$validated_form_id.\"').find('label.error').remove();\n $('#\".data_entry_helper::$validated_form_id.\"').find('.error').removeClass('error');\n $('#\".data_entry_helper::$validated_form_id.\"').find('.inline-error').remove();\n $('#\".data_entry_helper::$validated_form_id.\"').find('.ui-state-error').removeClass('ui-state-error');\n cells.find('select').removeClass('required').val('').attr('disabled',true);\n cells.find('.deh-required').remove();\n $('[name^=sc\\\\\\\\:tree\\\\\\\\:\\\\\\\\:occAttr\\\\\\\\:]').val('');\n $.getJSON(ParentLocationLayer.map.div.settings.indiciaSvc + 'index.php/services/data/occurrence?sample_id='+data[i]['id'] +\n '&mode=json&view=detail' + ParentLocationLayer.map.div.settings.readAuth + '&callback=?', function(odata) {\n if (typeof odata.error!=='undefined') {\n alert(odata.error);\n return;\n }\n var occIDs = [];\n if(odata.length>0){\n for(var j = 0; j < odata.length; j++) {\n occIDs.push(odata[j].id);\n $('.scPresence[value='+odata[j].taxa_taxon_list_id+']').each(function(idx, elem){\n var cells = $(elem).attr('checked',true).closest('tr').find('.scOccAttrCell');\n cells.find('select').addClass('required').removeAttr('disabled');\n cells.append('<span class=\\\"deh-required\\\">*</span>');\n });\n }\n $.getJSON(ParentLocationLayer.map.div.settings.indiciaSvc + 'index.php/services/data/occurrence_attribute_value' +\n '?query={\\\"in\\\":{\\\"occurrence_id\\\":'+JSON.stringify(occIDs) +'}}' +\n '&mode=json&view=list' + ParentLocationLayer.map.div.settings.readAuth + '&callback=?', function(adata) {\n if (typeof adata.error!=='undefined') {\n alert(adata.error);\n return;\n }\n var x = adata;\n for(var k = 0; k < adata.length; k++){\n if(adata[k].id != null){\n for(var j = 0; j < odata.length; j++) {\n if(odata[j].id == adata[k].occurrence_id){\n $('.scPresence[value='+odata[j].taxa_taxon_list_id+']').closest('tr').find('[name$=\\\\\\\\:occAttr\\\\\\\\:'+adata[k]['occurrence_attribute_id']+']').val(adata[k]['raw_value']);\n $('[name=sc\\\\\\\\:tree\\\\\\\\:\\\\\\\\:occAttr\\\\\\\\:'+adata[k]['occurrence_attribute_id']+']').val(adata[k]['raw_value']);\n break;\n }}}}});\n }});\n }\n break;\n }}});\n});\n\\n\";\n return $r;\n }\n $r .= '<div class=\"page-notice ui-state-highlight ui-corner-all\">All fields followed by a red asterisk (<span class=\"deh-required\">*</span>) must be filled in. You can not modify any field that is greyed out.</div>';\n self::$treeOccurrenceRecord = false;\n if (isset($options['extraParams'])) {\n foreach ($options['extraParams'] as $key => &$value)\n $value = apply_user_replacements($value);\n $options['extraParams'] = array_merge($auth['read'], $options['extraParams']);\n } else\n $options['extraParams'] = array_merge($auth['read']);\n if (empty($options['reportProvidesOrderBy'])||$options['reportProvidesOrderBy']==0) {\n $options['extraParams']['orderby'] = 'name';\n }\n // Get list of sites alocated to me, using CMS User ID.\n $site_attributes = data_entry_helper::getAttributes(array(\n \t\t'valuetable' => 'location_attribute_value',\n \t\t'attrtable' => 'location_attribute',\n \t\t'key' => 'location_id',\n \t\t'extraParams'=>$auth['read'],\n \t\t'survey_id'=>$args['survey_id'],\n \t\t'location_type_id' => $options['location_type_id'],\n \t\t'fieldprefix' => 'locAttr'\n ));\n if (false==($cmsUserAttr = extract_cms_user_attr($site_attributes)))\n return 'This form is designed to be used with the \"CMS User ID\" attribute setup for Site locations in the survey.';\n $response = data_entry_helper::get_population_data(array(\n 'table' => 'location_attribute_value',\n 'extraParams' => $auth['read'] + array('view' => 'list', 'location_attribute_id'=>$cmsUserAttr['attributeId'], 'raw_value'=>$user->uid),\n 'nocache' => true\n ));\n if(count($response)==0)\n throw new exception(lang::get('You have no sites, so you can not enter any phenology observations. Please create a site and some trees first.'));\n $siteIDs = [];\n foreach($response as $loc) {\n $siteIDs[] = $loc['location_id'];\n }\n\n $location_list_args = array_merge(array(\n 'label'=>lang::get('Site'),\n 'view' => 'detail',\n 'fieldname' => 'location:parent_id',\n 'id' => 'imp-site-location',\n 'blankText'=>lang::get('Please select a site.'),\n 'validation' => 'required',\n 'nocache' => true\n ), $options);\n // $options already has the location_type_id set\n $location_list_args['extraParams']['id']=$siteIDs;\n $r .= data_entry_helper::location_select($location_list_args);\n\n $location_list_args = array_merge(array(\n 'label'=>lang::get('Tree'),\n 'view' => 'detail',\n 'blankText'=>lang::get('Please select a tree.'),\n 'validation' => 'required',\n 'nocache' => true\n ), $options);\n $location_list_args['extraParams']['id']=$siteIDs;\n $location_list_args['location_type_id'] = $options['tree_location_type_id'];\n $r .= data_entry_helper::location_select($location_list_args);\n\n $r .= data_entry_helper::text_input(array(\n 'label' => lang::get('Tree Species'),\n 'fieldname' => 'dummy:tree_species',\n 'class' => 'control-width-4 tree-details-readonly',\n 'disabled' => ' readonly=\"readonly\"',\n 'validation' => 'required',\n 'helpText' => lang::get('The following field is filled in automatically when you select a tree.')\n ));\n $r .= '<input name=\"sc:tree::present\" type=\"hidden\" value=\"\" />';\n $systems = array('4326' => lang::get(\"sref:4326\")); // this will be overwriten when the tree is loaded.\n $r .= data_entry_helper::sref_and_system(array_merge(array(\n 'label' => lang::get('Tree Grid Ref'),\n 'systems' => $systems,\n 'disabled' => ' readonly=\"readonly\"',\n 'validation' => '',\n 'class' => 'tree-details-readonly',\n 'helpText' => lang::get('The following field is filled in automatically when you select a tree.')\n ), $options));\n data_entry_helper::$javascript .= \"\n$('#imp-site-location').change(function() {\n $('#\".data_entry_helper::$validated_form_id.\"').find('label.error').remove();\n $('#\".data_entry_helper::$validated_form_id.\"').find('.error').removeClass('error');\n $('#\".data_entry_helper::$validated_form_id.\"').find('.inline-error').remove();\n $('#\".data_entry_helper::$validated_form_id.\"').find('.ui-state-error').removeClass('ui-state-error');\n ParentLocationLayer.destroyFeatures();\n TreeListLayer.destroyFeatures();\n var intValue = parseInt($(this).val());\n if (!isNaN(intValue)) {\n $(this).find('option[value=]').attr('disabled',true);\n // site list has been populated with correct location_type_ids.\n $.getJSON(ParentLocationLayer.map.div.settings.indiciaSvc + 'index.php/services/data/location/'+$(this).val() +\n '?mode=json&view=detail' + ParentLocationLayer.map.div.settings.readAuth + '&callback=?', function(data) {\n if (typeof data.error!=='undefined') {\n alert(data.error);\n return;\n }\n if (data.length>0) {\n var geomwkt = data[0].boundary_geom || data[0].centroid_geom;\n // assume single geometry - not a collection, and default style\n var parser = new OpenLayers.Format.WKT();\n var feature = parser.read(geomwkt);\n ParentLocationLayer.addFeatures([feature]);\n _zoomToExtent(feature.geometry.getBounds(), ParentLocationLayer);\n $('#imp-location option[value!=]').not(':selected').remove();\n $.getJSON(TreeListLayer.map.div.settings.indiciaSvc + 'index.php/services/data/location?parent_id='+data[0].id +\n '&mode=json&view=detail' + TreeListLayer.map.div.settings.readAuth + '&callback=?', function(tdata) {\n if (typeof tdata.error!=='undefined') {\n alert(tdata.error);\n return;\n }\n if (tdata.length>0) {\n var features = [], found=false;\n var bounds = ParentLocationLayer.features[0].geometry.getBounds();\n for(var i=0; i<tdata.length; i++){\n var geomwkt = tdata[i].centroid_geom, feature;\n var parser = new OpenLayers.Format.WKT();\n var feature = parser.read(geomwkt);\n feature.attributes.name = tdata[i].name;\n features.push(feature);\n bounds.extend(feature.geometry.getBounds());\n if($('#imp-location option[value='+tdata[i].id+']').length == 0)\n $('#imp-location').append('<option value=\\\"'+tdata[i].id+'\\\">'+tdata[i].name+'</option>');\n else found=true;\n }\n if(!found){ // currently selected tree no longer on this site. Deselect it.\n $(this).find('option[value=]').removeAttr('disabled');\n $('#imp-location option[value!=]:selected').remove();\n $('#imp-location,#imp-sref').val('');\n TreeListLayer.map.editLayer.destroyFeatures();\n $('[name=dummy\\\\\\\\:tree_species]').val('');\n }\n TreeListLayer.addFeatures(features);\n _zoomToExtent(bounds, ParentLocationLayer);\n }});\n }});\n}});\nmapLocationSelectedHooks.push(function(div, data){\n $('#\".data_entry_helper::$validated_form_id.\"').find('label.error').remove();\n $('#\".data_entry_helper::$validated_form_id.\"').find('.error').removeClass('error');\n $('#\".data_entry_helper::$validated_form_id.\"').find('.inline-error').remove();\n $('#\".data_entry_helper::$validated_form_id.\"').find('.ui-state-error').removeClass('ui-state-error');\n if($('#imp-site-location').val() != data[0].parent_id) {\n $('#imp-site-location').val(data[0].parent_id).change();\n $('#imp-site-location option[value=]').attr('disabled',true);\n }\n if(data[0].parent_id != ''){\n $('#imp-location option[value=]').attr('disabled',true);\n }\n $('#'+indiciaData.recorderNameID.replace(/:/g,'\\\\\\\\:')).val('');\n $.getJSON(ParentLocationLayer.map.div.settings.indiciaSvc + 'index.php/services/data/location_attribute_value?location_id='+data[0]['id'] +\n '&mode=json&view=list' + ParentLocationLayer.map.div.settings.readAuth + '&callback=?', function(data) {\n if(data instanceof Array && data.length>0){\n for (var i=0;i<data.length;i++){\n if (data[i]['location_attribute_id'] == indiciaData.assignedRecorderAttrID)\n $('#'+indiciaData.recorderNameID.replace(/:/g,'\\\\\\\\:')).val(data[i].raw_value);\n }\n }});\n // get registration sample and occurrence and fill in species.\n $.getJSON(ParentLocationLayer.map.div.settings.indiciaSvc + 'index.php/services/data/sample?location_id='+data[0]['id'] +\n '&sample_method_id=\".$args['reg_sample_method_id'].\"&mode=json&view=detail' + ParentLocationLayer.map.div.settings.readAuth + '&callback=?', function(data) {\n if (typeof data.error!=='undefined') {\n alert(data.error);\n return;\n }\n if(data.length){\n $.getJSON(ParentLocationLayer.map.div.settings.indiciaSvc + 'index.php/services/data/occurrence?sample_id='+data[0]['id'] +\n '&mode=json&view=detail' + ParentLocationLayer.map.div.settings.readAuth + '&callback=?', function(data) {\n if (typeof data.error!=='undefined') {\n alert(data.error);\n return;\n }\n if(data.length){\n $('[name=dummy\\\\\\\\:tree_species]').val(data[0].taxon);\n $('[name=sc\\\\\\\\:tree\\\\\\\\:\\\\\\\\:present]').val(data[0].taxa_taxon_list_id);\n }});\n }});\n});\n$('[name=sample\\\\\\\\:date]').change(function(){\n if($('#imp-location').val()=='') return;\n $.getJSON(ParentLocationLayer.map.div.settings.indiciaSvc + 'index.php/services/data/sample?location_id='+$('#imp-location').val() +\n \t\t'&sample_method_id=\".$args['sample_method_id'].\"&mode=json&view=detail&orderby=date_start' + ParentLocationLayer.map.div.settings.readAuth + '&callback=?', function(data) {\n if (typeof data.error!=='undefined') {\n alert(data.error);\n return;\n }\n var date = $('[name=sample\\\\\\\\:date]').val();\n date = date.split('/');\n for(var i = 0; i < data.length; i++){\n if(data[i][\\\"date_start\\\"] == date[2]+'-'+date[1]+'-'+date[0]) {\n alert(\\\"Warning: there is already a visit recorded for this tree on \\\"+data[i][\\\"date_start\\\"]);\n return;\n }\n }\n for(var i = 0; i < data.length; i++){\n sdate = data[i][\\\"date_start\\\"].split('-');\n if(sdate[0] > date[2] || (sdate[0] == date[2] && (sdate[1] > date[1] || (sdate[1] == date[1] && sdate[2] >= date[0])))) {\n alert(\\\"Warning: there is already a visit recorded for this tree after this date, on \\\"+data[i][\\\"date_start\\\"]);\n break;\n }\n }\n for(var i = data.length-1; i >=0; i--){\n sdate = data[i][\\\"date_start\\\"].split('-');\n if(sdate[0] < date[2] || (sdate[0] == date[2] && (sdate[1] < date[1] || (sdate[1] == date[1] && sdate[2] <= date[0])))) {\n if(confirm(\\\"There was a previously recorded visit for this tree prior to this date, on \\\"+data[i][\\\"date_start\\\"]+'. Do you wish to use the data from this earlier visit as a starting point? (This will not affect any previously recorded observations - it will just fill in this form with the data from your previous visit, excluding the field diary. You can then update the data with any changes for this visit.)')){\n // this is an initial save: all attributes have vanilla names.\n // TODO sample attributes\n $('.scPresence').removeAttr('checked');\n var cells = $('.scOccAttrCell');\n cells.find('select').removeClass('required').val('').attr('disabled',true);\n cells.find('.deh-required').remove();\n $('#\".data_entry_helper::$validated_form_id.\"').find('label.error').remove();\n $('#\".data_entry_helper::$validated_form_id.\"').find('.error').removeClass('error');\n $('#\".data_entry_helper::$validated_form_id.\"').find('.inline-error').remove();\n $('#\".data_entry_helper::$validated_form_id.\"').find('.ui-state-error').removeClass('ui-state-error');\n $('[name^=sc\\\\\\\\:tree\\\\\\\\:\\\\\\\\:occAttr\\\\\\\\:]').val('');\n $.getJSON(ParentLocationLayer.map.div.settings.indiciaSvc + 'index.php/services/data/occurrence?sample_id='+data[i]['id'] +\n '&mode=json&view=detail' + ParentLocationLayer.map.div.settings.readAuth + '&callback=?', function(odata) {\n if (typeof odata.error!=='undefined') {\n alert(odata.error);\n return;\n }\n var occIDs = [];\n if(odata.length>0){\n for(var j = 0; j < odata.length; j++) {\n occIDs.push(odata[j].id);\n $('.scPresence[value='+odata[j].taxa_taxon_list_id+']').each(function(idx, elem){\n var cells = $(elem).attr('checked',true).closest('tr').find('.scOccAttrCell');\n cells.find('select').addClass('required').removeAttr('disabled');\n cells.append('<span class=\\\"deh-required\\\">*</span>');\n });\n }\n $.getJSON(ParentLocationLayer.map.div.settings.indiciaSvc + 'index.php/services/data/occurrence_attribute_value' +\n '?query={\\\"in\\\":{\\\"occurrence_id\\\":'+JSON.stringify(occIDs) +'}}' +\n '&mode=json&view=list' + ParentLocationLayer.map.div.settings.readAuth + '&callback=?', function(adata) {\n if (typeof adata.error!=='undefined') {\n alert(adata.error);\n return;\n }\n var x = adata;\n for(var k = 0; k < adata.length; k++){\n if(adata[k].id != null){\n for(var j = 0; j < odata.length; j++) {\n if(odata[j].id == adata[k].occurrence_id){\n $('.scPresence[value='+odata[j].taxa_taxon_list_id+']').closest('tr').find('[name$=\\\\\\\\:occAttr\\\\\\\\:'+adata[k]['occurrence_attribute_id']+']').val(adata[k]['raw_value']);\n $('[name=sc\\\\\\\\:tree\\\\\\\\:\\\\\\\\:occAttr\\\\\\\\:'+adata[k]['occurrence_attribute_id']+']').val(adata[k]['raw_value']);\n break;\n }}}}});\n }});\n }\n break;\n }}});\n});\n\\n\";\n return $r;\n }", "title": "" }, { "docid": "3f60a50878b79ae1c36cc9852efc4092", "score": "0.592364", "text": "private function select() {\n\t\t$option_key = FORMLIFT_SETTINGS;\n\t\t$value = $this->form->get_form_setting( $this->id );\n\t\t$select = \"<select id='$this->id' name='{$option_key}[$this->id]' style='max-width:270px;'>\";\n\n\t\tforeach ( $this->values as $possible_value => $label ) {\n\t\t\tif ( $possible_value == $value ) {\n\t\t\t\t$select .= \"<option value='$possible_value' selected>$label</option>\";\n\t\t\t} else {\n\t\t\t\t$select .= \"<option value='$possible_value'>$label</option>\";\n\t\t\t}\n\t\t}\n\n\t\t$select .= \"</select>\";\n\n\t\treturn $select;\n\t}", "title": "" }, { "docid": "4b4db395f378c067691b5d07043fa354", "score": "0.5915382", "text": "function buildingSelect($dbc, $local){\r\n\r\n #Properly query into the database based on the location id\r\n $query = 'SELECT lid, name from location';\r\n\r\n #Store the results\r\n $results = mysqli_query($dbc, $query);\r\n\r\n #Will genereate a skeleton table for the page and will be popluated below\r\n echo '<select name=\"location\" id=\"location\">';\r\n echo '<option selected value=\"selected\">--Select--</option>';\r\n\r\n #This while loop will generate new rows as each input is given in the forms\r\n while( $row = mysqli_fetch_array( $results, MYSQLI_ASSOC )){\r\n if($local == $row){\r\n #Display the selected value\r\n echo '<option selected=\"selected\" value=\"'.$row['lid'].'\">\"'.$row['name'].'\"</option>\"';\r\n }\r\n else{\r\n echo '<option value=\"'.$row['lid'].'\">\"'.$row['name'].'\"</option>\"';\r\n }\r\n }\r\n\r\n #Finish the selection\r\n echo '</select>';\r\n }", "title": "" }, { "docid": "a124bb5cf644f023762d14e7afb36728", "score": "0.5905818", "text": "function append_option_format_positionInAuthority($value=NULL)\n{\n\t$options=array('Pastor', 'Member');\n\t$option=\"<option value='NULL'>--Select One--</option>\";\n\t$selected=\"\";\n\tfor($count=0;$count<sizeof($options);$count++)\n\t{\n\t\tif($value==$options[$count])\n\t\t{\n\t\t\t$selected=\"selected='selected'\";\n\t\t}\n\t\t$option=$option.\"<option value='\".$options[$count].\"' $selected>\".$options[$count].\"</option>\";\n\t\t$selected=\"\";\n\t}\n\treturn $option;\n}", "title": "" }, { "docid": "03ba94df869c4d538bc7d74f08e19a32", "score": "0.5895672", "text": "function getAddressHtmlSelect() {\n\t\t\t$helper = $this->getCustomerLocatorHelper( );\n\t\t\t$addressId = null;\n\t\t\t$select = $this->getLayout( )->createBlock( 'core/html_select' )->setName( 'address_id' )->setId( 'address_id' )->setTitle( $helper->__( 'Address' ) )->setClass( 'validate-select' )->setValue( $addressId )->setOptions( $this->getAddressesOptions( ) )->setExtraParams( 'onchange=\"customerAddressIdForm.submit();\"' );\n\t\t\treturn $select->getHtml( );\n\t\t}", "title": "" }, { "docid": "68a432e6f27ff3045f89d43e2dc99d33", "score": "0.5844531", "text": "public function testUpdateLocationOptions()\n {\n }", "title": "" }, { "docid": "bfdb692d7f41423e81b965af60758ab6", "score": "0.5822602", "text": "public function option()\n {\n $post_string = \"options_AUF72F23.html?agent=INV123456\";\n $station = WheelsService::services($post_string);\n }", "title": "" }, { "docid": "06f44805c8e22f223f5cc10cdec65fa7", "score": "0.5810865", "text": "public function getSelectedOptionsUrl(): string\n {\n $view = new View($this->getAttributeKey());\n return $view->action('select_autocomplete_values');\n }", "title": "" }, { "docid": "591fedb0ce44cc541994d664e6b65378", "score": "0.5778898", "text": "function value_form(&$form, &$form_state) {\n $options = location_get_iso3166_list();\n $form['value'] = array(\n '#type' => 'select',\n '#title' => t('Country'),\n '#default_value' => $this->value,\n '#options' => $options,\n // Used by province autocompletion js.\n '#attributes' => array('class' => 'location_auto_country'),\n '#multiple' => TRUE, // views will change this as necessary when exposed.\n );\n\n // Let location_autocomplete.js find the correct fields to attach.\n $form['value']['#attributes']['class'] .= ' location_auto_join_'. $this->options['expose']['identifier'];\n }", "title": "" }, { "docid": "717c4923259fe61cdd1edfbd6ec14be6", "score": "0.5751732", "text": "public function getOptionOrigin()\n {\n return $this->options->getOrigin();\n }", "title": "" }, { "docid": "e32a2f1c0580e047483798c50471e90d", "score": "0.57113516", "text": "function display_form($all_locations, $form_element_name, $selected_id = FALSE, $display_no_parent = TRUE, $onchange = FALSE){\n\n if(count($all_locations) == 0) {\n return \"<p>No locations</p>\";\n }\n \n // Start the <select>\n $return = \"<select name=\\\"$form_element_name\\\" id=\\\"parent\\\"\";\n if ($onchange) {\n $return .= \" onchange=\\\"$onchange\\\"\";\n } \n \n $return .= \">\\n\";\n \n if($display_no_parent){\n $return .= \"<option value=\\\"0\\\">\" . $display_no_parent . \"</option>\\n\";\n }\n \n // Loop through locations\n foreach($all_locations as $location){\n \n // Define padding variable\n $padding = \"\";\n \n // Start the <option>\n $return .= \"\\t<option value=\\\"\" . $location['location_id'] . '\"';\n if ($location['location_id'] == $selected_id) {\n $return .= ' selected=\"selected\"';\n }\n $return .= \">\";\n \n // Creates padding with a width of 2 x the location type if this isn't a base element\n if ($location['loc_type'] != 1) {\n $return .= str_pad($padding, $location['loc_type'] * 2, \"-\", STR_PAD_LEFT);\n }\n \n // Output the location name and finish the <option>\n $return .= \" \" . $location['loc_name'] . \"</option>\\n\";\n\n }\n \n // Close the <select> and return\n return $return . \"</select>\\n\";\n}", "title": "" }, { "docid": "9742278cc5e6a71a98ca734e97c5a6e9", "score": "0.56860596", "text": "public function getSelectedOptions() {\n\t\t$page = Page::getCurrentPage();\n\t\t$pageID = $page->getCollectionID();\n\t\t$ak = $this->getAttributeKey()->getAttributeKeyID();\n\t\t\n\t\t$db = Loader::db();\n\t\t$rows = $db->GetAll(\n\t\t\t\"SELECT atio.tour_id, atio.tour_name from atTourInfoOptionsSelected atios\n\t\t\tINNER JOIN atTourInfoOptions atio ON atios.atTourInfoOptionID = atio.tour_id\n\t\t\tINNER JOIN AttributeKeys ak ON atio.akID = ak.akID\n\t\t\tWHERE ctID = ? AND ak.akID = ?\", \n\t\t\tarray($pageID, $ak)\n\t\t);\n\t\t\n\t\treturn $rows[0]['tour_name'];\t\t\n\t}", "title": "" }, { "docid": "da6229d9b994d9a16eb8a7ad61c2957a", "score": "0.5656621", "text": "function get_country() {\n $options = get_option( 'custom_theme_option' );?>\n <label>Choose any Country: </label>\n <select name=\"custom_theme_option[country_id]\" >\n <option value=\"India\" <?php selected( $options['country_id'], 'India' ); ?>>India</option>\n <option value=\"China\" <?php selected( $options['country_id'], 'India' ); ?>>China</option>\n <option value=\"USA\" <?php selected( $options['country_id'], 'USA' ); ?>>USA</option>\n <option value=\"UK\" <?php selected( $options['country_id'], 'UK' ); ?>>UK</option>\n <option value=\"UAE\" <?php selected( $options['country_id'], 'UAE' ); ?>>UAE</option>\n <option value=\"France\" <?php selected( $options['country_id'], 'France' ); ?>>France</option>\n </select>\n <?php\n}", "title": "" }, { "docid": "bf7338b3eaf7e191bd4e04e29459d6f9", "score": "0.5651177", "text": "public function stores_select()\n\t{\n\t\t$optionsNum = 0;\n\t\t\n\t\t$html_select = '[Dep&oacute;sito:\n\t\t\t\t\t\t<select id=\"selectPlaceStore\" name=\"selectPlaceStore\">';\n\t\t\n\t\t$data_array = $_SESSION['alowedStores'];\n\t\t\n\t\tforeach($data_array as $id => $val)\n\t\t{\n\t\t\t$selected = '';\n\t\t\tif($id == $_SESSION[\"idStore\"])\n\t\t\t\t$selected = 'selected = \"selected\"';\n\t\t\t\n\t\t\t$html_select .= \"<option value='$id-$val' $selected >$val</option>\";\n\t\t\t\n\t\t\t$optionsNum++;\n\t\t}\n\t\t\n\t\t$html_select .= '</select>]';\n\t\t\n\t\tif($optionsNum > 1)\n\t\t\techo $html_select;\n\t\telse\n\t\t\techo '';\n\t}", "title": "" }, { "docid": "5c4aad98d2d6132719d31121ef228a77", "score": "0.5635629", "text": "public function getFormatedSelect(){\n $tabelki = $this->getFormatedNames();\n $return = \"<label for='tabelaWybor'>Wybierz Tabelę do Edycji:</label><select class='form-control' id='tabelaWybor' onchange=\\\"if (this.selectedIndex > 0) $('form[name=admin-tabela]').submit();\\\" name='tabelaWybor'>\";\n $return .= \"<option value='-1'>-</option>\";\n foreach($tabelki as $key=>$value){\n $return .= $value;\n }\n $return .= \"</select>\";\n return $return;\n }", "title": "" }, { "docid": "7a9826a83c512642e0e59c97901a3665", "score": "0.5614571", "text": "function get_location_select_list_options($rest_id, $rest_name) {\n $db = new db_connection; //init database connection obj.\n $link = $db->dblink(); //get copy of connected mysqli object.\n \n //filter and escape input\n $id = $link->real_escape_string(filter_var($rest_id, FILTER_SANITIZE_STRING)); \n $name = $link->real_escape_string(filter_var($rest_name, FILTER_SANITIZE_STRING));\n \n //prepare and execute sql statement\n $stmt = $link->prepare(\"SELECT location_id, CONCAT(street_addr, ' ', city, ', ', subdivision_code, ' ', zip) FROM location WHERE restaurant_id = ? AND name = ?\");\n $stmt->bind_param('is',$id, $name);\n $stmt->execute();\n $qresult = $stmt->get_result();\n \n $s0 = \"<option value=\\\"\";\n $s1 = \"\\\">\";\n $s2 = \"</option>\";\n $options = \"\";\n \n while($row = $qresult->fetch_array(MYSQLI_NUM)) {\n $options .= $s0 . $row[0] . $s1 . $row[1] . $s2;\n }\n return $options; \n}", "title": "" }, { "docid": "f8c5dbe055aeac105716974268cef48b", "score": "0.5591818", "text": "function wcip_show_vat_form_element(){\n ?>\n <select>\n <option value=\"volvo\">Volvo</option>\n <option value=\"saab\">Saab</option>\n <option value=\"mercedes\">Mercedes</option>\n <option value=\"audi\">Audi</option>\n </select>\n <?php\n }", "title": "" }, { "docid": "4fbf80684b304db201269ed9a90eb4ed", "score": "0.5561705", "text": "public static function LocationOptions()\n\t{\n\t\t// Build the active state filter options.\n\t\t$options = array();\n $options[] = Html::select('option', '0', 'JSITE');\n\t\t$options[] = Html::select('option', '1', 'JADMINISTRATOR');\n\n\t\treturn $options;\n\t}", "title": "" }, { "docid": "839d7331f0dd866678994bf9d7434c6d", "score": "0.55535567", "text": "public function LoadOptions($loc='general') {\n\t\t$option = mysqli_query($this->dbCon,\"SELECT * FROM gnet_options WHERE loc='$loc'\");\n\t\treturn $option;\n\t}", "title": "" }, { "docid": "f3f82d78f2a93d532d4b218316956901", "score": "0.5537317", "text": "public function makeSelect(){\n echo \"<select name=\\\"\" .$this->getName(). \"\\\"><br>\";\n $this->makeOptions($this->getValue());\n echo \"</select>\" ;\n }", "title": "" }, { "docid": "ba96e4c6a28d9437f1705f314721f6f7", "score": "0.5534054", "text": "abstract protected function getSelectPart(): string;", "title": "" }, { "docid": "f9cbf0780c4192d7c4e96a7cbe18054a", "score": "0.5520694", "text": "function webseo24h_tie_get_countries_options($current)\n{\n $countries = webseo24h_tie_get_countries();\n foreach ($countries as $key => $value) \n {\n if($current==$value)\n {\n ?>\n <option selected=\"selected\" value=\"<?php echo $value;?>\"><?php echo $value;?></option>\n <?php \n }\n else \n {\n ?>\n <option value=\"<?php echo $value;?>\"><?php echo $value;?></option>\n <?php\n }\n }\n}", "title": "" }, { "docid": "2392cea1a2b0127a846d1a711bf34fff", "score": "0.5500659", "text": "public function findSelect($location)\n {\n return $this->findElement($location, Select::className());\n }", "title": "" }, { "docid": "0a45d4cd7998b75d014c32c9c5e66478", "score": "0.54565376", "text": "function selectoption($select_name, $table, $condition, $orderby, $limit, $field, $filedselected, $onlclick) {\r\n $result = $this->query($this->select_table($table, $condition, $orderby, $limit));\r\n $option = \"\";\r\n if ($this->numRows($result) > 0) {\r\n $select = \"selected\";\r\n $option .=\"<select name='\" . $select_name . \"' $onlclick>\";\r\n $option .=\"<option value='0' $filedselected ==''?$select:''><--Choose--></option>\";\r\n while ($row = $this->fetchAssoc($result)) {\r\n $selected = ($filedselected == $row[$field[0]]) ? $select : \"\";\r\n $option .=\"<option value='\" . $row[$field[0]] . \"' $selected >\" . $this->sub_string($row[$field[1]], 0, 30) . \"</option>\";\r\n }\r\n }\r\n $option .=\"</select>\";\r\n return $option;\r\n }", "title": "" }, { "docid": "26a2057e336ef35b20ad75e1a2faa256", "score": "0.5453212", "text": "function billing_facility($name, $select)\n{\n global $facilityService;\n\n $fres = $facilityService->getAllBillingLocations();\n echo \" <select id='\" . htmlspecialchars($name, ENT_QUOTES) . \"' class='form-control' name='\" . htmlspecialchars($name, ENT_QUOTES) . \"'>\";\n foreach ($fres as $facrow) {\n $selected = ( $facrow['id'] == $select ) ? 'selected=\"selected\"' : '' ;\n echo \"<option value=\" . htmlspecialchars($facrow['id'], ENT_QUOTES) . \" $selected>\" . htmlspecialchars($facrow['name'], ENT_QUOTES) . \"</option>\";\n }\n\n echo \"</select>\";\n}", "title": "" }, { "docid": "6014cf095fc4a33a29972f3a1568b431", "score": "0.5452856", "text": "function Select_RealmFromRegisterMap($idname='',$option_selected=0,$selchangeaction=''){\r\n\tglobal $usertoken,$dbi;\r\n\t$resx=sql_query('select V.id,V.vname from tregistermap R, tverband V WHERE R.verband_id=V.id and R.user_id='.$usertoken['id'],$dbi);\r\n\t$strret='<select id=\\''.$idname.'\\' name=\\''.$idname.'\\' onchange=\\''.$selchangeaction.'\\' size=\\'1\\'>';\r\n\twhile (list($vid,$vname)=sql_fetch_row($resx,$dbi)) {\r\n\tif ($option_selected == $vid) {\r\n\t\t\t$strret=$strret.'<option value=\\''.$vid.'\\' selected=\\'selected\\'>'.$vname.'</option>';\r\n\t\t} else {\r\n\t\t\t$strret=$strret.'<option value=\\''.$vid.'\\'>'.$vname.'</option>';\r\n\t\t}\r\n\t}\r\n\treturn $strret.'</select>';\r\n}", "title": "" }, { "docid": "e8924929052ea21adc9a4da598819d10", "score": "0.5438002", "text": "public function getOption($option) {}", "title": "" }, { "docid": "7f87bb3ad4c370c714b1afcfd898abc3", "score": "0.543524", "text": "function snax_admin_setting_show_origin() {\n\t$origin = snax_show_origin();\n\t?>\n\n\t<select name=\"snax_show_origin\" id=\"snax_show_origin\">\n\t\t<option value=\"standard\" <?php selected( $origin, true ) ?>><?php esc_html_e( 'yes', 'snax' ) ?></option>\n\t\t<option value=\"none\" <?php selected( $origin, false ) ?>><?php esc_html_e( 'no', 'snax' ) ?></option>\n\t</select>\n\t<?php\n}", "title": "" }, { "docid": "3eeef44ca222513ddf93375db82a02f7", "score": "0.5430294", "text": "function generaSelect2() {\n // Voy imprimiendo el primer select compuesto por los paises\n echo \"<select name='IdAreaDestino' id='IdAreaDestino'>\";\n echo \"<option value='0'>[Seleccione Area Destino...]</option>\";\n echo \"</select>\";\n }", "title": "" }, { "docid": "33757e5aacb7305cebba5c948945b633", "score": "0.5423506", "text": "public function selectDefaultLocAction()\n\t{\n\t\t$user = $this->get('security.context')->getToken()->getUser();\n\t\t$em = $this->getDoctrine()->getEntityManager();\n\t\t\n\t\t$form = $this->createForm(new SelectDefaultLocForm(), $user);\n\t\t$request = $this->getRequest();\n\t\tif ($request->getMethod() == 'POST') {\n\t\t\t $paramArray = $request->request->all();\n\t\t\t $locId = $paramArray['selectDefaultLoc']['defaultLocation'];\n\t\t\t $loc = $em->getRepository('ZSIZizenBundle:Location')->findOneBy(array('location_id' => $locId));\n\t\t\t $default = $user->getDefaultLocation();\n\t\t\t if(isset($default))\n\t\t\t\t$user->unsetDeaultLocation();\n\t\t\t $user->setDefaultLocation($loc);\n\t\t\t $em->persist($loc);\n\t\t\t $em->flush();\n\t\t\t return $this->redirect($this->generateUrl('ZSIZizenBundle_showLocations'));\n\t\t}\n\t\treturn $this->render('ZSIZizenBundle:Form:selectDefaultLocForm.html.twig',array('form' => $form->createView()));\t\t\t\n\t}", "title": "" }, { "docid": "eae8e2788661eeefbd5d430f2ba7018c", "score": "0.5423362", "text": "function generaSelect() { //creacioon de combo para las Regiones\n $conexion = new conexion;\n $conexion->conectar();\n $consulta = pg_query(\"select * \n from mnt_areafarmacia \n inner join mnt_areafarmaciaxestablecimiento mafe\n on mafe.IdArea=mnt_areafarmacia.Id\n \n where mafe.IdArea <> 7 and mafe.IdArea <> 12 and mafe.Habilitado='S'\n and mafe.IdEstablecimiento=\".$_SESSION[\"IdEstablecimiento\"].\" \n and mafe.IdModalidad=\".$_SESSION[\"IdModalidad\"]);\n $conexion->desconectar();\n // Voy imprimiendo el primer select compuesto por los paises\n echo \"<select name='IdArea' id='IdArea'>\";\n echo \"<option value='0'>[Seleccione Farmacia...]</option>\";\n while ($registro = pg_fetch_row($consulta)) {\n if ($registro[1] != \"--\") {\n echo \"<option value='\" . $registro[0] . \"'>\" . $registro[1] . \"</option>\";\n }\n }\n echo \"</select>\";\n }", "title": "" }, { "docid": "23d5c712d0f3c64239b6ce8749b126a1", "score": "0.5407086", "text": "function get_us_state_select_options() {\n $s0 = \"<option value=\\\"\";\n $s1 = \"\\\">\";\n $s2 = \"</option>\";\n $options = \"\";\n $db = new db_connection; //init database connection obj.\n $link = $db->dblink(); //get copy of connected mysqli object.\n if(!$q = $link->query(\"SELECT subdivision_code, description FROM geolocations WHERE country_code = 'US';\")) { //query database for united states ISO state codes\n echo \"<p>Geolocation query failed</p>\";\n return \"\";\n } \n while($row = $q->fetch_array(MYSQLI_NUM)) { //loop through query result appending each row as an html select list option.\n $options .= $s0 . $row[0] . $s1 . $row[1] . $s2;\n }\n return $options;\n}", "title": "" }, { "docid": "3799381679b490b5d7faa205a8175083", "score": "0.53985435", "text": "function gettimezone_combo($sel='')\n{\n\t$tzlist = DateTimeZone::listIdentifiers(DateTimeZone::ALL);\n\tif(!empty($tzlist)){\n\t\t$tzlistcombo = '<select name=\"selecttime_zone\" id=\"selecttime_zone\">';\n\t\tforeach($tzlist as $key=>$val){\n\t\t\t//echo $val.'<br>';\n\t\t\tif($sel == $val){\n\t\t\t\t$tzlistcombo .= '<option value=\"'.$val.'\" selected = \"selected\" >'.$val.'</option>';\n\t\t\t}else{\n\t\t\t\t$tzlistcombo .= '<option value=\"'.$val.'\">'.$val.'</option>';\n\t\t\t}\n\t\t}\n\t\t$tzlistcombo .= '</select>';\n\t}else{\n\t\t$tzlistcombo = '';\n\t}\n\treturn $tzlistcombo;\n}", "title": "" }, { "docid": "22b51d388b9ae3d03a3523d5190a910f", "score": "0.5384232", "text": "public function get_cust_addr_options()\n\t{\t\n\t\t// Customer id\n\t\t$cust_id = $this->input->get('custid'); \n\n\t\t// Customer address html options\n\t\t$cust_addr_options = '<option value>Select address...</option>';\n\n\t\t// Query to get customer address\n\t\t$result = $this->customers_model->get_cust_addr($cust_id); \n\n\t\t// Check empty query response\n\t\tif(!empty($result))\n\t\t{\t\n\t\t\tforeach($result as $row)\n\t\t\t{ \n\t\t\t\t// Format customer address \n\t\t\t\t$cust_addr = \"[\".$row->cust_addr_id.\"] \"; \n\t\t\t\t$cust_addr .= $row->cust_addr_1.\", \"; \n\t\t\t\tif($row->cust_addr_2 != \"\") $cust_addr .= $row->cust_addr_2.\", \"; \t\n\t\t\t\t$cust_addr .= $row->cust_city.\", \";\n\t\t\t\t$cust_addr .= $row->cust_state.\" \";\n\t\t\t\t$cust_addr .= $row->cust_postal_code.\", \";\n\t\t\t\t$cust_addr .= $row->cust_country;\n\n\t\t\t\t$cust_addr_options .= '<option value=\"'.$row->cust_addr_id.'\">'.$cust_addr.'</option>';\n\t\t\t}\t\n\t\t}\n\t\t\n\t\techo $cust_addr_options;\n\t}", "title": "" }, { "docid": "5a833f78d9339cd4ed6ef7865bc7354b", "score": "0.5383839", "text": "function asc_form_option( $option ) {\n $res = asc_get_option( $option );\n echo $res[$option] ;\n }", "title": "" }, { "docid": "0032969cc6972459cc554c47b9790056", "score": "0.53805375", "text": "function get_poi_dropdown()\n {\n global $conn;\n\n $sql = 'SELECT * FROM qp_poi ORDER BY lastName';\n //use a prepared statement to enhance security\n $statement = $conn->prepare($sql);\n $statement->execute();\n $result = $statement->fetchAll();\n $statement->closeCursor();\n return $result;\n }", "title": "" }, { "docid": "cb88ba3e89f491f63b8cb498140fc059", "score": "0.53799313", "text": "function cf_select_estados_br( $selected = false ) {\n\t$estados = cf_estados_br(); ?>\n\t<div class=\"select-wrapper\">\n\t\t<select name=\"uf\" id=\"uf\" class=\"uf\">\n\t\t\t<option value=\"\"><?php _e( 'Selecione uma opção…', 'cf' ); ?></option>\n\t\t\t<?php foreach ( $estados as $k => $v) : ?>\n\t\t\t\t<option value=\"<?php echo $k; ?>\" <?php echo ( $selected == $k ) ? 'selected=\"selected\"' : '' ?>><?php echo $v; ?></option>\n\t\t\t<?php endforeach; ?>\n\t\t</select>\n\t</div>\n\t<!-- /.select-wrapper -->\n\t<?php\n}", "title": "" }, { "docid": "8a76b65c1d78b0a08dcf2a4257618224", "score": "0.5377288", "text": "public function select()\n {\n $this->setLayoutHeader('AdminLTE 2 | Two Side Select');\n $this->setBreadcrumb(array(\n array(\n 'href' => '#',\n 'title' => 'Home',\n 'fa-icon' => 'dashboard'\n ),\n array(\n 'href' => '#',\n 'title' => 'Example'\n ),\n array(\n 'active' => true,\n 'title' => 'Select'\n )\n ));\n $this->setLayoutOptions(self::FIXED_LAYOUT | self::CONTROL_SIDEBAR);\n $this->Flash->info('Select Example.', array(\n 'plugin' => 'AdminLTE',\n 'params' => array(\n 'header' => 'Tip!'\n )\n ));\n }", "title": "" }, { "docid": "cbfe30a9f9d4e5c37079dbd9ff3fd143", "score": "0.53624016", "text": "public function get_Option()\n {\n return \"<option value='\" . $this->id . \"'>\" . $this->name . \"</option>\";\n }", "title": "" }, { "docid": "980f5826c4854ad8ebb36a5d76aae47a", "score": "0.5353172", "text": "function creditcard_country_pulldown($countryid, $slng = 'eng', $fieldname = 'form[countryid]')\r\n {\r\n global $ilance, $myapi, $ilconfig, $phrase;\r\n \r\n $html = '<select name=\"' . $fieldname . '\" style=\"font-family: Verdana\">';\r\n \r\n $sql = $ilance->db->query(\"\r\n SELECT locationid, location_$slng AS location\r\n FROM \" . DB_PREFIX . \"locations\r\n \", 0, null, __FILE__, __LINE__);\r\n if ($ilance->db->num_rows($sql) > 0)\r\n {\r\n while ($res = $ilance->db->fetch_array($sql))\r\n {\r\n $html .= '<option value=\"' . $res['locationid'] . '\"';\r\n if ($res['locationid'] == $countryid)\r\n {\r\n $html .= 'selected=\"selected\"';\r\n }\r\n $html .= '>' . ucwords(stripslashes($res['location'])) . '</option>';\r\n }\r\n }\r\n \r\n $html .= '</select>';\r\n \r\n return $html;\r\n }", "title": "" }, { "docid": "643eb667add2ab1ca8f83a4c2c42c4cb", "score": "0.5340214", "text": "public function getOption($option);", "title": "" }, { "docid": "643eb667add2ab1ca8f83a4c2c42c4cb", "score": "0.5340214", "text": "public function getOption($option);", "title": "" }, { "docid": "fff2c0173e11eac16f91b55eb03e9333", "score": "0.53363067", "text": "private function _getFormSuggestOptions()\n {\n $suggests = $this->_helper->db->getTable('LcSuggest')->getSuggestEndpoints();\n $options = array('' => __('Select Below'));\n foreach ($suggests as $suggestEndpoint => $suggest) {\n if ('http://id.loc.gov/suggest' == $suggestEndpoint) {\n $options[$suggestEndpoint] = __($suggest['name']);\n } else {\n $optGroup = preg_match('#^http://id\\.loc\\.gov/vocabulary#', $suggestEndpoint) ? __('Vocabularies'): __('Authorities');\n $options[$optGroup][$suggestEndpoint] = __($suggest['name']);\n }\n }\n return $options;\n }", "title": "" }, { "docid": "775d90e77ef4748986824474cfaefd03", "score": "0.5322517", "text": "public function selectdropdowndestino(){\n $this->loginFilterbyRole('passageiro');\n $selection = Post::get('iddestino');\n $date = date('Y-m-d', time());\n $airport = Airports::all();\n if($selection == 0){\n $layover = Layover::all(array('conditions' => array('dateend >= ?', $date) ,'order' => 'dateorigin asc'));\n }\n else{\n $layover = Layover::all(array('conditions' => array('idaeroportodestino = ? and dateend >= ?', $selection, $date) ,'order' => 'dateorigin asc'));\n }\n return View::make('passageiro.voos', ['layover' => $layover, 'airport' => $airport]);\n }", "title": "" }, { "docid": "23a2da7d9d5ad3300c2d7465a5d5eb92", "score": "0.5299558", "text": "function fortyforty_option_dropdown( $optionName, $listOptions ) {\n \n $pluginOptions = get_option( FortyForty::PLUGIN_OPTION_SET ); ?>\n \n <select size=\"1\" id=\"fortyforty_option_<?php echo $optionName; ?>\"\n name=\"<?php printf( \"%s[%s]\", FortyForty::PLUGIN_OPTION_SET, $optionName ); ?>\">\n <?php\n foreach ( $listOptions as $option ) { ?>\n <option value=\"<?php echo $option[ 'id' ]; ?>\" <?php\n if ( $option[ 'id' ] == $pluginOptions[ $optionName ] ) echo 'selected=\"selected\"';\n ?>><?php echo $option[ 'value' ]; ?></option><?php\n }\n ?>\n </select><?php\n}", "title": "" }, { "docid": "d6d320ed5da8d0bd11b40d3675937bb4", "score": "0.52901787", "text": "function importer_list($plugin=NULL){\n global $con;\n $results = $con->retrieveData('systems', 'name');\n ?><select name=\"system\" class=\"system\">\n <option>Select an Importer</option><?php \n foreach($results as $field => $val){ ?>\n <option <?php if($plugin == $val['name']){ echo 'selected'; }?>> <?php echo $val['name']; ?></option>\n\n <?php } ?>\n </select><?php \n}", "title": "" }, { "docid": "a7cac1ce5f33fda3dad13c372cc826cd", "score": "0.52647364", "text": "function optionField($value='',$label='',$selected=false){\n\treturn '<option value=\"'. $value .'\" '. ($selected ? 'selected = \"selected\"' : '') .'>'. $label .'</option>';\n}", "title": "" }, { "docid": "d1e9c4850324bb64edbaa276e42e6380", "score": "0.5254806", "text": "function fortyforty_option_language() {\n fortyforty_option_dropdown( FortyForty::LANGUAGE, FortyForty::GetOptionList( '/List/Language', 'language' ) );\n}", "title": "" }, { "docid": "7ee363072cc806f88a15d0be41bc831e", "score": "0.5253044", "text": "function save_options($field, $group)\n {\n $field['select_values'] = get_post_value('select-values');\n return $field;\n }", "title": "" }, { "docid": "8876777425798b81fada4fe7409be08b", "score": "0.5251442", "text": "public static function splash_location_select($auth, $args, $tabAlias, $options) {\r\n if (empty($options['coreSquareLocationTypeId'])) {\r\n drupal_set_message('Please fill in the @coreSquareLocationTypeId option for the splash_location_select control');\r\n return '';\r\n }\r\n if (empty($options['additionalSquareLocationTypeId'])) {\r\n drupal_set_message('Please fill in the @additionalSquareLocationTypeId option for the splash_location_select control');\r\n return '';\r\n }\r\n if (empty($options['viceCountyLocationAttributeId'])) {\r\n drupal_set_message('Please fill in the @viceCountyLocationAttributeId option for the splash_location_select control');\r\n return '';\r\n }\r\n if (empty($options['noViceCountyFoundMessage'])) {\r\n drupal_set_message('Please fill in the @noViceCountyFoundMessage option for the splash_location_select control');\r\n return '';\r\n }\r\n $coreSquareLocationTypeId=$options['coreSquareLocationTypeId'];\r\n $additionalSquareLocationTypeId=$options['additionalSquareLocationTypeId'];\r\n $currentUserId=hostsite_get_user_field('indicia_user_id');\r\n $viceCountyLocationAttributeId=$options['viceCountyLocationAttributeId'];\r\n $noViceCountyFoundMessage=$options['noViceCountyFoundMessage'];\r\n $userSquareAttrId=$options['userSquareAttrId'];\r\n $reportOptions = array(\r\n 'dataSource'=>'projects/npms/original_splash_site_only/get_my_squares_that_have_plots',\r\n 'readAuth'=>$auth['read'],\r\n 'mode'=>'report',\r\n 'extraParams' => array('core_square_location_type_id'=>$coreSquareLocationTypeId,\r\n 'additional_square_location_type_id'=>$additionalSquareLocationTypeId,\r\n 'current_user_id'=>$currentUserId,\r\n 'vice_county_location_attribute_id'=>$viceCountyLocationAttributeId,\r\n 'no_vice_county_found_message'=>$noViceCountyFoundMessage)\r\n );\r\n $rawData = data_entry_helper::get_report_data($reportOptions);\r\n if (empty($rawData)) {\r\n //If the user doesn't have any plots, then hide the map and disable the Spatial Ref field so they can't continue\r\n drupal_set_message('Note: You have not been allocated any squares to input data for, or the squares you have been allocated do not have plots.');\r\n drupal_set_message('You cannot enter data without having a plot to select.');\r\n data_entry_helper::$javascript .= \"$('#map').hide();\";\r\n data_entry_helper::$javascript .= \"$('#imp-sref').attr('disabled','disabled');\";\r\n return '<b>You have not been allocated any Squares that contain plots</b></br>';\r\n } else {\r\n //Convert the raw data in the report into array format suitable for the Select drop-down to user (an array of ID=>Name pairs)\r\n foreach($rawData as $rawRow) {\r\n $squaresData[$rawRow['id']]=$rawRow['name']; \r\n }\r\n //Need a report to collect the square to default the Location Select to in edit mode, as this is not stored against the sample directly.\r\n if (!empty($_GET['sample_id'])) {\r\n $squareData = data_entry_helper::get_report_data(array(\r\n 'dataSource'=>'projects/npms/get_square_for_sample',\r\n 'readAuth'=>$auth['read'],\r\n 'extraParams'=>array('sample_id'=>$_GET['sample_id'])\r\n ));\r\n $defaultSquareSelection=$squareData[0]['id'];\r\n } else {\r\n $defaultSquareSelection='';\r\n }\r\n $r = data_entry_helper::select(array(\r\n 'id' => 'squares-select-list',\r\n 'blankText'=>'<Please select>',\r\n 'fieldname'=> 'squares-select-list',\r\n 'label' => lang::get('Select a Square'),\r\n 'helpText' => lang::get('Select a square to input data for before selecting a plot.'),\r\n 'lookupValues' => $squaresData, \r\n 'default' => $defaultSquareSelection\r\n ));\r\n //This code is same as standard lookup control\r\n if (isset($options['extraParams'])) {\r\n foreach ($options['extraParams'] as $key => &$value)\r\n $value = apply_user_replacements($value);\r\n $options['extraParams'] = array_merge($auth['read'], $options['extraParams']);\r\n } else \r\n $options['extraParams'] = array_merge($auth['read']);\r\n if (empty($options['reportProvidesOrderBy'])||$options['reportProvidesOrderBy']==0) {\r\n $options['extraParams']['orderby'] = 'name';\r\n }\r\n //Setup the Plot drop-down which uses the Suqare selection the user makes.\r\n $options['parentControlId']= 'squares-select-list';\r\n $options['filterField']= 'square_id';\r\n $options['reportProvidesOrderBy']=true;\r\n $options['searchUpdatesSref']=true;\r\n $options['label']='Plot';\r\n $options['report']='projects/npms/original_splash_site_only/get_plots_for_square_id';\r\n $options['extraParams']['current_user_id']=$currentUserId;\r\n $options['extraParams']['user_square_attr_id']=$userSquareAttrId;\r\n //Create the drop-down for the plot\r\n $location_list_args = array_merge(array(\r\n 'label'=>lang::get('LANG_Location_Label'),\r\n 'view'=>'detail'\r\n ), $options);\r\n $r .= data_entry_helper::location_select($location_list_args);\r\n //Create the mini report\r\n $r .= self::plot_report_panel($auth,$options);\r\n return $r;\r\n }\r\n }", "title": "" }, { "docid": "d80e342a4bcf436c1e8feab2468ed543", "score": "0.5250505", "text": "public function shops_select()\n\t{\n\t\t$optionsNum = 0;\n\t\t$html_select = '[Tienda:\n\t\t\t\t\t\t<select id=\"selectPlaceShop\" name=\"selectPlaceShop\">';\n\t\t\n\t\t$data_array = $_SESSION['alowedShops'];\n\t\t\n\t\tforeach($data_array as $id => $val)\n\t\t{\n\t\t\t$selected = '';\n\t\t\tif($id == $_SESSION[\"idShop\"])\n\t\t\t\t$selected = 'selected = \"selected\"';\n\t\t\t\n\t\t\t$html_select .= \"<option value='$id-$val' $selected >$val</option>\";\n\t\t\t\n\t\t\t$optionsNum++;\n\t\t}\n\t\t\n\t\t$html_select .= '</select>]';\n\t\t\n\t\tif($optionsNum > 1)\n\t\t\techo $html_select;\n\t\telse\n\t\t\techo '';\n\t}", "title": "" }, { "docid": "423c58e806fd16ebb828bce4d29ae6a8", "score": "0.5245634", "text": "function getDataLocation()\n{\n global $db;\n $result = [];\n if ($db->connect()) {\n $strSQL = \"SELECT * FROM ga_location ORDER BY location_name\";\n $res = $db->execute($strSQL);\n while ($rowDb = $db->fetchrow($res)) {\n $result[] = [\"value\" => $rowDb['id'], \"text\" => $rowDb['location_name'], \"selected\" => false];\n }\n }\n return $result;\n}", "title": "" }, { "docid": "54f3e498009994ef2ce054d72f75859f", "score": "0.5243351", "text": "abstract public function getSelect();", "title": "" }, { "docid": "b29630fcdff150269d83b07fbd0e827a", "score": "0.52429014", "text": "public function locationAction() {\n $objCurlHandler = Engine_Utilities_CurlRequestHandler::getInstance();\n $objCore = Engine_Core_Core::getInstance();\n $objSecurity = Engine_Vault_Security::getInstance();\n $this->_appSetting = $objCore->getAppSetting();\n\n if ($this->getRequest()->isPost()) {\n $data['name'] = $this->getRequest()->getPost('name');\n $data['location_status'] = $this->getRequest()->getPost('location_status');\n $data['location_type'] = 3;\n $data['parent_id'] = $this->getRequest()->getPost('parent_id');\n\n\n $url = $this->_appSetting->apiLink . '/settingdetails?method=addcountry';\n $curlResponse = $objCurlHandler->curlUsingPost($url, $data);\n if ($curlResponse) {\n $this->redirect('/agent/location-details');\n }\n }\n\n $url = $this->_appSetting->apiLink . '/get-locations?method=getlocation';\n\n $curlResponse = $objCurlHandler->curlUsingGet($url);\n $url = $this->_appSetting->apiLink . '/get-locations?method=getcountrys';\n $curlResponse2 = $objCurlHandler->curlUsingGet($url);\n\n\n if ($curlResponse->code == 200) {\n $this->view->locationdetails = $curlResponse->data;\n $this->view->countrylist = $curlResponse2->data;\n }\n }", "title": "" }, { "docid": "07d97cae85df617447e97fe4b073fb88", "score": "0.523427", "text": "function select_language()\n\t{\n\t\tif ( count( $this->languages ) > 1 ) {\n\t\t\t$this->data[1]['form']['bb_lang']['value'] = $this->language;\n\t\t\t$this->data[1]['form']['bb_lang']['options'] = $this->languages;\n\t\t\t$this->select( 'bb_lang' );\n\t\t} else {\n\t\t\t$this->data[1]['form']['bb_lang']['value'] = 'en_US';\n\t\t\t$this->input_hidden( 'bb_lang' );\n\t\t}\n\t}", "title": "" }, { "docid": "dd19fdf8259c87ea3a402885afff9737", "score": "0.5234138", "text": "function iwm_build_i_world_map_dropdown( $atts) {\r\n\r\n\t$id = $atts['id'];\r\n\r\n\tglobal $wpdb;\r\n\tglobal $table_name_imap;\r\n\t$mapdata = $wpdb->get_row(\"SELECT * FROM $table_name_imap WHERE id = $id\", ARRAY_A);\r\n\t$input = str_replace( array(\"\\r\\n\", \"\\r\", \"\\n\"), ' ', addslashes( $mapdata['places']));\r\n\t$places = explode( \";\", $input, -1 );\r\n\tsort( $places);\r\n\t$map_action = $mapdata['map_action'];\r\n\t$displaymode = $mapdata['display_mode'];\r\n\t$target = \"\";\t\r\n\r\n\t$html = \"\";\r\n\t$before = \"\";\r\n\t$after = \"\";\r\n\r\n\t$html = $before;\r\n\r\n\r\n\t$html = $html.\"<select id='imap-dropdown-\".$id.\"' onchange='iwm_select(value,\".$id.\")'>\";\r\n\t$html = $html .\"<option>\".__( 'Please Select...','iwm' ).\"</option>\";\r\n\r\n\t$orderoptions = array();\r\n\r\n\t\t$i = 1;\r\n\t\tforeach ( $places as $place) {\r\n\t\t\t$arr = explode( ',', $place );\r\n\t\t\t$ttit = $arr[1];\r\n\t\t\t$ttool = $arr[2];\r\n\t\t\t$ofinal = array( ',', ';' );\r\n\t\t\t$oreplace = array( '&#44', '&#59' );\r\n\t\t\t$ttitle = str_replace( $oreplace, $ofinal, $ttit);\r\n\t\t\t$ttooltip = str_replace( $oreplace, $ofinal, $ttool);\r\n\t\t\t$index = trim( $arr[0] );\r\n\t\t\t$oaction = trim( $arr[3] );\r\n\t\t\t$ofinal = array( ',', ';' );\r\n\t\t\t$oreplace = array( '&#44', '&#59' );\r\n\t\t\t$formatedactionv = str_replace( $oreplace,$ofinal , $oaction );\r\n\r\n\t\t\t$formatedactionv = str_replace( '\\\"','{quote}', $formatedactionv);\r\n\r\n\t\t\tif ( '' != $formatedactionv) {\r\n\t\t\t\t//$html = $html . \"<option value='\" . $formatedactionv . \"' id='imap\" . $id . \"-\" . trim( $index) . \"'>\" . trim( $ttitle) . \"</option>\";\r\n\t\t\t\t//$html = $html . \"<option id='imap\" . $id . \"-\" . trim( $index) . \"' value='\" . $index . \"' title='\" . $ttooltip . \"'>\" . trim( $ttitle) . \"</option>\";\r\n\t\t\t\t$divid = trim( $index);\r\n\t\t\t\tif ( 'markers02' == $displaymode || 'text02' == $displaymode || 'customicon' == $displaymode ) {\r\n\t\t\t\t\t$rcode = explode( ' ',$divid );\r\n\t\t\t\t\t$divid = trim( $rcode[0] );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$divid = str_replace( '.','', $divid );\r\n\t\t\t\t$divid = str_replace( '-','', $divid );\r\n\t\t\t\t$divid = str_replace( ' ','', $divid );\r\n\t\t\t\t$orderoptions[$arr[1]] = \"<option id='imap\" . $id . \"-\" . $divid . \"' value='\" . $index . \"' title='\" . $ttooltip . \"'>\" . trim( $ttitle) . \"</option>\";\r\n\r\n\t\t\t}\r\n\t}\r\n\r\n\t//ksort( $orderoptions);\r\n\tuksort( $orderoptions, 'iwmcompareWords');\r\n\r\n\tforeach ( $orderoptions as $key => $value) {\r\n\t\t$html .= $value;\r\n\t}\r\n\t\r\n\t$html = $html.\"</select>\";\r\n\r\n\t$html = $html.$after;\r\n\r\n\treturn $html;\r\n}", "title": "" }, { "docid": "f1db53bfc3a69924d426f28fbfa1f984", "score": "0.5234046", "text": "private function get_options(){\n\t}", "title": "" }, { "docid": "c27a9c03c1999badb4ba42e9ee31b09d", "score": "0.5231959", "text": "public function settings_field_location() {\n\n\t\tglobal $itsec_globals;\n\n\t\tif ( isset( $this->settings['location'] ) ) {\n\n\t\t\t$location = sanitize_text_field( $this->settings['location'] );\n\n\t\t} else {\n\n\t\t\t$location = $itsec_globals['ithemes_backup_dir'];\n\n\t\t}\n\n\t\techo '<input class=\"large-text\" name=\"itsec_backup[location]\" id=\"itsec_backup_location\" value=\"' . $location . '\" type=\"text\">';\n\t\techo '<label for=\"itsec_backup_location\"> ' . __( 'The path on your machine where backup files should be stored.', 'it-l10n-ithemes-security-pro' ) . '</label>';\n\t\techo '<p class=\"description\"> ' . __( 'This path must be writable by your website. For added security, it is recommended you do not include it in your website root folder.', 'it-l10n-ithemes-security-pro' ) . '</p>';\n\t\techo '<input id=\"itsec_reset_backup_location\" class=\"button-secondary\" name=\"itsec_reset_backup_location\" type=\"button\" value=\"' . __( 'Restore Default Location', 'it-l10n-ithemes-security-pro' ) . '\" />' . PHP_EOL;\n\n\t}", "title": "" }, { "docid": "1a116e447033bd11a9b165cd53abb58f", "score": "0.5225541", "text": "function getSelectLigue($ListeLigue){\n\n\t\techo(\"<select name=\\\"ligue\\\">\");\n\t\techo(\"<option value=\\\"\\\"> ----- Choisir ----- </option>\");\n\n\t\tfor($i=0;$i<count($ListeLigue);$i++){\n\t\t\techo(\"salade de bite\");\n\t\t\techo(\"<option value=\".$ListeLigue[$i]->getId().\">\".$ListeLigue[$i]->getLibelle().\" </option>\");\n\t\t}\n\t\techo(\"</select>\");\t\n\t}", "title": "" }, { "docid": "2812d0446a8ded2c6055f8ee1a96903e", "score": "0.52206606", "text": "function config_single_rtype_select($name, $label, $current, $width=300)\n {\n global $lang;\n $rtypes=get_resource_types();\n?>\n <div class=\"Question\">\n <label for=\"<?php echo $name?>\" title=\"<?php echo str_replace('%cvn', $name, $lang['plugins-configvar'])?>\"><?php echo $label?></label>\n <select name=\"<?php echo $name?>\" id=\"<?php echo $name?>\" style=\"width:<?php echo $width ?>px\">\n<?php\n foreach($rtypes as $rtype)\n {\n echo ' <option value=\"'. $rtype['ref'] . '\"' . (($current==$rtype['ref'])?' selected':'') . '>' . lang_or_i18n_get_translated($rtype['name'],'resourcetype-') . '</option>';\n }\n?>\n </select>\n </div>\n <div class=\"clearerleft\"></div>\n<?php\n}", "title": "" }, { "docid": "524a41bf6f3cd6d962c6d859db48e4a9", "score": "0.52206254", "text": "function get_job_setout_locations($dbc, $job, $row_count)\n {\n // build a query to get the stations where this job can set out cars\n $sql = 'select locations.code from locations, `' . $job . '`\n where locations.station = `' . $job .'`.station\n and setout = \"T\"';\n $rs = mysqli_query($dbc, $sql);\n\n if (mysqli_num_rows($rs) > 0)\n {\n $station_list = '<select name=\"station_list' . $row_count . '\">';\n $station_list .= '<option value=\"\"></option>';\n while ($row = mysqli_fetch_array($rs))\n {\n $station_list .= '<option value=\"' . $row[0] . '\">' . $row[0] . '</option>';\n }\n $station_list .= \"</select>\";\n }\n else\n {\n $station_list = '<select name=\"station_list\"><option value=\"\">This job has no set-out locations</option></select>';\n }\n return $station_list;\n }", "title": "" }, { "docid": "6d547572ddce10d0b37a771d3ccb32a1", "score": "0.52179885", "text": "function GetCountryName()\n\t{\n\t\t$con = OpenConn();\n\t\t$strOption = \"\";\n\t\t$sql =\"call CSP_ADMIN_COUNTRY_MASTER()\";\n\t\t$result=mysqli_query($con,$sql);\n\t\t$strOption.=\"<option value='0' title='Select Country Name'>-- Select --</option>\";\n\t\twhile($rows=mysqli_fetch_array($result))\n\t\t\t{\n\t\t\t\t$strSelected =\"\";\n\t\t\t\tif($rows[0]==99)\n\t\t\t\t\t{\n\t\t\t\t\t\t$strSelected =\"selected=selected\";\n\t\t\t\t\t}\n\t\t\t\t$strOption.=\"<option value='\".$rows[0].\"' $strSelected>\".$rows[1].\"</option>\";\n\t\t\t}\n\t\treturn $strOption;\n\t\tCloseConn($con);\n\t}", "title": "" }, { "docid": "6a2181b352bdeac5f155e77ed73b1193", "score": "0.52166444", "text": "public function get_option($option_name);", "title": "" }, { "docid": "ae257223b4b758931ff0e65e9a83ffa2", "score": "0.5216435", "text": "function getSelectOption($text) {\n\t\t# first trim the whitespace at the beginning and end of the text\n\t\t$text = trim($text);\n\t\t# print out the option only if its not an empty string\n\t\tif ($text != \"\") {\n\t\t\techo \"<option value=\\\"\".$text.\"\\\">\".$text.\"</option>\";\n\t\t}\n\t}", "title": "" }, { "docid": "ce5e80bd971fb75ffc7360d24c66da13", "score": "0.5214927", "text": "private function select() {\n\t\t$option_key = FORMLIFT_STYLE;\n\t\t$select = \"<select name='{$option_key}[{$this->class}][{$this->attribute}]' style='max-width:270px;'>\";\n\t\tif ( key_exists( $this->form->get_style_setting( $this->class, $this->attribute ), $this->values ) ) {\n\t\t\tforeach ( $this->values as $possible_value => $label ) {\n\t\t\t\tif ( $possible_value == $this->form->get_style_setting( $this->class, $this->attribute ) ) {\n\t\t\t\t\t$select .= \"<option value='$possible_value' selected>$label</option>\";\n\t\t\t\t} else {\n\t\t\t\t\t$select .= \"<option value='$possible_value'>$label</option>\";\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$value = $this->form->get_default_style_setting( $this->class, $this->attribute );\n\t\t\tforeach ( $this->values as $possible_value => $label ) {\n\t\t\t\tif ( $possible_value == $value ) {\n\t\t\t\t\t$select .= \"<option value='$possible_value' selected>$label</option>\";\n\t\t\t\t} else {\n\t\t\t\t\t$select .= \"<option value='$possible_value'>$label</option>\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$select .= \"</select>\";\n\n\t\treturn $select;\n\t}", "title": "" }, { "docid": "cd964f9bf33f8c7cf14f310125420313", "score": "0.5211187", "text": "public function getSelectLabel(){\n return $this->getNumero() . '(' . $this->getType() . ') créé le ' . $this->getDateCreation()->format('d/m/Y');\n }", "title": "" }, { "docid": "9cacd05ea203a5fefcda582f65f31081", "score": "0.52054626", "text": "function rh_get_selected_location_cb(){\n\t$responseObject = new \\RedHammer\\API\\ResponseObject();\n\t$preferred_id = filter_var($_REQUEST['pid'], FILTER_SANITIZE_NUMBER_INT);\n\tif(!$preferred_id) {\n\t\t$preferred_id = -1;\n\t}\n\t$data = $preferred_id;\n\t$message = NULL;\n\t$error = false;\n\t$responseObject->set( $data, $message, $error );\n\techo json_encode( $responseObject );\n\tdie();\n\n}", "title": "" }, { "docid": "2e3203ea9317c946880630ae81dba8ef", "score": "0.5200749", "text": "public function getAddressesHtmlSelect($type) {\n if ($this->isCustomerLoggedIn()) {\n $options = array();\n foreach ($this->getCustomer()->getAddresses() as $address) {\n $options[] = array(\n 'value' => $address->getId(),\n 'label' => $address->format('oneline')\n );\n }\n\n $addressId = $this->getAddress()->getCustomerAddressId();\n if (empty($addressId)) {\n if ($type == 'billing') {\n $address = $this->getCustomer()->getPrimaryBillingAddress();\n } else {\n $address = $this->getCustomer()->getPrimaryShippingAddress();\n }\n if ($address) {\n $addressId = $address->getId();\n }\n }\n\n $select = $this->getLayout()->createBlock('core/html_select')\n ->setName($type . '_address_id')\n ->setId($type . '-address-select')\n ->setClass('address-select')\n ->setExtraParams('onchange=\"' . $type . '.newAddress(!this.value)\"')\n ->setValue($addressId)\n ->setOptions($options);\n\n $select->addOption('', Mage::helper('checkout')->__('New Address'));\n\n return $select->getHtml();\n }\n return '';\n }", "title": "" }, { "docid": "ab833fc1995bf392ef1e7f696a8fe004", "score": "0.5200605", "text": "public function getLocalidadOption( $type, $value = false, $select = false ) {\r\n\t\t\t$where = '';\r\n\t\t\tif(($value) && ( ! is_numeric($value))) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tswitch ($type) {\r\n\t\t\t\tcase 'comuna' :\r\n\t\t\t\t\tif($value) {\r\n\t\t\t\t\t\t$where = ' WHERE `COMUNA_PROVINCIA_ID` =' .$value;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$sql = \"SELECT `COMUNA_NOMBRE`, `COMUNA_ID` FROM `bm_comuna`\";\r\n\t\t\t\t\t$R = $this->conexion->queryFetch($sql .$where);\r\n\t\t\t\t\treturn $this->getOption($R, 'COMUNA_ID', 'COMUNA_NOMBRE', $select);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'region' :\r\n\t\t\t\t\t$sql = \"SELECT `REGION_ID` , `REGION_NOMBRE` FROM `bm_region`\";\r\n\t\t\t\t\t$R = $this->conexion->queryFetch($sql .$where);\r\n\t\t\t\t\treturn $this->getOption($R, 'REGION_ID', 'REGION_NOMBRE', $select);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'provincia' :\r\n\t\t\t\t\tif($value) {\r\n\t\t\t\t\t\t$where = ' WHERE `PROVINCIA_REGION_ID` =' .$value;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$sql = \"SELECT `PROVINCIA_ID` , `PROVINCIA_NOMBRE` FROM `bm_provincia`\";\r\n\t\t\t\t\t$R = $this->conexion->queryFetch($sql .$where);\r\n\t\t\t\t\treturn $this->getOption($R, 'PROVINCIA_ID', 'PROVINCIA_NOMBRE', $select);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault :\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "46dc559aa8597d6d6eef30bcd1bb6c72", "score": "0.51887876", "text": "function ml_select_field ($key, $options, $text='') {\n\t$value = ml_get_option($key);\n\techo '<select id=\"' . $key . '\" name=\"ml_options[' . $key . ']\">';\n\tforeach ($options as $val => $name) {\n\t\techo '<option value=\"' . $val . '\"' . selected($value, $val, false) . '>' . __($name, 'media-libraries') . '</option>';\n\t}\n\techo '</select>';\n\n\tif (!empty($text)) {\n\t\techo '<p>' . $text . '</p>';\n\t}\n}", "title": "" }, { "docid": "f7d79988960d68c4c008ad095bad2672", "score": "0.51812667", "text": "abstract public static function get_option();", "title": "" }, { "docid": "485d693a7ac8e4ec3460de7c594a8c9a", "score": "0.5170373", "text": "public function getSelect()\n {\n return $this->initialSelect;\n }", "title": "" }, { "docid": "475ec27851439d899bfb8cc92f1cf806", "score": "0.51658005", "text": "function get_role_selectbox_option($selected = NULL)\n\t{\n\t\t$_option = '';\n\t\t$_group = $this->content_model->list_content();\n\t\t\n\t\tforeach($_group as $_data)\n\t\t{\n\t\t\t$_selected = ($_data['id'] == $selected) ? ' selected=\"selected\"' : '';\n\t\t\t$_option .= '<option value=\"'. $_data['id'].'\"'.$_selected.'>'.$_data['name'].'</option>';\n\t\t}\n\t\t\n\t\treturn $_option;\n\t}", "title": "" }, { "docid": "7552807bcdbe8e5db4a55f37b36d22cf", "score": "0.5162843", "text": "function get_wps_option($option_id) {\n // return $getoptions[$option_id];\n //return $this->wpshapereOptions->getOption( $option_id );\n\t}", "title": "" }, { "docid": "21433183226c0c46f2c634858e479ef1", "score": "0.516204", "text": "function list_countries_select ($selected) {\r\n global $sock;\r\n global $COUNTRIES;\r\n\r\n for ($x = 0; $x < count($COUNTRIES); $x++) {\r\n $result .= \"<option value=\\\"\" . $COUNTRIES[$x];\r\n $result .= \"\\\"\" . ($COUNTRIES[$x] == $selected ? \" selected\" : \"\");\r\n $result .= \">\" . $COUNTRIES[$x];\r\n }\r\n\r\n return $result;\r\n }", "title": "" }, { "docid": "e4138bb3def6f30a9c2ec7e9c067ee51", "score": "0.5157331", "text": "function _html_select(){\n $inlist = false;\n\n if($this->who &&\n !in_array($this->who,$this->usersgroups) &&\n !in_array($this->who,$this->specials)){\n\n if($this->who{0} == '@'){\n $gsel = ' selected=\"selected\"';\n }else{\n $usel = ' selected=\"selected\"';\n }\n }else{\n $usel = '';\n $gsel = '';\n $inlist = true;\n }\n\n echo '<select name=\"acl_t\" class=\"edit\">'.NL;\n echo ' <option value=\"__g__\" class=\"aclgroup\"'.$gsel.'>'.$this->getLang('acl_group').':</option>'.NL;\n echo ' <option value=\"__u__\" class=\"acluser\"'.$usel.'>'.$this->getLang('acl_user').':</option>'.NL;\n if (!empty($this->specials)) {\n echo ' <optgroup label=\"&#160;\">'.NL;\n foreach($this->specials as $ug){\n if($ug == $this->who){\n $sel = ' selected=\"selected\"';\n $inlist = true;\n }else{\n $sel = '';\n }\n\n if($ug{0} == '@'){\n echo ' <option value=\"'.hsc($ug).'\" class=\"aclgroup\"'.$sel.'>'.hsc($ug).'</option>'.NL;\n }else{\n echo ' <option value=\"'.hsc($ug).'\" class=\"acluser\"'.$sel.'>'.hsc($ug).'</option>'.NL;\n }\n }\n echo ' </optgroup>'.NL;\n }\n if (!empty($this->usersgroups)) {\n echo ' <optgroup label=\"&#160;\">'.NL;\n foreach($this->usersgroups as $ug){\n if($ug == $this->who){\n $sel = ' selected=\"selected\"';\n $inlist = true;\n }else{\n $sel = '';\n }\n\n if($ug{0} == '@'){\n echo ' <option value=\"'.hsc($ug).'\" class=\"aclgroup\"'.$sel.'>'.hsc($ug).'</option>'.NL;\n }else{\n echo ' <option value=\"'.hsc($ug).'\" class=\"acluser\"'.$sel.'>'.hsc($ug).'</option>'.NL;\n }\n }\n echo ' </optgroup>'.NL;\n }\n echo '</select>'.NL;\n return $inlist;\n }", "title": "" }, { "docid": "91d3cace8aea7087328daf369a8c2d44", "score": "0.5157232", "text": "public function getAddressesHtmlSelect($type)\n {\n if ($this->isCustomerLoggedIn()) {\n $options = array();\n foreach ($this->getCustomer()->getAddresses() as $address) {\n $options[] = array(\n 'value' => $address->getId(),\n 'label' => $address->format('oneline')\n );\n }\n\n $addressId = $this->getAddress()->getCustomerAddressId();\n if (empty($addressId)) {\n if ($type=='billing') {\n $address = $this->getCustomer()->getPrimaryBillingAddress();\n } else {\n $address = $this->getCustomer()->getPrimaryShippingAddress();\n }\n if ($address) {\n $addressId = $address->getId();\n }\n }\n\n $select = $this->getLayout()->createBlock('core/html_select')\n ->setName($type.'_address_id')\n ->setId($type.'-address-select')\n ->setClass('address-select')\n// ->setExtraParams('onchange=\"'.$type.'.newAddress(!this.value)\"')\n ->setValue($addressId)\n ->setOptions($options);\n\n $select->addOption('', Mage::helper('checkout')->__('New Address'));\n\n return $select->getHtml();\n }\n return '';\n }", "title": "" }, { "docid": "7fe9f9960b34e5051cb475c26a09ddc0", "score": "0.5152142", "text": "function wbf_options_zones_geographiques(){\r\n\r\n db_set_active('spirales');\r\n $options = array();\r\n $options['']= '-Choix-';\r\n $results = db_query('SELECT * FROM {T_ZONE_GEOGRAPHIQUE}');\r\n foreach ($results as $result) {\r\n $options[$result->ZON_NUM]= $result->ZON_NOM;\r\n }\r\n db_set_active();\r\n return $options;\r\n}", "title": "" }, { "docid": "a7fd3a445f8ce89df421e09238bfdc34", "score": "0.51490295", "text": "function sidebarSelect( $id , $_val ){\n\t\t\n\t\t$fid = 'edit-menu-item-sidebars-'.$id;\n\t\t$name = 'menu-item-sidebars['.$id.']';\n\t\t$selection = $_val; //get_post_meta( $id, '_menu_item_sidebars', true);\n\t\t\n\t\t$ops = $this->sidebarList();\n\t\tif( empty( $ops ) ) return '';\n\t\t\n\t\t$html = '<select id=\"'.$fid.'\" name=\"'.$name.'\" class=\"edit-menu-item-sidebars\">';\n\t\t\n\t\t$html.= '<option value=\"\"></option>';\n\t\tforeach( $ops as $opVal => $op ){\n\t\t\t$selected = $opVal == $selection ? 'selected=\"selected\"' : '';\n\t\t\t$html.= '<option value=\"'.$opVal.'\" '.$selected.' >'.$op.'</option>';\n\t\t}\n\t\t\t\t\n\t\t$html.= '</select>';\n\t\t\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "eadc50e71ea1a641241726ae2d30dce9", "score": "0.5141111", "text": "public function getSelectAddressUrl()\n {\n return $this->getUrl('*/checkout_address/selectBilling');\n }", "title": "" }, { "docid": "5dd4b69fbd98899fc3462b2b34ce2f20", "score": "0.5140248", "text": "public function getSelectData();", "title": "" }, { "docid": "7566a716ccb6041b95c83e0115563ffb", "score": "0.5139336", "text": "private function get_option_name() {\n\t\treturn $this->provider->get_option_name();\n\t}", "title": "" }, { "docid": "da3e5dad0488d563025f968f4c251242", "score": "0.51379114", "text": "function config_custom_select($name, $label, $available, $value)\n {\n config_single_select($name, $label, $value, $available, false);\n }", "title": "" }, { "docid": "fb2a3985c6ef8e545d321f05b81650f0", "score": "0.51377624", "text": "function getLocation() {\n return $this->getFieldValue('location');\n }", "title": "" }, { "docid": "0986fb4b7ac21176412fa85a231e590f", "score": "0.513754", "text": "function fill_unit_select_box($connect)\n{ \n $output = '';\n $query = \"SELECT * FROM time_tracker_activity_select_box\";\n $statement = $connect->prepare($query);\n $statement->execute();\n $result = $statement->fetchAll();\n foreach($result as $row)\n {\n $output .= '<option value=\"'.$row[\"unit_name\"].'\">'.$row[\"unit_name\"].'</option>';\n }\n return $output;\n}", "title": "" }, { "docid": "81474e50057925d6df337b820612c36d", "score": "0.51347476", "text": "function getConsignmentLocationsList()\n{\n // Add DB Connection\n require('db.php');\n $sql = \" SELECT * FROM consignmentlocations WHERE bankview = 'NO' \";\n $result = $con->query($sql);\n if ($result->num_rows > 0) {\n while ($row = $result->fetch_assoc()) {\n echo '<option value=\"'.$row['id'].'\">'.$row['name'].'</option>';\n }\n } else {\n echo '<option value=\"\">No Consignment Location Found</option>';\n }\n $con->close();\n}", "title": "" }, { "docid": "b10bc20988490b0b2cf8f64324f11ecb", "score": "0.5134724", "text": "function store_option($option)\n {\n $db=&$this->getDbo();\n\t\t$db->setQuery(\"SELECT MAX(`ordering`) from #__\".APP_PREFIX.\"_fields_options where fid = '{$this->id}'\");\n $ordering=(int)$db->loadResult() + 1;\n \n\t\t$option = $db->getEscaped($option);\n\t\t$db->setQuery(\"INSERT INTO #__\".APP_PREFIX.\"_fields_options SET `fid` = '{$this->id}', `option_name` ='{$option}', `ordering`={$ordering}\");\n\t\t$db->query();\n \n\t}", "title": "" }, { "docid": "9605d8d9a9170eba27d926f87ddcb529", "score": "0.51302737", "text": "public function getPickupLocation()\n {\n return isset($this->pickupLocation) ? $this->pickupLocation : null;\n }", "title": "" }, { "docid": "8761c56aff80fa91014d87b469794ac8", "score": "0.5125722", "text": "public function getFormPais () {\n\treturn ?>\n\t\t\t<select name=\"select\" autofocus=\"autofocus\" >\n\t\t\t\t<option value=\"<?PHP echo $this->valor;?>\"><?PHP echo $this->valor;?></option>\n\t\t\t\t<option value=\"M\">Masculino</option>\n\t\t\t\t<option value=\"F\">Femino</option>\n\t\t\t </select>\n\t\t\t<?PHP;\t\n\t}", "title": "" }, { "docid": "373ffaa3d6a0e9c5be07f218d752e337", "score": "0.5122686", "text": "function wcip_click_downloard_show_form_element(){\n ?>\n \n <select name=\"wcip_click\">\n <option value=\"a4\">Show in New Window </option>\n <option value=\"a5\">Downloard</option>\n </select>\n <?php\n }", "title": "" }, { "docid": "c827530f16bcee3f314349f87c36c070", "score": "0.5120821", "text": "function sw_options_display_locations($sw_options) {\n\t\t\n\t\t// Declare the Display Settings tab and tab name\n\t\t$sw_options['tabs']['links']['displayLocations'] = 'Display Locations';\n\t\t\n\t\t// Default locations available (ARRAY)\n\t\t$contentLocations = array(\n\t\t\t'above'=>'Above the Content',\n\t\t\t'below' => 'Below the Content', \n\t\t\t'both' => 'Both Above and Below the Content', \n\t\t\t'none' => 'None/Manual Placement'\n\t\t);\n\t\t\n\t\t// Add the options to this tab\n\t\t$sw_options['options']['displayLocations'] = array(\n\t\t\t'displayLocationsTitle' => array(\n\t\t\t\t'type' \t\t=> 'title',\n\t\t\t\t'content' \t=> 'Display Locations'\n\t\t\t),\n\t\t\t'displayLocationsDescription' => array(\n\t\t\t\t'type'\t\t=> 'paragraph',\n\t\t\t\t'content'\t=>\t'<h3>Where would you like to display your horizontal share buttons?</h3>If you select \\'None/Manual Placement\\' you can add the social warfare plugin by adding \\'social_warfare()\\' to your themes files or shortcode [social_warfare] in posts or pages at the specific location that you want it to appear.'\n\t\t\t),\n\t\t\t'locationPost' => array(\n\t\t\t\t'type'\t\t=> 'select',\n\t\t\t\t'name'\t\t=> 'Location on Posts',\n\t\t\t\t'content'\t=> $contentLocations,\n\t\t\t\t'default'\t=> 'both'\n\t\t\t),\n\t\t\t'locationPage' => array(\n\t\t\t\t'type'\t\t=> 'select',\n\t\t\t\t'name'\t\t=> 'Location on Pages',\n\t\t\t\t'content'\t=> $contentLocations,\n\t\t\t\t'default'\t=> 'both'\n\t\t\t),\n\t\t\t'locationSite' => array(\n\t\t\t\t'type'\t\t=> 'select',\n\t\t\t\t'name'\t\t=> 'Location Sitewide',\n\t\t\t\t'content'\t=> $contentLocations,\n\t\t\t\t'default'\t=> 'both'\n\t\t\t)\n\t\t);\n\t\t\n\t\t// Get the post Types\n\t\t$postTypes = get_post_types();\n\t\t\n\t\t// Unset the post types that don't matter\n\t\tif(isset($postTypes['post'])) \t\t\t\tunset($postTypes['post']);\n\t\tif(isset($postTypes['page'])) \t\t\t\tunset($postTypes['page']);\n\t\tif(isset($postTypes['attachment'])) \t\tunset($postTypes['attachment']);\n\t\tif(isset($postTypes['revision'])) \t\t\tunset($postTypes['revision']);\n\t\tif(isset($postTypes['nav_menu_item'])) \t\tunset($postTypes['nav_menu_item']);\n\t\tif(isset($postTypes['nf_sub'])) \t\t\tunset($postTypes['nf_sub']);\n\t\tif(isset($postTypes['shop_order'])) \t\tunset($postTypes['shop_order']);\n\t\tif(isset($postTypes['shop_order_refund'])) \tunset($postTypes['shop_order_refund']);\n\t\tif(isset($postTypes['shop_coupon'])) \t\tunset($postTypes['shop_coupon']);\n\t\tif(isset($postTypes['shop_webhook'])) \t\tunset($postTypes['shop_webhook']);\n\t\t\n\t\tif(!empty($postTypes)):\n\t\t\t\n\t\t\t// Loop through the Custom Post Type Options\n\t\t\tforeach($postTypes as $postType):\n\t\t\t\t$sw_options['options']['displayLocations']['location'.$postType] = array(\n\t\t\t\t\t'type'\t\t=> 'select',\n\t\t\t\t\t'name'\t\t=> 'Location on '.$postType.' Posts',\n\t\t\t\t\t'content'\t=> $contentLocations,\n\t\t\t\t\t'default'\t=> 'both'\t\t\t\t\t\n\t\t\t\t);\n\t\t\tendforeach;\n\t\tendif;\n\t\t\n\t\t$sw_options['options']['displayLocations']['floatLocationsDescription'] = array(\n\t\t\t'type'\t\t=> 'paragraph',\n\t\t\t'content'\t=>\t'<h3>Custom Post Type Placements for Vertical Floating Buttons (If Activated)</h3>These are the the same options as above, but now you get to choose where you want the vertical floating buttons to be turned off or on.'\n\t\t);\n\t\t\n\t\t$sw_options['options']['displayLocations']['floatLocationPost'] = array(\n\t\t\t'type'\t\t=> 'select',\n\t\t\t'name'\t\t=> 'Location on Posts',\n\t\t\t'content'\t=> array(\n\t\t\t\t'on'\t=> 'On',\n\t\t\t\t'off'\t=> 'Off',\n\t\t\t),\n\t\t\t'default'\t=> 'both'\n\t\t);\n\t\t$sw_options['options']['displayLocations']['floatlocationPage'] = array(\n\t\t\t'type'\t\t=> 'select',\n\t\t\t'name'\t\t=> 'Location on Pages',\n\t\t\t'content'\t=> array(\n\t\t\t\t'on'\t=> 'On',\n\t\t\t\t'off'\t=> 'Off',\n\t\t\t),\n\t\t\t'default'\t=> 'both'\n\t\t);\n\t\n\t\tif(!empty($postTypes)):\n\t\t\t\n\t\t\t// Loop through the Custom Post Type Options\n\t\t\tforeach($postTypes as $postType):\n\t\t\t\t$sw_options['options']['displayLocations']['floatLocation'.$postType] = array(\n\t\t\t\t\t'type'\t\t=> 'select',\n\t\t\t\t\t'name'\t\t=> 'Location on '.$postType.' Posts',\n\t\t\t\t\t'content'\t=> array(\n\t\t\t\t\t\t'on'\t=> 'On',\n\t\t\t\t\t\t'off'\t=> 'Off',\n\t\t\t\t\t),\n\t\t\t\t\t'default'\t=> 'On'\t\t\t\t\t\n\t\t\t\t);\n\t\t\tendforeach;\n\t\tendif;\n\t\t\n\t\t// Return the options values\n\t\treturn $sw_options;\n\t\t\n\t}", "title": "" }, { "docid": "1065742fd43427467141b40cf2258bc6", "score": "0.51200783", "text": "function selektiere() {\n $erg = \"\";\n foreach ( $this->einzelheitn as $key=>$val) {\n $erg .= $this->option( $key , $this->default, str_replace( \"_\", \" \", $key ));\n }\n return sprintf( \"<select id='wahl' name=\\\"%s\\\">\\n$erg</select>\\n\", \"wahl[]\");\n }", "title": "" }, { "docid": "1924afbb63481b18b913045c69ecf1a6", "score": "0.51195556", "text": "public function ShowJobSector()\n\t\t{\n\t\t\t$sql = \"SELECT * FROM settore_lavoro ORDER BY settore_lavoro.job_sector ASC\";\n\t\t\t$res = mysqli_query($this->conn, $sql);\n\t\t\t$jobsector = '<option id=\"0\">Scegli...</option>';\n\t\t\t\n\t\t\t\twhile($row = mysqli_fetch_array($res))\n\t\t\t\t{\n\t\t\t\t\t$jobsector .= '<option id=\"' . $row['id_job_sector'] . '\" value=\"' . $row['job_sector'] . '\">' . utf8_encode($row['job_sector']) . '</option>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\treturn $jobsector;\n\t\t}", "title": "" }, { "docid": "4582ce56ba8d0912b69db6ca284e56f7", "score": "0.51146036", "text": "function wbf_options_localisations(){\r\n\r\n db_set_active('spirales');\r\n $options = array();\r\n $options['']= '-Choix-';\r\n $results = db_query('SELECT * FROM {T_LOCALISATION} ORDER BY LOC_NOM ASC');\r\n foreach ($results as $result) {\r\n $options[$result->LOC_NUM]= $result->LOC_NOM;\r\n }\r\n db_set_active();\r\n return $options;\r\n}", "title": "" }, { "docid": "2458d56dad5048212a030d5fcb8b13fb", "score": "0.5114073", "text": "function getSelectOption($text) {\n\t// first trim the whitespace at the beginning and end of the text\n\t$text = trim($text);\n\t// print out the option only if its not an empty string\n\tif ($text != \"\") {\n\t\techo \"<option value=\\\"\".$text.\"\\\" selected>\".$text.\"</option>\";\n\t}\n}", "title": "" }, { "docid": "073d8728943bfd17b46fec957fb796d5", "score": "0.5113864", "text": "function getSelectSport($ListeSport){\n\n\t\techo(\"<select name=\\\"Sports\\\">\");\n\t\techo(\"<option value=\\\"\\\"> ----- Choisir ----- </option>\");\n\n\t\tfor ($i=0;$i<count($ListeSport);$i++){\n\t\t\techo(\"<option value=\".$ListeSport[i]->getId().\">\".$ListeSport[i]->getLibelle().\" </option>\");\n\t\t}\n\t\techo(\"</select>\");\t\n\t}", "title": "" }, { "docid": "61467e497b2e97a6d0cc7edbfffc7323", "score": "0.511285", "text": "public function getOption($name);", "title": "" }, { "docid": "61467e497b2e97a6d0cc7edbfffc7323", "score": "0.511285", "text": "public function getOption($name);", "title": "" }, { "docid": "700060e2b7b05320929e42f2621432b4", "score": "0.51116365", "text": "function formSelect($href, $nameParam, $values, $text, $defaultValue)\n{\n $str = '<form action=\"' . $href . '\" method=\"GET\" >' . \"\\n\";\n $str .= '<select name=\"' . $nameParam . '\" >' . \"\\n\";\n for($elem=0; $elem < count($values); $elem++)\n {\n $selected = \"\";\n\tif($values[\"$elem\"] == $defaultValue)\n\t {\n\t $selected = \"selected=\\\"selected\\\"\";\n\t }\n\t$str .= '<option name=\"' . $values[\"$elem\"] . \"\\\" $selected>\" . $values[\"$elem\"] . \"\\n\";\n }\n $str .= '</select><button type=\"submit\" >' . \"<strong>\" . myhtmlentities($text) . \"</strong>\\n\" . '</button></form>' . \"\\n\";\n\n return $str;\n}", "title": "" }, { "docid": "fec6555dd28b4b6c3ccd7e46881fdb7f", "score": "0.5105384", "text": "function location(){\n\t\treturn $this->location;\n\t}", "title": "" } ]